Changeset 3076973
- Timestamp:
- 04/25/2024 11:19:12 AM (23 months ago)
- Location:
- post-lockdown
- Files:
-
- 2 added
- 3 deleted
- 20 edited
- 1 copied
-
assets/banner-1544x500.png (modified) (1 prop) (previous)
-
assets/banner-772x250.png (deleted)
-
assets/icon-256x256.png (modified) (1 prop) (previous)
-
tags/3.0.13 (copied) (copied from post-lockdown/trunk)
-
tags/3.0.13/assets (deleted)
-
tags/3.0.13/composer.json (added)
-
tags/3.0.13/post-lockdown.php (modified) (2 diffs)
-
tags/3.0.13/readme.txt (modified) (5 diffs)
-
tags/3.0.13/src/PostLockdown/AdminNotice.php (modified) (2 diffs)
-
tags/3.0.13/src/PostLockdown/BulkActions.php (modified) (1 diff)
-
tags/3.0.13/src/PostLockdown/OptionsPage.php (modified) (2 diffs)
-
tags/3.0.13/src/PostLockdown/PostLockdown.php (modified) (1 diff)
-
tags/3.0.13/src/PostLockdown/StatusColumn.php (modified) (4 diffs)
-
tags/3.0.13/src/PostLockdown/WpCli.php (modified) (1 diff)
-
tags/3.0.13/view/options-page.php (modified) (2 diffs)
-
trunk/assets (deleted)
-
trunk/composer.json (added)
-
trunk/post-lockdown.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/src/PostLockdown/AdminNotice.php (modified) (2 diffs)
-
trunk/src/PostLockdown/BulkActions.php (modified) (1 diff)
-
trunk/src/PostLockdown/OptionsPage.php (modified) (2 diffs)
-
trunk/src/PostLockdown/PostLockdown.php (modified) (1 diff)
-
trunk/src/PostLockdown/StatusColumn.php (modified) (4 diffs)
-
trunk/src/PostLockdown/WpCli.php (modified) (1 diff)
-
trunk/view/options-page.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-lockdown/assets/banner-1544x500.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
post-lockdown/assets/icon-256x256.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
post-lockdown/tags/3.0.13/post-lockdown.php
r2741876 r3076973 2 2 /** 3 3 * Plugin Name: Post Lockdown 4 * Plugin URI: https://github.com/andyexeter/post-lockdown 4 5 * Description: Allows admins to protect selected posts and pages so they cannot be trashed or deleted by non-admin users. 5 * Version: 3.0.6 6 * Version: 3.0.13 7 * Requires at least: 4.6 8 * Requires PHP: 7.4 6 9 * Author: Andy Palmer 7 10 * Author URI: https://andypalmer.me 8 * License: GPL2 9 * Text Domain: postlockdown. 11 * Text Domain: post-lockdown 12 * License: GPL v2 or later 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Domain Path: /languages 10 15 */ 11 16 if (is_admin() || (defined('WP_CLI') && WP_CLI)) { … … 18 23 19 24 global $postlockdown; 20 $postlockdown = new \PostLockdown\PostLockdown(plugin_dir_path(__FILE__), plugin_dir_url(__FILE__));25 $postlockdown = new PostLockdown\PostLockdown(plugin_dir_path(__FILE__), plugin_dir_url(__FILE__)); 21 26 22 27 register_uninstall_hook(__FILE__, ['PostLockdown', '_uninstall']); 23 28 24 29 if (defined('WP_CLI') && WP_CLI) { 25 \WP_CLI::add_command('postlockdown', new \PostLockdown\WpCli($postlockdown));30 WP_CLI::add_command('postlockdown', new PostLockdown\WpCli($postlockdown)); 26 31 } 27 32 } -
post-lockdown/tags/3.0.13/readme.txt
r3075103 r3076973 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BRET43XLNLZCJ&lc=GB&item_name=Post%20Lockdown¤cy_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted 4 4 Tags: posts, lock, protect, capabilities, capability, trash, delete 5 Requires at least: 3.85 Requires at least: 4.6 6 6 Tested up to: 6.5 7 Stable tag: 3.0. 77 Stable tag: 3.0.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Changelog == 69 69 70 = 3.0.13 = 71 * Updated minimum required WordPress version to 4.6 so translations are loaded from translate.wordpress.org (Thanks to @huubl) 72 73 = 3.0.8 = 74 * Updated text domain to match plugin slug for localization (Thanks to @huubl) 75 70 76 = 3.0.7 = 71 77 * Added internationalization support to post list status column (Thanks to @huubl) … … 117 123 118 124 = 1.1 = 125 119 126 * Added functionality to prevent non-admins changing the post status of a protected published post to something which could remove it from the front end e.g Draft, Private or Scheduled. 120 127 * Fixed an issue which caused a PHP warning when a non-admin used the Quick Edit box for a protected post. … … 123 130 124 131 = 1.0.1 = 132 125 133 * Fixed an issue where post IDs could not be filtered if none were set on the options page. 126 134 * Added revisions and the WooCommerce product_variation post type to the excluded post types list. … … 129 137 130 138 = 1.0.0 = 139 131 140 * Initial release 132 141 -
post-lockdown/tags/3.0.13/src/PostLockdown/AdminNotice.php
r2216544 r3076973 6 6 { 7 7 /** Query arg used to determine if an admin notice should be displayed. */ 8 const QUERY_ARG = 'plstatuschange';8 public const QUERY_ARG = 'plstatuschange'; 9 9 10 10 private $plugin_path; … … 60 60 $notices[] = [ 61 61 'class' => 'error', 62 'message' => __('This post is protected by Post Lockdown and must stay published.', 'post lockdown'),62 'message' => __('This post is protected by Post Lockdown and must stay published.', 'post-lockdown'), 63 63 ]; 64 64 } -
post-lockdown/tags/3.0.13/src/PostLockdown/BulkActions.php
r2741876 r3076973 14 14 $this->postlockdown = $postlockdown; 15 15 $this->bulk_actions = [ 16 'postlockdown-lock' => __('Post Lockdown: Lock', 'post lockdown'),17 'postlockdown-unlock' => __('Post Lockdown: Unlock', 'post lockdown'),18 'postlockdown-protect' => __('Post Lockdown: Protect', 'post lockdown'),19 'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'post lockdown'),16 'postlockdown-lock' => __('Post Lockdown: Lock', 'post-lockdown'), 17 'postlockdown-unlock' => __('Post Lockdown: Unlock', 'post-lockdown'), 18 'postlockdown-protect' => __('Post Lockdown: Protect', 'post-lockdown'), 19 'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'post-lockdown'), 20 20 ]; 21 21 -
post-lockdown/tags/3.0.13/src/PostLockdown/OptionsPage.php
r2683255 r3076973 5 5 class OptionsPage 6 6 { 7 const PAGE_TITLE = 'Post Lockdown';7 public const PAGE_TITLE = 'Post Lockdown'; 8 8 /** @var string Page hook returned by add_options_page(). */ 9 9 private $page_hook; … … 63 63 $blocks[] = [ 64 64 'key' => 'locked', 65 'heading' => __('Locked Posts', 'post lockdown'),65 'heading' => __('Locked Posts', 'post-lockdown'), 66 66 'input_name' => 'locked_post_ids', 67 'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post lockdown'),67 'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post-lockdown'), 68 68 ]; 69 69 70 70 $blocks[] = [ 71 71 'key' => 'protected', 72 'heading' => __('Protected Posts', 'post lockdown'),72 'heading' => __('Protected Posts', 'post-lockdown'), 73 73 'input_name' => 'protected_post_ids', 74 'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post lockdown'),74 'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post-lockdown'), 75 75 ]; 76 76 -
post-lockdown/tags/3.0.13/src/PostLockdown/PostLockdown.php
r2683255 r3076973 6 6 { 7 7 /** Plugin key for options and the option page. */ 8 const KEY = 'postlockdown';9 const VERSION = '3.0.4';8 public const KEY = 'postlockdown'; 9 public const VERSION = '3.0.13'; 10 10 11 11 /** @var array List of post IDs which cannot be edited, trashed or deleted. */ -
post-lockdown/tags/3.0.13/src/PostLockdown/StatusColumn.php
r3075097 r3076973 5 5 class StatusColumn 6 6 { 7 const COLUMN_KEY = 'postlockdown_status';7 public const COLUMN_KEY = 'postlockdown_status'; 8 8 9 9 /** @var PostLockdown */ … … 51 51 * on the current screen. 52 52 * 53 * @param $result54 * @param $option53 * @param array $result 54 * @param string $option 55 55 * @param \WP_User $user 56 56 * … … 125 125 $html = sprintf( 126 126 '<span title="%s" class="dashicons dashicons-lock"></span> %s', 127 __( 'Locked - Cannot be edited, trashed or deleted', 'postlockdown'),128 __( 'Locked', 'postlockdown')127 __('Locked - Cannot be edited, trashed or deleted', 'post-lockdown'), 128 __('Locked', 'post-lockdown') 129 129 ); 130 130 $status = 'locked'; … … 132 132 $html = sprintf( 133 133 '<span title="%s" class="dashicons dashicons-unlock"></span> %s', 134 __( 'Protected - Cannot be trashed or deleted', 'postlockdown'),135 __( 'Protected', 'postlockdown')134 __('Protected - Cannot be trashed or deleted', 'post-lockdown'), 135 __('Protected', 'post-lockdown') 136 136 ); 137 137 $status = 'protected'; -
post-lockdown/tags/3.0.13/src/PostLockdown/WpCli.php
r2373902 r3076973 122 122 * 123 123 * @when after_wp_load 124 * 124 125 * @subcommand protected 125 126 */ -
post-lockdown/tags/3.0.13/view/options-page.php
r2683255 r3076973 4 4 <?php settings_fields(PostLockdown\PostLockdown::KEY); ?> 5 5 <p> 6 <?php esc_html_e('Select locked and protected posts by adding them to the boxes on the right. Use the search field to filter the list of posts.', 'post lockdown'); ?>6 <?php esc_html_e('Select locked and protected posts by adding them to the boxes on the right. Use the search field to filter the list of posts.', 'post-lockdown'); ?> 7 7 </p> 8 8 <table class="form-table"> … … 15 15 <div class="pl-posts pl-posts-available"> 16 16 <div class="pl-searchbox"> 17 <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post lockdown'); ?>">17 <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post-lockdown'); ?>"> 18 18 </div> 19 19 <span class="spinner"></span> -
post-lockdown/trunk/post-lockdown.php
r2741876 r3076973 2 2 /** 3 3 * Plugin Name: Post Lockdown 4 * Plugin URI: https://github.com/andyexeter/post-lockdown 4 5 * Description: Allows admins to protect selected posts and pages so they cannot be trashed or deleted by non-admin users. 5 * Version: 3.0.6 6 * Version: 3.0.13 7 * Requires at least: 4.6 8 * Requires PHP: 7.4 6 9 * Author: Andy Palmer 7 10 * Author URI: https://andypalmer.me 8 * License: GPL2 9 * Text Domain: postlockdown. 11 * Text Domain: post-lockdown 12 * License: GPL v2 or later 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Domain Path: /languages 10 15 */ 11 16 if (is_admin() || (defined('WP_CLI') && WP_CLI)) { … … 18 23 19 24 global $postlockdown; 20 $postlockdown = new \PostLockdown\PostLockdown(plugin_dir_path(__FILE__), plugin_dir_url(__FILE__));25 $postlockdown = new PostLockdown\PostLockdown(plugin_dir_path(__FILE__), plugin_dir_url(__FILE__)); 21 26 22 27 register_uninstall_hook(__FILE__, ['PostLockdown', '_uninstall']); 23 28 24 29 if (defined('WP_CLI') && WP_CLI) { 25 \WP_CLI::add_command('postlockdown', new \PostLockdown\WpCli($postlockdown));30 WP_CLI::add_command('postlockdown', new PostLockdown\WpCli($postlockdown)); 26 31 } 27 32 } -
post-lockdown/trunk/readme.txt
r3075103 r3076973 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BRET43XLNLZCJ&lc=GB&item_name=Post%20Lockdown¤cy_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted 4 4 Tags: posts, lock, protect, capabilities, capability, trash, delete 5 Requires at least: 3.85 Requires at least: 4.6 6 6 Tested up to: 6.5 7 Stable tag: 3.0. 77 Stable tag: 3.0.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Changelog == 69 69 70 = 3.0.13 = 71 * Updated minimum required WordPress version to 4.6 so translations are loaded from translate.wordpress.org (Thanks to @huubl) 72 73 = 3.0.8 = 74 * Updated text domain to match plugin slug for localization (Thanks to @huubl) 75 70 76 = 3.0.7 = 71 77 * Added internationalization support to post list status column (Thanks to @huubl) … … 117 123 118 124 = 1.1 = 125 119 126 * Added functionality to prevent non-admins changing the post status of a protected published post to something which could remove it from the front end e.g Draft, Private or Scheduled. 120 127 * Fixed an issue which caused a PHP warning when a non-admin used the Quick Edit box for a protected post. … … 123 130 124 131 = 1.0.1 = 132 125 133 * Fixed an issue where post IDs could not be filtered if none were set on the options page. 126 134 * Added revisions and the WooCommerce product_variation post type to the excluded post types list. … … 129 137 130 138 = 1.0.0 = 139 131 140 * Initial release 132 141 -
post-lockdown/trunk/src/PostLockdown/AdminNotice.php
r2216544 r3076973 6 6 { 7 7 /** Query arg used to determine if an admin notice should be displayed. */ 8 const QUERY_ARG = 'plstatuschange';8 public const QUERY_ARG = 'plstatuschange'; 9 9 10 10 private $plugin_path; … … 60 60 $notices[] = [ 61 61 'class' => 'error', 62 'message' => __('This post is protected by Post Lockdown and must stay published.', 'post lockdown'),62 'message' => __('This post is protected by Post Lockdown and must stay published.', 'post-lockdown'), 63 63 ]; 64 64 } -
post-lockdown/trunk/src/PostLockdown/BulkActions.php
r2741876 r3076973 14 14 $this->postlockdown = $postlockdown; 15 15 $this->bulk_actions = [ 16 'postlockdown-lock' => __('Post Lockdown: Lock', 'post lockdown'),17 'postlockdown-unlock' => __('Post Lockdown: Unlock', 'post lockdown'),18 'postlockdown-protect' => __('Post Lockdown: Protect', 'post lockdown'),19 'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'post lockdown'),16 'postlockdown-lock' => __('Post Lockdown: Lock', 'post-lockdown'), 17 'postlockdown-unlock' => __('Post Lockdown: Unlock', 'post-lockdown'), 18 'postlockdown-protect' => __('Post Lockdown: Protect', 'post-lockdown'), 19 'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'post-lockdown'), 20 20 ]; 21 21 -
post-lockdown/trunk/src/PostLockdown/OptionsPage.php
r2683255 r3076973 5 5 class OptionsPage 6 6 { 7 const PAGE_TITLE = 'Post Lockdown';7 public const PAGE_TITLE = 'Post Lockdown'; 8 8 /** @var string Page hook returned by add_options_page(). */ 9 9 private $page_hook; … … 63 63 $blocks[] = [ 64 64 'key' => 'locked', 65 'heading' => __('Locked Posts', 'post lockdown'),65 'heading' => __('Locked Posts', 'post-lockdown'), 66 66 'input_name' => 'locked_post_ids', 67 'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post lockdown'),67 'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post-lockdown'), 68 68 ]; 69 69 70 70 $blocks[] = [ 71 71 'key' => 'protected', 72 'heading' => __('Protected Posts', 'post lockdown'),72 'heading' => __('Protected Posts', 'post-lockdown'), 73 73 'input_name' => 'protected_post_ids', 74 'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post lockdown'),74 'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post-lockdown'), 75 75 ]; 76 76 -
post-lockdown/trunk/src/PostLockdown/PostLockdown.php
r2683255 r3076973 6 6 { 7 7 /** Plugin key for options and the option page. */ 8 const KEY = 'postlockdown';9 const VERSION = '3.0.4';8 public const KEY = 'postlockdown'; 9 public const VERSION = '3.0.13'; 10 10 11 11 /** @var array List of post IDs which cannot be edited, trashed or deleted. */ -
post-lockdown/trunk/src/PostLockdown/StatusColumn.php
r3075097 r3076973 5 5 class StatusColumn 6 6 { 7 const COLUMN_KEY = 'postlockdown_status';7 public const COLUMN_KEY = 'postlockdown_status'; 8 8 9 9 /** @var PostLockdown */ … … 51 51 * on the current screen. 52 52 * 53 * @param $result54 * @param $option53 * @param array $result 54 * @param string $option 55 55 * @param \WP_User $user 56 56 * … … 125 125 $html = sprintf( 126 126 '<span title="%s" class="dashicons dashicons-lock"></span> %s', 127 __( 'Locked - Cannot be edited, trashed or deleted', 'postlockdown'),128 __( 'Locked', 'postlockdown')127 __('Locked - Cannot be edited, trashed or deleted', 'post-lockdown'), 128 __('Locked', 'post-lockdown') 129 129 ); 130 130 $status = 'locked'; … … 132 132 $html = sprintf( 133 133 '<span title="%s" class="dashicons dashicons-unlock"></span> %s', 134 __( 'Protected - Cannot be trashed or deleted', 'postlockdown'),135 __( 'Protected', 'postlockdown')134 __('Protected - Cannot be trashed or deleted', 'post-lockdown'), 135 __('Protected', 'post-lockdown') 136 136 ); 137 137 $status = 'protected'; -
post-lockdown/trunk/src/PostLockdown/WpCli.php
r2373902 r3076973 122 122 * 123 123 * @when after_wp_load 124 * 124 125 * @subcommand protected 125 126 */ -
post-lockdown/trunk/view/options-page.php
r2683255 r3076973 4 4 <?php settings_fields(PostLockdown\PostLockdown::KEY); ?> 5 5 <p> 6 <?php esc_html_e('Select locked and protected posts by adding them to the boxes on the right. Use the search field to filter the list of posts.', 'post lockdown'); ?>6 <?php esc_html_e('Select locked and protected posts by adding them to the boxes on the right. Use the search field to filter the list of posts.', 'post-lockdown'); ?> 7 7 </p> 8 8 <table class="form-table"> … … 15 15 <div class="pl-posts pl-posts-available"> 16 16 <div class="pl-searchbox"> 17 <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post lockdown'); ?>">17 <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post-lockdown'); ?>"> 18 18 </div> 19 19 <span class="spinner"></span>
Note: See TracChangeset
for help on using the changeset viewer.