Skip to content

Commit

Permalink
v.1.2.0
Browse files Browse the repository at this point in the history
Work on optimizing core files and fix a few logic flaws
  • Loading branch information
KmancusoRonik committed Sep 23, 2024
1 parent 7163ca9 commit cb01612
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 119 deletions.
20 changes: 10 additions & 10 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ 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.
* Reviewing Results:
* * 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.
Expand All @@ -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.
Expand All @@ -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 ==
Expand Down
81 changes: 4 additions & 77 deletions admin/interface/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down Expand Up @@ -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. <br>The total size of your library will determine the time required to scan. <br><br> 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. <br><br>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. <br>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. <br>The total size of your library will determine the time required to scan. <br><br> 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. <br><br>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. <br>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"], {})]
Expand Down Expand Up @@ -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. <br><br>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", {
Expand All @@ -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"
})]
})
})]
});
};
Expand Down Expand Up @@ -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);
Expand Down
21 changes: 0 additions & 21 deletions admin/interface/templates/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,6 @@ function General() {
</div>
</div>

<div className="section">
<h2>Installation Instructions</h2>
<div className="instructions">
<h3>Using WordPress Admin Dashboard:</h3>
<ul>
<li><strong>Log in to your WordPress Admin Dashboard:</strong> Log in to your WordPress Admin Dashboard.</li>
<li><strong>Navigate to the Plugins Menu:</strong> Go to Plugins > Add New.</li>
<li><strong>Upload the Plugin:</strong> Click on the “Upload Plugin” button at the top of the page.</li>
<li><strong>Click “Choose File” and select the downloaded Media Harmony ZIP file:</strong> Click “Install Now” to upload and install the plugin.</li>
<li><strong>Activate the Plugin:</strong> Once installed, click the “Activate Plugin” link to enable Media Harmony on your site.</li>
</ul>

<h3>Using FTP:</h3>
<ul>
<li><strong>Extract the ZIP File:</strong> Extract the contents of the Media Harmony ZIP file on your local computer.</li>
<li><strong>Upload to Server:</strong> Connect to your website server using an FTP client (e.g., FileZilla).</li>
<li><strong>Navigate to wp-content/plugins/ directory on your server:</strong> Upload the extracted Media Harmony folder to this directory.</li>
<li><strong>Activate the Plugin:</strong> Log in to your WordPress Admin Dashboard. Go to Plugins > Installed Plugins. Find Media Harmony in the list and click “Activate”.</li>
</ul>
</div>
</div>

<div className="section">
<h2>Plugin Usage</h2>
Expand Down
2 changes: 1 addition & 1 deletion admin/interface/templates/media_cleaner.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Mediacleaner() {
<div className='mediacleaner-container'>
<ContentBlock
title= "Welcome to Media Harmony!"
description= "Media Harmony will scan your media library for all unlinked JPG, PNG, and GIF files. <br>The total size of your library will determine the time required to scan. <br><br> 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. <br><br>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. <br>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. <br>The total size of your library will determine the time required to scan. <br><br> 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. <br><br>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. <br>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."
/>
<br></br>
<TriggerAjaxRequest
Expand Down
6 changes: 3 additions & 3 deletions admin/interface/templates/media_cleaner_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const MediaCleanerSettings = () => {
{/* Display general settings message */}
<ContentBlock
title="Media Cleaner Settings:"
description="Configure file size minimum and backup settings below. <br><br>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."
/>
<br />
{/* File size settings */}
Expand All @@ -123,7 +123,7 @@ const MediaCleanerSettings = () => {
</div>

{/* Backup settings */}
<ContentBlock
{/* <ContentBlock
title="Backup files:"
description="Turn on to automatically backup files. Please note that this may take an additional 1-2 minutes. "
/>
Expand All @@ -138,7 +138,7 @@ const MediaCleanerSettings = () => {
/>
<span className="slider round"></span>
</label>
</div>
</div> */}
</div>
);
};
Expand Down
Loading

0 comments on commit cb01612

Please sign in to comment.