get_names(); return $roles; // Below code will print the all list of roles. } add_action('accordions_settings_content_general', 'accordions_settings_content_general'); function accordions_settings_content_general() { $settings_tabs_field = new settings_tabs_field(); $accordions_settings = get_option('accordions_settings'); $font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : 'none'; $accordions_preview = isset($accordions_settings['accordions_preview']) ? $accordions_settings['accordions_preview'] : 'yes'; $allow_iframe = isset($accordions_settings['allow_iframe']) ? $accordions_settings['allow_iframe'] : 'yes'; $user_roles = isset($accordions_settings['user_roles']) ? $accordions_settings['user_roles'] : array(); ?>

'user_roles', 'parent' => 'accordions_settings', 'title' => __('Allow access by roles', 'accordions'), 'details' => __('Allow access to edit by user roles', 'accordions'), 'type' => 'select2', 'multiple' => true, 'value' => $user_roles, 'default' => array('administrator'), 'attributes' => array(), 'args' => accordions_user_roles(), ); $settings_tabs_field->generate_field($args); $args = array( 'id' => 'font_aw_version', 'parent' => 'accordions_settings', 'title' => __('Font-awesome version', 'accordions'), 'details' => __('Choose font awesome version you want to load.', 'accordions'), 'type' => 'select', 'value' => $font_aw_version, 'default' => 'v_5', 'args' => array('v_5' => __('Version 5+', 'accordions'), 'v_4' => __('Version 4+', 'accordions'), 'none' => __('None', 'accordions')), ); $settings_tabs_field->generate_field($args); $args = array( 'id' => 'allow_iframe', 'parent' => 'accordions_settings', 'title' => __('Allow Iframe on accordion', 'accordions'), 'details' => __('Allow accordion on accordion content.', 'accordions'), 'type' => 'select', 'value' => $allow_iframe, 'default' => 'yes', 'args' => array('yes' => __('Yes', 'accordions'), 'no' => __('No', 'accordions')), ); $settings_tabs_field->generate_field($args); $args = array( 'id' => 'accordions_preview', 'parent' => 'accordions_settings', 'title' => __('Enable accordions preview', 'accordions'), 'details' => __('You can enable preview accordions.', 'accordions'), 'type' => 'select', 'value' => $accordions_preview, 'default' => 'yes', 'args' => array('yes' => __('Yes', 'accordions'), 'no' => __('No', 'accordions')), ); $settings_tabs_field->generate_field($args); ob_start(); $meta_fields = array( 'accordions_options', ); $wp_query = new WP_Query(array( 'post_type' => 'accordions', 'post_status' => 'any', 'posts_per_page' => -1, )); $post_data_exported = array(); if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post(); foreach ($meta_fields as $field) { $fields_data[$field] = get_post_meta(get_the_ID(), $field, true); } $post_data_exported[get_the_ID()] = array( 'title' => get_the_title(), 'meta_fields' => $fields_data, ); endwhile; wp_reset_postdata(); else : // esc_html_e('Not found'); endif; $post_data_exported_json = json_encode($post_data_exported); ?>
'accordion_export', 'title' => __('Export', 'accordions'), 'details' => 'Please download this json first and upload somewhere, you can import by using the url of json file.', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ob_start(); ?>
'accordion_import', 'title' => __('Import', 'accordions'), 'details' => 'Please put the url of json file where you uploaded the file.', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ?>

'get_support', //'parent' => '', 'title' => __('Ask question', 'accordions'), 'details' => '', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ob_start(); ?>

We wish your 2 minutes to write your feedback about the Accordions plugin. give us

Write a review 'reviews', //'parent' => '', 'title' => __('Submit reviews', 'accordions'), 'details' => '', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ob_start(); $accordions_plugin_info = get_option('accordions_plugin_info'); //delete_option('accordions_plugin_info'); //var_dump($accordions_plugin_info); $migration_reset_stats = isset($accordions_plugin_info['migration_reset']) ? $accordions_plugin_info['migration_reset'] : ''; $actionurl = admin_url() . 'edit.php?post_type=accordions&page=settings&tab=help_support'; $actionurl = wp_nonce_url($actionurl, 'accordions_reset_migration'); $nonce = isset($_REQUEST['_wpnonce']) ? sanitize_text_field(wp_unslash($_REQUEST['_wpnonce'])) : ''; if (wp_verify_nonce($nonce, 'accordions_reset_migration')) { $accordions_plugin_info['migration_reset'] = 'processing'; update_option('accordions_plugin_info', $accordions_plugin_info); wp_schedule_event(time(), '1minute', 'accordions_cron_reset_migrate'); $migration_reset_stats = 'processing'; } if ($migration_reset_stats == 'processing') { $url = admin_url() . 'edit.php?post_type=accordions&page=settings&tab=help_support'; ?>

Migration reset on process, please wait until complete.

Refresh to check Migration reset stats

Migration reset completed.

Please click the button bellow to reset migration data, you can start over, Please use with caution, your new migrate data will deleted. you can use default export menu to take your wcps, wcps layouts data saved.

Please read this if you have any issue on data migration

Reset migration Click again to confirm!

'reset_migrate', //'parent' => '', 'title' => __('Reset migration', 'accordions'), 'details' => '', 'type' => 'custom_html', 'html' => $html, ); //$settings_tabs_field->generate_field($args); ob_start(); ?>

You can install older version by uninstalling current version, your data still on database, don't worry if you see content missing on frontend.

Download older version 'old_version', //'parent' => '', 'title' => __('Older version', 'accordions'), 'details' => '', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ?>

Data import on process, please wait until complete.

Refresh to check import stats

Data import done.

Easy Accordion
By ShapedPlugin

Import data

Responsive Accordion And Collapse
By wpshopmart

Import data

Tabs Responsive
By wpshopmart

Import data

Responsive Tabs
By WP Darko

Import data

Easy Responsive Tabs
By oscitas

Import data

Everest Tab Lite
By AccessPress Themes

Import data

Quick and Easy FAQs
By Inspiry Themes

Import data

Shortcodes Ultimate
By Vladimir Anokhin

Import data

WP responsive FAQ with category plugin
By WP OnlineSupport

Import data

Squelch Tabs and Accordions Shortcodes
By Matt Lowe

Import data

Tabby Responsive Tabs
By cubecolour

Import data

Ultimate FAQ
By Etoile Web Design

Import data

Accordion Shortcodes
By Phil Buchanan

Import data

WP Shortcode
By MyThemeShop

Import data

Arconix FAQ
By Tyche Softwares

Import data

Meks Flexible Shortcodes
By Meks

Import data

Tabs Shortcode
By CTLT

Import data

Wonder Tabs Trial
By Magic Hills Pty Ltd

Import data

'reset_migrate', //'parent' => '', 'title' => __('Import data', 'accordions'), 'details' => __('Please contact our support form to add new 3rd party plugin source.', 'accordions'), 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ?>

'get_pro', 'title' => __('Get pro version', 'accordions'), 'details' => '', 'type' => 'custom_html', 'html' => $html, ); $settings_tabs_field->generate_field($args); ?>