• Hello

    How can I add my own Dynamic Watermark?

    Adding shortcode does not work, so I think u should tell me how to add my own Dynamic Watermark with coding.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Shayan Farhang Pazhooh

    (@shayanfp)

    I coded it.
    You can use this code: (Add it to the functions.php file)

    add_filter('presto-player/dynamic-data', 'shayanweb_add_custom_watermark_dynamic_data');
    function shayanweb_add_custom_watermark_dynamic_data($dynamic_data)
    {
        $current_user = wp_get_current_user();
    
        // Get the 'custom_user_meta' value for the current user - You have to put your own here:
        $user_wanted_data = get_user_meta($current_user->ID, 'custom_user_meta', true);
    
        // Add the custom dynamic data to the array
        $dynamic_data['{user.user_custom}'] = $user_wanted_data;
    
        return $dynamic_data;
    }

    Hello Shayan,

    Thank you for sharing your solution with us.

    Please let us know if you have other questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Dynamic Watermark’ is closed to new replies.