WordPress.org

Making WordPress.org

Changeset 1821


Ignore:
Timestamp:
08/12/2015 05:19:45 PM (4 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Handbook-related hooking changes that should have been included in r953.

  • Move hooking of 'after_switch_theme' from functions.php to inc/handbooks.php. Fixes warning since the hooked function was previously moved over.
  • Remove hooking 'wporg_action_links' in functions.php since that had already been moved over.

Props DJPaul.
Fixes #1177.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r1678 r1821  
    8686    register_nav_menus();
    8787
    88     add_action( 'after_switch_theme', __NAMESPACE__ . '\\add_roles' );
    8988    add_action( 'pre_get_posts', __NAMESPACE__ . '\\pre_get_posts' );
    9089    add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\theme_scripts_styles' );
     
    9897    add_theme_support( 'automatic-feed-links' );
    9998    add_theme_support( 'post-thumbnails' );
    100 
    101     // Add the handbook's 'Watch' action link.
    102     if ( class_exists( 'WPorg_Handbook_Watchlist' ) && method_exists( 'WPorg_Handbook_Watchlist', 'display_action_link' ) ) {
    103         add_action( 'wporg_action_links', array( 'WPorg_Handbook_Watchlist', 'display_action_link' ) );
    104     }
    10599
    106100    add_filter( 'breadcrumb_trail_items',  __NAMESPACE__ . '\\breadcrumb_trail_items', 10, 2 );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php

    r1429 r1821  
    3535     */
    3636    public static function do_init() {
     37        add_action( 'after_switch_theme', array( __CLASS__, 'add_roles' ) );
     38
    3739        add_filter( 'user_has_cap', array( __CLASS__, 'adjust_handbook_editor_caps' ), 11 );
    3840
Note: See TracChangeset for help on using the changeset viewer.