芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/Ultimate_VC_Addons/params/Ultimate_Select.php
= 0 ) { if ( function_exists( 'vc_add_shortcode_param' ) ) { vc_add_shortcode_param( 'ult_select2', array( $this, 'select2_param' ) ); } } else { if ( function_exists( 'add_shortcode_param' ) ) { add_shortcode_param( 'ult_select2', array( $this, 'select2_param' ) ); } } } /** * Select2_param. * * @param array $settings Settings. * @param string $value Value. */ public function select2_param( $settings, $value ) { $param_name = isset( $settings['param_name'] ) ? $settings['param_name'] : ''; $type = isset( $settings['type'] ) ? $settings['type'] : ''; $class = isset( $settings['class'] ) ? $settings['class'] : ''; $json = isset( $settings['json'] ) ? $settings['json'] : ''; $jsoniterator = json_decode( $json, true ); $selector = '
'; foreach ( $jsoniterator as $key => $val ) { if ( is_array( $val ) ) { $labels = str_replace( '_', ' ', $key ); $selector .= '
'; foreach ( $val as $label => $style ) { $label = str_replace( '_', ' ', $label ); if ( $style == $value ) { $selector .= '
' . esc_html__( $label, 'ultimate_vc' ) . '
'; } else { $selector .= '
' . esc_html__( $label, 'ultimate_vc' ) . '
'; } } } else { if ( $val == $value ) { $selector .= '
' . esc_html__( $key, 'ultimate_vc' ) . '
'; } else { $selector .= '
' . esc_html__( $key, 'ultimate_vc' ) . '
'; } } } $selector .= '
'; $output = ''; $output .= '
'; $output .= $selector; $output .= '
'; return $output; } } } if ( class_exists( 'Ultimate_VC_Addons_Select_Param' ) ) { $ultimate_select_param = new Ultimate_VC_Addons_Select_Param(); }