This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'embed_oembed_html', 'my_embed_filter', 10, 3 ); | |
| /** | |
| * function for filter 'embed_oembed_html' it echo's a iframe-tag with it's src empty. the src is kept in data-src so javascript can put in the src-attr on a later moment. (e.g. after a cookie-check) | |
| * | |
| * @author Floris P. Lof | |
| * @params String $html the ready made html received from an external API (like Twitter, Youtube, Vimeo) | |
| * @params String $url the original URI with WP's oEmbed called the external API | |
| * @params Array $attr extra attributes (width height) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'script_loader_src', 'my_script_loader_filter' ); | |
| /** | |
| * function for filter 'script_loader_src' it echo's a script-tag with it's src empty. the src is kept in data-src so javascript can put in the src-attr on a later moment. (e.g. after a cookie-check) | |
| * | |
| * @author Floris P. Lof | |
| * @params String $src the current source of the scriptfile to be included | |
| * @return Boolean false | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _gaq = _gaq || []; | |
| _gaq.push (['_setAccount', 'UA-XXXXXXX-YY']); | |
| _gaq.push (['_gat._anonymizeIp']); | |
| _gaq.push (['_trackPageview']); |
NewerOlder