Changeset 1409 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
- Timestamp:
- 03/17/2015 11:37:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1386 r1409 38 38 */ 39 39 function wporg_themes_scripts() { 40 41 wp_enqueue_style( 'ratings', '//wordpress.org/extend/themes-plugins/bb-ratings/bb-ratings.css', array(), '4' ); 42 wp_enqueue_style( 'themes-style', self_admin_url( 'css/themes.css' ) ); 43 wp_enqueue_style( 'wporg-themes-style', get_stylesheet_uri(), array(), filemtime( __DIR__ . '/style.css' ) ); 44 45 wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null ); 40 wp_enqueue_style( 'wporg-themes', get_stylesheet_uri(), array(), filemtime( __DIR__ . '/style.css' ) ); 46 41 47 42 if ( ! is_singular( 'page' ) ) { 43 wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null ); 44 48 45 wp_enqueue_script( 'theme', self_admin_url( 'js/theme.js' ), array( 'wp-backbone' ), false, true ); 49 46 wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . '/js/theme.js', array( 'theme' ), filemtime( __DIR__ . '/js/theme.js' ), true ); … … 77 74 } 78 75 add_action( 'wp_enqueue_scripts', 'wporg_themes_scripts' ); 76 77 /** 78 * Extend the default WordPress body classes. 79 * 80 * Adds body classes to denote singular themes. 81 * 82 * @param array $classes A list of existing body class values. 83 * @return array The filtered body class list. 84 */ 85 function wporg_themes_body_class( $classes ) { 86 if ( is_singular( 'repopackage' ) ) { 87 $classes[] = 'modal-open'; 88 } 89 90 return $classes; 91 } 92 add_filter( 'body_class', 'wporg_themes_body_class' ); 79 93 80 94 /**
Note: See TracChangeset
for help on using the changeset viewer.