Changeset 2735739
- Timestamp:
- 06/01/2022 02:48:58 PM (4 years ago)
- Location:
- anonymous-restricted-content/trunk
- Files:
-
- 1 added
- 5 edited
-
README.md (added)
-
README.txt (modified) (2 diffs)
-
admin/class-arc-admin.php (modified) (6 diffs)
-
anonymous-restricted-content.php (modified) (2 diffs)
-
includes/class-arc.php (modified) (2 diffs)
-
public/class-arc-public.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
anonymous-restricted-content/trunk/README.txt
r2670105 r2735739 3 3 Tags: restricted access, block content, content control, access control, restrict anonymous, hide content, limited access, permission, private 4 4 Requires at least: 4.6 5 Tested up to: 5.96 Stable tag: 1.5. 45 Tested up to: 6.0 6 Stable tag: 1.5.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 77 77 == Changelog == 78 = 1.5.5 = 79 * Fixed error display on settings page 80 * Tested up to WP 6.0 81 78 82 = 1.5.4 = 79 83 * fixed issue with AJAX login screen on mobile -
anonymous-restricted-content/trunk/admin/class-arc-admin.php
r2493592 r2735739 218 218 { 219 219 $options = get_option( 'arc_options' ); 220 $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : ''; 220 221 221 222 ?> 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; ?>"> 223 224 <?php 224 225 } … … 230 231 { 231 232 $options = get_option( 'arc_options' ); 233 $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : ''; 232 234 233 235 ?> 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; ?>"> 235 237 <?php 236 238 } … … 242 244 { 243 245 $options = get_option( 'arc_options' ); 246 $value = isset( $options[$args['label_for']] ) ? $options[$args['label_for']] : ''; 244 247 245 248 ?> 246 249 <label for="<?php echo esc_attr( $args['label_for'] ); ?>-off"> 247 250 <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"; ?> 249 252 id = "<?php echo esc_attr( $args['label_for'] ); ?>-off" 250 253 > … … 254 257 <label for="<?php echo esc_attr( $args['label_for'] ); ?>-off"> 255 258 <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"; ?> 257 260 id = "<?php echo esc_attr( $args['label_for'] ); ?>-on" 258 261 > … … 284 287 ?> 285 288 <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> 287 290 <?php 288 291 } … … 438 441 * @since 1.2.0 439 442 */ 440 public function register_gutenber _meta(){443 public function register_gutenberg_meta(){ 441 444 register_meta( 'post', 'arc_restricted_post', array( 442 445 'show_in_rest' => true, -
anonymous-restricted-content/trunk/anonymous-restricted-content.php
r2565150 r2735739 11 11 * Plugin URI: https://wordpress.org/plugins/anonymous-restricted-content/ 12 12 * Description: Restrict access to selected content (posts/pages/categories) for NOT LOGGED IN users. 13 * Version: 1.5. 413 * Version: 1.5.5 14 14 * Author: Taras Sych 15 * Author URI: https://wordpress.org/plugins/anonymous-restricted-content/ /15 * Author URI: https://wordpress.org/plugins/anonymous-restricted-content/ 16 16 * License: GPL-2.0+ 17 17 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 28 28 * Currently plugin version. 29 29 */ 30 define( 'ARC_VERSION', '1.5. 4' );30 define( 'ARC_VERSION', '1.5.5' ); 31 31 define( 'ARC_PACKAGE_NAME', 'ARC' ); 32 32 -
anonymous-restricted-content/trunk/includes/class-arc.php
r2459127 r2735739 174 174 $this->loader->add_action('admin_init', $plugin_admin, 'register_plugin_settings'); 175 175 $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'); 177 177 $this->loader->add_action('admin_notices', $plugin_admin, 'arc_admin_notices'); 178 178 … … 199 199 $this->loader->add_filter('login_message', $plugin_public, 'restricted_login_message'); 200 200 $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_re ctricted_posts_in_query');202 $this->loader->add_filter('widget_posts_args', $plugin_public, 'hide_re ctricted_posts_in_query');203 $this->loader->add_filter('wp_list_pages_excludes', $plugin_public, 'hide_re ctricted_pages_in_list'); //hides in default primary menu201 $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 204 204 205 205 } -
anonymous-restricted-content/trunk/public/class-arc-public.php
r2493592 r2735739 208 208 * @since 1.2.0 209 209 */ 210 public function hide_re ctricted_posts_in_query($query_args)210 public function hide_restricted_posts_in_query($query_args) 211 211 { 212 212 if ( ! is_admin() && !is_user_logged_in() ) … … 229 229 * @since 1.3 230 230 */ 231 public function hide_re ctricted_pages_in_list()231 public function hide_restricted_pages_in_list() 232 232 { 233 233 $restricted_ids = array();
Note: See TracChangeset
for help on using the changeset viewer.