imported + 1) < $this->totalpage) :
?>
local_template as $key => $value) {
$template_data = json_decode(file_get_contents($this->safe_path(OXI_ACCORDIONS_PATH . 'demo-template/') . $value), true);
$Cls = 'OXI_ACCORDIONS_PLUGINS\Layouts\Template';
?>
10 && apply_filters(OXI_ACCORDIONS_PREMIUM, true) == false) :
?>
create_new_modal();
}
public function rec_listFiles($from = '.')
{
if (!is_dir($from))
return false;
$files = [];
if ($dh = opendir($from)) {
while (false !== ($file = readdir($dh))) {
// Skip '.' and '..'
if ($file == '.' || $file == '..')
continue;
$path = $from . '/' . $file;
if (is_dir($path))
$files += $this->rec_listFiles($path);
else
$folder = explode("/demo-template/", $path);
$file = explode("template-", explode(".json", $folder[1])[0]);
if (isset($folder[1]) && isset($file[1])) {
$files[$file[1]] = $folder[1];
}
}
closedir($dh);
}
ksort($files);
return $files;
}
public function get_local_tempalte()
{
$temp = $this->rec_listFiles(OXI_ACCORDIONS_PATH . 'demo-template');
$this->totalpage = ceil(count($temp) / 10);
$c = $this->imported * 10;
foreach ($temp as $key => $value) {
$onlyname = explode('faqs-template-', str_replace('.json', '', $value))[1];
$count = ((int) $onlyname - $c);
if ((int) $onlyname && $count > 0 && $count < 11) :
$this->local_template[$onlyname] = $value;
endif;
}
}
public function render_html()
{
?>
template_header();
$this->template_body();
?>
css_js_load();
$this->render_html();
}
public function css_js_load()
{
$this->admin_template_additional();
apply_filters('oxi-accordions-plugin/admin_menu', true);
$this->imported = isset($_GET['layouts']) ? $this->validate_post($_GET['layouts']) : 0;
$this->get_local_tempalte();
}
/**
* Generate safe path
* @since v1.0.0
*/
public function safe_path($path)
{
$path = str_replace(['//', '\\\\'], ['/', '\\'], $path);
return str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
}
public function template_header()
{
apply_filters('oxi-accordions-plugin/support-and-comments', true);
?>
Oxilab Accordions › Create New
Select Accordions layouts, give your Accordions name and create new Accordions.