Plugin Directory

Changeset 3416351


Ignore:
Timestamp:
12/10/2025 11:44:36 AM (4 months ago)
Author:
buildwps
Message:

latest version release/1.9.13

Location:
password-protect-page/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • password-protect-page/trunk/includes/services/class-ppw-shortcode.php

    r3330072 r3416351  
    9696            add_action( 'the_post', array( $this, 'maybe_remove_ppwp_shortcode' ), 10 );
    9797            add_action( 'the_post', array( $this, 'maybe_add_ppwp_shortcode' ), 99999 );
    98 
     98            add_filter( PPW_Constants::HOOK_SHORTCODE_RENDER_CONTENT, array( $this, 'ppwp_wrap_restricted_content' ), 99999, 2 );   
    9999
    100100            /**
     
    272272            return apply_filters( 'ppw_pcp_password_form', $password_form, $attrs );
    273273        }
    274 
     274       
     275        /**
     276        * Wrap PPWP shortcode output inside a single wrapper div.
     277        * Prevents duplicate wrapper if already present.
     278        * @param array  $attrs   list of attributes including password.
     279         * @param string $content the content inside short code.
     280        */ 
     281        public function ppwp_wrap_restricted_content( $content, $attrs ) {
     282            // Prevent duplicate wrapping
     283            if ( strpos( $content, 'class="ppw-restricted-content"' ) !== false ) {
     284                return $content;
     285            }
     286            // Apply wrapper only once
     287            return '<div class="ppw-restricted-content">' . $content . '</div>';
     288        }   
    275289        /**
    276290         * Show content if user set on_date or off_date attribute.
  • password-protect-page/trunk/includes/views/general/view-ppw-auto-protect-child-page.php

    r3010000 r3416351  
    44 */
    55?>
    6 <tr class="ppwp_free_version">
    7 <td class="feature-input"><span class="feature-input"></span></td>
     6<tr class="ppwp_free_version ppwp-gray-out">
     7    <td class="feature-input"><span class="feature-input"></span></td>
    88    <td>
    99        <p>
    1010            <label>
    1111                <?php echo esc_html__( 'Password Protect Child Pages', PPW_Constants::DOMAIN ); ?>
     12                <span class="ppwp_upgrade_advice">
     13                    <a rel="noopener" target="_blank" href="https://passwordprotectwp.com/pricing/">
     14                        <span class="ppwp_dashicons dashicons dashicons-lock">
     15                            <span class="ppwp_upgrade_tooltip"><?php echo esc_html__( 'Upgrade to Gold', 'password-protect-page' ) ?></span>
     16                        </span>
     17                    </a>
     18                </span>
    1219            </label>
    1320            <?php echo esc_html__( 'Automatically protect all child pages once their parent is protected. Available in Pro version.', PPW_Constants::DOMAIN ); ?>
  • password-protect-page/trunk/includes/views/general/view-ppw-error-message.php

    r2136149 r3416351  
    1 <tr class="ppwp_free_version">
     1<tr class="ppwp_free_version ppwp-gray-out">
    22    <td class="feature-input"><span class="feature-input"></span></td>
    33    <td>
    44        <p>
    5             <label><?php echo esc_html__( 'Error Message', PPW_Constants::DOMAIN ) ?></label>
     5            <label><?php echo esc_html__( 'Error Message', PPW_Constants::DOMAIN ) ?>
     6                <span class="ppwp_upgrade_advice">
     7                    <a rel="noopener" target="_blank" href="https://passwordprotectwp.com/pricing/">
     8                        <span class="ppwp_dashicons dashicons dashicons-lock">
     9                            <span class="ppwp_upgrade_tooltip"><?php echo esc_html__( 'Upgrade to Gold', 'password-protect-page' ) ?></span>
     10                        </span>
     11                    </a>
     12                </span>
     13            </label>
    614            <?php echo _e( 'Customize the error message when users enter wrong passwords.<em> Available in Pro version only.</em>', PPW_Constants::DOMAIN ) ?>
    715        </p>
    816        <span>
    9             <input type="text"
     17            <input type="text" disabled
    1018                   value="<?php echo esc_html( PPW_Constants::DEFAULT_WRONG_PASSWORD_MESSAGE ); ?>"/>
    1119        </span>
  • password-protect-page/trunk/includes/views/general/view-ppw-form-message.php

    r2136149 r3416351  
    1 <tr class="ppwp_free_version">
     1<tr class="ppwp_free_version ppwp-gray-out">
    22    <td class="feature-input"><span class="feature-input"></span></td>
    33    <td>
    44        <p>
    5             <label><?php echo esc_html__( 'Form Message', PPW_Constants::DOMAIN ) ?></label>
     5            <label><?php echo esc_html__( 'Form Message', PPW_Constants::DOMAIN ) ?>
     6                <span class="ppwp_upgrade_advice">
     7                    <a rel="noopener" target="_blank" href="https://passwordprotectwp.com/pricing/">
     8                        <span class="ppwp_dashicons dashicons dashicons-lock">
     9                            <span class="ppwp_upgrade_tooltip"><?php echo esc_html__( 'Upgrade to Gold', 'password-protect-page' ) ?></span>
     10                        </span>
     11                    </a>
     12                </span>
     13            </label>
    614            <?php echo _e( 'Customize the message which displays above the password field.<em> Available in Pro version only.</em>', PPW_Constants::DOMAIN ) ?>
    715        </p>
    8         <input type="text" value="<?php echo esc_html( PPW_Constants::DEFAULT_FORM_MESSAGE ); ?>"/>
     16        <input type="text" disabled value="<?php echo esc_html( PPW_Constants::DEFAULT_FORM_MESSAGE ); ?>"/>
    917    </td>
    1018</tr>
  • password-protect-page/trunk/includes/views/general/view-ppw-general.php

    r3110907 r3416351  
    1313        include PPW_DIR_PATH . 'includes/views/general/view-ppw-whitelist-roles.php';
    1414        include PPW_DIR_PATH . 'includes/views/general/view-ppw-auto-protect-child-page.php';
    15         // include PPW_DIR_PATH . 'includes/views/general/view-ppw-protect-private-pages.php';
     15        include PPW_DIR_PATH . 'includes/views/general/view-ppw-protect-private-pages.php';
     16        include PPW_DIR_PATH . 'includes/views/general/view-ppw-allowed-regex-password.php';
    1617        include PPW_DIR_PATH . 'includes/views/general/view-ppw-hide-protected-post.php';
    1718        ?>
     
    4041                $form_message       = sprintf(
    4142                    // translators: %s: Link to documentation.
    42                     esc_html__( 'Customize the default %1$s including headline, description and button under %2$s.', PPW_Constants::DOMAIN ),
     43                    esc_html__( 'Customize the default %1$s including headline, description and button under %2$s. The following messages will display by default if you haven\'t customized them via WordPress Customizer.', PPW_Constants::DOMAIN ),
    4344                    $link_error_message,
    4445                    $link_customizer
     
    4950        </tr>
    5051        <?php
    51 //      include PPW_DIR_PATH . 'includes/views/general/view-ppw-form-message.php';
    52 //      include PPW_DIR_PATH . 'includes/views/general/view-ppw-error-message.php';
     52        include PPW_DIR_PATH . 'includes/views/general/view-ppw-form-message.php';
     53        include PPW_DIR_PATH . 'includes/views/general/view-ppw-error-message.php';
     54
    5355        ?>
    5456        <tr>
     
    6567        include PPW_DIR_PATH . 'includes/views/general/view-ppw-remove-search-engine.php';
    6668        include PPW_DIR_PATH . 'includes/views/general/view-ppw-remove-data.php';
     69        include PPW_DIR_PATH . 'includes/views/general/view-ppw-debug-log.php';
    6770        ?>
    6871    </table>
  • password-protect-page/trunk/includes/views/general/view-ppw-hide-protected-post.php

    r3110907 r3416351  
    66
    77$description = sprintf( esc_html__( '%s from selected views. Learn how to %s.', PPW_Constants::DOMAIN ), $link_description, $link_description_rss );
     8$is_pro_activated = apply_filters( PPW_Constants::HOOK_IS_PRO_ACTIVATE, false );
     9$disabled_class = !$is_pro_activated ? 'ppwp-gray-out' : '';
    810?>
    9 <tr>
     11<tr class="<?php echo esc_attr( $disabled_class ); ?>">
    1012    <td class="feature-input"><span class="feature-input"></span></td>
    1113    <td>
    1214        <p>
    13             <label><?php echo esc_html__( 'Protected Content Visibility', PPW_Constants::DOMAIN ); ?></label>
     15            <label><?php echo esc_html__( 'Protected Content Visibility', PPW_Constants::DOMAIN ); ?>
     16            <?php if(!$is_pro_activated){ ?>
     17                <span class="ppwp_upgrade_advice">
     18                    <a rel="noopener" target="_blank" href="https://passwordprotectwp.com/pricing/">
     19                        <span class="ppwp_dashicons dashicons dashicons-lock">
     20                            <span class="ppwp_upgrade_tooltip"><?php echo esc_html__( 'Upgrade to Gold', 'password-protect-page' ) ?></span>
     21                        </span>
     22                    </a>
     23                </span>
     24            <?php } ?> 
     25            </label>
    1426            <?php echo $description; // phpcs:ignore -- could not escape html ?>
    1527        <p>Switch post types to customize their own visibility. Only Pages & Posts are available on Free version.</p>
  • password-protect-page/trunk/includes/views/general/view-ppw-protect-private-pages.php

    r2674928 r3416351  
    22$all_page_post = ppw_free_get_all_page_post();
    33?>
    4 <tr class="ppwp_free_version">
    5     <td class="feature-input"><span class="feature-input"></span></td>
     4<tr class="ppwp_free_version ppwp-gray-out">
     5    <td>
     6        <label class="pda_switch" for="ppwp_apply_password_for_pages_posts">
     7            <input type="checkbox" id="ppwp_apply_password_for_pages_posts" disabled />
     8            <span class="pda-slider round"></span>
     9        </label>
     10    </td>
    611    <td>
    712        <p>
    813            <label>
    914                <?php echo esc_html__( 'Password Protect Private Pages', PPW_Constants::DOMAIN ) ?>
     15                <span class="ppwp_upgrade_advice">
     16                    <a rel="noopener" target="_blank" href="https://passwordprotectwp.com/pricing/">
     17                        <span class="ppwp_dashicons dashicons dashicons-lock">
     18                            <span class="ppwp_upgrade_tooltip"><?php echo esc_html__( 'Upgrade to Gold', 'password-protect-page' ) ?></span>
     19                        </span>
     20                    </a>
     21                </span>
    1022            </label>
    1123            <?php echo _e( 'Set the same password to protect the following pages and posts. Available in Pro version.', PPW_Constants::DOMAIN ) ?>
  • password-protect-page/trunk/includes/views/general/view-ppw-whitelist-roles.php

    r2845037 r3416351  
    1717            <option disabled value="logged_users"><?php echo esc_html__( 'Logged-in users', PPW_Constants::DOMAIN ) ?></option>
    1818            <option disabled value="custom_roles"><?php echo esc_html__( 'Choose custom roles', PPW_Constants::DOMAIN ) ?></option>
     19            <option disabled value="usernames"><?php echo esc_html__( 'Choose username', PPW_Constants::DOMAIN ) ?></option>
    1920        </select>
    2021    </td>
  • password-protect-page/trunk/includes/views/misc/view-ppw-misc.php

    r2845037 r3416351  
    1717    <table class="ppwp_settings_table" cellpadding="4">
    1818        <?php include PPW_DIR_PATH . 'includes/views/misc/view-ppw-restore-wp-password.php'; ?>
     19        <?php
     20        if ( ! is_pro_active_and_valid_license() ) {
     21            include PPW_DIR_PATH . 'includes/advanced/view-ppw-setting.php';
     22        }
     23        ?>
    1924    </table>
    2025    <?php do_action('ppw_render_misc_form'); ?>
  • password-protect-page/trunk/wp-protect-password.php

    r3330072 r3416351  
    1717 * Plugin URI:        https://passwordprotectwp.com?utm_source=user-website&utm_medium=pluginsite_link&utm_campaign=ppwp_lite
    1818 * Description:       Password protect the entire WordPress site, unlimited pages and posts by user roles. This plugin is required for our Pro version to work properly.
    19  * Version:           1.9.12
     19 * Version:           1.9.13
    2020 * Author:            BWPS
    2121 * Author URI:        https://passwordprotectwp.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'PPW_VERSION', '1.9.12' );
     38define( 'PPW_VERSION', '1.9.13' );
    3939
    4040if ( ! defined( 'PPW_DIR_PATH' ) ) {
     
    154154    echo wp_kses_post( $html_message );
    155155}
     156
     157/* Plugin Analytics Data */
     158function wpfolio_ppwp_analytics_load() {
     159
     160    require_once dirname( __FILE__ ) . '/wpfolio-analytics/wpfolio-analytics.php';
     161
     162    $wpfolio_analytics =  wpfolio_ppwp_anylc_init_module( array(
     163                            'id'            => 11,
     164                            'file'          => plugin_basename( __FILE__ ),
     165                            'name'          => 'Password Protect WordPress',
     166                            'slug'          => 'wp_protect_password_options',
     167                            'tempslug'      => 'wp_protect_password_options_optin',
     168                            'type'          => 'plugin',
     169                            'menu'          => 'wp_protect_password_options',
     170                            'redirect_page' => 'wp_protect_password_options',
     171                            'text_domain'   => 'password-protect-page',
     172                        ));
     173
     174    return $wpfolio_analytics;
     175}
     176
     177// Init Analytics
     178wpfolio_ppwp_analytics_load();
Note: See TracChangeset for help on using the changeset viewer.