本文整理汇总了PHP中UniteBaseClassRev::addAction方法的典型用法代码示例。如果您正苦于以下问题:PHP UniteBaseClassRev::addAction方法的具体用法?PHP UniteBaseClassRev::addAction怎么用?PHP UniteBaseClassRev::addAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UniteBaseClassRev
的用法示例。
在下文中一共展示了UniteBaseClassRev::addAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAddScripts
/**
*
* a must function. you can not use it, but the function must stay there!.
*
*/
public static function onAddScripts()
{
global $wp_version;
$style_pre = '';
$style_post = '';
if ($wp_version < 3.7) {
$style_pre = '<style type="text/css">';
$style_post = '</style>';
}
$operations = new RevOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
$includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
$strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
//put the includes only on pages with active widget or shortcode
// if the put in match, then include them always (ignore this if)
if ($isPutIn == false && $includesGlobally == "off") {
$isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
$hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
if ($isWidgetActive == false && $hasShortcode == false) {
return false;
}
}
self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
$custom_css = RevOperations::getStaticCss();
$custom_css = UniteCssParserRev::compress_css($custom_css);
wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
/*
*/
/*
$styles = $db->fetch(GlobalsRevSlider::$table_css);
$styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
$styles = UniteCssParserRev::compress_css($styles);
wp_add_inline_style( 'rs-plugin-settings', $style_pre.$styles.$style_post );
// KRISZTIAN MODIFICATION FOR INNERLAYERS
$stylesinnerlayers = str_replace('.tp-caption', '',$styles);´
wp_add_inline_style( 'rs-plugin-settings', $style_pre.$stylesinnerlayers.$style_post );
// END MODIFICATION
*/
$setBase = is_ssl() ? "https://" : "http://";
$url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
self::addScriptAbsoluteUrl($url_jquery, "jquery");
if ($includesFooter == "off") {
$waitfor = array('jquery');
$enable_logs = UniteFunctionsRev::getVal($arrValues, "enable_logs", 'off');
if ($enable_logs == 'on') {
self::addScriptWaitFor("jquery.themepunch.enablelog", "rs-plugin/js", 'enable-logs');
$waitfor[] = 'enable-logs';
}
self::addScriptWaitFor("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools', $waitfor);
self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'tp-tools');
} else {
//put javascript to footer
UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
}
}
示例2: onAddScripts
/**
*
* a must function. you can not use it, but the function must stay there!.
*
*/
public static function onAddScripts()
{
$operations = new RevOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
$includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
$strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
//put the includes only on pages with active widget or shortcode
// if the put in match, then include them always (ignore this if)
if ($isPutIn == false && $includesGlobally == "off") {
$isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
$hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
if ($isWidgetActive == false && $hasShortcode == false) {
return false;
}
}
self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
//check if dynamic-captions.css exists. If not, include captions.php
if (file_exists(self::$path_plugin . "rs-plugin/css/dynamic-captions.css") == false) {
self::addDynamicStyle("captions", "rs-plugin-captions", "rs-plugin/css");
} else {
$db = new UniteDBRev();
$styles = $db->fetch(GlobalsRevSlider::$table_css);
$styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
wp_add_inline_style('rs-plugin-settings', $styles);
//self::addStyle("dynamic-captions","rs-captions","rs-plugin/css");
}
$custom_css = RevOperations::getStaticCss();
wp_add_inline_style('rs-plugin-settings', $custom_css);
//self::addStyle("static-captions","rs-plugin-static","rs-plugin/css");
$setBase = is_ssl() ? "https://" : "http://";
$url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
self::addScriptAbsoluteUrl($url_jquery, "jquery");
if ($includesFooter == "off") {
self::addScriptWaitFor("jquery.themepunch.plugins.min", "rs-plugin/js", 'themepunchtools', 'jquery');
self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'jquery');
} else {
//put javascript to footer
UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
}
}
示例3: onAddScripts
public static function onAddScripts()
{
global $wp_version;
$style_pre = '';
$style_post = '';
if ($wp_version < 3.7) {
$style_pre = '<style type="text/css">';
$style_post = '</style>';
}
$operations = new RevOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
$includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
$strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
if ($isPutIn == false && $includesGlobally == "off") {
$isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
$hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
if ($isWidgetActive == false && $hasShortcode == false) {
return false;
}
}
self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
$custom_css = RevOperations::getStaticCss();
$custom_css = UniteCssParserRev::compress_css($custom_css);
wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
$setBase = get_http();
$url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
self::addScriptAbsoluteUrl($url_jquery, "jquery");
if ($includesFooter == "off") {
$waitfor = array('jquery');
$enable_logs = UniteFunctionsRev::getVal($arrValues, "enable_logs", 'off');
if ($enable_logs == 'on') {
self::addScriptWaitFor("jquery.themepunch.enablelog", "rs-plugin/js", 'enable-logs');
$waitfor[] = 'enable-logs';
}
self::addScriptWaitFor("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools', $waitfor);
self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'tp-tools');
} else {
UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
}
}
示例4: onAddScripts
/**
*
* a must function. you can not use it, but the function must stay there!.
*
*/
public static function onAddScripts()
{
$operations = new RevOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
$includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
$strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
//put the includes only on pages with active widget or shortcode
// if the put in match, then include them always (ignore this if)
if ($isPutIn == false && $includesGlobally == "off") {
$isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
$hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
if ($isWidgetActive == false && $hasShortcode == false) {
return false;
}
}
self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
$custom_css = RevOperations::getStaticCss();
$custom_css = UniteCssParserRev::compress_css($custom_css);
wp_add_inline_style('rs-plugin-settings', $custom_css);
$setBase = is_ssl() ? "https://" : "http://";
$url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
self::addScriptAbsoluteUrl($url_jquery, "jquery");
if ($includesFooter == "off") {
$use_hammer = UniteFunctionsRev::getVal($arrValues, "use_hammer_js", 'on');
$waitfor = array('jquery');
if ($use_hammer == 'off') {
self::addScriptWaitFor("jquery.themepunch.disablehammer", "rs-plugin/js", 'disable-hammer');
$waitfor[] = 'disable-hammer';
}
self::addScriptWaitFor("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools', $waitfor);
self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'tp-tools');
} else {
//put javascript to footer
UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
}
}