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-pcp.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! class_exists( 'PPW_Customizer_PCP' ) ) {
[2] Fix | Delete
class PPW_Customizer_PCP {
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Instance of PPW_Pro_Shortcode class.
[6] Fix | Delete
*
[7] Fix | Delete
* @var PPW_Customizer_PCP
[8] Fix | Delete
*/
[9] Fix | Delete
protected static $instance = null;
[10] Fix | Delete
[11] Fix | Delete
const PANEL = 'ppwp_pcp';
[12] Fix | Delete
const GENERAL_SECTION = 'ppwp_pcp_form';
[13] Fix | Delete
const FORM_SECTION = 'ppwp_pcp_form';
[14] Fix | Delete
const ERR_MSG_SECTION = 'ppwp_pcp_err_msg';
[15] Fix | Delete
const BUTTON_SECTION = 'ppwp_pcp_button';
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Get instance of PPW_Customizer
[19] Fix | Delete
*
[20] Fix | Delete
* @return PPW_Customizer_PCP
[21] Fix | Delete
*/
[22] Fix | Delete
public static function get_instance() {
[23] Fix | Delete
if ( is_null( self::$instance ) ) {
[24] Fix | Delete
// Use static instead of self due to the inheritance later.
[25] Fix | Delete
// For example: ChildSC extends this class, when we call get_instance
[26] Fix | Delete
// it will return the object of child class. On the other hand, self function
[27] Fix | Delete
// will return the object of base class.
[28] Fix | Delete
self::$instance = new static();
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
return self::$instance;
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
public function register() {
[35] Fix | Delete
add_action( 'customize_register', array( $this, 'customize_register' ), 15 );
[36] Fix | Delete
add_action( 'wp_head', array( $this, 'dynamic_styles' ) );
[37] Fix | Delete
add_filter( 'ppw_pcp_attributes', array( $this, 'load_customizer_attributes' ) );
[38] Fix | Delete
add_filter( 'ppw_validated_pcp_password', array( $this, 'load_customizer_err_msg' ), 10, 3 );
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Load customizer attributes.
[43] Fix | Delete
*
[44] Fix | Delete
* @param array $attrs Attributes
[45] Fix | Delete
*
[46] Fix | Delete
* @return array
[47] Fix | Delete
*/
[48] Fix | Delete
public function load_customizer_attributes( $attrs ) {
[49] Fix | Delete
$attrs['headline'] = get_theme_mod( 'ppwp_pcp_form_headline', PPW_Constants::DEFAULT_SHORTCODE_HEADLINE );
[50] Fix | Delete
$attrs['description'] = get_theme_mod( 'ppwp_pcp_form_description', PPW_Constants::DEFAULT_SHORTCODE_DESCRIPTION );
[51] Fix | Delete
$attrs['label'] = get_theme_mod( 'ppwp_pcp_form_label', PPW_Constants::DEFAULT_SHORTCODE_LABEL );
[52] Fix | Delete
$attrs['placeholder'] = get_theme_mod( 'ppwp_pcp_form_placeholder', '' );
[53] Fix | Delete
$attrs['error_msg'] = get_theme_mod( 'ppwp_pcp_err_msg_text', PPW_Constants::DEFAULT_SHORTCODE_ERROR_MSG );
[54] Fix | Delete
$attrs['button'] = get_theme_mod( 'ppwp_pcp_button_text', PPW_Constants::DEFAULT_SHORTCODE_BUTTON );
[55] Fix | Delete
$attrs['loading'] = get_theme_mod( 'ppwp_pcp_button_loading_text', PPW_Constants::DEFAULT_SHORTCODE_LOADING );
[56] Fix | Delete
$attrs['show_password'] = get_theme_mod( 'ppwp_pcp_form_is_show_password', PPW_Constants::DEFAULT_SHORTCODE_SHOW_PASSWORD );
[57] Fix | Delete
$attrs['show_password_text'] = get_theme_mod( 'ppwp_pcp_form_show_password_text', PPW_Constants::DEFAULT_SHORTCODE_SHOW_PASSWORD_TEXT );
[58] Fix | Delete
// $attrs['desc_above_btn'] = get_theme_mod( 'ppwp_pcp_description_above_btn', PPW_Constants::DEFAULT_SHORTCODE_DESC_ABOVE_PWD_BTN );
[59] Fix | Delete
$attrs['desc_below_form'] = get_theme_mod( 'ppwp_pcp_description_below_form', PPW_Constants::DEFAULT_SHORTCODE_DESC_BELOW_PWD_FORM );
[60] Fix | Delete
[61] Fix | Delete
return $attrs;
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
/**
[65] Fix | Delete
* Load customizer error message.
[66] Fix | Delete
*
[67] Fix | Delete
* @param array $attrs Attributes.
[68] Fix | Delete
* @param string $password Password.
[69] Fix | Delete
* @param array $parsed_attrs Parsed attributes.
[70] Fix | Delete
*
[71] Fix | Delete
* @return array
[72] Fix | Delete
*/
[73] Fix | Delete
public function load_customizer_err_msg( $attrs, $password, $parsed_attrs ) {
[74] Fix | Delete
if ( isset( $parsed_attrs['error_msg'] ) ) {
[75] Fix | Delete
return $attrs;
[76] Fix | Delete
}
[77] Fix | Delete
if ( isset( $attrs['is_valid_password'] ) && ! $attrs['is_valid_password'] ) {
[78] Fix | Delete
$attrs['message'] = get_theme_mod( 'ppwp_pcp_err_msg_text', PPW_Constants::DEFAULT_SHORTCODE_ERROR_MSG );
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
return $attrs;
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* Register customizer.
[86] Fix | Delete
*
[87] Fix | Delete
* @param WP_Customize $wp_customize WP Customize class.
[88] Fix | Delete
*/
[89] Fix | Delete
public function customize_register( $wp_customize ) {
[90] Fix | Delete
if ( ! class_exists( 'PPW_Title_Group_Control' ) ) {
[91] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-title-group-control.php';
[92] Fix | Delete
}
[93] Fix | Delete
if ( ! class_exists( 'PPW_Toggle_Control' ) ) {
[94] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-toggle-control.php';
[95] Fix | Delete
}
[96] Fix | Delete
if ( ! class_exists( 'PPW_Text_Editor_Custom_Control' ) ) {
[97] Fix | Delete
include PPW_DIR_PATH . 'includes/customizers/class-ppw-text-editor-control.php';
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
$wp_customize->add_panel(
[101] Fix | Delete
self::PANEL,
[102] Fix | Delete
array(
[103] Fix | Delete
'priority' => 9990,
[104] Fix | Delete
'capability' => 'edit_theme_options',
[105] Fix | Delete
'theme_supports' => '',
[106] Fix | Delete
'title' => __( 'PPWP Partial Protection Form', PPW_Constants::DOMAIN ),
[107] Fix | Delete
)
[108] Fix | Delete
);
[109] Fix | Delete
[110] Fix | Delete
$this->append_form_section( $wp_customize );
[111] Fix | Delete
$this->append_err_msg_section( $wp_customize );
[112] Fix | Delete
$this->append_button_section( $wp_customize );
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
/**
[116] Fix | Delete
* Append form section.
[117] Fix | Delete
*
[118] Fix | Delete
* @param WP_Customize $wp_customize WP Customize class.
[119] Fix | Delete
*/
[120] Fix | Delete
public function append_form_section( $wp_customize ) {
[121] Fix | Delete
$wp_customize->add_section(
[122] Fix | Delete
self::FORM_SECTION,
[123] Fix | Delete
array(
[124] Fix | Delete
'title' => __( 'Password Form', PPW_Constants::DOMAIN ),
[125] Fix | Delete
'panel' => self::PANEL,
[126] Fix | Delete
'priority' => 10,
[127] Fix | Delete
)
[128] Fix | Delete
);
[129] Fix | Delete
[130] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_background_title' );
[131] Fix | Delete
$wp_customize->add_control(
[132] Fix | Delete
new PPW_Title_Group_Control(
[133] Fix | Delete
$wp_customize,
[134] Fix | Delete
'ppwp_pcp_form_background_title', array(
[135] Fix | Delete
'label' => __( 'Background', PPW_Constants::DOMAIN ),
[136] Fix | Delete
'section' => self::FORM_SECTION,
[137] Fix | Delete
'settings' => 'ppwp_pcp_form_background_title',
[138] Fix | Delete
'type' => 'control_title',
[139] Fix | Delete
'priority' => 0,
[140] Fix | Delete
) )
[141] Fix | Delete
);
[142] Fix | Delete
[143] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_background_color' );
[144] Fix | Delete
$wp_customize->add_control(
[145] Fix | Delete
new WP_Customize_Color_Control(
[146] Fix | Delete
$wp_customize,
[147] Fix | Delete
'ppwp_pcp_form_background_color_control',
[148] Fix | Delete
array(
[149] Fix | Delete
'label' => __( 'Form Background Color', PPW_Constants::DOMAIN ),
[150] Fix | Delete
'section' => self::FORM_SECTION,
[151] Fix | Delete
'settings' => 'ppwp_pcp_form_background_color',
[152] Fix | Delete
'priority' => 10,
[153] Fix | Delete
)
[154] Fix | Delete
)
[155] Fix | Delete
);
[156] Fix | Delete
[157] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_padding' );
[158] Fix | Delete
$wp_customize->add_control(
[159] Fix | Delete
'ppwp_pcp_form_padding_control',
[160] Fix | Delete
array(
[161] Fix | Delete
'label' => __( 'Padding', PPW_Constants::DOMAIN ),
[162] Fix | Delete
'description' => __( 'Padding in px', PPW_Constants::DOMAIN ),
[163] Fix | Delete
'section' => self::FORM_SECTION,
[164] Fix | Delete
'settings' => 'ppwp_pcp_form_padding',
[165] Fix | Delete
'type' => 'number',
[166] Fix | Delete
'priority' => 20,
[167] Fix | Delete
)
[168] Fix | Delete
);
[169] Fix | Delete
[170] Fix | Delete
/* form background border radius */
[171] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_border_radius', array(
[172] Fix | Delete
'default' => PPW_Constants::DEFAULT_FORM_BORDER_RADIUS,
[173] Fix | Delete
) );
[174] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_border_radius_control', array(
[175] Fix | Delete
'label' => __( 'Border Radius', PPW_Constants::DOMAIN ),
[176] Fix | Delete
'section' => self::GENERAL_SECTION,
[177] Fix | Delete
'description' => 'Border Radius in px',
[178] Fix | Delete
'settings' => 'ppwp_pcp_form_border_radius',
[179] Fix | Delete
'type' => 'number',
[180] Fix | Delete
'priority' => 40,
[181] Fix | Delete
) );
[182] Fix | Delete
[183] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_headline_title' );
[184] Fix | Delete
$wp_customize->add_control(
[185] Fix | Delete
new PPW_Title_Group_Control(
[186] Fix | Delete
$wp_customize,
[187] Fix | Delete
'ppwp_pcp_form_headline_title', array(
[188] Fix | Delete
'label' => __( 'Headline', PPW_Constants::DOMAIN ),
[189] Fix | Delete
'section' => self::GENERAL_SECTION,
[190] Fix | Delete
'settings' => 'ppwp_pcp_form_headline_title',
[191] Fix | Delete
'type' => 'control_title',
[192] Fix | Delete
'priority' => 50,
[193] Fix | Delete
) )
[194] Fix | Delete
);
[195] Fix | Delete
[196] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_headline', array(
[197] Fix | Delete
'default' => PPW_Constants::DEFAULT_SHORTCODE_HEADLINE,
[198] Fix | Delete
) );
[199] Fix | Delete
$wp_customize->add_control(
[200] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[201] Fix | Delete
$wp_customize,
[202] Fix | Delete
'ppwp_pcp_form_headline',
[203] Fix | Delete
array(
[204] Fix | Delete
'label' => __( 'Headline', PPW_Constants::DOMAIN ),
[205] Fix | Delete
'section' => self::GENERAL_SECTION,
[206] Fix | Delete
'settings' => 'ppwp_pcp_form_headline',
[207] Fix | Delete
'type' => 'textarea',
[208] Fix | Delete
'priority' => 60,
[209] Fix | Delete
)
[210] Fix | Delete
)
[211] Fix | Delete
);
[212] Fix | Delete
[213] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_headline_font_size', array(
[214] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_SIZE,
[215] Fix | Delete
) );
[216] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_headline_font_size_control', array(
[217] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[218] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[219] Fix | Delete
'section' => self::GENERAL_SECTION,
[220] Fix | Delete
'settings' => 'ppwp_pcp_form_headline_font_size',
[221] Fix | Delete
'type' => 'number',
[222] Fix | Delete
'priority' => 70,
[223] Fix | Delete
) );
[224] Fix | Delete
[225] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_headline_font_weight', array(
[226] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_WEIGHT,
[227] Fix | Delete
) );
[228] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_headline_font_weight_control', array(
[229] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[230] Fix | Delete
'section' => self::GENERAL_SECTION,
[231] Fix | Delete
'settings' => 'ppwp_pcp_form_headline_font_weight',
[232] Fix | Delete
'type' => 'number',
[233] Fix | Delete
'priority' => 80,
[234] Fix | Delete
) );
[235] Fix | Delete
[236] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_headline_color', array(
[237] Fix | Delete
'default' => PPW_Constants::DEFAULT_HEADLINE_FONT_COLOR,
[238] Fix | Delete
) );
[239] Fix | Delete
$wp_customize->add_control(
[240] Fix | Delete
new \WP_Customize_Color_Control(
[241] Fix | Delete
$wp_customize,
[242] Fix | Delete
'ppwp_pcp_form_headline_color_control', array(
[243] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[244] Fix | Delete
'section' => self::GENERAL_SECTION,
[245] Fix | Delete
'settings' => 'ppwp_pcp_form_headline_color',
[246] Fix | Delete
'priority' => 90,
[247] Fix | Delete
) )
[248] Fix | Delete
);
[249] Fix | Delete
[250] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_title' );
[251] Fix | Delete
$wp_customize->add_control(
[252] Fix | Delete
new PPW_Title_Group_Control(
[253] Fix | Delete
$wp_customize,
[254] Fix | Delete
'ppwp_pcp_form_description_title', array(
[255] Fix | Delete
'label' => __( 'Description Above Form', PPW_Constants::DOMAIN ),
[256] Fix | Delete
'section' => self::GENERAL_SECTION,
[257] Fix | Delete
'settings' => 'ppwp_pcp_form_description_title',
[258] Fix | Delete
'type' => 'control_title',
[259] Fix | Delete
'priority' => 100,
[260] Fix | Delete
) )
[261] Fix | Delete
);
[262] Fix | Delete
[263] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description', array(
[264] Fix | Delete
'default' => PPW_Constants::DEFAULT_SHORTCODE_DESCRIPTION,
[265] Fix | Delete
) );
[266] Fix | Delete
$wp_customize->add_control(
[267] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[268] Fix | Delete
$wp_customize,
[269] Fix | Delete
'ppwp_pcp_form_description',
[270] Fix | Delete
array(
[271] Fix | Delete
'label' => __( 'Description', PPW_Constants::DOMAIN ),
[272] Fix | Delete
'section' => self::GENERAL_SECTION,
[273] Fix | Delete
'settings' => 'ppwp_pcp_form_description',
[274] Fix | Delete
'type' => 'textarea',
[275] Fix | Delete
'priority' => 110,
[276] Fix | Delete
)
[277] Fix | Delete
)
[278] Fix | Delete
);
[279] Fix | Delete
[280] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_font_size', array(
[281] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[282] Fix | Delete
) );
[283] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_description_font_size_control', array(
[284] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[285] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[286] Fix | Delete
'section' => self::GENERAL_SECTION,
[287] Fix | Delete
'settings' => 'ppwp_pcp_form_description_font_size',
[288] Fix | Delete
'type' => 'number',
[289] Fix | Delete
'priority' => 120,
[290] Fix | Delete
) );
[291] Fix | Delete
[292] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_font_weight', array(
[293] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[294] Fix | Delete
) );
[295] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_description_font_weight_control', array(
[296] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[297] Fix | Delete
'section' => self::GENERAL_SECTION,
[298] Fix | Delete
'settings' => 'ppwp_pcp_form_description_font_weight',
[299] Fix | Delete
'type' => 'number',
[300] Fix | Delete
'priority' => 130,
[301] Fix | Delete
) );
[302] Fix | Delete
[303] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_color', array(
[304] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_COLOR,
[305] Fix | Delete
) );
[306] Fix | Delete
$wp_customize->add_control(
[307] Fix | Delete
new \WP_Customize_Color_Control(
[308] Fix | Delete
$wp_customize,
[309] Fix | Delete
'ppwp_pcp_form_description_color_control', array(
[310] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[311] Fix | Delete
'section' => self::GENERAL_SECTION,
[312] Fix | Delete
'settings' => 'ppwp_pcp_form_description_color',
[313] Fix | Delete
'priority' => 140,
[314] Fix | Delete
) )
[315] Fix | Delete
);
[316] Fix | Delete
[317] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_desc_title' );
[318] Fix | Delete
$wp_customize->add_control(
[319] Fix | Delete
new PPW_Title_Group_Control(
[320] Fix | Delete
$wp_customize,
[321] Fix | Delete
'ppwp_pcp_form_desc_title',
[322] Fix | Delete
array(
[323] Fix | Delete
'label' => __( 'Description Below Form', PPW_Constants::DOMAIN ),
[324] Fix | Delete
'section' => 'ppwp_pcp_form',
[325] Fix | Delete
'settings' => 'ppwp_pcp_form_desc_title',
[326] Fix | Delete
'type' => 'control_title',
[327] Fix | Delete
'priority' => 145,
[328] Fix | Delete
)
[329] Fix | Delete
)
[330] Fix | Delete
);
[331] Fix | Delete
[332] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_description_below_form', array(
[333] Fix | Delete
'default' => PPW_Constants::DEFAULT_SHORTCODE_DESC_BELOW_PWD_FORM,
[334] Fix | Delete
) );
[335] Fix | Delete
$wp_customize->add_control(
[336] Fix | Delete
new PPW_Text_Editor_Custom_Control(
[337] Fix | Delete
$wp_customize,
[338] Fix | Delete
'ppwp_pcp_description_below_form', array(
[339] Fix | Delete
'label' => __( 'Description', PPW_Constants::DOMAIN ),
[340] Fix | Delete
'section' => self::GENERAL_SECTION,
[341] Fix | Delete
'settings' => 'ppwp_pcp_description_below_form',
[342] Fix | Delete
'type' => 'textarea',
[343] Fix | Delete
'priority' => 146,
[344] Fix | Delete
)
[345] Fix | Delete
) );
[346] Fix | Delete
[347] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_below_form_font_size', array(
[348] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[349] Fix | Delete
) );
[350] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_description_below_form_font_size_control', array(
[351] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[352] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[353] Fix | Delete
'section' => self::GENERAL_SECTION,
[354] Fix | Delete
'settings' => 'ppwp_pcp_form_description_below_form_font_size',
[355] Fix | Delete
'type' => 'number',
[356] Fix | Delete
'priority' => 147,
[357] Fix | Delete
) );
[358] Fix | Delete
[359] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_below_form_font_weight', array(
[360] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[361] Fix | Delete
) );
[362] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_description_below_form_font_weight_control', array(
[363] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[364] Fix | Delete
'section' => self::GENERAL_SECTION,
[365] Fix | Delete
'settings' => 'ppwp_pcp_form_description_below_form_font_weight',
[366] Fix | Delete
'type' => 'number',
[367] Fix | Delete
'priority' => 148,
[368] Fix | Delete
) );
[369] Fix | Delete
[370] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_description_below_form_color', array(
[371] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_COLOR,
[372] Fix | Delete
) );
[373] Fix | Delete
$wp_customize->add_control(
[374] Fix | Delete
new \WP_Customize_Color_Control(
[375] Fix | Delete
$wp_customize,
[376] Fix | Delete
'ppwp_pcp_form_description_below_form_color_control', array(
[377] Fix | Delete
'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[378] Fix | Delete
'section' => self::GENERAL_SECTION,
[379] Fix | Delete
'settings' => 'ppwp_pcp_form_description_below_form_color',
[380] Fix | Delete
'priority' => 149,
[381] Fix | Delete
) )
[382] Fix | Delete
);
[383] Fix | Delete
[384] Fix | Delete
// $wp_customize->add_setting( 'ppwp_pcp_desc_above_btn' );
[385] Fix | Delete
// $wp_customize->add_control(
[386] Fix | Delete
// new PPW_Title_Group_Control(
[387] Fix | Delete
// $wp_customize,
[388] Fix | Delete
// 'ppwp_pcp_desc_above_btn',
[389] Fix | Delete
// array(
[390] Fix | Delete
// 'label' => __( 'Description Above Button', PPW_Constants::DOMAIN ),
[391] Fix | Delete
// 'section' => 'ppwp_pcp_form',
[392] Fix | Delete
// 'settings' => 'ppwp_pcp_desc_above_btn',
[393] Fix | Delete
// 'type' => 'control_title',
[394] Fix | Delete
// 'priority' => 150,
[395] Fix | Delete
// )
[396] Fix | Delete
// )
[397] Fix | Delete
// );
[398] Fix | Delete
[399] Fix | Delete
[400] Fix | Delete
// $wp_customize->add_setting( 'ppwp_pcp_description_above_btn', array(
[401] Fix | Delete
// 'default' => PPW_Constants::DEFAULT_SHORTCODE_DESC_ABOVE_PWD_BTN,
[402] Fix | Delete
// ) );
[403] Fix | Delete
// $wp_customize->add_control(
[404] Fix | Delete
// new PPW_Text_Editor_Custom_Control(
[405] Fix | Delete
// $wp_customize,
[406] Fix | Delete
// 'ppwp_pcp_description_above_btn',
[407] Fix | Delete
// array(
[408] Fix | Delete
// 'label' => __( 'Description', PPW_Constants::DOMAIN ),
[409] Fix | Delete
// 'section' => self::GENERAL_SECTION,
[410] Fix | Delete
// 'settings' => 'ppwp_pcp_description_above_btn',
[411] Fix | Delete
// 'type' => 'textarea',
[412] Fix | Delete
// 'priority' => 152,
[413] Fix | Delete
// )
[414] Fix | Delete
// )
[415] Fix | Delete
// );
[416] Fix | Delete
[417] Fix | Delete
// $wp_customize->add_setting( 'ppwp_pcp_form_description_above_btn_font_size', array(
[418] Fix | Delete
// 'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[419] Fix | Delete
// ) );
[420] Fix | Delete
// $wp_customize->add_control( 'ppwp_pcp_form_description_above_btn_font_size_control', array(
[421] Fix | Delete
// 'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[422] Fix | Delete
// 'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[423] Fix | Delete
// 'section' => self::GENERAL_SECTION,
[424] Fix | Delete
// 'settings' => 'ppwp_pcp_form_description_above_btn_font_size',
[425] Fix | Delete
// 'type' => 'number',
[426] Fix | Delete
// 'priority' => 153,
[427] Fix | Delete
// ) );
[428] Fix | Delete
[429] Fix | Delete
// $wp_customize->add_setting( 'ppwp_pcp_form_description_above_btn_font_weight', array(
[430] Fix | Delete
// 'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[431] Fix | Delete
// ) );
[432] Fix | Delete
// $wp_customize->add_control( 'ppwp_pcp_form_description_above_btn_font_weight_control', array(
[433] Fix | Delete
// 'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[434] Fix | Delete
// 'section' => self::GENERAL_SECTION,
[435] Fix | Delete
// 'settings' => 'ppwp_pcp_form_description_above_btn_font_weight',
[436] Fix | Delete
// 'type' => 'number',
[437] Fix | Delete
// 'priority' => 154,
[438] Fix | Delete
// ) );
[439] Fix | Delete
[440] Fix | Delete
// $wp_customize->add_setting( 'ppwp_pcp_form_description_above_btn_color', array(
[441] Fix | Delete
// 'default' => PPW_Constants::DEFAULT_TEXT_FONT_COLOR,
[442] Fix | Delete
// ) );
[443] Fix | Delete
// $wp_customize->add_control(
[444] Fix | Delete
// new \WP_Customize_Color_Control(
[445] Fix | Delete
// $wp_customize,
[446] Fix | Delete
// 'ppwp_pcp_form_description_above_btn_color_control', array(
[447] Fix | Delete
// 'label' => __( 'Text Color', PPW_Constants::DOMAIN ),
[448] Fix | Delete
// 'section' => self::GENERAL_SECTION,
[449] Fix | Delete
// 'settings' => 'ppwp_pcp_form_description_above_btn_color',
[450] Fix | Delete
// 'priority' => 155,
[451] Fix | Delete
// ) )
[452] Fix | Delete
// );
[453] Fix | Delete
[454] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_label_title' );
[455] Fix | Delete
$wp_customize->add_control(
[456] Fix | Delete
new PPW_Title_Group_Control(
[457] Fix | Delete
$wp_customize,
[458] Fix | Delete
'ppwp_pcp_form_label_title',
[459] Fix | Delete
array(
[460] Fix | Delete
'label' => __( 'Password Field', PPW_Constants::DOMAIN ),
[461] Fix | Delete
'section' => 'ppwp_pcp_form',
[462] Fix | Delete
'settings' => 'ppwp_pcp_form_label_title',
[463] Fix | Delete
'type' => 'control_title',
[464] Fix | Delete
'priority' => 159,
[465] Fix | Delete
)
[466] Fix | Delete
)
[467] Fix | Delete
);
[468] Fix | Delete
[469] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_label', array(
[470] Fix | Delete
'default' => PPW_Constants::DEFAULT_SHORTCODE_LABEL,
[471] Fix | Delete
) );
[472] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_label_control', array(
[473] Fix | Delete
'label' => __( 'Password Label', PPW_Constants::DOMAIN ),
[474] Fix | Delete
'section' => 'ppwp_pcp_form',
[475] Fix | Delete
'settings' => 'ppwp_pcp_form_label',
[476] Fix | Delete
'type' => 'text',
[477] Fix | Delete
'priority' => 160,
[478] Fix | Delete
) );
[479] Fix | Delete
[480] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_label_font_size', array(
[481] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_SIZE,
[482] Fix | Delete
) );
[483] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_label_font_size_control', array(
[484] Fix | Delete
'label' => __( 'Font Size', PPW_Constants::DOMAIN ),
[485] Fix | Delete
'description' => __( 'Font size in px', PPW_Constants::DOMAIN ),
[486] Fix | Delete
'section' => 'ppwp_pcp_form',
[487] Fix | Delete
'settings' => 'ppwp_pcp_form_label_font_size',
[488] Fix | Delete
'type' => 'number',
[489] Fix | Delete
'priority' => 170,
[490] Fix | Delete
) );
[491] Fix | Delete
[492] Fix | Delete
$wp_customize->add_setting( 'ppwp_pcp_form_label_font_weight', array(
[493] Fix | Delete
'default' => PPW_Constants::DEFAULT_TEXT_FONT_WEIGHT,
[494] Fix | Delete
) );
[495] Fix | Delete
$wp_customize->add_control( 'ppwp_pcp_form_label_font_weight_control', array(
[496] Fix | Delete
'label' => __( 'Font Weight', PPW_Constants::DOMAIN ),
[497] Fix | Delete
'section' => 'ppwp_pcp_form',
[498] Fix | Delete
'settings' => 'ppwp_pcp_form_label_font_weight',
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function