Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2024 11:00:37 AM (12 months ago)
Author:
imath
Message:

Add Help tabs to inform about BP Emails management & BP Email tokens

  • Improve bp_core_add_contextual_help() to avoid code duplication.
  • Add an help tab linking to the user documentation page explaining how to manage BP Emails.
  • Add an help tab linking to the user documentation page explaining BP Email tokens usage.
  • Deprecate bp_admin_email_add_codex_notice().

Fixes #9159
Closes https://github.com/buddypress/buddypress/pull/291

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-admin.php

    r13840 r13868  
    227227        // Emails
    228228        add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 );
     229        add_action( 'load-edit.php', array( $this, 'post_type_load_admin_screen' ), 20 );
     230        add_action( 'load-post.php', array( $this, 'post_type_load_admin_screen' ), 20 );
    229231
    230232        // Official BuddyPress supported Add-ons.
     
    12901292    }
    12911293
     1294    /**
     1295     * Adds BP Custom Post Types Admin screen's help tab.
     1296     *
     1297     * @since 14.0.0
     1298     */
     1299    public function post_type_load_admin_screen() {
     1300        $screen = null;
     1301        if ( function_exists( 'get_current_screen' ) ) {
     1302            $screen = get_current_screen();
     1303        }
     1304
     1305        if ( ! isset( $screen->post_type ) || bp_get_email_post_type() !== $screen->post_type ) {
     1306            return;
     1307        }
     1308
     1309        bp_core_add_contextual_help( $screen );
     1310    }
     1311
    12921312    /** Helpers ***************************************************************/
    12931313
Note: See TracChangeset for help on using the changeset viewer.