本文整理汇总了PHP中vc_editor_post_types函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_editor_post_types函数的具体用法?PHP vc_editor_post_types怎么用?PHP vc_editor_post_types使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_editor_post_types函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: jsComposerEditPage
public function jsComposerEditPage() {
$pt_array = vc_editor_post_types();
foreach ( $pt_array as $pt ) {
add_meta_box( 'vc_teaser', __( 'VC: Custom Teaser', "js_composer" ), Array( &$this, 'outputTeaser' ), $pt, 'side' );
}
add_action( 'save_post', array( &$this, 'saveTeaserMetaBox' ) );
}
开发者ID:verbazend,项目名称:AWFA,代码行数:7,代码来源:vc-posts-grid.php
示例2: vc_add_admin_pointer
/**
* Add WP ui pointers to backend editor.
*/
function vc_add_admin_pointer()
{
if (is_admin()) {
foreach (vc_editor_post_types() as $post_type) {
add_filter('vc_ui-pointers-' . $post_type, 'vc_backend_editor_register_pointer');
}
}
}
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:11,代码来源:vc-pointers-backend-editor.php
示例3: printScriptsMessages
/**
* Enqueue required javascript libraries and css files.
*
* This method also setups reminder about license activation.
*
* @since 4.2
* @access public
*/
public function printScriptsMessages() {
if ( in_array( get_post_type(), vc_editor_post_types() )) {
vc_license()->setupReminder();
wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script( 'wp-color-picker' );
wp_enqueue_style( 'farbtastic' );
wp_enqueue_style( 'ui-custom-theme' );
wp_enqueue_style( 'isotope-css' );
wp_enqueue_style( 'animate-css' );
wp_enqueue_style( 'js_composer' );
wp_enqueue_style( 'wpb_jscomposer_autosuggest' );
WPBakeryShortCode_Settings::enqueueCss();
wp_enqueue_script( 'jquery-ui-tabs' );
wp_enqueue_script( 'jquery-ui-sortable' );
wp_enqueue_script( 'jquery-ui-droppable' );
wp_enqueue_script( 'jquery-ui-draggable' );
wp_enqueue_script( 'jquery-ui-accordion' );
wp_enqueue_script( 'jquery-ui-autocomplete' );
wp_enqueue_script( 'farbtastic' );
//MMM wp_enqueue_script('bootstrap-js');
wp_enqueue_script( 'isotope' );
wp_enqueue_script( 'wpb_bootstrap_modals_js' );
wp_enqueue_script( 'wpb_scrollTo_js' );
wp_enqueue_script( 'wpb_php_js' );
// js composer js app {{
// wpb_js_composer_js_sortable
wp_enqueue_script( 'wpb_js_composer_js_sortable' );
wp_enqueue_script( 'wpb_json-js' );
wp_enqueue_script( 'wpb_js_composer_js_tools' );
wp_enqueue_script( 'wpb_js_composer_js_storage' );
wp_enqueue_script( 'wpb_js_composer_js_models' );
wp_enqueue_script( 'wpb_js_composer_js_view' );
wp_enqueue_script( 'wpb_js_composer_js_custom_views' );
wp_enqueue_script( 'wpb_js_composer_js_backbone' );
wp_enqueue_script( 'wpb_jscomposer_composer_js' );
wp_enqueue_script( 'wpb_jscomposer_shortcode_js' );
wp_enqueue_script( 'wpb_jscomposer_modal_js' );
wp_enqueue_script( 'wpb_jscomposer_templates_js' );
wp_enqueue_script( 'wpb_jscomposer_stage_js' );
wp_enqueue_script( 'wpb_jscomposer_layout_js' );
wp_enqueue_script( 'wpb_jscomposer_row_js' );
wp_enqueue_script( 'wpb_jscomposer_settings_js' );
wp_enqueue_script( 'wpb_jscomposer_media_editor_js' );
wp_enqueue_script( 'wpb_jscomposer_autosuggest_js' );
// }}
wp_enqueue_script( 'wpb_js_composer_js' );
WPBakeryShortCode_Settings::enqueueJs();
}
}
开发者ID:verbazend,项目名称:AWFA,代码行数:64,代码来源:class-vc-backend-editor.php
示例4: presscore_vc_remove_teaser_box
/**
* Remove custom teaser meta box.
*
* @since 1.1.0
*/
function presscore_vc_remove_teaser_box()
{
global $vc_teaser_box;
if (is_callable('vc_editor_post_types') && !empty($vc_teaser_box)) {
$pt_array = vc_editor_post_types();
foreach ($pt_array as $pt) {
remove_meta_box('vc_teaser', $pt, 'side');
}
remove_action('save_post', array(&$vc_teaser_box, 'saveTeaserMetaBox'));
}
}
开发者ID:armslee,项目名称:wp_requid,代码行数:16,代码来源:mod-visual-composer.php
示例5: TS_VCSC_Widgets_Post_Compooser
function TS_VCSC_Widgets_Post_Compooser()
{
if (function_exists('vc_editor_post_types') && function_exists('vc_set_default_editor_post_types') && function_exists('vc_settings')) {
$TS_VCSC_ComposerContentTypes = vc_editor_post_types();
$TS_VCSC_ComposerDefaultTypes = array();
if (!in_array('ts_widgets', $TS_VCSC_ComposerContentTypes, true)) {
foreach ($TS_VCSC_ComposerContentTypes as $value) {
array_push($TS_VCSC_ComposerDefaultTypes, $value);
}
array_push($TS_VCSC_ComposerDefaultTypes, 'ts_widgets');
vc_set_default_editor_post_types($TS_VCSC_ComposerDefaultTypes);
vc_settings()->set('content_types', $TS_VCSC_ComposerDefaultTypes);
}
}
}
开发者ID:Telemedellin,项目名称:fonvalmed,代码行数:15,代码来源:ts_vcsc_custom_post_registration.php
示例6: om_wpb_head_styles
function om_wpb_head_styles()
{
if (in_array(get_post_type(), vc_editor_post_types())) {
echo '<style>.vc_colored-dropdown .om-theme-color{background-color:' . get_option(OM_THEME_PREFIX . 'hightlight_color') . ';color:#fff !important}</style>';
}
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:6,代码来源:wpb.php
示例7: 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 = vc_settings()->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(), vc_editor_post_types() );
}
开发者ID:verbazend,项目名称:AWFA,代码行数:17,代码来源:class-vc-frontend-editor.php
示例8: isValidPostType
public function isValidPostType()
{
return in_array(get_post_type(), vc_editor_post_types() + array('templatera'));
}
开发者ID:walkthenight,项目名称:walkthenight-wordpress,代码行数:4,代码来源:vc_template_manager.php
示例9: compareType
public function compareType($type)
{
return in_array($type, array_merge(vc_editor_post_types(), array('templatera')));
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:4,代码来源:vc_template_manager.php
示例10: visual_composer_support
/**
* Add Visual Composer plugin support
*
* @link texthttp://vc.wpbakery.com/
*
* @todo Support for Frontend Editor (VC4+)
*
* @since 1.0
* @version 1.2.3
*
* @access public
*/
public function visual_composer_support()
{
//VC 4+ disabling Frontend Editor
if (function_exists('vc_disable_frontend')) {
vc_disable_frontend();
}
//VC additional shortcodes admin interface
$vc_shortcodes_admin_tweaks = apply_filters('wmhook_shortcode_' . 'vc_shortcodes_admin_tweaks_file', $this->page_builder_dir . 'visual-composer/visual-composer.php');
require_once $vc_shortcodes_admin_tweaks;
//VC setup screen modifications
add_filter('vc_settings_tabs', array($this, 'visual_composer_setup'));
delete_option('wpb_js_use_custom');
//Disable VC Guide Tour
if (function_exists('vc_editor_post_types')) {
foreach (vc_editor_post_types() as $post_type) {
add_filter('vc_ui-pointers-' . $post_type, '__return_empty_array', 999);
}
}
//VC extending shortcode parameters
add_shortcode_param('wm_radio', array($this, 'visual_composer_custom_field_wm_radio'));
//Remove default VC elements (only if current theme supports this)
if (function_exists('vc_remove_element') && (wma_supports_subfeature('remove_vc_shortcodes') || wma_supports_subfeature('remove-vc-shortcodes')) && class_exists('WPBMap')) {
$vc_shortcodes_all = array_keys(WPBMap::getShortCodes());
$vc_shortcodes_keep = array('vc_row', 'vc_row_inner', 'vc_column', 'vc_column_inner', 'vc_raw_html', 'vc_raw_js', 'contact-form-7', 'gravityform', 'layerslider_vc', 'rev_slider_vc');
// Do not remove custom mapped shortcodes via WP admin
if (class_exists('Vc_Automap_Model') && is_callable('Vc_Automap_Model::findAll')) {
$vc_shortcodes_custom = Vc_Automap_Model::findAll();
foreach ($vc_shortcodes_custom as $shortcode) {
$vc_shortcodes_keep[] = $shortcode->tag;
}
}
$vc_shortcodes_keep = apply_filters('wmhook_shortcode_' . 'vc_keep', $vc_shortcodes_keep);
$vc_shortcodes_remove = apply_filters('wmhook_shortcode_' . 'vc_remove', array_diff($vc_shortcodes_all, $vc_shortcodes_keep));
//Array check required due to filter applied above
if (is_array($vc_shortcodes_remove) && !empty($vc_shortcodes_remove)) {
foreach ($vc_shortcodes_remove as $shortcode) {
vc_remove_element($shortcode);
}
}
}
//Add custom VC elements
if (function_exists('vc_map') && !empty(self::$codes['vc_plugin'])) {
ksort(self::$codes['vc_plugin']);
foreach (self::$codes['vc_plugin'] as $shortcode) {
//simple validation (as of http://kb.wpbakery.com/index.php?title=Vc_map, the below 2 parameters are required)
if (!isset($shortcode['name']) || !isset($shortcode['base'])) {
continue;
}
//sort shortcode parameters array
if (isset($shortcode['params'])) {
ksort($shortcode['params']);
}
// Fix required for Visual Composer 4.5.2+
$shortcode['params'] = array_values($shortcode['params']);
vc_map($shortcode);
}
}
}
开发者ID:pab44,项目名称:pab44,代码行数:70,代码来源:class-shortcodes.php
示例11: __construct
function __construct()
{
$this->assets_js = plugin_dir_path(__FILE__) . 'js/';
$this->assets_css = plugin_dir_path(__FILE__) . 'css/';
$this->assets_dir = plugin_dir_path(__FILE__) . 'assets/';
$this->classes_dir = plugin_dir_path(__FILE__) . 'classes/';
$this->elements_dir = plugin_dir_path(__FILE__) . 'elements/';
$this->shortcode_dir = plugin_dir_path(__FILE__) . 'shortcodes/';
$this->plugins_dir = plugin_dir_path(__FILE__) . 'plugins/';
$this->woocommerce_dir = plugin_dir_path(__FILE__) . 'woocommerce/';
$this->bbpress_dir = plugin_dir_path(__FILE__) . 'bbpress/';
$this->posttypes_dir = plugin_dir_path(__FILE__) . 'posttypes/';
$this->images_dir = plugin_dir_path(__FILE__) . 'images/';
$this->icons_dir = plugin_dir_path(__FILE__) . 'icons/';
$this->detector_dir = plugin_dir_path(__FILE__) . 'detector/';
$this->parameters_dir = plugin_dir_path(__FILE__) . 'parameters/';
$this->TS_VCSC_PluginSlug = plugin_basename(__FILE__);
$this->TS_VCSC_PluginPath = plugin_dir_url(__FILE__);
$this->TS_VCSC_PluginDir = plugin_dir_path(__FILE__);
// Check and Store VC Version, Applicable Post Types and Icon Picker
// -----------------------------------------------------------------
if (function_exists('vc_editor_post_types')) {
$this->TS_VCSC_VisualComposer_Posts = vc_editor_post_types();
}
if (defined('WPB_VC_VERSION')) {
$this->TS_VCSC_VisualComposer_Version = WPB_VC_VERSION;
if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.3.0') >= 0) {
if (get_option('ts_vcsc_extend_settings_backendPreview', 1) == 1) {
$this->TS_VCSC_EditorLivePreview = "true";
} else {
$this->TS_VCSC_EditorLivePreview = "false";
}
} else {
$this->TS_VCSC_EditorLivePreview = "false";
}
if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.4.0') >= 0) {
$this->TS_VCSC_EditorIconFontsInternal = "true";
$this->TS_VCSC_VisualComposer_Compliant = "true";
$this->TS_VCSC_EditorFullWidthInternal = "true";
} else {
$this->TS_VCSC_EditorIconFontsInternal = "false";
$this->TS_VCSC_VisualComposer_Compliant = "false";
$this->TS_VCSC_EditorFullWidthInternal = "false";
}
} else {
$this->TS_VCSC_EditorLivePreview = "false";
$this->TS_VCSC_EditorIconFontsInternal = "false";
$this->TS_VCSC_VisualComposer_Compliant = "false";
$this->TS_VCSC_EditorFullWidthInternal = "false";
}
// Check and Set other Global Variables
// ------------------------------------
// Check if All Files should be loaded
if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) {
$this->TS_VCSC_LoadFrontEndForcable = "false";
} else {
$this->TS_VCSC_LoadFrontEndForcable = "true";
}
// Check if Waypoints should be loaded
if (get_option('ts_vcsc_extend_settings_loadWaypoints', 1) == 1) {
$this->TS_VCSC_LoadFrontEndWaypoints = "true";
} else {
$this->TS_VCSC_LoadFrontEndWaypoints = "false";
}
// Check if Modernizr should be loaded
if (get_option('ts_vcsc_extend_settings_loadModernizr', 1) == 1) {
$this->TS_VCSC_LoadFrontEndModernizr = "true";
} else {
$this->TS_VCSC_LoadFrontEndModernizr = "false";
}
// Check if CountTo should be loaded
if (get_option('ts_vcsc_extend_settings_loadCountTo', 1) == 1) {
$this->TS_VCSC_LoadFrontEndCountTo = "true";
} else {
$this->TS_VCSC_LoadFrontEndCountTo = "false";
}
// Check if CountUp should be loaded
if (get_option('ts_vcsc_extend_settings_loadCountUp', 1) == 1) {
$this->TS_VCSC_LoadFrontEndCountUp = "true";
} else {
$this->TS_VCSC_LoadFrontEndCountUp = "false";
}
// Check if Lightbox should be loaded
if (get_option('ts_vcsc_extend_settings_loadLightbox', 0) == 1) {
$this->TS_VCSC_LoadFrontEndLightbox = "true";
} else {
$this->TS_VCSC_LoadFrontEndLightbox = "false";
}
// Check if Tooltips should be loaded
if (get_option('ts_vcsc_extend_settings_loadTooltip', 0) == 1) {
$this->TS_VCSC_LoadFrontEndTooltips = "true";
} else {
$this->TS_VCSC_LoadFrontEndTooltips = "false";
}
// Check if ForceLoad of jQuery
if (get_option('ts_vcsc_extend_settings_loadjQuery', 0) == 1) {
$this->TS_VCSC_LoadFrontEndJQuery = "true";
} else {
$this->TS_VCSC_LoadFrontEndJQuery = "false";
}
//.........这里部分代码省略.........
开发者ID:baochung26,项目名称:happy-c,代码行数:101,代码来源:ts-visual-composer-extend.php
示例12: printScriptsMessages
/**
* Enqueue required javascript libraries and css files.
*
* This method also setups reminder about license activation.
*
* @since 4.2
* @access public
*/
public function printScriptsMessages()
{
if (in_array(get_post_type(), vc_editor_post_types())) {
vc_license()->setupReminder();
wp_enqueue_style('wp-color-picker');
wp_enqueue_script('wp-color-picker');
wp_enqueue_style('farbtastic');
wp_enqueue_style('ui-custom-theme');
wp_enqueue_style('isotope-css');
wp_enqueue_style('animate-css');
wp_enqueue_style('js_composer');
wp_enqueue_style('wpb_jscomposer_autosuggest');
WPBakeryShortCode_Settings::enqueueCss();
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('jquery-ui-sortable');
wp_enqueue_script('jquery-ui-droppable');
wp_enqueue_script('jquery-ui-draggable');
wp_enqueue_script('jquery-ui-accordion');
wp_enqueue_script('jquery-ui-autocomplete');
wp_enqueue_script('farbtastic');
wp_enqueue_script('isotope');
wp_enqueue_script('vc_bootstrap_js', vc_asset_url('lib/bootstrap3/dist/js/bootstrap.min.js'), array('jquery'), '3.0.2', true);
wp_enqueue_script('wpb_scrollTo_js');
wp_enqueue_script('wpb_php_js');
wp_enqueue_script('wpb_js_composer_js_sortable');
wp_enqueue_script('wpb_json-js');
wp_enqueue_style('js_composer_settings', vc_asset_url('css/js_composer_settings.css'), false, WPB_VC_VERSION, false);
wp_enqueue_script('ace-editor');
wp_enqueue_script('webfont', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js');
// Google Web Font CDN
wp_enqueue_script('wpb_js_composer_js_tools');
wp_enqueue_script('wpb_js_composer_js_storage');
wp_enqueue_script('wpb_js_composer_js_models');
wp_enqueue_script('wpb_js_composer_js_view');
wp_enqueue_script('wpb_js_composer_js_custom_views');
/**
* Enqueue deprecated
*/
wp_enqueue_script('vc_js_composer_js_backend_deprecated', vc_asset_url('js/backend/deprecated.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_enqueue_script('wpb_js_composer_js_backbone');
wp_enqueue_script('wpb_jscomposer_composer_js');
wp_enqueue_script('wpb_jscomposer_shortcode_js');
wp_enqueue_script('wpb_jscomposer_modal_js');
wp_enqueue_script('wpb_jscomposer_templates_js');
wp_enqueue_script('wpb_jscomposer_stage_js');
wp_enqueue_script('wpb_jscomposer_layout_js');
wp_enqueue_script('wpb_jscomposer_row_js');
wp_enqueue_script('wpb_jscomposer_settings_js');
wp_enqueue_script('wpb_jscomposer_media_editor_js');
wp_enqueue_script('wpb_jscomposer_autosuggest_js');
// }}
wp_enqueue_script('wpb_js_composer_js');
WPBakeryShortCode_Settings::enqueueJs();
}
}
开发者ID:epiii,项目名称:aros,代码行数:63,代码来源:class-vc-backend-editor.php
示例13: foreach
<?php
/**
* Add WP ui pointers to backend editor.
*/
if (is_admin()) {
foreach (vc_editor_post_types() as $post_type) {
add_filter('vc_ui-pointers-' . $post_type, 'vc_backend_editor_register_pointer');
}
}
function vc_backend_editor_register_pointer($p)
{
$screen = get_current_screen();
if ('add' === $screen->action) {
$p['vc_pointers_backend_editor'] = array('name' => 'vcPointerController', 'messages' => array(array('target' => '.composer-switch', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Welcome to Visual Composer', 'js_composer'), __('Choose Backend or Frontend editor.', 'js_composer')), 'position' => array('edge' => 'left', 'align' => 'center'), 'buttonsEvent' => 'vcPointersEditorsTourEvents')), array('target' => '#vc_templates-editor-button, #vc-templatera-editor-button', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Add Elements', 'js_composer'), __('Add new element or start with a template.', 'js_composer')), 'position' => array('edge' => 'left', 'align' => 'center'), 'buttonsEvent' => 'vcPointersEditorsTourEvents'), 'closeEvent' => 'shortcodes:vc_row:add', 'showEvent' => 'backendEditor.show'), array('target' => '[data-vc-control="add"]:first', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Rows and Columns', 'js_composer'), __('This is a row container. Divide it into columns and style it. You can add elements into columns.', 'js_composer')), 'position' => array('edge' => 'left', 'align' => 'center'), 'buttonsEvent' => 'vcPointersEditorsTourEvents'), 'closeEvent' => 'click #wpb_visual_composer', 'showEvent' => 'shortcodeView:ready'), array('target' => '.wpb_column_container:first .wpb_content_element:first .vc_controls-cc', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s <br/><br/> %s</p>', __('Control Elements', 'js_composer'), __('You can edit your element at any time and drag it around your layout.', 'js_composer'), sprintf(__('P.S. Learn more at our <a href="%s" target="_blank">Knowledge Base</a>.', 'js_composer'), 'http://kb.wpbakery.com')), 'position' => array('edge' => 'left', 'align' => 'center'), 'buttonsEvent' => 'vcPointersEditorsTourEvents'), 'showCallback' => 'vcPointersShowOnContentElementControls', 'closeEvent' => 'click #wpb_visual_composer')));
/*
$p[ 'showEvent_pointers_backend_editor' ] = array(
'name' => 'vcEventPointerController',
'type' => 'map_on_event',
'messages' => array(
array(
'target' => '.vc_control.column_add.vc_column-add:first',
'options' => array(
'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
__( 'Ha ha this is third', 'js_composer' ),
__( '3 Ps use predefined template as a starting point and modify it.', 'js_composer' )
),
'position' => array( 'edge' => 'left', 'align' => 'center' ),
'buttons' => 'vcPointersEditorsTourEvents',
'closeEvent' => 'click #poststuff',
'showEvent' => 'shortcodes:vc_column',
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:31,代码来源:vc-pointers-backend-editor.php
注:本文中的vc_editor_post_types函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论