This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'register_form', 'loginpress_plugin_register_form_custom_field' ); | |
| function loginpress_plugin_register_form_custom_field() { | |
| $first_name = ( ! empty( $_POST['first_name'] ) ) ? trim( $_POST['first_name'] ) : ''; | |
| $last_name = ( ! empty( $_POST['last_name'] ) ) ? trim( $_POST['last_name'] ) : ''; ?> | |
| <p> | |
| <label for="first_name"> | |
| <?php _e( 'First Name', 'loginpress' ) ?><br /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Limit Submissions Per Time Period (by IP, User, Role, Form URL, or Field Value) | |
| * | |
| * Limit the number of times a form can be submitted per a specific time period. You modify this limit to apply to | |
| * the visitor's IP address, the user's ID, the user's role, a specific form URL, or the value of a specific field. | |
| * These "limiters" can be combined to create more complex limitations. | |
| * | |
| * @version 3.0 | |
| * @author David Smith <david@gravitywiz.com> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function FixID(InID As String) As String | |
| If Len(InID) = 18 Then | |
| FixID = InID | |
| Exit Function | |
| End If | |
| Dim InChars As String, InI As Integer, InUpper As String | |
| Dim InCnt As Integer | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Multisite Plugins Activate | |
| Plugin URI: http://www.damiencarbery.com | |
| Description: List of active plugins on a Multisite installation. | |
| Author: Damien2 | |
| */ | |
| // Based on: http://wordpress.stackexchange.com/a/54782/57684 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [10-Mar-2018 16:08:01 UTC] | |
| array ( | |
| //query-monitor/query-monitor.php, | |
| //hello.php, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('gform_validation_1', 'ip_validation'); | |
| function ip_validation($validation_result){ | |
| $form = $validation_result["form"]; | |
| //validate input 9 on form 1 for valid IP | |
| if($_POST['input_9'] != filter_var($_POST['input_9'], FILTER_VALIDATE_IP)){ | |
| $validation_result["is_valid"] = false; | |
| foreach($form["fields"] as &$field){ | |
| if($field["id"] == "9"){ | |
| $field["failed_validation"] = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WARNING! THIS SNIPPET MAY BE OUTDATED. | |
| * The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
| * https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-min-and-max-character-limit.php | |
| */ | |
| /** | |
| * Gravity Wiz // Require Minimum Character Limit for Gravity Forms | |
| * | |
| * Adds support for requiring a minimum number of characters for text-based Gravity Form fields. |
The point to use a slug (semantic URL) besides of improve the SEO of your articles is to prevent that the user, at the creation of for example an article, it uses special characters that aren't allowed in a URL, appropiate the usage etc. What target usage means, is context dependent.
In this article, you'll learn how to slugify a string in PHP properly, including (or not) support (conversion) for cyrilic and special latin characters.
The following function exposes a simple way to convert text into a valid slug:
OlderNewer