Plugin Directory

Changeset 2735739


Ignore:
Timestamp:
06/01/2022 02:48:58 PM (4 years ago)
Author:
cayenne
Message:

ver 1.5.5 minor fixes

Location:
anonymous-restricted-content/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • anonymous-restricted-content/trunk/README.txt

    r2670105 r2735739  
    33Tags: restricted access, block content, content control, access control, restrict anonymous, hide content, limited access, permission, private
    44Requires at least: 4.6
    5 Tested up to: 5.9
    6 Stable tag: 1.5.4
     5Tested up to: 6.0
     6Stable tag: 1.5.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676
    7777== Changelog ==
     78= 1.5.5 =
     79* Fixed error display on settings page
     80* Tested up to WP 6.0
     81
    7882= 1.5.4 =
    7983* fixed issue with AJAX login screen on mobile
  • anonymous-restricted-content/trunk/admin/class-arc-admin.php

    r2493592 r2735739  
    218218    {
    219219        $options = get_option( 'arc_options' );
     220        $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : '';
    220221
    221222        ?>
    222             <input value="<?php echo $options[$args['label_for']]?>" type="url" class="regular-text code" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]" id="<?php echo esc_attr( $args['label_for'] ); ?>" value="">
     223            <input type="url" class="regular-text code" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]" id="<?php echo esc_attr( $args['label_for'] ); ?>" value="<?php echo $value; ?>">
    223224        <?php
    224225    }
     
    230231        {
    231232            $options = get_option( 'arc_options' );
     233            $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : '';
    232234
    233235            ?>
    234                 <input value="<?php echo $options[$args['label_for']]?>" type="text" class="regular-text code" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]" id="<?php echo esc_attr( $args['label_for'] ); ?>" value="">
     236                <input type="text" class="regular-text code" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]" id="<?php echo esc_attr( $args['label_for'] ); ?>" value="<?php echo $value; ?>">
    235237            <?php
    236238        }
     
    242244        {
    243245            $options = get_option( 'arc_options' );
     246            $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : '';
    244247
    245248            ?>
    246249                        <label for="<?php echo esc_attr( $args['label_for'] ); ?>-off">
    247250                            <input type="radio" value="off" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]"
    248                                 <?php if ( $options[$args['label_for']] == 'off' || !isset($options[$args['label_for']]) ) echo "checked"; ?>
     251                                <?php if ( $value == 'off' || ! $value ) echo "checked"; ?>
    249252                                id = "<?php echo esc_attr( $args['label_for'] ); ?>-off"
    250253                            >
     
    254257                        <label for="<?php echo esc_attr( $args['label_for'] ); ?>-off">
    255258                            <input type="radio" value="on" name="arc_options[<?php echo esc_attr( $args['label_for'] ); ?>]"
    256                                 <?php if ( $options[$args['label_for']] == 'on' ) echo "checked"; ?>
     259                                <?php if ( $value == 'on' ) echo "checked"; ?>
    257260                                id = "<?php echo esc_attr( $args['label_for'] ); ?>-on"
    258261                            >
     
    284287            ?>
    285288            <p><?php _e( 'Message to be shown on the login screen, for users who trying to access restricted content and forced to login.', 'anonymous-restricted-content' ); ?></p>
    286             <p><?php _e( 'Defaul message: "This content was restricted from anonymous access. Please, login first:"', 'anonymous-restricted-content' ); ?></p>
     289            <p><?php _e( 'Default message: "This content was restricted from anonymous access. Please, login first:"', 'anonymous-restricted-content' ); ?></p>
    287290            <?php
    288291        }
     
    438441    * @since    1.2.0
    439442    */
    440     public function register_gutenber_meta(){
     443    public function register_gutenberg_meta(){
    441444        register_meta( 'post', 'arc_restricted_post', array(
    442445          'show_in_rest' => true,
  • anonymous-restricted-content/trunk/anonymous-restricted-content.php

    r2565150 r2735739  
    1111 * Plugin URI:        https://wordpress.org/plugins/anonymous-restricted-content/
    1212 * Description:       Restrict access to selected content (posts/pages/categories) for NOT LOGGED IN users.
    13  * Version:           1.5.4
     13 * Version:           1.5.5
    1414 * Author:            Taras Sych
    15  * Author URI:        https://wordpress.org/plugins/anonymous-restricted-content//
     15 * Author URI:        https://wordpress.org/plugins/anonymous-restricted-content/
    1616 * License:           GPL-2.0+
    1717 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    2828 * Currently plugin version.
    2929 */
    30 define( 'ARC_VERSION', '1.5.4' );
     30define( 'ARC_VERSION', '1.5.5' );
    3131define( 'ARC_PACKAGE_NAME', 'ARC' );
    3232
  • anonymous-restricted-content/trunk/includes/class-arc.php

    r2459127 r2735739  
    174174        $this->loader->add_action('admin_init', $plugin_admin, 'register_plugin_settings');
    175175        $this->loader->add_action('admin_menu', $plugin_admin, 'register_plugin_admin_menu');
    176         $this->loader->add_action('init', $plugin_admin, 'register_gutenber_meta');
     176        $this->loader->add_action('init', $plugin_admin, 'register_gutenberg_meta');
    177177        $this->loader->add_action('admin_notices', $plugin_admin, 'arc_admin_notices');
    178178
     
    199199        $this->loader->add_filter('login_message', $plugin_public, 'restricted_login_message');
    200200        $this->loader->add_filter('pre_handle_404', $plugin_public, 'redirect_restricted_content_to_login', 10, 2 );
    201         $this->loader->add_filter('widget_comments_args', $plugin_public, 'hide_rectricted_posts_in_query');
    202         $this->loader->add_filter('widget_posts_args', $plugin_public, 'hide_rectricted_posts_in_query');
    203         $this->loader->add_filter('wp_list_pages_excludes', $plugin_public, 'hide_rectricted_pages_in_list'); //hides in default primary menu
     201        $this->loader->add_filter('widget_comments_args', $plugin_public, 'hide_restricted_posts_in_query');
     202        $this->loader->add_filter('widget_posts_args', $plugin_public, 'hide_restricted_posts_in_query');
     203        $this->loader->add_filter('wp_list_pages_excludes', $plugin_public, 'hide_restricted_pages_in_list'); //hides in default primary menu
    204204
    205205    }
  • anonymous-restricted-content/trunk/public/class-arc-public.php

    r2493592 r2735739  
    208208     * @since    1.2.0
    209209     */
    210     public function hide_rectricted_posts_in_query($query_args)
     210    public function hide_restricted_posts_in_query($query_args)
    211211    {
    212212        if ( ! is_admin() && !is_user_logged_in() )
     
    229229     * @since    1.3
    230230     */
    231     public function hide_rectricted_pages_in_list()
     231    public function hide_restricted_pages_in_list()
    232232    {
    233233        $restricted_ids = array();
Note: See TracChangeset for help on using the changeset viewer.