Skip to:
Content

BuddyPress.org

Changeset 13764


Ignore:
Timestamp:
03/09/2024 11:01:57 AM (2 years ago)
Author:
imath
Message:

BP Standalone Block Themes: adapt Messages template hierarchy

  • Adds a members/single/index.html root template to the BP Standalone Theme hierarchy to be used by BP Standalone Block Themes in respect of WP Block Themes templating logic.

See #9118
See https://github.com/buddypress/buddypress/pull/249
See https://github.com/buddypress/buddyvibes/pull/7

Location:
trunk/src/bp-messages/screens
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/screens/compose.php

    r13096 r13764  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function messages_screen_compose() {
     
    3032        do_action( 'messages_screen_compose' );
    3133
    32         /**
    33          * Filters the template to load for the Messages compose screen.
    34          *
    35          * @since 1.0.0
    36          *
    37          * @param string $template Path to the messages template to load.
    38          */
    39         bp_core_load_template( apply_filters( 'messages_template_compose', 'members/single/home' ) );
     34        $templates = array(
     35                /**
     36                 * Filters the template to load for the Messages compose screen.
     37                 *
     38                 * @since 1.0.0
     39                 *
     40                 * @param string $template Path to the messages template to load.
     41                 */
     42                apply_filters( 'messages_template_compose', 'members/single/home' ),
     43                'members/single/index',
     44        );
     45
     46        bp_core_load_template( $templates );
    4047}
  • trunk/src/bp-messages/screens/inbox.php

    r13096 r13764  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function messages_screen_inbox() {
     
    2729        do_action( 'messages_screen_inbox' );
    2830
    29         /**
    30          * Filters the template to load for the Messages inbox screen.
    31          *
    32          * @since 1.0.0
    33          *
    34          * @param string $template Path to the messages template to load.
    35          */
    36         bp_core_load_template( apply_filters( 'messages_template_inbox', 'members/single/home' ) );
     31        $templates = array(
     32                /**
     33                 * Filters the template to load for the Messages inbox screen.
     34                 *
     35                 * @since 1.0.0
     36                 *
     37                 * @param string $template Path to the messages template to load.
     38                 */
     39                apply_filters( 'messages_template_inbox', 'members/single/home' ),
     40                'members/single/index',
     41        );
     42
     43        bp_core_load_template( $templates );
    3744}
  • trunk/src/bp-messages/screens/notices.php

    r13096 r13764  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function messages_screen_notices() {
     
    2729        do_action( 'messages_screen_notices' );
    2830
    29         /**
    30          * Filters the template to load for the Messages notices screen.
    31          *
    32          * @since 1.0.0
    33          *
    34          * @param string $template Path to the messages template to load.
    35          */
    36         bp_core_load_template( apply_filters( 'messages_template_notices', 'members/single/home' ) );
     31        $templates = array(
     32                /**
     33                 * Filters the template to load for the Messages notices screen.
     34                 *
     35                 * @since 1.0.0
     36                 *
     37                 * @param string $template Path to the messages template to load.
     38                 */
     39                apply_filters( 'messages_template_notices', 'members/single/home' ),
     40                'members/single/index',
     41        );
     42
     43        bp_core_load_template( $templates );
    3744}
  • trunk/src/bp-messages/screens/sentbox.php

    r13096 r13764  
    1212 *
    1313 * @since 1.0.0
     14 *
     15 * @return void
    1416 */
    1517function messages_screen_sentbox() {
     
    2729        do_action( 'messages_screen_sentbox' );
    2830
    29         /**
    30          * Filters the template to load for the Messages sentbox screen.
    31          *
    32          * @since 1.0.0
    33          *
    34          * @param string $template Path to the messages template to load.
    35          */
    36         bp_core_load_template( apply_filters( 'messages_template_sentbox', 'members/single/home' ) );
     31        $templates = array(
     32                /**
     33                 * Filters the template to load for the Messages sentbox screen.
     34                 *
     35                 * @since 1.0.0
     36                 *
     37                 * @param string $template Path to the messages template to load.
     38                 */
     39                apply_filters( 'messages_template_sentbox', 'members/single/home' ),
     40                'members/single/index',
     41        );
     42
     43        bp_core_load_template( $templates );
    3744}
  • trunk/src/bp-messages/screens/view.php

    r13503 r13764  
    1313 * @since 1.0.0
    1414 *
    15  * @return bool False on failure.
     15 * @return void.
    1616 */
    1717function messages_screen_conversation() {
     
    1919        // Bail if not viewing a single message.
    2020        if ( ! bp_is_messages_component() || ! bp_is_current_action( 'view' ) ) {
    21                 return false;
     21                return;
    2222        }
    2323
     
    6262
    6363        // Edit the Navigation name.
    64         $bp->members->nav->edit_nav( array(
    65                 'name' => $nav_name,
    66         ), $bp->messages->slug );
     64        $bp->members->nav->edit_nav(
     65                array(
     66                        'name' => $nav_name,
     67                ),
     68                $bp->messages->slug
     69        );
    6770
    6871        /**
     
    7376        do_action( 'messages_screen_conversation' );
    7477
    75         /**
    76          * Filters the template to load for the Messages view screen.
    77          *
    78          * @since 1.0.0
    79          *
    80          * @param string $template Path to the messages template to load.
    81          */
    82         bp_core_load_template( apply_filters( 'messages_template_view_message', 'members/single/home' ) );
     78        $templates = array(
     79                /**
     80                 * Filters the template to load for the Messages view screen.
     81                 *
     82                 * @since 1.0.0
     83                 *
     84                 * @param string $template Path to the messages template to load.
     85                 */
     86                apply_filters( 'messages_template_view_message', 'members/single/home' ),
     87                'members/single/index',
     88        );
     89
     90        bp_core_load_template( $templates );
    8391}
    8492add_action( 'bp_screens', 'messages_screen_conversation' );
Note: See TracChangeset for help on using the changeset viewer.