Changeset 3097597
-
Timestamp: -
06/04/2024 07:48:43 PM ( 3 weeks ago) -
Location: -
wp-reset/trunk -
Files: -
-
4 edited
-
libs/dumper.php (modified) ( 5 diffs ) -
readme.txt (modified) ( 2 diffs ) -
wp-reset-licensing.php (modified) ( 3 diffs ) -
wp-reset.php (modified) ( 30 diffs )
-
Legend:
-
Unmodified -
Added -
Removed
-
wp-reset/trunk/libs/dumper.php r2190441 r3097597 two hundred and seventy-six two hundred and seventy-six $error_text = file_get_contents($error_file); two hundred and seventy-seven two hundred and seventy-seven unlink($error_file); two hundred and seventy-eight throw new WPR_Shuttle_Exception('Couldn\'t export database: ' . $error_text ); two hundred and seventy-eight throw new WPR_Shuttle_Exception('Couldn\'t export database: ' . esc_html($error_text) ); two hundred and seventy-nine two hundred and seventy-nine } two hundred and eighty two hundred and eighty … … three hundred and ninety-eight three hundred and ninety-eight $this->connection = @mysql_connect($this->host, $this->username, $this->password); three hundred and ninety-nine three hundred and ninety-nine if (!$this->connection) { four hundred throw new WPR_Shuttle_Exception("Couldn't connect to the database: " . mysql_error( )); four hundred throw new WPR_Shuttle_Exception("Couldn't connect to the database: " . esc_html(mysql_error() )); four hundred and one four hundred and one } four hundred and two four hundred and two four hundred and three four hundred and three $select_db_res = mysql_select_db($this->name, $this->connection); four hundred and four four hundred and four if (!$select_db_res) { four hundred and five throw new WPR_Shuttle_Exception("Couldn't select database: " . mysql_error($this->connection )); four hundred and five throw new WPR_Shuttle_Exception("Couldn't select database: " . esc_html(mysql_error($this->connection) )); four hundred and six four hundred and six } four hundred and seven four hundred and seven … … four hundred and fifteen four hundred and fifteen $res = mysql_query($q); four hundred and sixteen four hundred and sixteen if (!$res) { four hundred and seventeen throw new WPR_Shuttle_Exception("SQL error: " . mysql_error($this->connection )); four hundred and seventeen throw new WPR_Shuttle_Exception("SQL error: " . esc_html(mysql_error($this->connection) )); four hundred and eighteen four hundred and eighteen } four hundred and nineteen four hundred and nineteen return $res; … … four hundred and sixty-one four hundred and sixty-one four hundred and sixty-two four hundred and sixty-two if ($this->connection->connect_error) { four hundred and sixty-three throw new WPR_Shuttle_Exception("Couldn't connect to the database: " . $this->connection->connect_error ); four hundred and sixty-three throw new WPR_Shuttle_Exception("Couldn't connect to the database: " . esc_html($this->connection->connect_error) ); four hundred and sixty-four four hundred and sixty-four } four hundred and sixty-five four hundred and sixty-five … … four hundred and seventy-four four hundred and seventy-four four hundred and seventy-five four hundred and seventy-five if (!$res) { four hundred and seventy-six throw new WPR_Shuttle_Exception("SQL error: " . $this->connection->error ); four hundred and seventy-six throw new WPR_Shuttle_Exception("SQL error: " . esc_html($this->connection->error) ); four hundred and seventy-seven four hundred and seventy-seven } four hundred and seventy-eight four hundred and seventy-eight -
wp-reset/trunk/readme.txt r3086078 r3097597 five five Requires PHP: 5.2 six six Tested up to: 6.5 seven Stable tag: 2.0 two seven Stable tag: 2.0 three eight eight License: GPLv2 or later nine nine License URI: http://www.gnu.org/licenses/gpl-2.0.html … … one hundred and nineteen one hundred and nineteen one hundred and twenty one hundred and twenty == Changelog == one hundred and twenty-one one hundred and twenty-two = v2.03 = one hundred and twenty-three * 2024/06/04 one hundred and twenty-four * Adjusted HTML escaping on translatable strings one hundred and twenty-five * Fixed some unescaped HTML output one hundred and twenty-one one hundred and twenty-six one hundred and twenty-two one hundred and twenty-seven = v2.02 = -
wp-reset/trunk/wp-reset-licensing.php r3086078 r3097597 three hundred and eighty-seven three hundred and eighty-seven check_ajax_referer('wf_licensing_' . $this->prefix); three hundred and eighty-eight three hundred and eighty-eight three hundred and eighty-nine if (false === current_user_can(' administrator ')) { three hundred and eighty-nine if (false === current_user_can(' manage_options ')) { three hundred and ninety three hundred and ninety wp_die('Sorry, you have to be an admin to run this action.'); three hundred and ninety-one three hundred and ninety-one } … … four hundred and sixteen four hundred and sixteen check_ajax_referer('wf_licensing_' . $this->prefix); four hundred and seventeen four hundred and seventeen four hundred and eighteen if (false === current_user_can(' administrator ')) { four hundred and eighteen if (false === current_user_can(' manage_options ')) { four hundred and nineteen four hundred and nineteen wp_die('Sorry, you have to be an admin to run this action.'); four hundred and twenty four hundred and twenty } … … four hundred and thirty-one four hundred and thirty-one check_ajax_referer('wf_licensing_' . $this->prefix); four hundred and thirty-two four hundred and thirty-two four hundred and thirty-three if (false === current_user_can(' administrator ')) { four hundred and thirty-three if (false === current_user_can(' manage_options ')) { four hundred and thirty-four four hundred and thirty-four wp_die('Sorry, you have to be an admin to run this action.'); four hundred and thirty-five four hundred and thirty-five } -
wp-reset/trunk/wp-reset.php r3086078 r3097597 four four Plugin URI: https://wpreset.com/ five five Description: Reset the entire site or just selected parts while reserving the option to undo by using snapshots. six Version: 2.0 two six Version: 2.0 three seven seven Requires at least: 4.0 eight eight Requires PHP: 5.2 … … two hundred and fifty-eight two hundred and fifty-eight check_ajax_referer('wp-reset_dismiss_notice'); two hundred and fifty-nine two hundred and fifty-nine two hundred and sixty if (!current_user_can(' administrator ')) { two hundred and sixty if (!current_user_can(' manage_options ')) { two hundred and sixty-one two hundred and sixty-one wp_send_json_error(__('You are not allowed to run this action.', 'wp-reset')); two hundred and sixty-two two hundred and sixty-two } … … three hundred and fifty-two three hundred and fifty-two } // foreach three hundred and fifty-three three hundred and fifty-three three hundred and fifty-four if (!empty($pointers) && !$ this->is_plugin_page() && current_user_can(' administrator ')) { three hundred and fifty-four if (!empty($pointers) && !$ this->is_plugin_page() && current_user_can(' manage_options ')) { three hundred and fifty-five three hundred and fifty-five $pointers['_nonce_dismiss_pointer'] = wp_create_nonce('wp-reset_dismiss_notice'); three hundred and fifty-six three hundred and fifty-six … … eight hundred and fifty-five eight hundred and fifty-five check_ajax_referer('wp-reset_run_tool'); eight hundred and fifty-six eight hundred and fifty-six eight hundred and fifty-seven if (!current_user_can(' administrator ')) { eight hundred and fifty-seven if (!current_user_can(' manage_options ')) { eight hundred and fifty-eight eight hundred and fifty-eight wp_send_json_error(__('You are not allowed to run this action.', 'wp-reset')); eight hundred and fifty-nine eight hundred and fifty-nine } … … one thousand and thirty-one one thousand and thirty-one one thousand and thirty-two one thousand and thirty-two // only admins can reset; double-check one thousand and thirty-three if (!$this->is_cli_running() && ! current_user_can(' administrator ')) { one thousand and thirty-three if (!$this->is_cli_running() && ! current_user_can(' manage_options ')) { one thousand and thirty-four one thousand and thirty-four return false; one thousand and thirty-five one thousand and thirty-five } … … one thousand one hundred and thirty-five one thousand one hundred and thirty-five { one thousand one hundred and thirty-six one thousand one hundred and thirty-six // only admins can perform actions one thousand one hundred and thirty-seven if (!current_user_can(' administrator ')) { one thousand one hundred and thirty-seven if (!current_user_can(' manage_options ')) { one thousand one hundred and thirty-eight one thousand one hundred and thirty-eight return; one thousand one hundred and thirty-nine one thousand one hundred and thirty-nine } … … one thousand two hundred and seventy-six one thousand two hundred and seventy-six global $current_user; one thousand two hundred and seventy-seven one thousand two hundred and seventy-seven one thousand two hundred and seventy-eight echo '<div style="padding: 15px; display: inline-block; font-size: 14px; " id="message" class="updated"><p style="font-size: 14px; ">' . sprintf(__('<b>Site has been successfully reset to default settings.</b><br>User "%s" was restored with the password unchanged. Open <a href="%s">WP Reset</a> to do another reset.', 'wp-reset'), esc_html($current_user->user_login), esc_url(admin_url('tools.php? page=wp-reset'))) . '</p>' ; one thousand two hundred and seventy-eight WP_Reset_Utility::wp_kses_wf('<div style="padding: 15px; display: inline-block; font-size: 14px; " id="message" class="updated"><p style="font-size: 14px; ">' . sprintf(__('<b>Site has been successfully reset to default settings.</b><br>User "%s" was restored with the password unchanged. Open <a href="%s">WP Reset</a> to do another reset.', 'wp-reset'), esc_html($current_user->user_login), esc_url(admin_url('tools.php? page=wp-reset'))) . '</p>') ; one thousand two hundred and seventy-nine one thousand two hundred and seventy-nine one thousand two hundred and eighty one thousand two hundred and eighty if (false == $this->get_dismissed_notices('rate')) { … … one thousand four hundred and ten one thousand four hundred and ten { one thousand four hundred and eleven one thousand four hundred and eleven // double check for admin privileges one thousand four hundred and twelve if (!current_user_can(' administrator ')) { one thousand four hundred and thirteen wp_die( __('Sorry, you are not allowed to access this page.', 'wp-reset')); one thousand four hundred and twelve if (!current_user_can(' manage_options ')) { one thousand four hundred and thirteen wp_die( esc_html __('Sorry, you are not allowed to access this page.', 'wp-reset')); one thousand four hundred and fourteen one thousand four hundred and fourteen } one thousand four hundred and fifteen one thousand four hundred and fifteen … … one thousand four hundred and nineteen one thousand four hundred and nineteen echo '<header>'; one thousand four hundred and twenty one thousand four hundred and twenty echo '<div class="wpr-container">'; one thousand four hundred and twenty-one echo '<img id="logo-icon" src="' . esc_url($this->plugin_url) . 'img/wp-reset-logo.png" title="' . __('WP Reset', 'wp-reset') . ' " alt="' . __('WP Reset', 'wp-reset') . ' ">'; one thousand four hundred and twenty-one echo '<img id="logo-icon" src="' . esc_url($this->plugin_url) . 'img/wp-reset-logo.png" title="' . esc_html__('WP Reset', 'wp-reset') . ' " alt="' . esc_html __('WP Reset', 'wp-reset') . ' ">'; one thousand four hundred and twenty-two one thousand four hundred and twenty-two echo '</div>'; one thousand four hundred and twenty-three one thousand four hundred and twenty-three echo '</header>'; … … one thousand five hundred and forty one thousand five hundred and forty if (false === $notice_shown && is_multisite()) { one thousand five hundred and forty-one one thousand five hundred and forty-one echo '<div class="card notice-wrapper notice-error">'; one thousand five hundred and forty-two echo '<h2>' . __('WP Reset is not compatible with multisite!', 'wp-reset') . '</ h2>'; one thousand five hundred and forty-three echo '<p>' . __('Please be careful when using WP Reset with multisite enabled. It\'s not recommended to reset the main site. Sub-sites should be OK. We\'re working on making it fully compatible with WP-MU. <b>Till then please be careful.</b> Thank you for understanding.', 'wp-reset') . '</p>' ; one thousand five hundred and forty-two echo '<h2>' . esc_html __('WP Reset is not compatible with multisite!', 'wp-reset') . '</ h2>'; one thousand five hundred and forty-three WP_Reset_Utility::wp_kses_wf('<p>' . __ ('Please be careful when using WP Reset with multisite enabled. It\'s not recommended to reset the main site. Sub-sites should be OK. We\'re working on making it fully compatible with WP-MU. <b>Till then please be careful.</b> Thank you for understanding.', 'wp-reset') . '</ p>') ; one thousand five hundred and forty-four one thousand five hundred and forty-four echo '</div>'; one thousand five hundred and forty-five one thousand five hundred and forty-five $notice_shown = true; … … one thousand five hundred and fifty-two one thousand five hundred and fifty-two ) { one thousand five hundred and fifty-three one thousand five hundred and fifty-three echo '<div class="card notice-wrapper notice-info">'; one thousand five hundred and fifty-four echo '<h2>' . __('Please help us spread the word & keep the plugin up-to-date', 'wp-reset') . '</h2>'; one thousand five hundred and fifty-five echo '<p>' . __('If you use & enjoy WP Reset, <b>please rate it on WordPress.org</b>. It only takes a second and helps us keep the plugin maintained. Thank you!', 'wp-reset') . '</p>' ; one thousand five hundred and fifty-six echo '<p><a class="button-primary button" title="' . __('Rate WP Reset', 'wp-reset') . ' " target="_blank" href=" https://wordpress.org/support/plugin/wp-reset/reviews/#new -post">' . __('Rate the plugin ★★★★★', 'wp-reset') . '</a> <a href="#" class="wpr-dismiss-notice dismiss-notice-rate" data-notice="rate">' . __('I\'ve already rated it', 'wp-reset') . '</ a></p>'; one thousand five hundred and fifty-four echo '<h2>' . esc_html __('Please help us spread the word & keep the plugin up-to-date', 'wp-reset') . '</h2>'; one thousand five hundred and fifty-five WP_Reset_Utility::wp_kses_wf('<p>' . __ ('If you use & enjoy WP Reset, <b>please rate it on WordPress.org</b>. It only takes a second and helps us keep the plugin maintained. Thank you!', 'wp-reset') . '</p>') ; one thousand five hundred and fifty-six echo '<p><a class="button-primary button" title="' . esc_html__('Rate WP Reset', 'wp-reset') . ' " target="_blank" href=" https://wordpress.org/support/plugin/wp-reset/reviews/#new -post">' . esc_html__('Rate the plugin ★★★★★', 'wp-reset') . '</a> <a href="#" class="wpr-dismiss-notice dismiss-notice-rate" data-notice="rate">' . esc_html __('I\'ve already rated it', 'wp-reset') . '</ a></p>'; one thousand five hundred and fifty-seven one thousand five hundred and fifty-seven echo '</div>'; one thousand five hundred and fifty-eight one thousand five hundred and fifty-eight $notice_shown = true; … … one thousand six hundred and forty-two one thousand six hundred and forty-two echo '</table>'; one thousand six hundred and forty-three one thousand six hundred and forty-three one thousand six hundred and forty-four echo '<p><b>' . __('What happens when I run any Reset tool?', 'wp-reset') . '</ b></p>'; one thousand six hundred and forty-four echo '<p><b>' . esc_html __('What happens when I run any Reset tool?', 'wp-reset') . '</ b></p>'; one thousand six hundred and forty-five one thousand six hundred and forty-five echo '<ul class="plain-list">'; one thousand six hundred and forty-six echo '<li>' . __('remember, always <b>make a backup first</b> or use <a href="#" class="change-tab" data-tab="2">snapshots</a>', 'wp-reset') . '</li>' ; one thousand six hundred and forty-seven echo '<li>' . __('you will have to confirm the action one more time', 'wp-reset') . '</ li>'; one thousand six hundred and forty-eight echo '<li>' . __('see the table above to find out what exactly will be reset or deleted', 'wp-reset') . '</ li>'; one thousand six hundred and forty-nine echo '<li>' . __('site title, WordPress URL, site URL, site language, search engine visibility and current user will always be restored', 'wp-reset') . '</li>'; one thousand six hundred and fifty echo '<li>' . __('you will be logged out, automatically logged back in and taken to the admin dashboard', 'wp-reset') . '</li>'; one thousand six hundred and fifty-one echo '<li>' . __('WP Reset plugin will be reactivated if that option is chosen', 'wp-reset') . '</ li>'; one thousand six hundred and forty-six WP_Reset_Utility::wp_kses_wf('<li>' . __ ('remember, always <b>make a backup first</b> or use <a href="#" class="change-tab" data-tab="2">snapshots</a>', 'wp-reset') . '</li>') ; one thousand six hundred and forty-seven echo '<li>' . esc_html __('you will have to confirm the action one more time', 'wp-reset') . '</ li>'; one thousand six hundred and forty-eight echo '<li>' . esc_html __('see the table above to find out what exactly will be reset or deleted', 'wp-reset') . '</ li>'; one thousand six hundred and forty-nine echo '<li>' . esc_html __('site title, WordPress URL, site URL, site language, search engine visibility and current user will always be restored', 'wp-reset') . '</li>'; one thousand six hundred and fifty echo '<li>' . esc_html __('you will be logged out, automatically logged back in and taken to the admin dashboard', 'wp-reset') . '</li>'; one thousand six hundred and fifty-one echo '<li>' . esc_html __('WP Reset plugin will be reactivated if that option is chosen', 'wp-reset') . '</ li>'; one thousand six hundred and fifty-two one thousand six hundred and fifty-two echo '</ul>'; one thousand six hundred and fifty-three one thousand six hundred and fifty-three one thousand six hundred and fifty-four echo '<p><b>' . __('WP-CLI Support', 'wp-reset') . '</ b><br>'; one thousand six hundred and fifty-five echo '' . sprintf( __('All tools available via GUI are available in WP-CLI as well. To get the list of commands run %s. Instead of the active user, the first user with admin privileges found in the database will be restored. ', 'wp-reset'), '<code>wp help reset</code>'); one thousand six hundred and fifty-six echo sprintf( __('All actions have to be confirmed. If you want to skip confirmation use the standard %s option. Please be careful and backup first.', 'wp-reset'), '<code>--yes</code>') . '</ p>'; one thousand six hundred and fifty-four echo '<p><b>' . esc_html __('WP-CLI Support', 'wp-reset') . '</ b><br>'; one thousand six hundred and fifty-five echo '' . sprintf( esc_html __('All tools available via GUI are available in WP-CLI as well. To get the list of commands run %s. Instead of the active user, the first user with admin privileges found in the database will be restored. ', 'wp-reset'), '<code>wp help reset</code>'); one thousand six hundred and fifty-six echo sprintf( esc_html __('All actions have to be confirmed. If you want to skip confirmation use the standard %s option. Please be careful and backup first.', 'wp-reset'), '<code>--yes</code>') . '</ p>'; one thousand six hundred and fifty-seven one thousand six hundred and fifty-seven one thousand six hundred and fifty-eight one thousand six hundred and fifty-eight echo '</div></div>'; // card description … … one thousand six hundred and seventy-three one thousand six hundred and seventy-three WP_Reset_Utility::wp_kses_wf($this->get_tool_icons(false, true)); one thousand six hundred and seventy-four one thousand six hundred and seventy-four one thousand six hundred and seventy-five echo '<p><br><label for="reset-options-reactivate-theme"><input type="checkbox" id="reset-options-reactivate-theme" value="1"> ' . __('Reactivate current theme', 'wp-reset') . ' - ' . esc_html($theme_name) . '</ label></p>'; one thousand six hundred and seventy-five echo '<p><br><label for="reset-options-reactivate-theme"><input type="checkbox" id="reset-options-reactivate-theme" value="1"> ' . esc_html __('Reactivate current theme', 'wp-reset') . ' - ' . esc_html($theme_name) . '</ label></p>'; one thousand six hundred and seventy-six one thousand six hundred and seventy-six echo '<p><label for="reset-options-reactivate-plugins"><input type="checkbox" id="reset-options-reactivate-plugins" value="1"> Reactivate ' . esc_attr(sizeof($active_plugins)) . ' currently active plugin' . (sizeof($active_plugins) != 1 ? ' s' : '') . ' (WP Reset will reactivate by default)</label></p>'; one thousand six hundred and seventy-seven one thousand six hundred and seventy-seven … … one thousand six hundred and eighty-three one thousand six hundred and eighty-three WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Site Reset', 'wp-reset'), 'tool-site-reset', array('collapse_button' => true))); one thousand six hundred and eighty-four one thousand six hundred and eighty-four echo '<div class="card-body">'; one thousand six hundred and eighty-five echo '<p><label for="reactivate-theme"><input name="wpr-post-reset[reactivate_theme]" type="checkbox" id="reactivate-theme" value="1"> ' . __('Reactivate current theme', 'wp-reset') . ' - ' . esc_html($theme->get('Name')) . '</ label></p>'; one thousand six hundred and eighty-six echo '<p><label for="reactivate-wpreset"><input name="wpr-post-reset[reactivate_wpreset]" type="checkbox" id="reactivate-wpreset" value="1" checked> ' . __('Reactivate WP Reset plugin', 'wp-reset') . '</ label></p>'; one thousand six hundred and eighty-seven one thousand six hundred and eighty-eight echo '<p><label for="reactivate-plugins"><input name="wpr-post-reset[reactivate_plugins]" type="checkbox" id="reactivate-plugins" value="1"> ' . __('Reactivate all currently active plugins', 'wp-reset') . '</ label></p>'; one thousand six hundred and eighty-nine echo '<p>' . __('Type <b>reset</b> in the confirmation field to confirm the reset and then click the "Reset WordPress" button.< br>Always <a href="#" class="create-new-snapshot" data-description="Before resetting the site">create a snapshot</a> before resetting if you want to be able to undo.', 'wp-reset') . '</p>' ; one thousand six hundred and eighty-five echo '<p><label for="reactivate-theme"><input name="wpr-post-reset[reactivate_theme]" type="checkbox" id="reactivate-theme" value="1"> ' . esc_html __('Reactivate current theme', 'wp-reset') . ' - ' . esc_html($theme->get('Name')) . '</ label></p>'; one thousand six hundred and eighty-six echo '<p><label for="reactivate-wpreset"><input name="wpr-post-reset[reactivate_wpreset]" type="checkbox" id="reactivate-wpreset" value="1" checked> ' . esc_html __('Reactivate WP Reset plugin', 'wp-reset') . '</ label></p>'; one thousand six hundred and eighty-seven one thousand six hundred and eighty-eight echo '<p><label for="reactivate-plugins"><input name="wpr-post-reset[reactivate_plugins]" type="checkbox" id="reactivate-plugins" value="1"> ' . esc_html __('Reactivate all currently active plugins', 'wp-reset') . '</ label></p>'; one thousand six hundred and eighty-nine WP_Reset_Utility::wp_kses_wf('<p>' . __ ('Type <b>reset</b> in the confirmation field to confirm the reset and then click the "Reset WordPress" button.<br>Always <a href="#" class="create-new-snapshot" data-description="Before resetting the site">create a snapshot</a> before resetting if you want to be able to undo.', 'wp-reset') . '</ p>') ; one thousand six hundred and ninety one thousand six hundred and ninety one thousand six hundred and ninety-one one thousand six hundred and ninety-one wp_nonce_field('wp-reset'); one thousand six hundred and ninety-two one thousand six hundred and ninety-two echo '<p class="mb0"><input id="wp_reset_confirm" type="text" name="wp_reset_confirm" placeholder="' . esc_attr(sprintf(__('Type in: %s', 'wp-reset'), '"reset"')) . '" value="" autocomplete="off"> '; one thousand six hundred and ninety-three echo '<a id="wp_reset_submit" class="button button-delete">' . __('Reset Site', 'wp-reset') . '</ a>'; one thousand six hundred and ninety-three echo '<a id="wp_reset_submit" class="button button-delete">' . esc_html __('Reset Site', 'wp-reset') . '</ a>'; one thousand six hundred and ninety-four one thousand six hundred and ninety-four WP_Reset_Utility::wp_kses_wf($this->get_snapshot_button('reset-wordpress', 'Before resetting the site')); one thousand six hundred and ninety-five one thousand six hundred and ninety-five echo '</p>'; … … one thousand seven hundred and eight one thousand seven hundred and eight echo '<p class="mb0 wpmu-error">This tool is <b>not compatible</b> with WP multisite (WPMU). Using it would delete files shared by multiple sites in the WP network.</p>'; one thousand seven hundred and nine one thousand seven hundred and nine } else { one thousand seven hundred and ten echo '<p><br><label for="nuclear-reset-reactivate-wpreset"><input type="checkbox" id="nuclear-reset-reactivate-wpreset" value="1" checked> ' . __('Reactivate WP Reset plugin', 'wp-reset') . '</ label></p>'; one thousand seven hundred and eleven one thousand seven hundred and twelve echo '<p>' . __('Type <b>reset</b> in the confirmation field to confirm the reset and then click the "Reset WordPress & Delete All Custom Files & Data" button. < b>There is NO UNDO.', 'wp-reset') . '</b></p>' ; one thousand seven hundred and thirteen one thousand seven hundred and fourteen echo '<p class="mb0"><input id="nuclear_reset_confirm" type="text" placeholder="' . esc_ attr __('Type in "reset"', 'wp-reset') . ' " value="" autocomplete="off"> '; one thousand seven hundred and fifteen echo '<a class="button button-delete button-pro-feature" href="#">' . __('Reset WordPress & Delete All Custom Files & Data', 'wp-reset') . ' - <span data-feature="tool-nuclear-reset" class="pro-feature"><span class="pro">PRO</span> tool</span></a></p>'; one thousand seven hundred and ten echo '<p><br><label for="nuclear-reset-reactivate-wpreset"><input type="checkbox" id="nuclear-reset-reactivate-wpreset" value="1" checked> ' . esc_html __('Reactivate WP Reset plugin', 'wp-reset') . '</ label></p>'; one thousand seven hundred and eleven one thousand seven hundred and twelve WP_Reset_Utility::wp_kses_wf('<p>' . __ ('Type <b>reset</b> in the confirmation field to confirm the reset and then click the "Reset WordPress & Delete All Custom Files & Data" button. < b>There is NO UNDO.', 'wp-reset') . '</b></p>') ; one thousand seven hundred and thirteen one thousand seven hundred and fourteen echo '<p class="mb0"><input id="nuclear_reset_confirm" type="text" placeholder="' . esc_ html __('Type in "reset"', 'wp-reset') . ' " value="" autocomplete="off"> '; one thousand seven hundred and fifteen echo '<a class="button button-delete button-pro-feature" href="#">' . esc_html __('Reset WordPress & Delete All Custom Files & Data', 'wp-reset') . ' - <span data-feature="tool-nuclear-reset" class="pro-feature"><span class="pro">PRO</span> tool</span></a></p>'; one thousand seven hundred and sixteen one thousand seven hundred and sixteen } one thousand seven hundred and seventeen one thousand seven hundred and seventeen echo '</div>'; … … one thousand seven hundred and eighty-two one thousand seven hundred and eighty-two WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Reset Theme Options', 'wp-reset'), 'tool-reset-theme-options', array('iot_button' => true, 'collapse_button' => true))); one thousand seven hundred and eighty-three one thousand seven hundred and eighty-three echo '<div class="card-body">'; one thousand seven hundred and eighty-four echo '<p>' . __('All options (mods) for all themes will be reset; not just for the active theme. The tool works only for themes that use the <a href=" https://codex.wordpress.org/Theme_Modification_API " target="_blank">WordPress theme modification API</a>. If options are saved in some other, custom way they won\'t be reset.<br> Always <a href="#" class="create-new-snapshot" data-description="Before resetting theme options">create a snapshot</a> before using this tool if you want to be able to undo its actions.', 'wp-reset') . '</p>' ; one thousand seven hundred and eighty-four WP_Reset_Utility::wp_kses_wf('<p>' . __ ('All options (mods) for all themes will be reset; not just for the active theme. The tool works only for themes that use the <a href=" https://codex.wordpress.org/Theme_Modification_API " target="_blank">WordPress theme modification API</a>. If options are saved in some other, custom way they won\'t be reset.<br> Always <a href="#" class="create-new-snapshot" data-description="Before resetting theme options">create a snapshot</a> before using this tool if you want to be able to undo its actions.', 'wp-reset') . '</p>') ; one thousand seven hundred and eighty-five one thousand seven hundred and eighty-five WP_Reset_Utility::wp_kses_wf($this->get_tool_icons(false, true)); one thousand seven hundred and eighty-six one thousand seven hundred and eighty-six echo '<p class="mb0"><a data-confirm-title="Are you sure you want to reset all theme options?" data-btn-confirm="Reset theme options" data-text-wait="Resetting theme options. Please wait." data-text-confirm="All options (mods) for all themes will be reset. Always ' . esc_attr('<a data-description="Before resetting theme options" href=" #" class="create-new-snapshot">create a snapshot</a> if you want to be able to undo') . '." data-text-done="Options for %n themes have been reset." data-text-done-singular="Options for one theme have been reset." class="button button-delete" href="#" id="reset-theme-options">Reset theme options</a>'; … … one thousand eight hundred and seventy-six one thousand eight hundred and seventy-six WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Delete Themes', 'wp-reset'), 'tool-delete-themes', array('iot_button' => true, 'collapse_button' => true))); one thousand eight hundred and seventy-seven one thousand eight hundred and seventy-seven echo '<div class="card-body">'; one thousand eight hundred and seventy-eight echo '<p>' . __('All themes will be deleted. Including the currently active theme - ' . esc_html($theme->get('Name')) . '.< br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</p>' ; one thousand eight hundred and seventy-eight WP_Reset_Utility::wp_kses_wf('<p>' . __ ('All themes will be deleted. Including the currently active theme - ' . esc_html($theme->get('Name')) . '.< br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</p>') ; one thousand eight hundred and seventy-nine one thousand eight hundred and seventy-nine WP_Reset_Utility::wp_kses_wf($this->get_tool_icons(true, true)); one thousand eight hundred and eighty one thousand eight hundred and eighty echo '<p class="mb0"><a data-confirm-title="Are you sure you want to delete all themes?" data-btn-confirm="Delete all themes" data-text-wait="Deleting all themes. Please wait." data-text-confirm="All themes will be deleted. There is NO UNDO. WP Reset does not make any file backups." data-text-done="%n themes have been deleted." data-text-done-singular="One theme has been deleted." class="button button-delete" href="#" id="delete-themes">Delete all themes</a></p>'; … … one thousand eight hundred and eighty-five one thousand eight hundred and eighty-five WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Delete Plugins', 'wp-reset'), 'tool-delete-plugins', array('iot_button' => true, 'collapse_button' => true))); one thousand eight hundred and eighty-six one thousand eight hundred and eighty-six echo '<div class="card-body">'; one thousand eight hundred and eighty-seven echo '<p>' . __('All plugins will be deleted except for WP Reset which will remain active.< br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</p>' ; one thousand eight hundred and eighty-seven WP_Reset_Utility::wp_kses_wf('<p>' . __ ('All plugins will be deleted except for WP Reset which will remain active.<br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</ p>') ; one thousand eight hundred and eighty-eight one thousand eight hundred and eighty-eight WP_Reset_Utility::wp_kses_wf($this->get_tool_icons(true, true)); one thousand eight hundred and eighty-nine one thousand eight hundred and eighty-nine echo '<p class="mb0"><a data-confirm-title="Are you sure you want to delete all plugins?" data-btn-confirm="Delete plugins" data-text-wait="Deleting plugins. Please wait." data-text-confirm="All plugins except WP Reset will be deleted. There is NO UNDO. WP Reset does not make any file backups." data-text-done="%n plugins have been deleted." data-text-done-singular="One plugin has been deleted." class="button button-delete" href="#" id="delete-plugins">Delete plugins</a></p>'; … … one thousand nine hundred and twelve one thousand nine hundred and twelve WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Clean uploads Folder', 'wp-reset'), 'tool-delete-uploads', array('iot_button' => true, 'collapse_button' => true))); one thousand nine hundred and thirteen one thousand nine hundred and thirteen echo '<div class="card-body">'; one thousand nine hundred and fourteen echo '<p>' . __('All files in <code>' . esc_html($upload_dir['basedir']) . '</ code> folder will be deleted. Including folders and subfolders, and files in subfolders. Files associated with <a href="' . esc_url(admin_url('upload.php')) . ' ">media</a> entries will be deleted too.<br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</p>' ; one thousand nine hundred and fourteen WP_Reset_Utility::wp_kses_wf('<p>' . __ ('All files in <code>' . esc_html($upload_dir['basedir']) . '</ code> folder will be deleted. Including folders and subfolders, and files in subfolders. Files associated with <a href="' . esc_url(admin_url('upload.php')) . ' ">media</a> entries will be deleted too.<br><b>There is NO UNDO. WP Reset does not make any file backups.</b>', 'wp-reset') . '</p>') ; one thousand nine hundred and fifteen one thousand nine hundred and fifteen WP_Reset_Utility::wp_kses_wf($this->get_tool_icons(true, false)); one thousand nine hundred and sixteen one thousand nine hundred and sixteen if (false != $upload_dir['error']) { … … one thousand nine hundred and forty one thousand nine hundred and forty WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Empty or Delete Custom Tables', 'wp-reset'), 'tool-empty-delete-custom-tables', array('iot_button' => true, 'collapse_button' => true))); one thousand nine hundred and forty-one one thousand nine hundred and forty-one echo '<div class="card-body">'; one thousand nine hundred and forty-two echo '<p>' . __('This action affects only custom tables with <code>' . esc_html($wpdb->prefix) . '</ code> prefix. Core WP tables and other tables in the database that do not have that prefix will not be deleted/emptied. Deleting (dropping) tables completely removes them from the database. Emptying (truncating) removes all content from them, but keeps the structure intact.<br>Always <a href="#" class="create-new-snapshot" data-description="Before deleting custom tables">create a snapshot</a> before using this tool if you want to be able to undo its actions.</p>', 'wp-reset' ); one thousand nine hundred and forty-two WP_Reset_Utility::wp_kses_wf('<p>' . __ ('This action affects only custom tables with <code>' . esc_html($wpdb->prefix) . '</ code> prefix. Core WP tables and other tables in the database that do not have that prefix will not be deleted/emptied. Deleting (dropping) tables completely removes them from the database. Emptying (truncating) removes all content from them, but keeps the structure intact.<br>Always <a href="#" class="create-new-snapshot" data-description="Before deleting custom tables">create a snapshot</a> before using this tool if you want to be able to undo its actions.</p>', 'wp-reset') ); one thousand nine hundred and forty-three one thousand nine hundred and forty-three if ($custom_tables) { one thousand nine hundred and forty-four echo '<p>' . __('The following ' . esc_html(sizeof($custom_tables)) . ' custom tables are affected by this tool: ', 'wp-reset' ); one thousand nine hundred and forty-four WP_Reset_Utility::wp_kses_wf('<p>' . __('The following ' . sizeof($custom_tables) . ' custom tables are affected by this tool: ', 'wp-reset') ); one thousand nine hundred and forty-five one thousand nine hundred and forty-five foreach ($custom_tables as $tbl) { one thousand nine hundred and forty-six one thousand nine hundred and forty-six echo '<code>' . esc_html($tbl['name']) . '</ code>'; … … one thousand nine hundred and fifty-two one thousand nine hundred and fifty-two $custom_tables_btns = ''; one thousand nine hundred and fifty-three one thousand nine hundred and fifty-three } else { one thousand nine hundred and fifty-four echo '<p>' . __('There are no custom tables. There\'s nothing for this tool to empty or delete.', 'wp-reset') . '</ p>'; one thousand nine hundred and fifty-four echo '<p>' . esc_html __('There are no custom tables. There\'s nothing for this tool to empty or delete.', 'wp-reset') . '</ p>'; one thousand nine hundred and fifty-five one thousand nine hundred and fifty-five $custom_tables_btns = ' disabled'; one thousand nine hundred and fifty-six one thousand nine hundred and fifty-six } … … one thousand nine hundred and ninety-seven one thousand nine hundred and ninety-seven WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Delete .htaccess File', 'wp-reset'), 'tool-delete-htaccess', array('iot_button' => true, 'collapse_button' => true))); one thousand nine hundred and ninety-eight one thousand nine hundred and ninety-eight echo '<div class="card-body">'; one thousand nine hundred and ninety-nine echo '<p>' . __('This action deletes the .htaccess file located in <code>' . esc_html($this->get_htaccess_path()) . '</ code><br><b>There is NO UNDO. WP Reset does not make any file backups.</b></p>', 'wp-reset' ); one thousand nine hundred and ninety-nine WP_Reset_Utility::wp_kses_wf('<p>' . __ ('This action deletes the .htaccess file located in <code>' . esc_html($this->get_htaccess_path()) . '</ code><br><b>There is NO UNDO. WP Reset does not make any file backups.</b></p>', 'wp-reset') ); two thousand two thousand two thousand and one two thousand and one echo '<p>If you need to edit .htaccess, install our free <a href="' . esc_url(admin_url('plugin-install.php?tab=plugin-information&plugin=wp-htaccess-editor&TB_iframe=true&width=600&height=550')) . '" class="thickbox open-plugin-details-modal">WP Htaccess Editor</a> plugin. It automatically creates backups when you edit .htaccess as well as checks for syntax errors. To create the default .htaccess file open <a href="' . esc_url(admin_url('options-permalink.php')) . ' ">Settings - Permalinks</a> and re-save settings. WordPress will recreate the file.</p>'; … … two thousand and eighteen two thousand and eighteen WP_Reset_Utility::wp_kses_wf($this->get_card_header('What are Plugin & Theme Collections?', 'collections-info', array('collapse_button' => false))); two thousand and nineteen two thousand and nineteen echo '<div class="card-body">'; two thousand and twenty echo '<p>' . __('Have a set of plugins (and themes) that you install and activate after every reset? Or on every fresh WordPress installation? Well, no more clicking install & active for ten minutes! Build the collection once and install it with one click as many times as needed.</p><p>WP Reset stores collections in the cloud so they\'re accessible on every site you build. You can use free plugins and themes from the official repo, and PRO ones by uploading a ZIP file. We\'ll safely store your license keys too, so you have everything in one place.', 'wp-reset') . '</p>' ; two thousand and twenty WP_Reset_Utility::wp_kses_wf('<p>' . __ ('Have a set of plugins (and themes) that you install and activate after every reset? Or on every fresh WordPress installation? Well, no more clicking install & active for ten minutes! Build the collection once and install it with one click as many times as needed.</p><p>WP Reset stores collections in the cloud so they\'re accessible on every site you build. You can use free plugins and themes from the official repo, and PRO ones by uploading a ZIP file. We\'ll safely store your license keys too, so you have everything in one place.', 'wp-reset') . '</p>') ; two thousand and twenty-one two thousand and twenty-one echo '<p><a class="button button-secondary button-pro-feature" href="#">Add a new collection - <span data-feature="collections" class="pro-feature"><span class="pro">PRO</span> feature</span></a> < a class="button button-secondary button-pro-feature" href="#">Reload my saved collections from the cloud - <span data-feature="collections" class="pro-feature"><span class="pro">PRO</span> feature</span></a></p>'; two thousand and twenty-two two thousand and twenty-two echo '</div>'; … … two thousand and seventy-four two thousand and seventy-four WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Documentation', 'wp-reset'), 'support-documentation', array('collapse_button' => false))); two thousand and seventy-five two thousand and seventy-five echo '<div class="card-body">'; two thousand and seventy-six echo '<p class="mb0">' . __('All tools and features are explained in detail in <a href="' . esc_url($this->generate_web_link('support-tab', '/documentation/')) . ' " target="_blank">the documentation</a>. We did our best to describe how things work on both the code level and an "average user" level.', 'wp-reset') . '</p>' ; two thousand and seventy-six WP_Reset_Utility::wp_kses_wf('<p class="mb0">' . __ ('All tools and features are explained in detail in <a href="' . esc_url($this->generate_web_link('support-tab', '/documentation/')) . '" target="_blank">the documentation</a>. We did our best to describe how things work on both the code level and an "average user" level.', 'wp-reset') . '</p>') ; two thousand and seventy-seven two thousand and seventy-seven echo '</div>'; two thousand and seventy-eight two thousand and seventy-eight echo '</div>'; // documentation … … two thousand and ninety-eight two thousand and ninety-eight WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Public Support Forum', 'wp-reset'), 'support-forum', array('collapse_button' => false))); two thousand and ninety-nine two thousand and ninety-nine echo '<div class="card-body">'; two thousand and one hundred echo '<p>' . __('We are very active on the <a href=" https://wordpress.org/support/plugin/wp-reset " target="_blank">official WP Reset support forum</a>. If you found a bug, have a feature idea or just want to say hi - please drop by. We love to hear back from our users.', 'wp-reset') . '</p>' ; two thousand and one hundred WP_Reset_Utility::wp_kses_wf('<p>' . __ ('We are very active on the <a href=" https://wordpress.org/support/plugin/wp-reset " target="_blank">official WP Reset support forum</a>. If you found a bug, have a feature idea or just want to say hi - please drop by. We love to hear back from our users.', 'wp-reset') . '</p>') ; two thousand one hundred and one two thousand one hundred and one echo '</div>'; two thousand one hundred and two two thousand one hundred and two echo '</div>'; // forum … … two thousand one hundred and twelve two thousand one hundred and twelve WP_Reset_Utility::wp_kses_wf($this->get_card_header(__('Care to Help Out?', 'wp-reset'), 'support-help-out', array('collapse_button' => false))); two thousand one hundred and thirteen two thousand one hundred and thirteen echo '<div class="card-body">'; two thousand one hundred and fourteen echo '<p class="mb0">' . __('No need for donations :) If you can give us a <a href=" https://wordpress.org/support/plugin/wp-reset/reviews/#new -post" target="_blank">five star rating</a> you\'ll help out more than you can imagine. A public mention <a href=" https://twitter.com/webfactoryltd " target="_blank">@webfactoryltd</a> also does wonders. Thank you!', 'wp-reset') . '</p>' ; two thousand one hundred and fourteen WP_Reset_Utility::wp_kses_wf('<p class="mb0">' . __ ('No need for donations :) If you can give us a <a href=" https://wordpress.org/support/plugin/wp-reset/reviews/#new -post" target="_blank">five star rating</a> you\'ll help out more than you can imagine. A public mention <a href=" https://twitter.com/webfactoryltd " target="_blank">@webfactoryltd</a> also does wonders. Thank you!', 'wp-reset') . '</p>') ; two thousand one hundred and fifteen two thousand one hundred and fifteen echo '</div>'; two thousand one hundred and sixteen two thousand one hundred and sixteen echo '</div>'; // help out … … two thousand three hundred and ten two thousand three hundred and ten echo '<div class="card" id="card-snapshots">'; two thousand three hundred and eleven two thousand three hundred and eleven echo '<h4>'; two thousand three hundred and twelve echo __('Snapshots', 'wp-reset'); two thousand three hundred and thirteen echo '<div class="card-header-right"><a class="toggle-card tooltip" href="#" title="' . __('Collapse / expand box', 'wp-reset') . ' "><span class="dashicons dashicons-arrow-up-alt2"></span></a></div>'; two thousand three hundred and twelve echo esc_html __('Snapshots', 'wp-reset'); two thousand three hundred and thirteen echo '<div class="card-header-right"><a class="toggle-card tooltip" href="#" title="' . esc_html __('Collapse / expand box', 'wp-reset') . ' "><span class="dashicons dashicons-arrow-up-alt2"></span></a></div>'; two thousand three hundred and fourteen two thousand three hundred and fourteen echo '</h4>'; two thousand three hundred and fifteen two thousand three hundred and fifteen echo '<div class="card-body">'; … … three thousand and thirteen three thousand and thirteen check_ajax_referer('install_wpfssl'); three thousand and fourteen three thousand and fourteen three thousand and fifteen if (false === current_user_can(' administrator ')) { three thousand and fifteen if (false === current_user_can(' manage_options ')) { three thousand and sixteen three thousand and sixteen wp_die('Sorry, you have to be an admin to run this action.'); three thousand and seventeen three thousand and seventeen } … … three thousand and thirty-five three thousand and thirty-five three thousand and thirty-six three thousand and thirty-six echo '<div style="margin: 20px; color:#444;">'; three thousand and thirty-seven echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php? s=force%20ssl%20webfactory&tab=search&type=term' ) .' ">install the plugin manually via Plugins page</a><br><br>'; three thousand and thirty-seven echo 'If things are not done in a minute <a target="_parent" href="' . esc_url(admin_url('plugin-install.php? s=force%20ssl%20webfactory&tab=search&type=term') ) .' ">install the plugin manually via Plugins page</a><br><br>'; three thousand and thirty-eight three thousand and thirty-eight echo 'Starting ...< br><br>'; three thousand and thirty-nine three thousand and thirty-nine … … three thousand and sixty-two three thousand and sixty-two } three thousand and sixty-three three thousand and sixty-three } else { three thousand and sixty-four echo 'Could not install WP Force SSL. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php? s=force%20ssl%20webfactory&tab=search&type=term' ) .' ">download and install manually</a>.'; three thousand and sixty-four echo 'Could not install WP Force SSL. You\'ll have to <a target="_parent" href="' . esc_url(admin_url('plugin-install.php? s=force%20ssl%20webfactory&tab=search&type=term') ) .' ">download and install manually</a>.'; three thousand and sixty-five three thousand and sixty-five } three thousand and sixty-six three thousand and sixty-six