Changeset 1434 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
- Timestamp:
- 03/20/2015 12:10:03 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1416 r1434 41 41 42 42 if ( ! is_singular( 'page' ) ) { 43 wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null ); 43 wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null, true ); 44 wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'wp-backbone' ), filemtime( __DIR__ . '/js/theme.js' ), true ); 44 45 45 wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ), false, true ); 46 wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ), filemtime( __DIR__ . '/js/theme.js' ), true ); 47 48 wp_localize_script( 'theme', '_wpThemeSettings', array( 46 wp_localize_script( 'wporg-theme', '_wpThemeSettings', array( 49 47 'themes' => false, 50 48 'query' => wporg_themes_prepare_themes_for_js(), 51 49 'settings' => array( 52 'title' => __( 'WordPress › %s « Free WordPress Themes', 'wporg-themes' ), 53 'isMobile' => wp_is_mobile(), 54 'isInstall' => true, 55 'canInstall' => false, 56 'installURI' => null, 57 'adminUrl' => trailingslashit( parse_url( home_url(), PHP_URL_PATH ) ), 50 'title' => __( 'WordPress › %s « Free WordPress Themes', 'wporg-themes' ), 51 'isMobile' => wp_is_mobile(), 52 'postsPerPage' => get_option( 'posts_per_page', 15 ), 53 'path' => trailingslashit( parse_url( home_url(), PHP_URL_PATH ) ), 58 54 ), 59 55 'l10n' => array( 60 'addNew' => __( 'Add New Theme' ), 61 'search' => __( 'Search Themes' ), 62 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 63 'upload' => __( 'Upload Theme' ), 64 'back' => __( 'Back' ), 56 'search' => __( 'Search Themes', 'wporg-themes' ), 57 'searchPlaceholder' => __( 'Search themes...', 'wporg-themes' ), // placeholder (no ellipsis) 65 58 '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>.' ), 66 59 67 60 // Downloads Graph 68 'date' => __( 'Date' ),69 'downloads' => __( 'Downloads' ),61 'date' => __( 'Date', 'wporg-themes' ), 62 'downloads' => __( 'Downloads', 'wporg-themes' ), 70 63 ), 71 'installedThemes' => array(),72 64 ) ); 73 65 } 66 67 // No emoji support needed. 68 remove_action( 'wp_print_styles','print_emoji_styles' ); 69 wp_dequeue_script( 'emoji' ); 70 71 // No Jetpack styles needed. 72 add_filter( 'jetpack_implode_frontend_css', '__return_false' ); 74 73 } 75 74 add_action( 'wp_enqueue_scripts', 'wporg_themes_scripts' );
Note: See TracChangeset
for help on using the changeset viewer.