From cb01612be152cbcc305687f01f94d077100477c5 Mon Sep 17 00:00:00 2001 From: KmancusoRonik <105605229+KmancusoRonik@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:26:26 -0400 Subject: [PATCH] v.1.2.0 Work on optimizing core files and fix a few logic flaws --- README.txt | 20 ++--- admin/interface/dist/index.js | 81 +------------------ admin/interface/templates/general.js | 21 ----- admin/interface/templates/media_cleaner.js | 2 +- .../templates/media_cleaner_settings.js | 6 +- admin/interface/templates/settings.js | 4 +- .../interface-layout/interface-layout.php | 4 +- ronik-base.php | 6 +- 8 files changed, 25 insertions(+), 119 deletions(-) diff --git a/README.txt b/README.txt index 9611bc7..99dfa10 100644 --- a/README.txt +++ b/README.txt @@ -38,9 +38,9 @@ Support and Issue Reporting: Provides support through a dedicated support page a Plugin Usage Instructions 1. Accessing * In WordPress Admin Dashboard: -* * After activation, you’ll find [Plugin Name] listed under the Settings menu or as a separate menu item in your WordPress Admin Dashboard. +* * After activation, you’ll find Media Harmony listed under the Settings menu or as a separate menu item in your WordPress Admin Dashboard. 2. Performing Media CleanupAutomatic Cleanup: -* [Plugin Name] automatically performs a media cleanup every night at midnight via its built-in cron job. You do not need to take any action for this scheduled task. +* Media Harmony automatically performs a media cleanup every night at midnight via its built-in cron job. You do not need to take any action for this scheduled task. Manual Cleanup: * Triggering Manual Sync: * * To perform a cleanup at any time, use the “Force Sync” option available in the WP-Admin bar. Simply click the “Force Sync” button to initiate a media scan and cleanup process manually. @@ -48,10 +48,10 @@ Manual Cleanup: * * After a cleanup, check the plugin’s results to review which files were flagged and ensure that no important media was inadvertently removed. 3. Managing Deleted Media * Backup and Recovery: -* * [Plugin Name] allows you to back up your media files before deletion. Ensure that you have created a backup of your media files before initiating cleanup to restore any files if needed. +* * Media Harmony allows you to back up your media files before deletion. Ensure that you have created a backup of your media files before initiating cleanup to restore any files if needed. 4. Checking Performance * Monitor Plugin Impact: -* * [Plugin Name] includes a custom throttle system designed to minimize performance impact. For optimal performance, consider running the plugin during off-peak hours. +* * Media Harmony includes a custom throttle system designed to minimize performance impact. For optimal performance, consider running the plugin during off-peak hours. 5. Troubleshooting and Support * Consult the FAQ: * * For common questions and troubleshooting tips, refer to the FAQ section of the plugin or the official support page. @@ -63,14 +63,14 @@ Contact Support: == Installation == -* From WordPress Repository: Go to the WordPress Plugin Directory and search for “[Plugin Name]”. Click on the “Download” button to obtain the plugin ZIP file. +* From WordPress Repository: Go to the WordPress Plugin Directory and search for “Media Harmony”. Click on the “Download” button to obtain the plugin ZIP file. * From Website: Download the plugin ZIP file directly from the official website if available. * Install the PluginUsing WordPress Admin Dashboard: * Log in to your WordPress Admin Dashboard. * Navigate to the Plugins Menu: * Download the Plugin -* * From WordPress Repository: Go to the WordPress Plugin Directory and search for “[Plugin Name]”. Click on the “Download” button to obtain the plugin ZIP file. +* * From WordPress Repository: Go to the WordPress Plugin Directory and search for “Media Harmony”. Click on the “Download” button to obtain the plugin ZIP file. * * From Website: Download the plugin ZIP file directly from the official website if available. * Install the PluginUsing WordPress Admin Dashboard: * * Log in to your WordPress Admin Dashboard. @@ -79,18 +79,18 @@ Contact Support: Upload the Plugin: * Click on the “Upload Plugin” button at the top of the page. -* Click “Choose File” and select the downloaded [Plugin Name] ZIP file. +* Click “Choose File” and select the downloaded Media Harmony ZIP file. * Click “Install Now” to upload and install the plugin. Activate the Plugin: -* Once installed, click the “Activate Plugin” link to enable [Plugin Name] on your site. +* Once installed, click the “Activate Plugin” link to enable Media Harmony on your site. * Using FTP: Extract the ZIP File. Extract the contents of the plugin ZIP file on your local computer and upload to server.  * Connect to your website server using an FTP client (e.g., FileZilla). * Navigate to wp-content/plugins/ directory on your server. -* Upload the extracted [Plugin Name] folder to this directory. +* Upload the extracted Media Harmony folder to this directory. Activate the Plugin: * Log in to your WordPress Admin Dashboard. * Go to Plugins > Installed Plugins. -* Find [Plugin Name] in the list and click “Activate”. +* Find Media Harmony in the list and click “Activate”. == Frequently Asked Questions == diff --git a/admin/interface/dist/index.js b/admin/interface/dist/index.js index 33a5284..6b25c8c 100644 --- a/admin/interface/dist/index.js +++ b/admin/interface/dist/index.js @@ -49621,58 +49621,6 @@ function General() { })] })] })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "section", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2", { - children: "Installation Instructions" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "instructions", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h3", { - children: "Using WordPress Admin Dashboard:" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("ul", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Log in to your WordPress Admin Dashboard:" - }), " Log in to your WordPress Admin Dashboard."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Navigate to the Plugins Menu:" - }), " Go to Plugins > Add New."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Upload the Plugin:" - }), " Click on the \u201CUpload Plugin\u201D button at the top of the page."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Click \u201CChoose File\u201D and select the downloaded Media Harmony ZIP file:" - }), " Click \u201CInstall Now\u201D to upload and install the plugin."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Activate the Plugin:" - }), " Once installed, click the \u201CActivate Plugin\u201D link to enable Media Harmony on your site."] - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h3", { - children: "Using FTP:" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("ul", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Extract the ZIP File:" - }), " Extract the contents of the Media Harmony ZIP file on your local computer."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Upload to Server:" - }), " Connect to your website server using an FTP client (e.g., FileZilla)."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Navigate to wp-content/plugins/ directory on your server:" - }), " Upload the extracted Media Harmony folder to this directory."] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong", { - children: "Activate the Plugin:" - }), " Log in to your WordPress Admin Dashboard. Go to Plugins > Installed Plugins. Find Media Harmony in the list and click \u201CActivate\u201D."] - })] - })] - })] }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { className: "section", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2", { @@ -49805,7 +49753,7 @@ function Mediacleaner() { className: "mediacleaner-container", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_ContentBlock_jsx__WEBPACK_IMPORTED_MODULE_0__["default"], { title: "Welcome to Media Harmony!", - description: "Media Harmony will scan your media library for all unlinked JPG, PNG, and GIF files.
The total size of your library will determine the time required to scan.

Use the toggle to initiate a scan of your media library or to permanently delete all unlinked, unpreserved files. Change your file size threshold for the scan in the Settings tab. Use the search bar to filter for title keywords and sort files by size below.

Review scanned files and individually delete files or preserve files to exclude them from bulk deletion. Use the Bulk Delete Media button to delete all unlinked media listed below that you have not selected for preservation.
Use the Bulk Delete Media button to delete all unlinked media listed below that you have not selected for preservation. " + description: "Media Harmony will scan your media library for all unlinked JPG, PNG, and GIF files.
The total size of your library will determine the time required to scan.

Use the toggle to initiate a scan of your media library or to permanently delete all unlinked, unpreserved files. Change your file size threshold for the scan in the Settings tab. Use the search bar to filter for title keywords and sort files by size below.

Review scanned files and individually delete files or preserve files to exclude them from bulk deletion. Use the Bulk Delete Media button to delete all unlinked media listed below that you have not selected for preservation.
Use the Bulk Delete Media button to delete all unlinked media listed below that you have not selected for preservation. Please note: Media Harmony automatically scans your database every 24 hours to present files for review; if no files are presented below, there may be no unlinked files present." }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_MediaCleaner_TriggerAjaxRequest_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], { requestType: "rmc_ajax_media_cleaner" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_MediaCleaner_MediaCollector_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], {})] @@ -49978,7 +49926,7 @@ var MediaCleanerSettings = function MediaCleanerSettings() { className: "settings-container", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_ContentBlock_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], { title: "Media Cleaner Settings:", - description: "Configure file size minimum and backup settings below.

Minimum File Size Limit: Only files above the number entered below will be targeted for review. Anything less will be ignored. We recommend 750KB to target files with higher impact; or, you can start with a higher limit first, and try a lower limit afterwards." + description: "Minimum File Size Limit: Only files above the number entered below will be targeted for review. Anything less will be ignored. We recommend 750KB to target files with higher impact; or, you can start with a higher limit first, and try a lower limit afterwards." }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: "media-cleaner-item-settings__file-size", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("input", { @@ -49994,22 +49942,6 @@ var MediaCleanerSettings = function MediaCleanerSettings() { id: "file-size-selector_val", children: [formValues['filesize-option'], " MB"] })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_ContentBlock_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], { - title: "Backup files:", - description: "Turn on to automatically backup files. Please note that this may take an additional 1-2 minutes. " - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { - className: "media-cleaner-item-settings__file-size", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("label", { - className: "switch", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("input", { - type: "checkbox", - checked: backupEnabled === 'valid', - className: backupEnabled, - onChange: handleImportChange - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", { - className: "slider round" - })] - }) })] }); }; @@ -50069,14 +50001,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js"); - function Settings() { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "settings-container", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components_ContentBlock_jsx__WEBPACK_IMPORTED_MODULE_0__["default"], { - title: "Settings Message", - description: "Tell us which features you want to use." - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br", {})] + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { + className: "settings-container" }); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Settings); diff --git a/admin/interface/templates/general.js b/admin/interface/templates/general.js index bdf7f30..eef3f74 100644 --- a/admin/interface/templates/general.js +++ b/admin/interface/templates/general.js @@ -62,27 +62,6 @@ function General() { -
-

Installation Instructions

-
-

Using WordPress Admin Dashboard:

- - -

Using FTP:

- -
-

Plugin Usage

diff --git a/admin/interface/templates/media_cleaner.js b/admin/interface/templates/media_cleaner.js index e93d874..63c7a1d 100644 --- a/admin/interface/templates/media_cleaner.js +++ b/admin/interface/templates/media_cleaner.js @@ -8,7 +8,7 @@ function Mediacleaner() {


{ {/* Display general settings message */}
{/* File size settings */} @@ -123,7 +123,7 @@ const MediaCleanerSettings = () => {
{/* Backup settings */} - @@ -138,7 +138,7 @@ const MediaCleanerSettings = () => { /> -
+ */} ); }; diff --git a/admin/interface/templates/settings.js b/admin/interface/templates/settings.js index 2cc7259..37d7b45 100644 --- a/admin/interface/templates/settings.js +++ b/admin/interface/templates/settings.js @@ -5,11 +5,11 @@ function Settings() { return (
- -

+

*/}
); diff --git a/admin/media-cleaner/interface-layout/interface-layout.php b/admin/media-cleaner/interface-layout/interface-layout.php index e2807b8..e366608 100644 --- a/admin/media-cleaner/interface-layout/interface-layout.php +++ b/admin/media-cleaner/interface-layout/interface-layout.php @@ -37,8 +37,8 @@ // Add Media Cleaner page. add_submenu_page( 'options-ronik-base-mediacleaner', // parent page slug - 'Media Cleaner', - 'Media Cleaner', + 'Media Harmony Dashboard', + 'Media Harmony Dashboard', 'manage_options', 'options-ronik-base_media_cleaner', // 'ronikbase_media_cleaner_callback', diff --git a/ronik-base.php b/ronik-base.php index efc4fa5..0b721cf 100644 --- a/ronik-base.php +++ b/ronik-base.php @@ -9,14 +9,14 @@ * that starts the plugin. * * @link https://www.ronikdesign.com/ - * @since 1.1.9 + * @since 1.2.0 * @package Ronik_Base * * @wordpress-plugin * Plugin Name: Ronik * Plugin URI: https://www.ronikdesign.com/ * Description: Clean out unused media -- your website will thank you! This plugin uses Advanced Custom Fields to run - * Version: 1.1.9 + * Version: 1.2.0 * Author: Kevin Mancuso * Author URI: https://www.ronikdesign.com/ * License: GPL-2.0+ @@ -35,7 +35,7 @@ * Start at version 1.0.0 and use SemVer - https://semver.org * Rename this for your plugin and update it as you release new versions. */ -define( 'RONIK_BASE_VERSION', '1.1.9' ); +define( 'RONIK_BASE_VERSION', '1.2.0' ); /**