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
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
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 filters to the edit entry inputs when GravityView starts to render an entry. | |
| */ | |
| add_action( 'gravityview/edit-entry/render/before', function() { | |
| // GravityView methods are run at priority 10; by running at 20, this will run after GV. | |
| add_filter( 'gform_field_content', 'gravityview_hide_empty_fields_in_edit_entry', 20, 5 ); | |
| } ); |
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 the following code to the end of your theme's functions.php file. | |
| * | |
| * Make sure it's inside the ?> if ?> is at the end of the file!!! | |
| * | |
| */ |
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 | |
| /** | |
| * Returns a pre-signed URL to access a restricted AWS S3 object. | |
| * | |
| * @param string $access_key the AWS access key | |
| * @param string $secret_key the AWS secret key associated with the access key | |
| * @param string $bucket the S3 bucket | |
| * @param string $canonical_uri the object in the S3 bucket expressed as a canonical URI. | |
| * This should begin with the / character, and should not be URL-encoded | |
| * @param int $expires the time that the pre-signed URL will expire, in seconds |
NewerOlder