Plugin Directory

Changeset 2625072


Ignore:
Timestamp:
11/05/2021 12:36:34 PM (4 years ago)
Author:
cxntech
Message:

Plugin version updated to 1.0.2

Location:
media-library-helper
Files:
45 added
8 edited

Legend:

Unmodified
Added
Removed
  • media-library-helper/trunk/assets/scripts/admin.js

    r2461409 r2625072  
    7373      if ('false' === editable) {
    7474        $('.edit-column-content').addClass('add-bg');
    75         $(this).attr('data-editable', 'true');
     75        $('.table-editable').attr('data-editable', 'true');
    7676        $('.edit-column-content').attr('contenteditable', 'true');
    7777      }
    7878
    7979      if ('true' === editable) {
    80         $(this).attr('data-editable', 'false');
     80        $('.table-editable').attr('data-editable', 'false');
    8181        $('.edit-column-content').attr('contenteditable', 'false');
    8282        $('.edit-column-content').removeClass('add-bg');
     
    8787
    8888jQuery(function ($) {
    89   // Bulp edit action
     89  // Bulk edit action
    9090  $(document).ready(function () {
    9191    var bulk_edit_row = $('tr#bulk-edit.bulk-edit-attachment');
     
    172172      });
    173173    });
    174   }); //
     174  }); // hiding 'Edit Mode Locked/Unlocked' button on bulk edit mode
    175175
    176176  $(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  
    128128
    129129    }
    130 
    131 
    132 
    133 
    134130}
  • media-library-helper/trunk/lib/Admin/Media.php

    r2461409 r2625072  
    233233    public function search_join_table( $join, $wp_query ) {
    234234        if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && isset( $_GET['s'] ) ) {
     235            global $wpdb;
    235236            $ajax_nonce = sanitize_text_field( wp_unslash( $_GET['_ajax_nonce'] ) );
    236237            if ( ! wp_verify_nonce( $ajax_nonce, 'find-posts' ) ) {
     
    239240            $search_term = sanitize_text_field( wp_unslash( $_GET['search-term'] ) );
    240241            $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')) {
    244249                    $join .= " INNER JOIN $wpdb->postmeta as cdxn_post_meta on cdxn_post_meta.post_id = $wpdb->posts.ID ";
    245250                }
     
    260265     */
    261266    public function search_where_table( $where, $wp_query ) {
     267        global $wpdb;
    262268
    263269        if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && isset( $_GET['s'] ) ) {
     
    268274            $search_term = sanitize_text_field( wp_unslash( $_GET['search-term'] ) );
    269275            $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            }
    270280            if ( ! empty( $search_text ) ) {
    271281                global $wpdb;
    272                 if ( 'all' === $search_term ) {
     282                if ( ('all' === $search_term) && ($cdxn_column_exists == 'exists')) {
    273283                    $where .= $wpdb->prepare( " OR cdxn_post_meta.meta_key='_wp_attachment_image_alt' AND cdxn_post_meta.meta_value LIKE %s ", '%' . $search_text . '%' );
    274284                }
  • media-library-helper/trunk/lib/Plugin.php

    r2461409 r2625072  
    6161     * @var      string    $version    The current version of the plugin.
    6262     */
    63     protected $version = '1.0.1';
     63    protected $version = '1.0.2';
    6464
    6565    /**
  • media-library-helper/trunk/media-library-helper.php

    r2461409 r2625072  
    1616 * Plugin URI:        https://wordpress.org/plugins/media-library-helper/
    1717 * 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.1
     18 * Version:           1.0.2
    1919 * Author:            Codexin Technologies
    2020 * Author URI:        https://codexin.com/
  • media-library-helper/trunk/readme.txt

    r2572916 r2625072  
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    1010
    11 Add or edit or Bulk edit image ALT tag, caption & description with one click straight from WordPress media library to boost your SEO score.
     11Add or edit or bulk edit image ALT tag, caption & description with one click straight from WordPress media library to improve your SEO score.
    1212
    1313
    1414== 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.
     15You'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.
    1616
    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.
     17If 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
     19We 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.
    1820
    1921
    2022= Features =
    21231. 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.
     241. Perform Search for a specific SEO Keyword that has been assigned to your images as alt tag, caption or description.
    23251. 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 library
     261. Find out blank or empty ALT tag, or empty caption or empty description throughout the media library
    25271. Bulk edit image ALT tag or alt attribute
    26281. Bulk edit image caption
     
    33351. From Dashboard, go to media --> Library --> Open the "List View"
    34361. 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 needed.
     371. Continue updating image ALT text, caption and description as you need.
    36381. Once finished, just keep the edit mode Locked again.
    3739
     
    6365== Frequently Asked Questions ==
    6466
    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? =
    6668
    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.
     69This 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.
    6870
    6971= I can't see image ALT, Caption or Description columns inside Media Library =
     
    7577Go 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.
    7678
     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
     81This 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.
    7782
    7883== Changelog ==
     84
     85= 1.0.2 =
     86* Resolved unknown column issue when GiveWP plugin is active
     87* Updated readme.txt
    7988
    8089= 1.0.1 =
  • media-library-helper/trunk/uninstall.php

    r2461409 r2625072  
    1313 * - Repeat things for multisite. Once for a single site in the network, once sitewide.
    1414 *
    15  * This file may be updated more in future version of the Boilerplate; however, this is the
    16  * 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-28541913
    20  *
    2115 * @link       http://codexin.com
    2216 * @since      1.0.0
Note: See TracChangeset for help on using the changeset viewer.