| @@ -12,16 +12,16 @@ | ||
| 12 | 12 | protected function __construct() { |
| 13 | 13 | |
| 14 | 14 | add_action( 'customify_create_custom_control', array( $this, 'cle_create_custom_control' ), 10, 1 ); |
| 15 | 15 | add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_styles' ), 10 ); |
| 16 | - $load_location = PixCustomifyPlugin::get_plugin_option( 'style_resources_location', 'wp_head' ); | |
| 16 | + $load_location = PixCustomifyPlugin()->get_plugin_setting( 'style_resources_location', 'wp_head' ); | |
| 17 | 17 | |
| 18 | 18 | if ( function_exists( 'wp_custom_css_cb' ) ) { |
| 19 | - remove_action( 'wp_head', 'wp_custom_css_cb', 11 ); | |
| 20 | - add_action( $load_location, 'wp_custom_css_cb', 999999999 ); | |
| 19 | +// remove_action( 'wp_head', 'wp_custom_css_cb', 101 ); | |
| 20 | +// add_action( $load_location, 'wp_custom_css_cb', 999999999 ); | |
| 21 | 21 | } else { |
| 22 | 22 | // keep this for wordpress versions lower than 4.7 |
| 23 | - add_action( $load_location, array( $this, 'output_dynamic_style' ), 999999999 ); | |
| 23 | + add_action( $load_location, array( $this, 'output_dynamic_style' ), 99 ); | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | //Check the WordPress version and if there are known problems disable it |
| 27 | 27 | add_filter( 'customify_css_live_editor_enabled', array( $this, 'disable_if_wp_incompatible' ), 10, 1 ); |
| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | */ |
| 35 | 35 | public static function get_instance() { |
| 36 | 36 | |
| 37 | 37 | // If the single instance hasn't been set, set it now. |
| 38 | - if ( null == self::$instance ) { | |
| 38 | + if ( is_null( self::$instance ) ) { | |
| 39 | 39 | self::$instance = new self; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return self::$instance; |
| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | |
| 63 | 63 | // port CSS if |
| 64 | 64 | if ( function_exists( 'wp_update_custom_css_post' ) ) { |
| 65 | 65 | // Migrate any existing theme CSS to the core option added in WordPress 4.7. |
| 66 | - $store_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' ); | |
| 66 | + $store_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' ); | |
| 67 | 67 | |
| 68 | 68 | $default_css = __( "/* |
| 69 | 69 | * Welcome to the Custom CSS Editor |
| 70 | 70 | * |
| @@ -119,9 +119,9 @@ | ||
| 119 | 119 | 'capability' => 'edit_theme_options', |
| 120 | 120 | 'title' => __( 'CSS Editor', 'customify' ), |
| 121 | 121 | ) ); |
| 122 | 122 | |
| 123 | - $saving_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' ); | |
| 123 | + $saving_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' ); | |
| 124 | 124 | |
| 125 | 125 | $wp_customize->add_setting( 'live_css_edit', array( |
| 126 | 126 | 'type' => $saving_type, |
| 127 | 127 | 'label' => __( 'CSS Editor', 'customify' ), |
| @@ -167,9 +167,9 @@ | ||
| 167 | 167 | if ( ! apply_filters( 'customify_css_live_editor_enabled', true ) ) { |
| 168 | 168 | return; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - $store_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' ); | |
| 171 | + $store_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' ); | |
| 172 | 172 | if ( $store_type === 'option' ) { |
| 173 | 173 | $output = get_option( 'live_css_edit' ); |
| 174 | 174 | } elseif ( $store_type === 'theme_mod' ) { |
| 175 | 175 | $output = get_theme_mod( 'live_css_edit' ); |