Changeset 1101 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
- Timestamp:
- 01/07/2015 11:39:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1089 r1101 81 81 wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array(), null ); 82 82 83 wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ), false, 1 ); 84 wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ), false, 1 ); 85 86 wp_localize_script( 'theme', '_wpThemeSettings', array( 87 'themes' => false, 88 'settings' => array( 89 'isMobile' => wp_is_mobile(), 90 'isInstall' => true, 91 'canInstall' => false, 92 'installURI' => null, 93 'adminUrl' => '', 94 'urlBase' => is_multisite() ? get_blog_details()->path : '/', 95 96 ), 97 'l10n' => array( 98 'addNew' => __( 'Add New Theme' ), 99 'search' => __( 'Search Themes' ), 100 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 101 'upload' => __( 'Upload Theme' ), 102 'back' => __( 'Back' ), 103 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), 104 105 // Downloads Graph 106 'date' => __( 'Date' ), 107 'downloads' => __( 'Downloads' ), 108 ), 109 'installedThemes' => array(), 110 ) ); 83 if ( ! is_singular( 'page' ) ) { 84 wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ), false, 1 ); 85 wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ), false, 1 ); 86 87 wp_localize_script( 'theme', '_wpThemeSettings', array( 88 'themes' => false, 89 'settings' => array( 90 'isMobile' => wp_is_mobile(), 91 'isInstall' => true, 92 'canInstall' => false, 93 'installURI' => null, 94 'adminUrl' => '', 95 'urlBase' => is_multisite() ? get_blog_details()->path : '/', 96 ), 97 'l10n' => array( 98 'addNew' => __( 'Add New Theme' ), 99 'search' => __( 'Search Themes' ), 100 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 101 'upload' => __( 'Upload Theme' ), 102 'back' => __( 'Back' ), 103 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), 104 105 // Downloads Graph 106 'date' => __( 'Date' ), 107 'downloads' => __( 'Downloads' ), 108 ), 109 'installedThemes' => array(), 110 ) ); 111 } 111 112 } 112 113 add_action( 'wp_enqueue_scripts', 'wporg_themes_scripts' );
Note: See TracChangeset
for help on using the changeset viewer.