JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrsettings = $settings; } return $this->settings; } /** * Retrieves a specific setting by key. * * @param string $key * * @return string */ public function setting( $key ) { return isset( $this->settings[ $key ] ) ? $this->settings[ $key ] : ''; } /** * Sets or gets the current value of the CSS editor. * * @param null $value * * @return string */ public function value( $value = null ) { if ( is_string( $value ) ) { $this->value = $value; } return $this->value; } /** * Sets or gets the parameters array. * * @param null $values * * @return array */ public function params( $values = null ) { if ( is_array( $values ) ) { $this->params = $values; } return $this->params; } /** * Renders param form field output. * * @return mixed * @see vc_filter: vc_css_editor - hook to override output of this method */ public function render() { $output = '
'; $output .= $this->onionLayout(); $output .= sprintf( '
%s
', esc_html__( 'Border color', 'js_composer' ), esc_html__( 'Border style', 'js_composer' ), $this->getBorderStyleOptions(), esc_html__( 'Border radius', 'js_composer' ), $this->getBorderRadiusOptions(), esc_html__( 'Background', 'js_composer' ), $this->getBackgroundImageControl(), $this->getBackgroundStyleOptions(), esc_html__( 'Box controls', 'js_composer' ), esc_html__( 'Simplify controls', 'js_composer' ) ); $output .= sprintf( '', esc_attr( $this->setting( 'param_name' ) ), esc_attr( $this->setting( 'param_name' ) ), esc_attr( $this->setting( 'type' ) ), esc_attr( $this->value() ) ); $output .= '
'; $custom_tag = 'script'; $output .= '<' . $custom_tag . ' type="text/html" id="vc_css-editor-image-block">
  • '; return apply_filters( 'vc_css_editor', $output ); } /** * Generates the HTML for the background image control. * * @return string */ public function getBackgroundImageControl() { $value = sprintf( '%s', esc_html__( 'Add image', 'js_composer' ) ); return apply_filters( 'vc_css_editor_background_image_control', $value ); } /** * Generates the HTML options for the border radius dropdown. * * @return string */ public function getBorderRadiusOptions() { $radiuses = apply_filters( 'vc_css_editor_border_radius_options_data', array( '' => esc_html__( 'None', 'js_composer' ), '1px' => '1px', '2px' => '2px', '3px' => '3px', '4px' => '4px', '5px' => '5px', '10px' => '10px', '15px' => '15px', '20px' => '20px', '25px' => '25px', '30px' => '30px', '35px' => '35px', ) ); $output = ''; foreach ( $radiuses as $radius => $title ) { $output .= ''; } return $output; } /** * Generates the HTML options for the border style dropdown. * * @return string */ public function getBorderStyleOptions() { $output = ''; $styles = apply_filters( 'vc_css_editor_border_style_options_data', array( esc_html__( 'solid', 'js_composer' ), esc_html__( 'dotted', 'js_composer' ), esc_html__( 'dashed', 'js_composer' ), esc_html__( 'none', 'js_composer' ), esc_html__( 'hidden', 'js_composer' ), esc_html__( 'double', 'js_composer' ), esc_html__( 'groove', 'js_composer' ), esc_html__( 'ridge', 'js_composer' ), esc_html__( 'inset', 'js_composer' ), esc_html__( 'outset', 'js_composer' ), esc_html__( 'initial', 'js_composer' ), esc_html__( 'inherit', 'js_composer' ), ) ); foreach ( $styles as $style ) { $output .= ''; } return $output; } /** * Generates the HTML options for the background style dropdown. * * @return string */ public function getBackgroundStyleOptions() { $output = ''; $styles = apply_filters( 'vc_css_editor_background_style_options_data', array( esc_html__( 'Cover', 'js_composer' ) => 'cover', esc_html__( 'Contain', 'js_composer' ) => 'contain', esc_html__( 'No Repeat', 'js_composer' ) => 'no-repeat', esc_html__( 'Repeat', 'js_composer' ) => 'repeat', ) ); foreach ( $styles as $name => $style ) { $output .= ''; } return $output; } /** * Generates the onion layout structure for the CSS editor. * * @return string */ public function onionLayout() { $output = sprintf( '
    %s
    %s
    %s
    ', $this->layerControls( 'margin' ), $this->layerControls( 'border', 'width' ), $this->layerControls( 'padding' ) ); return apply_filters( 'vc_css_editor_onion_layout', $output ); } /** * Generates the controls for a specific layer (e.g., margin, border). * * @param string $name * @param string $prefix * * @return string */ protected function layerControls( $name, $prefix = '' ) { $output = ''; foreach ( $this->positions as $pos ) { $output .= sprintf( '', esc_attr( $name ), esc_attr( $pos ), '' !== $prefix ? '_' . esc_attr( $prefix ) : '', esc_attr( $name ), '' !== $prefix ? '-' . esc_attr( $prefix ) : '', esc_attr( $pos ), esc_attr( $pos ), esc_attr( $name ) ); } return apply_filters( 'vc_css_editor_layer_controls', $output ); } } } /** * Renders the CSS editor param form field. * * @param array $settings * @param string $value * * @return mixed */ function vc_css_editor_form_field( $settings, $value ) { $css_editor = new WPBakeryCssEditor(); $css_editor->settings( $settings ); $css_editor->value( $value ); return $css_editor->render(); }