/** * Create an export and return the URL */ function wpseo_get_export() { $include_taxonomy = filter_input(INPUT_POST, 'include_taxonomy') === 'true'; $export = new WPSEO_Export($include_taxonomy); wpseo_ajax_json_echo_die($export->get_results()); }
/** * Create an export and return the URL */ function wpseo_get_export() { check_ajax_referer('wpseo-export'); $include_taxonomy = WPSEO_Utils::filter_input(INPUT_POST, 'include_taxonomy') === 'true' ? true : false; $export = new WPSEO_Export($include_taxonomy); wpseo_ajax_json_echo_die($export->get_results()); }
/** * Create an export and return the URL */ function wpseo_get_export() { if (!current_user_can('manage_options')) { die('-1'); } $include_taxonomy = filter_input(INPUT_POST, 'include_taxonomy') === 'true'; $export = new WPSEO_Export($include_taxonomy); wpseo_ajax_json_echo_die($export->get_results()); }