function mepr_validate_coupon_for_active_members($errors) { $user = new MeprUser(get_current_user_id()); $coupon_code = (isset($_POST[‘mepr_coupon_code’]) && !empty( $_POST[‘mepr_coupon_code’])) ? stripslashes( $_POST[‘mepr_coupon_code’] ) : ”; // Define the coupon code as a constant define( ‘ACTIVE_MEMBER_COUPON’, ‘THECOUPONCODE’ ); // Check if it’s the specific coupon and the…Continue reading
function mepr_cust_limit_eu_signups( $errors ) { $usr_country = sanitize_text_field( $_POST[‘mepr-address-country’] ); $countries = require( MEPR_DATA_PATH.’/taxes/vat_countries.php’ ); //If EU country, but not GB, and no vat number entered, throw error if( array_key_exists( $usr_country, $countries ) && ‘GB’ != $usr_country && !isset( $_POST[‘mepr-vat-number’]…Continue reading
/** * Block login after 3 failed attempts. */ function block_login_after_three_attempts() { $login_lockout = get_option( ‘login_lockout’, array() ); // Get the user’s IP address. $user_ip = $_SERVER[‘REMOTE_ADDR’]; // Check if the user’s IP address is already in the lockout array.…Continue reading
add_filter(‘frm_data_sort’, ‘frm_remove_duplicates’, 21, 2); function frm_remove_duplicates( $options, $atts ) { if ( $atts[‘dynamic_field’][‘id’] == 100) { //change 100 to the ID of the Dynamic field $options = array_unique( $options ); } return $options; }Continue reading
// Code Added by: Sumaiya, Clickup Doc: https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-16835 add_action(‘fluentform/before_insert_submission’, function ($insertData, $data, $form) { if ($form -> id != 5) { return; } $redirectUrl = “https://community.inkontaktbringer.de/community/”; // You can change the redirect url after successful login // if you have…Continue reading
function my_soliloquy_video_url_filter( $url, $source, $id, $item, $data ) { if ( $source === ‘vimeo’ ) { // Modify the Vimeo URL to include the allow=”autoplay” attribute $url = str_replace(‘Continue reading
add_filter(‘envira_gallery_image_caption_allowed_html_tags’,’example_envira_gallery_image_caption_allowed_html_tags’, 5, 5); function example_envira_gallery_image_caption_allowed_html_tags($allowed_tags, $id, $item, $data, $i) { $allowed_tags[‘i’][‘class’][] = ‘fa’; $allowed_tags[‘i’][‘class’][] = ‘fa-facebook-square’; $allowed_tags[‘i’][‘class’][] = ‘fa-4x’; return $allowed_tags; }Continue reading
add_filter( ‘reactr_title’, ‘replace_blog_with_news’, 10, 1 ); function replace_blog_with_news( $title ) { if ( is_singular( ‘post’ ) ) { $title = str_replace( ‘Blog’, ‘News’, $title ); } return $title; }Continue reading
function my_custom_ngg_manage_galleries_items_per_page( $items_per_page ) { return 20; } add_filter( ‘ngg_manage_galleries_items_per_page’, ‘my_custom_ngg_manage_galleries_items_per_page’ );Continue reading