~dvko/wp-social-sharing

cfa523acba71c750897de4f0f2391d6f26d96d65 — Danny van Kooten 1 year, 5 months ago 625e249
always load minified versions of css & js assets
2 files changed, 4 insertions(+), 6 deletions(-)

M includes/class-admin.php
M includes/class-public.php
M includes/class-admin.php => includes/class-admin.php +2 -3
@@ 61,9 61,8 @@ class DVKSS_Admin {
			return;
		}

		$suffix = ( defined( SCRIPT_DEBUG ) && SCRIPT_DEBUG ) ? '' : '.min';
		wp_enqueue_style( 'dvk-social-sharing', plugins_url( '/assets/css/admin-styles' . $suffix .'.css', $this->plugin_file ) );
		wp_enqueue_script( 'dvk-social-sharing', plugins_url( 'assets/js/admin-script.js', $this->plugin_file ), array(), DVKSS_VERSION , true );
		wp_enqueue_style( 'dvk-social-sharing', plugins_url( '/assets/css/admin-styles.min.css', $this->plugin_file ) );
		wp_enqueue_script( 'dvk-social-sharing', plugins_url( 'assets/js/admin-script.min.js', $this->plugin_file ), array(), DVKSS_VERSION , true );
	}

	/**

M includes/class-public.php => includes/class-public.php +2 -3
@@ 24,14 24,13 @@ class DVKSS_Public {
	*/
	public function load_assets() {
		$opts = dvkss_get_options();
		$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';

		if( $opts['load_icon_css'] ) {
			wp_enqueue_style( 'dvk-social-sharing', plugins_url( '/assets/css/styles' . $suffix . '.css', $this->plugin_file ), array(), DVKSS_VERSION );
			wp_enqueue_style( 'dvk-social-sharing', plugins_url( '/assets/css/styles.min.css', $this->plugin_file ), array(), DVKSS_VERSION );
		}

		if( $opts['load_popup_js'] ) {
			wp_enqueue_script( 'dvk-social-sharing', plugins_url( '/assets/js/script' . $suffix . '.js', $this->plugin_file ), array( ), DVKSS_VERSION, true );
			wp_enqueue_script( 'dvk-social-sharing', plugins_url( '/assets/js/script.min.js', $this->plugin_file ), array(), DVKSS_VERSION, true );
		}
	}