• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

Remove “Name:” Prefix from DRM Text Overlay

[Solved]

Foliovision › Forums › FV Player › How to … › Remove “Name:” Prefix from DRM Text Overlay

  • Mustafa 5 months, 3 weeks ago

    Hello FV Player Support,

    I am trying to customize the DRM Text Watermark so that it shows only the user’s phone number (without any prefix like “Name:”).

    Currently, no matter what I try, the overlay always appears as:

    Name: 797845455

    But what I need is only:

    797845455

    Here is the code I am currently using in my functions.php:

    function my_drm_find_phone_nocc( $user_id ) {
        // Most-likely meta keys used by Xoo-ML / XootiX plugins
        $candidates = array(
            'xoo-ml-user-reg-phone',   // matches your form field name
            'xoo_ml_user_reg_phone',
            'xoo_ml_phone',
            'xoo-ml-phone',
            'xoo_ml_phone_no',
            'xoo_ml_phone_nocc',
            'user_phone',
            'phone',
        );
    
        // Country code (if stored separately)
        $cc_raw = get_user_meta( $user_id, 'xoo-ml-user-reg-phone-cc', true );
        $cc_digits = $cc_raw ? preg_replace( '/\D+/', '', $cc_raw ) : '';
    
        foreach ( $candidates as $key ) {
            $val = get_user_meta( $user_id, $key, true );
            if ( is_string( $val ) && $val !== '' ) {
                $digits = preg_replace( '/\D+/', '', $val );
    
                // If the value begins with the CC, strip it off
                if ( $cc_digits && strpos( $digits, $cc_digits ) === 0 ) {
                    $digits = substr( $digits, strlen( $cc_digits ) );
                }
    
                // Return as-is (digits only, keeps leading zeroes if present)
                return $digits;
            }
        }
    
        // Optional fallback to Woo billing phone (still remove CC if present)
        $billing = get_user_meta( $user_id, 'billing_phone', true );
        if ( $billing ) {
            $digits = preg_replace( '/\D+/', '', $billing );
            if ( $cc_digits && strpos( $digits, $cc_digits ) === 0 ) {
                $digits = substr( $digits, strlen( $cc_digits ) );
            }
            return $digits;
        }
    
        return '';
    }
    
    /**
     * Append phone (no country code) to FV Player Pro DRM "name".
     */
    function tweak_fv_player_pro_drm_text( $data ) {
        $user = wp_get_current_user();
        if ( $user && $user->ID ) {
            $phone = my_drm_find_phone_nocc( $user->ID );
            if ( $phone !== '' ) {
                $data['name'] .= ' ' . $phone;
            }
        }
        return $data;
    }
    add_filter( 'fv_player_pro_drm_text', 'tweak_fv_player_pro_drm_text', 20 );

    No matter if I overwrite or append, FV Player seems to automatically prepend “Name:” to the DRM text.

    Could you please clarify:

    How to completely remove the “Name:” prefix from the DRM overlay?

    Is there a built-in filter or option to control the output format of the DRM text (instead of hardcoding “Name:”)?

    Thank you in advance!

    • This topic was modified 5 months, 3 weeks ago by Martin.
    • This topic was modified 5 months, 3 weeks ago by Martin.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Mustafa 6 months ago

    note: when i add my code it was separated
    also i catshed phone number from plugin that i used and it works

    Martin 6 months ago

    Hello Mustafa,

    Please deactivate and delete the FV Player Pro plugin you are using, then hit “Install Pro extension” at the top of the wp-admin -> FV Player -> Settings screen.

    Then switch to the Beta release using the steps from here if you are not already using it: https://foliovision.com/player/basic-setup/switching-fv-player-pro-to-beta


    That will give you the FV Player Pro plugin where these labels like Name: are part of the fields when you use the fv_player_pro_drm_text filter.

    Thanks,
    Martin

    Mustafa 6 months ago

    Hello, thank you for your support regarding the DRM text issue. I have tested the beta version you suggested, but honestly I don’t want to move to the beta . Could you please let me know if there is any alternative solution or fix available in the release version instead of switching to beta?

    Mustafa 6 months ago

    note: my code worked fine but the phone number appears like this “name: 797845455″ , but i want it like this ” 797845455 “

    Martin 6 months ago

    Hello Mustafa,

    I would suggest you to give the Beta version a try. Once you confirm that this change works for you, we can move it to the Release version.

    That way you will not get all the Beta updates and will be able to remain on the Release version, which is probably what you mean about not wanting to be on Beta.

    Thanks,
    Martin

    Mustafa 6 months ago

    Hello Martin,

    I applied the change on the Beta version, but it didn’t achieve what I needed. I tried removing the “name” prefix using multiple approaches, including JavaScript, CSS, and PHP in the theme’s functions.php, but the result was not as expected.

    Could you please advise on the next possible solution?

    Thanks,
    Mustafa

    Martin 6 months ago

    Hello Mustafa,

    I wanted to ensure you are using the Beta version by looking at the license checks for your plugin, but I couldn’t see any.

    Please send over wp-admin -> FV Player -> Settings -> Tools -> System Info. I would like to see what it says about your license and why it won’t show on our end.

    Thanks,
    Martin

Viewing 7 replies - 1 through 7 (of 7 total)
Reply To: Remove “Name:” Prefix from DRM Text Overlay



Please Sign in or Register to upload files.

Related Posts

  1. Reply To: How to add phone number on drm text feature

    Reply To: How to add phone number on drm text feature

  2. Reply To: Adjust settings to "Parse Video and youtube Links"?

    Reply To: Adjust settings to "Parse Video and youtube Links"?

  3. DRM Text

    DRM Text

Primary Sidebar

How to …

    Categories

    • Business
    • Camera Reviews
    • Case Studies
    • Design
    • FV Player
    • Internet Marketing
    • IT
    • Life
    • SEO
    • Slovak
    • Video of the Week
    • WordPress

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2026 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. ‭+421 2/5292 0086‬