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

Commit

Permalink
Merge branch 'develop' of https://github.com/xwp/wp-customize-posts i…
Browse files Browse the repository at this point in the history
…nto feature/query-preview-refactor
  • Loading branch information
westonruter committed Sep 7, 2016
2 parents 02e1a72 + 2ed0cc2 commit 35b6d70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions php/class-customize-posts-plugin.php
Original file line number Diff line number Diff line change
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 35b6d70

Please sign in to comment.