Plugin Directory

Changeset 3076973


Ignore:
Timestamp:
04/25/2024 11:19:12 AM (23 months ago)
Author:
andyexeter
Message:

Update to version 3.0.13 from GitHub

Location:
post-lockdown
Files:
2 added
3 deleted
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • post-lockdown/assets/banner-1544x500.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • post-lockdown/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • post-lockdown/tags/3.0.13/post-lockdown.php

    r2741876 r3076973  
    22/**
    33 * Plugin Name: Post Lockdown
     4 * Plugin URI: https://github.com/andyexeter/post-lockdown
    45 * 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
    69 * Author: Andy Palmer
    710 * 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
    1015 */
    1116if (is_admin() || (defined('WP_CLI') && WP_CLI)) {
     
    1823
    1924    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__));
    2126
    2227    register_uninstall_hook(__FILE__, ['PostLockdown', '_uninstall']);
    2328
    2429    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));
    2631    }
    2732}
  • post-lockdown/tags/3.0.13/readme.txt

    r3075103 r3076973  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BRET43XLNLZCJ&lc=GB&item_name=Post%20Lockdown&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted
    44Tags: posts, lock, protect, capabilities, capability, trash, delete
    5 Requires at least: 3.8
     5Requires at least: 4.6
    66Tested up to: 6.5
    7 Stable tag: 3.0.7
     7Stable tag: 3.0.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6868== Changelog ==
    6969
     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
    7076= 3.0.7 =
    7177* Added internationalization support to post list status column (Thanks to @huubl)
     
    117123
    118124= 1.1 =
     125
    119126* 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.
    120127* Fixed an issue which caused a PHP warning when a non-admin used the Quick Edit box for a protected post.
     
    123130
    124131= 1.0.1 =
     132
    125133* Fixed an issue where post IDs could not be filtered if none were set on the options page.
    126134* Added revisions and the WooCommerce product_variation post type to the excluded post types list.
     
    129137
    130138= 1.0.0 =
     139
    131140* Initial release
    132141
  • post-lockdown/tags/3.0.13/src/PostLockdown/AdminNotice.php

    r2216544 r3076973  
    66{
    77    /** Query arg used to determine if an admin notice should be displayed. */
    8     const QUERY_ARG = 'plstatuschange';
     8    public const QUERY_ARG = 'plstatuschange';
    99
    1010    private $plugin_path;
     
    6060            $notices[] = [
    6161                'class'   => 'error',
    62                 'message' => __('This post is protected by Post Lockdown and must stay published.', 'postlockdown'),
     62                'message' => __('This post is protected by Post Lockdown and must stay published.', 'post-lockdown'),
    6363            ];
    6464        }
  • post-lockdown/tags/3.0.13/src/PostLockdown/BulkActions.php

    r2741876 r3076973  
    1414        $this->postlockdown = $postlockdown;
    1515        $this->bulk_actions = [
    16             'postlockdown-lock'      => __('Post Lockdown: Lock', 'postlockdown'),
    17             'postlockdown-unlock'    => __('Post Lockdown: Unlock', 'postlockdown'),
    18             'postlockdown-protect'   => __('Post Lockdown: Protect', 'postlockdown'),
    19             'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'postlockdown'),
     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'),
    2020        ];
    2121
  • post-lockdown/tags/3.0.13/src/PostLockdown/OptionsPage.php

    r2683255 r3076973  
    55class OptionsPage
    66{
    7     const PAGE_TITLE = 'Post Lockdown';
     7    public const PAGE_TITLE = 'Post Lockdown';
    88    /** @var string Page hook returned by add_options_page(). */
    99    private $page_hook;
     
    6363        $blocks[] = [
    6464            'key'         => 'locked',
    65             'heading'     => __('Locked Posts', 'postlockdown'),
     65            'heading'     => __('Locked Posts', 'post-lockdown'),
    6666            'input_name'  => 'locked_post_ids',
    67             'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'postlockdown'),
     67            'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post-lockdown'),
    6868        ];
    6969
    7070        $blocks[] = [
    7171            'key'         => 'protected',
    72             'heading'     => __('Protected Posts', 'postlockdown'),
     72            'heading'     => __('Protected Posts', 'post-lockdown'),
    7373            'input_name'  => 'protected_post_ids',
    74             'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'postlockdown'),
     74            'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post-lockdown'),
    7575        ];
    7676
  • post-lockdown/tags/3.0.13/src/PostLockdown/PostLockdown.php

    r2683255 r3076973  
    66{
    77    /** 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';
    1010
    1111    /** @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  
    55class StatusColumn
    66{
    7     const COLUMN_KEY = 'postlockdown_status';
     7    public const COLUMN_KEY = 'postlockdown_status';
    88
    99    /** @var PostLockdown */
     
    5151     * on the current screen.
    5252     *
    53      * @param          $result
    54      * @param          $option
     53     * @param array    $result
     54     * @param string   $option
    5555     * @param \WP_User $user
    5656     *
     
    125125            $html   = sprintf(
    126126                '<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')
    129129            );
    130130            $status = 'locked';
     
    132132            $html   = sprintf(
    133133                '<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')
    136136            );
    137137            $status = 'protected';
  • post-lockdown/tags/3.0.13/src/PostLockdown/WpCli.php

    r2373902 r3076973  
    122122     *
    123123     * @when       after_wp_load
     124     *
    124125     * @subcommand protected
    125126     */
  • post-lockdown/tags/3.0.13/view/options-page.php

    r2683255 r3076973  
    44        <?php settings_fields(PostLockdown\PostLockdown::KEY); ?>
    55        <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.', 'postlockdown'); ?>
     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'); ?>
    77        </p>
    88        <table class="form-table">
     
    1515                            <div class="pl-posts pl-posts-available">
    1616                                <div class="pl-searchbox">
    17                                     <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'postlockdown'); ?>">
     17                                    <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post-lockdown'); ?>">
    1818                                </div>
    1919                                <span class="spinner"></span>
  • post-lockdown/trunk/post-lockdown.php

    r2741876 r3076973  
    22/**
    33 * Plugin Name: Post Lockdown
     4 * Plugin URI: https://github.com/andyexeter/post-lockdown
    45 * 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
    69 * Author: Andy Palmer
    710 * 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
    1015 */
    1116if (is_admin() || (defined('WP_CLI') && WP_CLI)) {
     
    1823
    1924    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__));
    2126
    2227    register_uninstall_hook(__FILE__, ['PostLockdown', '_uninstall']);
    2328
    2429    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));
    2631    }
    2732}
  • post-lockdown/trunk/readme.txt

    r3075103 r3076973  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BRET43XLNLZCJ&lc=GB&item_name=Post%20Lockdown&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted
    44Tags: posts, lock, protect, capabilities, capability, trash, delete
    5 Requires at least: 3.8
     5Requires at least: 4.6
    66Tested up to: 6.5
    7 Stable tag: 3.0.7
     7Stable tag: 3.0.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6868== Changelog ==
    6969
     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
    7076= 3.0.7 =
    7177* Added internationalization support to post list status column (Thanks to @huubl)
     
    117123
    118124= 1.1 =
     125
    119126* 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.
    120127* Fixed an issue which caused a PHP warning when a non-admin used the Quick Edit box for a protected post.
     
    123130
    124131= 1.0.1 =
     132
    125133* Fixed an issue where post IDs could not be filtered if none were set on the options page.
    126134* Added revisions and the WooCommerce product_variation post type to the excluded post types list.
     
    129137
    130138= 1.0.0 =
     139
    131140* Initial release
    132141
  • post-lockdown/trunk/src/PostLockdown/AdminNotice.php

    r2216544 r3076973  
    66{
    77    /** Query arg used to determine if an admin notice should be displayed. */
    8     const QUERY_ARG = 'plstatuschange';
     8    public const QUERY_ARG = 'plstatuschange';
    99
    1010    private $plugin_path;
     
    6060            $notices[] = [
    6161                'class'   => 'error',
    62                 'message' => __('This post is protected by Post Lockdown and must stay published.', 'postlockdown'),
     62                'message' => __('This post is protected by Post Lockdown and must stay published.', 'post-lockdown'),
    6363            ];
    6464        }
  • post-lockdown/trunk/src/PostLockdown/BulkActions.php

    r2741876 r3076973  
    1414        $this->postlockdown = $postlockdown;
    1515        $this->bulk_actions = [
    16             'postlockdown-lock'      => __('Post Lockdown: Lock', 'postlockdown'),
    17             'postlockdown-unlock'    => __('Post Lockdown: Unlock', 'postlockdown'),
    18             'postlockdown-protect'   => __('Post Lockdown: Protect', 'postlockdown'),
    19             'postlockdown-unprotect' => __('Post Lockdown: Unprotect', 'postlockdown'),
     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'),
    2020        ];
    2121
  • post-lockdown/trunk/src/PostLockdown/OptionsPage.php

    r2683255 r3076973  
    55class OptionsPage
    66{
    7     const PAGE_TITLE = 'Post Lockdown';
     7    public const PAGE_TITLE = 'Post Lockdown';
    88    /** @var string Page hook returned by add_options_page(). */
    99    private $page_hook;
     
    6363        $blocks[] = [
    6464            'key'         => 'locked',
    65             'heading'     => __('Locked Posts', 'postlockdown'),
     65            'heading'     => __('Locked Posts', 'post-lockdown'),
    6666            'input_name'  => 'locked_post_ids',
    67             'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'postlockdown'),
     67            'description' => __('Locked posts cannot be edited, trashed or deleted by non-admins', 'post-lockdown'),
    6868        ];
    6969
    7070        $blocks[] = [
    7171            'key'         => 'protected',
    72             'heading'     => __('Protected Posts', 'postlockdown'),
     72            'heading'     => __('Protected Posts', 'post-lockdown'),
    7373            'input_name'  => 'protected_post_ids',
    74             'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'postlockdown'),
     74            'description' => __('Protected posts cannot be trashed or deleted by non-admins', 'post-lockdown'),
    7575        ];
    7676
  • post-lockdown/trunk/src/PostLockdown/PostLockdown.php

    r2683255 r3076973  
    66{
    77    /** 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';
    1010
    1111    /** @var array List of post IDs which cannot be edited, trashed or deleted. */
  • post-lockdown/trunk/src/PostLockdown/StatusColumn.php

    r3075097 r3076973  
    55class StatusColumn
    66{
    7     const COLUMN_KEY = 'postlockdown_status';
     7    public const COLUMN_KEY = 'postlockdown_status';
    88
    99    /** @var PostLockdown */
     
    5151     * on the current screen.
    5252     *
    53      * @param          $result
    54      * @param          $option
     53     * @param array    $result
     54     * @param string   $option
    5555     * @param \WP_User $user
    5656     *
     
    125125            $html   = sprintf(
    126126                '<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')
    129129            );
    130130            $status = 'locked';
     
    132132            $html   = sprintf(
    133133                '<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')
    136136            );
    137137            $status = 'protected';
  • post-lockdown/trunk/src/PostLockdown/WpCli.php

    r2373902 r3076973  
    122122     *
    123123     * @when       after_wp_load
     124     *
    124125     * @subcommand protected
    125126     */
  • post-lockdown/trunk/view/options-page.php

    r2683255 r3076973  
    44        <?php settings_fields(PostLockdown\PostLockdown::KEY); ?>
    55        <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.', 'postlockdown'); ?>
     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'); ?>
    77        </p>
    88        <table class="form-table">
     
    1515                            <div class="pl-posts pl-posts-available">
    1616                                <div class="pl-searchbox">
    17                                     <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'postlockdown'); ?>">
     17                                    <input type="text" autocomplete="off" class="pl-autocomplete" placeholder="<?php esc_attr_e('Search...', 'post-lockdown'); ?>">
    1818                                </div>
    1919                                <span class="spinner"></span>
Note: See TracChangeset for help on using the changeset viewer.