Skip to content

Commit

Permalink
Changelog and version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
dparker1005 committed Jun 6, 2024
1 parent 7285616 commit 4bc0cbc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
28 changes: 14 additions & 14 deletions includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Set up limit and whether or not to use JavaScript.
*
* @since 0.3.0
* @deprecated TBD
* @deprecated 1.0
*/
function pmprolpv_init() {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );

// Check for backwards compatibility.
if ( ! defined( 'PMPRO_LPV_LIMIT' ) ) {
Expand Down Expand Up @@ -37,10 +37,10 @@ function pmprolpv_init() {
* Limit post views or load JS to do the same.
* Used to hook into wp action: add_action( 'wp', 'pmpro_lpv_wp' );
*
* @deprecated TBD
* @deprecated 1.0
*/
function pmpro_lpv_wp() {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );

global $current_user;
if ( function_exists( 'pmpro_has_membership_access' ) ) {
Expand Down Expand Up @@ -161,10 +161,10 @@ function pmpro_lpv_wp() {
/**
* Redirect to the configured page or the default levels page
*
* @deprecated TBD
* @deprecated 1.0
*/
function pmpro_lpv_redirect() {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );

$page_id = get_option( 'pmprolpv_redirect_page' );

Expand All @@ -182,10 +182,10 @@ function pmpro_lpv_redirect() {
* Javascript limit (hooks for these are above)
* This is only loaded on pages that are locked for members
*
* @deprecated TBD
* @deprecated 1.0
*/
function pmpro_lpv_wp_footer() {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );

global $current_user;

Expand Down Expand Up @@ -301,10 +301,10 @@ function pmpro_lpv_wp_footer() {
/**
* Mark the plugin as MMPU-incompatible.
*
* @deprecated TBD
* @deprecated 1.0
*/
function pmprolpv_mmpu_incompatible_add_ons( $incompatible ) {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );
$incompatible[] = 'PMPro Limit Post Views Add On';
return $incompatible;
}
Expand All @@ -313,10 +313,10 @@ function pmprolpv_mmpu_incompatible_add_ons( $incompatible ) {
* Display JavaScript field.
*
* @since 0.3.0
* @deprecated TBD
* @deprecated 1.0
*/
function pmprolpv_settings_field_use_js() {
_deprecated_function( __FUNCTION__, 'TBD' );
_deprecated_function( __FUNCTION__, '1.0' );
$use_js = get_option( 'pmprolpv_use_js' );
?>
<input value="1" type="checkbox" id="use_js" name="pmprolpv_use_js" <?php checked( $use_js, 1 ); ?>>
Expand All @@ -325,9 +325,9 @@ function pmprolpv_settings_field_use_js() {
}

/**
* @deprecated TBD. Use pmprolpv_get_level_limit() insetad.
* @deprecated 1.0. Use pmprolpv_get_level_limit() insetad.
*/
function pmpro_lpv_get_level_limit( $level_id ) {
_deprecated_function( __FUNCTION__, 'TBD', 'pmprolpv_get_level_limit()' );
_deprecated_function( __FUNCTION__, '1.0', 'pmprolpv_get_level_limit()' );
return pmprolpv_get_level_limit( $level_id );
}
6 changes: 3 additions & 3 deletions pmpro-limit-post-views.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Paid Memberships Pro - Limit Post Views Add On
* Plugin URI: https://www.paidmembershipspro.com/add-ons/pmpro-limit-post-views/
* Description: Integrates with Paid Memberships Pro to limit the number of times members and visitors can view posts on your site.
* Version: 0.6.1
* Version: 1.0
* Author: Paid Memberships Pro
* Author URI: https://www.paidmembershipspro.com
* Text Domain: pmpro-limit-post-views
Expand All @@ -13,7 +13,7 @@
define( 'PMPROLPV_BASE_FILE', __FILE__ );
define( 'PMPROLPV_BASENAME', plugin_basename( __FILE__ ) );
define( 'PMPROLPV_DIR', dirname( __FILE__ ) );
define( 'PMPROLPV_VERSION', '0.6.1' );
define( 'PMPROLPV_VERSION', '1.0' );

require_once( PMPROLPV_DIR . '/includes/functions.php' ); // Common functions.
require_once( PMPROLPV_DIR . '/includes/admin.php' ); // Settings page.
Expand All @@ -23,7 +23,7 @@
/**
* Load the languages folder for translations.
*
* @since TBD
* @since 1.0
*/
function pmprolpv_load_textdomain() {
load_plugin_textdomain( 'pmpro-limit-post-views', false, basename( dirname( __FILE__ ) ) . '/languages' );
Expand Down
12 changes: 11 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: strangerstudios
Tags: paid memberships pro, pmpro, nytimes, new york times, post limits, limit, posts
Requires at least: 4.0
Tested up to: 6.3
Stable tag: 0.6.1
Stable tag: 1.0

Integrates with Paid Memberships Pro to limit the number of times non-members can view posts on your site.

Expand All @@ -30,6 +30,16 @@ Please post it in the GitHub issue tracker here: https://github.com/strangerstud
Please visit our premium support site at http://www.paidmembershipspro.com for more documentation and our support forums.

== Changelog ==
= 1.0 - 2024-06-06 =
* FEATURE: Custom JavaScript can now be run when LPV is granting access to restricted content using the `pmprolpv_allow_view_js` filter.
* FEATURE: Custom JavaScript can now be run when LPV is denying access to content using the `pmprolpv_deny_view_js` filter.
* ENHANCEMENT: Overhauled the view tracking cookie data structure for simplicity and to allow for future enhancements.
* BUG FIX/ENHANCEMENT: Added support for Multiple Memberships Per User.
* BUG FIX/ENHANCEMENT: View tracking and content restriction are now performed using an AJAX call to avoid caching issues.
* REFACTOR: Organized plugin code into separate files.
* DEPRECATED: Removed the option to redirect from restricted content with PHP.
* DEPRECATED: No longer tracking views per level. If the user has multiple levels, LPV will track views until the total number of views surpasses the limit for all of their levels.

= 0.6.1 - 2023-10-13 =
* BUG FIX/ENHANCEMENT: Marked plugin as incompatible with Multiple Memberships Per User for the PMPro v3.0 update. #52 (@dparker1005)
* BUG FIX: Fixed timezone issue where cookie expiration dates could be set in the past. (@ideadude)
Expand Down

0 comments on commit 4bc0cbc

Please sign in to comment.