Making WordPress.org


Ignore:
Timestamp:
06/05/2014 09:42:29 PM (11 years ago)
Author:
coffee2code
Message:

Code Reference: Add inline source code display for functions and methods. props atimmer. See #176

File:
1 edited

Legend:

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

    r616 r676  
    343343    wp_enqueue_script( 'wporg-developer-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
    344344    wp_enqueue_script( 'wporg-developer-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
     345
     346    if ( 'wp-parser-function' === get_post_type() || 'wp-parser-method' === get_post_type() ) {
     347        wp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20140515', true );
     348        wp_enqueue_style( 'syntaxhighlighter-core' );
     349        wp_enqueue_style( 'syntaxhighlighter-theme-default' );
     350    }
     351
    345352    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    346353        wp_enqueue_script( 'comment-reply' );
Note: See TracChangeset for help on using the changeset viewer.