Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/redux-fr.../sample/sections/advanced...
File: field-validation.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Redux Framework field validation config.
[2] Fix | Delete
* For full documentation, please visit: http://devs.redux.io/
[3] Fix | Delete
*
[4] Fix | Delete
* @package Redux Framework
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
defined( 'ABSPATH' ) || exit;
[8] Fix | Delete
[9] Fix | Delete
Redux::set_section(
[10] Fix | Delete
$opt_name,
[11] Fix | Delete
array(
[12] Fix | Delete
'title' => esc_html__( 'Field Validation', 'your-textdomain-here' ),
[13] Fix | Delete
'id' => 'validation',
[14] Fix | Delete
'desc' => esc_html__( 'For full documentation on validation, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/validate.html" target="_blank">https://devs.redux.io/configuration/fields/validate.html</a>',
[15] Fix | Delete
'subsection' => true,
[16] Fix | Delete
'fields' => array(
[17] Fix | Delete
array(
[18] Fix | Delete
'id' => 'opt-text-email',
[19] Fix | Delete
'type' => 'text',
[20] Fix | Delete
'title' => esc_html__( 'Text Option - Email Validated', 'your-textdomain-here' ),
[21] Fix | Delete
'subtitle' => esc_html__( 'This is a little space under the Field Title in the Options table, additional info is good in here.', 'your-textdomain-here' ),
[22] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[23] Fix | Delete
'validate' => 'email',
[24] Fix | Delete
'msg' => 'An error message you could customize via your option array!',
[25] Fix | Delete
'default' => 'test@test.com',
[26] Fix | Delete
),
[27] Fix | Delete
array(
[28] Fix | Delete
'id' => 'opt-text-post-type',
[29] Fix | Delete
'type' => 'text',
[30] Fix | Delete
'title' => esc_html__( 'Text Option with Data Attributes', 'your-textdomain-here' ),
[31] Fix | Delete
'subtitle' => esc_html__( 'You can also pass an options array if you want. Set the default to whatever you like.', 'your-textdomain-here' ),
[32] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[33] Fix | Delete
'data' => 'post_type',
[34] Fix | Delete
),
[35] Fix | Delete
array(
[36] Fix | Delete
'id' => 'opt-multi-text',
[37] Fix | Delete
'type' => 'multi_text',
[38] Fix | Delete
'title' => esc_html__( 'Multi Text Option - Color Validated', 'your-textdomain-here' ),
[39] Fix | Delete
'validate' => 'color',
[40] Fix | Delete
'subtitle' => esc_html__( 'If you enter an invalid color it will be removed. Try using the text "blue" as a color. ;)', 'your-textdomain-here' ),
[41] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[42] Fix | Delete
),
[43] Fix | Delete
array(
[44] Fix | Delete
'id' => 'opt-text-url',
[45] Fix | Delete
'type' => 'text',
[46] Fix | Delete
'title' => esc_html__( 'Text Option - URL Validated', 'your-textdomain-here' ),
[47] Fix | Delete
'subtitle' => esc_html__( 'This must be a URL.', 'your-textdomain-here' ),
[48] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[49] Fix | Delete
'validate' => 'url',
[50] Fix | Delete
'default' => 'https://redux.io',
[51] Fix | Delete
),
[52] Fix | Delete
array(
[53] Fix | Delete
'id' => 'opt-text-numeric',
[54] Fix | Delete
'type' => 'text',
[55] Fix | Delete
'title' => esc_html__( 'Text Option - Numeric Validated', 'your-textdomain-here' ),
[56] Fix | Delete
'subtitle' => esc_html__( 'This must be numeric.', 'your-textdomain-here' ),
[57] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[58] Fix | Delete
'validate' => array( 'numeric', 'not_empty' ),
[59] Fix | Delete
'default' => '0',
[60] Fix | Delete
),
[61] Fix | Delete
array(
[62] Fix | Delete
'id' => 'opt-text-comma-numeric',
[63] Fix | Delete
'type' => 'text',
[64] Fix | Delete
'title' => esc_html__( 'Text Option - Comma Numeric Validated', 'your-textdomain-here' ),
[65] Fix | Delete
'subtitle' => esc_html__( 'This must be a comma separated string of numerical values.', 'your-textdomain-here' ),
[66] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[67] Fix | Delete
'validate' => 'comma_numeric',
[68] Fix | Delete
'default' => '0',
[69] Fix | Delete
),
[70] Fix | Delete
array(
[71] Fix | Delete
'id' => 'opt-text-no-special-chars',
[72] Fix | Delete
'type' => 'text',
[73] Fix | Delete
'title' => __( 'Text Option - No Special Chars Validated', 'your-textdomain-here' ),
[74] Fix | Delete
'subtitle' => __( 'This must be a alpha numeric only.', 'your-textdomain-here' ),
[75] Fix | Delete
'desc' => __( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[76] Fix | Delete
'validate' => 'no_special_chars',
[77] Fix | Delete
'default' => '0',
[78] Fix | Delete
),
[79] Fix | Delete
array(
[80] Fix | Delete
'id' => 'opt-text-str_replace',
[81] Fix | Delete
'type' => 'text',
[82] Fix | Delete
'title' => esc_html__( 'Text Option - Str Replace Validated', 'your-textdomain-here' ),
[83] Fix | Delete
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
[84] Fix | Delete
'desc' => esc_html__( 'This field\'s default value was changed by a filter hook!', 'your-textdomain-here' ),
[85] Fix | Delete
'validate' => 'str_replace',
[86] Fix | Delete
'str' => array(
[87] Fix | Delete
'search' => ' ',
[88] Fix | Delete
'replacement' => '-thisisaspace-',
[89] Fix | Delete
),
[90] Fix | Delete
'default' => 'This is the default.',
[91] Fix | Delete
),
[92] Fix | Delete
array(
[93] Fix | Delete
'id' => 'opt-text-preg_replace',
[94] Fix | Delete
'type' => 'text',
[95] Fix | Delete
'title' => esc_html__( 'Text Option - Preg Replace Validated', 'your-textdomain-here' ),
[96] Fix | Delete
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
[97] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[98] Fix | Delete
'validate' => 'preg_replace',
[99] Fix | Delete
'preg' => array(
[100] Fix | Delete
'pattern' => '/.*?\\d.*?\\d(\\d)/is',
[101] Fix | Delete
'replacement' => 'no numbers',
[102] Fix | Delete
),
[103] Fix | Delete
'default' => '0',
[104] Fix | Delete
),
[105] Fix | Delete
array(
[106] Fix | Delete
'id' => 'opt-text-custom_validate',
[107] Fix | Delete
'type' => 'text',
[108] Fix | Delete
'title' => esc_html__( 'Text Option - Custom Callback Validated', 'your-textdomain-here' ),
[109] Fix | Delete
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
[110] Fix | Delete
'desc' => wp_kses( __( 'Enter <code>1</code> and click <strong>Save Changes</strong> for an error message, or enter <code>2</code> and click <strong>Save Changes</strong> for a warning message.', 'your-textdomain-here' ), $kses_exceptions ),
[111] Fix | Delete
'validate_callback' => 'redux_validate_callback_function',
[112] Fix | Delete
'default' => '0',
[113] Fix | Delete
),
[114] Fix | Delete
array(
[115] Fix | Delete
'id' => 'opt-textarea-no-html',
[116] Fix | Delete
'type' => 'textarea',
[117] Fix | Delete
'title' => esc_html__( 'Textarea Option - No HTML Validated', 'your-textdomain-here' ),
[118] Fix | Delete
'subtitle' => esc_html__( 'All HTML will be stripped', 'your-textdomain-here' ),
[119] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[120] Fix | Delete
'validate' => 'no_html',
[121] Fix | Delete
'default' => 'No HTML is allowed in here.',
[122] Fix | Delete
),
[123] Fix | Delete
array(
[124] Fix | Delete
'id' => 'opt-textarea-html',
[125] Fix | Delete
'type' => 'textarea',
[126] Fix | Delete
'title' => esc_html__( 'Textarea Option - HTML Validated', 'your-textdomain-here' ),
[127] Fix | Delete
'subtitle' => esc_html__( 'HTML Allowed (wp_kses)', 'your-textdomain-here' ),
[128] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[129] Fix | Delete
'validate' => 'html', // See http://codex.wordpress.org/Function_Reference/wp_kses_post.
[130] Fix | Delete
'default' => 'HTML is allowed in here.',
[131] Fix | Delete
),
[132] Fix | Delete
array(
[133] Fix | Delete
'id' => 'opt-textarea-some-html',
[134] Fix | Delete
'type' => 'textarea',
[135] Fix | Delete
'title' => esc_html__( 'Textarea Option - HTML Validated Custom', 'your-textdomain-here' ),
[136] Fix | Delete
'subtitle' => esc_html__( 'Custom HTML Allowed (wp_kses)', 'your-textdomain-here' ),
[137] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[138] Fix | Delete
'validate' => 'html_custom',
[139] Fix | Delete
'default' => '<p>Some HTML is allowed in here.</p>',
[140] Fix | Delete
[141] Fix | Delete
// See http://codex.wordpress.org/Function_Reference/wp_kses.
[142] Fix | Delete
'allowed_html' => array(
[143] Fix | Delete
'a' => array(
[144] Fix | Delete
'href' => array(),
[145] Fix | Delete
'title' => array(),
[146] Fix | Delete
),
[147] Fix | Delete
'br' => array(),
[148] Fix | Delete
'em' => array(),
[149] Fix | Delete
'strong' => array(),
[150] Fix | Delete
),
[151] Fix | Delete
),
[152] Fix | Delete
array(
[153] Fix | Delete
'id' => 'opt-textarea-js',
[154] Fix | Delete
'type' => 'textarea',
[155] Fix | Delete
'title' => esc_html__( 'Textarea Option - JS Validated', 'your-textdomain-here' ),
[156] Fix | Delete
'subtitle' => esc_html__( 'JS will be escaped', 'your-textdomain-here' ),
[157] Fix | Delete
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
[158] Fix | Delete
'validate' => 'js',
[159] Fix | Delete
),
[160] Fix | Delete
),
[161] Fix | Delete
)
[162] Fix | Delete
);
[163] Fix | Delete
[164] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function