View make-pot.sh
#!/bin/bash -e | |
# ============================================================== | |
# Plugin Language File Creator | |
# Author: Theunis Coetzee (ipokkel) | |
# | |
# This file must be placed inside the /plugin-folder/language/ folder | |
# | |
# Excecute from plugin root folder with ". languages/make-pot.sh" | |
# Check if executed from root, if not moves up one folder and |
View my-pmpro-directory-widget-sql-parts.php
<?php | |
function my_pmpro_directory_widget_filter_sql_parts( $sql_parts, $levels, $s, $pn, $limit, $start, $end, $order_by, $order ) { | |
global $wpdb; | |
// Filter results based on ares of practice is selected. | |
if ( ! empty( $_REQUEST['areasofpractice'] ) && is_array( $_REQUEST['areasofpractice'] ) ) { | |
$sql_parts['JOIN'] .= " LEFT JOIN $wpdb->usermeta um_areasofpractice ON um_areasofpractice.meta_key = 'areasofpractice' AND u.ID = um_areasofpractice.user_id "; | |
$sql_parts['WHERE'] .= ' AND ( '; | |
$first_areasofpractice = true; |
View change-level-cost-text.php
<?php | |
/** | |
* This recipe is an example of how to change or translate | |
* localized text strings for PMPro Custom Level Cost Text Add On. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. |
View change-advanced-levels-shortcode.php
<?php | |
/** | |
* This recipe is an example of how to change or translate | |
* localized text strings for PMPro Advanced Levels Shortcode. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. |
View my-pmpro-confirmation-message-example.php
<?php | |
/** | |
* This recipe is an example of customizing the confirmation message displayed on | |
* the PMPro confirmation page after checkout. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
View my-pmpro-account-profile-action-links-removal.php
<?php | |
/** | |
* This recipe can be used to remove the profile action links on the account page. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_account_profile_action_links_removal( $pmpro_profile_action_links ) { |
View my-pmpro-account-profile-action-links.php
<?php | |
/** | |
* This recipe changes the profile action links on the account page. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_account_profile_action_links( $pmpro_profile_action_links ) { |
View terms-and-conditions.css
/* | |
Based upon the "Checkbox Hack" article by Chris Coyier - https://css-tricks.com/the-checkbox-hack/ | |
CSS inspired by Geoffrey Crofte - https://codepen.io/GeoffreyCrofte/pen/BiHzp | |
*/ | |
/* Base for label styling */ | |
#pmpro_tos_checked_div [type="checkbox"]:not(:checked), | |
#pmpro_tos_checked_div [type="checkbox"]:checked { | |
position: absolute; | |
left: -9999px; |
View terms-of-service-as-a-link-only.php
<?php | |
/** | |
* This recipe creates a Terms & Conditions checkbox on checkout | |
* with a link to the checkout page instead of displaying | |
* the Terms & Conditions page content on the page. | |
* | |
* This recipe requires that "Require Terms of Service on signups?" | |
* setting in Membershps > Settings > Advanced settings | |
* under "Checkout Settings" is set to "No". | |
* |
View my-pmprorh-init-must-love-dogs-example-save-function.php
<?php | |
// Create a registration form field with a custom callback | |
function my_pmprorh_init_must_love_dogs_example_save_function() { | |
// don't break if Register Helper is not loaded | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { | |
return false; | |
} | |
// define the fields | |
$fields = array(); | |
// Basic Text Field Example |
NewerOlder