Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wp 5.7.2 fix #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions js/wpsite_limit_posts_admin.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
jQuery(document).ready(function($) {

$("input:radio[name=wpsite_limit_posts_settings_all_users]").change(function(){
if ($(this).val() == 'capability') {
$(".wpsite_limit_posts_users").hide();
$(".wpsite_limit_posts_roles").show();
} else {
$(".wpsite_limit_posts_users").show();
$(".wpsite_limit_posts_roles").hide();
jQuery(function ($) {

$("input:radio[name=wpsite_limit_posts_settings_all_users]").on("change", function () {
if ($(this).val() == "capability") {
$(".wpsite_limit_posts_users").hide();
$(".wpsite_limit_posts_roles").show();
} else {
$(".wpsite_limit_posts_users").show();
$(".wpsite_limit_posts_roles").hide();
}
}
});
);

if ($("input:radio[name=wpsite_limit_posts_settings_all_users]:checked").val() == 'capability') {
if ($("input:radio[name=wpsite_limit_posts_settings_all_users]:checked").val() == "capability") {
$(".wpsite_limit_posts_users").hide();
$(".wpsite_limit_posts_roles").show();
} else {
$(".wpsite_limit_posts_users").show();
$(".wpsite_limit_posts_roles").hide();
}

});
});
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Limit Posts by 99 Robots ===
Contributors: 99robots, charliepatel
Contributors: 99robots, charliepatel, DraftPress
Donate link:
Tags: limit posts, limit number of posts, limit author posts, custom post limits, post creation limits, cpt limits, limit pages, limit user, limits, post limit, posts per user, user post limit, page limit, publish limit
Requires at least: 4.0
Tested up to: 5.2.3
Stable tag: 2.1.0
Tested up to: 5.7.2
Stable tag: 2.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -55,6 +55,11 @@ Rather than force the user to delete their post, such posts will be submitted fo

== Changelog ==

= 2.1.1 = 2021-05-17
* Made compatible with WordPress 5.7.2
* FIX - Updated Limited role, block all additional posts.
* FIX - Changed jQuery.fn.change() event shorthand.

= 2.1.0 = 2019-09-10
* Made compatible with WordPress 5.2.3
* NEW - Ability to limit posts for all roles with edit post capability except for Administrators.
Expand Down
Loading