当前位置: 首页>>代码示例>>PHP>>正文


PHP WPBakeryVisualComposerSettings::get方法代码示例

本文整理汇总了PHP中WPBakeryVisualComposerSettings::get方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBakeryVisualComposerSettings::get方法的具体用法?PHP WPBakeryVisualComposerSettings::get怎么用?PHP WPBakeryVisualComposerSettings::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPBakeryVisualComposerSettings的用法示例。


在下文中一共展示了WPBakeryVisualComposerSettings::get方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getDownloadUrl

 protected function getDownloadUrl()
 {
     global $wp_filesystem;
     $this->skin->feedback('download_envato');
     $package_filename = 'js_composer.zip';
     $res = $this->fs_connect(array(WP_CONTENT_DIR));
     if (!$res) {
         return new WP_Error('no_credentials', __("Error! Can't connect to filesystem", 'js_composer'));
     }
     $username = WPBakeryVisualComposerSettings::get('envato_username');
     $api_key = WPBakeryVisualComposerSettings::get('envato_api_key');
     $purchase_code = WPBakeryVisualComposerSettings::get('js_composer_purchase_code');
     if (empty($username) || empty($api_key) || empty($purchase_code)) {
         return new WP_Error('no_credentials', __('Error! Envato username, api key and your purchase code are required for downloading updates from Envato marketplace for the Visual Composer. Visit <a href="' . admin_url('options-general.php?page=wpb_vc_settings&tab=updater') . '' . '">Settings</a> to fix.', 'js_composer'));
     }
     $json = wp_remote_get($this->envatoDownloadPurchaseUrl($username, $api_key, $purchase_code));
     $result = json_decode($json['body'], true);
     if (!isset($result['download-purchase']['download_url'])) {
         return new WP_Error('no_credentials', __('Error! Envato API error' . (isset($result['error']) ? ': ' . $result['error'] : '.'), 'js_composer'));
     }
     $result['download-purchase']['download_url'];
     $download_file = download_url($result['download-purchase']['download_url']);
     if (is_wp_error($download_file)) {
         return $download_file;
     }
     $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade_tmp/js_composer_envato_package';
     if (is_dir($upgrade_folder)) {
         $wp_filesystem->delete($upgrade_folder);
     }
     $result = unzip_file($download_file, $upgrade_folder);
     if ($result && is_file($upgrade_folder . '/' . $package_filename)) {
         return $upgrade_folder . '/' . $package_filename;
     }
     return new WP_Error('no_credentials', __('Error on unzipping package', 'js_composer'));
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:35,代码来源:wpb_automatic_updater.php

示例2: getSettings

 public static function getSettings()
 {
     global $current_user;
     if (self::$settings === null) {
         if (function_exists('get_currentuserinfo')) {
             get_currentuserinfo();
             /** @var $settings - get use group access rules */
             if (!empty($current_user->roles)) {
                 self::$user_role = $current_user->roles[0];
             } else {
                 self::$user_role = 'author';
             }
         } else {
             self::$user_role = 'author';
         }
         self::$settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     }
     return self::$settings;
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:19,代码来源:mapper.php

示例3: setUpPlugin

 public function setUpPlugin()
 {
     global $current_user;
     get_currentuserinfo();
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     parent::setUpPlugin();
     $show = true;
     foreach ($current_user->roles as $role) {
         if (isset($settings[$role]['show']) && $settings[$role]['show'] === 'no') {
             $show = false;
             break;
         }
     }
     if ($show) {
         $this->composer->addAction('edit_post', 'saveMetaBoxes');
         $this->composer->addAction('wp_ajax_wpb_get_element_backend_html', 'elementBackendHtmlJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_convert_elements_backend_html', 'Convert2NewVersionJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_row_element_backend_html', 'elementRowBackendHtmlJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_shortcodes_to_visualComposer', 'shortCodesVisualComposerJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_single_image_src', 'singleImageSrcJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_gallery_html', 'galleryHTMLJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_loop_suggestion', 'getLoopSuggestionJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_remove_settings_notification_element_css_class', 'removeSettingsNotificationJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_image_url', 'getImageUrlByIdJavascript_callback');
         /*
          * Create edit form html
          * @deprecated
          */
         $this->composer->addAction('wp_ajax_wpb_show_edit_form', 'showEditFormJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_edit_form', 'getEditFormJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_save_template', 'saveTemplateJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_load_template', 'loadTemplateJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_load_template_shortcodes', 'loadTemplateShortcodesJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_delete_template', 'deleteTemplateJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_loop_settings', 'getLoopSettingsJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_activate_license', 'activateLicense');
         $this->composer->addAction('wp_ajax_wpb_deactivate_license', 'deactivateLicense');
         $this->addAction('admin_init', 'jsComposerEditPage', 5);
     }
     // Add specific CSS class by filter
     $this->addFilter('body_class', 'jsComposerBodyClass');
     $this->addFilter('get_media_item_args', 'jsForceSend');
     $this->addAction('admin_init', 'composerRedirect');
     $this->addAction('admin_init', 'registerCss');
     $this->addAction('admin_init', 'registerJavascript');
     if ($this->composer->isNetworkPlugin() && is_network_admin()) {
         $this->addAction('network_admin_menu', 'composerSettings');
     }
     $this->addAction('admin_menu', 'composerSettings');
     $this->addAction('admin_print_scripts-post.php', 'editScreen_js');
     $this->addAction('admin_print_scripts-post-new.php', 'editScreen_js');
     // Upgrade message in plugins list.
     if ($this->composer->updaterDisabled()) {
         return $this;
     }
     $plugin_file_name = 'js_composer/js_composer.php';
     new WpbAutoUpdate(WPB_VC_VERSION, 'http://wpbakery.com/version/?' . time(), $plugin_file_name);
     $this->addAction('in_plugin_update_message-' . $plugin_file_name, 'addUpgradeMessageLink');
 }
开发者ID:jjmas,项目名称:jjmas.net,代码行数:60,代码来源:build.php

示例4: elementRowBackendHtmlJavascript_callback

 /**
  * Creates vc_row shortcode string.
  * @deprecated
  */
 public function elementRowBackendHtmlJavascript_callback()
 {
     global $current_user;
     get_currentuserinfo();
     $data_element = $this->post('data_element');
     $data_width = $this->post('data_width');
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     $role = $current_user->roles[0];
     if ($data_element == 'vc_column') {
         $output = do_shortcode('[vc_row][vc_column width="' . ($data_width ? $data_width : '1/1') . '"][/vc_row]');
         echo $output;
     } elseif (!isset($settings[$role]['shortcodes']) || isset($settings[$role]['shortcodes'][$data_element]) && (int) $settings[$role]['shortcodes'][$data_element] == 1) {
         $output = do_shortcode('[vc_row][vc_column width="1/1"][' . $data_element . '][/vc_column][/vc_row]');
         echo $output;
     }
     die;
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:22,代码来源:composer.php

示例5: output

 public function output($post = null)
 {
     global $current_user;
     get_currentuserinfo();
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     $role = $current_user->roles[0];
     $show_role = isset($settings[$role]['show']) ? $settings[$role]['show'] : '';
     $buttons = $this->buildButtons();
     $output = '
         <div id="wpb_visual_composer-elements" class="vc_navbar">
             <input type="hidden" name="wpb_js_composer_group_access_show_rule" class="wpb_js_composer_group_access_show_rule" value="' . $show_role . '" />
             <div class="vc_navbar-inner clearfix">
                 <!--<div class="container">-->
                     <ul class="vc_nav">
                       <li>
                         <a title="' . __('Visual Composer for WordPress', LANGUAGE_ZONE) . '" href="http://vc.wpbakery.com/" class="vc_logo" target="_blank"></a>
                       </li>
                     </ul>
                     ' . $buttons . '
                 <!--</div>-->
             </div>
         </div>';
     return $output;
 }
开发者ID:scottnkerr,项目名称:eeco,代码行数:25,代码来源:layouts.php

示例6: get_custom_column_class

function get_custom_column_class($class)
{
    $custom_array = (array) WPBakeryVisualComposerSettings::get('column_css_classes');
    return !empty($custom_array[$class]) ? $custom_array[$class] : '';
}
开发者ID:roycocup,项目名称:enclothed,代码行数:5,代码来源:helpers.php

示例7: elementBackendHtml

	/**
	 * Create shortcode's string.
	 *
	 * @since  3.0
	 * @access public
	 * @deprecated
	 */
	public function elementBackendHtml() {
		global $current_user;
		get_currentuserinfo();
		$data_element = vc_post_param( 'data_element' );

		/** @xvar $settings - get use group access rules */
		$settings = WPBakeryVisualComposerSettings::get( 'groups_access_rules' );
		$role = $current_user->roles[0];

		if ( $data_element == 'vc_column' && vc_post_param( 'data_width' ) !== null ) {
			$output = do_shortcode( '[vc_column width="' . vc_post_param( 'data_width' ) . '"]' );
			echo $output;
		} elseif ( $data_element == 'vc_row' || $data_element == 'vc_row_inner' ) {
			$output = do_shortcode( '[' . $data_element . ']' );
			echo $output;
		} elseif ( ! isset( $settings[$role]['shortcodes'] ) || ( isset( $settings[$role]['shortcodes'][$data_element] ) && (int)$settings[$role]['shortcodes'][$data_element] == 1 ) ) {
			$output = do_shortcode( '[' . $data_element . ']' );
			echo $output;
		}
		die();
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:28,代码来源:class-vc-backend-editor.php

示例8: elementBackendHtml

 /**
  * Create shortcode's string.
  *
  * @since  3.0
  * @access public
  * @deprecated
  */
 public function elementBackendHtml()
 {
     global $current_user;
     get_currentuserinfo();
     if (!vc_verify_admin_nonce() || !current_user_can('edit_posts') && !current_user_can('edit_pages')) {
         wp_send_json(array('success' => false));
     }
     $data_element = vc_post_param('data_element');
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     $role = $current_user->roles[0];
     if ($data_element === 'vc_column' && vc_post_param('data_width') !== null) {
         $output = do_shortcode('[vc_column width="' . vc_post_param('data_width') . '"]');
         echo $output;
     } elseif ($data_element == 'vc_row' || $data_element == 'vc_row_inner' || $data_element == 'mk_page_section') {
         $output = do_shortcode('[' . $data_element . ']');
         echo $output;
     } elseif (!isset($settings[$role]['shortcodes']) || isset($settings[$role]['shortcodes'][$data_element]) && (int) $settings[$role]['shortcodes'][$data_element] === 1) {
         $output = do_shortcode('[' . $data_element . ']');
         echo $output;
     }
     die;
 }
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:30,代码来源:class-vc-backend-editor.php

示例9: showButton

 function showButton($post_id = null)
 {
     global $current_user;
     get_currentuserinfo();
     $show = true;
     if (!self::inlineEnabled() || !current_user_can('edit_post', $post_id)) {
         return false;
     }
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     foreach ($current_user->roles as $role) {
         if (isset($settings[$role]['show']) && $settings[$role]['show'] === 'no') {
             $show = false;
             break;
         }
     }
     return $show && in_array(get_post_type(), $this->composer->getPostTypes());
 }
开发者ID:roycocup,项目名称:enclothed,代码行数:18,代码来源:editor.php

示例10: setUpPlugin

 public function setUpPlugin()
 {
     global $current_user;
     get_currentuserinfo();
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     parent::setUpPlugin();
     $show = true;
     foreach ($current_user->roles as $role) {
         if (isset($settings[$role]['show']) && $settings[$role]['show'] === 'no') {
             $show = false;
             break;
         }
     }
     if ($show) {
         $this->composer->addAction('edit_post', 'saveMetaBoxes');
         $this->composer->addAction('wp_ajax_wpb_get_element_backend_html', 'elementBackendHtmlJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_convert_elements_backend_html', 'Convert2NewVersionJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_get_row_element_backend_html', 'elementRowBackendHtmlJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_shortcodes_to_visualComposer', 'shortCodesVisualComposerJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_show_edit_form', 'showEditFormJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_save_template', 'saveTemplateJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_load_template', 'loadTemplateJavascript_callback');
         $this->composer->addAction('wp_ajax_wpb_delete_template', 'deleteTemplateJavascript_callback');
         $this->addAction('admin_init', 'jsComposerEditPage', 5);
     }
     // Add specific CSS class by filter
     $this->addFilter('body_class', 'jsComposerBodyClass');
     $this->addFilter('get_media_item_args', 'jsForceSend');
     $this->addAction('admin_init', 'composerRedirect');
     $this->addAction('admin_init', 'registerCss');
     $this->addAction('admin_init', 'registerJavascript');
     $this->addAction('admin_menu', 'composerSettings');
     $this->addAction('admin_print_scripts-post.php', 'editScreen_js');
     $this->addAction('admin_print_scripts-post-new.php', 'editScreen_js');
     /* Create Media tab for images */
     $this->composer->createImagesMediaTab();
 }
开发者ID:unisexx,项目名称:drtooth,代码行数:38,代码来源:build.php

示例11: esc_attr_e

        <ul class="nav navbar-nav navbar-right">
            <li class="line"></li>
            <li><a id="vc-post-settings-button" class="vc_post_settings" title="<?php 
esc_attr_e('Page settings', LANGUAGE_ZONE);
?>
"><i class="icon"></i></a></li>
            <li class="line"></li>
            <li><button id="vc-guides-toggle-button" class="btn-primary btn navbar-btn btn-sm vc_guides_toggle" title="<?php 
esc_attr_e("Toggle editor's guides", LANGUAGE_ZONE);
?>
"><?php 
_e('Guides ON', LANGUAGE_ZONE);
?>
</button></li>
            <?php 
$disable_responsive = WPBakeryVisualComposerSettings::get('not_responsive_css');
if ($disable_responsive !== '1') {
    ?>
            <li class="line"></li>
            <li>
                <div class="vc-dropdown" id="vc-screen-size-control">
                    <a href="#" class="vc-dropdown-toggle" title="<?php 
    _e("Responsive preview", LANGUAGE_ZONE);
    ?>
"><i class="icon default" id="vc-screen-size-current"></i><b class="caret"></b></a>
                    <ul class="vc-dropdown-list">
                        <li><a href="#" title="<?php 
    esc_attr_e('Desktop', LANGUAGE_ZONE);
    ?>
" class="vc-screen-width active default" data-size="100%"></a></li>
                        <li><a href="#" title="<?php 
开发者ID:Alderx,项目名称:publioriente,代码行数:31,代码来源:editor.tpl.php

示例12: output

 public function output($post = null)
 {
     global $current_user;
     get_currentuserinfo();
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     $role = $current_user->roles[0];
     $show_role = isset($settings[$role]['show']) ? $settings[$role]['show'] : '';
     $output = '
         <div id="wpb_visual_composer-elements" class="navbar">
             <input type="hidden" name="wpb_js_composer_group_access_show_rule" class="wpb_js_composer_group_access_show_rule" value="' . $show_role . '" />
             <div class="navbar-inner">
                 <div class="container">
                     <a title="' . __('Visual Composer for WordPress', 'js_composer') . '" href="http://wpbakery.com/vc/" class="brand" target="_blank"></a>
                     <div class="nav-collapse">
                         <ul class="nav">
                             <li class="dropdown wpb_deprecated_element">
                                 <a data-toggle="dropdown" class="dropdown-toggle wpb_popular_layouts" href="#">' . __("Popular Layouts", "js_composer") . ' <b class="caret"></b></a>
                                 <ul class="dropdown-menu">
                                     ' . $this->getColumnLayouts() . '
                                 </ul>
                             </li>
                             <li class="dropdown wpb_deprecated_element">
                                 <a data-toggle="dropdown" class="dropdown-toggle wpb_content_elements" href="#">' . __("Content Elements", "js_composer") . ' <b class="caret"></b></a>
                                 <ul class="dropdown-menu wpb-content-layouts-container">
                                     ' . $this->getContentCategoriesLayouts() . '
                                     ' . $this->getContentLayouts() . '
                                 </ul>
                             </li>
                             <li>
                                 <a class="wpb_add_new_element dropable_el button" id="wpb-add-new-element"><i class="icon"></i>' . __('Add element', 'js_composer') . '</a>
                             </li>
                         </ul>
                         <ul class="nav"><li>
                             <a class="wpb_add_new_row dropable_row button" id="wpb-add-new-row" data-element="vc_row"><i class="icon"></i>' . __('Add row', 'js_composer') . '</a>
                         </li></ul>
                         <ul class="nav">
                             <li class="dropdown">
                                 <a data-toggle="dropdown" class="wpb_templates button" href="#"><i class="icon"></i>' . __('Templates', 'js_composer') . ' <b class="caret"></b></a>
                                 <ul class="dropdown-menu wpb_templates_ul">
                                     ' . $this->getTemplateMenu() . '
                                 </ul>
                             </li>
                         </ul>
                         <ul class="nav pull-right wpb-update-button">
                             <li><a class="button" id="wpb-save-post">' . __('Update', 'jscomposer') . '</a></li>
                         </ul>
                     </div><!-- /.nav-collapse -->
                 </div>
             </div>
         </div>
         <style type="text/css">#wpb_visual_composer {display: none;}</style>';
     return $output;
 }
开发者ID:unisexx,项目名称:drtooth,代码行数:54,代码来源:layouts.php

示例13: output

 public function output($post = null)
 {
     global $current_user;
     get_currentuserinfo();
     /** @var $settings - get use group access rules */
     $settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
     $role = $current_user->roles[0];
     $show_role = isset($settings[$role]['show']) ? $settings[$role]['show'] : '';
     $buttons = $this->buildButtons();
     $output = '
         <div id="wpb_visual_composer-elements" class="vc_navbar">
             <input type="hidden" name="wpb_js_composer_group_access_show_rule" class="wpb_js_composer_group_access_show_rule" value="' . $show_role . '" />
             <div class="vc_navbar-inner clearfix">
                 <!--<div class="container">-->
                     ' . $buttons . '
                         <ul class="vc_nav pull-right wpb-update-button">
                             <li><a class="button" id="wpb-save-post">' . __('Update', 'js_composer') . '</a></li>
                         </ul>
                 <!--</div>-->
             </div>
         </div>';
     return $output;
 }
开发者ID:Beutiste,项目名称:wordpress,代码行数:23,代码来源:layouts.php


注:本文中的WPBakeryVisualComposerSettings::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。