Changeset 1731185
- Timestamp:
- 09/17/2017 02:49:02 PM (9 years ago)
- File:
-
- 1 edited
-
exposify/trunk/public.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
exposify/trunk/public.php
r1703948 r1731185 21 21 $this->exposify = new Exposify($apiKey, $baseUrl); 22 22 23 add_filter('the_content', [$this, 'changePageContent']); 24 add_filter('page_template', [$this, 'changePageTemplate']); 25 add_action('wp_enqueue_scripts', [$this, 'insertLinks']); 23 add_filter('the_content', [$this, 'changePageContent']); 24 add_filter('page_template', [$this, 'changePageTemplate']); 25 add_action('wp_enqueue_scripts', [$this, 'insertLinks']); 26 add_filter('the_title', [$this, 'changePageTitle']); 27 add_filter('pre_get_document_title', [$this, 'changeSiteTitle']); 26 28 } 27 29 … … 87 89 { 88 90 if ( 91 !get_query_var('slug') || 89 92 get_the_ID() != get_option('exposify_properties_page_id') || 90 93 !in_the_loop() … … 96 99 97 100 return $this->exposify->html->getTitle(); 101 } 102 103 /** 104 * Change the site title to the property name. 105 * 106 * @param string $oldTitle 107 * @return string 108 */ 109 public function changeSiteTitle($oldTitle) 110 { 111 if (get_query_var('slug')) { 112 $this->attemptRequest(); 113 return $this->exposify->html->getTitle(); 114 } 115 116 return $oldTitle; 98 117 } 99 118
Note: See TracChangeset
for help on using the changeset viewer.