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


PHP GFForms::get_toolbar_menu_items方法代碼示例

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


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

示例1: form_list_page


//.........這裏部分代碼省略.........
</td>
						<td class="column-title">
							<?php 
                if ($trash) {
                    echo esc_html($form->title);
                } 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>
開發者ID:nhainam,項目名稱:wordpress4,代碼行數:67,代碼來源:form_list.php

示例2: form_list_page


//.........這裏部分代碼省略.........
                                    <td class="column-title">
                                        <?php 
                if ($trash) {
                    echo $form->title;
                } else {
                    ?>
                                            <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>
開發者ID:macconsultinggroup,項目名稱:WordPress,代碼行數:67,代碼來源:form_list.php

示例3: 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


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