Advertisement
tara2

Code for Josh to see__EE changing default text

Jun 20th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. FORUM THREAD for this issue:
  2. http://eventespresso.com/topic/where-can-i-find-this-page-to-edit-the-text-please/#post-49948
  3. ____________________________________
  4.  
  5.  
  6. <?php
  7. /* By taking advantage of hooks, filters, and the Custom Loop API, you can make Thesis
  8. * do ANYTHING you want. For more information, please see the following articles from
  9. * the Thesis User’s Guide or visit the members-only Thesis Support Forums:
  10. *
  11. * Hooks: http://diythemes.com/thesis/rtfm/customizing-with-hooks/
  12. * Filters: http://diythemes.com/thesis/rtfm/customizing-with-filters/
  13. * Custom Loop API: http://diythemes.com/thesis/rtfm/custom-loop-api/
  14.  
  15. ---:[ place your custom code below this line ]:---*/
  16.  
  17. //Load admin area
  18. require_once('admin/functions.php');
  19.  
  20. //Load custom files
  21. require_once('custom_scripts.php');
  22. require_once('custom_menus.php');
  23.  
  24. //Load content
  25. require_once('content/overall_html.php');
  26.  
  27. require_once('content/content_box.php');
  28. require_once('content/footer.php');
  29. require_once('content/page_nav.php');
  30.  
  31. //Widgets
  32. require_once('widgets/category_list_widget.php');
  33. require_once('widgets/social_media_widget.php');
  34.  
  35. //Default remove actions
  36. remove_action('thesis_hook_footer','thesis_attribution');
  37.  
  38.  
  39. /* --My Editing-- */
  40. /* This is for changing event esspresso text such as: Members only event */
  41.  
  42. function mycustom_filter_gettext( $translated, $original, $domain ) {
  43.  
  44. // This is an array of original strings
  45. // and what they should be replaced with
  46. $strings = array(
  47. /* 'Register' => 'Sign up', */
  48. /* 'Confirm and go to payment page' => 'Complete registration', */
  49.  
  50. 'Member Only Event' => 'This is a Member Only Event. Please login or, if you have not yet registered with this website, please do that <a href="http://bridale-architectural-antiques.co.uk/yep_3/membership/" target="_blank">here (it's free to join) </a>',
  51.  
  52.  
  53. // Add some more strings here
  54. );
  55.  
  56. // See if the current string is in the $strings array
  57. // If so, replace it's translation
  58. if ( isset( $strings[$original] ) ) {
  59. // This accomplishes the same thing as __()
  60. // but without running it through the filter again
  61. $translations = &get_translations_for_domain( $domain );
  62. $translated = $translations->translate( $strings[$original] );
  63. }
  64.  
  65. return $translated;
  66. }
  67.  
  68. add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement