label ) ) { ?> label ); ?> description ) ) { ?> description ); ?> value() ) ); ?> link(); ?> /> choices as $key => $value ) { ?>
label ) ) { ?> label ); ?> description ) ) { ?> description ); ?>
choices as $key => $value ) { ?>
label ) ) { ?> label ); ?> description ) ) { ?> description ); ?> choices as $key => $value ) { ?>
array( 'href' => array(), 'title' => array(), 'class' => array(), 'target' => array(), ), 'br' => array(), 'em' => array(), 'strong' => array(), 'i' => array( 'class' => array() ), 'span' => array( 'class' => array(), ), 'code' => array(), ); ?>
label ) ) { ?> label ); ?> description ) ) { ?> description, $allowed_html ); ?>
label ); ?>link(); ?> />
link(); checked( $this->value() ); ?>>
label ); ?> description ) ) { ?> description ); ?>
button_labels = wp_parse_args( $this->button_labels, array( 'add' => esc_html__( 'Add', 'acumen' ), ) ); } /** * Render the control in the customizer */ public function render_content() { ?>
label ) ) { ?> label ); ?> description ) ) { ?> description ); ?> link(); ?> />
input_attrs['multiselect'] ) && $this->input_attrs['multiselect'] ) { $this->multiselect = true; } // Check if a placeholder string has been specified if ( isset( $this->input_attrs['placeholder'] ) && $this->input_attrs['placeholder'] ) { $this->placeholder = $this->input_attrs['placeholder']; } } /** * Render the control in the customizer */ public function render_content() { $defaultValue = $this->value(); if ( $this->multiselect ) { $defaultValue = explode( ',', $this->value() ); } ?> posts = Acumen_Customizer_Utilities::get_posts_as_array( $this->input_attrs ); } /** * Render the control in the customizer */ public function render_content() { ?> backgroundcolor ) ? esc_attr( $this->backgroundcolor ) : '#fff'; $color = !empty( $this->textcolor ) ? esc_attr( $this->textcolor ) : '#555d66'; ?>
  • > >title ); ?>

  • json['acumentinymcetoolbar1'] = isset( $this->input_attrs['toolbar1'] ) ? esc_attr( $this->input_attrs['toolbar1'] ) : 'bold italic bullist numlist alignleft aligncenter alignright link'; $this->json['acumentinymcetoolbar2'] = isset( $this->input_attrs['toolbar2'] ) ? esc_attr( $this->input_attrs['toolbar2'] ) : ''; $this->json['acumenmediabuttons'] = isset( $this->input_attrs['mediaButtons'] ) && ( $this->input_attrs['mediaButtons'] === true ) ? true : false; } /** * Render the control in the customizer */ public function render_content(){ ?>
    label ); ?> description ) ) { ?> description ); ?>

    ' . wp_kses_post( $this->label ) . '

    '; } } /** * URL sanitization * * @param string Input to be sanitized (either a string containing a single url or multiple, separated by commas) * @return string Sanitized input */ if ( ! function_exists( 'acumen_url_sanitization' ) ) { function acumen_url_sanitization( $input ) { if ( strpos( $input, ',' ) !== false) { $input = explode( ',', $input ); } if ( is_array( $input ) ) { foreach ($input as $key => $value) { $input[$key] = esc_url_raw( $value ); } $input = implode( ',', $input ); } else { $input = esc_url_raw( $input ); } return $input; } } /** * Switch sanitization * * @param string Switch value * @return integer Sanitized value */ if ( ! function_exists( 'acumen_switch_sanitization' ) ) { function acumen_switch_sanitization( $input ) { if ( true === $input ) { return 1; } else { return 0; } } } /** * Radio Button and Select sanitization * * @param string Radio Button value * @return integer Sanitized value */ if ( ! function_exists( 'acumen_radio_sanitization' ) ) { function acumen_radio_sanitization( $input, $setting ) { //get the list of possible radio box or select options $choices = $setting->manager->get_control( $setting->id )->choices; if ( array_key_exists( $input, $choices ) ) { return $input; } else { return $setting->default; } } } /** * Text sanitization * * @param string Input to be sanitized * @return string Sanitized input */ if ( ! function_exists( 'acumen_text_sanitization' ) ) { function acumen_text_sanitization( $input ) { return sanitize_text_field( $input ); } } /** * Select sanitization callback example. * * - Sanitization: select * - Control: select, radio * * Sanitization callback for 'select' and 'radio' type controls. This callback sanitizes `$input` * as a slug, and then validates `$input` against the choices defined for the control. * * @see sanitize_key() https://developer.wordpress.org/reference/functions/sanitize_key/ * @see $wp_customize->get_control() https://developer.wordpress.org/reference/classes/wp_customize_manager/get_control/ * * @param string $input Slug to sanitize. * @param WP_Customize_Setting $setting Setting instance. * @return string Sanitized slug if it is a valid choice; otherwise, the setting default. */ function acumen_sanitize_select( $input, $setting ) { // Ensure input is a slug. $input = sanitize_key( $input ); // Get list of choices from the control associated with the setting. $choices = $setting->manager->get_control( $setting->id )->choices; // If the input is a valid key, return it; otherwise, return the default. return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } /** * Sanitize Google map code to allow iframe */ function acumen_sanitize_map_code( $input ) { // allow iframe. return wp_kses( $input, array( 'iframe' => array( 'align' => true, 'width' => true, 'height' => true, 'frameborder' => true, 'name' => true, 'src' => true, 'id' => true, 'class' => true, 'style' => true, 'scrolling' => true, 'marginwidth' => true, 'marginheight' => true, ) ) ); } }