* indicates extensions currently in use
- Brackets Git by Martin Zagora *
- Brackets Snippets (by edc) by Edward Chu *
- Brackets Tab to space by David Deraedt *
- brackets-file-tree-exclude *
- Extensions Rating by Alex Bardanov *
add_action( 'pre_get_posts', 'custom_reverse_post_order' ); | |
function custom_reverse_post_order( $query ) { | |
if ( is_admin() ) | |
return; | |
if ( $query->is_main_query() && is_archive() && ! is_post_type_archive() && ($query->query_vars['category_name'] == 'category-name' || $query->query_vars['category_name'] == 'category-name') ) { | |
$query->set( 'orderby', 'date' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} |
<?php // Do not include this or the doc block if adding to a Customizations plugin | |
/** | |
* Add this to its own folder in your plugins directory or copy the code below this doc block to a Customizations Plugin and customize to suit your needs. | |
* | |
* Plugin Name: PMPro Register Helper Examples | |
* Description: Create a folder name in your plugins' folder with the same name as this filename, but without the .php extension. Save this file in that folder and then you can activate this plugin in your WordPress dashboard, | |
* Author: pbrocks | |
* Author URI: https://github.com/pbrocks | |
*/ |
<?php | |
/** | |
* customize_pmpro_login_redirect_url Creates conditions for each level to have its own confirmation URL | |
* | |
* @param [type] $return_url Different URL for each level | |
* @param [type] $request URL the user is coming from, ie login url. | |
* @param [type] $user user data | |
* @return [type] The URL of the level for user logging in | |
*/ | |
function customize_pmpro_login_redirect_url( $return_url, $request, $user ) { |
<?php | |
/** | |
* Redirect user based on user role after successful login. | |
* | |
* $pmpro_pages returns an array: | |
* * $pmpro_pages['account'] | |
* * $pmpro_pages['billing'] | |
* * $pmpro_pages['cancel'] | |
* * $pmpro_pages['checkout'] | |
* * $pmpro_pages['confirmation'] |
<?php | |
/** | |
* Add to PMPro Customizations plugin. Be sure not to include the opening php tag in line 1. | |
* | |
* Add this your customizations plugin to alter text for PMPro Add On Packages. | |
*/ | |
add_action( 'pmpro_invoice_bullets_top', 'pmproap_pmpro_invoice_links_top' ); | |
add_action( 'pmpro_invoice_bullets_top', 'pmproap_pmpro_member_links_top' ); | |
function pmproap_pmpro_invoice_links_top() { | |
$invoice_title = 'Purchased Add Ons'; |
<?php | |
/** | |
* The function some_kind_of_pmpro_redirection is an arbitrary name given to the | |
* function created to run this specific bit of code. You can name it anything | |
* meaningful that you like, assuming that it is unique to the code on the site. | |
* | |
* The name of the filter hook, however, is not arbitrary as this is something | |
* created by the PMPro plugin. In this case, pmpro_confirmation_url, tells | |
* WordPress when to run this code in the some_kind_of_pmpro_redirection function. | |
* |
<?php | |
/** | |
* Show next payment date under 'Expiration' field in PMPro account page. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Works for PayPal Express and Stripe payment gateways. | |
* www.paidmembershipspro.com | |
*/ | |
// Change the expiration text to show the next payment date instead of the expiration date | |
// This hook is setup in the wp_renewal_dates_setup function below | |
function my_pmpro_expiration_text($expiration_text) { |
* indicates extensions currently in use
/* | |
Copy PMPro shipping address fields to event espresso when they are blank for event espresso. | |
Add this code to a custom plugin or your active theme's functions.php, | |
then visit /?metacopy=1 as an administrator. | |
Make sure to understand the code before running so you know it is doing what you want it to. | |
*/ | |
function my_init_meta_copy() | |
{ |
mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.
Github will be the main account and bitbucket the secondary.