add_filter( ‘charitable_sanitize_suggested_amount_description’, ‘charitable_disable_sanitize_suggested_amount_description’ ); function charitable_disable_sanitize_suggested_amount_description() { return false; }Continue reading
add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading
add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading
/** * Revert to legacy ‘HTML’ email template, v1.8.4 and below * * @link https://wpforms.com/developers/how-to-enable-legacy-email-template/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ $settings = (array) get_option( ‘wpforms_settings’, [] ); $settings[ ’email-template’ ] = ‘default’; update_option( ‘wpforms_settings’, $settings );Continue reading
/** * @link https://library.wpcode.com/snippet/j57gg315/ */ add_action( ‘simpay_payment_receipt_viewed’, /** * Runs the first time the payment confirmation page is viewed. * * @param array $payment_confirmation_data */ function( $payment_confirmation_data ) { // Payment customer data (not used in this example). $customer =…Continue reading
// Function to add the calculator to the admin menu function ft_calculator_admin_menu() { add_menu_page( “Fluid Typography Calculator”, // Page title “Typography Calculator”, // Menu title “manage_options”, // Capability “fluid-typography-calculator”, // Menu slug “ft_calculator_page” // Function that displays the page content…Continue reading
/** * @link https://library.wpcode.com/snippet/qo9xxmjo/ * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_update_wp_user( $event, $object ) { $email_address = $object->customer->email; $wp_user = get_user_by( ’email’, $email_address ); // User cannot be found,…Continue reading