Plugin Directory

Changeset 3144029


Ignore:
Timestamp:
08/30/2024 04:07:21 AM (19 months ago)
Author:
pluginly
Message:

Update to version 1.1.1 from GitHub

Location:
content-restriction
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • content-restriction/tags/1.1.1/app/Admin/Controllers/ModuleController.php

    r3142420 r3144029  
    5050                $param_value      = $request->get_param( $filter_key );
    5151                $condition_values = $module['conditions'][$filter_key] ?? [];
    52                 if (
    53                     ! empty( $param_value )
    54                     && ! empty( $condition_values )
    55                     && ! in_array( $param_value, $condition_values )
    56                 ) {
     52                $compare          = $module['conditions']['compare'] ?? 'has_any';
     53
     54                if ( empty( $param_value ) || empty( $condition_values ) ) {
     55                    continue;
     56                }
     57
     58                // If compare is 'not_in' and the value is in the condition_values, unset the module
     59                if ( 'not_in' === $compare && in_array( $param_value, $condition_values ) ) {
    5760                    unset( $modules[$key] );
    58                     continue 2;
     61                    continue 2; // Skip to the next module
     62                }
     63
     64                // If compare is 'has_any' (default) and the value is not in the condition_values, unset the module
     65                if ( 'has_any' === $compare && ! in_array( $param_value, $condition_values ) ) {
     66                    unset( $modules[$key] );
     67                    continue 2; // Skip to the next module
    5968                }
    6069            }
  • content-restriction/tags/1.1.1/app/Integrations/Directorist/Hide.php

    r3142420 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
     
    4246
    4347    public function hide( $query, $post_type, $what_content_type, $options ) {
     48
    4449        if ( $this->post_type !== $post_type ) {
    4550            return;
    4651        }
    4752
    48         $this->options   = $options;
     53        $this->options           = $options;
    4954        $this->what_content_type = $what_content_type;
    5055
  • content-restriction/tags/1.1.1/app/Integrations/EasyDigitalDownloads/Hide.php

    r3142420 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
     
    4145        }
    4246
    43         $this->options   = $options;
     47        $this->options           = $options;
    4448        $this->what_content_type = $what_content_type;
    4549
  • content-restriction/tags/1.1.1/app/Integrations/WooCommerce/Hide.php

    r3137277 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
  • content-restriction/tags/1.1.1/app/Modules/LoginBack/Frontend.php

    r3137277 r3144029  
    2222            'icon'       => $this->get_icon( 'LoginBack' ),
    2323            'desc'       => __( 'Redirect back to the current post or page after the user logged in.', 'content-restriction' ),
    24             // 'conditions' => apply_filters(
    25             // 'content_restriction_module_login_and_back_conditions',
    26             // [
    27             //      'who_can_see' => [
    28             //          'user_not_logged_in',
    29             //      ],
    30             //      'compare'     => 'has_any',
    31             // ],
    32             // ),
     24            'conditions' => apply_filters(
     25                'content_restriction_module_login_and_back_conditions',
     26                [
     27                    'who_can_see' => [
     28                        'user_not_logged_in',
     29                    ],
     30                    'compare'     => 'not_in',
     31                ],
     32            ),
    3333        ];
    3434
  • content-restriction/tags/1.1.1/config.php

    r3142420 r3144029  
    99
    1010return [
    11     'version'     => '1.1.0',
     11    'version'     => '1.1.1',
    1212    'min_php'     => '7.4',
    1313    'db_version'  => '1.0.0',
  • content-restriction/tags/1.1.1/content-restriction.php

    r3142420 r3144029  
    33
    44/**
    5  * Plugin Name: All-in-One Content Restriction
     5 * Plugin Name: Content Restriction
    66 * Plugin URI: https://wordpress.org/plugins/content-restriction/
    77 * Description: Content Restriction - A simple and user-friendly plugin to restrict users / visitors from viewing posts by restricting access, as simple as that.
    8  * Version: 1.1.0
     8 * Version: 1.1.1
    99 * Author: Pluginly
    1010 * Author URI: https://profiles.wordpress.org/pluginly/
  • content-restriction/tags/1.1.1/languages/content-restriction.pot

    r3142420 r3144029  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: All-in-One Content Restriction 1.1.0\n"
     5"Project-Id-Version: Content Restriction 1.1.1\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/content-restriction\n"
    8 "POT-Creation-Date: 2024-08-27 17:03:10+00:00\n"
     8"POT-Creation-Date: 2024-08-30 04:07:05+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    3939msgstr ""
    4040
    41 #: app/Admin/Enqueuer.php:66 app/Admin/Menu.php:31
    42 #: app/Providers/AdminServiceProviders.php:51
     41#. Plugin Name of the plugin/theme
    4342msgid "Content Restriction"
    4443msgstr ""
    4544
    46 #. Plugin Name of the plugin/theme
     45#: app/Admin/Menu.php:28
    4746msgid "All-in-One Content Restriction"
    4847msgstr ""
  • content-restriction/tags/1.1.1/readme.txt

    r3142420 r3144029  
    1 === All-in-One Content Restriction – Conditional Content Visibility & Access Control for WordPress ===
     1=== Content Restriction – Conditional Content Visibility & Access Control for WordPress ===
    22Contributors: Pluginly, HeyMehedi
    33Tags: content restriction, access control, private, permission, restrict access
     
    55Tested up to: 6.6
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 All-in-One Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin.
     11Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin.
    1212
    1313== Description ==
    14 All-in-One Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin to set content access rules for any user - whether logged in, holding specific user role, or a visitor.
     14Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin to set content access rules for any user - whether logged in, holding specific user role, or a visitor.
    1515
    1616Decide who gets to see what content – be it pages, posts , taxonomy or any custom post type by setting up content visibility rules.
     
    118118== Changelog ==
    119119
     120= 1.1.1 – Aug 30, 2024 =
     121* Fix: Hide Issue
     122
    120123= 1.1.0 – Aug 27, 2024 =
    121124* Add: WooCommerce Integration
  • content-restriction/tags/1.1.1/vendor/composer/installed.php

    r3142420 r3144029  
    22    'root' => array(
    33        'name' => 'pluginly/content-restriction',
    4         'pretty_version' => '1.1.0',
    5         'version' => '1.1.0.0',
    6         'reference' => 'fe6a8a1cf01198a4e24eeb533e429f60e82a2cf8',
     4        'pretty_version' => '1.1.1',
     5        'version' => '1.1.1.0',
     6        'reference' => 'ade25357ee7169471a0f486c1fdfba24a4d5b042',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'pluginly/content-restriction' => array(
    14             'pretty_version' => '1.1.0',
    15             'version' => '1.1.0.0',
    16             'reference' => 'fe6a8a1cf01198a4e24eeb533e429f60e82a2cf8',
     14            'pretty_version' => '1.1.1',
     15            'version' => '1.1.1.0',
     16            'reference' => 'ade25357ee7169471a0f486c1fdfba24a4d5b042',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • content-restriction/trunk/app/Admin/Controllers/ModuleController.php

    r3142420 r3144029  
    5050                $param_value      = $request->get_param( $filter_key );
    5151                $condition_values = $module['conditions'][$filter_key] ?? [];
    52                 if (
    53                     ! empty( $param_value )
    54                     && ! empty( $condition_values )
    55                     && ! in_array( $param_value, $condition_values )
    56                 ) {
     52                $compare          = $module['conditions']['compare'] ?? 'has_any';
     53
     54                if ( empty( $param_value ) || empty( $condition_values ) ) {
     55                    continue;
     56                }
     57
     58                // If compare is 'not_in' and the value is in the condition_values, unset the module
     59                if ( 'not_in' === $compare && in_array( $param_value, $condition_values ) ) {
    5760                    unset( $modules[$key] );
    58                     continue 2;
     61                    continue 2; // Skip to the next module
     62                }
     63
     64                // If compare is 'has_any' (default) and the value is not in the condition_values, unset the module
     65                if ( 'has_any' === $compare && ! in_array( $param_value, $condition_values ) ) {
     66                    unset( $modules[$key] );
     67                    continue 2; // Skip to the next module
    5968                }
    6069            }
  • content-restriction/trunk/app/Integrations/Directorist/Hide.php

    r3142420 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
     
    4246
    4347    public function hide( $query, $post_type, $what_content_type, $options ) {
     48
    4449        if ( $this->post_type !== $post_type ) {
    4550            return;
    4651        }
    4752
    48         $this->options   = $options;
     53        $this->options           = $options;
    4954        $this->what_content_type = $what_content_type;
    5055
  • content-restriction/trunk/app/Integrations/EasyDigitalDownloads/Hide.php

    r3142420 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
     
    4145        }
    4246
    43         $this->options   = $options;
     47        $this->options           = $options;
    4448        $this->what_content_type = $what_content_type;
    4549
  • content-restriction/trunk/app/Integrations/WooCommerce/Hide.php

    r3137277 r3144029  
    1313
    1414    public function single_view_hide() {
     15        if ( ! isset( $this->what_content_type ) ) {
     16            return;
     17        }
     18
    1519        if ( is_front_page() || is_archive() || is_home() ) {
    1620            return;
  • content-restriction/trunk/app/Modules/LoginBack/Frontend.php

    r3137277 r3144029  
    2222            'icon'       => $this->get_icon( 'LoginBack' ),
    2323            'desc'       => __( 'Redirect back to the current post or page after the user logged in.', 'content-restriction' ),
    24             // 'conditions' => apply_filters(
    25             // 'content_restriction_module_login_and_back_conditions',
    26             // [
    27             //      'who_can_see' => [
    28             //          'user_not_logged_in',
    29             //      ],
    30             //      'compare'     => 'has_any',
    31             // ],
    32             // ),
     24            'conditions' => apply_filters(
     25                'content_restriction_module_login_and_back_conditions',
     26                [
     27                    'who_can_see' => [
     28                        'user_not_logged_in',
     29                    ],
     30                    'compare'     => 'not_in',
     31                ],
     32            ),
    3333        ];
    3434
  • content-restriction/trunk/config.php

    r3142420 r3144029  
    99
    1010return [
    11     'version'     => '1.1.0',
     11    'version'     => '1.1.1',
    1212    'min_php'     => '7.4',
    1313    'db_version'  => '1.0.0',
  • content-restriction/trunk/content-restriction.php

    r3142420 r3144029  
    33
    44/**
    5  * Plugin Name: All-in-One Content Restriction
     5 * Plugin Name: Content Restriction
    66 * Plugin URI: https://wordpress.org/plugins/content-restriction/
    77 * Description: Content Restriction - A simple and user-friendly plugin to restrict users / visitors from viewing posts by restricting access, as simple as that.
    8  * Version: 1.1.0
     8 * Version: 1.1.1
    99 * Author: Pluginly
    1010 * Author URI: https://profiles.wordpress.org/pluginly/
  • content-restriction/trunk/languages/content-restriction.pot

    r3142420 r3144029  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: All-in-One Content Restriction 1.1.0\n"
     5"Project-Id-Version: Content Restriction 1.1.1\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/content-restriction\n"
    8 "POT-Creation-Date: 2024-08-27 17:03:10+00:00\n"
     8"POT-Creation-Date: 2024-08-30 04:07:05+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    3939msgstr ""
    4040
    41 #: app/Admin/Enqueuer.php:66 app/Admin/Menu.php:31
    42 #: app/Providers/AdminServiceProviders.php:51
     41#. Plugin Name of the plugin/theme
    4342msgid "Content Restriction"
    4443msgstr ""
    4544
    46 #. Plugin Name of the plugin/theme
     45#: app/Admin/Menu.php:28
    4746msgid "All-in-One Content Restriction"
    4847msgstr ""
  • content-restriction/trunk/readme.txt

    r3142420 r3144029  
    1 === All-in-One Content Restriction – Conditional Content Visibility & Access Control for WordPress ===
     1=== Content Restriction – Conditional Content Visibility & Access Control for WordPress ===
    22Contributors: Pluginly, HeyMehedi
    33Tags: content restriction, access control, private, permission, restrict access
     
    55Tested up to: 6.6
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 All-in-One Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin.
     11Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin.
    1212
    1313== Description ==
    14 All-in-One Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin to set content access rules for any user - whether logged in, holding specific user role, or a visitor.
     14Content Restriction is a comprehensive, easy to use & feature-packed WordPress content restriction plugin to set content access rules for any user - whether logged in, holding specific user role, or a visitor.
    1515
    1616Decide who gets to see what content – be it pages, posts , taxonomy or any custom post type by setting up content visibility rules.
     
    118118== Changelog ==
    119119
     120= 1.1.1 – Aug 30, 2024 =
     121* Fix: Hide Issue
     122
    120123= 1.1.0 – Aug 27, 2024 =
    121124* Add: WooCommerce Integration
  • content-restriction/trunk/vendor/composer/installed.php

    r3142420 r3144029  
    22    'root' => array(
    33        'name' => 'pluginly/content-restriction',
    4         'pretty_version' => '1.1.0',
    5         'version' => '1.1.0.0',
    6         'reference' => 'fe6a8a1cf01198a4e24eeb533e429f60e82a2cf8',
     4        'pretty_version' => '1.1.1',
     5        'version' => '1.1.1.0',
     6        'reference' => 'ade25357ee7169471a0f486c1fdfba24a4d5b042',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'pluginly/content-restriction' => array(
    14             'pretty_version' => '1.1.0',
    15             'version' => '1.1.0.0',
    16             'reference' => 'fe6a8a1cf01198a4e24eeb533e429f60e82a2cf8',
     14            'pretty_version' => '1.1.1',
     15            'version' => '1.1.1.0',
     16            'reference' => 'ade25357ee7169471a0f486c1fdfba24a4d5b042',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.