當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GFForms::format_toolbar_menu_items方法代碼示例

本文整理匯總了PHP中GFForms::format_toolbar_menu_items方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFForms::format_toolbar_menu_items方法的具體用法?PHP GFForms::format_toolbar_menu_items怎麽用?PHP GFForms::format_toolbar_menu_items使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GFForms的用法示例。


在下文中一共展示了GFForms::format_toolbar_menu_items方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: form_list_page


//.........這裏部分代碼省略.........
                    ?>
                                            <strong><a class="row-title" disabled="<?php 
                    disabled(true, $trash);
                    ?>
"
                                                       href="admin.php?page=gf_edit_forms&id=<?php 
                    echo $form->id;
                    ?>
"
                                                       title="<?php 
                    _e("Edit", "gravityforms");
                    ?>
"><?php 
                    echo $form->title;
                    ?>
</a></strong>
                                            <?php 
                    $gf_form_locking->lock_info($form->id);
                }
                ?>
                                        <div class="row-actions">

                                            <?php 
                if ($trash) {
                    $form_actions['restore'] = array('label' => __("Restore", "gravityforms"), 'title' => __("Restore", "gravityforms"), 'url' => 'javascript:RestoreForm(' . $form->id . ');', 'capabilities' => "gravityforms_delete_forms", 'priority' => 600);
                    $form_actions['delete'] = array('label' => __("Delete permanently", "gravityforms"), 'title' => __("Delete permanently", "gravityforms"), 'menu_class' => 'delete', 'url' => 'javascript: if(confirm("' . __("WARNING: You are about to delete this form and ALL entries associated with it. ", "gravityforms") . __('\\"Cancel\\" to stop, \\"OK\\" to delete.', "gravityforms") . '")){ DeleteForm(' . $form->id . ');}', 'capabilities' => "gravityforms_delete_forms", 'priority' => 500);
                } else {
                    require_once GFCommon::get_base_path() . '/form_settings.php';
                    $form_actions = GFForms::get_toolbar_menu_items($form->id, true);
                    $form_actions['duplicate'] = array('label' => __("Duplicate", "gravityforms"), 'title' => __("Duplicate this form", "gravityforms"), 'url' => 'javascript:DuplicateForm(' . $form->id . ');', 'capabilities' => "gravityforms_create_form", 'priority' => 600);
                    $form_actions['trash'] = array('label' => __("Trash", "gravityforms"), 'title' => __("Move this form to the trash", "gravityforms"), 'url' => 'javascript:TrashForm(' . $form->id . ');', 'capabilities' => "gravityforms_delete_forms", 'menu_class' => 'trash', 'priority' => 500);
                }
                $form_actions = apply_filters("gform_form_actions", $form_actions, $form->id);
                echo GFForms::format_toolbar_menu_items($form_actions, true);
                ?>

                                        </div>
                                    </td>
                                    <td class="column-date"><strong><?php 
                echo $form->view_count;
                ?>
</strong></td>
                                    <td class="column-date">
                                        <strong>
                                            <?php 
                if ($form->lead_count > 0 && !$trash) {
                    ?>
                                                <a href="<?php 
                    echo admin_url("admin.php?page=gf_entries&view=entries&id={$form->id}");
                    ?>
"><?php 
                    echo $form->lead_count;
                    ?>
</a>
                                            <?php 
                } else {
                    echo $form->lead_count;
                }
                ?>
                                        </strong>
                                    </td>
                                    <td class="column-date"><?php 
                echo $conversion;
                ?>
</td>
                                </tr>
開發者ID:macconsultinggroup,項目名稱:WordPress,代碼行數:67,代碼來源:form_list.php

示例2: form_list_page


//.........這裏部分代碼省略.........
                } else {
                    ?>
								<strong><a class="row-title" disabled="<?php 
                    disabled(true, $trash);
                    ?>
"
										   href="admin.php?page=gf_edit_forms&id=<?php 
                    echo absint($form->id);
                    ?>
"
										   title="<?php 
                    esc_attr_e('Edit', 'gravityforms');
                    ?>
"><?php 
                    echo esc_html($form->title);
                    ?>
</a></strong>
								<?php 
                    $gf_form_locking->lock_info($form->id);
                }
                ?>
							<div class="row-actions">
								<?php 
                if ($trash) {
                    $form_actions['restore'] = array('label' => __('Restore', 'gravityforms'), 'title' => __('Restore', 'gravityforms'), 'url' => '#', 'onclick' => 'RestoreForm(' . absint($form->id) . ');', 'capabilities' => 'gravityforms_delete_forms', 'priority' => 600);
                    $form_actions['delete'] = array('label' => __('Delete permanently', 'gravityforms'), 'title' => __('Delete permanently', 'gravityforms'), 'menu_class' => 'delete', 'url' => '#', 'onclick' => 'ConfirmDeleteForm(' . absint($form->id) . ');', 'capabilities' => 'gravityforms_delete_forms', 'priority' => 500);
                } else {
                    require_once GFCommon::get_base_path() . '/form_settings.php';
                    $form_actions = GFForms::get_toolbar_menu_items($form->id, true);
                    $form_actions['duplicate'] = array('label' => __('Duplicate', 'gravityforms'), 'title' => __('Duplicate this form', 'gravityforms'), 'url' => '#', 'onclick' => 'DuplicateForm(' . absint($form->id) . ');return false;', 'capabilities' => 'gravityforms_create_form', 'priority' => 600);
                    $form_actions['trash'] = array('label' => __('Trash', 'gravityforms'), 'title' => __('Move this form to the trash', 'gravityforms'), 'url' => '#', 'onclick' => 'TrashForm(' . absint($form->id) . ');return false;', 'capabilities' => 'gravityforms_delete_forms', 'menu_class' => 'trash', 'priority' => 500);
                }
                $form_actions = apply_filters('gform_form_actions', $form_actions, $form->id);
                echo GFForms::format_toolbar_menu_items($form_actions, true);
                ?>

							</div>
						</td>
						<td class="column-date"><strong><?php 
                echo absint($form->view_count);
                ?>
</strong></td>
						<td class="column-date">
							<strong>
								<?php 
                if ($form->lead_count > 0 && !$trash) {
                    ?>
									<a href="<?php 
                    echo esc_url(admin_url('admin.php?page=gf_entries&view=entries&id=' . absint($form->id)));
                    ?>
"><?php 
                    echo absint($form->lead_count);
                    ?>
</a>
								<?php 
                } else {
                    echo absint($form->lead_count);
                }
                ?>
							</strong>
						</td>
						<td class="column-date"><?php 
                echo esc_html($conversion);
                ?>
</td>
					</tr>
開發者ID:nhainam,項目名稱:wordpress4,代碼行數:67,代碼來源:form_list.php

示例3: toolbar

        public function toolbar()
        {
            ?>

			<div id="gf_form_toolbar">
				<ul id="gf_form_toolbar_links">

					<?php 
            $menu_items = self::get_toolbar_menu_items();
            echo GFForms::format_toolbar_menu_items($menu_items);
            ?>
				</ul>
			</div>
		<?php 
        }
開發者ID:jakejackson1,項目名稱:gravityflow,代碼行數:15,代碼來源:class-gravity-flow.php

示例4: handle_row_actions

    protected function handle_row_actions($form, $column_name, $primary)
    {
        if ($primary !== $column_name) {
            return '';
        }
        ?>
		<div class="row-actions">
			<?php 
        if ($this->filter == 'trash') {
            $form_actions['restore'] = array('label' => __('Restore', 'gravityforms'), 'title' => __('Restore', 'gravityforms'), 'url' => '#', 'onclick' => 'RestoreForm(' . absint($form->id) . ');', 'onkeypress' => 'RestoreForm(' . absint($form->id) . ');', 'capabilities' => 'gravityforms_delete_forms', 'priority' => 600);
            $form_actions['delete'] = array('label' => __('Delete permanently', 'gravityforms'), 'title' => __('Delete permanently', 'gravityforms'), 'menu_class' => 'delete', 'url' => '#', 'onclick' => 'ConfirmDeleteForm(' . absint($form->id) . ');', 'onkeypress' => 'ConfirmDeleteForm(' . absint($form->id) . ');', 'capabilities' => 'gravityforms_delete_forms', 'priority' => 500);
        } else {
            $this->locking_info->lock_info($form->id);
            require_once GFCommon::get_base_path() . '/form_settings.php';
            $form_actions = GFForms::get_toolbar_menu_items($form->id, true);
            $form_actions['duplicate'] = array('label' => __('Duplicate', 'gravityforms'), 'title' => __('Duplicate this form', 'gravityforms'), 'url' => '#', 'onclick' => 'DuplicateForm(' . absint($form->id) . ');return false;', 'onkeypress' => 'DuplicateForm(' . absint($form->id) . ');return false;', 'capabilities' => 'gravityforms_create_form', 'priority' => 600);
            $form_actions['trash'] = array('label' => __('Trash', 'gravityforms'), 'title' => __('Move this form to the trash', 'gravityforms'), 'url' => '#', 'onclick' => 'TrashForm(' . absint($form->id) . ');return false;', 'onkeypress' => 'TrashForm(' . absint($form->id) . ');return false;', 'capabilities' => 'gravityforms_delete_forms', 'menu_class' => 'trash', 'priority' => 500);
        }
        $form_actions = apply_filters('gform_form_actions', $form_actions, $form->id);
        echo GFForms::format_toolbar_menu_items($form_actions, true);
        ?>

		</div>
		<?php 
        return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __('Show more details') . '</span></button>' : '';
    }
開發者ID:fjbeteiligung,項目名稱:development,代碼行數:26,代碼來源:form_list.php

示例5: entry_detail


//.........這裏部分代碼省略.........
				createCookie(name, "", -1);
			}


		</script>

		<div class="wrap gf_entry_wrap gravityflow_workflow_wrap gravityflow_workflow_detail">

			<?php 
        if ($show_header) {
            ?>
			<h2 class="gf_admin_page_title">
				<img width="45" height="22" src="<?php 
            echo gravity_flow()->get_base_url();
            ?>
/images/gravityflow-icon-blue-grad.svg" style="margin-right:5px;"/>
				<span><?php 
            echo esc_html__('Workflow Entry #', 'gravityflow') . absint($entry['id']);
            ?>
</span><span class="gf_admin_page_subtitle"><span class='gf_admin_page_formname'><?php 
            esc_html_e('Workflow Form', 'gravityflow');
            ?>
: <?php 
            esc_html_e($form['title']);
            ?>
</span></span>
			</h2>

			<div id="gf_form_toolbar">
				<ul id="gf_form_toolbar_links">

					<?php 
            $menu_items = gravity_flow()->get_toolbar_menu_items();
            echo GFForms::format_toolbar_menu_items($menu_items);
            ?>
				</ul>
			</div>

			<?php 
        }
        if ($check_view_entry_permissions) {
            // Check view permissions
            global $current_user;
            if ($entry['created_by'] != $current_user->ID) {
                $user_status = false;
                if ($current_step) {
                    $user_status = $current_step->get_user_status();
                    if (!$user_status) {
                        $user_roles = gravity_flow()->get_user_roles();
                        foreach ($user_roles as $user_role) {
                            $user_status = $current_step->get_role_status($user_role);
                        }
                    }
                }
                $full_access = GFAPI::current_user_can_any(array('gform_full_access', 'gravityflow_status_view_all'));
                if (!($user_status || $full_access)) {
                    $permission_denied_message = esc_attr__("You don't have permission to view this entry.", 'gravityflow');
                    $permission_denied_message = apply_filters('gravityflow_permission_denied_message_entry_detail', $permission_denied_message, $current_step);
                    echo $permission_denied_message;
                    return;
                }
            }
        }
        $url = remove_query_arg(array('gworkflow_token', 'new_status'));
        ?>
			<div class="gform_wrapper">
開發者ID:jakejackson1,項目名稱:gravityflow,代碼行數:67,代碼來源:class-entry-detail.php


注:本文中的GFForms::format_toolbar_menu_items方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。