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 | |
| /** | |
| * GravityView - Filter Entry Notes by Gravity Flow Assignee. | |
| * @license https://opensource.org/license/gpl-2-0/ GPL-2.0 | |
| */ | |
| apply_filters( 'gravityview/entry_notes/get_notes', 'filter_gravityview_notes_by_gravity_flow_assignee', 10, 2 ); | |
| /** | |
| * Filter the notes by Gravity Flow assignee. |
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 // DO NOT COPY THIS LINE | |
| add_filter( 'gravityview/entry_notes/get_notes', 'gv_remove_entry_approval_notes', 10, 2 ); | |
| function gv_remove_entry_approval_notes( $notes, $entry_id ) { | |
| foreach($notes as $key => $note){ | |
| if (strpos( $note->value, 'WordPress') !== false){ | |
| unset( $notes[ $key] ); | |
| } | |
| } | |
| return $notes; |
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 | |
| /** | |
| * Prevent Divi from using the "Grab the first post image" setting. | |
| * | |
| * It uses et_first_image() which uses apply_filters( 'the_content' ) which causes | |
| * a conflict GravityView, which uses 'the_content' filter. | |
| * | |
| * @param bool $setting Is the setting enabled and the request is not Buddypress? | |
| * |
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 | |
| /** | |
| * This is an example of modifying the appearance of a cell in DataTables based on the value. | |
| * | |
| * DO NOT USE THIS CODE WITHOUT MODIFICATION. | |
| * | |
| * @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later | |
| * | |
| * @param array $row The entry row HTML to be rendered in DataTables. |
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
| /** | |
| * Remove the ability of a user to import entries based on their role. | |
| * | |
| * @param array $caps Array of capabilities required to display the UI. | |
| * | |
| * @return array | |
| */ | |
| add_filter( 'gravityview/import/capabilities', function ( $caps ) { | |
| // REPLACE THIS with the role you want to exclude from importing entries. |
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 // DO NOT COPY THIS LINE!!!!! | |
| add_filter( 'gravityview_datatables_js_options', 'gv_dt_disable_paging_search_and_length_menus', 10, 3 ); | |
| /** | |
| * Remove the page length, pagination menus, and search field from DataTables | |
| * @param array $dt_config DataTables options | |
| * @param int $view_id View ID | |
| * @param WP_Post $post Current WordPress post object | |
| * |
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( 'gravityview/entry_notes/get_notes', function( $notes ) { | |
| if ( ! $notes ) { | |
| return $notes; | |
| } | |
| return array_reverse( $notes, 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 | |
| add_filter( 'gravityview_datatables_js_options', 'gv_dt_prevent_state_save', 10, 3 ); | |
| /** | |
| * Prevent DataTables from saving state between page loads. | |
| * @param array $dt_config DataTables options | |
| * @param int $view_id View ID | |
| * @param WP_Post $post Current WordPress post object |
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 | |
| // Shortcode for Site URL - Use [site_url] for Shortcode | |
| add_action( 'init', function() { | |
| add_shortcode( 'site_url', function( $atts = null, $content = null ) { | |
| return site_url(); | |
| } ); | |
| } ); |