Changeset 2384265
- Timestamp:
- 09/18/2020 08:13:59 AM (6 years ago)
- Location:
- dial-voyants
- Files:
-
- 4 edited
-
tags/1.8/core/DialApi.php (modified) (1 diff)
-
tags/1.8/dial-voyants.php (modified) (2 diffs)
-
trunk/core/DialApi.php (modified) (1 diff)
-
trunk/dial-voyants.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dial-voyants/tags/1.8/core/DialApi.php
r2363951 r2384265 42 42 $voyants = $this->ListConsultants($opts); 43 43 foreach ($voyants as $voyant){ 44 if( strtoupper($voyant->nom) === strtoupper($voyant_name)){44 if($voyant->nom === $voyant_name){ 45 45 $actual_voyant = $voyant; 46 46 break; -
dial-voyants/tags/1.8/dial-voyants.php
r2383752 r2384265 146 146 if(is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' )){ 147 147 148 add_filter('wpseo_metadesc', function($description) use ($voyant_description){ 149 150 $description = wp_trim_words(mb_convert_encoding($voyant_description, "UTF-8", "HTML-ENTITIES"),25,'...'); 148 add_filter('wpseo_metadesc', function($description) use ($voyant_description,$voyant_name){ 149 if($voyant_description){ 150 $description = wp_trim_words(mb_convert_encoding($voyant_description, "UTF-8", "HTML-ENTITIES"),25,'...'); 151 152 }else{ 153 $description = " Cabinet ".get_bloginfo('name')." : Consultation de voyance par telephone avec".$voyant_name; 154 } 151 155 return $description; 152 156 }); 153 157 154 add_filter('wpseo_title', function ($title) use ($voyant_name) { 155 return 'voyance par téléphone avec ' .$voyant_name." | ".get_bloginfo('name'); 158 159 add_filter('wpseo_title', function () use ($voyant_name) { 160 if(get_query_var('lang')=='be'){ 161 $title = "Voyance par téléphone depuis la Belgique avec ".$voyant_name; 162 }else if(get_query_var('lang')=='su'){ 163 $title = "Voyance par téléphone depuis la Suisse avec ".$voyant_name; 164 165 }else{ 166 $title = "Voyance par téléphone avec ".$voyant_name; 167 } 168 return $title; 156 169 157 170 }); … … 159 172 160 173 }else{ 161 add_filter( 'pre_get_document_title', function ( $title ) use ($voyant_name) { 162 return 'voyance par téléphone avec '.$voyant_name; 174 add_filter( 'pre_get_document_title', function () use ($voyant_name) { 175 if(get_query_var('lang')=='be'){ 176 $title = "Voyance par téléphone depuis la Belgique avec ".$voyant_name; 177 }else if(get_query_var('lang')=='su'){ 178 $title = "Voyance par téléphone depuis la Suisse avec ".$voyant_name; 179 180 }else{ 181 $title = "Voyance par téléphone avec ".$voyant_name; 182 } 183 return $title; 163 184 }, 10 ); 164 185 } -
dial-voyants/trunk/core/DialApi.php
r2363951 r2384265 42 42 $voyants = $this->ListConsultants($opts); 43 43 foreach ($voyants as $voyant){ 44 if( strtoupper($voyant->nom) === strtoupper($voyant_name)){44 if($voyant->nom === $voyant_name){ 45 45 $actual_voyant = $voyant; 46 46 break; -
dial-voyants/trunk/dial-voyants.php
r2383752 r2384265 146 146 if(is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' )){ 147 147 148 add_filter('wpseo_metadesc', function($description) use ($voyant_description){ 149 150 $description = wp_trim_words(mb_convert_encoding($voyant_description, "UTF-8", "HTML-ENTITIES"),25,'...'); 148 add_filter('wpseo_metadesc', function($description) use ($voyant_description,$voyant_name){ 149 if($voyant_description){ 150 $description = wp_trim_words(mb_convert_encoding($voyant_description, "UTF-8", "HTML-ENTITIES"),25,'...'); 151 152 }else{ 153 $description = " Cabinet ".get_bloginfo('name')." : Consultation de voyance par telephone avec".$voyant_name; 154 } 151 155 return $description; 152 156 }); 153 157 154 add_filter('wpseo_title', function ($title) use ($voyant_name) { 155 return 'voyance par téléphone avec ' .$voyant_name." | ".get_bloginfo('name'); 158 159 add_filter('wpseo_title', function () use ($voyant_name) { 160 if(get_query_var('lang')=='be'){ 161 $title = "Voyance par téléphone depuis la Belgique avec ".$voyant_name; 162 }else if(get_query_var('lang')=='su'){ 163 $title = "Voyance par téléphone depuis la Suisse avec ".$voyant_name; 164 165 }else{ 166 $title = "Voyance par téléphone avec ".$voyant_name; 167 } 168 return $title; 156 169 157 170 }); … … 159 172 160 173 }else{ 161 add_filter( 'pre_get_document_title', function ( $title ) use ($voyant_name) { 162 return 'voyance par téléphone avec '.$voyant_name; 174 add_filter( 'pre_get_document_title', function () use ($voyant_name) { 175 if(get_query_var('lang')=='be'){ 176 $title = "Voyance par téléphone depuis la Belgique avec ".$voyant_name; 177 }else if(get_query_var('lang')=='su'){ 178 $title = "Voyance par téléphone depuis la Suisse avec ".$voyant_name; 179 180 }else{ 181 $title = "Voyance par téléphone avec ".$voyant_name; 182 } 183 return $title; 163 184 }, 10 ); 164 185 }
Note: See TracChangeset
for help on using the changeset viewer.