Changeset 3753
- Timestamp:
- 02/22/2012 07:32:48 PM (14 years ago)
- Location:
- branches/plugin
- Files:
-
- 6 edited
-
bbp-admin/bbp-admin.php (modified) (1 diff)
-
bbp-admin/bbp-settings.php (modified) (2 diffs)
-
bbp-includes/bbp-core-hooks.php (modified) (1 diff)
-
bbp-includes/bbp-core-options.php (modified) (2 diffs)
-
bbp-includes/bbp-reply-functions.php (modified) (1 diff)
-
bbp-includes/bbp-topic-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-admin.php
r3731 r3753 268 268 } 269 269 270 // Allow global access setting 271 add_settings_field( '_bbp_use_wp_editor', __( 'Fancy Editor', 'bbpress' ), 'bbp_admin_setting_callback_use_wp_editor', 'bbpress', 'bbp_main' ); 272 register_setting ( 'bbpress', '_bbp_use_wp_editor', 'intval' ); 270 // Allow Fancy editor setting 271 add_settings_field( '_bbp_use_wp_editor', __( 'Fancy Editor', 'bbpress' ), 'bbp_admin_setting_callback_use_wp_editor', 'bbpress', 'bbp_main' ); 272 register_setting ( 'bbpress', '_bbp_use_wp_editor', 'intval' ); 273 274 // Allow oEmbeds setting 275 add_settings_field( '_bbp_use_autoembed', __( 'Auto-embed Links', 'bbpress' ), 'bbp_admin_setting_callback_use_autoembed', 'bbpress', 'bbp_main' ); 276 register_setting ( 'bbpress', '_bbp_use_autoembed', 'intval' ); 273 277 274 278 /** Per Page Section **************************************************/ -
branches/plugin/bbp-admin/bbp-settings.php
r3719 r3753 150 150 <input id="_bbp_use_wp_editor" name="_bbp_use_wp_editor" type="checkbox" id="_bbp_use_wp_editor" value="1" <?php checked( bbp_use_wp_editor( true ) ); ?> /> 151 151 <label for="_bbp_use_wp_editor"><?php _e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label> 152 153 <?php 154 } 155 156 /** 157 * Allow oEmbed in replies 158 * 159 * @since bbPress (r3752) 160 * 161 * @uses checked() To display the checked attribute 162 */ 163 function bbp_admin_setting_callback_use_autoembed() { 164 ?> 165 166 <input id="_bbp_use_autoembed" name="bbp_use_autoembed" type="checkbox" id="_bbp_use_autoembed" value="1" <?php checked( bbp_use_autoembed( true ) ); ?> /> 167 <label for="_bbp_use_autoembed"><?php _e( 'Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and replies.', 'bbpress' ); ?></label> 152 168 153 169 <?php … … 594 610 '<li>' . __( '"Anonymous Posting" allows guest users who do not have accounts on your site to both create topics as well as replies.', 'bbpress' ) . '</li>' . 595 611 '<li>' . __( 'The Fancy Editor brings the luxury of the Visual editor and HTML editor from the traditional WordPress dashboard into your theme.', 'bbpress' ) . '</li>' . 612 '<li>' . __( 'Auto-embed will embed the media content from a URL directly into the replies. For example: links to Flickr and YouTube.', 'bbpress' ) . '</li>' . 596 613 '</ul>' . 597 614 '</p>' . -
branches/plugin/bbp-includes/bbp-core-hooks.php
r3744 r3753 71 71 * v---Load order 72 72 */ 73 add_action( 'bbp_init', 'bbp_load_textdomain', 2 ); 74 add_action( 'bbp_init', 'bbp_setup_option_filters', 4 ); 75 add_action( 'bbp_init', 'bbp_register_post_types', 10 ); 76 add_action( 'bbp_init', 'bbp_register_post_statuses', 12 ); 77 add_action( 'bbp_init', 'bbp_register_taxonomies', 14 ); 78 add_action( 'bbp_init', 'bbp_register_views', 16 ); 79 add_action( 'bbp_init', 'bbp_register_shortcodes', 18 ); 80 add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 ); 81 add_action( 'bbp_init', 'bbp_ready', 999 ); 73 add_action( 'bbp_init', 'bbp_load_textdomain', 2 ); 74 add_action( 'bbp_init', 'bbp_setup_option_filters', 4 ); 75 add_action( 'bbp_init', 'bbp_register_post_types', 10 ); 76 add_action( 'bbp_init', 'bbp_register_post_statuses', 12 ); 77 add_action( 'bbp_init', 'bbp_register_taxonomies', 14 ); 78 add_action( 'bbp_init', 'bbp_register_views', 16 ); 79 add_action( 'bbp_init', 'bbp_register_shortcodes', 18 ); 80 add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 ); 81 add_action( 'bbp_init', 'bbp_ready', 999 ); 82 83 // Autoembeds 84 add_filter( 'bbp_init', 'bbp_reply_content_autoembed', 8 ); 85 add_filter( 'bbp_init', 'bbp_topic_content_autoembed', 8 ); 82 86 83 87 /** -
branches/plugin/bbp-includes/bbp-core-options.php
r3586 r3753 49 49 // Use the WordPress editor if available 50 50 '_bbp_use_wp_editor' => true, 51 52 // Use the WordPress editor if available 53 '_bbp_use_wp_editor' => true, 54 55 // Allow oEmbed in topics and replies 56 '_bbp_allow_oembed' => false, 51 57 52 58 /** Per Page **********************************************************/ … … 329 335 function bbp_use_wp_editor( $default = true ) { 330 336 return (bool) apply_filters( 'bbp_use_wp_editor', (bool) get_option( '_bbp_use_wp_editor', $default ) ); 337 } 338 339 /** 340 * Use WordPress's oEmbed API 341 * 342 * @since bbPress (r3752) 343 * 344 * @param $default bool Optional. Default value true 345 * 346 * @uses get_option() To get the oEmbed option 347 * @return bool Use oEmbed? 348 */ 349 function bbp_use_autoembed( $default = true ) { 350 return (bool) apply_filters( 'bbp_use_autoembed', (bool) get_option( '_bbp_use_autoembed', $default ) ); 331 351 } 332 352 -
branches/plugin/bbp-includes/bbp-reply-functions.php
r3715 r3753 1341 1341 } 1342 1342 1343 /** Autoembed *****************************************************************/ 1344 1345 /** 1346 * Check if autoembeds are enabled and hook them in if so 1347 * 1348 * @since bbPress (r3752) 1349 * @global WP_Embed $wp_embed 1350 */ 1351 function bbp_reply_content_autoembed() { 1352 global $wp_embed; 1353 1354 if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) { 1355 add_filter( 'bbp_get_reply_content', array( $wp_embed, 'autoembed' ), 8 ); 1356 } 1357 } 1358 1343 1359 /** Feeds *********************************************************************/ 1344 1360 -
branches/plugin/bbp-includes/bbp-topic-functions.php
r3714 r3753 2960 2960 } 2961 2961 2962 /** Autoembed *****************************************************************/ 2963 2964 /** 2965 * Check if autoembeds are enabled and hook them in if so 2966 * 2967 * @since bbPress (r3752) 2968 * @global WP_Embed $wp_embed 2969 */ 2970 function bbp_topic_content_autoembed() { 2971 global $wp_embed; 2972 2973 if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) { 2974 add_filter( 'bbp_get_topic_content', array( $wp_embed, 'autoembed' ), 8 ); 2975 } 2976 } 2977 2962 2978 /** Feeds *********************************************************************/ 2963 2979
Note: See TracChangeset
for help on using the changeset viewer.