Direct script access denied.' ); } function articled_select_sanitize( $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 ); } function articled_sortable_sc( $input ){ /* Var */ $output = array(); /* Make array */ $sortables = explode( ',', $input ); /* Bail. */ if( !is_array($sortables) ){ return null; } /* Loop and verify */ foreach( $sortables as $sortable ){ $output[] = $sortable; } return trim( esc_attr( implode( ',', $output ) ) ); } if ( !function_exists('articled_toggle_sanitize') ){ function articled_toggle_sanitize( $input ) { if ( true === $input ) { return 1; } else { return 0; } } } if ( !function_exists('articled_allowed_html_kses') ){ function articled_allowed_html_kses( $input ) { return wp_kses( $input, allowed_tags() ); } } ?>