PluginProbe
Customify / 1.7.3
Customify v1.7.3
2.10.9 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.7.1 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.0.1 1.6.5 1.7.0 1.7.1 All 77 releases
← All changes | features/class-CSS_Editor.php +15 -12 1.3.01.7.3 View file →
@@ -12,13 +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 + } else {
22 + // keep this for wordpress versions lower than 4.7
23 + add_action( $load_location, array( $this, 'output_dynamic_style' ), 99 );
21 24 }
22 25
23 26 //Check the WordPress version and if there are known problems disable it
24 27 add_filter( 'customify_css_live_editor_enabled', array( $this, 'disable_if_wp_incompatible' ), 10, 1 );
@@ -31,9 +34,9 @@
31 34 */
32 35 public static function get_instance() {
33 36
34 37 // If the single instance hasn't been set, set it now.
35 - if ( null == self::$instance ) {
38 + if ( is_null( self::$instance ) ) {
36 39 self::$instance = new self;
37 40 }
38 41
39 42 return self::$instance;
@@ -59,9 +62,9 @@
59 62
60 63 // port CSS if
61 64 if ( function_exists( 'wp_update_custom_css_post' ) ) {
62 65 // Migrate any existing theme CSS to the core option added in WordPress 4.7.
63 - $store_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
66 + $store_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' );
64 67
65 68 $default_css = __( "/*
66 69 * Welcome to the Custom CSS Editor
67 70 *
@@ -81,9 +84,9 @@
81 84
82 85 /* An example of a Custom CSS Snippet */
83 86 selector {
84 87 color: green;
85 -}", 'customify_txtd' );
88 +}", 'customify' );
86 89
87 90 if ( $store_type === 'option' ) {
88 91 $CSS = get_option( 'live_css_edit' );
89 92 } elseif ( $store_type === 'theme_mod' ) {
@@ -113,16 +116,16 @@
113 116
114 117 $wp_customize->add_section( 'live_css_edit_section', array(
115 118 'priority' => 11,
116 119 'capability' => 'edit_theme_options',
117 - 'title' => __( 'CSS Editor', 'customify_txtd' ),
120 + 'title' => __( 'CSS Editor', 'customify' ),
118 121 ) );
119 122
120 - $saving_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
123 + $saving_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' );
121 124
122 125 $wp_customize->add_setting( 'live_css_edit', array(
123 126 'type' => $saving_type,
124 - 'label' => __( 'CSS Editor', 'customify_txtd' ),
127 + 'label' => __( 'CSS Editor', 'customify' ),
125 128 'capability' => 'edit_theme_options',
126 129 'transport' => 'postMessage',
127 130 'default' => __( "/*
128 131 * Welcome to the Custom CSS Editor
@@ -143,9 +146,9 @@
143 146
144 147 /* An example of a Custom CSS Snippet */
145 148 selector {
146 149 color: green;
147 -}", 'customify_txtd' )
150 +}", 'customify' )
148 151 ) );
149 152
150 153 $this_control = new Pix_Customize_CSS_Editor_Control(
151 154 $wp_customize,
@@ -150,9 +153,9 @@
150 153 $this_control = new Pix_Customize_CSS_Editor_Control(
151 154 $wp_customize,
152 155 'live_css_edit_control',
153 156 array(
154 - 'label' => __( 'Edit Live Css', 'customify_txtd' ),
157 + 'label' => __( 'Edit Live Css', 'customify' ),
155 158 'section' => 'live_css_edit_section',
156 159 'settings' => 'live_css_edit',
157 160 )
158 161 );
@@ -164,9 +167,9 @@
164 167 if ( ! apply_filters( 'customify_css_live_editor_enabled', true ) ) {
165 168 return;
166 169 }
167 170
168 - $store_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
171 + $store_type = PixCustomifyPlugin()->get_plugin_setting( 'values_store_mod', 'option' );
169 172 if ( $store_type === 'option' ) {
170 173 $output = get_option( 'live_css_edit' );
171 174 } elseif ( $store_type === 'theme_mod' ) {
172 175 $output = get_theme_mod( 'live_css_edit' );