Changeset 4829
- Timestamp:
- 07/23/2011 10:05:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r4820 r4829 1124 1124 add_filter( 'bp_get_the_topic_post_content', array( &$this, 'run_shortcode' ), 7 ); 1125 1125 } 1126 1127 if ( bp_use_embed_in_private_messages() ) { 1128 add_filter( 'bp_get_the_thread_message_content', array( &$this, 'autoembed' ), 8 ); 1129 add_filter( 'bp_get_the_thread_message_content', array( &$this, 'run_shortcode' ), 7 ); 1130 } 1131 1132 do_action_ref_array( 'bp_core_setup_oembed', array( &$this ) ); 1126 1133 } 1127 1134 -
trunk/bp-core/bp-core-functions.php
r4820 r4829 1298 1298 1299 1299 /** 1300 * Are oembeds allwoed in ac itivity replies?1300 * Are oembeds allwoed in activity replies? 1301 1301 * 1302 1302 * @return bool False when activity replies embed support is disabled; true when enabled (default) … … 1308 1308 1309 1309 /** 1310 * Are oembeds allowed on forum posts?1310 * Are oembeds allowed in forum posts? 1311 1311 * 1312 1312 * @return bool False when form post embed support is disabled; true when enabled (default) … … 1315 1315 function bp_use_embed_in_forum_posts() { 1316 1316 return apply_filters( 'bp_use_embed_in_forum_posts', !defined( 'BP_EMBED_DISABLE_FORUM_POSTS' ) || !BP_EMBED_DISABLE_FORUM_POSTS ); 1317 } 1318 1319 /** 1320 * Are oembeds allowed in private messages? 1321 * 1322 * @return bool False when form post embed support is disabled; true when enabled (default) 1323 * @since 1.3 1324 */ 1325 function bp_use_embed_in_private_messages() { 1326 return apply_filters( 'bp_use_embed_in_private_messages', !defined( 'BP_EMBED_DISABLE_PRIVATE_MESSAGES' ) || !BP_EMBED_DISABLE_PRIVATE_MESSAGES ); 1317 1327 } 1318 1328 -
trunk/bp-messages/bp-messages-template.php
r4825 r4829 860 860 } 861 861 862 /** Embeds *******************************************************************/ 863 864 /** 865 * Enable oembed support for Messages. 866 * 867 * There's no caching as BP 1.3 does not have a Messages meta API. 868 * 869 * @see BP_Embed 870 * @since 1.3 871 * @todo Add Messages meta? 872 */ 873 function bp_messages_embed() { 874 add_filter( 'embed_post_id', 'bp_get_message_thread_id' ); 875 } 876 add_action( 'messages_box_loop_start', 'bp_messages_embed' ); 862 877 ?>
Note: See TracChangeset
for help on using the changeset viewer.