[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Messages template tags 4 * 5 * @since 3.0.0 6 * @version 3.0.0 7 */ 8 9 // Exit if accessed directly. 10 defined( 'ABSPATH' ) || exit; 11 12 /** 13 * Fire specific hooks into the private messages template. 14 * 15 * @since 3.0.0 16 * 17 * @param string $when Optional. Either 'before' or 'after'. 18 * @param string $suffix Optional. Use it to add terms at the end of the hook name. 19 */ 20 function bp_nouveau_messages_hook( $when = '', $suffix = '' ) { 21 $hook = array( 'bp' ); 22 23 if ( $when ) { 24 $hook[] = $when; 25 } 26 27 // It's a message hook 28 $hook[] = 'message'; 29 30 if ( $suffix ) { 31 if ( 'compose_content' === $suffix ) { 32 $hook[2] = 'messages'; 33 } 34 35 $hook[] = $suffix; 36 } 37 38 bp_nouveau_hook( $hook ); 39 } 40 41 /** 42 * Prints the JS Templates of the private messages UI. 43 * 44 * @since 10.0.0 45 */ 46 function bp_nouveau_messages_print_templates() { 47 bp_get_template_part( 'common/js-templates/messages/index' ); 48 } 49 50 /** 51 * Prints the HTML placeholders of the private messages UI. 52 * 53 * @since 10.0.0 54 */ 55 function bp_nouveau_messages_print_placeholders() { 56 ?> 57 <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div> 58 59 <div class="bp-messages-feedback"></div> 60 <div class="bp-messages-content"></div> 61 <?php 62 } 63 64 /** 65 * Load the new Messages User Interface 66 * 67 * @since 3.0.0 68 */ 69 function bp_nouveau_messages_member_interface() { 70 /** 71 * Fires before the member messages content. 72 * 73 * @since 1.2.0 74 */ 75 do_action( 'bp_before_member_messages_content' ); 76 77 /** 78 * Load the JS templates to manage Priveate Messages into site's footer. 79 * 80 * @since 10.0.0 Hook to the `wp_footer` action to print the JS templates. 81 */ 82 add_action( 'wp_footer', 'bp_nouveau_messages_print_templates' ); 83 bp_nouveau_messages_print_placeholders(); 84 85 /** 86 * Private hook to preserve backward compatibility with plugins needing the above placeholders to be located 87 * into: `bp-templates/bp-nouveau/buddypress/common/js-templates/messahges/index.php`. 88 * 89 * @since 10.0.0 90 */ 91 do_action( '_bp_nouveau_messages_print_placeholders' ); 92 93 // Load the Private messages UI 94 95 96 /** 97 * Fires after the member messages content. 98 * 99 * @since 1.2.0 100 */ 101 do_action( 'bp_after_member_messages_content' ); 102 } 103 104 /** 105 * Output the Member's messages search form. 106 * 107 * @since 3.0.0 108 * @since 3.2.0 Move the function into Template Tags and use a template part. 109 */ 110 function bp_nouveau_message_search_form() { 111 $search_form_html = bp_buffer_template_part( 'common/js-templates/messages/search-form', null, false ); 112 113 /** 114 * Filters the private message component search form. 115 * 116 * @since 2.2.0 117 * 118 * @param string $search_form_html HTML markup for the message search form. 119 */ 120 echo apply_filters( 'bp_message_search_form', $search_form_html ); 121 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Feb 7 01:00:59 2025 | Cross-referenced by PHPXref 0.7.1 |