本文整理汇总了PHP中vc_is_as_theme函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_is_as_theme函数的具体用法?PHP vc_is_as_theme怎么用?PHP vc_is_as_theme使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_is_as_theme函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setTabs
public function setTabs() {
$this->tabs = array();
if ( $this->showConfigurationTabs() ) {
$this->tabs['general'] = __( 'General Settings', 'js_composer' );
}
if ( ! vc_is_as_theme() && $this->showConfigurationTabs() ) {
$this->tabs['color'] = __( 'Design Options', 'js_composer' );
// $this->tabs['element_css'] = __('Element Class Names', 'js_composer');
$this->tabs['custom_css'] = __( 'Custom CSS', 'js_composer' );
}
if ( ! vc_is_network_plugin() || ( vc_is_network_plugin() && is_network_admin() ) ) {
if ( ! vc_is_updater_disabled() ) $this->tabs['updater'] = __( 'Product License', 'js_composer' );
}
// TODO: may allow to disable automapper
if ( ! vc_automapper_is_disabled() ) {
$this->tabs['automapper'] = vc_automapper()->title();
}
}
开发者ID:verbazend,项目名称:AWFA,代码行数:20,代码来源:class-vc-settings.php
示例2: setting_section_callback_function
/**
* Callback function for settings section
*
* @param $tab
*/
public function setting_section_callback_function($tab)
{
if ('wpb_js_composer_settings_color' === $tab['id']) {
?>
<div class="tab_intro">
<p>
<?php
_e('Here you can tweak default Visual Composer content elements visual appearance. By default Visual Composer is using neutral light-grey theme. Changing "Main accent color" will affect all content elements if no specific "content block" related color is set.', 'js_composer');
?>
</p>
</div>
<?php
} elseif ('wpb_js_composer_settings_updater' === $tab['id']) {
?>
<div class="tab_intro">
<?php
if (vc_is_as_theme()) {
?>
<div class="updated inline">
<p>
<?php
_e('Please activate your license in Product License tab!', 'js_composer');
?>
</p>
</div>
<?php
}
?>
</div>
<?php
}
}
开发者ID:iq007,项目名称:MadScape,代码行数:37,代码来源:class-vc-settings.php
示例3: registerAdminJavascript
/**
* Register admin javascript libs.
*
* Calls wp_register_script for required css libraries files for Admin dashboard.
*
* @since 3.1
* vc_filter: vc_i18n_locale_composer_js_view, since 4.4 - override localization for js
* @access public
*/
public function registerAdminJavascript()
{
/**
* TODO: REFACTOR
* Save register only core js files and check for backend or front
*/
// $this->frontJsRegister();
wp_register_script('wpb_php_js', vc_asset_url('lib/php.default/php.default.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('isotope', vc_asset_url('lib/bower/isotope/dist/isotope.pkgd.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_scrollTo_js', vc_asset_url('lib/bower/scrollTo/jquery.scrollTo.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_json-js', vc_asset_url('lib/bower/json-js/json2.js'), false, WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_listeners', vc_asset_url('js/lib/events.js'), array('jquery', 'backbone', 'wpb_json-js'), WPB_VC_VERSION, true);
wp_localize_script('wpb_js_composer_js_listeners', 'vcData', apply_filters('vc_global_js_data', array('version' => WPB_VC_VERSION, 'debug' => wpb_debug())));
wp_register_script('wpb_js_composer_js_tools', vc_asset_url('js/backend/composer-tools.js'), array('jquery', 'backbone', 'wpb_json-js', 'wpb_js_composer_js_listeners'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_settings', vc_asset_url('js/backend/composer-settings-page.js'), array('jquery', 'wpb_js_composer_js_tools'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_media_editor_js', vc_asset_url('js/backend/media-editor.js'), array('media-views', 'media-editor', 'mce-view', 'wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_atts', vc_asset_url('js/params/composer-atts.js'), array('wp-color-picker', 'wpb_js_composer_js_tools'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_storage', vc_asset_url('js/backend/composer-storage.js'), array('wpb_js_composer_js_atts'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_models', vc_asset_url('js/backend/composer-models.js'), array('wpb_js_composer_js_storage'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_editor_panels', vc_asset_url('js/editors/panels.js'), array('wpb_js_composer_js_models'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_view', vc_asset_url('js/backend/composer-view.js'), array('wpb_js_composer_editor_panels'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_custom_views', vc_asset_url('js/backend/composer-custom-views.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_autosuggest_js', vc_asset_url('lib/autosuggest/jquery.autoSuggest.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_teaser_js', vc_asset_url('js/backend/composer-teaser.js'), array(), WPB_VC_VERSION, true);
if (!vc_is_as_theme() || vc_is_as_theme() && 'admin_settings_page' !== vc_mode()) {
wp_register_script('ace-editor', vc_asset_url('lib/bower/ace-builds/src-min-noconflict/ace.js'), array('jquery'), WPB_VC_VERSION, true);
}
/**
* vc_filter: vc_i18n_locale_composer_js_view - @since 4.4
*/
wp_localize_script('wpb_js_composer_js_view', 'i18nLocale', apply_filters('vc_i18n_locale_composer_js_view', array('add_remove_picture' => __('Add/remove picture', 'js_composer'), 'finish_adding_text' => __('Finish Adding Images', 'js_composer'), 'add_image' => __('Add Image', 'js_composer'), 'add_images' => __('Add Images', 'js_composer'), 'settings' => __('Settings', 'js_composer'), 'main_button_title' => __('Visual Composer', 'js_composer'), 'main_button_title_backend_editor' => __('BACKEND EDITOR', 'js_composer'), 'main_button_title_frontend_editor' => __('FRONTEND EDITOR', 'js_composer'), 'main_button_title_revert' => __('CLASSIC MODE', 'js_composer'), 'please_enter_templates_name' => __('Please enter template name', 'js_composer'), 'confirm_deleting_template' => __('Confirm deleting "{template_name}" template, press Cancel to leave. This action cannot be undone.', 'js_composer'), 'press_ok_to_delete_section' => __('Press OK to delete section, Cancel to leave', 'js_composer'), 'drag_drop_me_in_column' => __('Drag and drop me in the column', 'js_composer'), 'press_ok_to_delete_tab' => __('Press OK to delete "{tab_name}" tab, Cancel to leave', 'js_composer'), 'slide' => __('Slide', 'js_composer'), 'tab' => __('Tab', 'js_composer'), 'section' => __('Section', 'js_composer'), 'please_enter_new_tab_title' => __('Please enter new tab title', 'js_composer'), 'press_ok_delete_section' => __('Press OK to delete "{tab_name}" section, Cancel to leave', 'js_composer'), 'section_default_title' => __('Section', 'js_composer'), 'please_enter_section_title' => __('Please enter new section title', 'js_composer'), 'error_please_try_again' => __('Error. Please try again.', 'js_composer'), 'if_close_data_lost' => __('If you close this window all shortcode settings will be lost. Close this window?', 'js_composer'), 'header_select_element_type' => __('Select element type', 'js_composer'), 'header_media_gallery' => __('Media gallery', 'js_composer'), 'header_element_settings' => __('Element settings', 'js_composer'), 'add_tab' => __('Add tab', 'js_composer'), 'are_you_sure_convert_to_new_version' => __('Are you sure you want to convert to new version?', 'js_composer'), 'loading' => __('Loading...', 'js_composer'), 'set_image' => __('Set Image', 'js_composer'), 'are_you_sure_reset_css_classes' => __('Are you sure that you want to remove all your data?', 'js_composer'), 'loop_frame_title' => __('Loop settings'), 'enter_custom_layout' => __('Custom row layout', 'js_composer'), 'wrong_cells_layout' => __('Wrong row layout format! Example: 1/2 + 1/2 or span6 + span6.', 'js_composer'), 'row_background_color' => __('Row background color', 'js_composer'), 'row_background_image' => __('Row background image', 'js_composer'), 'column_background_color' => __('Column background color', 'js_composer'), 'column_background_image' => __('Column background image', 'js_composer'), 'guides_on' => __('Guides ON', 'js_composer'), 'guides_off' => __('Guides OFF', 'js_composer'), 'template_save' => __('New template successfully saved!', 'js_composer'), 'template_added' => __('Template added to the page.', 'js_composer'), 'template_added_with_id' => __('Template added to the page. Template has ID attributes, make sure that they are not used more than once on the same page.', 'js_composer'), 'template_removed' => __('Template successfully removed.', 'js_composer'), 'template_is_empty' => __('Nothing to save. Template is empty.', 'js_composer'), 'css_updated' => __('Page settings updated!', 'js_composer'), 'update_all' => __('Update all', 'js_composer'), 'confirm_to_leave' => __('The changes you made will be lost if you navigate away from this page.', 'js_composer'), 'inline_element_saved' => __('%s saved!', 'js_composer'), 'inline_element_deleted' => __('%s deleted!', 'js_composer'), 'inline_element_cloned' => __('%s cloned. <a href="#" class="vc_edit-cloned" data-model-id="%s">Edit now?</a>', 'js_composer'), 'gfonts_loading_google_font_failed' => __('Loading Google Font failed', 'js_composer'), 'gfonts_loading_google_font' => __('Loading Font...', 'js_composer'), 'gfonts_unable_to_load_google_fonts' => __('Unable to load Google Fonts', 'js_composer'), 'no_title_parenthesis' => sprintf('(%s)', __('no title', 'js_composer')), 'error_while_saving_image_filtered' => __('Error while applying filter to the image. Check your server and memory settings.', 'js_composer'))));
/**
* @since 4.4
*/
do_action('vc_base_register_admin_js');
}
开发者ID:polaris610,项目名称:medicalhound,代码行数:45,代码来源:class-vc-base.php
示例4: setupReminder
/**
*
*/
public function setupReminder()
{
$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:SayenkoDesign,项目名称:ividf,代码行数:10,代码来源:class-vc-license.php
示例5: setting_section_callback_function
/**
* Callback function for settings section
*
*
*/
public function setting_section_callback_function($tab)
{
if ($tab["id"] == 'wpb_js_composer_settings_color') {
?>
<div class="tab_intro">
<p class="description">
<?php
_e('Here you can tweak default Visual Composer content elements visual appearance. By default Visual Composer is using neutral light-grey theme. Changing "Main accent color" will affect all content elements if no specific "content block" related color is set.', 'js_composer');
?>
</p>
</div>
<?php
} elseif ($tab["id"] == 'wpb_js_composer_settings_updater') {
?>
<div class="tab_intro">
<?php
if (vc_is_as_theme()) {
?>
<div class="updated inline">
<p>
<?php
_e('Please activate your license in Product License tab!', 'js_composer');
?>
</p>
</div>
<?php
}
?>
<p>
<?php
//_e('Add your Envato credentials, to enable auto updater. With correct login credentials Visual Composer will be updated automatically (same as other plugins do).', 'js_composer')
?>
<?php
echo sprintf(__('A valid license key qualifies you for support and enables automatic updates. <strong>A license key may only be used for one Visual Composer installation on one WordPress site at a time.</strong> If you previosly activated your license key on another site, then you should deactivate it first or <a href="%s" target="_blank">obtain new license key</a>.', 'js_composer'), esc_url("http://bit.ly/vcomposer"));
?>
</p>
</div>
<?php
}
}
开发者ID:ksan5835,项目名称:rankproperties,代码行数:45,代码来源:class-vc-settings.php
示例6: 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
示例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']) && !vc_is_network_plugin() && !vc_is_as_theme()) {
add_action('admin_notices', array(&$this, 'adminNoticeLicenseActivation'));
}
}
开发者ID:k2jysy,项目名称:wedev,代码行数:14,代码来源:class-vc-license.php
示例8: setTabs
/**
*
*/
public function setTabs()
{
$this->tabs = array();
if ($this->showConfigurationTabs()) {
$this->tabs['vc-general'] = __('General Settings', 'js_composer');
if (!vc_is_as_theme() || apply_filters('vc_settings_page_show_design_tabs', false)) {
$this->tabs['vc-color'] = __('Design Options', 'js_composer');
$this->tabs['vc-custom_css'] = __('Custom CSS', 'js_composer');
}
}
if (!vc_is_network_plugin() || vc_is_network_plugin() && is_network_admin()) {
if (!vc_is_updater_disabled()) {
$this->tabs['vc-updater'] = __('Product License', 'js_composer');
}
}
// TODO: may allow to disable automapper
if (!is_network_admin() && !vc_automapper_is_disabled()) {
$this->tabs['vc-automapper'] = vc_automapper()->title();
}
}
开发者ID:surreal8,项目名称:wptheme,代码行数:23,代码来源:class-vc-settings.php
注:本文中的vc_is_as_theme函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论