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/clone/wp-conte.../plugins/password.../includes/services
File: class-ppw-customizer.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! class_exists( 'PPW_Customizer_Service' ) ) {
[2] Fix | Delete
class PPW_Customizer_Service {
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Instance of PPW_Pro_Shortcode class.
[6] Fix | Delete
*
[7] Fix | Delete
* @var PPW_Customizer_Service
[8] Fix | Delete
*/
[9] Fix | Delete
protected static $instance = null;
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Constructor for PPW_Customizer
[13] Fix | Delete
*/
[14] Fix | Delete
public function __construct() {
[15] Fix | Delete
add_action( 'customize_register', array( $this, 'customize_register' ) );
[16] Fix | Delete
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue' ) );
[17] Fix | Delete
add_action( 'wp_head', array( $this, 'dynamic_styles' ) );
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Get instance of PPW_Customizer
[22] Fix | Delete
*
[23] Fix | Delete
* @return PPW_Customizer_Service
[24] Fix | Delete
*/
[25] Fix | Delete
public static function get_instance() {
[26] Fix | Delete
if ( is_null( self::$instance ) ) {
[27] Fix | Delete
// Use static instead of self due to the inheritance later.
[28] Fix | Delete
// For example: ChildSC extends this class, when we call get_instance
[29] Fix | Delete
// it will return the object of child class. On the other hand, self function
[30] Fix | Delete
// will return the object of base class.
[31] Fix | Delete
self::$instance = new static();
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
return self::$instance;
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Get below text style.
[39] Fix | Delete
*
[40] Fix | Delete
* @return string
[41] Fix | Delete
*/
[42] Fix | Delete
public function get_below_text_style() {
[43] Fix | Delete
if ( defined( 'PPW_PRO_VERSION' ) ) {
[44] Fix | Delete
return '';
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
$desc_font_size = get_theme_mod( 'ppwp_form_instructions_below_text_font_size' );
[48] Fix | Delete
$desc_font_weight = get_theme_mod( 'ppwp_form_instructions_below_text_font_weight' );
[49] Fix | Delete
$desc_color = get_theme_mod( 'ppwp_form_instructions_below_text_color' );
[50] Fix | Delete
[51] Fix | Delete
$customizer_style = "
[52] Fix | Delete
.ppw-ppf-desc-below {
[53] Fix | Delete
font-size: " . $desc_font_size . "px!important;
[54] Fix | Delete
font-weight: " . $desc_font_weight . "!important;
[55] Fix | Delete
color: " . $desc_color . "!important;
[56] Fix | Delete
}
[57] Fix | Delete
";
[58] Fix | Delete
[59] Fix | Delete
return $customizer_style;
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
/**
[63] Fix | Delete
* Add below description customize.
[64] Fix | Delete
*
[65] Fix | Delete
* @param $wp_customize
[66] Fix | Delete
*/
[67] Fix | Delete
public function add_below_desc( $wp_customize ) {
[68] Fix | Delete
if ( defined( 'PPW_PRO_VERSION' ) ) {
[69] Fix | Delete
return;
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_description_below_title' );
[73] Fix | Delete
[74] Fix | Delete
$wp_customize->add_control(
[75] Fix | Delete
new PPW_Title_Group_Control(
[76] Fix | Delete
$wp_customize,
[77] Fix | Delete
'ppwp_form_instructions_description_below_title',
[78] Fix | Delete
array(
[79] Fix | Delete
'label' => __( 'Description Below Form', PPW_Constants::DOMAIN ),
[80] Fix | Delete
'section' => 'ppwp_form_instructions',
[81] Fix | Delete
'settings' => 'ppwp_form_instructions_description_below_title',
[82] Fix | Delete
'type' => 'control_title',
[83] Fix | Delete
)
[84] Fix | Delete
)
[85] Fix | Delete
);
[86] Fix | Delete
[87] Fix | Delete
/* instructions text */
[88] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_below_text' );
[89] Fix | Delete
[90] Fix | Delete
$wp_customize->add_control(
[91] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[92] Fix | Delete
$wp_customize,
[93] Fix | Delete
'ppwp_form_instructions_below_text',
[94] Fix | Delete
array(
[95] Fix | Delete
'label' => __( 'Description', PPW_Constants::DOMAIN ),
[96] Fix | Delete
'section' => 'ppwp_form_instructions',
[97] Fix | Delete
'settings' => 'ppwp_form_instructions_below_text',
[98] Fix | Delete
'type' => 'textarea',
[99] Fix | Delete
)
[100] Fix | Delete
)
[101] Fix | Delete
);
[102] Fix | Delete
[103] Fix | Delete
/* instructions font size */
[104] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_below_text_font_size' );
[105] Fix | Delete
[106] Fix | Delete
$wp_customize->add_control(
[107] Fix | Delete
'ppwp_form_instructions_below_text_font_size_control',
[108] Fix | Delete
array(
[109] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[110] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[111] Fix | Delete
'section' => 'ppwp_form_instructions',
[112] Fix | Delete
'settings' => 'ppwp_form_instructions_below_text_font_size',
[113] Fix | Delete
'type' => 'number',
[114] Fix | Delete
) );
[115] Fix | Delete
[116] Fix | Delete
/* instructions font weight */
[117] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_below_text_font_weight' );
[118] Fix | Delete
[119] Fix | Delete
$wp_customize->add_control(
[120] Fix | Delete
'ppwp_form_instructions_below_text_font_weight_control',
[121] Fix | Delete
array(
[122] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[123] Fix | Delete
'section' => 'ppwp_form_instructions',
[124] Fix | Delete
'settings' => 'ppwp_form_instructions_below_text_font_weight',
[125] Fix | Delete
'type' => 'number',
[126] Fix | Delete
) );
[127] Fix | Delete
[128] Fix | Delete
/* text color - form instructions */
[129] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_below_text_color' );
[130] Fix | Delete
[131] Fix | Delete
$wp_customize->add_control(
[132] Fix | Delete
new \WP_Customize_Color_Control(
[133] Fix | Delete
$wp_customize,
[134] Fix | Delete
'ppwp_form_instructions_below_text_color_control',
[135] Fix | Delete
array(
[136] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[137] Fix | Delete
'section' => 'ppwp_form_instructions',
[138] Fix | Delete
'settings' => 'ppwp_form_instructions_below_text_color',
[139] Fix | Delete
)
[140] Fix | Delete
)
[141] Fix | Delete
);
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
/**
[145] Fix | Delete
* Register customizer fields
[146] Fix | Delete
*
[147] Fix | Delete
* @param object $wp_customize customizer object.
[148] Fix | Delete
*
[149] Fix | Delete
* @return void
[150] Fix | Delete
*/
[151] Fix | Delete
public function customize_register( $wp_customize ) {
[152] Fix | Delete
if ( ! class_exists( 'PPW_Title_Group_Control' ) ) {
[153] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-title-group-control.php';
[154] Fix | Delete
}
[155] Fix | Delete
if ( ! class_exists( 'PPW_Toggle_Control' ) ) {
[156] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-toggle-control.php';
[157] Fix | Delete
}
[158] Fix | Delete
if ( ! class_exists( 'PPW_Text_Editor_Custom_Control' ) ) {
[159] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-text-editor-control.php';
[160] Fix | Delete
}
[161] Fix | Delete
[162] Fix | Delete
/* register toggle control */
[163] Fix | Delete
$wp_customize->register_control_type( 'PPW_Toggle_Control' );
[164] Fix | Delete
$wp_customize->register_control_type( 'PPW_Title_Group_Control' );
[165] Fix | Delete
$wp_customize->register_control_type( 'PPW_Text_Editor_Custom_Control' );
[166] Fix | Delete
[167] Fix | Delete
$wp_customize->add_panel( 'ppwp',
[168] Fix | Delete
array(
[169] Fix | Delete
'priority' => 9970,
[170] Fix | Delete
'capability' => 'edit_theme_options',
[171] Fix | Delete
'theme_supports' => '',
[172] Fix | Delete
'title' => __( 'PPWP Single Password Form', PPW_Constants::DOMAIN ),
[173] Fix | Delete
)
[174] Fix | Delete
);
[175] Fix | Delete
[176] Fix | Delete
/* form instructions section */
[177] Fix | Delete
$wp_customize->add_section( 'ppwp_form_instructions', array(
[178] Fix | Delete
'title' => __( 'Password Form', PPW_Constants::DOMAIN ),
[179] Fix | Delete
'panel' => 'ppwp',
[180] Fix | Delete
'priority' => 100,
[181] Fix | Delete
) );
[182] Fix | Delete
[183] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_background_title' );
[184] Fix | Delete
[185] Fix | Delete
$wp_customize->add_control(
[186] Fix | Delete
new PPW_Title_Group_Control(
[187] Fix | Delete
$wp_customize,
[188] Fix | Delete
'ppwp_form_instructions_background_title', array(
[189] Fix | Delete
'label' => __( 'Background', PPW_Constants::DOMAIN ),
[190] Fix | Delete
'section' => 'ppwp_form_instructions',
[191] Fix | Delete
'settings' => 'ppwp_form_instructions_background_title',
[192] Fix | Delete
'type' => 'control_title',
[193] Fix | Delete
) )
[194] Fix | Delete
);
[195] Fix | Delete
[196] Fix | Delete
/* form background color */
[197] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_background_color', array(
[198] Fix | Delete
'default' => PPW_Constants::DEFAULT_FORM_BACKGROUND_COLOR,
[199] Fix | Delete
) );
[200] Fix | Delete
[201] Fix | Delete
$wp_customize->add_control(
[202] Fix | Delete
new \WP_Customize_Color_Control(
[203] Fix | Delete
$wp_customize,
[204] Fix | Delete
'ppwp_form_instructions_background_color_control', array(
[205] Fix | Delete
'label' => __( 'Background Color', PPW_Constants::DOMAIN ),
[206] Fix | Delete
'section' => 'ppwp_form_instructions',
[207] Fix | Delete
'settings' => 'ppwp_form_instructions_background_color',
[208] Fix | Delete
) )
[209] Fix | Delete
);
[210] Fix | Delete
[211] Fix | Delete
/* form background padding */
[212] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_padding', array(
[213] Fix | Delete
'default' => PPW_Constants::DEFAULT_FORM_PADDING,
[214] Fix | Delete
) );
[215] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_padding_control', array(
[216] Fix | Delete
'label' => __( 'Padding', PPW_Constants::DOMAIN ),
[217] Fix | Delete
'section' => 'ppwp_form_instructions',
[218] Fix | Delete
'description' => 'Padding in px',
[219] Fix | Delete
'settings' => 'ppwp_form_instructions_padding',
[220] Fix | Delete
'type' => 'number',
[221] Fix | Delete
) );
[222] Fix | Delete
[223] Fix | Delete
/* form background border radius */
[224] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_border_radius', array(
[225] Fix | Delete
'default' => PPW_Constants::DEFAULT_FORM_BORDER_RADIUS,
[226] Fix | Delete
) );
[227] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_border_radius_control', array(
[228] Fix | Delete
'label' => __( 'Border Radius', PPW_Constants::DOMAIN ),
[229] Fix | Delete
'section' => 'ppwp_form_instructions',
[230] Fix | Delete
'description' => 'Border Radius in px',
[231] Fix | Delete
'settings' => 'ppwp_form_instructions_border_radius',
[232] Fix | Delete
'type' => 'number',
[233] Fix | Delete
) );
[234] Fix | Delete
[235] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_headline_title' );
[236] Fix | Delete
[237] Fix | Delete
$wp_customize->add_control(
[238] Fix | Delete
new PPW_Title_Group_Control(
[239] Fix | Delete
$wp_customize,
[240] Fix | Delete
'ppwp_form_instructions_headline_title', array(
[241] Fix | Delete
'label' => __( 'Headline', PPW_Constants::DOMAIN ),
[242] Fix | Delete
'section' => 'ppwp_form_instructions',
[243] Fix | Delete
'settings' => 'ppwp_form_instructions_headline_title',
[244] Fix | Delete
'type' => 'control_title',
[245] Fix | Delete
) )
[246] Fix | Delete
);
[247] Fix | Delete
[248] Fix | Delete
/* instructions headline */
[249] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_headline', array(
[250] Fix | Delete
'default' => __( PPW_Constants::DEFAULT_HEADLINE_TEXT, PPW_Constants::DOMAIN ),
[251] Fix | Delete
) );
[252] Fix | Delete
$wp_customize->add_control(
[253] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[254] Fix | Delete
$wp_customize,
[255] Fix | Delete
'ppwp_form_instructions_headline',
[256] Fix | Delete
array(
[257] Fix | Delete
'label' => __( 'Headline', PPW_Constants::DOMAIN ),
[258] Fix | Delete
'section' => 'ppwp_form_instructions',
[259] Fix | Delete
'settings' => 'ppwp_form_instructions_headline',
[260] Fix | Delete
'type' => 'textarea',
[261] Fix | Delete
)
[262] Fix | Delete
)
[263] Fix | Delete
);
[264] Fix | Delete
[265] Fix | Delete
/* headline font size */
[266] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_headline_font_size', array(
[267] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_SIZE,
[268] Fix | Delete
) );
[269] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_headline_font_size_control', array(
[270] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[271] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[272] Fix | Delete
'section' => 'ppwp_form_instructions',
[273] Fix | Delete
'settings' => 'ppwp_form_instructions_headline_font_size',
[274] Fix | Delete
'type' => 'number',
[275] Fix | Delete
) );
[276] Fix | Delete
[277] Fix | Delete
/* headline font weight */
[278] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_headline_font_weight', array(
[279] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_WEIGHT,
[280] Fix | Delete
) );
[281] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_headline_font_weight_control', array(
[282] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[283] Fix | Delete
'section' => 'ppwp_form_instructions',
[284] Fix | Delete
'settings' => 'ppwp_form_instructions_headline_font_weight',
[285] Fix | Delete
'type' => 'number',
[286] Fix | Delete
) );
[287] Fix | Delete
[288] Fix | Delete
/* headline color */
[289] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_headline_color', array(
[290] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_COLOR,
[291] Fix | Delete
) );
[292] Fix | Delete
[293] Fix | Delete
$wp_customize->add_control(
[294] Fix | Delete
new \WP_Customize_Color_Control(
[295] Fix | Delete
$wp_customize,
[296] Fix | Delete
'ppwp_form_instructions_headline_color_control', array(
[297] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[298] Fix | Delete
'section' => 'ppwp_form_instructions',
[299] Fix | Delete
'settings' => 'ppwp_form_instructions_headline_color',
[300] Fix | Delete
) )
[301] Fix | Delete
);
[302] Fix | Delete
[303] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_description_title' );
[304] Fix | Delete
[305] Fix | Delete
$wp_customize->add_control(
[306] Fix | Delete
new PPW_Title_Group_Control(
[307] Fix | Delete
$wp_customize,
[308] Fix | Delete
'ppwp_form_instructions_description_title', array(
[309] Fix | Delete
'label' => __( 'Description Above Form', PPW_Constants::DOMAIN ),
[310] Fix | Delete
'section' => 'ppwp_form_instructions',
[311] Fix | Delete
'settings' => 'ppwp_form_instructions_description_title',
[312] Fix | Delete
'type' => 'control_title',
[313] Fix | Delete
) )
[314] Fix | Delete
);
[315] Fix | Delete
[316] Fix | Delete
/* instructions text */
[317] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_text', array(
[318] Fix | Delete
'default' => __( apply_filters( PPW_Constants::HOOK_MESSAGE_PASSWORD_FORM, PPW_Constants::DEFAULT_FORM_MESSAGE ), PPW_Constants::DOMAIN ),
[319] Fix | Delete
) );
[320] Fix | Delete
[321] Fix | Delete
$wp_customize->add_control(
[322] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[323] Fix | Delete
$wp_customize,
[324] Fix | Delete
'ppwp_form_instructions_text',
[325] Fix | Delete
array(
[326] Fix | Delete
'label' => __( 'Description', PPW_Constants::DOMAIN ),
[327] Fix | Delete
'section' => 'ppwp_form_instructions',
[328] Fix | Delete
'settings' => 'ppwp_form_instructions_text',
[329] Fix | Delete
'type' => 'textarea',
[330] Fix | Delete
)
[331] Fix | Delete
)
[332] Fix | Delete
);
[333] Fix | Delete
[334] Fix | Delete
/* instructions font size */
[335] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_text_font_size', array(
[336] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[337] Fix | Delete
) );
[338] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_text_font_size_control', array(
[339] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[340] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[341] Fix | Delete
'section' => 'ppwp_form_instructions',
[342] Fix | Delete
'settings' => 'ppwp_form_instructions_text_font_size',
[343] Fix | Delete
'type' => 'number',
[344] Fix | Delete
) );
[345] Fix | Delete
[346] Fix | Delete
/* instructions font weight */
[347] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_text_font_weight', array(
[348] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[349] Fix | Delete
) );
[350] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_text_font_weight_control', array(
[351] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[352] Fix | Delete
'section' => 'ppwp_form_instructions',
[353] Fix | Delete
'settings' => 'ppwp_form_instructions_text_font_weight',
[354] Fix | Delete
'type' => 'number',
[355] Fix | Delete
) );
[356] Fix | Delete
[357] Fix | Delete
/* text color - form instructions */
[358] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_text_color', array(
[359] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_COLOR,
[360] Fix | Delete
) );
[361] Fix | Delete
[362] Fix | Delete
$wp_customize->add_control(
[363] Fix | Delete
new \WP_Customize_Color_Control(
[364] Fix | Delete
$wp_customize,
[365] Fix | Delete
'ppwp_form_instructions_text_color_control', array(
[366] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[367] Fix | Delete
'section' => 'ppwp_form_instructions',
[368] Fix | Delete
'settings' => 'ppwp_form_instructions_text_color',
[369] Fix | Delete
) )
[370] Fix | Delete
);
[371] Fix | Delete
[372] Fix | Delete
$this->add_below_desc( $wp_customize );
[373] Fix | Delete
[374] Fix | Delete
// Add one more tab below "Description Text Color" control.
[375] Fix | Delete
do_action( 'ppw_customize_after_text_color', $wp_customize );
[376] Fix | Delete
[377] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_label_title' );
[378] Fix | Delete
$wp_customize->add_control(
[379] Fix | Delete
new PPW_Title_Group_Control(
[380] Fix | Delete
$wp_customize,
[381] Fix | Delete
'ppwp_form_instructions_label_title', array(
[382] Fix | Delete
'label' => __( 'Password Field', PPW_Constants::DOMAIN ),
[383] Fix | Delete
'section' => 'ppwp_form_instructions',
[384] Fix | Delete
'settings' => 'ppwp_form_instructions_label_title',
[385] Fix | Delete
'type' => 'control_title',
[386] Fix | Delete
) )
[387] Fix | Delete
);
[388] Fix | Delete
[389] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_password_label', array(
[390] Fix | Delete
'default' => PPW_Constants::DEFAULT_PASSWORD_LABEL,
[391] Fix | Delete
) );
[392] Fix | Delete
[393] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_password_label_control', array(
[394] Fix | Delete
'label' => __( 'Password Label', PPW_Constants::DOMAIN ),
[395] Fix | Delete
'section' => 'ppwp_form_instructions',
[396] Fix | Delete
'settings' => 'ppwp_form_instructions_password_label',
[397] Fix | Delete
'type' => 'text',
[398] Fix | Delete
) );
[399] Fix | Delete
[400] Fix | Delete
/* instructions font size */
[401] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_password_label_font_size', array(
[402] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[403] Fix | Delete
) );
[404] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_password_label_font_size_control', array(
[405] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[406] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[407] Fix | Delete
'section' => 'ppwp_form_instructions',
[408] Fix | Delete
'settings' => 'ppwp_form_instructions_password_label_font_size',
[409] Fix | Delete
'type' => 'number',
[410] Fix | Delete
) );
[411] Fix | Delete
[412] Fix | Delete
/* instructions font weight */
[413] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_password_label_font_weight', array(
[414] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[415] Fix | Delete
) );
[416] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_password_label_font_weight_control', array(
[417] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[418] Fix | Delete
'section' => 'ppwp_form_instructions',
[419] Fix | Delete
'settings' => 'ppwp_form_instructions_password_label_font_weight',
[420] Fix | Delete
'type' => 'number',
[421] Fix | Delete
) );
[422] Fix | Delete
[423] Fix | Delete
/* text color - form instructions */
[424] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_password_label_color', array(
[425] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_COLOR,
[426] Fix | Delete
) );
[427] Fix | Delete
[428] Fix | Delete
$wp_customize->add_control(
[429] Fix | Delete
new \WP_Customize_Color_Control(
[430] Fix | Delete
$wp_customize,
[431] Fix | Delete
'ppwp_form_instructions_password_label_color_control', array(
[432] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[433] Fix | Delete
'section' => 'ppwp_form_instructions',
[434] Fix | Delete
'settings' => 'ppwp_form_instructions_password_label_color',
[435] Fix | Delete
) )
[436] Fix | Delete
);
[437] Fix | Delete
[438] Fix | Delete
/* placeholder text */
[439] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_placeholder', array(
[440] Fix | Delete
'default' => __( PPW_Constants::DEFAULT_PLACEHOLDER, PPW_Constants::DOMAIN ),
[441] Fix | Delete
) );
[442] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_placeholder_control', array(
[443] Fix | Delete
'label' => __( 'Placeholder', PPW_Constants::DOMAIN ),
[444] Fix | Delete
'section' => 'ppwp_form_instructions',
[445] Fix | Delete
'settings' => 'ppwp_form_instructions_placeholder',
[446] Fix | Delete
'type' => 'text',
[447] Fix | Delete
) );
[448] Fix | Delete
[449] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_show_password_title' );
[450] Fix | Delete
$wp_customize->add_control(
[451] Fix | Delete
new PPW_Title_Group_Control(
[452] Fix | Delete
$wp_customize,
[453] Fix | Delete
'ppwp_form_instructions_show_password_title', array(
[454] Fix | Delete
'label' => __( 'Show Password', PPW_Constants::DOMAIN ),
[455] Fix | Delete
'section' => 'ppwp_form_instructions',
[456] Fix | Delete
'settings' => 'ppwp_form_instructions_show_password_title',
[457] Fix | Delete
'type' => 'control_title',
[458] Fix | Delete
) )
[459] Fix | Delete
);
[460] Fix | Delete
[461] Fix | Delete
/* password typing - form instructions */
[462] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_is_show_password', array(
[463] Fix | Delete
'default' => PPW_Constants::DEFAULT_IS_SHOW_PASSWORD,
[464] Fix | Delete
) );
[465] Fix | Delete
[466] Fix | Delete
$wp_customize->add_control(
[467] Fix | Delete
new PPW_Toggle_Control(
[468] Fix | Delete
$wp_customize,
[469] Fix | Delete
'ppwp_form_instructions_is_show_password_control', array(
[470] Fix | Delete
'label' => __( 'Show Password Reveal Button', PPW_Constants::DOMAIN ),
[471] Fix | Delete
'section' => 'ppwp_form_instructions',
[472] Fix | Delete
'type' => 'toggle',
[473] Fix | Delete
'settings' => 'ppwp_form_instructions_is_show_password',
[474] Fix | Delete
) )
[475] Fix | Delete
);
[476] Fix | Delete
[477] Fix | Delete
/* show password text */
[478] Fix | Delete
$wp_customize->add_setting( 'ppwp_form_instructions_show_password_text', array(
[479] Fix | Delete
'default' => PPW_Constants::DEFAULT_SHOW_PASSWORD_TEXT,
[480] Fix | Delete
) );
[481] Fix | Delete
[482] Fix | Delete
$wp_customize->add_control( 'ppwp_form_instructions_show_password_text_control', array(
[483] Fix | Delete
'label' => __( 'Button Text', PPW_Constants::DOMAIN ),
[484] Fix | Delete
'section' => 'ppwp_form_instructions',
[485] Fix | Delete
'settings' => 'ppwp_form_instructions_show_password_text',
[486] Fix | Delete
'type' => 'text',
[487] Fix | Delete
) );
[488] Fix | Delete
[489] Fix | Delete
do_action('ppw_customize_after_form_instructions', $wp_customize);
[490] Fix | Delete
[491] Fix | Delete
/* form error message section */
[492] Fix | Delete
$wp_customize->add_section( 'ppwp_form_error_message', array(
[493] Fix | Delete
'title' => __( 'Error Messages', PPW_Constants::DOMAIN ),
[494] Fix | Delete
'panel' => 'ppwp',
[495] Fix | Delete
'priority' => 200,
[496] Fix | Delete
) );
[497] Fix | Delete
[498] Fix | Delete
/* error message text */
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function