f ( $total_items > 9 ) { array_push( $break_indexes, 4, 8 ); $width = 25; } foreach ( $args['default'] as $choice => $default ) { $item_count++; $label = $choice; $label = isset( $labels[ $choice ] ) ? $labels[ $choice ] : $label; $label = isset( $args['choices']['labels'][ $choice ] ) ? $args['choices']['labels'][ $choice ] : $label; $wrapper_attrs = array( 'data-kirki-parent-control-type' => 'kirki-dimensions', 'data-kirki-parent-control-setting' => $args['settings'], 'class' => '{default_class} kirki-group-item kirki-w' . $width, ); if ( $item_count === 1 ) { $wrapper_attrs['class'] .= ' kirki-group-start'; } if ( in_array( $item_count, $break_indexes, true ) ) { $wrapper_attrs['class'] .= ' kirki-group-break'; } if ( $item_count === $total_items ) { $wrapper_attrs['class'] .= ' kirki-group-end'; } new \Kirki\Field\Dimension( wp_parse_args( array( 'type' => 'kirki-dimension', 'settings' => $args['settings'] . '[' . $choice . ']', 'parent_setting' => $args['settings'], 'label' => $label, 'default' => $default, 'wrapper_attrs' => $wrapper_attrs, 'choices' => array( 'label_position' => 'bottom', ), 'js_vars' => array(), 'css_vars' => array(), 'output' => array(), ), $args ) ); } } /** * Sanitizes dimension controls. * * @static * @access public * @since 1.0 * @param array $value The value. * @return array */ public static function sanitize( $value ) { if ( ! is_array( $value ) ) { return array(); } foreach ( $value as $key => $val ) { $value[ $key ] = sanitize_text_field( $val ); } return $value; } /** * Override parent method. No need to register any setting. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_setting( $wp_customize ) {} /** * Override the parent method. No need for a control. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_control( $wp_customize ) {} /** * Enqueue scripts & styles. * * @access public * @since 1.0 * @return void */ public function enqueue_scripts() { wp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' ); } /** * Enqueue scripts & styles on customize_preview_init. * * @access public * @since 1.0 * @return void */ public function enqueue_customize_preview_scripts() { wp_enqueue_script( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) ) . '/dist/preview.js', array( 'wp-hooks' ), '1.0', true ); } /** * Adds a custom output class for typography fields. * * @access public * @since 1.0 * @param array $classnames The array of classnames. * @return array */ public function output_control_classnames( $classnames ) { $classnames['kirki-dimensions'] = '\Kirki\Field\CSS\Dimensions'; return $classnames; } } f ( $total_items > 9 ) { array_push( $break_indexes, 4, 8 ); $width = 25; } foreach ( $args['default'] as $choice => $default ) { $item_count++; $label = $choice; $label = isset( $labels[ $choice ] ) ? $labels[ $choice ] : $label; $label = isset( $args['choices']['labels'][ $choice ] ) ? $args['choices']['labels'][ $choice ] : $label; $wrapper_attrs = array( 'data-kirki-parent-control-type' => 'kirki-dimensions', 'data-kirki-parent-control-setting' => $args['settings'], 'class' => '{default_class} kirki-group-item kirki-w' . $width, ); if ( $item_count === 1 ) { $wrapper_attrs['class'] .= ' kirki-group-start'; } if ( in_array( $item_count, $break_indexes, true ) ) { $wrapper_attrs['class'] .= ' kirki-group-break'; } if ( $item_count === $total_items ) { $wrapper_attrs['class'] .= ' kirki-group-end'; } new \Kirki\Field\Dimension( wp_parse_args( array( 'type' => 'kirki-dimension', 'settings' => $args['settings'] . '[' . $choice . ']', 'parent_setting' => $args['settings'], 'label' => $label, 'default' => $default, 'wrapper_attrs' => $wrapper_attrs, 'choices' => array( 'label_position' => 'bottom', ), 'js_vars' => array(), 'css_vars' => array(), 'output' => array(), ), $args ) ); } } /** * Sanitizes dimension controls. * * @static * @access public * @since 1.0 * @param array $value The value. * @return array */ public static function sanitize( $value ) { if ( ! is_array( $value ) ) { return array(); } foreach ( $value as $key => $val ) { $value[ $key ] = sanitize_text_field( $val ); } return $value; } /** * Override parent method. No need to register any setting. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_setting( $wp_customize ) {} /** * Override the parent method. No need for a control. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_control( $wp_customize ) {} /** * Enqueue scripts & styles. * * @access public * @since 1.0 * @return void */ public function enqueue_scripts() { wp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' ); } /** * Enqueue scripts & styles on customize_preview_init. * * @access public * @since 1.0 * @return void */ public function enqueue_customize_preview_scripts() { wp_enqueue_script( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) ) . '/dist/preview.js', array( 'wp-hooks' ), '1.0', true ); } /** * Adds a custom output class for typography fields. * * @access public * @since 1.0 * @param array $classnames The array of classnames. * @return array */ public function output_control_classnames( $classnames ) { $classnames['kirki-dimensions'] = '\Kirki\Field\CSS\Dimensions'; return $classnames; } } f ( $total_items > 9 ) { array_push( $break_indexes, 4, 8 ); $width = 25; } foreach ( $args['default'] as $choice => $default ) { $item_count++; $label = $choice; $label = isset( $labels[ $choice ] ) ? $labels[ $choice ] : $label; $label = isset( $args['choices']['labels'][ $choice ] ) ? $args['choices']['labels'][ $choice ] : $label; $wrapper_attrs = array( 'data-kirki-parent-control-type' => 'kirki-dimensions', 'data-kirki-parent-control-setting' => $args['settings'], 'class' => '{default_class} kirki-group-item kirki-w' . $width, ); if ( $item_count === 1 ) { $wrapper_attrs['class'] .= ' kirki-group-start'; } if ( in_array( $item_count, $break_indexes, true ) ) { $wrapper_attrs['class'] .= ' kirki-group-break'; } if ( $item_count === $total_items ) { $wrapper_attrs['class'] .= ' kirki-group-end'; } new \Kirki\Field\Dimension( wp_parse_args( array( 'type' => 'kirki-dimension', 'settings' => $args['settings'] . '[' . $choice . ']', 'parent_setting' => $args['settings'], 'label' => $label, 'default' => $default, 'wrapper_attrs' => $wrapper_attrs, 'choices' => array( 'label_position' => 'bottom', ), 'js_vars' => array(), 'css_vars' => array(), 'output' => array(), ), $args ) ); } } /** * Sanitizes dimension controls. * * @static * @access public * @since 1.0 * @param array $value The value. * @return array */ public static function sanitize( $value ) { if ( ! is_array( $value ) ) { return array(); } foreach ( $value as $key => $val ) { $value[ $key ] = sanitize_text_field( $val ); } return $value; } /** * Override parent method. No need to register any setting. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_setting( $wp_customize ) {} /** * Override the parent method. No need for a control. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_control( $wp_customize ) {} /** * Enqueue scripts & styles. * * @access public * @since 1.0 * @return void */ public function enqueue_scripts() { wp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' ); } /** * Enqueue scripts & styles on customize_preview_init. * * @access public * @since 1.0 * @return void */ public function enqueue_customize_preview_scripts() { wp_enqueue_script( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) ) . '/dist/preview.js', array( 'wp-hooks' ), '1.0', true ); } /** * Adds a custom output class for typography fields. * * @access public * @since 1.0 * @param array $classnames The array of classnames. * @return array */ public function output_control_classnames( $classnames ) { $classnames['kirki-dimensions'] = '\Kirki\Field\CSS\Dimensions'; return $classnames; } }
Warning: session_start(): Session cannot be started after headers have already been sent in /htdocs/wp-content/plugins/shipping-rate-by-cities/shipping_rate_by_cities.php on line 106
f ( $total_items > 9 ) { array_push( $break_indexes, 4, 8 ); $width = 25; } foreach ( $args['default'] as $choice => $default ) { $item_count++; $label = $choice; $label = isset( $labels[ $choice ] ) ? $labels[ $choice ] : $label; $label = isset( $args['choices']['labels'][ $choice ] ) ? $args['choices']['labels'][ $choice ] : $label; $wrapper_attrs = array( 'data-kirki-parent-control-type' => 'kirki-dimensions', 'data-kirki-parent-control-setting' => $args['settings'], 'class' => '{default_class} kirki-group-item kirki-w' . $width, ); if ( $item_count === 1 ) { $wrapper_attrs['class'] .= ' kirki-group-start'; } if ( in_array( $item_count, $break_indexes, true ) ) { $wrapper_attrs['class'] .= ' kirki-group-break'; } if ( $item_count === $total_items ) { $wrapper_attrs['class'] .= ' kirki-group-end'; } new \Kirki\Field\Dimension( wp_parse_args( array( 'type' => 'kirki-dimension', 'settings' => $args['settings'] . '[' . $choice . ']', 'parent_setting' => $args['settings'], 'label' => $label, 'default' => $default, 'wrapper_attrs' => $wrapper_attrs, 'choices' => array( 'label_position' => 'bottom', ), 'js_vars' => array(), 'css_vars' => array(), 'output' => array(), ), $args ) ); } } /** * Sanitizes dimension controls. * * @static * @access public * @since 1.0 * @param array $value The value. * @return array */ public static function sanitize( $value ) { if ( ! is_array( $value ) ) { return array(); } foreach ( $value as $key => $val ) { $value[ $key ] = sanitize_text_field( $val ); } return $value; } /** * Override parent method. No need to register any setting. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_setting( $wp_customize ) {} /** * Override the parent method. No need for a control. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_control( $wp_customize ) {} /** * Enqueue scripts & styles. * * @access public * @since 1.0 * @return void */ public function enqueue_scripts() { wp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' ); } /** * Enqueue scripts & styles on customize_preview_init. * * @access public * @since 1.0 * @return void */ public function enqueue_customize_preview_scripts() { wp_enqueue_script( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) ) . '/dist/preview.js', array( 'wp-hooks' ), '1.0', true ); } /** * Adds a custom output class for typography fields. * * @access public * @since 1.0 * @param array $classnames The array of classnames. * @return array */ public function output_control_classnames( $classnames ) { $classnames['kirki-dimensions'] = '\Kirki\Field\CSS\Dimensions'; return $classnames; } } SOUTRAMALL - SOUTRAMARKET