Version Description
- [Added] Filter for suppressing admin notices, use:
add_filter( 'cac/suppress_site_wide_notices', '__return_true' )
- [Fixed] Only enable our plugin for taxonomies that are available in the admin
Download this release
Release Info
Developer | tschutter |
Plugin | Admin Columns |
Version | 2.5.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.6.2 to 2.5.6.3
- assets/js/admin-columns.js +0 -2
- assets/js/admin-settings.min.js +1 -1
- classes/addons.php +4 -0
- classes/review_notice.php +5 -0
- classes/settings.php +8 -5
- codepress-admin-columns.php +12 -4
- readme.txt +11 -7
assets/js/admin-columns.js
CHANGED
@@ -36,7 +36,5 @@ function cpac_quickedit_events() {
|
|
36 |
var id = $result.find( 'tr.iedit' ).attr( 'id' );
|
37 |
$( 'tr#' + id ).trigger( 'updated' );
|
38 |
}
|
39 |
-
;
|
40 |
-
|
41 |
} );
|
42 |
}
|
36 |
var id = $result.find( 'tr.iedit' ).attr( 'id' );
|
37 |
$( 'tr#' + id ).trigger( 'updated' );
|
38 |
}
|
|
|
|
|
39 |
} );
|
40 |
}
|
assets/js/admin-settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){var e=jQuery(".sidebox a.submit, .column-footer a.submit");e.click(function(n){var t=jQuery(this),a=t.closest(".columns-container").addClass("saving"),i=a.find(".cpac-columns form").serialize(),c=a.find(".ajax-message");e.attr("disabled","disabled"),a.find(".ajax-message").hide().removeClass("error updated"),jQuery(".cpac_message").remove();var o=jQuery.post(ajaxurl,{action:"cpac_columns_update",data:i,_ajax_nonce:cpac._ajax_nonce,storage_model:a.data("type"),layout:a.data("layout")},function(e){e&&(e.success?(c.addClass("updated").find("p").html(e.data),c.slideDown(),a.addClass("stored")):e.data&&(c.addClass(e.data.type).find("p").html(e.data.message),c.slideDown()))},"json");o.fail(function(e){}),o.always(function(){e.removeAttr("disabled","disabled"),a.removeClass("saving")}),jQuery(document).trigger("cac_update",a)})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).not('[data-default="1"]').first().clone(),t=e.attr("data-type");e.find("cpac-columns");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.cpac_column_refresh(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),a=e.attr("data-width"),i=e.attr("data-noclick"),c={at:"left top",my:"right top",edge:"right"},o=a?a:250;"right"==t&&(c={at:"right middle",my:"left middle",edge:"left"}),"left"==t&&(c={at:"left middle",my:"right middle",edge:"right"}),e.pointer({content:jQuery("#"+n).html(),position:c,pointerWidth:o,pointerClass:"cpac-wp-pointer wp-pointer wp-pointer-"+c.edge+(i?" noclick":"")}),i||e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){var e=jQuery(this);setTimeout(function(){e.hasClass("open")||0!=jQuery(".cpac-wp-pointer.hover").length||e.pointer("close")},100)}).on("close",function(){e.hasClass("open")||0!=jQuery(".cpac-wp-pointer.hover").length||e.pointer("close")})}),jQuery(".cpac-wp-pointer").hover(function(){jQuery(this).addClass("hover")},function(){jQuery(this).removeClass("hover"),jQuery(".cpac-pointer").trigger("close")})}function cpac_init(){var e=jQuery(".columns-container"),n=e.find(".cpac-boxes");if(n.hasClass("disabled"))n.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).find("input, select").prop("disabled",!0)});else{var t=n.find(".cpac-columns");t.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_indicator_events()}),t.cpac_bind_ordering()}jQuery(document).trigger("cac_menu_change",t),jQuery(document).trigger("cac_model_ready",e.data("type"))}function cpac_menu(){jQuery("#cpac_storage_modal_select").on("change",function(){jQuery(this).prop("disabled",!0).next(".spinner").css("display","inline-block"),jQuery(".view-link").hide(),window.location=jQuery(this).val()})}jQuery(document).ready(function(){return 0===jQuery("#cpac").length?!1:(cpac_init(),cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),void cpac_sidebar_feedback())}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this),n=e.closest("cpac-boxes").hasClass("disabled");e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(t){t.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),n||(e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e))})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this),n=e.find(".column_type select"),t=jQuery(this).closest(".columns-container");e.addClass("loading"),n.prop("disabled",1);var a=jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",_ajax_nonce:cpac._ajax_nonce,column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize(),storage_model:t.data("type"),layout:t.data("layout")},function(n){if(n){var t=jQuery("<div>"+n.data+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)}},"json");a.fail(function(n){var t=e.closest(".columns-container").find(".ajax-message");t.addClass("error").find("p").html(cpac_i18n.error),t.slideDown(),e.slideUp(function(){e.remove()}),console.log(n.responseText)}),a.always(function(){e.removeClass("loading"),n.prop("disabled",!1)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),a=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var i=jQuery("optgroup",this).children(":selected"),c=i.val(),o=i.text(),r=jQuery(this).next(".msg").hide(),l=n.find('.for-cloning-only .cpac-column[data-type="'+c+'"]');if(l.length)if(l.find(".is-disabled").length)r.html(l.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");else{if("undefined"==typeof l.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+c+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");var u=l.clone();u.addClass("opened").find(".column-form").show(),u.find(".column-meta").replaceWith(e.find(".column-meta")),u.find(".column-form").replaceWith(e.find(".column-form")),u.cpac_update_clone_id(t),e.replaceWith(u),u.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var i=e.find(".column-meta span.width");i.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();n>0?jQuery(this).text(n+t):jQuery(this).text("")});var c=e.find(".column_width .unit-select label");c.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),i.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),i.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),0>=n&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),e.find('[data-refresh="1"] select').change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),a=t.filter(":checked").val(),i=n.val(),c=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==a&&i>100&&(i=100),n.val(i),c.slider({range:"min",min:0,max:"%"==a?100:500,value:i,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this),t=jQuery(this).closest("cpac-columns");if("undefined"==typeof n.attr("data-clone")){var a=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(a).show()}var i=jQuery(this).clone();return i.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(i),i.column_bind_toggle(),i.column_bind_remove(),i.column_bind_clone(),i.column_bind_events(),t.cpac_bind_ordering(),jQuery(document).trigger("column_add",i),i},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),a=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),i=jQuery(a).find('*[data-type="'+t+'"]').not(n),c=jQuery.map(i,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});c.sort();for(var o=Math.max.apply(null,c)+1,r=0;o>=r&&-1!==jQuery.inArray(r,c);r++);var l=n.attr("data-clone"),u="";l&&(u="-"+l),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var d=n.find("input, select, label");jQuery(d).each(function(e,n){var a=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+u,a)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+u,a)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+u,a))})},jQuery.fn.cpac_bind_ordering=function(){jQuery(this).each(function(){jQuery(this).hasClass("ui-sortable")?jQuery(this).sortable("refresh"):jQuery(this).sortable({items:".cpac-column"})})},jQuery(document).bind("column_init column_change column_add",function(e,n){var t=jQuery(n).closest(".cpac-boxes").hasClass("disabled");t||(jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_indicator_events())}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.on("click",function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=jQuery("input",this).val(),a=e.find('[data-indicator-id="'+n+'"]').removeClass("on");"on"==t&&a.addClass("on");var i=e.find('[data-additional-option-id="'+n+'"]').addClass("hide");"on"==t&&i.removeClass("hide")}),e.find("[data-toggle-id]").each(function(){var n=e.find('[data-additional-option-id="'+jQuery(this).data("toggle-id")+'"]').addClass("hide");"on"==jQuery("input:checked",this).val()&&n.removeClass("hide")})},jQuery.fn.cpac_bind_indicator_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
|
1 |
+
function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){var e=jQuery(".sidebox a.submit, .column-footer a.submit");e.click(function(n){var t=jQuery(this),a=t.closest(".columns-container").addClass("saving"),i=a.find(".cpac-columns form").serialize(),c=a.find(".ajax-message");e.attr("disabled","disabled"),a.find(".ajax-message").hide().removeClass("error updated"),jQuery(".cpac_message").remove();var o=jQuery.post(ajaxurl,{action:"cpac_columns_update",data:i,_ajax_nonce:cpac._ajax_nonce,storage_model:a.data("type"),layout:a.data("layout")},function(e){e&&(e.success?(c.addClass("updated").find("p").html(e.data),c.slideDown(),a.addClass("stored")):e.data&&(c.addClass(e.data.type).find("p").html(e.data.message),c.slideDown()))},"json");o.fail(function(e){}),o.always(function(){e.removeAttr("disabled","disabled"),a.removeClass("saving")}),jQuery(document).trigger("cac_update",a)})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).not('[data-default="1"]').first().clone(),t=e.attr("data-type");e.find("cpac-columns");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.cpac_column_refresh(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),a=e.attr("data-width"),i=e.attr("data-noclick"),c={at:"left top",my:"right top",edge:"right"},o=a?a:250;"right"==t&&(c={at:"right middle",my:"left middle",edge:"left"}),"left"==t&&(c={at:"left middle",my:"right middle",edge:"right"}),e.pointer({content:jQuery("#"+n).html(),position:c,pointerWidth:o,pointerClass:"cpac-wp-pointer wp-pointer wp-pointer-"+c.edge+(i?" noclick":"")}),i||e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){var e=jQuery(this);setTimeout(function(){e.hasClass("open")||0!=jQuery(".cpac-wp-pointer.hover").length||e.pointer("close")},100)}).on("close",function(){e.hasClass("open")||0!=jQuery(".cpac-wp-pointer.hover").length||e.pointer("close")})}),jQuery(".cpac-wp-pointer").hover(function(){jQuery(this).addClass("hover")},function(){jQuery(this).removeClass("hover"),jQuery(".cpac-pointer").trigger("close")})}function cpac_init(){var e=jQuery(".columns-container"),n=e.find(".cpac-boxes");if(n.hasClass("disabled"))n.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).find("input, select").prop("disabled",!0)});else{var t=n.find(".cpac-columns");t.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_indicator_events()}),t.cpac_bind_ordering()}jQuery(document).trigger("cac_menu_change",t),jQuery(document).trigger("cac_model_ready",e.data("type"))}function cpac_menu(){jQuery("#cpac_storage_modal_select").on("change",function(){jQuery(this).prop("disabled",!0).next(".spinner").css("display","inline-block"),jQuery(".view-link").hide(),window.location=jQuery(this).val()})}jQuery(document).ready(function(){return 0!==jQuery("#cpac").length&&(cpac_init(),cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),void cpac_sidebar_feedback())}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this),n=e.closest("cpac-boxes").hasClass("disabled");e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(t){t.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),n||(e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e))})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this),n=e.find(".column_type select"),t=jQuery(this).closest(".columns-container");e.addClass("loading"),n.prop("disabled",1);var a=jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",_ajax_nonce:cpac._ajax_nonce,column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize(),storage_model:t.data("type"),layout:t.data("layout")},function(n){if(n){var t=jQuery("<div>"+n.data+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)}},"json");a.fail(function(n){var t=e.closest(".columns-container").find(".ajax-message");t.addClass("error").find("p").html(cpac_i18n.error),t.slideDown(),e.slideUp(function(){e.remove()}),console.log(n.responseText)}),a.always(function(){e.removeClass("loading"),n.prop("disabled",!1)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),a=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var i=jQuery("optgroup",this).children(":selected"),c=i.val(),o=i.text(),r=jQuery(this).next(".msg").hide(),l=n.find('.for-cloning-only .cpac-column[data-type="'+c+'"]');if(l.length)if(l.find(".is-disabled").length)r.html(l.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");else{if("undefined"==typeof l.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+c+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");var u=l.clone();u.addClass("opened").find(".column-form").show(),u.find(".column-meta").replaceWith(e.find(".column-meta")),u.find(".column-form").replaceWith(e.find(".column-form")),u.cpac_update_clone_id(t),e.replaceWith(u),u.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var i=e.find(".column-meta span.width");i.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();n>0?jQuery(this).text(n+t):jQuery(this).text("")});var c=e.find(".column_width .unit-select label");c.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),i.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),i.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),n<=0&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),e.find('[data-refresh="1"] select').change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),a=t.filter(":checked").val(),i=n.val(),c=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==a&&i>100&&(i=100),n.val(i),c.slider({range:"min",min:0,max:"%"==a?100:500,value:i,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this),t=jQuery(this).closest("cpac-columns");if("undefined"==typeof n.attr("data-clone")){var a=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(a).show()}var i=jQuery(this).clone();return i.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(i),i.column_bind_toggle(),i.column_bind_remove(),i.column_bind_clone(),i.column_bind_events(),t.cpac_bind_ordering(),jQuery(document).trigger("column_add",i),i},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),a=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),i=jQuery(a).find('*[data-type="'+t+'"]').not(n),c=jQuery.map(i,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});c.sort();for(var o=Math.max.apply(null,c)+1,r=0;r<=o&&-1!==jQuery.inArray(r,c);r++);var l=n.attr("data-clone"),u="";l&&(u="-"+l),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var d=n.find("input, select, label");jQuery(d).each(function(e,n){var a=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+u,a)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+u,a)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+u,a))})},jQuery.fn.cpac_bind_ordering=function(){jQuery(this).each(function(){jQuery(this).hasClass("ui-sortable")?jQuery(this).sortable("refresh"):jQuery(this).sortable({items:".cpac-column"})})},jQuery(document).bind("column_init column_change column_add",function(e,n){var t=jQuery(n).closest(".cpac-boxes").hasClass("disabled");t||(jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_indicator_events())}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.on("click",function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=jQuery("input",this).val(),a=e.find('[data-indicator-id="'+n+'"]').removeClass("on");"on"==t&&a.addClass("on");var i=e.find('[data-additional-option-id="'+n+'"]').addClass("hide");"on"==t&&i.removeClass("hide")}),e.find("[data-toggle-id]").each(function(){var n=e.find('[data-additional-option-id="'+jQuery(this).data("toggle-id")+'"]').addClass("hide");"on"==jQuery("input:checked",this).val()&&n.removeClass("hide")})},jQuery.fn.cpac_bind_indicator_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
|
classes/addons.php
CHANGED
@@ -43,6 +43,10 @@ class CPAC_Addons {
|
|
43 |
*/
|
44 |
public function missing_addon_notices() {
|
45 |
|
|
|
|
|
|
|
|
|
46 |
if ( get_user_meta( get_current_user_id(), self::OPTION_ADMIN_NOTICE_INSTALL_ADDONS_KEY, true ) ) {
|
47 |
return;
|
48 |
}
|
43 |
*/
|
44 |
public function missing_addon_notices() {
|
45 |
|
46 |
+
if ( cpac()->suppress_site_wide_notices() ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
if ( get_user_meta( get_current_user_id(), self::OPTION_ADMIN_NOTICE_INSTALL_ADDONS_KEY, true ) ) {
|
51 |
return;
|
52 |
}
|
classes/review_notice.php
CHANGED
@@ -33,6 +33,11 @@ class CPAC_Review_Notice {
|
|
33 |
}
|
34 |
|
35 |
public function maybe_display_review_notice() {
|
|
|
|
|
|
|
|
|
|
|
36 |
if ( current_user_can( 'manage_admin_columns' ) && ( ! get_user_meta( get_current_user_id(), self::OPTION_ADMIN_NOTICE_KEY, true ) ) ) {
|
37 |
if ( ( time() - ( 86400 * absint( $this->days_since_install ) ) ) >= $this->get_install_timestamp() ) {
|
38 |
add_action( 'admin_notices', array( $this, 'display_admin_review_notice' ) );
|
33 |
}
|
34 |
|
35 |
public function maybe_display_review_notice() {
|
36 |
+
|
37 |
+
if( cpac()->suppress_site_wide_notices() ){
|
38 |
+
return;
|
39 |
+
}
|
40 |
+
|
41 |
if ( current_user_can( 'manage_admin_columns' ) && ( ! get_user_meta( get_current_user_id(), self::OPTION_ADMIN_NOTICE_KEY, true ) ) ) {
|
42 |
if ( ( time() - ( 86400 * absint( $this->days_since_install ) ) ) >= $this->get_install_timestamp() ) {
|
43 |
add_action( 'admin_notices', array( $this, 'display_admin_review_notice' ) );
|
classes/settings.php
CHANGED
@@ -853,16 +853,19 @@ class CPAC_Settings {
|
|
853 |
<div class="inside">
|
854 |
<ul>
|
855 |
<li>
|
856 |
-
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-sorting' ) ), ac_get_site_url() ) ?>"><?php _e( 'Add Sorting', 'codepress-admin-columns' ); ?></a>
|
857 |
</li>
|
858 |
<li>
|
859 |
-
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-filtering' ) ), ac_get_site_url() ) ?>"><?php _e( 'Add Filtering', 'codepress-admin-columns' ); ?></a>
|
860 |
</li>
|
861 |
<li>
|
862 |
-
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-import-export' ) ), ac_get_site_url() ) ?>"><?php _e( 'Add Import/Export', 'codepress-admin-columns' ); ?></a>
|
863 |
</li>
|
864 |
<li>
|
865 |
-
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-editing' ) ), ac_get_site_url() ) ?>"><?php _e( 'Add
|
|
|
|
|
|
|
866 |
</li>
|
867 |
</ul>
|
868 |
<p>
|
@@ -923,7 +926,7 @@ class CPAC_Settings {
|
|
923 |
'hashtags' => 'admincolumns',
|
924 |
'text' => urlencode( "I'm using Admin Columns for WordPress!" ),
|
925 |
'url' => urlencode( 'http://wordpress.org/plugins/codepress-admin-columns/' ),
|
926 |
-
'via' => '
|
927 |
), 'https://twitter.com/intent/tweet' ); ?>" target="_blank">
|
928 |
<div class="dashicons dashicons-twitter"></div> <?php _e( 'Tweet', 'codepress-admin-columns' ); ?>
|
929 |
</a>
|
853 |
<div class="inside">
|
854 |
<ul>
|
855 |
<li>
|
856 |
+
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-sorting' ) ), ac_get_site_url() . '/upgrade-to-admin-columns-pro/' ) ?>"><?php _e( 'Add Sorting', 'codepress-admin-columns' ); ?></a>
|
857 |
</li>
|
858 |
<li>
|
859 |
+
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-filtering' ) ), ac_get_site_url() . '/upgrade-to-admin-columns-pro/' ) ?>"><?php _e( 'Add Filtering', 'codepress-admin-columns' ); ?></a>
|
860 |
</li>
|
861 |
<li>
|
862 |
+
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-import-export' ) ), ac_get_site_url() . '/upgrade-to-admin-columns-pro/' ) ?>"><?php _e( 'Add Import/Export', 'codepress-admin-columns' ); ?></a>
|
863 |
</li>
|
864 |
<li>
|
865 |
+
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-editing' ) ), ac_get_site_url() . '/upgrade-to-admin-columns-pro/' ) ?>"><?php _e( 'Add Inline Edit', 'codepress-admin-columns' ); ?></a>
|
866 |
+
</li>
|
867 |
+
<li>
|
868 |
+
<a href="<?php echo add_query_arg( array_merge( $url_args, array( 'utm_content' => 'usp-columns-sets' ) ), ac_get_site_url() . '/upgrade-to-admin-columns-pro/' ) ?>"><?php _e( 'Multiple Column Sets', 'codepress-admin-columns' ); ?></a>
|
869 |
</li>
|
870 |
</ul>
|
871 |
<p>
|
926 |
'hashtags' => 'admincolumns',
|
927 |
'text' => urlencode( "I'm using Admin Columns for WordPress!" ),
|
928 |
'url' => urlencode( 'http://wordpress.org/plugins/codepress-admin-columns/' ),
|
929 |
+
'via' => 'wpcolumns'
|
930 |
), 'https://twitter.com/intent/tweet' ); ?>" target="_blank">
|
931 |
<div class="dashicons dashicons-twitter"></div> <?php _e( 'Tweet', 'codepress-admin-columns' ); ?>
|
932 |
</a>
|
codepress-admin-columns.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Admin Columns
|
4 |
-
Version: 2.5.6.
|
5 |
Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
|
6 |
Author: AdminColumns.com
|
7 |
Author URI: https://www.admincolumns.com
|
@@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
32 |
}
|
33 |
|
34 |
// Plugin information
|
35 |
-
define( 'CPAC_VERSION', '2.5.6.
|
36 |
define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // Latest version which requires an upgrade
|
37 |
define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
|
38 |
define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
|
@@ -229,6 +229,13 @@ class CPAC {
|
|
229 |
return $default;
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
/**
|
233 |
* Get registered storage models
|
234 |
*
|
@@ -324,6 +331,7 @@ class CPAC {
|
|
324 |
* Get column object
|
325 |
*
|
326 |
* @since 2.5.4
|
|
|
327 |
* @param $storage_key CPAC_Storage_Model->key
|
328 |
* @param $layout_id CPAC_Storage_Model->layout
|
329 |
* @param $column_name CPAC_Column->name
|
@@ -380,7 +388,7 @@ class CPAC {
|
|
380 |
|
381 |
$post_types = array_merge( $post_types, get_post_types( array(
|
382 |
'_builtin' => false,
|
383 |
-
'show_ui' => true
|
384 |
) ) );
|
385 |
|
386 |
/**
|
@@ -401,7 +409,7 @@ class CPAC {
|
|
401 |
* @return array List of taxonomies
|
402 |
*/
|
403 |
public function get_taxonomies() {
|
404 |
-
$taxonomies = get_taxonomies( array( '
|
405 |
if ( isset( $taxonomies['post_format'] ) ) {
|
406 |
unset( $taxonomies['post_format'] );
|
407 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Admin Columns
|
4 |
+
Version: 2.5.6.3
|
5 |
Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
|
6 |
Author: AdminColumns.com
|
7 |
Author URI: https://www.admincolumns.com
|
32 |
}
|
33 |
|
34 |
// Plugin information
|
35 |
+
define( 'CPAC_VERSION', '2.5.6.3' ); // Current plugin version
|
36 |
define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // Latest version which requires an upgrade
|
37 |
define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
|
38 |
define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
|
229 |
return $default;
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
+
* @since 2.5.6.3
|
234 |
+
*/
|
235 |
+
public function suppress_site_wide_notices() {
|
236 |
+
return apply_filters( 'cac/suppress_site_wide_notices', false );
|
237 |
+
}
|
238 |
+
|
239 |
/**
|
240 |
* Get registered storage models
|
241 |
*
|
331 |
* Get column object
|
332 |
*
|
333 |
* @since 2.5.4
|
334 |
+
*
|
335 |
* @param $storage_key CPAC_Storage_Model->key
|
336 |
* @param $layout_id CPAC_Storage_Model->layout
|
337 |
* @param $column_name CPAC_Column->name
|
388 |
|
389 |
$post_types = array_merge( $post_types, get_post_types( array(
|
390 |
'_builtin' => false,
|
391 |
+
'show_ui' => true,
|
392 |
) ) );
|
393 |
|
394 |
/**
|
409 |
* @return array List of taxonomies
|
410 |
*/
|
411 |
public function get_taxonomies() {
|
412 |
+
$taxonomies = get_taxonomies( array( 'show_ui' => true ) );
|
413 |
if ( isset( $taxonomies['post_format'] ) ) {
|
414 |
unset( $taxonomies['post_format'] );
|
415 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.5.1
|
7 |
-
Stable tag: 2.5.6.
|
8 |
|
9 |
Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
|
10 |
|
@@ -210,6 +210,10 @@ You can find a list of the available actions and filters (and examples on how to
|
|
210 |
|
211 |
== Changelog ==
|
212 |
|
|
|
|
|
|
|
|
|
213 |
= 2.5.6.2 =
|
214 |
* [Fixed] Hotfix cleanup.
|
215 |
|
@@ -236,7 +240,7 @@ You can find a list of the available actions and filters (and examples on how to
|
|
236 |
* [Fixed] WPML will correctly display it's "+" icons again. Make sure to add/remove the column.
|
237 |
* [Improved Messages on the settings screen (when using restore columns) are now displayed directly above the columns
|
238 |
* [Improved] Excerpt column will now display a label "excerpt from content" when the actual excerpt field is empty
|
239 |
-
* [Added] New filter 'cac/get_posts/post_status' has been added to change post_status when using CPAC_Storage_model::get_posts()
|
240 |
|
241 |
= 2.5.3 =
|
242 |
* [Fixed] Fixes an issue with some 3rd party column not being visible
|
@@ -263,10 +267,10 @@ You can find a list of the available actions and filters (and examples on how to
|
|
263 |
* [Fixed] Columns with an imagesize selection setting will have the a default option selected
|
264 |
* [Removed] Removed loading columns through 'load-edit.php' filter
|
265 |
* [Added] Column settings are now stored without the need to refresh the page (through ajax)
|
266 |
-
* [Added] You can disable the columns delete confirmation through this filter
|
267 |
* [Improved] The width of default columns (e.g. date and author) are now displayed
|
268 |
* [Improved] bbPress columns are loaded correctly
|
269 |
-
* [Updated] All languages files have been updated from Transifex
|
270 |
*
|
271 |
* [Developer notes]
|
272 |
* [Refactor] CPAC now is a singleton class
|
@@ -301,10 +305,10 @@ You can find a list of the available actions and filters (and examples on how to
|
|
301 |
|
302 |
= 2.4.9 =
|
303 |
* [Added] Display format Url added to Custom Fields
|
304 |
-
* [Added] Allow the use of before and after fields for all columns. Use add_filter( 'cac/column/properties/use_before_after', '__return_true' )
|
305 |
* [Fixed] Removed Field Groups from post types
|
306 |
* [Fixed] Removed additional avatars from the comments view
|
307 |
-
* [Added] Added the option to replace the Custom Field select menu with a text input. Use add_filter( 'cac/column/meta/use_text_input', '__return_true' )
|
308 |
|
309 |
= 2.4.8 =
|
310 |
* [Updated] Hidden custom fields are now grouped as "Hidden" in the dropdown list
|
@@ -376,7 +380,7 @@ You can find a list of the available actions and filters (and examples on how to
|
|
376 |
* [Fixed] Fixed media actions column
|
377 |
|
378 |
= 2.3.2 =
|
379 |
-
* [Updated] All translations from Transifex
|
380 |
* [Updated] 100% Spanish translation thanks to Carlos
|
381 |
* [Updated] Custom Fields will now display an icon for file attachments in the correct specified dimensions
|
382 |
* [Added] Public methods to CPAC_Column; get_type(), is_type(), is_field_type(), get_field_type()
|
4 |
Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.5.1
|
7 |
+
Stable tag: 2.5.6.3
|
8 |
|
9 |
Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
|
10 |
|
210 |
|
211 |
== Changelog ==
|
212 |
|
213 |
+
= 2.5.6.3 =
|
214 |
+
* [Added] Filter for suppressing admin notices, use: `add_filter( 'cac/suppress_site_wide_notices', '__return_true' )`
|
215 |
+
* [Fixed] Only enable our plugin for taxonomies that are available in the admin
|
216 |
+
|
217 |
= 2.5.6.2 =
|
218 |
* [Fixed] Hotfix cleanup.
|
219 |
|
240 |
* [Fixed] WPML will correctly display it's "+" icons again. Make sure to add/remove the column.
|
241 |
* [Improved Messages on the settings screen (when using restore columns) are now displayed directly above the columns
|
242 |
* [Improved] Excerpt column will now display a label "excerpt from content" when the actual excerpt field is empty
|
243 |
+
* [Added] New filter 'cac/get_posts/post_status' has been added to change post_status when using `CPAC_Storage_model::get_posts()``
|
244 |
|
245 |
= 2.5.3 =
|
246 |
* [Fixed] Fixes an issue with some 3rd party column not being visible
|
267 |
* [Fixed] Columns with an imagesize selection setting will have the a default option selected
|
268 |
* [Removed] Removed loading columns through 'load-edit.php' filter
|
269 |
* [Added] Column settings are now stored without the need to refresh the page (through ajax)
|
270 |
+
* [Added] You can disable the columns delete confirmation through this filter `ac/delete_confirmation`
|
271 |
* [Improved] The width of default columns (e.g. date and author) are now displayed
|
272 |
* [Improved] bbPress columns are loaded correctly
|
273 |
+
* [Updated] All languages files have been updated from [Transifex](https://www.transifex.com/codepress/admin-columns)
|
274 |
*
|
275 |
* [Developer notes]
|
276 |
* [Refactor] CPAC now is a singleton class
|
305 |
|
306 |
= 2.4.9 =
|
307 |
* [Added] Display format Url added to Custom Fields
|
308 |
+
* [Added] Allow the use of before and after fields for all columns. Use `add_filter( 'cac/column/properties/use_before_after', '__return_true' )`.
|
309 |
* [Fixed] Removed Field Groups from post types
|
310 |
* [Fixed] Removed additional avatars from the comments view
|
311 |
+
* [Added] Added the option to replace the Custom Field select menu with a text input. Use `add_filter( 'cac/column/meta/use_text_input', '__return_true' )`.
|
312 |
|
313 |
= 2.4.8 =
|
314 |
* [Updated] Hidden custom fields are now grouped as "Hidden" in the dropdown list
|
380 |
* [Fixed] Fixed media actions column
|
381 |
|
382 |
= 2.3.2 =
|
383 |
+
* [Updated] All translations from [Transifex](https://www.transifex.com/projects/p/admin-columns)
|
384 |
* [Updated] 100% Spanish translation thanks to Carlos
|
385 |
* [Updated] Custom Fields will now display an icon for file attachments in the correct specified dimensions
|
386 |
* [Added] Public methods to CPAC_Column; get_type(), is_type(), is_field_type(), get_field_type()
|