Esempio n. 1
0
 function print_footer_scripts()
 {
     if (!OP_CONTENT_UPLOAD) {
         op_print_footer_scripts(array('page-wizard', $this->cur_step));
         echo '<script type="text/javascript">var OP_PageBuilder = ' . json_encode($this->js) . ';</script>';
     }
 }
Esempio n. 2
0
function op_footer()
{
    do_action('op_footer');
    //Init the scripts array
    $js_scripts = array('tooltipster.min.js', 'selectnav.min.js', 'dropkick.js', 'jquery/jquery-ui-1.10.3.custom.min.js', 'jquery/jquery.sharrre-1.3.4.min.js', 'jquery/jquery.reveal.js', 'jquery/countdown.js', 'global.js');
    //Init the frontend array, which will then be converted to JSON
    if (!is_admin()) {
        op_localize_script('front');
        wp_enqueue_script('op-menus', OP_JS . 'menus.js', array());
    }
    //Print out script include
    foreach ($js_scripts as $script) {
        echo '<script type="text/javascript" src="' . OP_JS . $script . '"></script>';
    }
    //Print out footer scripts
    op_print_footer_scripts('front');
    wp_footer();
    //Return (which will not allow user in), if the user does not have permissions
    if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
        return;
    }
    if (!get_user_option('rich_editing')) {
        return;
    }
    //If we are previewing, run the following script
    $preview = !empty($_GET['preview']) ? $_GET['preview'] : false;
    echo $preview ? '
		<script type="text/javascript">
			jQuery(\'#TB_window\', window.parent.document).css({marginLeft: \'-\' + parseInt((1050 / 2),10) + \'px\',width:\'1050px\',height:\'600px\'});
			jQuery(\'#TB_iframeContent\', window.parent.document).css({width:\'1050px\',height:\'600px\'});
		</script>
	' : '';
    //Insert tracking scripts
    $tracking = op_default_option('analytics_and_tracking');
    echo !empty($tracking['google_analytics_tracking_code']) ? stripslashes($tracking['google_analytics_tracking_code']) : '';
    echo !empty($tracking['sitewide_tracking_code']) ? stripslashes($tracking['sitewide_tracking_code']) : '';
}
Esempio n. 3
0
function op_footer()
{
    do_action('op_footer');
    //Init the frontend array, which will then be converted to JSON
    if (!is_admin()) {
        //op_localize_script('front');
        wp_enqueue_script('op-menus', OP_JS . 'menus' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    }
    //echo '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>';
    //Print out script include
    // foreach($js_scripts as $script){
    //  echo '<script type="text/javascript" src="'.OP_JS.$script.'"></script>';
    // }
    wp_enqueue_script(OP_SN . '-tooltipster', OP_JS . 'tooltipster.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-selectnav', OP_JS . 'selectnav.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-dropkick', OP_JS . 'dropkick' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-jqueryui-1.10.3', OP_JS . 'jquery/jquery-ui-1.10.3.custom.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-sharrre', OP_JS . 'jquery/jquery.sharrre-1.3.4.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-reveal', OP_JS . 'jquery/jquery.reveal.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-countdown', OP_JS . 'jquery/countdown' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    wp_enqueue_script(OP_SN . '-global', OP_JS . 'global' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION);
    //Print out footer scripts
    op_print_footer_scripts('front');
    wp_footer();
    //Return (which will not allow user in), if the user does not have permissions
    if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
        return;
    }
    if (!get_user_option('rich_editing')) {
        return;
    }
    //If we are previewing, run the following script
    $preview = !empty($_GET['preview']) ? $_GET['preview'] : false;
    echo $preview ? '
        <script type="text/javascript">
            (function ($) {
                $(\'#TB_window\', window.parent.document).css({marginLeft: \'-\' + parseInt((1050 / 2),10) + \'px\',width:\'1050px\',height:\'600px\'});
                $(\'#TB_iframeContent\', window.parent.document).css({width:\'1050px\',height:\'600px\'});
            }(opjq));
        </script>
    ' : '';
}
Esempio n. 4
0
 function print_footer_scripts()
 {
     op_print_footer_scripts('launch-suite');
 }
Esempio n. 5
0
 function print_footer_scripts()
 {
     op_print_footer_scripts('dashboard');
 }
Esempio n. 6
0
 function print_footer_scripts()
 {
     op_print_footer_scripts('theme-settings');
 }
Esempio n. 7
0
 function print_footer_scripts()
 {
     op_print_footer_scripts(array('wizard', $this->cur_step));
 }
Esempio n. 8
0
 /**
  * Print footer scripts
  * @return void
  */
 public function printFooterScripts()
 {
     op_print_footer_scripts('support');
 }
Esempio n. 9
0
 /**
  * Print footer scripts.
  *
  * @return void
  */
 public function printFooterScripts()
 {
     op_print_footer_scripts('stats');
 }