Making WordPress.org


Ignore:
Timestamp:
11/01/2018 08:18:05 PM (7 years ago)
Author:
coffee2code
Message:

Developer: Make array of explanation-specific screen IDs a class variable.

File:
1 edited

Legend:

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

    r6258 r7814  
    2929
    3030    /**
     31     * Explanation-specific screen IDs.
     32     *
     33     * @access public
     34     * @var array
     35     */
     36    public $screen_ids = [];
     37
     38    /**
    3139     * Constructor.
    3240     *
     
    3543    public function __construct() {
    3644        $this->post_types = DevHub\get_parsed_post_types();
     45
     46        $this->screen_ids = [ $this->exp_post_type, "edit-{$this->exp_post_type}" ];
    3747
    3848        // Setup.
     
    446456        if ( in_array( get_current_screen()->id, array_merge(
    447457                $parsed_post_types,
    448                 array( 'wporg_explanations', 'edit-wporg_explanations' )
     458                $this->screen_ids
    449459        ) ) ) {
    450460            wp_enqueue_style( 'wporg-admin', get_template_directory_uri() . '/stylesheets/admin.css', array(), '20160630' );
Note: See TracChangeset for help on using the changeset viewer.