Skip to content
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
6 changes: 3 additions & 3 deletions admin/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="form-group wpsite_limit_posts_roles">
<label class="col-sm-3 control-label"><?php echo $role['name'] ?></label>
<div class="col-sm-9">
<input id="wpsite_limit_posts_settings_post_num_<?php echo $role_name ?>" name="wpsite_limit_posts_settings_post_num_<?php echo $role_name ?>" type="text" class="form-control" value="<?php echo isset( $settings['all_limit'][ $role_name ] ) ? esc_attr( $settings['all_limit'][ $role_name ] ) : ''; ?>">
<input id="wpsite_limit_posts_settings_post_num_<?php echo $role_name ?>" name="wpsite_limit_posts_settings_post_num_<?php echo $role_name ?>" type="text" class="form-control" value="<?php echo isset( $settings['all_limit'][ $role_name ] ) ? esc_attr( $settings['all_limit'][ $role_name ] ) : '-1'; ?>">
<em class="help-block"><?php esc_html_e( 'Default: -1 (i.e. unlimited)', 'wpsite-limit-posts' ) ?></em>
</div>
</div>
Expand All @@ -54,7 +54,7 @@
$all_users = get_users();

foreach ( $all_users as $user ) {
if ( user_can( $user->ID, 'publish_posts' ) && ! user_can( $user->ID, 'update_core' ) && ! user_can( $user->ID, 'install_themes' ) && ! user_can( $user->ID, 'install_plugins' ) ) {
if ( user_can( $user->ID, 'publish_posts' )) {
$users[] = $user;
}
}
Expand All @@ -64,7 +64,7 @@
<div class="form-group wpsite_limit_posts_users">
<label class="col-sm-3 control-label"><?php echo $user->user_nicename ?></label>
<div class="col-sm-9">
<input id="wpsite_limit_posts_settings_user_<?php echo $user->ID ?>" name="wpsite_limit_posts_settings_user_<?php echo $user->ID ?>" type="text" class="form-control" value="<?php echo isset( $settings['user_limit'][ $user->ID ] ) ? esc_attr( $settings['user_limit'][ $user->ID ] ) : ''; ?>">
<input id="wpsite_limit_posts_settings_user_<?php echo $user->ID ?>" name="wpsite_limit_posts_settings_user_<?php echo $user->ID ?>" type="text" class="form-control" value="<?php echo isset( $settings['user_limit'][ $user->ID ] ) ? esc_attr( $settings['user_limit'][ $user->ID ] ) : '-1'; ?>">
<em class="help-block"><?php esc_html_e( 'Default: -1 (i.e. unlimited)', 'wpsite-limit-posts' ) ?></em>
</div>
</div>
Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ 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.7.2
Stable tag: 2.1.1
Tested up to: 5.8
Stable tag: 2.1.2
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.2 = 2021-07-10
* Made compatible with WordPress 5.8
* Fix listing of all individual users

= 2.1.1 = 2021-05-17
* Made compatible with WordPress 5.7.2
* FIX - Updated Limited role, block all additional posts.
Expand Down
6 changes: 3 additions & 3 deletions wpsite-limit-posts.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Plugin Name: Limit Posts
* Plugin URI: https://draftpress.com/limit-posts
* Plugin URI: https://draftpress.com/products/limit-posts
* Description: Limit the number of posts or custom post types that can be published based on role (i.e, author) or user.
* Version: 2.1.1
* Version: 2.1.2
* Author: DraftPress
* Author URI: https://draftpress.com/
* License: GPL2
Expand All @@ -30,7 +30,7 @@ class WPsite_Limit_Posts
* WPsite_Limit_Posts version.
* @var string
*/
public $version = '2.1.1';
public $version = '2.1.2';

/**
* The single instance of the class.
Expand Down