PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.4
Elementor Website Builder – more than just a page builder v3.25.4
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/files/css/base.php +8 -14 4.2.23.25.4 View file →
@@ -234,14 +234,14 @@
234 234 if ( self::CSS_STATUS_INLINE === $meta['status'] ) {
235 235 $dep = $this->get_inline_dependency();
236 236 // If the dependency has already been printed ( like a template in footer )
237 237 if ( wp_styles()->query( $dep, 'done' ) ) {
238 - printf( '<style id="%1$s">%2$s</style>', $this->get_file_handle_id(), $meta['css'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
238 + printf( '<style id="%1$s">%2$s</style>', $this->get_file_handle_id(), $meta['css'] ); // XSS ok.
239 239 } else {
240 240 wp_add_inline_style( $dep, $meta['css'] );
241 241 }
242 242 } elseif ( self::CSS_STATUS_FILE === $meta['status'] ) { // Re-check if it's not empty after CSS update.
243 - wp_enqueue_style( $this->get_file_handle_id(), $this->get_url(), $this->get_enqueue_dependencies(), null );
243 + wp_enqueue_style( $this->get_file_handle_id(), $this->get_url(), $this->get_enqueue_dependencies(), null ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
244 244 }
245 245
246 246 // Handle fonts.
247 247 if ( ! empty( $meta['fonts'] ) ) {
@@ -294,9 +294,9 @@
294 294 * @since 1.9.4
295 295 * @access public
296 296 */
297 297 public function print_css() {
298 - echo '<style>' . $this->get_content() . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
298 + echo '<style>' . $this->get_content() . '</style>'; // XSS ok.
299 299 Plugin::$instance->frontend->print_fonts_links();
300 300 }
301 301
302 302 /**
@@ -490,9 +490,9 @@
490 490 $value = $this->get_control_global_default_value( $control );
491 491 }
492 492
493 493 if ( Controls_Manager::FONT === $control['type'] ) {
494 - $this->add_font( $value );
494 + $this->fonts[] = $value;
495 495 }
496 496
497 497 /** @var Base_Data_Control $control_obj */
498 498 $control_obj = Plugin::$instance->controls_manager->get_control( $control['type'] );
@@ -548,9 +548,9 @@
548 548 * @param array $placeholders Placeholders.
549 549 * @param array $replacements Replacements.
550 550 * @param array $all_controls All controls.
551 551 */
552 - public function add_controls_stack_style_rules( Controls_Stack $controls_stack, array $controls, array $values, array $placeholders, array $replacements, ?array $all_controls = null ) {
552 + public function add_controls_stack_style_rules( Controls_Stack $controls_stack, array $controls, array $values, array $placeholders, array $replacements, array $all_controls = null ) {
553 553 if ( ! $all_controls ) {
554 554 $all_controls = $controls_stack->get_controls();
555 555 }
556 556
@@ -907,9 +907,9 @@
907 907 if ( $control['groupPrefix'] . 'font_family' === $control['name'] ) {
908 908 $default_generic_fonts = Plugin::$instance->kits_manager->get_current_settings( 'default_generic_fonts' );
909 909
910 910 if ( $default_generic_fonts ) {
911 - $value .= ", $default_generic_fonts";
911 + $value .= ", $default_generic_fonts";
912 912 }
913 913 }
914 914 } else {
915 915 $value = "var( --e-global-$control[type]-$id )";
@@ -917,9 +917,9 @@
917 917
918 918 return $value;
919 919 }
920 920
921 - final protected function get_active_controls( Controls_Stack $controls_stack, ?array $controls = null, ?array $settings = null ) {
921 + final protected function get_active_controls( Controls_Stack $controls_stack, array $controls = null, array $settings = null ) {
922 922 if ( ! $controls ) {
923 923 $controls = $controls_stack->get_controls();
924 924 }
925 925
@@ -945,9 +945,9 @@
945 945
946 946 return $active_controls;
947 947 }
948 948
949 - final public function get_style_controls( Controls_Stack $controls_stack, ?array $controls = null, ?array $settings = null ) {
949 + final public function get_style_controls( Controls_Stack $controls_stack, array $controls = null, array $settings = null ) {
950 950 $controls = $this->get_active_controls( $controls_stack, $controls, $settings );
951 951
952 952 $style_controls = [];
953 953
@@ -1024,12 +1024,6 @@
1024 1024
1025 1025 $globals = $controls_stack->get_settings( '__globals__' );
1026 1026
1027 1027 return ! empty( $globals[ $control_global_key ] );
1028 - }
1029 -
1030 - public function add_font( $font ) {
1031 - if ( ! in_array( $font, $this->fonts, true ) ) {
1032 - $this->fonts[] = $font;
1033 - }
1034 1028 }
1035 1029 }