当前位置: 首页>>代码示例>>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;未经允许,请勿转载。