Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Use filter to change paging navigation for Google Calendar Events WordPress Plugin
<?php
/**
* Two different examples of how to use the filters
* Prev Link filter: gce_prev_text
* Next Link filter: gce_next_text
*/
/***** EXAMPLE #1 ***********/
// EXAMPLE #1 - Add angle quotes before the text - "<< Prev"
function change_gce_prev( $prev ) {
return '&laquo; ' . $prev;
}
add_filter( 'gce_prev_text', 'change_gce_prev' );
// EXAMPLE #1 - Add angle quotes after the text - "Next >>"
function change_gce_next( $next ) {
return $next . ' &raquo;';
}
add_filter( 'gce_next_text', 'change_gce_next' );
/***** EXAMPLE #2 ***********/
// EXAMPLE #2 - Change 'Previous' to 'Past'
function change_gce_prev( $prev ) {
return 'Past';
}
add_filter( 'gce_prev_text', 'change_gce_prev' );
// EXAMPLE #2 - Change 'Next' to 'Future'
function change_gce_next( $next ) {
return 'Future';
}
add_filter( 'gce_next_text', 'change_gce_next' );

joshbiz commented Nov 21, 2014

Thank you. The filter technique worked fine. Good luck with the more major issue.
Great plug-in. Best wishes for the future development.
Here's our implementation: http://www.holtchurch.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment