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.../pagebuil.../componen...
File: pbSettingTemplates.php
<?php // Exit if accessed directly.
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) exit;
[1] Fix | Delete
$arraySetting = array(
[2] Fix | Delete
'tabs'=> array(
[3] Fix | Delete
'layout'=>'Layout Directory',
[4] Fix | Delete
'save_layout'=>'Save layout',
[5] Fix | Delete
'export'=>'Import / Export',
[6] Fix | Delete
'advance'=>'Advance',
[7] Fix | Delete
),
[8] Fix | Delete
);
[9] Fix | Delete
global $layoutTemplate;
[10] Fix | Delete
global $savedlayoutTemplate;
[11] Fix | Delete
?>
[12] Fix | Delete
[13] Fix | Delete
<!-- template for the modal component -->
[14] Fix | Delete
<script type="text/x-template" id="amp-pagebuilder-modal-template">
[15] Fix | Delete
<transition name="amp-pagebuilder-modal">
[16] Fix | Delete
<div class="modal-mask">
[17] Fix | Delete
<div class="modal-wrapper">
[18] Fix | Delete
<div class="modal-container">
[19] Fix | Delete
<button type="button" class="media-modal-close" @click="hidePageBuilderPopUp()">
[20] Fix | Delete
<span class="media-modal-icon"></span>
[21] Fix | Delete
</button>
[22] Fix | Delete
<div class="modal-content">
[23] Fix | Delete
<div class="modal-sidebar">
[24] Fix | Delete
<ul>
[25] Fix | Delete
<?php
[26] Fix | Delete
foreach($arraySetting['tabs'] as $key=>$sidebarlink){
[27] Fix | Delete
?>
[28] Fix | Delete
<li @click="settingShowTabs('<?php echo esc_attr($key); ?>')"
[29] Fix | Delete
class="link"
[30] Fix | Delete
:class="{'active': (modalCrrentTab=='<?php echo esc_attr($key) ?>')}">
[31] Fix | Delete
<?php echo esc_html($sidebarlink); ?>
[32] Fix | Delete
</li>
[33] Fix | Delete
<?php } ?>
[34] Fix | Delete
</ul>
[35] Fix | Delete
</div>
[36] Fix | Delete
<div class="modal-header">
[37] Fix | Delete
<h3>Layout Directory</h3>
[38] Fix | Delete
</div>
[39] Fix | Delete
<div class="modal-body">
[40] Fix | Delete
<div v-if="modalCrrentTab=='advance'" class="modal-settings">
[41] Fix | Delete
<div class="amp-form-control" id="ampb_script_handler" data-type='textarea' >
[42] Fix | Delete
<div class="form-label">Enter HTML in Head</div>
[43] Fix | Delete
<div class="form-field"><textarea class="full textarea" id="ampb_script_textarea" name="ampb_script_handler" v-model="ampb_script_textarea"></textarea></div>
[44] Fix | Delete
<div class="clearfix"></div>
[45] Fix | Delete
</div>
[46] Fix | Delete
<div class="amp-form-control" id="ampb_style_handler" data-type='textarea' >
[47] Fix | Delete
<div class="form-label">Enter Style in Head</div>
[48] Fix | Delete
<div class="form-field"><textarea class="full textarea" id="ampb_style_textarea" name="ampb_style_handler" v-model="ampb_style_textarea"></textarea></div>
[49] Fix | Delete
<div class="clearfix"></div>
[50] Fix | Delete
</div>
[51] Fix | Delete
</div><!-- Advance closed -->
[52] Fix | Delete
[53] Fix | Delete
<div v-else-if="modalCrrentTab=='save_layout'">
[54] Fix | Delete
<div class="amppb-layout-library-wrapper" style="margin: 40px 15px 10px 20px;">
[55] Fix | Delete
<h4>Save Your Current Layout</h4>
[56] Fix | Delete
<div id="input">
[57] Fix | Delete
<label class="form-label">Name of layout</label>
[58] Fix | Delete
<input type="text" class="full text" v-model="save_layout.name" name="save_layout_name">
[59] Fix | Delete
<!-- save_layout -->
[60] Fix | Delete
</div>
[61] Fix | Delete
<button type="button" class="button" style="margin: 10px 5px 0px 0px;" @click="savePagebuildercustomLayout($event)">
[62] Fix | Delete
Save
[63] Fix | Delete
</button>
[64] Fix | Delete
[65] Fix | Delete
</div>
[66] Fix | Delete
<span class="layout-rem-msg" v-if="this.layoutMsg">{{this.layoutMsg}}</span>
[67] Fix | Delete
<div class="amppb-layout-library-wrapper" v-if="showsavedLayouts.length">
[68] Fix | Delete
<h4>List Of Saved Layouts</h4>
[69] Fix | Delete
[70] Fix | Delete
<div class="amppb-layout-layout" v-for="(layout, key, index) in showsavedLayouts">
[71] Fix | Delete
<div class="amppb-layout-wrapper">
[72] Fix | Delete
<div class="amppb-layout-screenshot" style="visibility:hidden;"></div>
[73] Fix | Delete
<div class="amppb-layout-bottom">
[74] Fix | Delete
<h4 class="amppb-layout-title ste-tlt">{{layout.post_title}}</h4>
[75] Fix | Delete
<div class="amppb-layout-button saved-layout">
[76] Fix | Delete
<button type="button" class="button" :data-layout='layout.post_content' @click="importLayout($event)">Import</button>
[77] Fix | Delete
<button type="button" class="button button-info del-btn" :data-layout='layout.post_content' @click="removeSavedLayout(layout.post_id)">Remove</button>
[78] Fix | Delete
</div>
[79] Fix | Delete
</div>
[80] Fix | Delete
</div>
[81] Fix | Delete
</div>
[82] Fix | Delete
[83] Fix | Delete
</div>
[84] Fix | Delete
</div><!-- save custom layout Closed-->
[85] Fix | Delete
[86] Fix | Delete
<div class="amppb-layout-library-wrapper" v-else-if="modalCrrentTab=='layout'">
[87] Fix | Delete
<div class="amp-layout-breadcrumbs" v-if="innerLayouts==''">
[88] Fix | Delete
<span class="link" @click="loadLayOutFolder()"> Layout Home </span>
[89] Fix | Delete
</div>
[90] Fix | Delete
<div class="amp-layout-breadcrumbs" v-if="innerLayouts!=''">
[91] Fix | Delete
<span class="dashicons dashicons-arrow-left-alt link" @click="loadLayOutFolder()"></span>
[92] Fix | Delete
<span class="link" @click="loadLayOutFolder()"> Layout Home </span> <span class="amp-layout-breadcrumbs_arrow">></span> <span class="amp-layout-breadcrumbs_last">{{innerLayoutsHeading}}</span>
[93] Fix | Delete
</div>
[94] Fix | Delete
<div v-if="innerLayouts==''">
[95] Fix | Delete
<?php
[96] Fix | Delete
if(count($layoutTemplate)>0){
[97] Fix | Delete
$layoutTemplate = apply_filters("ampforwp_pb_layouts",$layoutTemplate);
[98] Fix | Delete
foreach($layoutTemplate as $layoutName => $lay){
[99] Fix | Delete
reset($lay);
[100] Fix | Delete
$firstLayout = key($lay);
[101] Fix | Delete
?>
[102] Fix | Delete
<div class="amppb-layout-layout">
[103] Fix | Delete
<div class="amppb-layout-wrapper">
[104] Fix | Delete
<h4 class="amppb-layout-title"><?php
[105] Fix | Delete
if(strpos($layoutName, '-upcomming')!==False){
[106] Fix | Delete
echo "<a class='layouts_pro_lbl' href='https://ampforwp.com/amp-layouts' target='_blank'>PRO</a>".esc_html($lay[$firstLayout]['name']);
[107] Fix | Delete
}else{
[108] Fix | Delete
echo esc_html(ucfirst($layoutName), 'accelerated-mobile-pages');
[109] Fix | Delete
} ?></h4>
[110] Fix | Delete
<div class="amppb-layout-screenshot">
[111] Fix | Delete
<?php
[112] Fix | Delete
if(strpos($layoutName, '-upcomming')!==False){
[113] Fix | Delete
?>
[114] Fix | Delete
<a href="<?php echo esc_url($lay[$firstLayout]["preview_demo"]); ?>" target="_blank"><img src="<?php echo esc_url($lay[$firstLayout]['preview_img']); ?>"></a>
[115] Fix | Delete
<?php
[116] Fix | Delete
}else{
[117] Fix | Delete
?>
[118] Fix | Delete
<img src="<?php echo esc_url($lay[$firstLayout]['preview_img']); ?>" @click="viewSpacialLayouts($event);"
[119] Fix | Delete
data-info='<?php echo wp_json_encode($lay); ?>'
[120] Fix | Delete
data-heading="<?php echo esc_attr( ucfirst($layoutName) ); ?>">
[121] Fix | Delete
<?php } ?>
[122] Fix | Delete
</div>
[123] Fix | Delete
<div class="amppb-layout-bottom">
[124] Fix | Delete
<div class="amppb-layout-button">
[125] Fix | Delete
<?php
[126] Fix | Delete
if(strpos($layoutName, '-upcomming')!==False){
[127] Fix | Delete
?>
[128] Fix | Delete
<a target="_blank" class="button button-lg" href="<?php echo esc_url($lay[$firstLayout]["preview_demo"]); ?>">View Layout</a>
[129] Fix | Delete
<?php
[130] Fix | Delete
}else{
[131] Fix | Delete
?>
[132] Fix | Delete
<button type="button" class="button button-lg"@click="viewSpacialLayouts($event);" data-info='<?php echo wp_json_encode($lay); ?>'
[133] Fix | Delete
data-heading="<?php echo esc_attr(ucfirst($layoutName)); ?>">View Layout</button>
[134] Fix | Delete
<?php } ?>
[135] Fix | Delete
</div>
[136] Fix | Delete
</div>
[137] Fix | Delete
</div>
[138] Fix | Delete
</div>
[139] Fix | Delete
<?php }
[140] Fix | Delete
} ?>
[141] Fix | Delete
</div>
[142] Fix | Delete
<div v-if="innerLayouts!=''">
[143] Fix | Delete
<div class="amppb-layout-layout" v-for="(layout, key, index) in innerLayouts">
[144] Fix | Delete
<div class="amppb-layout-wrapper">
[145] Fix | Delete
<h4 class="amppb-layout-title">{{layout.name}}</h4>
[146] Fix | Delete
<div class="amppb-layout-screenshot">
[147] Fix | Delete
<img src="" :src="layout.preview_img" v-on:click="window.open(layout.preview_demo)">
[148] Fix | Delete
</div>
[149] Fix | Delete
<div class="amppb-layout-bottom">
[150] Fix | Delete
<div class="amppb-layout-button">
[151] Fix | Delete
<a target="_blank" :href="layout.preview_demo" class="amp_l_preview_button button" >Preview</a>
[152] Fix | Delete
<button type="button" class="amp_l_preview_button button" :data-layout='layout.layout_json'@click="importLayout($event)">Import</button>
[153] Fix | Delete
</div>
[154] Fix | Delete
</div>
[155] Fix | Delete
</div>
[156] Fix | Delete
</div>
[157] Fix | Delete
</div>
[158] Fix | Delete
</div><!-- Layout Closed-->
[159] Fix | Delete
<div v-else-if="modalCrrentTab=='export'" class="amppb-modal-row">
[160] Fix | Delete
<div class="amppb-modal-col-2">
[161] Fix | Delete
<div class="fileupload">
[162] Fix | Delete
<label class="">
[163] Fix | Delete
<span class="import-export-label">Select Layout File</span>
[164] Fix | Delete
<input type="file" accept=".json" @change="layoutFileSelected($event)">
[165] Fix | Delete
</label>
[166] Fix | Delete
</div>
[167] Fix | Delete
<button type="button" class="button" v-if="importLayoutfromFile.length>0" @click="replacelayoutFromSelectedFile()">
[168] Fix | Delete
import
[169] Fix | Delete
</button>
[170] Fix | Delete
</div>
[171] Fix | Delete
<div class="amppb-modal-col-2">
[172] Fix | Delete
<div class="exportcompleteData">
[173] Fix | Delete
<iframe id="amppb-panels-export-iframe" style="display: none;" name="amppb-panels-export-iframe"></iframe>
[174] Fix | Delete
<form action="<?php echo esc_url_raw( admin_url('admin-ajax.php?action=amppb_export_layout_data&verify_nonce='.wp_create_nonce('verify_pb')) ); ?>" target="amppb-panels-export-iframe" method="post">
[175] Fix | Delete
<label class="import-export-label">Export Current Layout</label>
[176] Fix | Delete
<button type="submit" class="button button-primary button-large">
[177] Fix | Delete
Export
[178] Fix | Delete
</button>
[179] Fix | Delete
[180] Fix | Delete
<input type="hidden" name="export_layout_data" v-model="JSON.stringify(currentLayoutData)" />
[181] Fix | Delete
</form>
[182] Fix | Delete
[183] Fix | Delete
</div>
[184] Fix | Delete
[185] Fix | Delete
</div>
[186] Fix | Delete
</div><!-- export Closed-->
[187] Fix | Delete
</div>
[188] Fix | Delete
<div class="clearfix"></div>
[189] Fix | Delete
</div>
[190] Fix | Delete
[191] Fix | Delete
<div class="modal-footer">
[192] Fix | Delete
<slot name="footer">
[193] Fix | Delete
<span class="button button-primary button-large del-btn-modal" @click="loadLayOutFolder()" v-if="innerLayouts!=''">
[194] Fix | Delete
Back
[195] Fix | Delete
</span>
[196] Fix | Delete
<button type="button" class="button modal-default-button" v-if="modalCrrentTab=='advance'" @click="savePagebuilderSettings(currentLayoutData)">
[197] Fix | Delete
Save
[198] Fix | Delete
</button>
[199] Fix | Delete
<button type="button" class="button modal-default-button preview button" @click="hidePageBuilderPopUp()">
[200] Fix | Delete
Close
[201] Fix | Delete
</button>
[202] Fix | Delete
</slot>
[203] Fix | Delete
</div>
[204] Fix | Delete
[205] Fix | Delete
</div>
[206] Fix | Delete
</div>
[207] Fix | Delete
</div>
[208] Fix | Delete
</transition>
[209] Fix | Delete
</script>
[210] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function