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/accelera.../install
File: index.php
<?php
[0] Fix | Delete
// Exit if accessed directly
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
/**
[5] Fix | Delete
* Merlin WP
[6] Fix | Delete
* Version 1.2.2
[7] Fix | Delete
*
[8] Fix | Delete
* Dual licensed under the MIT and GPL licenses:
[9] Fix | Delete
* copyright Copyright (c) 2017, Merlin WP of Inventionn LLC
[10] Fix | Delete
* http://www.opensource.org/licenses/mit-license.php
[11] Fix | Delete
* Licensed GPLv3 for open source use
[12] Fix | Delete
*
[13] Fix | Delete
* Thanks to Merlin WP Team, Richard Tabor, from ThemeBeans.com for some excellent contributions!
[14] Fix | Delete
*
[15] Fix | Delete
*
[16] Fix | Delete
* Merlin WP
[17] Fix | Delete
* Better WordPress Theme Onboarding
[18] Fix | Delete
*
[19] Fix | Delete
* The following code is a derivative work from the
[20] Fix | Delete
* Envato WordPress Theme Setup Wizard by David Baker.
[21] Fix | Delete
*
[22] Fix | Delete
* @package Merlin WP
[23] Fix | Delete
* @version @@pkg.version
[24] Fix | Delete
* @link https://merlinwp.com/
[25] Fix | Delete
* @author Richard Tabor, from ThemeBeans.com
[26] Fix | Delete
* @copyright Copyright (c) 2017, Merlin WP of Inventionn LLC
[27] Fix | Delete
* @license Licensed GPLv3 for open source use
[28] Fix | Delete
*/
[29] Fix | Delete
$redux_builder_amp = (array) get_option('redux_builder_amp');
[30] Fix | Delete
$ampLogo="";
[31] Fix | Delete
if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-media']['url']!=""){
[32] Fix | Delete
$ampLogo = '<br/><br/><img src="'.esc_url($redux_builder_amp['opt-media']['url']).'" class="amp_install_logo_preview" />';
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
$ampforwp_install_config = array(
[36] Fix | Delete
'installer_dir' => 'install',
[37] Fix | Delete
'plugin_title' => ucfirst( 'AMPforWP Installer' ),
[38] Fix | Delete
'start_steps' => 1,
[39] Fix | Delete
'total_steps' => 6,
[40] Fix | Delete
'installerpage' => 'ampforwptourinstaller',
[41] Fix | Delete
'dev_mode' => false,
[42] Fix | Delete
'steps' => array(
[43] Fix | Delete
1=>array(
[44] Fix | Delete
'title'=> esc_html__('Welcome','accelerated-mobile-pages'),
[45] Fix | Delete
'fields'=>'',
[46] Fix | Delete
'description'=>esc_html__('Welcome','This wizard will set up AMP on your website, install plugin, and import content. It is optional & should take only a few minutes.','accelerated-mobile-pages'),
[47] Fix | Delete
),
[48] Fix | Delete
2=>array(
[49] Fix | Delete
'title'=>esc_html__('Upload Logo','accelerated-mobile-pages'),
[50] Fix | Delete
'description'=>esc_html__('Recommend logo size is: 190x36','accelerated-mobile-pages'),
[51] Fix | Delete
'fields'=>'<li class="amp_install_center">
[52] Fix | Delete
<input type="hidden" value="" class="regular-text process_custom_images" id="process_custom_images" name="opt-media" value="">
[53] Fix | Delete
[54] Fix | Delete
<button type="button" class="set_custom_images merlin__button merlin__button--blue">Set Logo</button>
[55] Fix | Delete
'.$ampLogo.'
[56] Fix | Delete
</li>'
[57] Fix | Delete
),
[58] Fix | Delete
3=>array(
[59] Fix | Delete
'title'=>esc_html__('Select Pages','accelerated-mobile-pages'),
[60] Fix | Delete
'description'=>esc_html__('Where you would like to enable AMP.','accelerated-mobile-pages'),
[61] Fix | Delete
'fields'=>'<li class="merlin__drawer--import-content__list-item status status--pending">
[62] Fix | Delete
<input type="checkbox" class="checkbox" name="amp-on-off-for-all-posts" id="amp-on-posts" '.(ampforwp_get_setting('amp-on-off-for-all-posts')? 'checked': '').'>
[63] Fix | Delete
<label for="amp-on-posts">
[64] Fix | Delete
<i></i><span>Posts</span></label>
[65] Fix | Delete
</li>
[66] Fix | Delete
<li class="merlin__drawer--import-content__list-item status">
[67] Fix | Delete
<input type="checkbox" name="amp-on-off-for-all-pages" class="checkbox" id="amp-on-pages" value="1" '.(ampforwp_get_setting('amp-on-off-for-all-pages')? 'checked': '').'>
[68] Fix | Delete
<label for="amp-on-pages">
[69] Fix | Delete
<i></i><span>Pages</span></label>
[70] Fix | Delete
</li>
[71] Fix | Delete
<li class="merlin__drawer--import-content__list-item status">
[72] Fix | Delete
<input type="checkbox" name="ampforwp-homepage-on-off-support" class="checkbox" id="amp-on-home" value="1" '.(ampforwp_get_setting('ampforwp-homepage-on-off-support')? 'checked': '').'>
[73] Fix | Delete
<label for="amp-on-home">
[74] Fix | Delete
<i></i><span>Homepage</span></label>
[75] Fix | Delete
</li>
[76] Fix | Delete
[77] Fix | Delete
<li class="merlin__drawer--import-content__list-item status">
[78] Fix | Delete
<input type="checkbox" name="ampforwp-archive-support" class="checkbox" id="ampforwp-archive-support" value="1" '.(ampforwp_get_setting('ampforwp-archive-support')? 'checked': '').'>
[79] Fix | Delete
<label for="ampforwp-archive-support">
[80] Fix | Delete
<i></i><span>Category & Tags</span></label>
[81] Fix | Delete
</li>
[82] Fix | Delete
[83] Fix | Delete
',
[84] Fix | Delete
),
[85] Fix | Delete
4=>array(
[86] Fix | Delete
'title'=>esc_html__('Setup Analytics','accelerated-mobile-pages'),
[87] Fix | Delete
'description'=>esc_html__('Enter your Google Analytics Tracking code','accelerated-mobile-pages'),
[88] Fix | Delete
'fields'=>'<li class="amp_install_center">
[89] Fix | Delete
<input type="hidden" name="amp-analytics-select-option" value="1">
[90] Fix | Delete
<input type="text" name="ga-feild" id="ga-feild" value="'.(ampforwp_get_setting('ga-feild')? $redux_builder_amp['ga-feild'] : '').'">
[91] Fix | Delete
<label for="ga-feild"></label>
[92] Fix | Delete
</li>',
[93] Fix | Delete
),
[94] Fix | Delete
5=>array(
[95] Fix | Delete
'title'=>esc_html__('Select Design','accelerated-mobile-pages'),
[96] Fix | Delete
'description'=>'',
[97] Fix | Delete
'fields'=>'<li class="amp_install_center"><select name="amp-design-selector" id="ampforwp-design-select">
[98] Fix | Delete
<option value="1" '.(ampforwp_get_setting('amp-design-selector')==1? 'selected' : '').'>Design One</option>
[99] Fix | Delete
<option value="2" '.(ampforwp_get_setting('amp-design-selector')==2? 'selected' : '').'>Design Two</option>
[100] Fix | Delete
<option value="3" '.(ampforwp_get_setting('amp-design-selector')==3? 'selected' : '').'>Design Three</option>
[101] Fix | Delete
<option value="4" '.(ampforwp_get_setting('amp-design-selector')==4? 'selected' : '').'>Swift</option>
[102] Fix | Delete
</select>
[103] Fix | Delete
[104] Fix | Delete
<div>
[105] Fix | Delete
<img src="'.AMPFORWP_PLUGIN_DIR_URI.'/images/design-1.png" width="150" height="200" class="amp_install_theme_preview" id="design-1" style="'.(ampforwp_get_setting('amp-design-selector')==1 ? '': 'display:none' ).'">
[106] Fix | Delete
<img src="'.AMPFORWP_PLUGIN_DIR_URI.'/images/design-2.png" width="150" height="200" class="amp_install_theme_preview" id="design-2" style="'.(ampforwp_get_setting('amp-design-selector')==2 ? '': 'display:none' ).'">
[107] Fix | Delete
<img src="'.AMPFORWP_PLUGIN_DIR_URI.'/images/design-3.png" width="150" height="200" class="amp_install_theme_preview" id="design-3" style="'.(ampforwp_get_setting('amp-design-selector')==3 ? '': 'display:none' ).'">
[108] Fix | Delete
<img src="'.AMPFORWP_PLUGIN_DIR_URI.'/images/swift.png" width="150" height="200" class="amp_install_theme_preview" id="design-4" style="'.(ampforwp_get_setting('amp-design-selector')==4 ? '': 'display:none' ).'">
[109] Fix | Delete
</div>
[110] Fix | Delete
</li>',
[111] Fix | Delete
),
[112] Fix | Delete
6=>array(
[113] Fix | Delete
'title'=>esc_html__('Enjoy','accelerated-mobile-pages'),
[114] Fix | Delete
'description'=>esc_html__('Navigate to ','accelerated-mobile-pages'),
[115] Fix | Delete
'fields'=>'',
[116] Fix | Delete
),
[117] Fix | Delete
),
[118] Fix | Delete
'current_step'=>array(
[119] Fix | Delete
'title'=>'',
[120] Fix | Delete
'step_id'=>1
[121] Fix | Delete
)
[122] Fix | Delete
);
[123] Fix | Delete
add_action( 'admin_menu', 'ampforwp_add_admin_menu' );
[124] Fix | Delete
add_action( 'admin_init', 'ampforwp_installer_init');
[125] Fix | Delete
add_action( 'admin_footer', 'ampforwp_svg_sprite');
[126] Fix | Delete
add_action( 'wp_ajax_ampforwp_save_installer', 'ampforwp_save_steps_data', 10, 0 );
[127] Fix | Delete
function ampforwp_add_admin_menu(){
[128] Fix | Delete
global $ampforwp_install_config;
[129] Fix | Delete
ampforwp_installer_init();
[130] Fix | Delete
}
[131] Fix | Delete
[132] Fix | Delete
function ampforwp_installer_init(){
[133] Fix | Delete
// Exit if the user does not have proper permissions
[134] Fix | Delete
if(! current_user_can( 'manage_options' ) ) {
[135] Fix | Delete
return ;
[136] Fix | Delete
}
[137] Fix | Delete
[138] Fix | Delete
global $ampforwp_install_config;
[139] Fix | Delete
ampforwp_instller_admin_init();
[140] Fix | Delete
}
[141] Fix | Delete
[142] Fix | Delete
function ampforwp_instller_admin_init(){
[143] Fix | Delete
if(isset($_GET['ampforwp_install'], $_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], '_wpnonce') && $_GET['ampforwp_install']=='1'){
[144] Fix | Delete
ampforwp_steps_call();
[145] Fix | Delete
}
[146] Fix | Delete
}
[147] Fix | Delete
[148] Fix | Delete
function ampforwp_steps_call(){
[149] Fix | Delete
global $ampforwp_install_config;
[150] Fix | Delete
if ( !wp_verify_nonce($_GET['_wpnonce'], '_wpnonce') || empty( $_GET['page'] ) || $ampforwp_install_config['installerpage'] !== $_GET['page'] ) {
[151] Fix | Delete
return;
[152] Fix | Delete
}
[153] Fix | Delete
if ( ob_get_length() ) {
[154] Fix | Delete
ob_end_clean();
[155] Fix | Delete
}
[156] Fix | Delete
$step = isset( $_GET['step'] ) ? sanitize_text_field( wp_unslash(sanitize_key( $_GET['step'] ) ) ) : $ampforwp_install_config['start_steps'] ;
[157] Fix | Delete
$title = $ampforwp_install_config['steps'][$step]['title'];
[158] Fix | Delete
$ampforwp_install_config['current_step']['step_id'] = $step;
[159] Fix | Delete
[160] Fix | Delete
[161] Fix | Delete
// Use minified libraries if dev mode is turned on.
[162] Fix | Delete
$suffix = '';
[163] Fix | Delete
// Enqueue styles.
[164] Fix | Delete
wp_enqueue_style( 'ampforwp_install', esc_url(AMPFORWP_PLUGIN_DIR_URI. $ampforwp_install_config['installer_dir']. '/assets/css/merlin' . $suffix . '.css') , array( 'wp-admin' ), '0.1');
[165] Fix | Delete
// Enqueue javascript.
[166] Fix | Delete
wp_enqueue_script( 'ampforwp_install', esc_url(AMPFORWP_PLUGIN_DIR_URI. $ampforwp_install_config['installer_dir']. '/assets/js/merlin' . $suffix . '.js') , array( 'jquery-core' ), '0.1' );
[167] Fix | Delete
[168] Fix | Delete
wp_localize_script( 'ampforwp_install', 'ampforwp_install_params', array(
[169] Fix | Delete
'ajaxurl' => esc_url(admin_url( 'admin-ajax.php' )),
[170] Fix | Delete
'wpnonce' => wp_create_nonce( 'ampforwp_install_nonce' ),
[171] Fix | Delete
'pluginurl' => esc_url(AMPFORWP_PLUGIN_DIR_URI),
[172] Fix | Delete
) );
[173] Fix | Delete
[174] Fix | Delete
[175] Fix | Delete
ob_start();
[176] Fix | Delete
ampforwp_install_header(); ?>
[177] Fix | Delete
<div class="merlin__wrapper">
[178] Fix | Delete
<div class="amp_install_wizard"><?php echo esc_html__('AMP Installation Wizard','accelerated-mobile-pages'); ?></div>
[179] Fix | Delete
<div class="merlin__content merlin__content--<?php echo esc_attr( strtolower( $title ) ); ?>">
[180] Fix | Delete
[181] Fix | Delete
<?php
[182] Fix | Delete
// Content Handlers.
[183] Fix | Delete
$show_content = true;
[184] Fix | Delete
[185] Fix | Delete
if ( $show_content ) {
[186] Fix | Delete
ampforwp_show_steps_body();
[187] Fix | Delete
} ?>
[188] Fix | Delete
[189] Fix | Delete
<?php step_output_bottom_dots(); ?>
[190] Fix | Delete
[191] Fix | Delete
</div>
[192] Fix | Delete
[193] Fix | Delete
<?php echo sprintf( '<a class="return-to-dashboard" href="%s">%s</a>', esc_url( admin_url( 'admin.php?page=amp_options' ) ), esc_html__( 'Return to dashboard','accelerated-mobile-pages' ) ); ?>
[194] Fix | Delete
[195] Fix | Delete
</div>
[196] Fix | Delete
[197] Fix | Delete
<?php ampforwp_install_footer();
[198] Fix | Delete
exit;
[199] Fix | Delete
}
[200] Fix | Delete
[201] Fix | Delete
function ampforwp_show_steps_body(){
[202] Fix | Delete
global $ampforwp_install_config;
[203] Fix | Delete
if($ampforwp_install_config['total_steps']==$ampforwp_install_config['current_step']['step_id']){
[204] Fix | Delete
call_user_func('ampforwp_finish_page');
[205] Fix | Delete
}else{
[206] Fix | Delete
if(function_exists('step'.$ampforwp_install_config['current_step']['step_id'])){
[207] Fix | Delete
call_user_func('step'.$ampforwp_install_config['current_step']['step_id']);
[208] Fix | Delete
}else{
[209] Fix | Delete
call_user_func('ampforwp_finish_page');
[210] Fix | Delete
}
[211] Fix | Delete
}
[212] Fix | Delete
}
[213] Fix | Delete
[214] Fix | Delete
[215] Fix | Delete
function step1(){
[216] Fix | Delete
global $ampforwp_install_config;
[217] Fix | Delete
$stepDetails = $ampforwp_install_config['steps'][$ampforwp_install_config['current_step']['step_id']];
[218] Fix | Delete
?>
[219] Fix | Delete
<div class="merlin__content--transition">
[220] Fix | Delete
[221] Fix | Delete
<div class="amp_branding"></div>
[222] Fix | Delete
<svg class="icon icon--checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
[223] Fix | Delete
<circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
[224] Fix | Delete
</svg>
[225] Fix | Delete
[226] Fix | Delete
<h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
[227] Fix | Delete
[228] Fix | Delete
<p><?php echo esc_html__( 'This Installation Wizard helps you to setup the necessary options for AMP. It is optional & should take only a few minutes.' ,'accelerated-mobile-pages'); ?></p>
[229] Fix | Delete
[230] Fix | Delete
</div>
[231] Fix | Delete
[232] Fix | Delete
<footer class="merlin__content__footer">
[233] Fix | Delete
<a href="<?php echo esc_url( admin_url( 'admin.php?page=amp_options' ) ); ?>" class="merlin__button merlin__button--skip"><?php echo esc_html__( 'Cancel','accelerated-mobile-pages' ); ?></a>
[234] Fix | Delete
[235] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--next merlin__button--proceed merlin__button--colorchange"><?php echo esc_html__( 'Start','accelerated-mobile-pages' ); ?></a>
[236] Fix | Delete
<?php wp_nonce_field( 'ampforwp_install_nonce' ); ?>
[237] Fix | Delete
</footer>
[238] Fix | Delete
<?php
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
function step2(){
[242] Fix | Delete
global $ampforwp_install_config;
[243] Fix | Delete
$stepDetails = $ampforwp_install_config['steps'][$ampforwp_install_config['current_step']['step_id']];
[244] Fix | Delete
[245] Fix | Delete
?>
[246] Fix | Delete
[247] Fix | Delete
<div class="merlin__content--transition">
[248] Fix | Delete
[249] Fix | Delete
<div class="amp_branding"></div>
[250] Fix | Delete
<svg class="icon icon--checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
[251] Fix | Delete
<circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
[252] Fix | Delete
</svg>
[253] Fix | Delete
[254] Fix | Delete
<h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
[255] Fix | Delete
[256] Fix | Delete
<p><?php echo isset($stepDetails['description'])? esc_html__($stepDetails['description'],'accelerated-mobile-pages') : ''; ?></p>
[257] Fix | Delete
[258] Fix | Delete
</div>
[259] Fix | Delete
<form action="" method="post">
[260] Fix | Delete
[261] Fix | Delete
<ul class="merlin__drawer--import-content">
[262] Fix | Delete
[263] Fix | Delete
<?php
[264] Fix | Delete
wp_enqueue_media ();
[265] Fix | Delete
echo $stepDetails['fields']; // escaped above
[266] Fix | Delete
?>
[267] Fix | Delete
[268] Fix | Delete
</ul>
[269] Fix | Delete
[270] Fix | Delete
[271] Fix | Delete
<footer class="merlin__content__footer">
[272] Fix | Delete
<?php ampforwp_skip_button(); ?>
[273] Fix | Delete
[274] Fix | Delete
<a id="skip" href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--skip merlin__button--proceed"><?php echo esc_html__( 'Skip','accelerated-mobile-pages' ); ?></a>
[275] Fix | Delete
[276] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--next button-next" data-callback="save_logo">
[277] Fix | Delete
<span class="merlin__button--loading__text"><?php echo esc_html__( 'Save' ,'accelerated-mobile-pages'); ?></span><?php echo ampforwp_loading_spinner(); ?>
[278] Fix | Delete
</a>
[279] Fix | Delete
[280] Fix | Delete
<?php wp_nonce_field( 'ampforwp_install_nonce' ); ?>
[281] Fix | Delete
</footer>
[282] Fix | Delete
</form>
[283] Fix | Delete
<?php
[284] Fix | Delete
}
[285] Fix | Delete
[286] Fix | Delete
function step3(){
[287] Fix | Delete
global $ampforwp_install_config;
[288] Fix | Delete
$stepDetails = $ampforwp_install_config['steps'][$ampforwp_install_config['current_step']['step_id']];
[289] Fix | Delete
?>
[290] Fix | Delete
[291] Fix | Delete
<div class="merlin__content--transition">
[292] Fix | Delete
[293] Fix | Delete
<div class="amp_branding"></div>
[294] Fix | Delete
<svg class="icon icon--checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
[295] Fix | Delete
<circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
[296] Fix | Delete
</svg>
[297] Fix | Delete
[298] Fix | Delete
<h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
[299] Fix | Delete
[300] Fix | Delete
<p><?php echo isset($stepDetails['description'])? esc_html__($stepDetails['description'],'accelerated-mobile-pages') : ''; ?></p>
[301] Fix | Delete
[302] Fix | Delete
[303] Fix | Delete
</div>
[304] Fix | Delete
<form action="" method="post">
[305] Fix | Delete
[306] Fix | Delete
<ul class="merlin__drawer--import-content">
[307] Fix | Delete
<?php
[308] Fix | Delete
echo $stepDetails['fields']; // escaped above
[309] Fix | Delete
?>
[310] Fix | Delete
[311] Fix | Delete
</ul>
[312] Fix | Delete
[313] Fix | Delete
[314] Fix | Delete
<footer class="merlin__content__footer">
[315] Fix | Delete
<?php ampforwp_skip_button(); ?>
[316] Fix | Delete
[317] Fix | Delete
<a id="skip" href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--skip merlin__button--proceed"><?php echo esc_html__( 'Skip','accelerated-mobile-pages' ); ?></a>
[318] Fix | Delete
[319] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--next button-next" data-callback="save_logo">
[320] Fix | Delete
<span class="merlin__button--loading__text"><?php echo esc_html__( 'Save','accelerated-mobile-pages' ); ?></span><?php echo ampforwp_loading_spinner(); ?>
[321] Fix | Delete
</a>
[322] Fix | Delete
[323] Fix | Delete
[324] Fix | Delete
<?php wp_nonce_field( 'ampforwp_install_nonce' ); ?>
[325] Fix | Delete
</footer>
[326] Fix | Delete
</form>
[327] Fix | Delete
<?php
[328] Fix | Delete
}
[329] Fix | Delete
[330] Fix | Delete
function step4(){
[331] Fix | Delete
global $ampforwp_install_config;
[332] Fix | Delete
$stepDetails = $ampforwp_install_config['steps'][$ampforwp_install_config['current_step']['step_id']];
[333] Fix | Delete
?>
[334] Fix | Delete
[335] Fix | Delete
<div class="merlin__content--transition">
[336] Fix | Delete
[337] Fix | Delete
<div class="amp_branding"></div>
[338] Fix | Delete
<svg class="icon icon--checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
[339] Fix | Delete
<circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
[340] Fix | Delete
</svg>
[341] Fix | Delete
[342] Fix | Delete
<h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
[343] Fix | Delete
[344] Fix | Delete
<p><?php echo isset($stepDetails['description'])? esc_html__($stepDetails['description'],'accelerated-mobile-pages') : ''; ?></p>
[345] Fix | Delete
</div>
[346] Fix | Delete
<form action="" method="post">
[347] Fix | Delete
[348] Fix | Delete
<ul class="merlin__drawer--import-content">
[349] Fix | Delete
<li>
[350] Fix | Delete
<?php
[351] Fix | Delete
echo $stepDetails['fields']; // escaped above
[352] Fix | Delete
?>
[353] Fix | Delete
</li>
[354] Fix | Delete
</ul>
[355] Fix | Delete
[356] Fix | Delete
[357] Fix | Delete
<footer class="merlin__content__footer">
[358] Fix | Delete
<?php ampforwp_skip_button(); ?>
[359] Fix | Delete
[360] Fix | Delete
<a id="skip" href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--skip merlin__button--proceed"><?php echo esc_html__( 'Skip','accelerated-mobile-pages' ); ?></a>
[361] Fix | Delete
[362] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--next button-next" data-callback="save_logo">
[363] Fix | Delete
<span class="merlin__button--loading__text"><?php echo esc_html__( 'Save','accelerated-mobile-pages' ); ?></span><?php echo ampforwp_loading_spinner(); ?>
[364] Fix | Delete
</a>
[365] Fix | Delete
[366] Fix | Delete
[367] Fix | Delete
<?php wp_nonce_field( 'ampforwp_install_nonce' ); ?>
[368] Fix | Delete
</footer>
[369] Fix | Delete
</form>
[370] Fix | Delete
<?php
[371] Fix | Delete
}
[372] Fix | Delete
[373] Fix | Delete
function step5(){
[374] Fix | Delete
global $ampforwp_install_config;
[375] Fix | Delete
$stepDetails = $ampforwp_install_config['steps'][$ampforwp_install_config['current_step']['step_id']];
[376] Fix | Delete
?>
[377] Fix | Delete
[378] Fix | Delete
<div class="merlin__content--transition">
[379] Fix | Delete
[380] Fix | Delete
<div class="amp_branding"></div>
[381] Fix | Delete
<svg class="icon icon--checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
[382] Fix | Delete
<circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
[383] Fix | Delete
</svg>
[384] Fix | Delete
[385] Fix | Delete
<h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
[386] Fix | Delete
[387] Fix | Delete
<p><?php echo isset($stepDetails['description'])? esc_html__($stepDetails['description'],'accelerated-mobile-pages') : ''; ?></p>
[388] Fix | Delete
[389] Fix | Delete
[390] Fix | Delete
[391] Fix | Delete
</div>
[392] Fix | Delete
<form action="" method="post">
[393] Fix | Delete
[394] Fix | Delete
<ul class="merlin__drawer--import-content">
[395] Fix | Delete
<?php
[396] Fix | Delete
echo $stepDetails['fields']; // escaped above
[397] Fix | Delete
?>
[398] Fix | Delete
</ul>
[399] Fix | Delete
[400] Fix | Delete
[401] Fix | Delete
<footer class="merlin__content__footer">
[402] Fix | Delete
<?php ampforwp_skip_button(); ?>
[403] Fix | Delete
[404] Fix | Delete
<a id="skip" href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--skip merlin__button--proceed"><?php echo esc_html__( 'Skip','accelerated-mobile-pages' ); ?></a>
[405] Fix | Delete
[406] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--next button-next" data-callback="save_logo">
[407] Fix | Delete
<span class="merlin__button--loading__text"><?php echo esc_html__( 'Save','accelerated-mobile-pages' ); ?></span><?php echo ampforwp_loading_spinner(); ?>
[408] Fix | Delete
</a>
[409] Fix | Delete
[410] Fix | Delete
<?php wp_nonce_field( 'ampforwp_install_nonce' ); ?>
[411] Fix | Delete
</footer>
[412] Fix | Delete
</form>
[413] Fix | Delete
<?php
[414] Fix | Delete
}
[415] Fix | Delete
[416] Fix | Delete
[417] Fix | Delete
[418] Fix | Delete
[419] Fix | Delete
[420] Fix | Delete
[421] Fix | Delete
[422] Fix | Delete
[423] Fix | Delete
[424] Fix | Delete
function ampforwp_save_steps_data(){
[425] Fix | Delete
if(!wp_verify_nonce( $_REQUEST['wpnonce'], 'ampforwp_install_nonce' ) ) {
[426] Fix | Delete
echo wp_json_encode(array("status"=>300,"message"=>esc_html__('Request not valid','accelerated-mobile-pages')));
[427] Fix | Delete
die;
[428] Fix | Delete
}
[429] Fix | Delete
// Exit if the user does not have proper permissions
[430] Fix | Delete
if(! current_user_can( 'manage_options' ) ) {
[431] Fix | Delete
return ;
[432] Fix | Delete
}
[433] Fix | Delete
$redux_builder_amp = get_option('redux_builder_amp');
[434] Fix | Delete
if($redux_builder_amp!=''){
[435] Fix | Delete
foreach($_POST as $postKey=>$postValue){
[436] Fix | Delete
if($postKey=='opt-media' && $postValue!=""){
[437] Fix | Delete
[438] Fix | Delete
$postValue = json_decode(stripcslashes($postValue),true);
[439] Fix | Delete
$redux_builder_amp[$postKey] = sanitize_text_field($postValue);
[440] Fix | Delete
}elseif(isset($redux_builder_amp[$postKey]) && $postValue!=""){
[441] Fix | Delete
$redux_builder_amp[$postKey] = sanitize_text_field($postValue);
[442] Fix | Delete
}
[443] Fix | Delete
}
[444] Fix | Delete
}
[445] Fix | Delete
update_option('redux_builder_amp',$redux_builder_amp);
[446] Fix | Delete
wp_send_json(
[447] Fix | Delete
array(
[448] Fix | Delete
'done' => 1,
[449] Fix | Delete
'message' => "Stored Successfully",
[450] Fix | Delete
)
[451] Fix | Delete
);
[452] Fix | Delete
}
[453] Fix | Delete
[454] Fix | Delete
[455] Fix | Delete
function ampforwp_skip_button(){
[456] Fix | Delete
?>
[457] Fix | Delete
<a href="<?php echo esc_url( ampforwp_step_next_link() ); ?>" class="merlin__button merlin__button--skip"><?php echo esc_html__( 'Skip','accelerated-mobile-pages' ); ?></a>
[458] Fix | Delete
<?php
[459] Fix | Delete
}
[460] Fix | Delete
function ampforwp_finish_page() {
[461] Fix | Delete
global $ampforwp_install_config;
[462] Fix | Delete
// Theme Name.
[463] Fix | Delete
$plugin_title = $ampforwp_install_config['plugin_title'];
[464] Fix | Delete
// Strings passed in from the config file.
[465] Fix | Delete
$strings = null;
[466] Fix | Delete
[467] Fix | Delete
[468] Fix | Delete
$allowed_html_array = array(
[469] Fix | Delete
'a' => array(
[470] Fix | Delete
'href' => array(),
[471] Fix | Delete
'title' => array(),
[472] Fix | Delete
'target' => array(),
[473] Fix | Delete
),
[474] Fix | Delete
);
[475] Fix | Delete
[476] Fix | Delete
update_option( 'ampforwp_installer_completed', time() ); ?>
[477] Fix | Delete
[478] Fix | Delete
<div class="merlin__content--transition">
[479] Fix | Delete
[480] Fix | Delete
<div class="amp_branding"></div>
[481] Fix | Delete
[482] Fix | Delete
<h1><?php echo esc_html__( 'Setup Done. Have fun!','accelerated-mobile-pages' ); ?></h1>
[483] Fix | Delete
[484] Fix | Delete
<p><?php echo wp_kses( 'Basic Setup has been done. Navigate to AMP options panel to access all the options.','ampforwp_install' ); ?></p>
[485] Fix | Delete
[486] Fix | Delete
</div>
[487] Fix | Delete
[488] Fix | Delete
<footer class="merlin__content__footer merlin__content__footer--fullwidth">
[489] Fix | Delete
[490] Fix | Delete
<a href="<?php echo esc_url( admin_url( 'admin.php?page=amp_options' ) ); ?>" class="merlin__button merlin__button--blue merlin__button--fullwidth merlin__button--popin"><?php echo esc_html__( 'Let\'s Go','accelerated-mobile-pages' ); ?></a>
[491] Fix | Delete
[492] Fix | Delete
[493] Fix | Delete
<ul class="merlin__drawer merlin__drawer--extras">
[494] Fix | Delete
[495] Fix | Delete
<li><?php //echo wp_kses( $link_1, $allowed_html_array ); ?></li>
[496] Fix | Delete
<li><?php //echo wp_kses( $link_2, $allowed_html_array ); ?></li>
[497] Fix | Delete
<li><?php //echo wp_kses( $link_3, $allowed_html_array ); ?></li>
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function