Plugin Directory

Changeset 2871676


Ignore:
Timestamp:
02/27/2023 12:30:06 PM (3 years ago)
Author:
cxntech
Message:

tagging version 1.0.4

Location:
media-library-helper/tags/1.0.4
Files:
1 added
37 copied

Legend:

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

    r2871647 r2871676  
    33(function ($) {
    44  'use strict';
    5 
    65  /**
    76   * All of the code for your Dashboard-specific JavaScript source
     
    3130   * be doing this, we should try to minimize doing that in our own work.
    3231   */
     32
    3333  $(document).ready(function () {
    3434    // Content editable column ajax function
     
    3838      var value = $(this).text();
    3939      var type = $(this).data('content-type');
    40       var image_id = $(this).data('image-id');
    41       // console.log(fd);
     40      var image_id = $(this).data('image-id'); // console.log(fd);
     41
    4242      var data = {
    4343        action: 'image_metadata',
     
    7171      var editable = String($(this).attr('data-editable'));
    7272      var drag = '';
     73
    7374      if ($('.wp-list-table tr').hasClass('ui-draggable')) {
    7475        drag = 'drag-enabled';
    7576      }
     77
    7678      if ('false' === editable) {
    7779        $('.edit-column-content').addClass('add-bg');
    7880        $('.table-editable').attr('data-editable', 'true');
     81
    7982        if (drag === 'drag-enabled') {
    8083          $('.wp-list-table tr').draggable({
     
    8285          });
    8386        }
     87
    8488        $('.edit-column-content').attr('contenteditable', 'true');
    8589      }
     90
    8691      if ('true' === editable) {
    8792        $('.table-editable').attr('data-editable', 'false');
    8893        $('.edit-column-content').attr('contenteditable', 'false');
    8994        $('.edit-column-content').removeClass('add-bg');
     95
    9096        if (drag === 'drag-enabled') {
    9197          $('.wp-list-table tr').draggable({
     
    97103  });
    98104})(jQuery);
     105
    99106jQuery(function ($) {
    100107  // Bulk edit action
    101108  $(document).ready(function () {
    102109    var bulk_edit_row = $('tr#bulk-edit.bulk-edit-attachment'),
    103       wpVersion = cdxn_mlh_script.wordpress_version;
     110        wpVersion = cdxn_mlh_script.wordpress_version;
    104111    bulk_edit_row.find('input[name="alt"]').val(cdxn_mlh_script.text_no_change);
    105112    bulk_edit_row.find('input[name="caption"]').val(cdxn_mlh_script.text_no_change);
    106113    bulk_edit_row.find('input[name="description"]').val(cdxn_mlh_script.text_no_change);
    107114    $('body').on('click', '.bulk-edit-attachment  input[name="bulk_edit"]', function (event) {
    108       event.preventDefault();
    109       // let's add the WordPress default spinner just before the button
    110       $(this).after('<span class="spinner is-active"></span>');
    111       // define: prices, featured products and the bulk edit table row
     115      event.preventDefault(); // let's add the WordPress default spinner just before the button
     116
     117      $(this).after('<span class="spinner is-active"></span>'); // define: prices, featured products and the bulk edit table row
     118
    112119      var bulk_edit_row = $('tr#bulk-edit'),
    113         post_ids = new Array();
     120          post_ids = new Array();
    114121      var alt = bulk_edit_row.find('input[name="alt"]').val();
    115122      var caption = bulk_edit_row.find('input[name="caption"]').val();
    116123      var description = bulk_edit_row.find('input[name="description"]').val();
    117124      var referer = bulk_edit_row.find('input[name="_wp_http_referer"]').val();
     125
    118126      if ('6 or higher' === wpVersion) {
    119127        bulk_edit_row.find('#bulk-titles-list').children().find('button').each(function () {
     
    124132          post_ids.push($(this).attr('id').replace(/^(ttle)/i, ''));
    125133        });
    126       }
    127 
    128       //save the data with AJAX
     134      } //save the data with AJAX
     135
     136
    129137      $.ajax({
    130138        url: cdxn_mlh_script.admin_ajax,
     
    169177      var dismiss_type = $(this).data('dismiss');
    170178      var notice_type = parents.data('notice');
     179
    171180      if (!dismiss_type) {
    172181        dismiss_type = '';
    173182      }
     183
    174184      var data = {
    175185        action: 'rate_the_plugin',
     
    189199      });
    190200    });
    191   });
    192 
    193   // hiding 'Edit Mode Locked/Unlocked' button on bulk edit mode
     201  }); // hiding 'Edit Mode Locked/Unlocked' button on bulk edit mode
     202
    194203  $(document).ready(function () {
    195204    $('.media-bulk-action').on('click', '.action', function (event) {
    196205      var selectedCountry = $(this).parent().find('select').children("option:selected").val();
    197206      selectedCountry = selectedCountry.toString();
     207
    198208      if ('edit' === selectedCountry) {
    199209        var buld_edit_found = $('#the-list').find('#bulk-edit');
     210
    200211        if (buld_edit_found.length > 0) {
    201212          $('.button.table-editable').addClass('lock-hide');
  • media-library-helper/tags/1.0.4/assets/scripts/admin.min.js

    r2871647 r2871676  
    1 "use strict";!function(n){n(document).ready(function(){n("body").on("focusout",".edit-column-content",function(t){t.preventDefault();var e=n(this),t=n(this).text(),t={action:"image_metadata",type:n(this).data("content-type"),image_id:n(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(){e.parent("td").addClass("spiner-add"),e.append('<div class="loder-wrapper"><span class="ajaxloader"></span></div>')},success:function(t){e.text(t)},error:function(){console.log("Error Found")},complete:function(){e.parent("td").removeClass("spiner-add")}})}),n("#posts-filter").on("click",".table-editable",function(t){t.preventDefault();var t=String(n(this).attr("data-editable")),e="";n(".wp-list-table tr").hasClass("ui-draggable")&&(e="drag-enabled"),"false"===t&&(n(".edit-column-content").addClass("add-bg"),n(".table-editable").attr("data-editable","true"),"drag-enabled"===e&&n(".wp-list-table tr").draggable({disabled:!0}),n(".edit-column-content").attr("contenteditable","true")),"true"===t&&(n(".table-editable").attr("data-editable","false"),n(".edit-column-content").attr("contenteditable","false"),n(".edit-column-content").removeClass("add-bg"),"drag-enabled"===e)&&n(".wp-list-table tr").draggable({disabled:!1})})})}(jQuery),jQuery(function(l){l(document).ready(function(){var t=l("tr#bulk-edit.bulk-edit-attachment"),d=cdxn_mlh_script.wordpress_version;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),l("body").on("click",'.bulk-edit-attachment  input[name="bulk_edit"]',function(t){t.preventDefault(),l(this).after('<span class="spinner is-active"></span>');var t=l("tr#bulk-edit"),e=new Array,n=t.find('input[name="alt"]').val(),a=t.find('input[name="caption"]').val(),i=t.find('input[name="description"]').val(),c=t.find('input[name="_wp_http_referer"]').val();"6 or higher"===d?t.find("#bulk-titles-list").children().find("button").each(function(){e.push(l(this).attr("id").replace(/^(_)/i,""))}):"below 6"===d&&t.find("#bulk-titles").children().each(function(){e.push(l(this).attr("id").replace(/^(ttle)/i,""))}),l.ajax({url:cdxn_mlh_script.admin_ajax,type:"POST",data:{action:"cdxn_mlh_attachment_save_bulk",post_ids:e.toString(),alt:n,caption:a,description:i,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(){}})})}),l(document).ready(function(){l(".cdxn-mlh-notice").on("click",".notice-dismiss, .cdxn-mlh-notice-action",function(){var e=l(this),t=cdxn_mlh_script.admin_ajax,n=l(this).parents(".cdxn-mlh-notice"),n={action:"rate_the_plugin",dismiss_type:l(this).data("dismiss")||"",notice_type:n.data("notice"),cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:t,data:n,success:function(t){t&&e.parents(".cdxn-mlh-notice").remove()}})})}),l(document).ready(function(){l(".media-bulk-action").on("click",".action",function(t){"edit"===l(this).parent().find("select").children("option:selected").val().toString()&&(0<l("#the-list").find("#bulk-edit").length?l(".button.table-editable").addClass("lock-hide"):l(".button.table-editable").removeClass("lock-hide"))})})});
     1"use strict";!function(n){n(document).ready(function(){n("body").on("focusout",".edit-column-content",function(t){t.preventDefault();var e=n(this),t=n(this).text(),t={action:"image_metadata",type:n(this).data("content-type"),image_id:n(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(){e.parent("td").addClass("spiner-add"),e.append('<div class="loder-wrapper"><span class="ajaxloader"></span></div>')},success:function(t){e.text(t)},error:function(){console.log("Error Found")},complete:function(){e.parent("td").removeClass("spiner-add")}})}),n("#posts-filter").on("click",".table-editable",function(t){t.preventDefault();var e=String(n(this).attr("data-editable")),t="";n(".wp-list-table tr").hasClass("ui-draggable")&&(t="drag-enabled"),"false"===e&&(n(".edit-column-content").addClass("add-bg"),n(".table-editable").attr("data-editable","true"),"drag-enabled"===t&&n(".wp-list-table tr").draggable({disabled:!0}),n(".edit-column-content").attr("contenteditable","true")),"true"===e&&(n(".table-editable").attr("data-editable","false"),n(".edit-column-content").attr("contenteditable","false"),n(".edit-column-content").removeClass("add-bg"),"drag-enabled"===t&&n(".wp-list-table tr").draggable({disabled:!1}))})})}(jQuery),jQuery(function(l){l(document).ready(function(){var t=l("tr#bulk-edit.bulk-edit-attachment"),d=cdxn_mlh_script.wordpress_version;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),l("body").on("click",'.bulk-edit-attachment  input[name="bulk_edit"]',function(t){t.preventDefault(),l(this).after('<span class="spinner is-active"></span>');var e=l("tr#bulk-edit"),n=new Array,a=e.find('input[name="alt"]').val(),i=e.find('input[name="caption"]').val(),t=e.find('input[name="description"]').val(),c=e.find('input[name="_wp_http_referer"]').val();"6 or higher"===d?e.find("#bulk-titles-list").children().find("button").each(function(){n.push(l(this).attr("id").replace(/^(_)/i,""))}):"below 6"===d&&e.find("#bulk-titles").children().each(function(){n.push(l(this).attr("id").replace(/^(ttle)/i,""))}),l.ajax({url:cdxn_mlh_script.admin_ajax,type:"POST",data:{action:"cdxn_mlh_attachment_save_bulk",post_ids:n.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(){}})})}),l(document).ready(function(){l(".cdxn-mlh-notice").on("click",".notice-dismiss, .cdxn-mlh-notice-action",function(){var e=l(this),t=cdxn_mlh_script.admin_ajax,n=l(this).parents(".cdxn-mlh-notice"),n={action:"rate_the_plugin",dismiss_type:l(this).data("dismiss")||"",notice_type:n.data("notice"),cx_nonce:cdxn_mlh_script.ajx_nonce};jQuery.ajax({type:"POST",url:t,data:n,success:function(t){t&&e.parents(".cdxn-mlh-notice").remove()}})})}),l(document).ready(function(){l(".media-bulk-action").on("click",".action",function(t){"edit"===l(this).parent().find("select").children("option:selected").val().toString()&&(0<l("#the-list").find("#bulk-edit").length?l(".button.table-editable").addClass("lock-hide"):l(".button.table-editable").removeClass("lock-hide"))})})});
  • media-library-helper/tags/1.0.4/assets/styles/admin.css

    r2871647 r2871676  
    2424    width: 100%;
    2525    display: -webkit-box;
     26    display: -webkit-flex;
    2627    display: -ms-flexbox;
    2728    display: flex;
    2829    -webkit-box-align: center;
     30    -webkit-align-items: center;
    2931    -ms-flex-align: center;
    3032    align-items: center;
    3133    -webkit-box-pack: justify;
     34    -webkit-justify-content: space-between;
    3235    -ms-flex-pack: justify;
    3336    justify-content: space-between;
     37    -webkit-flex-wrap: wrap;
    3438    -ms-flex-wrap: wrap;
    3539    flex-wrap: wrap;
     
    3842.wp-filter .media-filter-group {
    3943    display: -webkit-box;
     44    display: -webkit-flex;
    4045    display: -ms-flexbox;
    4146    display: flex;
    4247    -webkit-box-align: center;
     48    -webkit-align-items: center;
    4349    -ms-flex-align: center;
    4450    align-items: center;
    4551    -webkit-box-pack: end;
     52    -webkit-justify-content: flex-end;
    4653    -ms-flex-pack: end;
    4754    justify-content: flex-end;
    4855    -webkit-box-flex: 1;
     56    -webkit-flex: 1;
    4957    -ms-flex: 1;
    5058    flex: 1;
     59    -webkit-flex-wrap: wrap;
    5160    -ms-flex-wrap: wrap;
    5261    flex-wrap: wrap;
     
    6372.media-filter-items .actions {
    6473    display: -webkit-box;
     74    display: -webkit-flex;
    6575    display: -ms-flexbox;
    6676    display: flex;
     
    7585.media-filter-items label.media-search-input-label {
    7686    display: -webkit-box;
     87    display: -webkit-flex;
    7788    display: -ms-flexbox;
    7889    display: flex;
    7990    -webkit-box-align: center;
     91    -webkit-align-items: center;
    8092    -ms-flex-align: center;
    8193    align-items: center;
     
    88100.table-editable > span {
    89101    display: -webkit-box;
     102    display: -webkit-flex;
    90103    display: -ms-flexbox;
    91104    display: flex;
    92105    -webkit-box-align: center;
     106    -webkit-align-items: center;
    93107    -ms-flex-align: center;
    94108    align-items: center;
     
    117131}
    118132
    119 .table-editable[data-editable=false] .text-mode-unlock {
     133.table-editable[data-editable="false"] .text-mode-unlock {
    120134    display: none;
    121135}
    122136
    123 .table-editable[data-editable=true] .text-mode-lock {
     137.table-editable[data-editable="true"] .text-mode-lock {
    124138    display: none;
    125139}
     
    147161.loder-wrapper {
    148162    display: -webkit-box;
     163    display: -webkit-flex;
    149164    display: -ms-flexbox;
    150165    display: flex;
     
    172187.ajaxloader {
    173188    border: 2px solid #ddd;
     189    -webkit-border-radius: 50%;
    174190    border-radius: 50%;
    175191    border-top: 2px solid #000;
     
    186202    opacity: 0;
    187203    visibility: hidden;
    188     -webkit-transition: 0.3s;
    189     -o-transition: 0.3s;
    190     transition: 0.3s;
     204    -webkit-transition: .3s;
     205    -o-transition: .3s;
     206    transition: .3s;
    191207}
    192208
     
    206222    .wp-filter .filter-items {
    207223        -webkit-box-align: start;
     224        -webkit-align-items: flex-start;
    208225        -ms-flex-align: start;
    209226        align-items: flex-start;
     
    234251    .media-filter-items .search-form {
    235252        -webkit-box-flex: 1;
     253        -webkit-flex: 1;
    236254        -ms-flex: 1;
    237255        flex: 1;
     
    242260
    243261    .wp-filter .media-filter-items.filter-items {
     262        -webkit-flex-wrap: wrap;
    244263        -ms-flex-wrap: wrap;
    245264        flex-wrap: wrap;
     
    247266
    248267    .media-filter-items .actions {
     268        -webkit-flex-wrap: wrap;
    249269        -ms-flex-wrap: wrap;
    250270        flex-wrap: wrap;
     
    254274    .wp-filter .media-filter-group {
    255275        -webkit-box-flex: 0;
     276        -webkit-flex: 0 0 100%;
    256277        -ms-flex: 0 0 100%;
    257278        flex: 0 0 100%;
     
    261282.media-filter-items .search-form {
    262283        width: 100%;
     284        -webkit-flex-wrap: wrap;
    263285        -ms-flex-wrap: wrap;
    264286        flex-wrap: wrap;
  • media-library-helper/tags/1.0.4/assets/styles/admin.min.css

    r2871647 r2871676  
    22table.media .column-title .has-media-icon ~ .row-actions{margin-left:0;overflow:hidden;width:100%;margin-bottom:5px}
    33.full-width{width:100%;display:block;clear:both}
    4 .wp-filter .filter-items{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}
    5 .wp-filter .media-filter-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-wrap:wrap;flex-wrap:wrap}
     4.wp-filter .filter-items{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
     5.wp-filter .media-filter-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
    66.media-filter-items input#post-query-submit,.media-filter-items .actions,.media-filter-items select#attachment-filter,.media-filter-items .search-form{margin-left:10px}
    7 .media-filter-items .search-form,.media-filter-items .actions{display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px 0}
     7.media-filter-items .search-form,.media-filter-items .actions{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:10px 0}
    88.media-filter-items .search-form input[type=search]{max-width:280px;width:100%}
    9 .media-filter-items label.media-search-input-label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}
     9.media-filter-items label.media-search-input-label{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}
    1010.media-filter-items select#search-term{margin-left:5px}
    11 .table-editable>span{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}
     11.table-editable>span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}
    1212.table-editable>span span{font-size:15px;line-height:18px;margin-right:-5px;margin-left:3px;width:15px;margin-top:2px}
    1313.table-editable.lock-hide{visibility:hidden}
    1414.edit-column-content{padding:5px 8px;min-height:11px}
    1515.edit-column-content.add-bg{background:#ddd}
    16 .table-editable[data-editable=false] .text-mode-unlock{display:none}
    17 .table-editable[data-editable=true] .text-mode-lock{display:none}
     16.table-editable[data-editable="false"] .text-mode-unlock{display:none}
     17.table-editable[data-editable="true"] .text-mode-lock{display:none}
    1818.post-type-attachment th#title{width:250px}
    1919.post-type-attachment th#alt,.post-type-attachment th#caption{width:150px}
    2020.post-type-attachment th#description{width:200px}
    2121.post-type-attachment .column-alt,.post-type-attachment .column-caption,.post-type-attachment .column-description{padding-left:2px;padding-right:2px}
    22 .loder-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;cursor:pointer;color:#0073aa;position:absolute;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,0.85)}
     22.loder-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:15px;cursor:pointer;color:#0073aa;position:absolute;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,0.85)}
    2323.loder-wrapper:hover{color:#006799}
    2424.loder-wrapper:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);outline:1px solid transparent}
    25 .ajaxloader{border:2px solid #ddd;border-radius:50%;border-top:2px solid #000;width:10px;height:10px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;position:absolute;right:0;top:0;bottom:0;left:0;margin:auto;opacity:0;visibility:hidden;-webkit-transition:.3s;-o-transition:.3s;transition:.3s}
     25.ajaxloader{border:2px solid #ddd;-webkit-border-radius:50%;border-radius:50%;border-top:2px solid #000;width:10px;height:10px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;position:absolute;right:0;top:0;bottom:0;left:0;margin:auto;opacity:0;visibility:hidden;-webkit-transition:.3s;-o-transition:.3s;transition:.3s}
    2626.spiner-add .edit-column-content{position:relative}
    2727.spiner-add .ajaxloader{opacity:1;visibility:visible}
    28 @media only screen and (max-width:767px){.wp-filter .filter-items{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}
     28@media only screen and (max-width:767px){.wp-filter .filter-items{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}
    2929.wp-admin .form-table select,.wp-core-ui select{height:30px;min-height:30px;line-height:1}
    3030.media-filter-items .search-form input[type=search]{height:30px;min-height:30px}
    3131.media-filter-items input#post-query-submit{height:30px;min-height:30px;display:inline-block;line-height:1}
    32 }@media only screen and (max-width:600px){.media-filter-items .search-form{-webkit-box-flex:1;-ms-flex:1;flex:1}
    33 }@media only screen and (max-width:400px){.wp-filter .media-filter-items.filter-items{-ms-flex-wrap:wrap;flex-wrap:wrap}
    34 .media-filter-items .actions{-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}
    35 .wp-filter .media-filter-group{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%}
    36 .media-filter-items .search-form label.media-search-input-label,.media-filter-items .search-form{width:100%;-ms-flex-wrap:wrap;flex-wrap:wrap}
     32}@media only screen and (max-width:600px){.media-filter-items .search-form{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
     33}@media only screen and (max-width:400px){.wp-filter .media-filter-items.filter-items{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
     34.media-filter-items .actions{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}
     35.wp-filter .media-filter-group{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}
     36.media-filter-items .search-form label.media-search-input-label,.media-filter-items .search-form{width:100%;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
    3737.media-filter-items select{width:100%;margin-left:0 !important;margin-right:0 !important}
    3838.media-filter-items .actions select{margin-left:0 !important;margin-right:0 !important;margin-bottom:10px}
  • media-library-helper/tags/1.0.4/languages/media-library-helper.pot

    r2871647 r2871676  
    1 # Copyright (C) 2023 Media Library Helper
    2 # This file is distributed under the same license as the Media Library Helper package.
     1# Copyright (C) 2022 Photo gallery
     2# This file is distributed under the same license as the Photo gallery package.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Media Library Helper\n"
     5"Project-Id-Version: Photo gallery\n"
    66"MIME-Version: 1.0\n"
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "Language-Team: Codexins <zaman@codexin.com>\n"
    10 "Last-Translator: Codexins <zaman@codexin.com>\n"
    11 "POT-Creation-Date: 2023-02-27 11:08+0000\n"
     9"Language-Team: Codexins <support@codexin.com>\n"
     10"Last-Translator: Codexins <info@codexin.com>\n"
    1211"Report-Msgid-Bugs-To: https://codexin.com/\n"
    1312"X-Poedit-Basepath: ..\n"
     
    2221msgstr ""
    2322
     23#: lib/Admin/Extended_Media_List_Table.php:29
     24msgid "Edit"
     25msgstr ""
     26
     27#: lib/Admin/Extended_Media_List_Table.php:97
     28msgid "Bulk Edit"
     29msgstr ""
     30
     31#: lib/Admin/Extended_Media_List_Table.php:97
     32msgid "Quick Edit"
     33msgstr ""
     34
     35#: lib/Admin/Extended_Media_List_Table.php:115, lib/Admin/Media.php:36, lib/Admin/Media.php:168
     36msgid "Alt"
     37msgstr ""
     38
     39#: lib/Admin/Extended_Media_List_Table.php:121, lib/Admin/Media.php:37, lib/Admin/Media.php:169
     40msgid "Caption"
     41msgstr ""
     42
     43#: lib/Admin/Extended_Media_List_Table.php:127, lib/Admin/Media.php:38, lib/Admin/Media.php:170
     44msgid "Description"
     45msgstr ""
     46
     47#: lib/Admin/Extended_Media_List_Table.php:172
     48msgid "Cancel"
     49msgstr ""
     50
     51#: lib/Admin/Extended_Media_List_Table.php:182, lib/Admin/Extended_Media_List_Table.php:176
     52msgid "Update"
     53msgstr ""
     54
     55#: lib/Admin/Extended_Media_List_Table.php:223
     56msgid "Edit mode is locked"
     57msgstr ""
     58
     59#: lib/Admin/Extended_Media_List_Table.php:224
     60msgid "Edit mode is unlocked"
     61msgstr ""
     62
     63#: lib/Admin/Extended_Media_List_Table.php:255
     64msgid "Search"
     65msgstr ""
     66
     67#: lib/Admin/Extended_Media_List_Table.php:258
     68msgid "Filter by type"
     69msgstr ""
     70
     71#: lib/Admin/Media.php:167
     72msgid "All"
     73msgstr ""
     74
     75#. translators: %1$s: For using time
     76#: lib/Admin/Notice.php:47
     77msgid "Hi there! Stoked to see you're using %1$s for %2$s now - hope you like it! And if you do, please consider rating it. It would mean the world to us. keep on rocking!"
     78msgstr ""
     79
     80#: lib/Admin/Notice.php:51
     81msgid "Rate the plugin"
     82msgstr ""
     83
     84#: lib/Admin/Notice.php:52
     85msgid "Remind me later"
     86msgstr ""
     87
     88#: lib/Admin/Notice.php:53
     89msgid "Don't show again"
     90msgstr ""
     91
     92#: lib/Admin/Notice.php:54
     93msgid "I already did"
     94msgstr ""
     95
    2496#: templates/extended-upload.php:12
    2597msgid "Sorry, you are not allowed to upload files."
     
    215287msgid "Error saving media file."
    216288msgstr ""
    217 
    218 #: lib/Admin/Extended_Media_List_Table.php:29
    219 msgid "Edit"
    220 msgstr ""
    221 
    222 #: lib/Admin/Extended_Media_List_Table.php:97
    223 msgid "Bulk Edit"
    224 msgstr ""
    225 
    226 #: lib/Admin/Extended_Media_List_Table.php:97
    227 msgid "Quick Edit"
    228 msgstr ""
    229 
    230 #: lib/Admin/Extended_Media_List_Table.php:115, lib/Admin/Media.php:36, lib/Admin/Media.php:168
    231 msgid "Alt"
    232 msgstr ""
    233 
    234 #: lib/Admin/Extended_Media_List_Table.php:121, lib/Admin/Media.php:37, lib/Admin/Media.php:169
    235 msgid "Caption"
    236 msgstr ""
    237 
    238 #: lib/Admin/Extended_Media_List_Table.php:127, lib/Admin/Media.php:38, lib/Admin/Media.php:170
    239 msgid "Description"
    240 msgstr ""
    241 
    242 #: lib/Admin/Extended_Media_List_Table.php:172
    243 msgid "Cancel"
    244 msgstr ""
    245 
    246 #: lib/Admin/Extended_Media_List_Table.php:182, lib/Admin/Extended_Media_List_Table.php:176
    247 msgid "Update"
    248 msgstr ""
    249 
    250 #: lib/Admin/Extended_Media_List_Table.php:223
    251 msgid "Edit mode is locked"
    252 msgstr ""
    253 
    254 #: lib/Admin/Extended_Media_List_Table.php:224
    255 msgid "Edit mode is unlocked"
    256 msgstr ""
    257 
    258 #: lib/Admin/Extended_Media_List_Table.php:255
    259 msgid "Search"
    260 msgstr ""
    261 
    262 #: lib/Admin/Extended_Media_List_Table.php:258
    263 msgid "Filter by type"
    264 msgstr ""
    265 
    266 #: lib/Admin/Media.php:167
    267 msgid "All"
    268 msgstr ""
    269 
    270 #. translators: %1$s: For using time
    271 #: lib/Admin/Notice.php:47
    272 msgid "Hi there! Stoked to see you're using %1$s for %2$s now - hope you like it! And if you do, please consider rating it. It would mean the world to us. keep on rocking!"
    273 msgstr ""
    274 
    275 #: lib/Admin/Notice.php:51
    276 msgid "Rate the plugin"
    277 msgstr ""
    278 
    279 #: lib/Admin/Notice.php:52
    280 msgid "Remind me later"
    281 msgstr ""
    282 
    283 #: lib/Admin/Notice.php:53
    284 msgid "Don't show again"
    285 msgstr ""
    286 
    287 #: lib/Admin/Notice.php:54
    288 msgid "I already did"
    289 msgstr ""
  • media-library-helper/tags/1.0.4/lib/Admin/Media.php

    r2871647 r2871676  
    4444    }
    4545    /**
    46      * Sortable column.
    47      *
    48      * @param string $columns sortable column.
     46     * SHortable column.
     47     *
     48     * @param string $columns shortable column.
    4949     * @return array
    5050     */
     
    194194    public function media_filter( $query ) {
    195195        if ( is_admin() && $query->is_main_query() ) {
    196             if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && ! empty( $_GET['search-term'] ) ) {
     196            if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && ! empty( $_GET['search-term'] ) && ! empty( $_GET['s'] ) ) {
    197197                $ajax_nonce = sanitize_text_field( wp_unslash( $_GET['_ajax_nonce'] ) );
    198198                if ( ! wp_verify_nonce( $ajax_nonce, 'find-posts' ) ) {
     
    202202                $search_text = sanitize_text_field( wp_unslash( $_GET['s'] ) );
    203203                if ( 'alt' === $search_term ) {
    204                     $operator = ! empty($_GET['s']) ? 'LIKE' : 'NOT EXISTS';
    205204                    $query->set( 's', '' );
    206205                    $query->set(
     
    211210                                'key'     => '_wp_attachment_image_alt',
    212211                                'value'   => $search_text,
    213                                 'compare' => $operator,
    214                             ),
    215                             array(
    216                                 'key'     => '_wp_attachment_image_alt',
    217                                 'value'   => $search_text,
    218                                 'compare' => '=',
     212                                'compare' => 'LIKE',
    219213                            ),
    220214                        )
     
    273267        global $wpdb;
    274268
    275         if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && ! empty( $_GET['search-term'] ) && isset( $_GET['s'] ) ) {
     269        if ( isset( $_GET['_ajax_nonce'] ) && isset( $_GET['search-term'] ) && isset( $_GET['s'] ) ) {
    276270            $ajax_nonce = sanitize_text_field( wp_unslash( $_GET['_ajax_nonce'] ) );
    277271            if ( ! wp_verify_nonce( $ajax_nonce, 'find-posts' ) ) {
     
    280274            $search_term = sanitize_text_field( wp_unslash( $_GET['search-term'] ) );
    281275            $search_text = sanitize_text_field( wp_unslash( $_GET['s'] ) );
    282            
    283276            $cdxn_column_exists = 'exists';
    284             if (!function_exists('is_plugin_active')) {
    285                 include_once(ABSPATH . 'wp-admin/includes/plugin.php');
    286             }
    287277            if(is_plugin_active('give/give.php')) {
    288278                $cdxn_column_exists = 'not-exists';
    289279            }
    290 
    291             switch ($search_term) {
    292                 case 'all':
    293                     if($cdxn_column_exists == 'exists') {
    294                         if(!empty($search_text) ) {
    295                             $where .= $wpdb->prepare( " OR cdxn_post_meta.meta_key='_wp_attachment_image_alt' AND cdxn_post_meta.meta_value LIKE %s ", '%' . $search_text . '%' );
    296                         }
    297                     }
    298                     break;
    299                 case 'description':
     280            if ( ! empty( $search_text ) ) {
     281                global $wpdb;
     282                if ( ('all' === $search_term) && ($cdxn_column_exists == 'exists')) {
     283                    $where .= $wpdb->prepare( " OR cdxn_post_meta.meta_key='_wp_attachment_image_alt' AND cdxn_post_meta.meta_value LIKE %s ", '%' . $search_text . '%' );
     284                }
     285                if ( 'description' === $search_term ) {
    300286                    $where .= $wpdb->prepare( " AND $wpdb->posts.post_content  LIKE %s ", '%' . $search_text . '%' );
    301                     if( empty($search_text) ) {
    302                         $where .= $wpdb->prepare( " AND TRIM($wpdb->posts.post_content) = %s", $search_text );
    303                     }
    304                     break;
    305                 case 'caption':
     287                }
     288                if ( 'caption' === $search_term ) {
    306289                    $where .= $wpdb->prepare( " AND $wpdb->posts.post_excerpt  LIKE %s ", '%' . $search_text . '%' );
    307                     if( empty($search_text) ) {
    308                         $where .= $wpdb->prepare( " AND TRIM($wpdb->posts.post_excerpt) = %s", $search_text );
    309                     }
    310                     break;
     290                }
    311291            }
    312292        }
     
    321301        exit();
    322302    }
     303
     304
    323305}
  • media-library-helper/tags/1.0.4/lib/Plugin.php

    r2871647 r2871676  
    6161     * @var      string    $version    The current version of the plugin.
    6262     */
    63     protected $version = '1.1.0';
     63    protected $version = '1.0.4';
    6464
    6565    /**
     
    105105        $notice       = new Notice();
    106106        $admin_ajax   = new Admin_Ajax();
    107         //define admin styles and scripts hook
     107
    108108        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
    109109        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    110         //definr admin_ajax hooks
    111         $this->loader->add_action( 'wp_ajax_cdxn_mlh_attachment_save_bulk', $admin_ajax, 'attachment_save_bulk_edit' );
    112         $this->loader->add_action( 'wp_ajax_image_metadata', $admin_ajax, 'image_metadata' );
    113         // define media hooks
    114110        $this->loader->add_filter( 'manage_media_columns', $media, 'custom_column' );
    115111        $this->loader->add_action( 'manage_media_custom_column', $media, 'display_column_value', 10, 2 );
    116112        $this->loader->add_filter( 'manage_upload_sortable_columns', $media, 'sortable_columns' );
    117113        $this->loader->add_filter( 'posts_clauses', $media, 'manage_media_sortable_columns', 1, 2 );
    118         $this->loader->add_filter( 'request', $media, 'alt_column_orderby', 20, 2 );
     114        $this->loader->add_action( 'wp_ajax_image_metadata', $admin_ajax, 'image_metadata' );
    119115        $this->loader->add_action( 'restrict_manage_posts', $media, 'search_box', 10, 2 );
    120116        $this->loader->add_action( 'pre_get_posts', $media, 'media_filter' );
    121117        $this->loader->add_filter( 'posts_join', $media, 'search_join_table', 20, 2 );
    122118        $this->loader->add_filter( 'posts_where', $media, 'search_where_table', 20, 2 );
    123 
     119        $this->loader->add_filter( 'request', $media, 'alt_column_orderby', 20, 2 );
    124120        $this->loader->add_action( 'load-upload.php', $media, 'add_bulk_action_export_to_list_media' );
    125         //define notice hooks
     121        $this->loader->add_action( 'wp_ajax_cdxn_mlh_attachment_save_bulk', $admin_ajax, 'attachment_save_bulk_edit' );
    126122        $this->loader->add_action( 'admin_notices', $notice, 'notice' );
    127123        $this->loader->add_action( 'wp_ajax_rate_the_plugin', $notice, 'rate_the_plugin_action' );
  • media-library-helper/tags/1.0.4/media-library-helper.php

    r2871647 r2871676  
    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.1.0
     18 * Version:           1.0.4
    1919 * Author:            Codexin Technologies
    2020 * Author URI:        https://codexin.com/
  • media-library-helper/tags/1.0.4/readme.txt

    r2871647 r2871676  
    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 the WordPress media library to improve 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 If you have a large number of images in your WordPress media library and are concerned about updating their ALT tags, captions, or descriptions, worry no more. This plugin allows you to easily modify, delete, or update these elements with just a few clicks, directly from the media library page in your WordPress dashboard.
     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 This plugin is the perfect solution if you wish to update metadata for multiple images without visiting each edit page. Accessing the WordPress media library page lets you easily view the existing images' alt tags, captions, and descriptions. The plugin also identifies the images without an assigned ALT tag, caption, or description, and enables you to update them quickly and easily with just a few clicks.
     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.
    1818
    19 On-page SEO is a crucial element in boosting your website's SEO score, and assigning proper image ALT tags to every image on your website is critical. With the help of this plugin, you can quickly identify images with empty or blank ALT tags, blank captions or blank descriptions in your media library and update them to enhance your SEO score.
     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.
    2020
    2121
    2222= Features =
    23 1. Add/edit/update the image ALT tag, caption & description with one click directly from WordPress Media Library
    24 1. Search for a specific SEO keyword assigned to your images as an alt tag, caption or description.
    25 1. Search for blank or empty ALT tags, captions and descriptions and update/edit as needed.
    26 1. Sort media library images by ALT tag, image caption or image Description.
     231. Add/edit/update image ALT tag, caption & description with one click directly from WordPress Media Library
     241. Perform Search for a specific SEO Keyword that has been assigned to your images as alt tag, caption or description.
     251. Sort media library images by ALT tag, or image caption or Image Description.
     261. Find out blank or empty ALT tag, or empty caption or empty description throughout the media library
    27271. Bulk edit image ALT tag or alt attribute
    28281. Bulk edit image caption
    29291. Bulk edit image description
    30 1. Improve SEO score by assigning the proper image metadata.
     301. Improve SEO score by assigning the proper image meta data.
    3131
    3232
    33 = How does this plugin work or How to edit image metadata =
     33= How this plugin works or How to edit image meta data =
    34341. Install the plugin "Media Library Helper by Codexin"
    35351. From Dashboard, go to media --> Library --> Open the "List View"
     
    5151= Install using FTP =
    5252
    53 1. Download the plugin from the WordPress plugin repository
     531. Download the plugin from WordPress plugin repository
    54542. Unzip the archive on your computer
    55 3. Upload the media-library-helper directory to the /wp-content/plugins/ directory
     553. Upload media-library-helper directory to the /wp-content/plugins/ directory
    56564. Activate the plugin through the "Plugins" menu in WordPress
    5757
     
    61613. Single Edit Image ALT Tag, Caption & Description
    62624. Bulk Edit Image ALT Tag, Caption & Description
    63 5. Perform a Search
     635. Perform Search
    6464
    6565== Frequently Asked Questions ==
     
    6767= Will this plugin update existing images ALT tags, captions or descriptions in the media library? =
    6868
    69 This plugin will not automatically update existing images' metadata in the media library. Once you install this plugin, then you have to update the image ALT Tag (ALT Text), Caption, and Description manually using this plugin.
     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.
    7070
    7171= I can't see image ALT, Caption or Description columns inside Media Library =
    7272
    73 Make sure you have set the ALT tag, Caption and Description visible to the media library by going to the "Screen Options" at the top right corner of the page.
     73Make sure you have set ALT tag, Caption and Description visible to the media library by going to the "Screen Options" at the top right corner of the page.
    7474
    75 = How to bulk edit image metadata =
     75= How to bulk edit image meta data =
    7676
    77 Go to the list view in your media library dashboard, then select the images 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 needed. The provided image alt tag, caption and description will be set for all the selected images.
     77Go 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.
    7878
    79 = How to search for blank or empty alt tag, caption and description? =
     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 =
    8080
    81 Go to the list view in your media library dashboard. Keep the search box empty or blank. Select alt, caption or description from the search box dropdown list as you want and finally, click on filter.
    82 
    83 = I have updated/modified the image ALT tags, captions or descriptions for some of the images, but those images still have the old ALT tags, captions or descriptions where they are attached  =
    84 
    85 This usually happens 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 metadata or use a page builder that provides a separate option to add image ALT tags, captions or descriptions, then updating image metadata from the WordPress 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.
     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.
    8682
    8783== Changelog ==
    88 
    89 = 1.1.0 =
    90 * New features integrated. Users can now search directly in the media library search box for blank or empty alt tags, captions and descriptions.
    91 * Compatibility checked with PHP version up to 8.1
    92 * Minor CSS changes
    93 * Updated readme.txt
    9484
    9585= 1.0.4 =
  • media-library-helper/tags/1.0.4/vendor/autoload.php

    r2871647 r2871676  
    33// autoload.php @generated by Composer
    44
    5 if (PHP_VERSION_ID < 50600) {
    6     if (!headers_sent()) {
    7         header('HTTP/1.1 500 Internal Server Error');
    8     }
    9     $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    10     if (!ini_get('display_errors')) {
    11         if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
    12             fwrite(STDERR, $err);
    13         } elseif (!headers_sent()) {
    14             echo $err;
    15         }
    16     }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
    21 }
    22 
    235require_once __DIR__ . '/composer/autoload_real.php';
    246
  • media-library-helper/tags/1.0.4/vendor/composer/ClassLoader.php

    r2871647 r2871676  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
    46     private $vendorDir;
    47 
    4845    // PSR-4
    49     /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
    52      */
    5346    private $prefixLengthsPsr4 = array();
    54     /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
    57      */
    5847    private $prefixDirsPsr4 = array();
    59     /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
    62      */
    6348    private $fallbackDirsPsr4 = array();
    6449
    6550    // PSR-0
    66     /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
    69      */
    7051    private $prefixesPsr0 = array();
    71     /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
    74      */
    7552    private $fallbackDirsPsr0 = array();
    7653
    77     /** @var bool */
    7854    private $useIncludePath = false;
    79 
    80     /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
    83      */
    8455    private $classMap = array();
    85 
    86     /** @var bool */
    8756    private $classMapAuthoritative = false;
    88 
    89     /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
    92      */
    9357    private $missingClasses = array();
    94 
    95     /** @var ?string */
    9658    private $apcuPrefix;
    9759
    98     /**
    99      * @var self[]
    100      */
    101     private static $registeredLoaders = array();
    102 
    103     /**
    104      * @param ?string $vendorDir
    105      */
    106     public function __construct($vendorDir = null)
    107     {
    108         $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
    113      */
    11460    public function getPrefixes()
    11561    {
     
    12167    }
    12268
    123     /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
    126      */
    12769    public function getPrefixesPsr4()
    12870    {
     
    13072    }
    13173
    132     /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
    135      */
    13674    public function getFallbackDirs()
    13775    {
     
    13977    }
    14078
    141     /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
    144      */
    14579    public function getFallbackDirsPsr4()
    14680    {
     
    14882    }
    14983
    150     /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
    153      */
    15484    public function getClassMap()
    15585    {
     
    15888
    15989    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
    162      *
    163      * @return void
     90     * @param array $classMap Class to filename map
    16491     */
    16592    public function addClassMap(array $classMap)
     
    176103     * appending or prepending to the ones previously set for this prefix.
    177104     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
    181      *
    182      * @return void
     105     * @param string       $prefix  The prefix
     106     * @param array|string $paths   The PSR-0 root directories
     107     * @param bool         $prepend Whether to prepend the directories
    183108     */
    184109    public function add($prefix, $paths, $prepend = false)
     
    223148     * appending or prepending to the ones previously set for this namespace.
    224149     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     150     * @param string       $prefix  The prefix/namespace, with trailing '\\'
     151     * @param array|string $paths   The PSR-4 base directories
     152     * @param bool         $prepend Whether to prepend the directories
    228153     *
    229154     * @throws \InvalidArgumentException
    230      *
    231      * @return void
    232155     */
    233156    public function addPsr4($prefix, $paths, $prepend = false)
     
    273196     * replacing any others previously set for this prefix.
    274197     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
    277      *
    278      * @return void
     198     * @param string       $prefix The prefix
     199     * @param array|string $paths  The PSR-0 base directories
    279200     */
    280201    public function set($prefix, $paths)
     
    291212     * replacing any others previously set for this namespace.
    292213     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     214     * @param string       $prefix The prefix/namespace, with trailing '\\'
     215     * @param array|string $paths  The PSR-4 base directories
    295216     *
    296217     * @throws \InvalidArgumentException
    297      *
    298      * @return void
    299218     */
    300219    public function setPsr4($prefix, $paths)
     
    316235     *
    317236     * @param bool $useIncludePath
    318      *
    319      * @return void
    320237     */
    321238    public function setUseIncludePath($useIncludePath)
     
    340257     *
    341258     * @param bool $classMapAuthoritative
    342      *
    343      * @return void
    344259     */
    345260    public function setClassMapAuthoritative($classMapAuthoritative)
     
    362277     *
    363278     * @param string|null $apcuPrefix
    364      *
    365      * @return void
    366279     */
    367280    public function setApcuPrefix($apcuPrefix)
     
    384297     *
    385298     * @param bool $prepend Whether to prepend the autoloader or not
    386      *
    387      * @return void
    388299     */
    389300    public function register($prepend = false)
    390301    {
    391302        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
    392 
    393         if (null === $this->vendorDir) {
    394             return;
    395         }
    396 
    397         if ($prepend) {
    398             self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
    399         } else {
    400             unset(self::$registeredLoaders[$this->vendorDir]);
    401             self::$registeredLoaders[$this->vendorDir] = $this;
    402         }
    403303    }
    404304
    405305    /**
    406306     * Unregisters this instance as an autoloader.
    407      *
    408      * @return void
    409307     */
    410308    public function unregister()
    411309    {
    412310        spl_autoload_unregister(array($this, 'loadClass'));
    413 
    414         if (null !== $this->vendorDir) {
    415             unset(self::$registeredLoaders[$this->vendorDir]);
    416         }
    417311    }
    418312
     
    421315     *
    422316     * @param  string    $class The name of the class
    423      * @return true|null True if loaded, null otherwise
     317     * @return bool|null True if loaded, null otherwise
    424318     */
    425319    public function loadClass($class)
     
    430324            return true;
    431325        }
    432 
    433         return null;
    434326    }
    435327
     
    476368    }
    477369
    478     /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
    482      */
    483     public static function getRegisteredLoaders()
    484     {
    485         return self::$registeredLoaders;
    486     }
    487 
    488     /**
    489      * @param  string       $class
    490      * @param  string       $ext
    491      * @return string|false
    492      */
    493370    private function findFileWithExtension($class, $ext)
    494371    {
     
    562439 *
    563440 * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568441 */
    569442function includeFile($file)
  • media-library-helper/tags/1.0.4/vendor/composer/autoload_classmap.php

    r2871647 r2871676  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(__DIR__);
     5$vendorDir = dirname(dirname(__FILE__));
    66$baseDir = dirname($vendorDir);
    77
  • media-library-helper/tags/1.0.4/vendor/composer/autoload_namespaces.php

    r2871647 r2871676  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(__DIR__);
     5$vendorDir = dirname(dirname(__FILE__));
    66$baseDir = dirname($vendorDir);
    77
  • media-library-helper/tags/1.0.4/vendor/composer/autoload_psr4.php

    r2871647 r2871676  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(__DIR__);
     5$vendorDir = dirname(dirname(__FILE__));
    66$baseDir = dirname($vendorDir);
    77
  • media-library-helper/tags/1.0.4/vendor/composer/autoload_real.php

    r2871647 r2871676  
    2424
    2525        spl_autoload_register(array('ComposerAutoloaderInit8136a18bfe771e89bedea312c8e0f4a1', 'loadClassLoader'), true, true);
    26         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
     26        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    2727        spl_autoload_unregister(array('ComposerAutoloaderInit8136a18bfe771e89bedea312c8e0f4a1', 'loadClassLoader'));
    2828
    29         require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInit8136a18bfe771e89bedea312c8e0f4a1::getInitializer($loader));
     29        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     30        if ($useStaticLoader) {
     31            require __DIR__ . '/autoload_static.php';
     32
     33            call_user_func(\Composer\Autoload\ComposerStaticInit8136a18bfe771e89bedea312c8e0f4a1::getInitializer($loader));
     34        } else {
     35            $map = require __DIR__ . '/autoload_namespaces.php';
     36            foreach ($map as $namespace => $path) {
     37                $loader->set($namespace, $path);
     38            }
     39
     40            $map = require __DIR__ . '/autoload_psr4.php';
     41            foreach ($map as $namespace => $path) {
     42                $loader->setPsr4($namespace, $path);
     43            }
     44
     45            $classMap = require __DIR__ . '/autoload_classmap.php';
     46            if ($classMap) {
     47                $loader->addClassMap($classMap);
     48            }
     49        }
    3150
    3251        $loader->register(true);
Note: See TracChangeset for help on using the changeset viewer.