芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/Ultimate_VC_Addons/params/Ultimate_Switch.php
= 0 ) { if ( function_exists( 'vc_add_shortcode_param' ) ) { vc_add_shortcode_param( 'ult_switch', array( $this, 'checkbox_param' ) ); } } else { if ( function_exists( 'add_shortcode_param' ) ) { add_shortcode_param( 'ult_switch', array( $this, 'checkbox_param' ) ); } } } /** * Checkbox_param. * * @param array $settings Settings. * @param string $value Value. */ public function checkbox_param( $settings, $value ) { $dependency = ''; $param_name = isset( $settings['param_name'] ) ? $settings['param_name'] : ''; $type = isset( $settings['type'] ) ? $settings['type'] : ''; $options = isset( $settings['options'] ) ? $settings['options'] : ''; $class = isset( $settings['class'] ) ? $settings['class'] : ''; $default_set = isset( $settings['default_set'] ) ? $settings['default_set'] : false; $output = ''; $checked = ''; $un = uniqid( 'ultswitch-' . wp_rand( 1000, 9999 ) ); if ( is_array( $options ) && ! empty( $options ) ) { foreach ( $options as $key => $opts ) { if ( $value == $key ) { $checked = 'checked'; } else { $checked = ''; } $uid = uniqid( 'ultswitchparam-' . wp_rand( 1000, 9999 ) ); $output .= '
' . esc_html( $opts['on'] ) . '
' . esc_html( $opts['off'] ) . '
'; if ( isset( $opts['label'] ) ) { $lbl = $opts['label']; } else { $lbl = ''; } $output .= '
' . $lbl . '
'; } } if ( $default_set ) { $set_value = 'off'; } else { $set_value = ''; } $output .= ''; return $output; } } } if ( class_exists( 'Ultimate_VC_Addons_Switch_Param' ) ) { $ultimate_switch_param = new Ultimate_VC_Addons_Switch_Param(); }