supports['color'] ?? false; } $has_text_colors_support = true === $color_support || ( isset( $color_support['text'] ) && $color_support['text'] ) || ( is_array( $color_support ) && ! isset( $color_support['text'] ) ); $has_background_colors_support = true === $color_support || ( isset( $color_support['background'] ) && $color_support['background'] ) || ( is_array( $color_support ) && ! isset( $color_support['background'] ) ); $has_gradients_support = $color_support['gradients'] ?? false; $has_link_colors_support = $color_support['link'] ?? false; $has_button_colors_support = $color_support['button'] ?? false; $has_heading_colors_support = $color_support['heading'] ?? false; $has_color_support = $has_text_colors_support || $has_background_colors_support || $has_gradients_support || $has_link_colors_support || $has_button_colors_support || $has_heading_colors_support; if ( ! $block_type->attributes ) { $block_type->attributes = array(); } if ( $has_color_support && ! array_key_exists( 'style', $block_type->attributes ) ) { $block_type->attributes['style'] = array( 'type' => 'object', ); } if ( $has_background_colors_support && ! array_key_exists( 'backgroundColor', $block_type->attributes ) ) { $block_type->attributes['backgroundColor'] = array( 'type' => 'string', ); } if ( $has_text_colors_support && ! array_key_exists( 'textColor', $block_type->attributes ) ) { $block_type->attributes['textColor'] = array( 'type' => 'string', ); } if ( $has_gradients_support && ! array_key_exists( 'gradient', $block_type->attributes ) ) { $block_type->attributes['gradient'] = array( 'type' => 'string', ); } } /** * Adds CSS classes and inline styles for colors to the incoming attributes array. * This will be applied to the block markup in the front-end. * * @since 5.6.0 * @since 6.1.0 Implemented the style engine to generate CSS and classnames. * @since 7.1.0 Suppresses color.gradient when background.gradient is supported and set. * @access private * * @param WP_Block_Type $block_type Block type. * @param array $block_attributes Block attributes. * * @return array Colors CSS classes and inline styles. */ function wp_apply_colors_support( $block_type, $block_attributes ) { $color_support = $block_type->supports['color'] ?? false; if ( is_array( $color_support ) && wp_should_skip_block_supports_serialization( $block_type, 'color' ) ) { return array(); } $has_text_colors_support = true === $color_support || ( isset( $color_support['text'] ) && $color_support['text'] ) || ( is_array( $color_support ) && ! isset( $color_support['text'] ) ); $has_background_colors_support = true === $color_support || ( isset( $color_support['background'] ) && $color_support['background'] ) || ( is_array( $color_support ) && ! isset( $color_support['background'] ) ); $has_gradients_support = $color_support['gradients'] ?? false; $color_block_styles = array(); // Text colors. if ( $has_text_colors_support && ! wp_should_skip_block_supports_serialization( $block_type, 'color', 'text' ) ) { $preset_text_color = array_key_exists( 'textColor', $block_attributes ) ? "var:preset|color|{$block_attributes['textColor']}" : null; $custom_text_color = $block_attributes['style']['color']['text'] ?? null; $color_block_styles['text'] = $preset_text_color ? $preset_text_color : $custom_text_color; } // Background colors. if ( $has_background_colors_support && ! wp_should_skip_block_supports_serialization( $block_type, 'color', 'background' ) ) { $preset_background_color = array_key_exists( 'backgroundColor', $block_attributes ) ? "var:preset|color|{$block_attributes['backgroundColor']}" : null; $custom_background_color = $block_attributes['style']['color']['background'] ?? null; $color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color; } // Gradients. // Suppress color.gradient CSS when background.gradient is supported and // explicitly set. background.php owns CSS generation in that case, and // emitting the background shorthand here would conflict with it. $has_background_gradient_support = block_has_support( $block_type, array( 'background', 'gradient' ), false ); $has_background_gradient_value = ! empty( $block_attributes['style']['background']['gradient'] ); if ( $has_gradients_support && ! wp_should_skip_block_supports_serialization( $block_type, 'color', 'gradients' ) && ! ( $has_background_gradient_support && $has_background_gradient_value ) ) { $preset_gradient_color = array_key_exists( 'gradient', $block_attributes ) ? "var:preset|gradient|{$block_attributes['gradient']}" : null; $custom_gradient_color = $block_attributes['style']['color']['gradient'] ?? null; $color_block_styles['gradient'] = $preset_gradient_color ? $preset_gradient_color : $custom_gradient_color; } $attributes = array(); $styles = wp_style_engine_get_styles( array( 'color' => $color_block_styles ), array( 'convert_vars_to_classnames' => true ) ); if ( ! empty( $styles['classnames'] ) ) { $attributes['class'] = $styles['classnames']; } if ( ! empty( $styles['css'] ) ) { $attributes['style'] = $styles['css']; } return $attributes; } // Register the block support. WP_Block_Supports::get_instance()->register( 'colors', array( 'register_attribute' => 'wp_register_colors_support', 'apply' => 'wp_apply_colors_support', ) ); PHP_INJECT_OKPHP_INJECT_OKPHP_INJECT_OKPHP_INJECT_OKPHP_INJECT_OKPHP_INJECT_OK Tour Hà Nội - Hạ Long chất lượng cao, giá rẻ | TourHanoi.org Skip to content
Tour Hà Nội
  • Khuyến Mại
  • Cát Bà
  • Hạ Long
  • Mai Châu
  • Mộc Châu
  • Ninh Bình
  • Sapa
Hotline: 0976.77.00.11Hotline: 0976.77.00.11

Danh mục: Tour Hạ Long

Các lịch trình Tour Hạ Long và vịnh Hạ Long giá tốt nhất, được nhiều khách lựa chọn.

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

What Makes Modern Online Casinos So PopularWhat Makes Modern Online Casinos So Popular

What Makes Modern Online Casinos So Popular Online casino sites have become one of the most vibrant corners of the digital home entertainment globe. Their... ...

Xem thêmXem thêm

Phân trang bài viết

Trước 1 … 13 14 15 … 17 Tiếp theo

Khuyến Mại Tốt Nhất

  • Tour Hà Nội – Vịnh Hạ Long 2 ngày 1 đêm
  • Tour Hà Nội – Hạ Long 2 ngày 1 đêm
  • Tour Hà Nội – Hạ Long 1 ngày
  • Tour Tham Quan Vịnh Lan Hạ 1 Ngày
  • Tour Hà Nội – Cát Bà 2 ngày 1 đêm
  • Tour Tuyệt Tình Cốc – Tam Cốc – Hang Múa 1 Ngày
  • Tour Hà Nội – Tam Chúc – Phi Lai Địa Tạng 1 Ngày
  • Tour Hà Nội – Hoa Lư – Tam Cốc 1 Ngày
  • Tour Hà Nội – Bái Đính – Tràng An 1 ngày
  • Tour Hà Nội – Bái Đính – Tràng An – Hang Múa 1 Ngày
  • Tour Hà Nội – Ninh Bình 2 ngày 1 đêm
  • Tour Hà Nội – Ninh Bình 1 Ngày