Advertisement
StevenDuque

Wordpress Geodirectory Compatibility Plugin with KLEO Theme

Feb 11th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: GeoDirectory - Compatibility Plugin with KLEO Theme
  4. Plugin URI: n/a
  5. Description: This plugin integrates Geodirectory with the KLEO Wordpress Theme
  6. Version: 1.0.0
  7. Author: Steven Duque
  8. Author URI: http://stevenduque.com
  9.  
  10. */
  11.  
  12. // BECAUSE THIS PLUGIN IS CALLED BEFORE GD WE MUST CALL THIS PLUGIN ONCE GD LOADS
  13. add_action( 'plugins_loaded', 'geodir_mytheme_action_calls', 10 );
  14. function geodir_mytheme_action_calls(){
  15.  
  16. /* ACTIONS
  17. ****************************************************************************************/
  18.  
  19. // WRAPPER OPEN ACTIONS
  20. remove_action( 'geodir_wrapper_open', 'geodir_action_wrapper_open', 10 );
  21. add_action( 'geodir_wrapper_open', 'geodir_mytheme_action_wrapper_open', 9 );
  22.  
  23. // WRAPPER CLOSE ACTIONS
  24. remove_action( 'geodir_wrapper_close', 'geodir_action_wrapper_close', 10);
  25. add_action( 'geodir_wrapper_close', 'geodir_mytheme_action_wrapper_close', 11);
  26.  
  27. // WRAPPER CONTENT OPEN ACTIONS
  28. remove_action( 'geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10 );
  29. add_action( 'geodir_wrapper_content_open', 'geodir_mytheme_action_wrapper_content_open', 9, 3 );
  30.  
  31. // WRAPPER CONTENT CLOSE ACTIONS
  32. remove_action( 'geodir_wrapper_content_close', 'geodir_action_wrapper_content_close', 10);
  33. add_action( 'geodir_wrapper_content_close', 'geodir_mytheme_action_wrapper_content_close', 11);
  34.  
  35. // SIDEBAR RIGHT OPEN ACTIONS
  36. remove_action( 'geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10 );
  37. add_action( 'geodir_sidebar_right_open', 'geodir_mytheme_action_sidebar_right_open', 10, 4 );
  38.  
  39. // SIDEBAR RIGHT CLOSE ACTIONS
  40. remove_action( 'geodir_sidebar_right_close', 'geodir_action_sidebar_right_close', 10 );
  41. add_action( 'geodir_sidebar_right_close', 'geodir_mytheme_action_sidebar_right_close', 10, 1 );
  42.  
  43.  
  44. } // Close geodir_mytheme_action_calls
  45.  
  46. /* FUNCTIONS
  47. ****************************************************************************************/
  48.  
  49. // WRAPPER OPEN FUNCTIONS
  50. function geodir_mytheme_action_wrapper_open() {
  51. echo '<div id="my-outer-wrapper">';
  52. }
  53.  
  54. // WRAPPER CLOSE FUNCTIONS
  55. function geodir_mytheme_action_wrapper_close() {
  56. echo '</div>';
  57. }
  58.  
  59. // WRAPPER CONTENT OPEN FUNCTIONS
  60. function geodir_mytheme_action_wrapper_content_open($type='',$id='',$class='') {
  61. echo '<div class="my-content-wrapper">';
  62. }
  63.  
  64. // WRAPPER CONTENT CLOSE FUNCTIONS
  65. function geodir_mytheme_action_wrapper_content_close() {
  66. echo '</div>';
  67. }
  68.  
  69. // SIDEBAR RIGHT OPEN FUNCTIONS
  70. function geodir_mytheme_action_sidebar_right_open($type='',$id='',$class='',$itemtype='') {
  71. echo '<aside id="my-sidebar-wrapper">';
  72. }
  73.  
  74. // SIDEBAR RIGHT CLOSE FUNCTIONS
  75. function geodir_mytheme_action_sidebar_right_close($type='') {
  76. echo '</aside>';
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement