Changeset 2625072
- Timestamp:
- 11/05/2021 12:36:34 PM (4 years ago)
- Location:
- media-library-helper
- Files:
-
- 45 added
- 8 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE.txt (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/scripts (added)
-
tags/1.0.1/assets/scripts/admin.js (added)
-
tags/1.0.1/assets/scripts/admin.min.js (added)
-
tags/1.0.1/assets/styles (added)
-
tags/1.0.1/assets/styles/admin.css (added)
-
tags/1.0.1/assets/styles/admin.min.css (added)
-
tags/1.0.1/index.php (added)
-
tags/1.0.1/languages (added)
-
tags/1.0.1/languages/media-library-helper.pot (added)
-
tags/1.0.1/lib (added)
-
tags/1.0.1/lib/Activator.php (added)
-
tags/1.0.1/lib/Admin (added)
-
tags/1.0.1/lib/Admin.php (added)
-
tags/1.0.1/lib/Admin/Admin_Ajax.php (added)
-
tags/1.0.1/lib/Admin/Extended_Media_List_Table.php (added)
-
tags/1.0.1/lib/Admin/Media.php (added)
-
tags/1.0.1/lib/Admin/Notice.php (added)
-
tags/1.0.1/lib/Admin/index.php (added)
-
tags/1.0.1/lib/Common (added)
-
tags/1.0.1/lib/Common/Images.php (added)
-
tags/1.0.1/lib/Common/index.php (added)
-
tags/1.0.1/lib/Deactivator.php (added)
-
tags/1.0.1/lib/I18n.php (added)
-
tags/1.0.1/lib/Loader.php (added)
-
tags/1.0.1/lib/Plugin.php (added)
-
tags/1.0.1/lib/index.php (added)
-
tags/1.0.1/media-library-helper.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/templates (added)
-
tags/1.0.1/templates/extended-upload.php (added)
-
tags/1.0.1/templates/index.php (added)
-
tags/1.0.1/uninstall.php (added)
-
tags/1.0.1/vendor (added)
-
tags/1.0.1/vendor/autoload.php (added)
-
tags/1.0.1/vendor/composer (added)
-
tags/1.0.1/vendor/composer/ClassLoader.php (added)
-
tags/1.0.1/vendor/composer/LICENSE (added)
-
tags/1.0.1/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.1/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.1/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.1/vendor/composer/autoload_real.php (added)
-
tags/1.0.1/vendor/composer/autoload_static.php (added)
-
trunk/assets/scripts/admin.js (modified) (3 diffs)
-
trunk/assets/scripts/admin.min.js (modified) (1 diff)
-
trunk/lib/Admin.php (modified) (1 diff)
-
trunk/lib/Admin/Media.php (modified) (4 diffs)
-
trunk/lib/Plugin.php (modified) (1 diff)
-
trunk/media-library-helper.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
media-library-helper/trunk/assets/scripts/admin.js
r2461409 r2625072 73 73 if ('false' === editable) { 74 74 $('.edit-column-content').addClass('add-bg'); 75 $( this).attr('data-editable', 'true');75 $('.table-editable').attr('data-editable', 'true'); 76 76 $('.edit-column-content').attr('contenteditable', 'true'); 77 77 } 78 78 79 79 if ('true' === editable) { 80 $( this).attr('data-editable', 'false');80 $('.table-editable').attr('data-editable', 'false'); 81 81 $('.edit-column-content').attr('contenteditable', 'false'); 82 82 $('.edit-column-content').removeClass('add-bg'); … … 87 87 88 88 jQuery(function ($) { 89 // Bul pedit action89 // Bulk edit action 90 90 $(document).ready(function () { 91 91 var bulk_edit_row = $('tr#bulk-edit.bulk-edit-attachment'); … … 172 172 }); 173 173 }); 174 }); // 174 }); // hiding 'Edit Mode Locked/Unlocked' button on bulk edit mode 175 175 176 176 $(document).ready(function () { -
media-library-helper/trunk/assets/scripts/admin.min.js
r2458949 r2625072 1 "use strict";!function(e){e(document).ready(function(){e("body").on("focusout",".edit-column-content",function(t){t.preventDefault();var n=e(this),t=e(this).text(),t={action:"image_metadata",type:e(this).data("content-type"),image_id:e(this).data("image-id"),value:t,cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:cdxn_mlh_script.admin_ajax,data:t,beforeSend:function(){n.parent("td").addClass("spiner-add"),n.append('<div class="loder-wrapper"><span class="ajaxloader"></span></div>')},success:function(t){n.text(t)},error:function(){console.log("Error Found")},complete:function(){n.parent("td").removeClass("spiner-add")}})}),e("#posts-filter").on("click",".table-editable",function(t){t.preventDefault();t=String(e(this).attr("data-editable"));"false"===t&&(e(".edit-column-content").addClass("add-bg"),e( this).attr("data-editable","true"),e(".edit-column-content").attr("contenteditable","true")),"true"===t&&(e(this).attr("data-editable","false"),e(".edit-column-content").attr("contenteditable","false"),e(".edit-column-content").removeClass("add-bg"))})})}(jQuery),jQuery(function(d){d(document).ready(function(){var t=d("tr#bulk-edit.bulk-edit-attachment");t.find('input[name="alt"]').val(cdxn_mlh_script.text_no_change),t.find('input[name="caption"]').val(cdxn_mlh_script.text_no_change),t.find('input[name="description"]').val(cdxn_mlh_script.text_no_change),d("body").on("click",'.bulk-edit-attachment input[name="bulk_edit"]',function(t){t.preventDefault(),d(this).after('<span class="spinner is-active"></span>');var n=d("tr#bulk-edit"),e=new Array,a=n.find('input[name="alt"]').val(),i=n.find('input[name="caption"]').val(),t=n.find('input[name="description"]').val(),c=n.find('input[name="_wp_http_referer"]').val();n.find("#bulk-titles").children().each(function(){e.push(d(this).attr("id").replace(/^(ttle)/i,""))}),d.ajax({url:cdxn_mlh_script.admin_ajax,type:"POST",data:{action:"cdxn_mlh_attachment_save_bulk",post_ids:e.toString(),alt:a,caption:i,description:t,text_change:cdxn_mlh_script.text_no_change,cx_nonce:cdxn_mlh_script.ajx_nonce},beforeSend:function(){},success:function(t){t.status&&(window.location.href=c)},error:function(){alert("Error Loading Data...")},complete:function(){}})})}),d(document).ready(function(){d(".cdxn-mlh-notice").on("click",".notice-dismiss, .cdxn-mlh-notice-action",function(){var n=d(this),t=cdxn_mlh_script.admin_ajax,e=d(this).parents(".cdxn-mlh-notice"),e={action:"rate_the_plugin",dismiss_type:d(this).data("dismiss")||"",notice_type:e.data("notice"),cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:t,data:e,success:function(t){t&&n.parents(".cdxn-mlh-notice").remove()}})})}),d(document).ready(function(){d(".media-bulk-action").on("click",".action",function(t){"edit"===d(this).parent().find("select").children("option:selected").val().toString()&&(0<d("#the-list").find("#bulk-edit").length?d(".button.table-editable").addClass("lock-hide"):d(".button.table-editable").removeClass("lock-hide"))})})});1 "use strict";!function(e){e(document).ready(function(){e("body").on("focusout",".edit-column-content",function(t){t.preventDefault();var n=e(this),t=e(this).text(),t={action:"image_metadata",type:e(this).data("content-type"),image_id:e(this).data("image-id"),value:t,cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:cdxn_mlh_script.admin_ajax,data:t,beforeSend:function(){n.parent("td").addClass("spiner-add"),n.append('<div class="loder-wrapper"><span class="ajaxloader"></span></div>')},success:function(t){n.text(t)},error:function(){console.log("Error Found")},complete:function(){n.parent("td").removeClass("spiner-add")}})}),e("#posts-filter").on("click",".table-editable",function(t){t.preventDefault();t=String(e(this).attr("data-editable"));"false"===t&&(e(".edit-column-content").addClass("add-bg"),e(".table-editable").attr("data-editable","true"),e(".edit-column-content").attr("contenteditable","true")),"true"===t&&(e(".table-editable").attr("data-editable","false"),e(".edit-column-content").attr("contenteditable","false"),e(".edit-column-content").removeClass("add-bg"))})})}(jQuery),jQuery(function(d){d(document).ready(function(){var t=d("tr#bulk-edit.bulk-edit-attachment");t.find('input[name="alt"]').val(cdxn_mlh_script.text_no_change),t.find('input[name="caption"]').val(cdxn_mlh_script.text_no_change),t.find('input[name="description"]').val(cdxn_mlh_script.text_no_change),d("body").on("click",'.bulk-edit-attachment input[name="bulk_edit"]',function(t){t.preventDefault(),d(this).after('<span class="spinner is-active"></span>');var n=d("tr#bulk-edit"),e=new Array,a=n.find('input[name="alt"]').val(),i=n.find('input[name="caption"]').val(),t=n.find('input[name="description"]').val(),c=n.find('input[name="_wp_http_referer"]').val();n.find("#bulk-titles").children().each(function(){e.push(d(this).attr("id").replace(/^(ttle)/i,""))}),d.ajax({url:cdxn_mlh_script.admin_ajax,type:"POST",data:{action:"cdxn_mlh_attachment_save_bulk",post_ids:e.toString(),alt:a,caption:i,description:t,text_change:cdxn_mlh_script.text_no_change,cx_nonce:cdxn_mlh_script.ajx_nonce},beforeSend:function(){},success:function(t){t.status&&(window.location.href=c)},error:function(){alert("Error Loading Data...")},complete:function(){}})})}),d(document).ready(function(){d(".cdxn-mlh-notice").on("click",".notice-dismiss, .cdxn-mlh-notice-action",function(){var n=d(this),t=cdxn_mlh_script.admin_ajax,e=d(this).parents(".cdxn-mlh-notice"),e={action:"rate_the_plugin",dismiss_type:d(this).data("dismiss")||"",notice_type:e.data("notice"),cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:t,data:e,success:function(t){t&&n.parents(".cdxn-mlh-notice").remove()}})})}),d(document).ready(function(){d(".media-bulk-action").on("click",".action",function(t){"edit"===d(this).parent().find("select").children("option:selected").val().toString()&&(0<d("#the-list").find("#bulk-edit").length?d(".button.table-editable").addClass("lock-hide"):d(".button.table-editable").removeClass("lock-hide"))})})}); -
media-library-helper/trunk/lib/Admin.php
r2461409 r2625072 128 128 129 129 } 130 131 132 133 134 130 } -
media-library-helper/trunk/lib/Admin/Media.php
r2461409 r2625072 233 233 public function search_join_table( $join, $wp_query ) { 234 234 if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && isset( $_GET['s'] ) ) { 235 global $wpdb; 235 236 $ajax_nonce = sanitize_text_field( wp_unslash( $_GET['_ajax_nonce'] ) ); 236 237 if ( ! wp_verify_nonce( $ajax_nonce, 'find-posts' ) ) { … … 239 240 $search_term = sanitize_text_field( wp_unslash( $_GET['search-term'] ) ); 240 241 $search_text = sanitize_text_field( wp_unslash( $_GET['s'] ) ); 241 if ( ! empty( $search_text ) ) { 242 global $wpdb; 243 if ( 'all' === $search_term ) { 242 243 $cdxn_column_exists = 'exists'; 244 if(is_plugin_active('give/give.php')) { 245 $cdxn_column_exists = 'not-exists'; 246 } 247 if ( ! empty( $search_text )) { 248 if ( ('all' === $search_term) && ($cdxn_column_exists == 'exists')) { 244 249 $join .= " INNER JOIN $wpdb->postmeta as cdxn_post_meta on cdxn_post_meta.post_id = $wpdb->posts.ID "; 245 250 } … … 260 265 */ 261 266 public function search_where_table( $where, $wp_query ) { 267 global $wpdb; 262 268 263 269 if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && isset( $_GET['s'] ) ) { … … 268 274 $search_term = sanitize_text_field( wp_unslash( $_GET['search-term'] ) ); 269 275 $search_text = sanitize_text_field( wp_unslash( $_GET['s'] ) ); 276 $cdxn_column_exists = 'exists'; 277 if(is_plugin_active('give/give.php')) { 278 $cdxn_column_exists = 'not-exists'; 279 } 270 280 if ( ! empty( $search_text ) ) { 271 281 global $wpdb; 272 if ( 'all' === $search_term) {282 if ( ('all' === $search_term) && ($cdxn_column_exists == 'exists')) { 273 283 $where .= $wpdb->prepare( " OR cdxn_post_meta.meta_key='_wp_attachment_image_alt' AND cdxn_post_meta.meta_value LIKE %s ", '%' . $search_text . '%' ); 274 284 } -
media-library-helper/trunk/lib/Plugin.php
r2461409 r2625072 61 61 * @var string $version The current version of the plugin. 62 62 */ 63 protected $version = '1.0. 1';63 protected $version = '1.0.2'; 64 64 65 65 /** -
media-library-helper/trunk/media-library-helper.php
r2461409 r2625072 16 16 * Plugin URI: https://wordpress.org/plugins/media-library-helper/ 17 17 * Description: Add or edit or Bulk edit image ALT tag, caption & description with one click straight from WordPress media library to boost your SEO score. 18 * Version: 1.0. 118 * Version: 1.0.2 19 19 * Author: Codexin Technologies 20 20 * Author URI: https://codexin.com/ -
media-library-helper/trunk/readme.txt
r2572916 r2625072 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt 10 10 11 Add or edit or Bulk edit image ALT tag, caption & description with one click straight from WordPress media library to boostyour SEO score.11 Add or edit or bulk edit image ALT tag, caption & description with one click straight from WordPress media library to improve your SEO score. 12 12 13 13 14 14 == Description == 15 Do you have lots of images in your media library? Are you worried about updating image ALT tag, caption & description? Do you want the easiest way to update these image metadata directly from your WordPress Media Library? This plugin will assist you to update, edit, remove ALT tag or ALT text, as well as assist you to update image caption and image description with just few click from WordPress dashboard media library page. 15 You've got a lot of images in your media library and you're worried about updating the image ALT tag, caption & description? Don't worry. This plugin will help you to update, edit or remove the image ALT tag or ALT text, as well as image caption and image description with just a few clicks directly from within your WordPress dashboard media library page. 16 16 17 If you don't want to visit every single image page to update these image meta data, then this is the perfect plugin for you. You can also view the existing image alt tag, caption & description. This plugin will help you to find out which images don't have any ALT tag or caption or description assigned. Once you find out those images, then you will be able to update them very easily with just few click. We all know that "On Page SEO" is a MUST thing to boost your SEO score and every images in your website MUST have proper image ALT tag assigned. Using this plugin, you will be able to find out empty ALT tags and edit/update image ALT text to improve your existing SEO score. 17 If you don't want to visit every single image edit page to update these image meta data, then this is the perfect plugin for you. You can view the alt tag, caption & description for the existing images directly by visiting the WordPress media library page. This plugin will help you to sort and find out which images don't have an ALT tag or caption or description assigned. Once you find out those images, then you will be able to update them very easily and quickly with just a few clicks. 18 19 We all know that "On Page SEO" is a MUST thing to increase the SEO score of your website and every image in your website should have a proper image ALT tag assigned. Using this plugin, you will be able to find out the empty or blank ALT tags for the images that have already been uploaded to the media library. And you can edit/update image ALT text to improve your existing SEO score. 18 20 19 21 20 22 = Features = 21 23 1. Add/edit/update image ALT tag, caption & description with one click directly from WordPress Media Library 22 1. Perform Search for a specific SEO Keyword that has been assigned to your images .24 1. Perform Search for a specific SEO Keyword that has been assigned to your images as alt tag, caption or description. 23 25 1. Sort media library images by ALT tag, or image caption or Image Description. 24 1. Find out empty ALT tag, or empty caption or empty description throughout the media library26 1. Find out blank or empty ALT tag, or empty caption or empty description throughout the media library 25 27 1. Bulk edit image ALT tag or alt attribute 26 28 1. Bulk edit image caption … … 33 35 1. From Dashboard, go to media --> Library --> Open the "List View" 34 36 1. Unlock the edit mode. (You will see a button at the top, named "Edit mode is locked") 35 1. Continue updating image ALT text, caption and description as you need ed.37 1. Continue updating image ALT text, caption and description as you need. 36 38 1. Once finished, just keep the edit mode Locked again. 37 39 … … 63 65 == Frequently Asked Questions == 64 66 65 = Will this plugin update existing images in the media library? =67 = Will this plugin update existing images ALT tags, captions or descriptions in the media library? = 66 68 67 This plugin will not update existing images in the media library automatically. Once you install this plugin, then you have to update image ALT Tag (ALT Text), Caption, Description using this plugin manually.69 This plugin will not update existing images metadata in the media library automatically. Once you install this plugin, then you have to update image ALT Tag (ALT Text), Caption, Description manually using this plugin. 68 70 69 71 = I can't see image ALT, Caption or Description columns inside Media Library = … … 75 77 Go to the list view in your media library dashboard, then select the images that you want to bulk edit. From the top dropdown menu, select "Edit" and then click on "Apply". This will open the bulk edit editor. You can set image alt tag, caption and description as you needed. The provided image alt tag, caption and description will be set for all the selected images. 76 78 79 = I have updated/modified the image ALT tags, captions or descriptions for some of the images but still those images have the old ALT tags, captions or descriptions where they are attached = 80 81 This happens usually when the image ALT tag, caption or descriptions have been hard coded into your pages or posts. In other words, those image metadata are not being called dynamically from the media library database. If your pages/posts have hard coded image meta data or using a page builder that provides a separate option to add image ALT tags, captions or description, then updating image meta data from WordPres media library won't help. You need to go to that specific page or post and need to find out the existing hard coded image alt tag and replace them as you need. 77 82 78 83 == Changelog == 84 85 = 1.0.2 = 86 * Resolved unknown column issue when GiveWP plugin is active 87 * Updated readme.txt 79 88 80 89 = 1.0.1 = -
media-library-helper/trunk/uninstall.php
r2461409 r2625072 13 13 * - Repeat things for multisite. Once for a single site in the network, once sitewide. 14 14 * 15 * This file may be updated more in future version of the Boilerplate; however, this is the16 * general skeleton and outline for how the file should work.17 *18 * For more information, see the following discussion:19 * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-2854191320 *21 15 * @link http://codexin.com 22 16 * @since 1.0.0
Note: See TracChangeset
for help on using the changeset viewer.