Making WordPress.org


Ignore:
Timestamp:
08/24/2016 08:56:21 PM (7 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Enqueue function-reference.js and SyntaxHighlighter-related scripts and styles on all singular pages.

All said functionality is pretty much potentially applicable on all such pages now, particularly for user contributed notes.

File:
1 edited

Legend:

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

    r3852 r3854  
    8484    public static function scripts_and_styles() {
    8585        if ( is_singular() ) {
    86             if ( '0' != get_comments_number() || \DevHub\post_type_has_source_code() || get_query_var( 'is_handbook' ) ) {
    87                 wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20160809', true );
    88                 wp_enqueue_style( 'syntaxhighlighter-core' );
    89                 wp_enqueue_style( 'syntaxhighlighter-theme-default' );
    90             }
     86            wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20160809', true );
     87            wp_enqueue_style( 'syntaxhighlighter-core' );
     88            wp_enqueue_style( 'syntaxhighlighter-theme-default' );
    9189
    9290            wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'quicktags' ), '20160809', true );
Note: See TracChangeset for help on using the changeset viewer.