true, 'width' => true, 'height' => true, 'frameborder' => true, 'name' => true, 'src' => true, 'id' => true, 'class' => true, 'style' => true, 'scrolling' => true, 'marginwidth' => true, 'marginheight' => true, ); return $codepress_corporate_allowedposttags; } //Text sanitization function codepress_corporate_text_field($input) { return sanitize_text_field($input); } //URL sanitization function codepress_corporate_sanitize_url($input) { //_deprecated_function( __FUNCTION__, '2.8', 'esc_url_raw()' ); global $codepress_corporate_url; $output = esc_url_raw( $input, $codepress_corporate_url ); return $output; } // checkbox sanitization function codepress_corporate_checkbox_sanitize($input) { if ( $input == 1 ) { return 1; } else { return ''; } } // Sanitize textarea function codepress_corporate_sanitize_textarea( $input ) { global $codepress_corporate_allowedposttags; $output = wp_kses_post( $input, $codepress_corporate_allowedposttags); return $output; } add_filter( 'of_sanitize_textarea', 'codepress_corporate_sanitize_textarea' ); // function sanitize_textarea( $text ) { // sanitize_hex_color( $text ); // return esc_textarea( $text ); // } // Sanitize logo palcaement function example_sanitize_logo_placement( $input ) { $valid = array( 'left' => 'Left', 'right' => 'Right', 'center' => 'Center', ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } } //Number Sanitization function codepress_corporate_sanitize_number( $int ) { return absint( $int ); } //Email sanitization function codepress_corporate_sanitize_email( $email ) { if(is_email( $email )){ return $email; }else{ return ''; } } // radio button sanitization function codepress_corporate_related_posts_sanitize($input) { $valid_keys = array( 'categories' => __('Related Posts By Categories', 'codepress-corporate'), 'tags' => __('Related Posts By Tags', 'codepress-corporate') ); if ( array_key_exists( $input, $valid_keys ) ) { return $input; } else { return ''; } } //function to enabale disabale section with checkbox function codepress_corporate_get_options_values() { // Get the option defaults $codepress_corporate_option_defaults = codepress_corporate_get_options_defaults(); // Parse the stored options with the defaults $codepress_corporate_options = wp_parse_args( get_option( codepress_corporate_option(), array() ), $codepress_corporate_option_defaults ); // Return the parsed array return $codepress_corporate_options; } //function for theme option function codepress_coporate_option() { return apply_filters( 'codepress_coporate_option', 'codepress_corporate_theme_options' ); } ?>