public static function media_button_wizard()
    {
        add_thickbox();
        $wizhref = self::$epbase . '/wpembedcode-simple-search.aspx?pluginversion=' . YouTubePrefs::$version . '&wpversion=' . get_bloginfo('version') . '&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) . '&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) . '&blogwidth=' . YouTubePrefs::get_blogwidth() . '&domain=' . urlencode(site_url()) . '&prokey=' . urlencode(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) . '&myytdefaults=' . urlencode(http_build_query(YouTubePrefs::$alloptions)) . '&random=' . rand(1, 1000) . '&TB_iframe=true&width=950&height=800';
        ?>
        <a href="<?php 
        echo $wizhref;
        ?>
" class="thickbox button ytprefs_media_link" id="ytprefs_wiz_button" title="Visual YouTube Search Tool and Wizard - An easier embedding option"><span></span> YouTube</a>
        <?php 
    }
Exemple #2
0
    public static function media_button_wizard()
    {
        add_thickbox();
        $wizhref = self::$epbase . '/wpembedcode-simple-search.aspx?pluginversion=' . YouTubePrefs::$version . '&wpversion=' . get_bloginfo('version') . '&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) . '&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) . '&blogwidth=' . YouTubePrefs::get_blogwidth() . '&domain=' . urlencode(site_url()) . '&prokey=' . urlencode(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) . '&myytdefaults=' . urlencode(http_build_query(YouTubePrefs::$alloptions)) . '&random=' . rand(1, 1000) . '&TB_iframe=true&width=950&height=800';
        ?>
        <script type="text/javascript">
            function widen_ytprefs_wiz() {
                setTimeout(function() {
                    jQuery("#TB_window").animate({marginLeft: '-' + parseInt((950 / 2), 10) + 'px', width: '950px'}, 300);
                    jQuery("#TB_window iframe").animate({width: '950px'}, 300);
                }, 15);
            }
            jQuery(document).ready(function() {
                jQuery("#ytprefs_wiz_button").click(widen_ytprefs_wiz);
                jQuery(window).resize(widen_ytprefs_wiz);
            });
        </script>
        <a href="<?php 
        echo $wizhref;
        ?>
" class="thickbox button ytprefs_media_link" id="ytprefs_wiz_button" title="Visual YouTube Search Tool and Wizard - An easier embedding option"><span></span> YouTube</a>
        <?php 
    }