<?php global $hostString; global $eff_settings_page; $sname = getThisPageShortName(); $defaultPage = get_site_url() . '/wp-admin/admin.php?page=' . $eff_settings_page; $createPage = get_site_url() . '/wp-admin/admin.php?page=' . $eff_settings_page . '&pluginType=defaultEdit&shortname=' . $sname . '&postURL='; $frameUrl = $hostString . "/auth?action=extAcess&from=wp&l=" . get_option('siteurl') . "&sname=" . $sname . "&call=prop"; ?> <div style="position:relative"><div id="load" style=""></div> <iframe onload="jQuery('#load').hide()" id="mye_edit" src="<?php echo $frameUrl; ?> " width="100%" seamless="" scrolling="no" frameborder="0" allowtransparency="true" height="600px"></iframe> <Script> jQuery(".nav-load").click(function(){ jQuery('#load').show(); }); var eMeth=window.addEventListener ? 'addEventListener':'attachEvent'; var msgEv = eMeth == 'attachEvent' ? 'onmessage' : 'message';var detect = window[eMeth]; detect(msgEv,editMessage,false); var defaultLink = "<?php echo $defaultPage; ?> "; var creatPage = "<?php echo $createPage; ?> "; function editMessage(e){ var m = e.data;
function echoEndUserPlugin($text) { global $hostString; global $eff_ssl_host; global $myeCDN; global $myeJSLoc; $mye_plugin_visib = get_option('mye_plugin_visib'); $eff_isOnPost = true; $eff_isOnPage = false; $eff_isOnCustom = false; $eff_isPreview = is_preview(); $eff_loadtype = ""; $eff_height = ""; //echo "<script>alert('mye_plugin_visib)=".($mye_plugin_visib!="")."');</script>"; if ($mye_plugin_visib == "") { $eff_isOnCustom = true; //echo "<script>alert('CustTYpe=".($cust_ptype!="")."');</script>"; } if ($mye_plugin_visib != null && isset($mye_plugin_visib)) { $mye_plugin_visib = json_decode($mye_plugin_visib, true); if ($mye_plugin_visib['isOnPost']) { $eff_isOnPost = true; } else { $eff_isOnPost = false; } if ($mye_plugin_visib['isOnPage']) { $eff_isOnPage = true; } if ($mye_plugin_visib['isOnCustom']) { $eff_isOnCustom = true; } if ($mye_plugin_visib['mye_load_on']) { $eff_loadtype = $mye_plugin_visib['mye_load_on']; } } $cur_post_typ = get_post_type(get_the_ID()); $effisPageOrPost = $cur_post_typ == "post" || $cur_post_typ == "page"; $eff_html = ""; if (is_single() || is_page()) { $eff_html = "<span id='mye_param' mye_instal='1' typ='" . $cur_post_typ . "'></span>"; if ($effisPageOrPost) { if ($cur_post_typ == "post" && $eff_isOnPost) { $effisPageOrPost = true; } else { if ($cur_post_typ == "page" && $eff_isOnPage) { $effisPageOrPost = true; } else { $effisPageOrPost = false; } } } else { if ($eff_isOnCustom) { $cust_ptype = $mye_plugin_visib['isOnCustomList']; //echo "<script>alert('CustTYpe=".($cust_ptype=="")."');</script>"; if ($cust_ptype != "") { if (array_key_exists($cur_post_typ, $mye_plugin_visib['isOnCustomList'])) { if ($cust_ptype[$cur_post_typ]) { $effisPageOrPost = true; } else { $effisPageOrPost = false; } } else { $effisPageOrPost = false; } } else { $effisPageOrPost = true; } //my ends here if here } else { $effisPageOrPost = false; } } if ($effisPageOrPost) { //User Info global $myeCDN; global $myeJSLoc; global $mye_ver; $p_shortname = getThisPageShortName(); if (isset($p_shortname) && !empty($p_shortname)) { $myeJson = getEffectoDataJSON(null); $eff_html = $eff_html . "<div id='effecto_bar' V='" . $mye_ver . "' style='text-align:center;" . $eff_height . "' data-json='" . $myeJson . "'></div>"; $eff_html = $eff_html . getMyeScript($eff_loadtype); } else { $eff_html = $eff_html . "<div id='effecto_bar' V='" . $mye_ver . "' sn></div>"; } return $text . $eff_html; } else { return $text . $eff_html . "<div id='effecto_bar' V='" . $mye_ver . "' disabled></div>"; } } else { return $text . $eff_html; } }