load_settings();
add_action('init', [$this, 'adminz_run_upgrade']);
add_action('wp_ajax_adminz_run_upgrade_ajax', [$this, 'adminz_run_upgrade_ajax']);
add_action('wp_ajax_adminz_import_backup', [$this, 'adminz_import_backup']);
}
function load_settings() {
$this->settings = (array) get_option($this->option_name, []) ?? [];
$this->data_version_site = $this->settings['adminz_data_version_site'] ?? 0;
}
function add_admin_nav($nav) {
$nav[$this->id] = $this->name;
return $nav;
}
function register_settings() {
register_setting($this->id, $this->option_name);
// add section
add_settings_section(
'adminz',
ADMINZ_NAME,
function () {
},
$this->id
);
// field
add_settings_field(
wp_rand(),
__('Version'),
function () {
echo '' . ADMINZ_VERSION . '';
},
$this->id,
'adminz'
);
// field
add_settings_field(
wp_rand(),
__('What’s New'),
function () {
$list = [
// 'Crawl tool: refactor',
'Wordpress performance: loopback request fixing',
'Flatsome: addition Nav buttons in pagination',
'Flatsome: Post type archive template',
'Downgrade to php 8.1 as required',
'Wordperss tool - Add tool detete image with image id in db',
'Flatsome - woocommerce - Add priority for Use hooks',
'Flatsome - rebuild sync portfolio to category',
'Fix Wordfence security issue',
'Wordperss - Fix Clone posts',
'Flatsome - New element: Before after',
'Taxonomy template/ post type template: add new source field',
'Fix clone post not working',
'WPdatabase helper v1 to v2, applied for all fields and metaboxes',
'Flatsome custom blogs: Video popup support',
'Contact form 7: Prefill form by Url params',
'Permalink: Remove taxonomy base slug, Fix removing custom post type permalink',
'Tools: Debug tools',
'Featured: Metabuilder and Database creator in beta mode',
'Featured: Wordpress seo - Custom permalink, enable this function is required',
'Restore option Flatsome: enable zalo skype whatsapp support checkbox',
'Flatsome - fix element openstreet map for wrong lat/long data',
'Pages Preload images: moved to page edit, enable this function is required.',
'Update helper (WP database helper): add new edit link of user_select, post_select or term_select field type',
[
'Flatsome - moved All autofix to manual fix',
'Also auto migrate old settings to new settings',
'items' => [
'fix_archive_query',
'fix_tag_query',
'create_addition_menus',
'fix_logo_mobile_width',
'create_menu_overlay',
'fix_payment_icons_custom',
'fix_custom_footer_block_action_hooks',
'fix_blog_divider',
'fix_mobile_overlay',
'fix_select2',
]
],
'Flatsome - Fix archive query (moved from auto fix to manual fix)',
'Flatsome - New section fix',
'Wordpress - Register post type with tag support',
'Tools - Test user field and meta',
'Wpcf7 - Date time placeholder',
'Wordpress - Move plugins to must use',
'Flatsome custom slider - New option: equal height',
'Wordpress/Seo - Pages Preload images and auto general meta tags',
'Tools - Clone post',
'Flatsome - New element custom blog posts',
'Wordpress - Override icons',
'Wordpress - Register post type / taxonomy',
'Wordpress - Page Preload images',
'Flatsome - Active on anchor link',
'Woocommerce - Checkout field validate',
'Wordpress - Hide admin url & tool check rewrite rules',
'Woocommerce - Custom email header/ footer',
'Tools - Test theme template',
'Flatsome - New element search form by post type',
'Sidebar selector - only flatsome',
];
// crop list limit 10 items
// $list = array_slice($list, 0, 15);
echo '
| ' . ($index + 1) . ' | '; echo '' . print_r($item, true) . ' | ';
echo '