Making WordPress.org


Ignore:
Timestamp:
01/06/2015 06:15:00 PM (12 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Also enqueue user-notes.js and comment-related JS for wp-parser-hooks

  • Adds code-related quicktag buttons to comment form
  • Hides comment form behind toggle, as done everywhere else
File:
1 edited

Legend:

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

    r991 r1093  
    6262         */
    6363        public static function scripts_and_styles() {
    64                 if ( is_singular() && ( '0' != get_comments_number() || \DevHub\post_type_has_source_code() ) ) {
    65                         wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20140515', true );
    66                         wp_enqueue_style( 'syntaxhighlighter-core' );
    67                         wp_enqueue_style( 'syntaxhighlighter-theme-default' );
     64                if ( is_singular() ) {
     65                        if ( '0' != get_comments_number() || \DevHub\post_type_has_source_code() ) {
     66                                wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20140515', true );
     67                                wp_enqueue_style( 'syntaxhighlighter-core' );
     68                                wp_enqueue_style( 'syntaxhighlighter-theme-default' );
     69                        }
    6870
    6971                        wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'quicktags' ), '20141117', true );
Note: See TracChangeset for help on using the changeset viewer.