/**
 * Menu page hook.
 */
function wpcf_admin_menu_import_export_hook()
{
    do_action('wpcf_admin_page_init');
    require_once WPCF_INC_ABSPATH . '/fields.php';
    require_once WPCF_INC_ABSPATH . '/import-export.php';
    if (extension_loaded('simplexml') && isset($_POST['export']) && wp_verify_nonce($_POST['_wpnonce'], 'wpcf_import')) {
        wpcf_admin_export_data();
        die;
    }
}
Ejemplo n.º 2
0
/**
 * Menu page hook.
 */
function wpcf_admin_menu_import_export_hook()
{
    do_action('wpcf_admin_page_init');
    wp_enqueue_style('wpcf-import-export', WPCF_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
    require_once WPCF_INC_ABSPATH . '/fields.php';
    require_once WPCF_INC_ABSPATH . '/import-export.php';
    if (extension_loaded('simplexml') && isset($_POST['export']) && wp_verify_nonce($_POST['_wpnonce'], 'wpcf_import')) {
        wpcf_admin_export_data();
        die;
    }
}
Ejemplo n.º 3
0
function wpcf_admin_export_on_form_submit()
{
    require_once WPCF_INC_ABSPATH . '/fields.php';
    require_once WPCF_INC_ABSPATH . '/import-export.php';
    if (extension_loaded('simplexml') && isset($_POST['types_export']) && isset($_POST['types_export_wpnonce']) && wp_verify_nonce($_POST['types_export_wpnonce'], 'wpcf_export')) {
        wpcf_admin_export_data();
        die;
    }
}