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


PHP FLBuilderModel::get_editing_capability方法代码示例

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


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

示例1: _e

		<?php 
}
?>

		<div class="fl-settings-form-content">

			<h4><?php 
_e('Editing Capability', 'fl-builder');
?>
</h4>
			<p><?php 
printf(__('Set the <a%s>capability</a> required for users to access advanced builder editing such as adding, deleting or moving modules.', 'fl-builder'), ' href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" target="_blank"');
?>
</p>
			<input type="text" name="fl-editing-capability" value="<?php 
echo esc_html(FLBuilderModel::get_editing_capability());
?>
" class="regular-text" />
			
			<?php 
if (file_exists(FL_BUILDER_DIR . 'includes/node-template-settings.php')) {
    ?>
			<h4><?php 
    _e('Global Templates Editing Capability', 'fl-builder');
    ?>
</h4>
			<p><?php 
    printf(__('Set the <a%s>capability</a> required for users to global templates.', 'fl-builder'), ' href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" target="_blank"');
    ?>
</p>
			<input type="text" name="fl-global-templates-editing-capability" value="<?php 
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:31,代码来源:admin-settings-editing.php

示例2: get_post_type

    echo 'true';
} else {
    echo 'false';
}
?>
,
	postId: <?php 
echo $post_id;
?>
,
	postType: '<?php 
echo get_post_type();
?>
',
	simpleUi: <?php 
if (!current_user_can(FLBuilderModel::get_editing_capability())) {
    echo 'true';
} else {
    echo 'false';
}
?>
,
	upgradeUrl: '<?php 
if (FL_BUILDER_LITE === true) {
    $campaign = 'upgrade-button';
} else {
    $campaign = 'buy-button';
}
echo FLBuilderModel::get_upgrade_url(array('utm_source' => 'external', 'utm_medium' => 'builder', 'utm_campaign' => $campaign));
?>
',
开发者ID:meftasadat,项目名称:DSL_SITE,代码行数:31,代码来源:ui-js-config.php

示例3: register_templates_post_type

 /**
  * Registers the custom post type for builder templates.
  *
  * @since 1.1.3
  * @since 1.5.7 Added template category taxonomy.
  * @return void
  */
 public static function register_templates_post_type()
 {
     // Template classes aren't included in the lite version.
     if (FL_BUILDER_LITE === true) {
         return;
     }
     // Vars for checking if the templates admin should be public.
     $admin_enabled = FLBuilderModel::user_templates_admin_enabled();
     $can_edit = current_user_can(FLBuilderModel::get_editing_capability());
     // Get the array of supported features for the templates post type.
     $supports = array('title', 'revisions', 'page-attributes');
     // Include thumbnail support if core templates can be overridden.
     if (class_exists('FLBuilderTemplatesOverride')) {
         $supports[] = 'thumbnail';
     }
     // Register the template post type.
     register_post_type('fl-builder-template', array('public' => $admin_enabled && $can_edit ? true : false, 'labels' => array('name' => _x('Templates', 'Custom post type label.', 'fl-builder'), 'singular_name' => _x('Template', 'Custom post type label.', 'fl-builder'), 'menu_name' => _x('Templates', 'Custom post type label.', 'fl-builder'), 'name_admin_bar' => _x('Template', 'Custom post type label.', 'fl-builder'), 'add_new' => _x('Add New', 'Custom post type label.', 'fl-builder'), 'add_new_item' => _x('Add New Template', 'Custom post type label.', 'fl-builder'), 'new_item' => _x('New Template', 'Custom post type label.', 'fl-builder'), 'edit_item' => _x('Edit Template', 'Custom post type label.', 'fl-builder'), 'view_item' => _x('View Template', 'Custom post type label.', 'fl-builder'), 'all_items' => _x('All Templates', 'Custom post type label.', 'fl-builder'), 'search_items' => _x('Search Templates', 'Custom post type label.', 'fl-builder'), 'parent_item_colon' => _x('Parent Templates:', 'Custom post type label.', 'fl-builder'), 'not_found' => _x('No templates found.', 'Custom post type label.', 'fl-builder'), 'not_found_in_trash' => _x('No templates found in Trash.', 'Custom post type label.', 'fl-builder')), 'menu_icon' => 'dashicons-welcome-widgets-menus', 'supports' => $supports, 'taxonomies' => array('fl-builder-template-category'), 'publicly_queryable' => $can_edit, 'exclude_from_search' => true));
     // Register the template category tax.
     register_taxonomy('fl-builder-template-category', array('fl-builder-template'), array('labels' => array('name' => _x('Template Categories', 'Custom taxonomy label.', 'fl-builder'), 'singular_name' => _x('Template Category', 'Custom taxonomy label.', 'fl-builder'), 'search_items' => _x('Search Template Categories', 'Custom taxonomy label.', 'fl-builder'), 'all_items' => _x('All Template Categories', 'Custom taxonomy label.', 'fl-builder'), 'parent_item' => _x('Parent Template Category', 'Custom taxonomy label.', 'fl-builder'), 'parent_item_colon' => _x('Parent Template Category:', 'Custom taxonomy label.', 'fl-builder'), 'edit_item' => _x('Edit Template Category', 'Custom taxonomy label.', 'fl-builder'), 'update_item' => _x('Update Template Category', 'Custom taxonomy label.', 'fl-builder'), 'add_new_item' => _x('Add New Template Category', 'Custom taxonomy label.', 'fl-builder'), 'new_item_name' => _x('New Template Category Name', 'Custom taxonomy label.', 'fl-builder'), 'menu_name' => _x('Categories', 'Custom taxonomy label.', 'fl-builder')), 'hierarchical' => true, 'public' => true, 'show_admin_column' => true));
     // Register the template type tax.
     register_taxonomy('fl-builder-template-type', array('fl-builder-template'), array('label' => _x('Type', 'Custom taxonomy label.', 'fl-builder'), 'hierarchical' => false, 'public' => false, 'show_admin_column' => true));
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:29,代码来源:class-fl-builder.php

示例4: body_class

 /**
  * Adds builder classes to the body class.
  *
  * @since 1.0
  * @param array $classes An array of existing classes.
  * @return array
  */
 public static function body_class($classes)
 {
     if (FLBuilderModel::is_builder_enabled()) {
         $classes[] = 'fl-builder';
     }
     if (FLBuilderModel::is_builder_active() && !current_user_can(FLBuilderModel::get_editing_capability())) {
         $classes[] = 'fl-builder-simple';
     }
     return $classes;
 }
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:17,代码来源:class-fl-builder.php


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