This file contains 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 to your functions.php file | |
* | |
* Note: this does the same thing as searching for "GravityView.co" in the plugins search box! | |
*/ | |
add_filter( 'views_plugins', function( $views = array() ) { | |
$link = esc_html__( 'GravityView Plugins', 'gravityview' ); |
This file contains 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( 'gravityview/calendar/events', 'gv_calendar_process_field_value_shortcode' ); | |
/** | |
* Sometimes field values contain shortcodes you want to process. This does that. | |
* | |
* @param array $events Array of events to display on the calendar. | |
* | |
* @return array $events, but with `title` and `description` keys processed. |
This file contains 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 Promotion Method to AffiliateWP affiliates table columns | |
* | |
* @since December 3, 2020 | |
* | |
* @param array $prepared_columns Prepared columns. | |
* @param array $columns The columns for this list table. | |
* @param \AffWP_Affiliates_Table $this List table instance. |
This file contains 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 the fields shown for entry revisions for Form #17 | |
* | |
* @param array $ignored_keys Array of entry meta keys and field IDs to not display in the diff, for example [ 'id', 'date_updated', '1.2' ]. | |
* @param array $form Gravity Forms form array. | |
* | |
* @returns array $ignored_keys with added fields to ignore. | |
*/ |
This file contains 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 | |
/** | |
* Remove GravityView actions from the Bulk Actions menu | |
*/ | |
add_filter( 'gravityview/approve_entries/bulk_actions', '__return_empty_array' ); |
This file contains 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( 'edd_sl_is_site_active', 'your_namespace_is_site_active_auto_activate_site', 10, 3 ); | |
/** | |
* Allow active licenses to get updates if they're not at the limit, no matter what. | |
* | |
* @param false $is_active | |
* @param int $license_id | |
* @param string $passed_site_url |
This file contains 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 | |
// Run after 10 priority to make sure all the fields are added | |
add_filter( 'gravityview_template_field_options', 'gv_modify_field_setting_defaults', 20, 6 ); | |
/** | |
* Always check "Show Label" and "Visible to Logged-in Viewers" field settings | |
* | |
* @param array $field_options Array of field options with `label`, `value`, `type`, `default` keys | |
* @param string $template_id Table slug |
This file contains 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 code below to your functions.php file. Will be included in GravityView 2.9 release. | |
add_action( 'gravityflow_post_process_workflow', 'gv_clear_cache_after_workflow', 10, 4 ); | |
/** | |
* Clears GravityView entry cache after running a Gravity Flow Workflow | |
* | |
* Thanks to @CodenomadIndia for improved code! |
This file contains 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 the action of the Search Bar form to navigate to #site-content anchor after search | |
* | |
* @param string $url Where the form submits to. | |
* | |
* @returns string Modified URL with anchor added | |
*/ | |
add_filter( 'gravityview/widget/search/form/action', function ( $url ) { |
This file contains 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 // DO NOT COPY THIS LINE | |
/** | |
* Remove the time from being displayed on a GravityView calendar | |
* | |
* @see https://docs.gravityview.co/category/647-calendar | |
* | |
* @param array $calendar_options Array of FullCalendar options | |
* | |
* @return mixed |