{"id":269,"date":"2014-08-10T13:09:33","date_gmt":"2014-08-10T13:09:33","guid":{"rendered":"https:\/\/www.vdocipher.com\/blog\/?p=269"},"modified":"2025-12-16T10:55:57","modified_gmt":"2025-12-16T10:55:57","slug":"variables-on-wordpress-videos","status":"publish","type":"post","link":"https:\/\/www-uat.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/","title":{"rendered":"Watermark user\/time specific dynamic variables on WordPress videos"},"content":{"rendered":"<p><em>Please visit <a href=\"https:\/\/www.vdocipher.com\/blog\/2014\/12\/add-text-to-videos-with-watermark\/\">Add Text to Videos with Watermark<\/a> for a detailed introduction to adding watermark to your videos. This particular blog explains what is going on under the hood of the WP plugin, and is useful only if you are adding your own custom-built variables as part of watermark. Currently <strong>name<\/strong>, <strong>IP<\/strong> and <strong>email<\/strong> can be shown as part of watermark.<\/em><\/p>\n<p>You can download the WordPress plugin from the <a href=\"http:\/\/wordpress.org\/plugins\/vdocipher\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP Plugin Directory<\/a><\/p>\n<p>While <a href=\"https:\/\/www.vdocipher.com\/docs\/server\/playbackauth\/anno\/\">generating Annotation Code\/Watermark<\/a> on vdocipher videos using the WordPress plugin, you can configure the text to fetch dynamic user variables. These variables can be user name, email or date in custom format. Here is the complete list of variables which can be used in the annotation code.<\/p>\n<p>{name} : This shows the display name of the user who is viewing the video. This calls the function: wp_get_current_user()-&gt;display_name<\/p>\n<p>{email} : wp_get_current_user()-&gt;user_email<\/p>\n<p>{username} : wp_get_current_user()-&gt;user_login<\/p>\n<p>{id} : wp_get_current_user()-&gt;ID<\/p>\n<p>{ip} : $_SERVER[&#8216;REMOTE_ADDR&#8217;]\n<p>{date} : This function allows you to configure the video to show date in custom format. You can use the predefined PHP date constants to display date. The format is {date.pattern}, where pattern will be the input of PHP&#8217;s date function.<\/p>\n<pre>preg_replace_callback('\/\\{date\\.([^\\}]+)\\}\/', function($matches)\r\n{\r\n   return date($matches[1]);\r\n} , $vdo_annotate_code);<\/pre>\n<p>&nbsp;<\/p>\n<p>An example code using the above variable tokens:<\/p>\n<pre>[\r\n{'type':'rtext', 'text':'Your IP : {ip}', 'alpha':'0.8', 'color':'0xFF0000','size':'12','interval':'5000'},\r\n{'type':'text', 'text':'Time: {date.h:i:s A}', 'alpha':'0.5' , 'x':'150', 'y':'100', 'color':'0xFF0000', 'size':'12'}\r\n]<\/pre>\n<p>Check example video for the above code here: <a title=\"Add images and text to video with dynamic watermarking\" href=\"https:\/\/www.vdocipher.com\/blog\/2014\/12\/add-text-to-videos-with-watermark\/\">https:\/\/www.vdocipher.com\/blog\/2014\/12\/add-text-to-videos-with-watermark\/<\/a><\/p>\n<p>Currently, the WordPress plugin supports a single annotation parameter across the website. If you must have a video without the annotation, you need to add a no_annotate parameter <\/p>\n<pre><code>[vdo id='12345678' no_annotate=true]<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Please visit Add Text to Videos with Watermark for a detailed introduction to adding watermark to your videos. This particular blog explains what is going on under the hood of the WP plugin, and is useful only if you are adding your own custom-built variables as part of watermark. Currently name, IP and email can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,100,42],"tags":[44,43,45,59],"class_list":{"0":"post-269","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-using-vdocipher","7":"category-watermark","8":"category-wordpress","9":"tag-wordpress-secure-streaming","10":"tag-wordpress-video-plugin","11":"tag-wordpress-video-streaming","12":"tag-wordpress-watermark","13":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.0 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Watermark dynamic variables on WordPress videos<\/title>\n<meta name=\"description\" content=\"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Watermark user\/time specific dynamic variables on WordPress videos\" \/>\n<meta property=\"og:description\" content=\"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\" \/>\n<meta property=\"og:site_name\" content=\"VdoCipher Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vdociphertech\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-10T13:09:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-16T10:55:57+00:00\" \/>\n<meta name=\"author\" content=\"Vibhav Sinha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vdocipher\" \/>\n<meta name=\"twitter:site\" content=\"@vdocipher\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vibhav Sinha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\"},\"author\":{\"name\":\"Vibhav Sinha\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/44b7d612191edc5560c5cb64184d379c\"},\"headline\":\"Watermark user\/time specific dynamic variables on WordPress videos\",\"datePublished\":\"2014-08-10T13:09:33+00:00\",\"dateModified\":\"2025-12-16T10:55:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\"},\"wordCount\":280,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#organization\"},\"keywords\":[\"wordpress secure streaming\",\"wordpress video plugin\",\"wordpress video streaming\",\"wordpress watermark\"],\"articleSection\":[\"Using VdoCipher\",\"Watermark\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\",\"name\":\"Watermark dynamic variables on WordPress videos\",\"isPartOf\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#website\"},\"datePublished\":\"2014-08-10T13:09:33+00:00\",\"dateModified\":\"2025-12-16T10:55:57+00:00\",\"description\":\"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vdocipher.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Watermark user\/time specific dynamic variables on WordPress videos\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#website\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/\",\"name\":\"VdoCipher Blog\",\"description\":\"Secure Video Streaming\",\"publisher\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vdocipher.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#organization\",\"name\":\"VdoCipher\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png\",\"contentUrl\":\"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png\",\"width\":1625,\"height\":1925,\"caption\":\"VdoCipher\"},\"image\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vdociphertech\/\",\"https:\/\/x.com\/vdocipher\",\"https:\/\/www.linkedin.com\/company\/vdocipher\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/44b7d612191edc5560c5cb64184d379c\",\"name\":\"Vibhav Sinha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21359ad936924de4c06b12ee192755a4337f15761710afc5877a6f943f1c8a47?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21359ad936924de4c06b12ee192755a4337f15761710afc5877a6f943f1c8a47?s=96&r=g\",\"caption\":\"Vibhav Sinha\"},\"description\":\"(Co-Founder &amp; CTO) Brain behind all VdoCipher innovations, Vibhav eats and sleeps code. A physics and astronomy enthusiast; Vibhav actively works on video delivery technology, security and high volume data transfer using cloud.\",\"url\":\"https:\/\/www-uat.vdocipher.com\/blog\/author\/vibhavsinha\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Watermark dynamic variables on WordPress videos","description":"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/","og_locale":"en_US","og_type":"article","og_title":"Watermark user\/time specific dynamic variables on WordPress videos","og_description":"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.","og_url":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/","og_site_name":"VdoCipher Blog","article_publisher":"https:\/\/www.facebook.com\/vdociphertech\/","article_published_time":"2014-08-10T13:09:33+00:00","article_modified_time":"2025-12-16T10:55:57+00:00","author":"Vibhav Sinha","twitter_card":"summary_large_image","twitter_creator":"@vdocipher","twitter_site":"@vdocipher","twitter_misc":{"Written by":"Vibhav Sinha","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#article","isPartOf":{"@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/"},"author":{"name":"Vibhav Sinha","@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/44b7d612191edc5560c5cb64184d379c"},"headline":"Watermark user\/time specific dynamic variables on WordPress videos","datePublished":"2014-08-10T13:09:33+00:00","dateModified":"2025-12-16T10:55:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/"},"wordCount":280,"commentCount":0,"publisher":{"@id":"https:\/\/www.vdocipher.com\/blog\/#organization"},"keywords":["wordpress secure streaming","wordpress video plugin","wordpress video streaming","wordpress watermark"],"articleSection":["Using VdoCipher","Watermark","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/","url":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/","name":"Watermark dynamic variables on WordPress videos","isPartOf":{"@id":"https:\/\/www.vdocipher.com\/blog\/#website"},"datePublished":"2014-08-10T13:09:33+00:00","dateModified":"2025-12-16T10:55:57+00:00","description":"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.","breadcrumb":{"@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vdocipher.com\/blog\/2014\/08\/variables-on-wordpress-videos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vdocipher.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Watermark user\/time specific dynamic variables on WordPress videos"}]},{"@type":"WebSite","@id":"https:\/\/www.vdocipher.com\/blog\/#website","url":"https:\/\/www.vdocipher.com\/blog\/","name":"VdoCipher Blog","description":"Secure Video Streaming","publisher":{"@id":"https:\/\/www.vdocipher.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vdocipher.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vdocipher.com\/blog\/#organization","name":"VdoCipher","url":"https:\/\/www.vdocipher.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png","contentUrl":"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png","width":1625,"height":1925,"caption":"VdoCipher"},"image":{"@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vdociphertech\/","https:\/\/x.com\/vdocipher","https:\/\/www.linkedin.com\/company\/vdocipher"]},{"@type":"Person","@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/44b7d612191edc5560c5cb64184d379c","name":"Vibhav Sinha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21359ad936924de4c06b12ee192755a4337f15761710afc5877a6f943f1c8a47?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21359ad936924de4c06b12ee192755a4337f15761710afc5877a6f943f1c8a47?s=96&r=g","caption":"Vibhav Sinha"},"description":"(Co-Founder &amp; CTO) Brain behind all VdoCipher innovations, Vibhav eats and sleeps code. A physics and astronomy enthusiast; Vibhav actively works on video delivery technology, security and high volume data transfer using cloud.","url":"https:\/\/www-uat.vdocipher.com\/blog\/author\/vibhavsinha\/"}]}},"yoast":{"focuskw":"dynamic variables on WordPress","title":"Watermark dynamic variables on WordPress videos","metadesc":"VdoCipher wordpress plugin lets you add user-specific dynamic variables on videos. Protect video from download and sell videos online with wordpress plugin.","linkdex":"65","metakeywords":"","meta-robots-noindex":"","meta-robots-nofollow":"","meta-robots-adv":"","canonical":"","redirect":"","opengraph-title":"","opengraph-description":"","opengraph-image":"","twitter-title":"","twitter-description":"","twitter-image":""},"_links":{"self":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/posts\/269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/comments?post=269"}],"version-history":[{"count":3,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":20672,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/posts\/269\/revisions\/20672"}],"wp:attachment":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}