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 | |
/* Rename the CSV filename.*/ | |
add_filter('gravityview/datatables/button_csv','gravityview_csv_export_settings', 10 ,2); | |
function gravityview_csv_export_settings( $button_config = array(), $view_id){ | |
if($view_id==19)/* You must pass a Valid View ID here for this to work*/ | |
{ | |
$button_config['filename'] = 'my_csv'; /*please change 'my_csv' to your preffered filename*/ | |
return $button_config; | |
} | |
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_entry_slug', 'change_the_gravityview_entry_slug'); | |
/** | |
* Change the /123/ URL piece to /myslug/ | |
* @param string $slug Previous slug, default: "entryId" | |
* @return string Change the new endpoint to "myslug" | |
*/ | |
function change_the_gravityview_entry_slug( $slug ) { | |
return 'myslug'; | |
} |
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 //MAKE SURE TO REMOVE THIS WHOLE LINE FIRST | |
add_filter( 'gravityview/template/text/no_entries', 'modify_gravityview_no_entries_text', 10, 3 ); | |
function modify_gravityview_no_entries_text( $existing_text, $is_search = false, $context = null ) { | |
$view_id = $context->view->ID; | |
if($view_id == 8) //Change this number to your View ID | |
{ | |
if( $is_search ) { | |
$return = 'Your search came up empty! [Use your own new search text]'; | |
} else { | |
$return = "There just aren't any results! [Use your own text]"; |