本文整理汇总了PHP中vc_is_network_plugin函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_is_network_plugin函数的具体用法?PHP vc_is_network_plugin怎么用?PHP vc_is_network_plugin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_is_network_plugin函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setupReminder
public function setupReminder()
{
$deactivation_key = $this->deactivation();
if (empty($deactivation_key) && empty($_COOKIE['vchideactivationmsg']) && !vc_is_network_plugin() && !vc_is_updater_disabled()) {
add_action('admin_notices', array(&$this, 'adminNoticeLicenseActivation'));
}
}
开发者ID:Vatia13,项目名称:tofido,代码行数:7,代码来源:class-vc-license.php
示例2: showConfigurationTabs
/**
* @return bool
*/
public function showConfigurationTabs()
{
return !vc_is_network_plugin() || !is_network_admin();
}
开发者ID:iq007,项目名称:MadScape,代码行数:7,代码来源:class-vc-settings.php
示例3: addUpgradeMessageLink
/**
* Shows message on Wp plugins page with a link for updating from envato.
*/
public function addUpgradeMessageLink()
{
$is_activated = vc_license()->isActivated();
if (!$is_activated) {
$url = esc_url(vc_is_network_plugin() ? network_admin_url('admin.php?page=vc-updater') : admin_url('admin.php?page=vc-updater'));
$redirect = sprintf('<a href="%s" target="_blank">%s</a>', $url, __('settings', 'js_composer'));
echo sprintf(' ' . __('To receive automatic updates license activation is required. Please visit %s to activate your Visual Composer.', 'js_composer'), $redirect) . sprintf(' <a href="http://go.wpbakery.com/faq-update-in-theme" target="_blank">%s</a>', __('Got Visual Composer in theme?', 'js_composer'));
}
}
开发者ID:ksan5835,项目名称:maadithottam,代码行数:12,代码来源:class-vc-updating-manager.php
示例4: addMenuPage
public function addMenuPage()
{
if (vc_is_network_plugin() && is_network_admin()) {
$page = add_menu_page(__("Visual Composer Settings", LANGUAGE_ZONE), __("Visual Composer", LANGUAGE_ZONE), 'manage_options', $this->page, array(&$this, 'render'));
} else {
$page = add_options_page(__("Visual Composer Settings", LANGUAGE_ZONE), __("Visual Composer", LANGUAGE_ZONE), 'manage_options', $this->page, array(&$this, 'render'));
}
add_action("load-{$page}", array(&$this, 'adminLoad'));
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:9,代码来源:class-vc-settings.php
示例5: preUpgradeFilter
/**
* Get link to newest VC
*
* @param $reply
* @param $package
* @param $updater
*
* @return mixed|string|WP_Error
*/
public function preUpgradeFilter($reply, $package, $updater)
{
$condition1 = isset($updater->skin->plugin) && $updater->skin->plugin === vc_plugin_name();
$condition2 = isset($updater->skin->plugin_info) && $updater->skin->plugin_info['Name'] === $this->title;
if (!$condition1 && !$condition2) {
return $reply;
}
$res = $updater->fs_connect(array(WP_CONTENT_DIR));
if (!$res) {
return new WP_Error('no_credentials', __("Error! Can't connect to filesystem", 'js_composer'));
}
$license_key = vc_license()->getLicenseKey();
if (!$license_key || !vc_license()->isActivated()) {
if (vc_is_as_theme() && vc_get_param('action') !== 'update-selected') {
return false;
}
$url = esc_url(vc_is_network_plugin() ? network_admin_url('admin.php?page=vc-updater') : admin_url('admin.php?page=vc-updater'));
return new WP_Error('no_credentials', __('To receive automatic updates license activation is required. Please visit <a href="' . $url . '' . '" target="_blank">Settings</a> to activate your Visual Composer.', 'js_composer') . ' ' . sprintf(' <a href="http://go.wpbakery.com/faq-update-in-theme" target="_blank">%s</a>', __('Got Visual Composer in theme?', 'js_composer')));
}
$updater->strings['downloading_package_url'] = __('Getting download link...', 'js_composer');
$updater->skin->feedback('downloading_package_url');
$response = $this->getDownloadUrl($license_key);
if (!$response) {
return new WP_Error('no_credentials', __('Download link could not be retrieved', 'js_composer'));
}
if (!$response['status']) {
return new WP_Error('no_credentials', $response['error']);
}
$updater->strings['downloading_package'] = __('Downloading package...', 'js_composer');
$updater->skin->feedback('downloading_package');
$downloaded_archive = download_url($response['url']);
if (is_wp_error($downloaded_archive)) {
return $downloaded_archive;
}
$plugin_directory_name = 'js_composer';
// WP will use same name for plugin directory as archive name, so we have to rename it
if (basename($downloaded_archive, '.zip') !== $plugin_directory_name) {
$new_archive_name = dirname($downloaded_archive) . '/' . $plugin_directory_name . '.zip';
rename($downloaded_archive, $new_archive_name);
$downloaded_archive = $new_archive_name;
}
return $downloaded_archive;
}
开发者ID:ksan5835,项目名称:maadithottam,代码行数:52,代码来源:class-vc-updater.php
示例6: setupReminder
/**
* Set up license activation notice if needed
*
* Don't show notice on dev environment
*/
public function setupReminder()
{
if (self::isDevEnvironment()) {
return;
}
$deactivation_key = $this->deactivation();
if (empty($deactivation_key) && empty($_COOKIE['vchideactivationmsg']) && !vc_is_network_plugin() && !vc_is_as_theme()) {
add_action('admin_notices', array(&$this, 'adminNoticeLicenseActivation'));
}
}
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:15,代码来源:class-vc-license.php
示例7: setupReminder
/**
* Set up license activation notice if needed
*
* Don't show notice on dev environment
*/
public function setupReminder()
{
if (self::isDevEnvironment()) {
return;
}
if (!$this->isActivated() && (empty($_COOKIE['vchideactivationmsg_vc11']) || version_compare($_COOKIE['vchideactivationmsg_vc11'], WPB_VC_VERSION, '<')) && !(vc_is_network_plugin() && is_network_admin())) {
add_action('admin_notices', array($this, 'adminNoticeLicenseActivation'));
}
}
开发者ID:surreal8,项目名称:wptheme,代码行数:14,代码来源:class-vc-license.php
示例8: adminNoticeLicenseActivation
public function adminNoticeLicenseActivation()
{
update_option('wpb_js_composer_license_activation_notified', 'yes');
$redirect = esc_url(vc_is_network_plugin() ? network_admin_url('admin.php?page=vc-updater') : admin_url('admin.php?page=vc-updater'));
?>
<style>
.vc_license-activation-notice {
position: relative;
}
</style>
<script type="text/javascript">
(function ( $ ) {
var setCookie = function ( c_name, value, exdays ) {
var exdate = new Date();
exdate.setDate( exdate.getDate() + exdays );
var c_value = encodeURIComponent( value ) + ((null === exdays) ? "" : "; expires=" + exdate.toUTCString());
document.cookie = c_name + "=" + c_value;
};
$( document ).on( 'click.vc-notice-dismiss',
'.vc-notice-dismiss',
function ( e ) {
e.preventDefault();
var $el = $( this ).closest(
'#vc_license-activation-notice' );
$el.fadeTo( 100, 0, function () {
$el.slideUp( 100, function () {
$el.remove();
} );
} );
setCookie( 'vchideactivationmsg_vc11',
'<?php
echo WPB_VC_VERSION;
?>
',
30 );
} );
})( window.jQuery );
</script>
<?php
echo '<div class="updated vc_license-activation-notice" id="vc_license-activation-notice"><p>' . sprintf(__('Hola! Would you like to receive automatic updates and unlock premium support? Please <a href="%s">activate your copy</a> of Visual Composer.', 'js_composer'), wp_nonce_url($redirect)) . '</p>' . '<button type="button" class="notice-dismiss vc-notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice.') . '</span></button></div>';
}
开发者ID:ksan5835,项目名称:maadithottam,代码行数:41,代码来源:class-vc-license.php
注:本文中的vc_is_network_plugin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论