예제 #1
0
function likebtn_admin_header()
{
    $logo_url = _likebtn_get_public_url() . 'img/logo.png';
    $header = <<<HEADER
    <div class="wrap" id="likebtn">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          ga('create', 'UA-37384414-15', 'auto');
          ga('send', 'pageview');
        </script>
HEADER;
    //<div id="plan_upgrade">
    //                Plan:
    //        </div>
    /*$installation_timestamp = get_option('likebtn_installation_timestamp');
    
        if ( (($installation_timestamp && strtotime(date('Y-m-d H:i:s', $installation_timestamp) . ' +' . LIKEBTN_REVIEW_LINK_PERIOD) < time())
               || !$installation_timestamp)
             && (get_option('likebtn_plan') != LIKEBTN_PLAN_FREE && get_option('likebtn_plan') != LIKEBTN_PLAN_TRIAL)
        ) {*/
    //}
    $header .= '
        <div id="poststuff">
            <div id="post-body" class="metabox-holder columns-2">
                
                <div id="postbox-container-1" class="postbox-container">
                    <div class="meta-box-sortables ui-sortable">
                        <div class="postbox likebtn_logo">
                            <div class="inside likebtn_sidebar_inside">
                                <a href="https://likebtn.com/en/wordpress-like-button-plugin" target="_blank" title="LikeBtn.com"><img alt="" src="' . $logo_url . '" /></a>
                                <input type="submit" id="likebtn_contact" value="' . __('Contact Us', LIKEBTN_I18N_DOMAIN) . '" class="button-primary" onclick="likebtnPopup(\'' . __('https://likebtn.com/en/', LIKEBTN_I18N_DOMAIN) . 'customer.php/contact/full/?platform=WordPress&host_name=' . get_site_url() . '&email=' . get_option('likebtn_account_email') . '&likebtn_short_version=1\', \'\', 600, 600)">
                            </div>
                        </div>
                        <div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Plan & Features', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            ' . _likebtn_sidebar_plan() . '
                        </div>
                        <div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Synchronization', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            <div class="inside likebtn_sidebar_inside">
                                ' . _likebtn_sidebar_synchronization() . '
                            </div>
                        </div>' . ($_GET['page'] != 'likebtn_buttons' ? '<div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Follow', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            <div class="inside">
                                ' . _likebtn_sidebar_social() . '
                            </div>
                        </div>' : '') . '</div>
                </div>
                <div id="postbox-container-2" class="postbox-container">
                    <h1 class="nav-tab-wrapper">
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_buttons' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_buttons">' . __('Buttons', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_settings' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_settings">' . __('Settings', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_statistics' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_statistics">' . __('Statistics', LIKEBTN_I18N_DOMAIN) . ' <i class="premium_feature" title="PRO / VIP / ULTRA">&nbsp;</i></a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_reports' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_reports">' . __('Reports', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_votes' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_votes">' . __('Votes', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_widget' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_widget">' . __('Widget') . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_help' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_help">' . __('Help') . '</a>';
    $header .= '
                    <div id="premium_features_hint">
                        <i class="premium_feature"></i>' . __('Premium features', LIKEBTN_I18N_DOMAIN) . '</div>
    ';
    $header .= '</h1>';
    $header .= '<div id="likebtn_content">';
    if (get_option('likebtn_acc_data_correct') != '1' && $_GET['page'] != 'likebtn_settings' && $_GET['page'] != 'likebtn_help') {
        $header .= '<div class="likebtn_overlay"></div>';
    }
    echo $header;
}
예제 #2
0
function likebtn_admin_header()
{
    $logo_url = _likebtn_get_public_url() . 'img/logotype.png';
    $header = <<<HEADER
    <div class="wrap" id="likebtn">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          ga('create', 'UA-37384414-15', 'auto');
          ga('send', 'pageview');
        </script>
        <script type="text/javascript"> (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter31779816 = new Ya.Metrika({ id:31779816, clickmap:true, trackLinks:true, accurateTrackBounce:true }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script><noscript><div><img src="https://mc.yandex.ru/watch/31779816" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
        <h2 class="likebtn_logo">
            <a href="http://likebtn.com" target="_blank" title="LikeBtn Like Button"><img alt="" src="{$logo_url}">LikeBtn</a>
        </h2>
HEADER;
    //<div id="plan_upgrade">
    //                Plan:
    //        </div>
    /*$installation_timestamp = get_option('likebtn_installation_timestamp');
    
        if ( (($installation_timestamp && strtotime(date('Y-m-d H:i:s', $installation_timestamp) . ' +' . LIKEBTN_REVIEW_LINK_PERIOD) < time())
               || !$installation_timestamp)
             && (get_option('likebtn_plan') != LIKEBTN_PLAN_FREE && get_option('likebtn_plan') != LIKEBTN_PLAN_TRIAL)
        ) {*/
    //}
    $header .= '
        <div id="poststuff">
            <div id="post-body" class="metabox-holder columns-2">
                
                <div id="postbox-container-1" class="postbox-container">
                    <div class="meta-box-sortables ui-sortable">
                        <div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Plan & Features', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            ' . _likebtn_sidebar_plan() . '
                        </div>
                        <div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Synchronization', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            <div class="inside likebtn_sidebar_inside">
                                ' . _likebtn_sidebar_synchronization() . '
                            </div>
                        </div>
                        <div class="postbox">
                            <h3 class="hndle ui-sortable-handle"><span>' . __('Follow', LIKEBTN_I18N_DOMAIN) . '</span></h3>
                            <div class="inside">
                                ' . _likebtn_sidebar_social() . '
                            </div>
                        </div>
                    </div>
                </div>
                <div id="postbox-container-2" class="postbox-container">
                    <h2 class="nav-tab-wrapper">
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_buttons' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_buttons">' . __('Buttons', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_settings' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_settings">' . __('Synchronization', LIKEBTN_I18N_DOMAIN) . '</a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_statistics' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_statistics">' . __('Statistics', LIKEBTN_I18N_DOMAIN) . ' <i class="premium_feature" title="PRO / VIP / ULTRA">&nbsp;</i></a>
                        <a class="nav-tab ' . ($_GET['page'] == 'likebtn_help' ? 'nav-tab-active' : '') . '" href="' . admin_url() . 'admin.php?page=likebtn_help">' . __('Help') . '</a>';
    $header .= '
                    <div id="premium_features_hint">
                        <i class="premium_feature"></i>' . __('Premium / Trial features', LIKEBTN_I18N_DOMAIN) . '</div>
    ';
    $header .= '</h2>';
    echo $header;
}