This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add this code to a plugin or theme functions.php | |
add_action('hwp_email_form', function() { | |
?> | |
<!-- put your custom form code here --> | |
<?php | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Works even if the image has no class or id */ | |
img[src="https://mysite.com/my-image.jpg"] { | |
content:url("https://mysite.com/my-image-2.jpg"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this code needs to go in a plugin | |
add_filter('bp_rest_activity_get_items_query_args', function( $args, $request ) { | |
// you can change the default value of activity type | |
$args['filter']['action'] = array('new_blog_post', 'activity_update'); | |
return $args; | |
}, 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using the below as a SQL statement prints out a statement that will drop each table one by one. Copy and paste the statement it prints to drop the tables. | |
SELECT CONCAT('DROP TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') AS stmt FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%_rg_%' AND TABLE_SCHEMA = 'db_yourdbname' LIMIT 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// when a user logs in, get WordPress data that can be used in the app, for example a membership level | |
// put this code in a custom plugin | |
add_filter( 'appp_login_data', 'apppresser_filter_login_data', 10, 2 ); | |
function apppresser_filter_login_data( $login_data, $user_id ) { | |
$member_subscription = rcp_get_subscription_id( $user_id ); | |
if( $member_subscription ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: AppPresser In App Purchases for Paid Memberships Pro | |
Plugin URI: https://apppresser.com | |
Description: This plugin listens for in app purchases or cancellations and adds/removes members from a membership level. | |
Version: 2.0.0 | |
Author: Scott Bolinger | |
Author URI: https://apppresser.com | |
License: GPLv2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: AppPresser Featured Images | |
Plugin URI: http://apppresser.com | |
Description: Add featured images to single posts in the app. | |
Version: 0.1 | |
Author: AppPresser Team | |
Author URI: https://apppresser.com | |
License: GPLv2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: AppPresser In App Purchases for LearnDash | |
Plugin URI: https://apppresser.com | |
Description: This plugin listens for in app purchases or cancellations and adds/removes members from a LearnDash course. | |
Version: 1.0.0 | |
Author: Scott Bolinger | |
Author URI: https://apppresser.com | |
License: GPLv2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your .zshrc file, change path to store zip, restart terminal | |
# run command `releasezip my-files-1.0`, which would create a zip at ../my-files-1.0.zip | |
# change output path (../) to whatever you want, for example Users/Me/Plugins/Releases/$1.zip | |
releasezip() { | |
zip -r ../$1.zip . -x '*.git*' --exclude=\*.DS_Store\* | |
open ../ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="ion-padding"> | |
<h2>Purchase</h2> | |
<p>For $9 per month, get access to analysis and commentary. Your subscription will automatically renew, cancel any time.</p> | |
<p>Enter your information below and click subscribe. By subscribing, you agree to the <a href="https://mysite.com/terms/" target="_blank" rel="noopener noreferrer">terms of service.</a></p> | |
<p>If you already have an account, please login. If you do not have an account, enter your email before clicking purchase, and one will be created for you.</p> | |
<in-app-purchase isSubscription="true" productId="my-product"></in-app-purchase> |