Changeset 3416351
- Timestamp:
- 12/10/2025 11:44:36 AM (4 months ago)
- Location:
- password-protect-page/trunk
- Files:
-
- 10 edited
-
includes/services/class-ppw-shortcode.php (modified) (2 diffs)
-
includes/views/general/view-ppw-auto-protect-child-page.php (modified) (1 diff)
-
includes/views/general/view-ppw-error-message.php (modified) (1 diff)
-
includes/views/general/view-ppw-form-message.php (modified) (1 diff)
-
includes/views/general/view-ppw-general.php (modified) (4 diffs)
-
includes/views/general/view-ppw-hide-protected-post.php (modified) (1 diff)
-
includes/views/general/view-ppw-protect-private-pages.php (modified) (1 diff)
-
includes/views/general/view-ppw-whitelist-roles.php (modified) (1 diff)
-
includes/views/misc/view-ppw-misc.php (modified) (1 diff)
-
wp-protect-password.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
password-protect-page/trunk/includes/services/class-ppw-shortcode.php
r3330072 r3416351 96 96 add_action( 'the_post', array( $this, 'maybe_remove_ppwp_shortcode' ), 10 ); 97 97 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 ); 99 99 100 100 /** … … 272 272 return apply_filters( 'ppw_pcp_password_form', $password_form, $attrs ); 273 273 } 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 } 275 289 /** 276 290 * 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 4 4 */ 5 5 ?> 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> 8 8 <td> 9 9 <p> 10 10 <label> 11 11 <?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> 12 19 </label> 13 20 <?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"> 2 2 <td class="feature-input"><span class="feature-input"></span></td> 3 3 <td> 4 4 <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> 6 14 <?php echo _e( 'Customize the error message when users enter wrong passwords.<em> Available in Pro version only.</em>', PPW_Constants::DOMAIN ) ?> 7 15 </p> 8 16 <span> 9 <input type="text" 17 <input type="text" disabled 10 18 value="<?php echo esc_html( PPW_Constants::DEFAULT_WRONG_PASSWORD_MESSAGE ); ?>"/> 11 19 </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"> 2 2 <td class="feature-input"><span class="feature-input"></span></td> 3 3 <td> 4 4 <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> 6 14 <?php echo _e( 'Customize the message which displays above the password field.<em> Available in Pro version only.</em>', PPW_Constants::DOMAIN ) ?> 7 15 </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 ); ?>"/> 9 17 </td> 10 18 </tr> -
password-protect-page/trunk/includes/views/general/view-ppw-general.php
r3110907 r3416351 13 13 include PPW_DIR_PATH . 'includes/views/general/view-ppw-whitelist-roles.php'; 14 14 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'; 16 17 include PPW_DIR_PATH . 'includes/views/general/view-ppw-hide-protected-post.php'; 17 18 ?> … … 40 41 $form_message = sprintf( 41 42 // 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 ), 43 44 $link_error_message, 44 45 $link_customizer … … 49 50 </tr> 50 51 <?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 53 55 ?> 54 56 <tr> … … 65 67 include PPW_DIR_PATH . 'includes/views/general/view-ppw-remove-search-engine.php'; 66 68 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'; 67 70 ?> 68 71 </table> -
password-protect-page/trunk/includes/views/general/view-ppw-hide-protected-post.php
r3110907 r3416351 6 6 7 7 $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' : ''; 8 10 ?> 9 <tr >11 <tr class="<?php echo esc_attr( $disabled_class ); ?>"> 10 12 <td class="feature-input"><span class="feature-input"></span></td> 11 13 <td> 12 14 <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> 14 26 <?php echo $description; // phpcs:ignore -- could not escape html ?> 15 27 <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 2 2 $all_page_post = ppw_free_get_all_page_post(); 3 3 ?> 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> 6 11 <td> 7 12 <p> 8 13 <label> 9 14 <?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> 10 22 </label> 11 23 <?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 17 17 <option disabled value="logged_users"><?php echo esc_html__( 'Logged-in users', PPW_Constants::DOMAIN ) ?></option> 18 18 <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> 19 20 </select> 20 21 </td> -
password-protect-page/trunk/includes/views/misc/view-ppw-misc.php
r2845037 r3416351 17 17 <table class="ppwp_settings_table" cellpadding="4"> 18 18 <?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 ?> 19 24 </table> 20 25 <?php do_action('ppw_render_misc_form'); ?> -
password-protect-page/trunk/wp-protect-password.php
r3330072 r3416351 17 17 * Plugin URI: https://passwordprotectwp.com?utm_source=user-website&utm_medium=pluginsite_link&utm_campaign=ppwp_lite 18 18 * 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.1 219 * Version: 1.9.13 20 20 * Author: BWPS 21 21 * Author URI: https://passwordprotectwp.com … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'PPW_VERSION', '1.9.1 2' );38 define( 'PPW_VERSION', '1.9.13' ); 39 39 40 40 if ( ! defined( 'PPW_DIR_PATH' ) ) { … … 154 154 echo wp_kses_post( $html_message ); 155 155 } 156 157 /* Plugin Analytics Data */ 158 function 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 178 wpfolio_ppwp_analytics_load();
Note: See TracChangeset
for help on using the changeset viewer.