Ejemplo n.º 1
0
function optinrev_wphead()
{
    global $wp_version, $optinrev_play;
    if (!optinrev_is_ie() && optinrev_is_mobile()) {
        return false;
    }
    if (!optinrev_getbool('optinrev_popup_enabled')) {
        return false;
    }
    $dir = OPTINREV_DIR;
    //default
    $optin_id = 1;
    //is popup enabled
    if (!optinrev_getbool('optinrev_optinrevolution/optin1_enabled')) {
        return false;
    }
    //optin popup
    $optin = optinrev_get('optinrevolution/optin' . $optin_id);
    if (empty($optin)) {
        return;
    }
    $js = sprintf('<link rel="stylesheet" href="' . home_url('?optinrev-popup=' . $optin_id) . '&view=%s" type="text/css">', optinrev_cid());
    $js .= sprintf('<script type="text/javascript" src="' . home_url('?optinrev-popup-vars=' . $optin_id) . '&t=%s"></script>', optinrev_cid());
    $js .= sprintf('<script type="text/javascript" src="' . $dir . 'js/jquery.simplemodal.js?t=%s"></script>', optinrev_cid());
    $js .= sprintf('<script type="text/javascript" src="' . $dir . 'js/optinrev-utils.js?t=%s"></script>', optinrev_cid());
    $js .= sprintf('<script type="text/javascript" src="' . $dir . 'js/optinrev-showonload.js?t=%s"></script>', optinrev_cid());
    echo $js;
}
Ejemplo n.º 2
0
tiny_mce.js?t=<?php 
echo optinrev_cid();
?>
"></script>
  <script type="text/javascript" src="<?php 
echo $jqy;
?>
jquery.js?t=<?php 
echo optinrev_cid();
?>
"></script>
  <script type="text/javascript" src="<?php 
echo OPTINREV_TINYMCE_PLUGINS . '/textedit/';
?>
js/textedit.js?t=<?php 
echo optinrev_cid();
?>
"></script>
  <script type="text/javascript">
    tinyMCE.init({ theme: "advanced", mode : "none", elements: 'mce_textedit', plugins: 'paste,lineheight', theme_advanced_buttons1 : "fontselect,fontsizeselect,forecolor,backcolor,|,lineheight,|,bold,italic,underline,separator,strikethrough,bullist,numlist,undo,redo,link,unlink",theme_advanced_buttons2 : "",theme_advanced_buttons3 : "",theme_advanced_toolbar_location : "top",theme_advanced_toolbar_align : "left",theme_advanced_path : false,invalid_elements : 'p',cleanup : true,force_br_newlines : true,force_p_newlines : false,forced_root_block : '',remove_redundant_brs : false,remove_linebreaks : true,theme_advanced_font_sizes : "8pt,10pt,12pt,14pt,18pt,24pt,30pt,36pt,48pt,60pt,72pt",content_css : "<?php 
echo $css_url;
?>
", paste_text_sticky : true, setup : function( ed ) {ed.onInit.add( function(ed, e) { ed.pasteAsPlainText = true; ed.dom.hide('mceDeleteObj');});}});
    jQuery(document).ready(function($){
      //loading
      setTimeout(function(){tinyMCE.execCommand( 'mceAddControl', false, 'mce_textedit' );}, 500);
      setTimeout(function(){$('#loading, #clearb').hide();jQuery('.mceActionPanel').show();}, 1000);
      setTimeout(function(){$('.scn').hide();}, 1500);
    });
	</script>
</head>
Ejemplo n.º 3
0
 function optinrev_enqueue($option)
 {
     global $plugin_page, $wp_version;
     $dir = OPTINREV_DIR;
     $http = $_SERVER['HTTP_HOST'] == 'localhost' ? 'http:' : '';
     switch ($option) {
         case 0:
             wp_enqueue_style('optinrev_style', $dir . 'css/optinrev-style.css');
             wp_enqueue_script('jibtn', $dir . 'js/jquery.ibutton.js');
             wp_enqueue_script('jsadmin', $dir . 'js/optinrev-admin.js?t=' . optinrev_cid());
             break;
         case 1:
             //Style
             wp_enqueue_style('jqueryui_css', $http . '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/ui-lightness/jquery-ui.css');
             wp_enqueue_style('optinrev_css', home_url('?optinrev-popup=' . $plugin_page) . '&t=' . optinrev_cid());
             wp_enqueue_style('optinrev-wp-theme-css', $dir . '/css/optinrev-wp-theme.css?t=' . optinrev_cid());
             wp_enqueue_style('optinrev-style', $dir . 'css/optinrev-style.css?t=' . optinrev_cid());
             wp_enqueue_media();
             // wp js
             optinrev_load_jquery();
             wp_enqueue_script('optinrev-tinymce', $dir . 'js/tiny_mce/tiny_mce.js?t=' . optinrev_cid(), array(), $wp_version, false);
             wp_enqueue_script('jquery-ui-slider');
             wp_enqueue_script('jquery-form');
             wp_enqueue_script('jquery_jscolor', $dir . 'jscolor/jscolor.js', array(), $wp_version, true);
             wp_enqueue_script('jibtn', $dir . 'js/jquery.ibutton.js', array(), $wp_version, true);
             wp_enqueue_script('jquery_modaljs', $dir . 'js/jquery.simplemodal.js?t=' . optinrev_cid(), array(), $wp_version, true);
             break;
         case 2:
             wp_enqueue_style('optinrev_style', $dir . 'css/optinrev-style.css?t=' . optinrev_cid());
             break;
     }
 }