Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge 2de818a into 17e3cd2
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Sep 6, 2016
2 parents 17e3cd2 + 2de818a commit faa10e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions php/class-customize-posts-plugin.php
Expand Up @@ -231,7 +231,8 @@ function show_core_version_dependency_failure() {
* @param WP_Scripts $wp_scripts Scripts.
*/
public function register_scripts( WP_Scripts $wp_scripts ) {
$suffix = ( SCRIPT_DEBUG ? '' : '.min' ) . '.js';
$is_git_repo = file_exists( dirname( dirname( __FILE__ ) ) . '/.git' );
$suffix = ( SCRIPT_DEBUG || $is_git_repo ? '' : '.min' ) . '.js';

$handle = 'select2';
if ( ! $wp_scripts->query( $handle, 'registered' ) ) {
Expand Down Expand Up @@ -380,7 +381,8 @@ public function register_scripts( WP_Scripts $wp_scripts ) {
* @param WP_Styles $wp_styles Styles.
*/
public function register_styles( WP_Styles $wp_styles ) {
$suffix = ( SCRIPT_DEBUG ? '' : '.min' ) . '.css';
$is_git_repo = file_exists( dirname( dirname( __FILE__ ) ) . '/.git' );
$suffix = ( SCRIPT_DEBUG || $is_git_repo ? '' : '.min' ) . '.css';

$handle = 'select2';
if ( ! $wp_styles->query( $handle, 'registered' ) ) {
Expand Down

0 comments on commit faa10e9

Please sign in to comment.