WordPress.org

Making WordPress.org

Changeset 1147


Ignore:
Timestamp:
01/16/2015 12:14:43 AM (6 years ago)
Author:
obenland
Message:

WP.org Themes: Use home_url() to account for subfolder MS installs.

See #745.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
2 edited

Legend:

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

    r1007 r1147  
    44        <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="">
    55    </div>
    6     <a class="more-details url" href="/<?php echo $theme->slug; ?>" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a>
     6    <a class="more-details url" href="<?php echo esc_url( home_url( $theme->slug . '/' ) ); ?>" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a>
    77    <div class="theme-author"><?php printf( __( 'By %s' ), '<span class="author">' . $theme->author . '</span>' ); ?></div>
    88    <h3 class="theme-name entry-title"><?php echo $theme->name; ?></h3>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r1146 r1147  
    1414 * as indicating support for post thumbnails.
    1515 */
    16 
     16define('WPORGPATH', 'https://wordpress.org/');
    1717function wporg_themes_setup() {
    1818    global $themes_allowedtags, $theme_field_defaults;
     
    8282
    8383    if ( ! is_singular( 'page' ) ) {
    84         wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ) );
    85         wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ) );
     84        wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ), false, true );
     85        wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ), false, true );
    8686
    8787        wp_localize_script( 'theme', '_wpThemeSettings', array(
     
    9292                'canInstall' => false,
    9393                'installURI' => null,
    94                 'adminUrl'   => parse_url( home_url(), PHP_URL_PATH ),
     94                'adminUrl'   => trailingslashit( parse_url( home_url(), PHP_URL_PATH ) ),
    9595            ),
    9696            'l10n' => array(
     
    240240    get_template_part( 'view-templates/theme-single' );
    241241}
    242 add_action( 'wp_head', 'wporg_themes_view_templates' );
     242add_action( 'wp_footer', 'wporg_themes_view_templates' );
Note: See TracChangeset for help on using the changeset viewer.