Plugin Directory

Changeset 3241925


Ignore:
Timestamp:
02/17/2025 01:28:59 PM (13 months ago)
Author:
tickera
Message:
  • Additional patch applied to hide restricted content from search queries.
  • Restrict guest user from accessing the content if it is configured with "WooCommerce Users > Specific product > Limited time after purchase".
Location:
restricted-content/trunk
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • restricted-content/trunk/index.php

    r3229253 r3241925  
    77 * Author: Restrict
    88 * Author URI: https://restrict.io/
    9  * Version: 2.3.1
     9 * Version: 2.3.2
    1010 * Text Domain: rsc
    1111 * Domain Path: languages
     
    191191        function restrict_search( $query ) {
    192192            if ( $query->is_search && !is_admin() && $query->is_main_query() || defined( 'REST_REQUEST' ) && REST_REQUEST && isset( $query->query_vars['s'] ) ) {
    193                 $query->set( 'meta_query', [
     193                $meta_query = $query->get( 'meta_query' );
     194                $meta_query = ( $meta_query ? $meta_query : [] );
     195                $meta_query[] = [
    194196                    'relation' => 'OR',
    195197                    [
     
    201203                        'value' => 'everyone',
    202204                    ],
    203                 ] );
     205                ];
     206                $query->set( 'meta_query', $meta_query );
    204207            }
    205208        }
     
    963966            'minutes' => 0,
    964967        ) ) {
     968            // Guest User
     969            if ( !$user_id ) {
     970                return false;
     971            }
    965972            $valid_limited_purchases = 0;
    966973            foreach ( $products_ids as $product_id ) {
  • restricted-content/trunk/languages/rsc.pot

    r3229253 r3241925  
    33msgstr ""
    44"Project-Id-Version: Restricted Content\n"
    5 "POT-Creation-Date: 2025-01-27 10:09+0100\n"
     5"POT-Creation-Date: 2025-02-17 14:16+0100\n"
    66"PO-Revision-Date: 2018-07-27 11:20+0200\n"
    77"Last-Translator: \n"
     
    299299
    300300#: includes/addons/restricted-shortcode/restricted-shortcode.php:76
    301 #: index.php:1598
     301#: index.php:1608
    302302msgid "WooCommerce Users"
    303303msgstr ""
     
    308308
    309309#: includes/addons/restricted-shortcode/restricted-shortcode.php:88
    310 #: index.php:1602
     310#: index.php:1612
    311311msgid "Easy Digital Downloads Users"
    312312msgstr ""
     
    592592
    593593#: includes/admin-functions.php:335 includes/admin-functions.php:447
    594 #: includes/admin-functions.php:528 index.php:1779 index.php:1859
    595 #: index.php:1936
     594#: includes/admin-functions.php:528 index.php:1789 index.php:1869
     595#: index.php:1946
    596596msgid "Who Purchased"
    597597msgstr ""
    598598
    599 #: includes/admin-functions.php:338 index.php:1780
     599#: includes/admin-functions.php:338 index.php:1790
    600600msgid "Any ticket type"
    601601msgstr ""
    602602
    603 #: includes/admin-functions.php:351 index.php:1783
     603#: includes/admin-functions.php:351 index.php:1793
    604604msgid "Any ticket type for a specific event"
    605605msgstr ""
    606606
    607 #: includes/admin-functions.php:373 index.php:1785
     607#: includes/admin-functions.php:373 index.php:1795
    608608msgid "Specific ticket type"
    609609msgstr ""
     
    619619#. translators: %s: Event id.
    620620#. translators: %s: Event ID
    621 #: includes/admin-functions.php:414 index.php:1830
     621#: includes/admin-functions.php:414 index.php:1840
    622622#, php-format
    623623msgid "Event ID: %s"
    624624msgstr ""
    625625
    626 #: includes/admin-functions.php:433 index.php:1753 index.php:1761
     626#: includes/admin-functions.php:433 index.php:1763 index.php:1771
    627627msgid "User Capability"
    628628msgstr ""
     
    649649
    650650#: includes/admin-functions.php:481 includes/admin-functions.php:562
    651 #: index.php:1880 index.php:1957
     651#: index.php:1890 index.php:1967
    652652msgid "Duration"
    653653msgstr ""
    654654
    655655#: includes/admin-functions.php:484 includes/admin-functions.php:565
    656 #: index.php:1881 index.php:1958
     656#: index.php:1891 index.php:1968
    657657msgid "Indefinitely"
    658658msgstr ""
    659659
    660660#: includes/admin-functions.php:488 includes/admin-functions.php:569
    661 #: index.php:1882 index.php:1959
     661#: index.php:1892 index.php:1969
    662662msgid "Limited time after purchase"
    663663msgstr ""
    664664
    665665#: includes/admin-functions.php:493 includes/admin-functions.php:574
    666 #: index.php:1885 index.php:1962
     666#: index.php:1895 index.php:1972
    667667msgid "Days:"
    668668msgstr ""
    669669
    670670#: includes/admin-functions.php:501 includes/admin-functions.php:582
    671 #: index.php:1895 index.php:1972
     671#: index.php:1905 index.php:1982
    672672msgid "Hours:"
    673673msgstr ""
    674674
    675675#: includes/admin-functions.php:509 includes/admin-functions.php:590
    676 #: index.php:1905 index.php:1982
     676#: index.php:1915 index.php:1992
    677677msgid "Minutes:"
    678678msgstr ""
     
    776776
    777777#: includes/classes/class-settings-general.php:156
    778 #: includes/classes/class-settings-general.php:164 index.php:336 index.php:340
     778#: includes/classes/class-settings-general.php:164 index.php:341 index.php:345
    779779msgid "You don't have required permissions to view this content."
    780780msgstr ""
     
    800800msgstr ""
    801801
    802 #: includes/classes/class-settings-general.php:172 index.php:344
     802#: includes/classes/class-settings-general.php:172 index.php:349
    803803msgid "This content is available only to it's author."
    804804msgstr ""
     
    812812msgstr ""
    813813
    814 #: includes/classes/class-settings-general.php:184 index.php:348
     814#: includes/classes/class-settings-general.php:184 index.php:353
    815815msgid ""
    816816"This content is restricted to the attendees only. Please purchase ticket(s) "
     
    834834msgstr ""
    835835
    836 #: includes/classes/class-settings-general.php:194 index.php:380
     836#: includes/classes/class-settings-general.php:194 index.php:385
    837837msgid ""
    838838"Only attendees who purchased following ticket type(s): [rsc_tc_ticket_type] "
     
    857857msgstr ""
    858858
    859 #: includes/classes/class-settings-general.php:207 index.php:354
     859#: includes/classes/class-settings-general.php:207 index.php:359
    860860msgid ""
    861861"Only attendees who purchased ticket(s) for following event(s): "
     
    870870
    871871#: includes/classes/class-settings-general.php:220
    872 #: includes/classes/class-settings-general.php:252 index.php:410 index.php:467
     872#: includes/classes/class-settings-general.php:252 index.php:415 index.php:472
    873873msgid ""
    874874"This content is restricted to the clients only. Please purchase any product "
     
    892892msgstr ""
    893893
    894 #: includes/classes/class-settings-general.php:230 index.php:417
     894#: includes/classes/class-settings-general.php:230 index.php:422
    895895msgid ""
    896896"Only clients who purchased following product(s): [rsc_woo_product] can "
     
    909909msgstr ""
    910910
    911 #: includes/classes/class-settings-general.php:240 index.php:443
     911#: includes/classes/class-settings-general.php:240 index.php:448
    912912msgid ""
    913913"The access to this content is invalid or has expired. Please (re)purchase "
     
    929929msgstr ""
    930930
    931 #: includes/classes/class-settings-general.php:262 index.php:474
     931#: includes/classes/class-settings-general.php:262 index.php:479
    932932msgid ""
    933933"Only clients who purchased following product(s): [rsc_edd_product] can "
     
    935935msgstr ""
    936936
    937 #: includes/classes/class-settings-general.php:272 index.php:500
     937#: includes/classes/class-settings-general.php:272 index.php:505
    938938msgid ""
    939939"The access to this content is invalid or has expired. Please (re)purchase "
     
    10621062msgstr ""
    10631063
    1064 #: index.php:211 index.php:1015
     1064#: index.php:211 index.php:1020
    10651065msgid "Settings"
    10661066msgstr ""
    10671067
    1068 #: index.php:332
     1068#: index.php:337
    10691069msgid "You must log in to view this content"
    10701070msgstr ""
    10711071
    1072 #: index.php:394
     1072#: index.php:399
    10731073msgid "event"
    10741074msgstr ""
    10751075
    10761076#. translators: %s: Current page.
    1077 #: index.php:1002
     1077#: index.php:1007
    10781078#, php-format
    10791079msgid "%s"
    10801080msgstr ""
    10811081
    1082 #: index.php:1479
     1082#: index.php:1489
    10831083msgid "Content Restrictions"
    10841084msgstr ""
    10851085
    1086 #: index.php:1482 index.php:1486
     1086#: index.php:1492 index.php:1496
    10871087msgid "Content Available To"
    10881088msgstr ""
    10891089
    1090 #: index.php:1572
     1090#: index.php:1582
    10911091msgid "Everyone"
    10921092msgstr ""
    10931093
    1094 #: index.php:1573
     1094#: index.php:1583
    10951095msgid "Logged in users"
    10961096msgstr ""
    10971097
    1098 #: index.php:1574
     1098#: index.php:1584
    10991099msgid "Users with specific role"
    11001100msgstr ""
    11011101
    1102 #: index.php:1575
     1102#: index.php:1585
    11031103msgid "Users with specific capability"
    11041104msgstr ""
    11051105
    1106 #: index.php:1576
     1106#: index.php:1586
    11071107msgid "Author"
    11081108msgstr ""
    11091109
    11101110#. translators: %s: Tickera name.
    1111 #: index.php:1594
     1111#: index.php:1604
    11121112#, php-format
    11131113msgid "%s Users"
     
    11151115
    11161116#. translators: %s: Restrict content setting page url.
    1117 #: index.php:1609
     1117#: index.php:1619
    11181118#, php-format
    11191119msgid ""
     
    11221122msgstr ""
    11231123
    1124 #: index.php:1715 index.php:1737
     1124#: index.php:1725 index.php:1747
    11251125msgid "Select a User Role"
    11261126msgstr ""
    11271127
    1128 #: index.php:1860 index.php:1937
     1128#: index.php:1870 index.php:1947
    11291129msgid "Any product"
    11301130msgstr ""
    11311131
    1132 #: index.php:1861 index.php:1938
     1132#: index.php:1871 index.php:1948
    11331133msgid "Specific product"
    11341134msgstr ""
  • restricted-content/trunk/readme.txt

    r3229256 r3241925  
    44Tags: restricted content, restrict content, restrict access, protect content, restrict site
    55Requires at least: 4.3
    6 Tested up to: 6.7.1
    7 Stable tag: 2.3.1
     6Tested up to: 6.7.2
     7Stable tag: 2.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7777== Changelog ==
    7878
     79= 2.3.2 17/02/2025 =
     80* Additional patch applied to hide restricted content from search queries.
     81* Restrict guest user from accessing the content if it is configured with "WooCommerce Users > Specific product > Limited time after purchase".
     82
    7983= 2.3.1 27/01/2025 =
    8084* Freemius SDK updated to v2.11
Note: See TracChangeset for help on using the changeset viewer.