/** * Bypass Force Login to allow for exceptions. * * @param bool $bypass Whether to disable Force Login. Default false. * @param string $visited_url The visited URL. * @return bool */ function my_forcelogin_bypass( $bypass, $visited_url ) { // Allow…Continue reading
function mepr_send_password_email_after_signup( $event ) { $user = $event->get_data(); $mepr_options = MeprOptions::fetch(); $wp_user = MeprUtils::get_user_by( ‘id’, $user->ID ); // Creates and stores key (user_activation_key) with default expiration of 1 day add_filter( ‘allow_password_reset’, ‘MeprUser::allow_password_reset’, 99, 2 ); $key = get_password_reset_key($wp_user); remove_filter( ‘allow_password_reset’,…Continue reading
echo do_shortcode( ‘[automator_uf meta_key=”group_nis”]’ );Continue reading
function account_user_profile_update( $user ) { $user_id = $user->ID; $site_url = get_bloginfo( ‘wpurl’ ); $user_info = get_userdata( $user_id ); $user_name = $user_info->display_name; //Retrieves user’s full name $user_email = $user_info->user_email; //Retrieves user’s e-mail address $subject = “Profile Updated: “.$site_url.””; $message = “Profile…Continue reading
function user_profile_update( $user_id ) { $site_url = get_bloginfo( ‘wpurl’ ); $user_info = get_userdata( $user_id ); $user_name = $user_info->display_name; //Retrieves user’s full name $user_email = $user_info->user_email; //Retrieves user’s e-mail address $subject = “Profile Updated: “.$site_url.””; $message = “Profile of $user_name ,…Continue reading
function disable_admin_pw_changed_email_memberpress( $recipients, $subject, $message, $headers ) { if( strpos( $subject, ‘Password Lost/Changed’) !== false ) { $recipients = array(); // no recipients } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘disable_admin_pw_changed_email_memberpress’, 11, 4 );Continue reading
add_filter(‘woocommerce_consel_plans_filter’, function($plans, $order) { if ($order != null) { //se prodotto in promo è contenuto nel carrello, ed è l’unico prodotto $items = $order->get_items(); $product = $order->get_product_from_item( array_pop(array_reverse($items)) ); print_r($product->get_sku()); if ($items && count($items) === 1 && in_array($product->get_sku(), array(‘NMZ640’, ‘NMZ642’,…Continue reading
//Disable Widgets blocks add_filter( ‘use_widgets_block_editor’, ‘__return_false’ );Continue reading
// Disable Gutemberg add_filter( ‘use_block_editor_for_post’, ‘__return_false’, 10 );Continue reading
// Remove tags add_filter(‘wpcf7_autop_or_not’, ‘__return_false’);Continue reading