class acf_field_signature extends acf_field { /* * __construct * * This function will setup the field type data * * @type function * @date 5/03/2014 * @since 5.0.0 * * @param n/a * @return n/a */ function __construct() { /*…Continue reading
function export_urls_to_csv() { // Check if the user is logged in and is an admin if ( is_user_logged_in() && current_user_can( ‘administrator’ ) ) { $args = array( ‘post_type’ => ‘any’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ); $query = new…Continue reading
function maybe_hide_pause_resume_links( $link, $sub ) { // Replace 123, 456 with the membership IDs which members can pause/resume subscriptions for. $products_to_allow = array( ‘123’, ‘456’ ); $product = $sub->product(); if( in_array( $product->ID, $products_to_allow ) ) { return $link; } else…Continue reading
/** * Append markup for Cloudflare Turnstile widget at end of given form fieldset. */ function icAppendTurnstileTag($form, $action) { // Only append on WP-Members password reset form. // Sign-in and sign-up forms are handled by AIOWPS. if($action != ‘pwdreset’) return…Continue reading
/** * Append markup for Cloudflare Turnstile widget at end of given form fieldset. */ function icAppendTurnstileTag($form, $action) { // Only append on WP-Members password reset form. // Sign-in and sign-up forms are handled by AIOWPS. if($action != ‘pwdreset’) return…Continue reading
/** * Append markup for Cloudflare Turnstile widget at end of given form fieldset. */ function icAppendTurnstileTag($form, $action) { // Only append on WP-Members password reset form. // Sign-in and sign-up forms are handled by AIOWPS. if($action != ‘pwdreset’) return…Continue reading
function mepr_capture_stopped_sub( $event ) { global $wpdb; $subscription = $event->get_data(); $wpdb->update( $wpdb->prefix.’mepr_transactions’, array( “expires_at” => “2024-01-01 23:59:59” ), array( “subscription_id” => $subscription->id, “status” => “complete” ) ); } add_action( ‘mepr-event-subscription-stopped’, ‘mepr_capture_stopped_sub’ );Continue reading
function memberpress_account_subs_display( $atts, $content=” ) { if( !class_exists( ‘MeprAccountCtrl’ ) ) { return; } ob_start(); $acct_ctrl = new MeprAccountCtrl(); $action = ( isset($_REQUEST[ ‘action’ ] ) )?$_REQUEST[ ‘action’ ]:false; switch( $action ) { case ‘cancel’: $acct_ctrl->cancel(); break; case ‘suspend’: $acct_ctrl->suspend();…Continue reading
function mepr_remove_cancel_link( $link, $sub ) { $time = strtotime( $sub->created_at ); if( time() < strtotime( "+3 months", $time ) ) { return ''; } return $link; } add_filter( 'mepr_custom_cancel_link', 'mepr_remove_cancel_link', 10, 2 );Continue reading