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


PHP RGFormsModel::get_form_summary方法代码示例

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


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

示例1: ddw_gftb_admin_bar_menu

/**
 * Plugin's main function.
 * Add new menu items to the WordPress Toolbar / Admin Bar.
 * 
 * @since  1.0.0
 *
 * @global mixed $wp_admin_bar
 */
function ddw_gftb_admin_bar_menu()
{
    global $wp_admin_bar;
    /**
     * Allows for filtering the general user role/capability to display main & sub-level items
     *
     * Default capability: 'gravityforms_edit_forms' or 'gform_full_access' (set by Gravity Forms plugin itself!)
     *
     * @since 1.4.0
     */
    $gftb_init_cap_check = current_user_can('gravityforms_edit_forms') ? 'gravityforms_edit_forms' : 'gform_full_access';
    $gftb_filter_capability = apply_filters('gftb_filter_capability_all', $gftb_init_cap_check);
    /**
     * Required Gravity Forms/ WordPress cabability to display new admin bar entry
     * Only showing items if toolbar / admin bar is activated and user is logged in!
     *
     * @since 1.3.0
     */
    if (!is_user_logged_in() || !is_admin_bar_showing() || !current_user_can(esc_attr($gftb_filter_capability)) || defined('GFTB_DISPLAY') && !GFTB_DISPLAY) {
        return;
    }
    // end if
    /** Defaults for plugin's options */
    $options = ddw_gftb_get_options();
    if (is_admin() && !$options['toolbar_admin'] || !is_admin() && !$options['toolbar_frontend']) {
        return;
    }
    // end if
    $update = $options['update_notification'] ? ddw_gftb_update_available() : false;
    $forms = array();
    $count = 0;
    if (class_exists('RGForms') && $options['forms_details'] && (current_user_can('gform_full_access') || current_user_can('gravityforms_edit_forms'))) {
        $forms = RGFormsModel::get_form_summary();
    }
    /** Set unique prefix */
    $prefix = 'ddw-gravityforms-';
    /** Create parent menu item references */
    $gravitybar = $prefix . 'toolbar';
    // root level
    $gfsupport = $prefix . 'gfsupport';
    // sub level: support
    $gfdocs = $prefix . 'gfdocs';
    // sub level: documentation
    $gffaq = $prefix . 'gffaq';
    // sub level: faq
    $gfsites = $prefix . 'gfsites';
    // sub level: gf websites
    $gfsettings = $prefix . 'gfsettings';
    // sub level: main settings
    $gfsubsettings = $prefix . 'gfsubsettings';
    // third level: sub main settings
    $gfforms = $prefix . 'gfforms';
    // sub level: forms
    $gfformlist = $prefix . 'gfformlist';
    // third level: forms listing
    $gfentries = $prefix . 'gfentries';
    // sub level: entries
    $gftpaogfstyler = $prefix . 'gftpaogfstyler';
    // sub level third-party add-on: gravity forms styler
    $gfimportexport = $prefix . 'gfimportexport';
    // sub level: import/export
    $gfaddonsinstalled = $prefix . 'gfaddonsinstalled';
    // sub level: add-ons (dummy)
    $gfaoauthorizenet = $prefix . 'gfaoauthorizenet';
    // third level add-on: authorize.net
    $gfaoaweber = $prefix . 'gfaoaweber';
    // third level add-on: aweber
    $gfaocampaignmonitor = $prefix . 'gfaocampaignmonitor';
    // third level add-on: campaign monitor
    $gfaocoupons = $prefix . 'gfaocoupons';
    // third level add-on: coupons
    $gfaofreshbooks = $prefix . 'gfaofreshbooks';
    // third level add-on: freshbooks
    $gfaomailchimp = $prefix . 'gfaomailchimp';
    // third level add-on: mailchimp
    $gfaopaypal = $prefix . 'gfaopaypal';
    // third level add-on: payal
    $gfaopaypalpaymentspro = $prefix . 'gfaopaypalpaymentspro';
    // third level add-on: payal payments pro
    $gfaopaypalpro = $prefix . 'gfaopaypalpro';
    // third level add-on: payal pro
    $gfaotwilio = $prefix . 'gfaotwilio';
    // third level add-on: twilio
    $gfaouserreg = $prefix . 'gfaouserreg';
    // third level add-on: user reg.
    $gftpaopideal = $prefix . 'gftpaopideal';
    // third level third-party add-on: pronamic ideal
    $gftpaostripe = $prefix . 'gftpaostripe';
    // third level third-party add-on: stripe
    $gftpaowysija = $prefix . 'gftpaowysija';
    // third level third-party add-on: mp/wysija
    $gftpaoshootq = $prefix . 'gftpaoshootq';
//.........这里部分代码省略.........
开发者ID:EasyDayCleaning,项目名称:Easy-Day-Team2,代码行数:101,代码来源:gravity-forms-toolbar.php

示例2: dashboard

    public static function dashboard()
    {
        $forms = RGFormsModel::get_form_summary();
        if (sizeof($forms) > 0) {
            ?>
			<table class="widefat gf_dashboard_view" cellspacing="0" style="border:0px;">
				<thead>
				<tr>
					<td class="gf_dashboard_form_title_header" style="text-align:left; padding:8px 18px!important; font-weight:bold;">
						<i><?php 
            esc_html_e('Title', 'gravityforms');
            ?>
</i></td>
					<td class="gf_dashboard_entries_unread_header" style="text-align:center; padding:8px 18px!important; font-weight:bold;">
						<i><?php 
            esc_html_e('Unread', 'gravityforms');
            ?>
</i></td>
					<td class="gf_dashboard_entries_total_header" style="text-align:center; padding:8px 18px!important; font-weight:bold;">
						<i><?php 
            esc_html_e('Total', 'gravityforms');
            ?>
</i></td>
				</tr>
				</thead>

				<tbody class="list:user user-list">
				<?php 
            foreach ($forms as $form) {
                $date_display = GFCommon::format_date($form['last_lead_date']);
                if (!empty($form['total_leads'])) {
                    ?>
						<tr class='author-self status-inherit' valign="top">
							<td class="gf_dashboard_form_title column-title" style="padding:8px 18px;">
								<a <?php 
                    echo $form['unread_count'] > 0 ? "class='form_title_unread' style='font-weight:bold;'" : '';
                    ?>
 href="admin.php?page=gf_entries&view=entries&id=<?php 
                    echo absint($form['id']);
                    ?>
" title="<?php 
                    echo esc_attr($form['title']);
                    ?>
 : <?php 
                    esc_attr_e('View All Entries', 'gravityforms');
                    ?>
"><?php 
                    echo esc_html($form['title']);
                    ?>
</a>
							</td>
							<td class="gf_dashboard_entries_unread column-date" style="padding:8px 18px; text-align:center;">
								<a <?php 
                    echo $form['unread_count'] > 0 ? "class='form_entries_unread' style='font-weight:bold;'" : '';
                    ?>
 href="admin.php?page=gf_entries&view=entries&filter=unread&id=<?php 
                    echo absint($form['id']);
                    ?>
" title="<?php 
                    printf(esc_attr__('Last Entry: %s', 'gravityforms'), $date_display);
                    ?>
"><?php 
                    echo absint($form['unread_count']);
                    ?>
</a>
							</td>
							<td class="gf_dashboard_entries_total column-date" style="padding:8px 18px; text-align:center;">
								<a href="admin.php?page=gf_entries&view=entries&id=<?php 
                    echo absint($form['id']);
                    ?>
" title="<?php 
                    esc_attr_e('View All Entries', 'gravityforms');
                    ?>
"><?php 
                    echo absint($form['total_leads']);
                    ?>
</a>
							</td>
						</tr>
					<?php 
                }
            }
            ?>
				</tbody>
			</table>

			<?php 
            if (GFCommon::current_user_can_any('gravityforms_edit_forms')) {
                ?>
				<p class="textright">
				<a class="gf_dashboard_button button" href="admin.php?page=gf_edit_forms"><?php 
                esc_html_e('View All Forms', 'gravityforms');
                ?>
</a>
			<?php 
            }
            ?>
			</p>
		<?php 
        } else {
//.........这里部分代码省略.........
开发者ID:kidaak,项目名称:gravityforms,代码行数:101,代码来源:gravityforms.php

示例3: dashboard

    public static function dashboard()
    {
        $forms = RGFormsModel::get_form_summary();
        if (sizeof($forms) > 0) {
            ?>
            <table class="widefat fixed" cellspacing="0" style="border:0px;">
                <thead>
                    <tr>
                        <td style="text-align:left; padding:8px 0!important; font-weight:bold;"><i><?php 
            _e("Form Name", "gravityforms");
            ?>
</i></td>
                        <td style="text-align:center; padding:8px 0!important; font-weight:bold;"><i><?php 
            _e("Unread Entries", "gravityforms");
            ?>
</i></td>
                        <td style="text-align:left; padding:8px 0!important; font-weight:bold;"><i><?php 
            _e("Last Entry", "gravityforms");
            ?>
</i></td>
                    </tr>
                </thead>

                <tbody class="list:user user-list">
                    <?php 
            foreach ($forms as $form) {
                $date_display = GFCommon::format_date($form["last_lead_date"]);
                ?>
                        <tr class='author-self status-inherit' valign="top">
                            <td class="column-title" style="padding:8px 0;">
                                <a style="display:inline;white-space: nowrap; width: 100%; overflow: hidden; text-overflow: ellipsis; <?php 
                echo $form["unread_count"] > 0 ? "font-weight:bold;" : "";
                ?>
" href="admin.php?page=gf_entries&view=entries&id=<?php 
                echo absint($form["id"]);
                ?>
" title="<?php 
                echo esc_html($form["title"]);
                ?>
 : <?php 
                _e("View All Entries", "gravityforms");
                ?>
"><?php 
                echo esc_html($form["title"]);
                ?>
</a>
                            </td>
                            <td class="column-date" style="padding:8px 0; text-align:center;"><a style="<?php 
                echo $form["unread_count"] > 0 ? "font-weight:bold;" : "";
                ?>
" href="admin.php?page=gf_entries&view=entries&id=<?php 
                echo absint($form["id"]);
                ?>
" title="<?php 
                _e("View Unread Entries", "gravityforms");
                ?>
"><?php 
                echo absint($form["unread_count"]);
                ?>
</a></td>
                            <td class="column-date" style="padding-top:7px;"><?php 
                echo esc_html($date_display);
                ?>
</td>
                        </tr>
                        <?php 
            }
            ?>
                </tbody>
            </table>

            <p class="textright">
            <a class="button" href="admin.php?page=gf_edit_forms"><?php 
            _e("View All Forms", "gravityforms");
            ?>
</a>
          </p>
            <?php 
        } else {
            ?>
            <div>
                <?php 
            echo sprintf(__("You don't have any forms. Let's go %s create one %s!", 'gravityforms'), '<a href="admin.php?page=gf_new_form">', '</a>');
            ?>
            </div>
            <?php 
        }
        if (GFCommon::current_user_can_any("gravityforms_view_updates") && (!function_exists("is_multisite") || !is_multisite() || is_super_admin())) {
            //displaying update message if there is an update and user has permission
            self::dashboard_update_message();
        }
    }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:92,代码来源:gravityforms.php


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