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 {entry_slug} Merge Tag for GravityView | |
| * | |
| * This snippet creates a custom merge tag that outputs the GravityView entry slug. | |
| * The entry slug is used in GravityView URLs and can be customized via the | |
| * 'gravityview/entry/slug' filter. | |
| */ | |
| /** |
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 | |
| /** | |
| * Modify GravityKit log path to use WordPress uploads directory. | |
| * | |
| * @param string $log_path Default log path. | |
| * @return string Modified log path. | |
| */ | |
| add_filter( 'gk/foundation/logger/log-path', function( $log_path ) { | |
| $upload_dir = wp_upload_dir(); |
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 | |
| /** | |
| * Update ACF Google Maps field when editing entries via GravityView | |
| * | |
| * This snippet complements the GP Address Autocomplete ACF snippet: | |
| * https://gravitywiz.com/snippet-library/gpaa-acf-google-maps/ | |
| * | |
| * PROBLEM: The original GP snippet only runs when Advanced Post Creation initially | |
| * creates a post. When you edit an entry through GravityView's Edit Entry feature, | |
| * the ACF Google Maps field becomes empty because the snippet doesn't run again. |
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: EDD Refund Column | |
| * Description: Adds a “Request Refund” column to the Easy Digital Downloads purchase history table that links to a refund page with the Order ID. | |
| * Author: Your Name | |
| * Version: 1.3.0 | |
| * Requires at least: 6.0 | |
| * Requires PHP: 7.4 | |
| * License: GPL-2.0-or-later | |
| * |
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 larger-radius options for geolocation radius search. | |
| * | |
| * @param array $options Nested array. `value` key maps to the size of the radius. | |
| * | |
| * @return array Modified array of options. | |
| */ | |
| add_filter( 'gk/gravitymaps/geolocation_radius_options', function ( $options ) { |
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 | |
| /** | |
| * Always show the field label by default. | |
| * | |
| * @param array $field_options Default field options for each field in View Configuration screen. | |
| * | |
| * @return array | |
| */ | |
| add_filter( 'gravityview_template_field_options', function( $field_options ) { |
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 | |
| /** | |
| * Example of how to add a sample event source. | |
| * | |
| * @param array $sources The array of event sources. { | |
| * @type string $url The URL of the event source. | |
| * @type string $type The type of event source. Either `ics` or `json`. | |
| * @type string $color The color of the event source. | |
| * } |
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 | |
| /** | |
| * @filter `gravityview-inline-edit/jquery-ui-theme` Modify the jQuery UI theme to use, if jQuery UI editor style is active | |
| * | |
| * @since 1.0 | |
| * | |
| * @param string $jquery_ui_theme Name of jQuery UI theme to use. Default: "base" | |
| * | |
| * @see http://jqueryui.com/themeroller/#themeGallery for examples |
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 | |
| /** | |
| * Adds a CSS class for each user role. | |
| * | |
| * @param string $class The existing class. | |
| * @param \GV\Template_Context The context. | |
| * | |
| * @return string The modified class, which will be sanitized by {@see gravityview_sanitize_html_class()} after return. | |
| */ |
NewerOlder