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


PHP FLBuilderModel::get_edit_url方法代码示例

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


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

示例1: get_items

 function get_items($request)
 {
     $templates = array();
     $user_templates = get_posts(array('post_type' => 'fl-builder-template', 'orderby' => 'menu_order title', 'order' => 'ASC', 'posts_per_page' => -1, 'fl-builder-template-type' => 'layout'));
     //$user_templates = FLBuilderModel::get_user_templates();
     if (!empty($user_templates)) {
         foreach ($user_templates as $post) {
             $layout = get_post_meta($post->ID, '_fl_builder_data', true);
             if ($layout) {
                 $categories = get_post_meta($post->ID, 'template_categories', true);
                 if (empty($categories)) {
                     $categories = array('saved');
                 }
                 $templates[] = array('handle' => $post->ID, 'label' => $post->post_title, 'description' => $post->post_excerpt, 'author' => $post->post_author, 'modified' => $post->post_modified, 'edit_link' => FLBuilderModel::get_edit_url($post->ID), 'categories' => $categories, 'type' => 'user', 'is_global' => get_post_meta($post->ID, '_fl_builder_template_global', true), 'is_editable' => true);
             }
         }
     }
     $template_data = FLBuilderModel::get_templates();
     if (!empty($template_data)) {
         foreach ($template_data as $data) {
             $templates[] = array('handle' => $data->index, 'label' => $data->name, 'screenshot' => array('thumbnail' => FL_BUILDER_URL . 'img/templates/' . $data->image), 'author' => array('name' => 'Beaver Builder Team'), 'categories' => array($data->category), 'is_premium' => $data->premium, 'is_builtin' => true, 'type' => 'core');
         }
     }
     $response = rest_ensure_response($templates);
     return $response;
 }
开发者ID:brentjett,项目名称:brj-template-browser,代码行数:26,代码来源:class-brj-rest-templates-controller.php

示例2: admin_bar_menu

 /**
  * Adds the page builder button to the WordPress admin bar.
  *
  * @since 1.0
  * @param object $wp_admin_bar An instance of the WordPress admin bar.
  * @return void
  */
 public static function admin_bar_menu($wp_admin_bar)
 {
     global $wp_the_query;
     if (FLBuilderModel::is_post_editable()) {
         $wp_admin_bar->add_node(array('id' => 'fl-builder-frontend-edit-link', 'title' => '<style> #wp-admin-bar-fl-builder-frontend-edit-link .ab-icon:before { content: "\\f116" !important; top: 2px; margin-right: 3px; } </style><span class="ab-icon"></span>' . FLBuilderModel::get_branding(), 'href' => FLBuilderModel::get_edit_url($wp_the_query->post->ID)));
     }
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:14,代码来源:class-fl-builder.php

示例3: render_row_actions_link

 /**
  * Renders the action link for post listing pages.
  *
  * @since 1.0
  * @param array $actions
  * @return array The array of action data.
  */
 public static function render_row_actions_link($actions = array())
 {
     global $post;
     if (current_user_can('edit_post', $post->ID) && wp_check_post_lock($post->ID) === false) {
         $post_types = FLBuilderModel::get_post_types();
         if (in_array($post->post_type, $post_types)) {
             $actions['fl-builder'] = '<a href="' . FLBuilderModel::get_edit_url() . '">' . FLBuilderModel::get_branding() . '</a>';
         }
     }
     return $actions;
 }
开发者ID:onedaylabs,项目名称:yote2016.com,代码行数:18,代码来源:class-fl-builder-admin-posts.php

示例4: filter_edit_post_link

 /**
  * Filter the edit link
  *
  * @since 0.3
  * @param string $url
  * @param int $post_id
  * @param string $context
  * @return string $url The Url to an edit screen
  */
 static function filter_edit_post_link($url, $post_id, $context)
 {
     if (get_post_type($post_id) == 'brj-workspace') {
         $url = FLBuilderModel::get_edit_url($post_id);
     }
     return $url;
 }
开发者ID:brentjett,项目名称:brj-workspaces,代码行数:16,代码来源:class-brj-workspaces-admin.php

示例5: printf

if ($enabled) {
    echo ' fl-active';
}
?>
"><?php 
echo FLBuilderModel::get_branding();
?>
</a>
	</div>
	<div class="fl-builder-admin-ui">
		<h3><?php 
printf(_x('%s is currently active for this %s.', 'The first %s stands for custom branded "Page Builder" name. The second %s stands for the post type name.', 'fl-builder'), FLBuilderModel::get_branding(), $post_type_name);
?>
</h3>
		<a href="<?php 
echo FLBuilderModel::get_edit_url();
?>
" class="fl-launch-builder button button-primary button-large"><?php 
printf(_x('Launch %s', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding());
?>
</a>
	</div>
	<div class="fl-builder-loading"></div>
</div>
<script type="text/javascript">

FLBuilderAdminPostsStrings = {
	switchToEditor: '<?php 
printf(esc_attr_x('Switching to Text Editor mode will disable your %s layout until it is enabled again. Any edits made while in Text Editor mode will not be made on your %s layout. Do you want to continue?', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding(), FLBuilderModel::get_branding());
?>
'
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:31,代码来源:admin-posts.php


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