Changeset 3239
- Timestamp:
- 05/24/2016 09:12:54 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
r2817 r3239 52 52 add_filter( 'syntaxhighlighter_htmlresult', array( __CLASS__, 'syntaxhighlighter_htmlresult' ) ); 53 53 } 54 }55 56 /**57 * Is the current (or specified) post_type one of the DevHub handbook post types?58 *59 * TOOD: The handbook plugin should probably have this.60 *61 * @param string $post_type Optional. The post_type to check for being a handbook post type. Default '' (the current post type).62 * @return bool63 */64 public static function is_handbook_post_type( $post_type = '' ) {65 if ( ! $post_type ) {66 $post_type = get_post_type();67 }68 69 return in_array( str_replace( '-handbook', '', $post_type ), self::$post_types );70 54 } 71 55 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php
r1689 r3239 63 63 public static function scripts_and_styles() { 64 64 if ( is_singular() ) { 65 if ( '0' != get_comments_number() || \DevHub\post_type_has_source_code() || Devhub_Handbooks::is_handbook_post_type() ) {65 if ( '0' != get_comments_number() || \DevHub\post_type_has_source_code() || wporg_is_handbook_post_type() ) { 66 66 wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20150319', true ); 67 67 wp_enqueue_style( 'syntaxhighlighter-core' );
Note: See TracChangeset
for help on using the changeset viewer.