Last active
March 8, 2017 14:25
-
-
Save elimn/df638214c7bb3b734e8e818e043d2729 to your computer and use it in GitHub Desktop.
Revisions
-
elimn revised this gist
Feb 24, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,6 @@ public function tribe_events_pro_all_link_frag( $text ) { return $this->all_link_text; } public function gettext_with_context( $text, $original, $context, $textdomain ) { if ( 'the-events-calendar' === $textdomain && -
elimn created this gist
Feb 24, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ <?php /** * Changes the recurrent events see all page to a different URL */ Class Tribe__Snippet__Change_All_Link { public $all_link_text; public function __construct( $all_text_link = 'all' ) { $this->all_link_text = $all_text_link; add_filter( 'tribe_events_pro_all_link_frag', array( $this, 'tribe_events_pro_all_link_frag' ) ); add_filter( 'gettext_with_context', array( $this, 'gettext_with_context' ), 10, 4 ); } public function tribe_events_pro_all_link_frag( $text ) { return $this->all_link_text; } public function gettext_with_context( $text, $original, $context, $textdomain ) { if ( 'the-events-calendar' === $textdomain && 'all events slug' === $context && 'all' === $original ) { $text = $this->all_link_text; } return $text; } } // Change 'alle' to the string that you want used for the recurring all page. new Tribe__Snippet__Change_All_Link( 'alle' );