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 | |
/** | |
* Change the start day to something other than the WordPress settings. | |
* | |
* The value must be a number that represents the day of the week. | |
* Sunday=0, Monday=1, Tuesday=2, etc. | |
* | |
* @param array $calendar_options Calendar options | |
* @param int $form_id Form ID |
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 | |
/** | |
* Change the start day to something other than the WordPress settings. | |
* | |
* The value must be a number that represents the day of the week. | |
* Sunday=0, Monday=1, Tuesday=2, etc. | |
* | |
* @param array $calendar_options Calendar options | |
* @param int $form_id Form ID |
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 | |
/** | |
* Reset all Gravity Flow workflow statuses for a duplicated entry after duplicating in GravityView. | |
* | |
* @param array $duplicated_entry The duplicated entry | |
*/ | |
add_action( 'gravityview/duplicate-entry/duplicated', function( $duplicated_entry ) { | |
if ( ! class_exists( 'Gravity_Flow_API' ) ) { |
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 | |
$entries_url = 'https://try.gravityview.co/demo/wp-json/gravityview/v1/views/148/entries.json'; | |
$nonce = wp_create_nonce( 'wp_rest' ); | |
?> | |
<script type="text/javascript"> | |
jQuery.ajax( { | |
url: <?php echo json_encode( $entries_url ); ?>, | |
method: 'GET', | |
beforeSend: function ( xhr ) { | |
xhr.setRequestHeader( 'X-WP-Nonce', <?php echo json_encode( $nonce ); ?> ); |
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 | |
/** | |
* Return strict "is" comparison operator when processing a search on a specific View and field. | |
* | |
* @param string $operator Existing search operator | |
* @param array $filter array with `key`, `value`, `operator`, `type` keys | |
* @param \GV\View $view The View we're operating on. | |
* | |
* @return string |
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/edit_entry/form_fields', 'gravityview_edit_entry_mark_fields_visible' ); | |
/** | |
* Remove the "required" setting from Gravity Forms fields in GravityView Edit Entry | |
* | |
* @return GF_Field[] | |
*/ | |
function gravityview_edit_entry_mark_fields_visible( $fields ) { |
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 | |
/** | |
* This is as shown in the video here: https://www.loom.com/share/68f01c9661264f30bb43e9f5346c7b83 | |
*/ | |
/** | |
* @param \GravityView_Widget_Search $search_obj GravityView Widget instance | |
*/ | |
add_action( 'gravityview_search_widget_fields_before', function( $search_obj ) { |
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 | |
/** | |
* Removes plugin iconset so that only theme icons remain. | |
* | |
* @param array $icons Associative array of icon URLs with `plugin` and `theme` keys. | |
*/ | |
add_filter( 'gravityview/maps/available_icons/icons', function( $icons = array() ) { | |
$icons['plugin'] = 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
[gvlogic if="{Star Rating:1}" is="Terrible"] | |
⭐️ | |
[else if="{Star Rating:1}" is="Not so great"] | |
⭐️⭐️ | |
[else if="{Star Rating:1}" is="Neutral"] | |
⭐️⭐️⭐️ | |
[else if="{Star Rating:1}" is="Pretty good"] | |
⭐️⭐️⭐️⭐️ | |
[else if="{Star Rating:1}" is="Excellent"] | |
⭐️⭐️⭐️⭐️⭐️ |