Plugin Directory

Changeset 2201729


Ignore:
Timestamp:
11/27/2019 02:55:34 AM (6 years ago)
Author:
maratbn
Message:

Copied over the latest development code for the version '1.5.0-development_unreleased' into this repo. The official repo is at: https://github.com/maratbn/LoginRequirePress

Location:
loginrequirepress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • loginrequirepress/trunk/LICENSE

    r1968416 r2201729  
    2929  http://www.maratbn.com/projects/login-require-press
    3030
    31   Copyright (C) 2015-2018  Marat Nepomnyashy  http://maratbn.com  maratbn@gmail
     31  Copyright (C) 2015-2019  Marat Nepomnyashy  http://maratbn.com  maratbn@gmail
    3232
    33   Version:        1.4.0-development_unreleased
     33  Version:        1.5.0-development_unreleased
    3434
    3535  Module:         loginrequirepress/LICENSE
  • loginrequirepress/trunk/LoginRequirePress.php

    r1968416 r2201729  
    99  Author URI: http://www.maratbn.com
    1010  License: GPL3
    11   Version: 1.4.0-development_unreleased
     11  Version: 1.5.0-development_unreleased
    1212  Text Domain: domain-plugin-LoginRequirePress
    1313*/
     
    4444  http://www.maratbn.com/projects/login-require-press
    4545
    46   Copyright (C) 2015-2018  Marat Nepomnyashy  http://maratbn.com  maratbn@gmail
    47 
    48   Version:        1.4.0-development_unreleased
     46  Copyright (C) 2015-2019  Marat Nepomnyashy  http://maratbn.com  maratbn@gmail
     47
     48  Version:        1.5.0-development_unreleased
    4949
    5050  Module:         LoginRequirePress.php
     
    107107                     __('Login Require Press', DOMAIN_PLUGIN),
    108108                     '\\plugin_LoginRequirePress\\callbackMetaBox',
    109                      null);
     109                     null,
     110                     'advanced',
     111                     'default',
     112                     ['__block_editor_compatible_meta_box' => false]);
    110113    }
    111114
     
    141144
    142145    function action_save_post($idPost) {
    143         if (!\current_user_can('manage_options')) return;
     146        if (!\current_user_can('manage_options')) {
     147            $postToSave = \get_post($idPost);
     148            if ($postToSave == null ||
     149                $postToSave->post_author != \get_current_user_id()) {
     150                return;
     151            }
     152        }
    144153
    145154        if (isset($_POST[LOGIN_REQUIRE_PRESS__META]) &&
  • loginrequirepress/trunk/readme.txt

    r1968416 r2201729  
    33Tags: require login, password protect, security, limit access, control access, members, visitors, subscribers, require-login, password-protect, login-protect, limit-access
    44Requires at least: 3.8.1
    5 Tested up to: 4.9.8
    6 Stable tag: 1.3.0
     5Tested up to: 5.3
     6Stable tag: 1.4.0
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1414Overview:
    1515
    16   At the time of this writing, the latest version of WordPress, version 4.9.8,
    17   has 3 post visibility options, which are 'public', 'password protected', and
    18   'private'.
     16  At the time of this writing, the latest version of WordPress, version 5.3, has 3 post visibility options, which are 'public', 'password protected', and 'private'.
    1917
    20   The 'password protected' option allows the site administrator to
    21   individually lock certain posts, even from the logged in users, with an
    22   additional password / passcode.  However, there is currently no built-in way
    23   to just deny access only to the unauthenticated users.
     18  The 'password protected' option allows the site administrator to individually lock certain posts, even from the logged in users, with an additional password / passcode.  However, there is currently no built-in way to just deny access only to the unauthenticated users.
    2419
    25   Login Require Press is a WordPress plugin that allows site administrators to
    26   specifically designate arbitrary posts with any public post type as viewable
    27   only after user login.
     20  Login Require Press is a WordPress plugin that allows site administrators to specifically designate arbitrary posts with any public post type as viewable only after user login.  Post authors can also enable or disable login protection for their own posts.
    2821
    2922  It is an easy way to require login to view specific pages / posts.
    3023
    31   Unauthenticated site visitors attempting to view any page that includes any
    32   such specifically designated post will then be automatically redirected to
    33   the site's default login page, and then back to the original page after they
    34   login, thereby limiting access only to logged-in users with subscriber roles
    35   and above.
     24  Unauthenticated site visitors attempting to view any page that includes any such specifically designated post will then be automatically redirected to the site's default login page, and then back to the original page after they login, thereby limiting access only to logged-in users with subscriber roles and above.
    3625
    37   Plugin will still allow unauthenticated downloading of site's feeds, but
    38   will filter out all login-requiring posts from the feed listings.
     26  Plugin will still allow unauthenticated downloading of site's feeds, but will filter out all login-requiring posts from the feed listings.
    3927
    40   Plugin will protect the titles and contents of login-requiring posts in
    41   search result page listings when the user is not logged in.  The titles /
    42   contents will be replaced by text "[Post title / content protected by
    43   Login Require Press.  Login to see the title / content.]"
     28  Plugin will protect the titles, contents, and excerpts of login-requiring posts in search result page listings when the user is not logged in.  The titles / contents / excerpts will be replaced by text "[Post title / content / excerpts protected by Login Require Press.  Login to see the title / content / excerpt.]"
    4429
    4530Technical summary:
    4631
    47   Plugin works by hooking-in special logic into the action 'send_headers' to
    48   redirect unauthenticated client browsers to the site's login page from any
    49   non-feed and non-search-results page upon detecting any login-requiring post,
    50   and by hooking-in another special logic into the filter 'posts_results' to
    51   filter out all login-requiring posts from all feed page listings, and to
    52   protect the titles and contents of login-requiring posts in search result
    53   page listings.
     32  Plugin works by hooking-in special logic into the action 'send_headers' to redirect unauthenticated client browsers to the site's login page from any non-feed and non-search-results page upon detecting any login-requiring post, and by hooking-in another special logic into the filter 'posts_results' to filter out all login-requiring posts from all feed page listings, and to protect the titles, contents, and excerpts of login-requiring posts in search result page listings.
    5433
    5534  Login-requiring posts are marked with a custom field 'login_require_press' set to 'yes'.
     
    9069== Screenshots ==
    9170
    92 1. Login Require Press configuration screen with the table used to specify which posts are to be
    93    login-protected.
     711. Login Require Press configuration screen with the table used to specify which posts are to be login-protected.
    9472
    95 2. Login Require Press configuration screen with the lists of private, non-private login-protected,
    96    and passcode-protected posts.
     732. Login Require Press configuration screen with the lists of private, non-private login-protected, and passcode-protected posts.
    9774
    98753. Login Require Press edit post meta box to enable or disable login protection.
    9976
    10077== Changelog ==
     78
     79= 1.4.0 =
     80* Tested up to WordPress 5.3
     81* Fixed bug that prevented authors without administrative privileges from enabling / disabling login protection on their own posts.
     82* Added logic to indicate that the previously-implemented Login Require Press post meta box is not compatible with the new WordPress block editor.
    10183
    10284= 1.3.0 =
     
    11092* Changed the plugin name from 'LoginRequirePress' to 'Login Require Press'.
    11193* Indicating posts without names by token [no name #] where # is the post ID number.
    112 * Shortened the plugin description appearing on the admin dashboard plugins list to just one
    113   sentence.
     94* Shortened the plugin description appearing on the admin dashboard plugins list to just one sentence.
    11495* Added support for WordPress instances nested inside subdirectories.
    11596
    11697= 1.1.0 =
    11798* Tested up to WordPress 4.5.2
    118 * Improved the listing-out of posts in the post categorizations sections on the plugin's Settings
    119   page.
     99* Improved the listing-out of posts in the post categorizations sections on the plugin's Settings page.
    120100* Added 'Refresh' buttons to the Settings page.
    121101* Added LoginRequirePress meta box to the post edit screen.
     
    125105* Tested up to WordPress 4.5
    126106* Login Required status indicators now in red.
    127 * Added new 'Default Visibility' column, that indicates posts' present visibility according to the
    128   default WordPress logic without this plugin.
     107* Added new 'Default Visibility' column, that indicates posts' present visibility according to the default WordPress logic without this plugin.
    129108* Explicitly listing-out the Private, Login-Protected, and Passcode/Password-Protected posts.
    130109* Added plugin activation check for PHP version >= 5.4
     
    134113* Minor improvement to plugin WordPress description meta field.
    135114* Fixed issue https://github.com/maratbn/LoginRequirePress/issues/2:  Added file 'REQUIREMENTS'.
    136 * Fixed issue https://github.com/maratbn/LoginRequirePress/issues/3:  Protecting the titles and
    137   contents of login-requiring posts in search result page listings when the user is not logged in.
     115* Fixed issue https://github.com/maratbn/LoginRequirePress/issues/3:  Protecting the titles and contents of login-requiring posts in search result page listings when the user is not logged in.
    138116
    139117= 0.1.1 =
Note: See TracChangeset for help on using the changeset viewer.