field-sanitizing.php (2187B)
1 <?php 2 /** 3 * Redux Framework field sanitizing config. 4 * For full documentation, please visit: http://devs.redux.io/ 5 * 6 * @package Redux Framework 7 */ 8 9 defined( 'ABSPATH' ) || exit; 10 11 Redux::set_section( 12 $opt_name, 13 array( 14 'title' => esc_html__( 'Field Sanitizing', 'your-textdomain-here' ), 15 'id' => 'sanitizing', 16 // phpcs:ignore 17 // 'desc' => esc_html__( 'For full documentation on sanitizing, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/sanitizing/" target="_blank">https://devs.redux.io/configuration/fields/sanitizing/</a>', 18 'subsection' => true, 19 'fields' => array( 20 array( 21 'id' => 'opt-text-uppercase', 22 'type' => 'text', 23 'title' => esc_html__( 'Text Option - Force Uppercase', 'your-textdomain-here' ), 24 'subtitle' => esc_html__( 'Uses the strtoupper function to force all uppercase characters.', 'your-textdomain-here' ), 25 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 26 'sanitize' => array( 'strtoupper' ), 27 'default' => 'Force Uppercase', 28 ), 29 array( 30 'id' => 'opt-text-sanitize-title', 31 'type' => 'text', 32 'title' => esc_html__( 'Text Option - Sanitize Title', 'your-textdomain-here' ), 33 'subtitle' => esc_html__( 'Uses the WordPress sanitize_title function to format text.', 'your-textdomain-here' ), 34 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 35 'sanitize' => array( 'sanitize_title' ), 36 'default' => 'Sanitize This Title', 37 ), 38 array( 39 'id' => 'opt-text-custom-sanitize', 40 'type' => 'text', 41 'title' => esc_html__( 'Text Option - Custom Sanitize', 'your-textdomain-here' ), 42 'subtitle' => esc_html__( 'Uses the custom function redux_custom_santize to capitalize every other letter.', 'your-textdomain-here' ), 43 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 44 'sanitize' => array( 'redux_custom_sanitize' ), 45 'default' => 'Sanitize This Text', 46 ), 47 ), 48 ) 49 );