Giter VIP home page Giter VIP logo

pmpro-default-level's Introduction

PMPro Default Level

A WordPress plugin and addon for Paid Memberships Pro that allows you to set the default PMPro level requirements for new pages, posts, or any custom post type.

Features

  • Set the default level per post type (i.e. different post types can have different defaults)
  • Easily copy settings from and to post types if you have a lot of them
  • Reset level requirements for an existing post to the configured defaults.
  • Reset level requirements for new post to the configured defaults after changing but before saving.
  • Tools to reset all existing posts en masse to their configured default access levels (optionally filtered by post type).
  • Set WP_DEBUG to true for debug output on the "PMPro Default Levels" settings page.

Prerequisites

  • PHP 5.4+
  • The paid-memberships-pro WP plugin must be installed and activated.
    • Tested with versions 1.8.5.6 and 1.9.5.4. Should work with all recent versions.
  • The pmpro-cpt paid PMPro add-on must be installed and activated if you want to set the default access level for custom post types as well.

Caveats

  • Only effects new posts created via the editor in the WP backend. I.e. does not affect posts created dynamically e.g. by other plugins.
    • Gutenburg support has not been tested. It should work if gutenburg is backwards compatible with custom admin meta boxes which is what PMPro uses for the "Require Membership" box

TODO

  • Support dynamically generated posts as well.
  • Explicitly support Gutenburg

Release notes

v0.6

  • Add support to reset all posts (or all posts in a certain post type) to their configured default access levels

v0.5

  • Updated project license.

v0.4

  • Added support to for setting defaults per custom post type.
  • Added ability to reset new post to defaults after changing but before saving.

v0.3

  • Initial release; extracted from internal project
  • Cleaned up syntax and styling
  • Also show on edit page w/ link to reset

License

This project is licensed under the MIT open source license.

Read the full license here

pmpro-default-level's People

Contributors

bericp1 avatar

Stargazers

 avatar

Watchers

 avatar

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.