Coder Social home page Coder Social logo

strangerstudios / pmpro-user-pages Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 19.0 47 KB

When users checkout from a PMPro registration page, a page is created for them that only that user and WP admins will have access to.

Home Page: https://www.paidmembershipspro.com/add-ons/pmpro-user-pages/

PHP 100.00%
wordpress wordpress-plugin paid-memberships-pro strangerstudios-product

pmpro-user-pages's Introduction

=== Paid Memberships Pro - User Pages Add On ===
Contributors: strangerstudios
Tags: paid memberships pro, pmpro, membership, user pages
Requires at least: 4
Tested up to: 6.3
Stable tag: 0.7

When users checkout from a PMPro registration page, a page is created for them that only that user and WP admins will have access to.

== Description ==
This plugin currently requires Paid Memberships Pro. 

== Installation ==

1. Upload the `pmpro-user-pages` directory to the `/wp-content/plugins/` directory of your site.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. Create an empty members page as the top level page for all user pages.
1. Go to Memberships -> User Pages in the dashboard to set the top level page and choose which levels should generate user pages.

== Frequently Asked Questions ==

= I found a bug in the plugin. =

Please post it in the issues section of GitHub and we'll fix it as soon as we can. Thanks for helping. https://github.com/strangerstudios/pmpro-user-pages/issues

== Changelog ==
= 0.7 - 2023-08-18 =
* ENHANCEMENT: Added the `pmproup_allow_access_to_user_page` filter to adjust viewing restrictions for a user page. #14 (@andrewlimaza, @dparker1005)
* ENHANCEMENT: Added `<span>` tags around dates in the Account Page member links to allow styling that content. #13 (@kimwhite)
* BUG FIX/ENHANCEMENT: Now cleaning up user page data for users whose corresponding user page has been deleted. #12 (@dparker1005)
* BUG FIX/ENHANCEMENT: Improved compatibility with PMPro Multiple Memberships Per User Add On. #20 (@dparker1005)
* BUG FIX/ENHANCEMENT: Now creating sub-pages whenever a membership level is changed instead of only after checkouts. #20 (@dparker1005)
* BUG FIX/ENHANCEMENT: Updated localization and escaping of strings. #15 (@femiyb)

= .6 =
* BUG FIX/ENHANCEMENT: Now adding user page on pmpro_after_change_membership_level function call instead of pmpro_after_checkout. If you add a member manually, they will have a User Page generated.
* BUG FIX: Fixed warning when hiding user pages from searches.

= .5.3 =
* ENHANCEMENT: Now redirecting the PMPROUP_PARENT_PAGE_ID to the user page if available, else redirect to the homepage.

= .5.2 =
* BUG: Fixed display of frontend admin view for all user pages when user is deleted. 

= .5.1 =
* BUG: Fixed DB warning when checking for user page access. (Thanks, Gary Fichardt) 

= .5 =
* Created a settings page for parent page and user pages levels. This takes the place of the PMPROUP_PARENT_PAGE_ID and PMPROUP_LEVELS constants. Go to Memberships -> User Pages to set the settings and then remove your constant definitions.
* Added an option to the settings page to create user pages for existing members.
* Fixed issue where admins viewing a user page wouldn't see the subpages.
* All subpages of users pages (added manually by admins) are now similarly protected the same as the main subpage.

= .4 =
* Fixed some warnings.
* Readme and title/description updates.

= .3.1 =
* Added PMPROUP_LEVELS constant to pass a comma-separated list of level ids to create user pages for.

= .3 =
* Added a redirect away from the parent page for non-admins and a list of user pages for admins
* Fixed bug where incorrect URL might show up on the confirmation page.
* Added pmpro_user_page_postdata and pmpro_user_page_purchase_postdata to adjust the user pages that are created at checkout.

= .2 =
* Added pre_get_posts filter to keep user pages out of searches, etc.
* The main user page will now show a list of sub pages.

= .1 =
* This is the initial version of the plugin.

pmpro-user-pages's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pmpro-user-pages's Issues

use custom post type instead of page (or event a selected CPT per membership level)

Hi,

I do really like the idea behind this plug-in, especially if the page may contains "user" field, like name, email, and such.

But I'm thinking that we may rather want to have a given custom post type rather than page, so page remains whet they are (and supposed to be) while members are grouped in a cpt (where we may add specifc custom fieldn and etc.)
One nice extra feature could be to have a taxonomy that is linked to the membership level, when a given membership is "owned" but the user, then the page (or custom post type) has the term linked to the level.

Pushing further, we may want to have a different custom post-type for each/some membership level.

This said this is great step in this way, but could see implementing it if it was CPT rather than pages.

Cheers

Does it require a pmpro plus membership?

Hi, Strangerstudios:

This seems like a good function, but it's not working on my site.
I did download it at here, so I'm not sure.
Does it require a plus membership for activation?
Then it will work fine as I expect?

I found a bug!

Since my page is https when a new page is created with this plug-in for a new user it creates an "http" page. So when a user goes to that link shows has "Oops that page doesn't exist.

I was having errors and I even forces the SSL in settings of Memberships Pro. I no longer get that error because I slowly deactivated all the plugins until I found the culprit. I can just deactivate, but is there a way to make the page "https"

My site www.ktvocalstudio.com

New to Wordpress, but a fast learner with a bit of guidance!
Thank you!

Cannot activate User Pages if Unlock Add On is already activated

Describe the bug
If Unlock Add On is already activated, you cannot activate User Pages.

To Reproduce
Steps to reproduce the behavior:

  1. Unlock Add On is already activated
  2. Cannot activate User Pages

Screenshots
image

Customer sees this error upon activation:
Fatal error: Cannot redeclare pmproup_plugin_row_meta() (previously declared in /srv/htdocs/wp-content/plugins/pmpro-unlock/includes/admin.php:63) in /srv/htdocs/wp-content/plugins/pmpro-user-pages/pmpro-user-pages.php on line 316

I see this in the error log.

Expected behavior
You should be able to activate both.
Isolating the problem:

  • Deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • Reproduce this bug consistently using the steps above.

This came up in ticket 485313, and I could replicate.

WordPress Environment

Paid Memberships Pro 2.10.3, User Pages Add On .6, WordPress 6.2, PHP 7.4.30

Bug: When user page is deleted but user meta that user has a page is not.

This issue occurs under the following scenario:

  1. User pages plugin is deactivated and/or unistalled
  2. User deletes the pages previously created for users.
  3. User re-installs User Pages and activates plugin.
  4. In the plugin admin user selects memberships levels that should have user pagesd and selects checkbox to create user pages for existing members.
  5. Creation of user pages fails.

The cause of this issue is that the function checks whether the usermeta meta_key for pmproup_user_page exist but not whether the meta_value correlates with an existing post_id.

Menu widget and navigation links display links to other users when on PMPro User Pages

When using the PMPro User Pages addon and a user visits their unique user page, the page sub nav menu widget and previous/next page navigation links display page links to other users.

Could we consider adding filters to exclude pages from the subnav menu and navigation.

Possible methods to investigate are to be excluded from wp_list_page or maybe also via pre get posts or another WP hook.

Option to have a single page per user instead of one per order.

Currently this plugin creates a parent page for each user and then a sub page per order. This works well for some use cases (e.g. if each checkout is a call, the new page is used to store the call notes), but sometimes the site just wants 1 page per user.

Instead of avoiding the creation of the subpage, I think we should update the filter here so it can be used to make the plugin reuse an existing subpage if one already exists. https://github.com/strangerstudios/pmpro-user-pages/blob/master/pmpro-user-pages.php#L74

If the parent page does double duty as a content page and redirect, the code is going to be more complicated. Although I admit, it's a bit nicer end user experience to have the URL just be the user's nice name instead of their nice name plus /level-name/ or something like that.

PMPro User Pages conflicts with bbpress forum

When the PMPro User Pages plugin is activated bbpress ‘participants’ can only view topics, posts, or replies that they created themselves - but not ones created by other users. This is not true of the ‘moderator’.

Any idea what’s causing the problem? If I deactivate PMPro User Pages things return to normal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.