Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlimaza committed Jan 19, 2024
2 parents 579e1af + 8c7c731 commit 78b55fe
Show file tree
Hide file tree
Showing 28 changed files with 1,541 additions and 1,269 deletions.
8 changes: 5 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Items to ignore when downloading a zip
pmpro-advanced-levels-shortcode-banner.png export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
pmpro-advanced-levels-shortcode-banner.jpg export-ignore
README.MD export-ignore
README.md export-ignore
src export-ignore
package.json export-ignore
49 changes: 49 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contribute to Paid Memberships Pro

Paid Memberships Pro is the "community solution" for membership sites on WordPress, and so contributions of all kinds are appreciated.

When contributing, please follow these guidelines to ensure things work as smoothly as possible.

__Please Note:__ GitHub is for bug reports and contributions only. If you have a support or customization question, go to our [Member Support Page](https://www.paidmembershipspro.com/support/) instead.

## Getting Started

* __Do not report potential security vulnerabilities here. Email them privately to [info@paidmembershipspro.com](mailto:info@paidmembershipspro.com) with the words "Security Vulnerability" in the subject.__
* Submit a ticket for your issue, assuming one does not already exist.
* Raise it on our [Issue Tracker](https://github.com/strangerstudios/pmpro-advanced-levels-page-shortcode/issues/new/choose)
* Clearly describe the issue including steps to reproduce the bug.
* Make sure you fill in the earliest version that you know has the issue as well as the version of WordPress you're using.

## Making Changes

* Fork the repository on GitHub
* For bug fixes, checkout the DEV branch of the PMPro repository.
* For new features and enhancements, checkout the branch for the version the feature is milestoned for.
* Make sure to pull in any "upstream" changes first.
* Use `git remote add upstream https://github.com/strangerstudios/pmpro-advanced-levels-page-shortcode.git` to set the upstream repo
* Use `git checkout dev` to get on the development branch.
* Use `git pull upstream dev` to get the latest updates.
* Use `git push` to push those updates to your fork.
* Create a new local branch for each separate bug fix or feature. This will ensure that each pull request is for one issue only and easier to process.
* Use `git checkout -b nameofmybugfixorfeature` to create the new branch
* Make the changes to your local repository.
* Ensure you stick to the [WordPress Coding Standards](https://codex.wordpress.org/WordPress_Coding_Standards) (even though much of the PMPro code does not currently)
* If you have an automatic beautifier in your IDE or dev environment, turn it off. Unrelated style changes in your pull requests will make them harder to process. Feel free to message the core development team to ask them to clean up a file you are working on if the inconsitent coding styles is bothering you.
* You can update the readme.txt to include a comment about your fix or feature in the changelog, but if you do not the core team will do it for you.
* When committing, reference your issue (if present) and include a note about the fix in the commit message.
* Push the changes to your fork.
* For bug fixes, submit a pull request to the DEV branch of the PMPro repository.
* For new features and enhancements, submit a pull request to the version the feature is milestoned for. This will usually be the version number following the current release unless the core dev team has milestoned the feature for a later release.
* We will process all pull requests and make suggestions or changes as soon as possible. Feel free to ping us politely via email or social networks to take a look at your pulls.

## Code Documentation

* We would like for every function, filter, class, and class method to be documented using phpDoc standards.
* An example of [how PMPro uses phpDoc blocks can be found here](https://gist.github.com/sunnyratilal/5308969).
* Please make sure that every function is documented so that when we update our API Documentation things don't go awry!
* If you're adding/editing a function in a class, make sure to add `@access {private|public|protected}`
* Finally, please use tabs and not spaces. The tab indent size should be 4 for all Paid Memberships Pro code.

# Additional Resources
* [General GitHub Documentation](https://help.github.com/)
* [GitHub Pull Request documentation](https://help.github.com/send-pull-requests/)
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: "🐛 Bug Report"
about: Report a bug if something isn't working as expected in Paid Memberships Pro.
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed or left unattended.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, please attach a screenshot to make your issue clearer.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Isolating the problem (mark completed items with an [x]):**
- [ ] I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
- [ ] This bug happens with a default WordPress theme active, or [Memberlite](https://wordpress.org/themes/memberlite/).
- [ ] I can reproduce this bug consistently using the steps above.

**WordPress Environment**
<details>
```
Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions.
```
</details>
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "⭐️ Enhancement"
about: If you have an idea to improve an existing feature or need something
for development (such as a new hook) please let us know or submit a Pull Request.
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
If applicable, add any other context or screenshots about the enhancement here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "➕ Feature Request"
about: "Suggest a new feature. We'll consider building it if it receives
sufficient interest!"
title: ''
labels: 'feature request'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
If applicable, add any other context or screenshots about your feature request here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "💬 Support Question"
about: "If you have a question, please see our docs or use our helpdesk."
title: ''
labels: 'Type: support'
assignees: ''

---

We don't offer technical support on GitHub so we recommend using the following:

**Reading our documentation**
Usage docs can be found here: https://www.paidmembershipspro.com/documentation/

**Technical support for premium extensions or if you're a Paid Memberships Pro Plus member**
Submit a ticket on our helpdesk by visiting https://www.paidmembershipspro.com/new-topic/ (Please note that an [active membership] (https://www.paidmembershipspro.com/pricing) is required for paid support.)

**General usage and development questions**
- WordPress.org Forums: https://wordpress.org/support/plugin/paid-memberships-pro
- Website: https://www.paidmembershipspro.com/contact/
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### All Submissions:

* [ ] Have you followed the [Contributing guidelines](https://github.com/strangerstudios/pmpro-advanced-levels-page-shortcode/blob/dev/.github/CONTRIBUTING.md)?
* [ ] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/strangerstudios/pmpro-advanced-levels-page-shortcode/pulls/) for the same update/change?

<!-- Mark completed items with an [x] -->

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Changes proposed in this Pull Request:

<!-- Describe the changes made to this Pull Request and the reason for such changes. -->

Resolves XXX.

### How to test the changes in this Pull Request:

1.
2.
3.

### Other information:

* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you successfully run tests with your changes locally?

<!-- Mark completed items with an [x] -->

### Changelog entry

> Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
63 changes: 21 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,49 +1,28 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
# Windows image file caches
Thumbs.db
ehthumbs.db

*.iml
# Folder config file
Desktop.ini

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# Recycle Bin used on file shares
$RECYCLE.BIN/

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Mac stuff
.DS_Store

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Sublime
*.sublime-project
*.sublime-workspace

# Gradle:
# .idea/gradle.xml
# .idea/libraries
# npm
node_modules
package-lock.json

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
# composer
vendor
composer.js
composer.lock

# Temporary files
*~
4 changes: 2 additions & 2 deletions README.MD → README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](pmpro-advanced-levels-shortcode-banner.jpg)
![](pmpro-advanced-levels-shortcode-banner.png)

# [Paid Memberships Pro - Advanced Levels Page Shortcode](https://www.paidmembershipspro.com/add-ons/pmpro-advanced-levels-shortcode/) #

Expand Down Expand Up @@ -33,4 +33,4 @@ There are various **ways to the help development** of Paid Memberships Pro - Adv
Here are some ways for **non-developers to contribute** to Paid Memberships Pro - Advanced Levels Page Shortcode:

1. Translate Paid Memberships Pro - Advanced Levels Page Shortcode into your own [language](https://www.paidmembershipspro.com/paid-memberships-pro-in-your-language/).
2. [Purchase a paid membership](https://paidmembershipspro.com/pricing) to help fund ongoing development and bug fixes.
2. [Purchase a paid membership](https://www.paidmembershipspro.com/pricing) to help fund ongoing development and bug fixes.
84 changes: 84 additions & 0 deletions blocks/build/advanced-levels-page/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "pmpro-advanced-levels/advanced-levels-page",
"title": "PMPro Advanced Levels Page",
"category": "pmpro",
"description": "Inserts a customizable membership level pricing table for Paid Memberships Pro.",
"keywords": [ "level", "price", "pricing table", "paid memberships pro", "pmpro" ],
"attributes": {
"back_link": {
"default": true,
"type": "boolean"
},
"checkout_button": {
"default": "Select",
"type": "string"
},
"compare": {
"default": "",
"type": "string"
},
"css_class": {
"default": "pmpro_btn",
"type": "string"
},
"description": {
"default": true,
"type": "boolean"
},
"discount_code": {
"default": "",
"type": "string"
},
"expiration": {
"default": true,
"type": "boolean"
},
"layout": {
"default": "div",
"type": "string"
},
"levels": {
"default": [],
"type": "string"
},
"price": {
"default": "short",
"type": "string"
},
"renew_button": {
"default": "Renew",
"type": "string"
}
},
"supports": {},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"reusable": false,
"spacing": {
"margin": true,
"padding": [
"horizontal",
"vertical"
],
"__experimentalDefaultControls": {
"padding": true
}
},
"example": {},
"textdomain": "pmpro-advanced-levels-page",
"editorScript": "file:./index.js",
"render": "file:./render.php"
}
1 change: 1 addition & 0 deletions blocks/build/advanced-levels-page/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'f3628d9fbb7e92fbdaee');
1 change: 1 addition & 0 deletions blocks/build/advanced-levels-page/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions blocks/build/advanced-levels-page/render.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
/**
* Render the Advanced Levels Page block on the frontend.
*/
$output = pmpro_advanced_levels_shortcode( $attributes );
?>
<div <?php echo get_block_wrapper_attributes(); ?>>
<?php echo $output; ?>
</div>
Loading

0 comments on commit 78b55fe

Please sign in to comment.