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


PHP GFCommon::has_akismet方法代码示例

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


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

示例1: gravityforms_settings_page


//.........这里部分代码省略.........

				<tr valign="top">
					<th scope="row">
						<label for="gform_enable_noconflict"><?php 
        esc_html_e('No-Conflict Mode', 'gravityforms');
        ?>
</label>  <?php 
        gform_tooltip('settings_noconflict');
        ?>
					</th>
					<td>
						<input type="radio" name="gform_enable_noconflict" value="1" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? "checked='checked'" : '';
        ?>
 id="gform_enable_noconflict" /> <?php 
        esc_html_e('On', 'gravityforms');
        ?>
&nbsp;&nbsp;
						<input type="radio" name="gform_enable_noconflict" value="0" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? '' : "checked='checked'";
        ?>
 id="gform_disable_noconflict" /> <?php 
        esc_html_e('Off', 'gravityforms');
        ?>
						<br />
						<span class="gf_settings_description"><?php 
        esc_html_e('Set this to ON to prevent extraneous scripts and styles from being printed on Gravity Forms admin pages, reducing conflicts with other plugins and themes.', 'gravityforms');
        ?>
</span>
					</td>
				</tr>

				<?php 
        if (GFCommon::has_akismet()) {
            ?>
					<tr valign="top">
						<th scope="row">
							<label for="gforms_enable_akismet"><?php 
            esc_html_e('Akismet Integration', 'gravityforms');
            ?>
</label>  <?php 
            gform_tooltip('settings_akismet');
            ?>
						</th>
						<td>
							<?php 
            $akismet_setting = get_option('rg_gforms_enable_akismet');
            $is_akismet_enabled = $akismet_setting === false || !empty($akismet_setting);
            //Akismet is enabled by default.
            ?>
							<input type="radio" name="gforms_enable_akismet" value="1" <?php 
            checked($is_akismet_enabled, true);
            ?>
 id="gforms_enable_akismet" /> <?php 
            esc_html_e('Yes', 'gravityforms');
            ?>
&nbsp;&nbsp;
							<input type="radio" name="gforms_enable_akismet" value="0" <?php 
            checked($is_akismet_enabled, false);
            ?>
 /> <?php 
            esc_html_e('No', 'gravityforms');
            ?>
							<br />
							<span class="gf_settings_description"><?php 
            esc_html_e('Protect your form entries from spam using Akismet.', 'gravityforms');
开发者ID:jordanmaslyn,项目名称:vvv-starter,代码行数:67,代码来源:settings.php

示例2: leads_page


//.........这里部分代码省略.........
        _e("All", "gravityforms");
        ?>
 <span class="count">(<span id="all_count"><?php 
        echo $total_lead_count;
        ?>
</span>)</span></a> | </li>
                    <li><a class="<?php 
        echo $read !== null ? "current" : "";
        ?>
" href="?page=gf_entries&view=entries&id=<?php 
        echo $form_id;
        ?>
&filter=unread"><?php 
        _e("Unread", "gravityforms");
        ?>
 <span class="count">(<span id="unread_count"><?php 
        echo $unread_count;
        ?>
</span>)</span></a> | </li>
                    <li><a class="<?php 
        echo $star !== null ? "current" : "";
        ?>
" href="?page=gf_entries&view=entries&id=<?php 
        echo $form_id;
        ?>
&filter=star"><?php 
        _e("Starred", "gravityforms");
        ?>
 <span class="count">(<span id="star_count"><?php 
        echo $starred_count;
        ?>
</span>)</span></a> | </li>
                    <?php 
        if (GFCommon::has_akismet()) {
            ?>
                        <li><a class="<?php 
            echo $filter == "spam" ? "current" : "";
            ?>
" href="?page=gf_entries&view=entries&id=<?php 
            echo $form_id;
            ?>
&filter=spam"><?php 
            _e("Spam", "gravityforms");
            ?>
 <span class="count">(<span id="spam_count"><?php 
            echo $spam_count;
            ?>
</span>)</span></a> | </li>
                        <?php 
        }
        ?>
                    <li><a class="<?php 
        echo $filter == "trash" ? "current" : "";
        ?>
" href="?page=gf_entries&view=entries&id=<?php 
        echo $form_id;
        ?>
&filter=trash"><?php 
        _e("Trash", "gravityforms");
        ?>
 <span class="count">(<span id="trash_count"><?php 
        echo $trash_count;
        ?>
</span>)</span></a></li>
                </ul>
                <p class="search-box">
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:67,代码来源:entry_list.php

示例3: handle_submission

 public static function handle_submission($form, &$lead, $ajax = false)
 {
     //creating entry in DB
     RGFormsModel::save_lead($form, $lead);
     //reading entry that was just saved
     $lead = RGFormsModel::get_lead($lead["id"]);
     do_action('gform_entry_created', $lead, $form);
     //if Akismet plugin is installed, run lead through Akismet and mark it as Spam when appropriate
     $is_spam = false;
     if (GFCommon::has_akismet() && GFCommon::is_akismet_spam($form, $lead)) {
         $is_spam = true;
     }
     if (!$is_spam) {
         GFCommon::create_post($form, $lead);
         //send auto-responder and notification emails
         self::send_emails($form, $lead);
     } else {
         //marking entry as spam
         RGFormsModel::update_lead_property($lead["id"], "status", "spam", false, true);
         $lead["status"] = "spam";
     }
     //display confirmation message or redirect to confirmation page
     return self::handle_confirmation($form, $lead, $ajax);
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:24,代码来源:form_display.php

示例4: display


//.........这里部分代码省略.........
				<th scope="row">
					<label for="gform_enable_noconflict"><?php 
        esc_html_e('No-Conflict Mode', 'gravityforms');
        ?>
</label>  <?php 
        gform_tooltip('settings_noconflict');
        ?>
				</th>
				<td>
					<input type="radio" name="enable_noconflict" value="1" <?php 
        echo $this->enable_noconflict == 1 ? "checked='checked'" : '';
        ?>
 id="gform_enable_noconflict" /> <?php 
        esc_html_e('On', 'gravityforms');
        ?>
&nbsp;&nbsp;
					<input type="radio" name="enable_noconflict" value="0" <?php 
        echo $this->enable_noconflict == 1 ? '' : "checked='checked'";
        ?>
 id="gform_disable_noconflict" /> <?php 
        esc_html_e('Off', 'gravityforms');
        ?>
					<br />
					<span class="gf_settings_description"><?php 
        esc_html_e('Set this to ON to prevent extraneous scripts and styles from being printed on Gravity Forms admin pages, reducing conflicts with other plugins and themes.', 'gravityforms');
        ?>
</span>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row">
					<label for="gform_enable_toolbar_menu"><?php 
        esc_html_e('Toolbar Menu', 'gravityforms');
        ?>
</label>  <?php 
        gform_tooltip('settings_toolbar_menu');
        ?>
				</th>
				<td>
					<input type="radio" name="enable_toolbar_menu" value="1" <?php 
        checked($this->enable_toolbar_menu, true);
        ?>
 id="gform_enable_toolbar_menu" /> <?php 
        esc_html_e('On', 'gravityforms');
        ?>
&nbsp;&nbsp;
					<input type="radio" name="enable_toolbar_menu" value="0" <?php 
        checked($this->enable_toolbar_menu, false);
        ?>
 id="gform_disable_toolbar_menu" /> <?php 
        esc_html_e('Off', 'gravityforms');
        ?>
					<br />
					<span class="gf_settings_description"><?php 
        esc_html_e('Set this to ON to display the Forms menu in the WordPress top toolbar. The Forms menu will display the latest ten forms recently opened in the form editor.', 'gravityforms');
        ?>
</span>
				</td>
			</tr>

			<?php 
        if (GFCommon::has_akismet()) {
            ?>
				<tr valign="top">
					<th scope="row">
						<label for="gforms_enable_akismet"><?php 
            esc_html_e('Akismet Integration', 'gravityforms');
            ?>
</label>  <?php 
            gform_tooltip('settings_akismet');
            ?>
					</th>
					<td>
						<input type="radio" name="enable_akismet" value="1" <?php 
            checked($this->enable_akismet, true);
            ?>
 id="gforms_enable_akismet" /> <?php 
            esc_html_e('Yes', 'gravityforms');
            ?>
&nbsp;&nbsp;
						<input type="radio" name="enable_akismet" value="0" <?php 
            checked($this->enable_akismet, false);
            ?>
 /> <?php 
            esc_html_e('No', 'gravityforms');
            ?>
						<br />
						<span class="gf_settings_description"><?php 
            esc_html_e('Protect your form entries from spam using Akismet.', 'gravityforms');
            ?>
</span>
					</td>
				</tr>
			<?php 
        }
        ?>
		</table>

	<?php 
    }
开发者ID:Garth619,项目名称:Femi9,代码行数:101,代码来源:class-gf-installation-wizard-step-settings.php

示例5: gravityforms_settings_page


//.........这里部分代码省略.........
                    </td>
                </tr>

                <tr valign="top">
                     <th scope="row"><label for="gform_enable_noconflict"><?php 
        _e("No-Conflict Mode", "gravityforms");
        ?>
</label>  <?php 
        gform_tooltip("settings_noconflict");
        ?>
</th>
                    <td>
                        <input type="radio" name="gform_enable_noconflict" value="1" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? "checked='checked'" : "";
        ?>
 id="gform_enable_noconflict"/> <?php 
        _e("On", "gravityforms");
        ?>
&nbsp;&nbsp;
                        <input type="radio" name="gform_enable_noconflict" value="0" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? "" : "checked='checked'";
        ?>
 id="gform_disable_noconflict"/> <?php 
        _e("Off", "gravityforms");
        ?>
<br />
                        <?php 
        _e("Set this to On to prevent extraneous scripts and styles from being printed on Gravity Forms admin pages, reducing conflicts with other plugins and themes.", "gravityforms");
        ?>
                    </td>
                </tr>

                <?php 
        if (GFCommon::has_akismet()) {
            ?>
                <tr valign="top">
                     <th scope="row"><label for="gforms_enable_akismet"><?php 
            _e("Akismet Integration", "gravityforms");
            ?>
</label>  <?php 
            gform_tooltip("settings_akismet");
            ?>
</th>
                    <td>
                        <input type="radio" name="gforms_enable_akismet" value="1" <?php 
            echo get_option('rg_gforms_enable_akismet') == 1 ? "checked='checked'" : "";
            ?>
 id="gforms_enable_akismet"/> <?php 
            _e("Yes", "gravityforms");
            ?>
&nbsp;&nbsp;
                        <input type="radio" name="gforms_enable_akismet" value="0" <?php 
            echo get_option('rg_gforms_enable_akismet') == 1 ? "" : "checked='checked'";
            ?>
 /> <?php 
            _e("No", "gravityforms");
            ?>
<br />
                        <?php 
            _e("Protect your form entries from spam using Akismet.", "gravityforms");
            ?>
                    </td>
                </tr>
                <?php 
        }
        ?>
开发者ID:rongandat,项目名称:cyarevfoods,代码行数:67,代码来源:settings.php

示例6: update_lead_property

 public static function update_lead_property($lead_id, $property_name, $property_value, $update_akismet = true, $disable_hook = false)
 {
     global $wpdb;
     $lead_table = self::get_lead_table_name();
     $lead = self::get_lead($lead_id);
     //marking entry as "spam" or "not spam" with Akismet if the plugin is installed
     if ($update_akismet && GFCommon::has_akismet() && $property_name == "status" && in_array($property_value, array("active", "spam"))) {
         $current_status = $lead["status"];
         if ($current_status == "spam" && $property_value == "active") {
             $form = self::get_form_meta($lead["form_id"]);
             GFCommon::mark_akismet_spam($form, $lead, false);
         } else {
             if ($current_status == "active" && $property_value == "spam") {
                 $form = self::get_form_meta($lead["form_id"]);
                 GFCommon::mark_akismet_spam($form, $lead, true);
             }
         }
     }
     //updating lead
     $wpdb->update($lead_table, array($property_name => $property_value), array("id" => $lead_id));
     if (!$disable_hook) {
         $previous_value = rgar($lead, $property_name);
         if ($previous_value != $property_value) {
             // if property is status, prev value is spam and new value is active
             if ($property_name == 'status' && $previous_value == 'spam' && $property_value == 'active' && !rgar($lead, 'post_id')) {
                 $lead[$property_name] = $property_value;
                 $lead['post_id'] = GFCommon::create_post($form, $lead);
             }
             do_action("gform_update_{$property_name}", $lead_id, $property_value, $previous_value);
         }
     }
 }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:32,代码来源:forms_model.php

示例7: gravityforms_settings_page


//.........这里部分代码省略.........
                    </td>
                </tr>

                <tr valign="top">
                     <th scope="row"><label for="gform_enable_noconflict"><?php 
        _e("No-Conflict Mode", "gravityforms");
        ?>
</label>  <?php 
        gform_tooltip("settings_noconflict");
        ?>
</th>
                    <td>
                        <input type="radio" name="gform_enable_noconflict" value="1" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? "checked='checked'" : "";
        ?>
 id="gform_enable_noconflict"/> <?php 
        _e("On", "gravityforms");
        ?>
&nbsp;&nbsp;
                        <input type="radio" name="gform_enable_noconflict" value="0" <?php 
        echo get_option('gform_enable_noconflict') == 1 ? "" : "checked='checked'";
        ?>
 id="gform_disable_noconflict"/> <?php 
        _e("Off", "gravityforms");
        ?>
<br />
                        <?php 
        _e("Set this to On to prevent extraneous scripts and styles from being printed on Gravity Forms admin pages, reducing conflicts with other plugins and themes.", "gravityforms");
        ?>
                    </td>
                </tr>

                <?php 
        if (GFCommon::has_akismet()) {
            ?>
                <tr valign="top">
                     <th scope="row"><label for="gforms_enable_akismet"><?php 
            _e("Akismet Integration", "gravityforms");
            ?>
</label>  <?php 
            gform_tooltip("settings_akismet");
            ?>
</th>
                    <td>
                        <input type="radio" name="gforms_enable_akismet" value="1" <?php 
            echo get_option('rg_gforms_enable_akismet') == 1 ? "checked='checked'" : "";
            ?>
 id="gforms_enable_akismet"/> <?php 
            _e("Yes", "gravityforms");
            ?>
&nbsp;&nbsp;
                        <input type="radio" name="gforms_enable_akismet" value="0" <?php 
            echo get_option('rg_gforms_enable_akismet') == 1 ? "" : "checked='checked'";
            ?>
 /> <?php 
            _e("No", "gravityforms");
            ?>
<br />
                        <?php 
            _e("Protect your form entries from spam using Akismet.", "gravityforms");
            ?>
                    </td>
                </tr>
                <?php 
        }
        ?>
开发者ID:nikibrown,项目名称:2014-Nerd-presentation,代码行数:67,代码来源:settings.php

示例8: lead_detail_page


//.........这里部分代码省略.........
: <?php 
                echo GFCommon::format_date($lead["payment_date"], false, "Y/m/d", $lead["transaction_type"] == 1);
                ?>
                                            <br/><br/>
                                            <?php 
            }
            if (!empty($lead["transaction_id"])) {
                echo $lead["transaction_type"] == 1 ? __("Transaction Id", "gravityforms") : __("Subscriber Id", "gravityforms");
                ?>
: <?php 
                echo $lead["transaction_id"];
                ?>
                                            <br/><br/>
                                            <?php 
            }
            if (strlen($lead["payment_amount"]) > 0) {
                echo $lead["transaction_type"] == 1 ? __("Payment Amount", "gravityforms") : __("Subscription Amount", "gravityforms");
                ?>
: <?php 
                echo GFCommon::to_money($lead["payment_amount"], $lead["currency"]);
                ?>
                                            <br/><br/>
                                            <?php 
            }
        }
        do_action("gform_entry_info", $form["id"], $lead);
        ?>
                                </div>
                                <div id="major-publishing-actions">
                                    <div>
                                        <?php 
        switch ($lead["status"]) {
            case "spam":
                if (GFCommon::has_akismet()) {
                    ?>
                                                    <a onclick="jQuery('#action').val('unspam'); jQuery('#entry_form').submit()" href="#"><?php 
                    _e("Not Spam", "gravityforms");
                    ?>
</a>
                                                    <?php 
                    echo GFCommon::current_user_can_any("gravityforms_delete_entries") ? "|" : "";
                }
                if (GFCommon::current_user_can_any("gravityforms_delete_entries")) {
                    ?>
                                                    <a class="submitdelete deletion" onclick="if ( confirm('<?php 
                    _e("You are about to delete this entry. \\'Cancel\\' to stop, \\'OK\\' to delete.", "gravityforms");
                    ?>
') ) {jQuery('#action').val('delete'); jQuery('#entry_form').submit(); return true;} return false;" href="#"><?php 
                    _e("Delete Permanently", "gravityforms");
                    ?>
</a>
                                                    <?php 
                }
                break;
            case "trash":
                ?>
                                                <a onclick="jQuery('#action').val('restore'); jQuery('#entry_form').submit()" href="#"><?php 
                _e("Restore", "gravityforms");
                ?>
</a>
                                                <?php 
                if (GFCommon::current_user_can_any("gravityforms_delete_entries")) {
                    ?>
                                                    |
                                                    <a class="submitdelete deletion" onclick="if ( confirm('<?php 
                    _e("You are about to delete this entry. \\'Cancel\\' to stop, \\'OK\\' to delete.", "gravityforms");
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:67,代码来源:entry_detail.php


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