Changeset 2475610
- Timestamp:
- 02/16/2021 02:15:01 PM (5 years ago)
- Location:
- hyperise-opengraph-tags/trunk
- Files:
-
- 2 edited
-
hyperise-opengraph-tags.php (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hyperise-opengraph-tags/trunk/hyperise-opengraph-tags.php
r2439687 r2475610 3 3 * Plugin Name: HYPERISE Website Personalisation and OpenGraph personalised link previews 4 4 * Description: The plugin provides a simple way to add the Hyperise snippet to your website and start personalising your website. This plugin leverages Hyperise.com dynamic images to display personalised images in the preview pane, when you share a link with the utm_hyperef parameter added. Facebook OG tags into your blog's single posts which include Blog Title, Post Title, Description and Dynamic Image (if available). 5 * Version: 2. 55 * Version: 2.6 6 6 * Author: HYPERISE 7 7 * Author URI: https://hyperise.com … … 151 151 152 152 if(strlen($meta_title)>0){ 153 $page_title = $meta_title;153 $page_title = $meta_title; 154 154 }else{ 155 $page_title = $post->post_title;155 $page_title = $post->post_title; 156 156 } 157 157 … … 208 208 209 209 $EnrichedData->utm_hyperef=$utm_hyperef; 210 }else{ 211 $EnrichedData->m_meta_snippet=get_option( 'hyperise-snippet' ); 210 212 } 211 213 return $EnrichedData; … … 215 217 216 218 function hyperise_opengraphsingle(){ 217 global $post,$EnrichedData;219 global $post,$EnrichedData; 218 220 219 221 if($EnrichedData->m_meta_title == '') { … … 221 223 } 222 224 223 echo $EnrichedData->m_meta_snippet; 225 echo "<!-- HR-2.6: -->"; 226 echo $EnrichedData->m_meta_snippet; 224 227 225 228 if ( is_single() || is_page() ) { … … 227 230 if (isset($_GET['utm_hyperef']) || isset($_GET['email'])) { 228 231 229 //Replace the page content personalisation tags with enriched data... 230 $content = $post->post_content; 231 $post->post_content=str_replace("{{utm_hyperef}}",$EnrichedData->utm_hyperef,$post->post_content); 232 $post->post_content=str_replace("{{email}}",$EnrichedData->email,$post->post_content); 233 $post->post_content=str_replace("{{first_name}}",$EnrichedData->first_name,$post->post_content); 234 $post->post_content=str_replace("{{last_name}}",$EnrichedData->last_name,$post->post_content); 235 $post->post_content=str_replace("{{profile_image}}",$EnrichedData->profile_url,$post->post_content); 236 $post->post_content=str_replace("{{job_title}}",$EnrichedData->job_title,$post->post_content); 237 $post->post_content=str_replace("{{business_name}}",$EnrichedData->business_name,$post->post_content); 238 $post->post_content=str_replace("{{business_industry}}",$EnrichedData->business_industry,$post->post_content); 239 $post->post_content=str_replace("{{business_address}}",$EnrichedData->business_address,$post->post_content); 240 $post->post_content=str_replace("{{business_lat}}",$EnrichedData->business_lat,$post->post_content); 241 $post->post_content=str_replace("{{business_long}}",$EnrichedData->business_long,$post->post_content); 242 $post->post_content=str_replace("{{business_phone}}",$EnrichedData->business_phone,$post->post_content); 243 $post->post_content=str_replace("{{logo}}",$EnrichedData->logo_url,$post->post_content); 244 $post->post_content=str_replace("{{website}}",$EnrichedData->website,$post->post_content); 245 $post->post_content=str_replace("{{website_screenshot}}",$EnrichedData->website_screenshot,$post->post_content); 232 //Replace the page content personalisation tags with enriched data... 233 $content = $post->post_content; 234 $post->post_content=str_replace("{{utm_hyperef}}",$EnrichedData->utm_hyperef,$post->post_content); 235 $post->post_content=str_replace("{{email}}",$EnrichedData->email,$post->post_content); 236 $post->post_content=str_replace("{{first_name}}",$EnrichedData->first_name,$post->post_content); 237 $post->post_content=str_replace("{{last_name}}",$EnrichedData->last_name,$post->post_content); 238 $post->post_content=str_replace("{{profile_image}}",$EnrichedData->profile_url,$post->post_content); 239 $post->post_content=str_replace("{{job_title}}",$EnrichedData->job_title,$post->post_content); 240 $post->post_content=str_replace("{{business_name}}",$EnrichedData->business_name,$post->post_content); 241 $post->post_content=str_replace("{{business_industry}}",$EnrichedData->business_industry,$post->post_content); 242 $post->post_content=str_replace("{{business_address}}",$EnrichedData->business_address,$post->post_content); 243 $post->post_content=str_replace("{{business_lat}}",$EnrichedData->business_lat,$post->post_content); 244 $post->post_content=str_replace("{{business_long}}",$EnrichedData->business_long,$post->post_content); 245 $post->post_content=str_replace("{{business_phone}}",$EnrichedData->business_phone,$post->post_content); 246 $post->post_content=str_replace("{{logo}}",$EnrichedData->logo_url,$post->post_content); 247 $post->post_content=str_replace("{{website}}",$EnrichedData->website,$post->post_content); 248 $post->post_content=str_replace("{{website_screenshot}}",$EnrichedData->website_screenshot,$post->post_content); 249 250 $post->post_content=str_replace("{{custom_image_1}}",$EnrichedData->custom_image_1,$post->post_content); 251 $post->post_content=str_replace("{{custom_image_2}}",$EnrichedData->custom_image_2,$post->post_content); 252 $post->post_content=str_replace("{{custom_image_3}}",$EnrichedData->custom_image_3,$post->post_content); 246 253 247 $post->post_content=str_replace("{{custom_image_1}}",$EnrichedData->custom_image_1,$post->post_content); 248 $post->post_content=str_replace("{{custom_image_2}}",$EnrichedData->custom_image_2,$post->post_content); 249 $post->post_content=str_replace("{{custom_image_3}}",$EnrichedData->custom_image_3,$post->post_content); 250 251 $post->post_content=str_replace("{{custom_text_1}}",$EnrichedData->custom_text_1,$post->post_content); 252 $post->post_content=str_replace("{{custom_text_2}}",$EnrichedData->custom_text_2,$post->post_content); 253 $post->post_content=str_replace("{{custom_text_3}}",$EnrichedData->custom_text_3,$post->post_content); 254 $post->post_content=str_replace("{{custom_text_4}}",$EnrichedData->custom_text_4,$post->post_content); 255 $post->post_content=str_replace("{{custom_text_5}}",$EnrichedData->custom_text_5,$post->post_content); 256 257 $post->post_title=$EnrichedData->m_meta_title; 258 259 ob_start(); 260 ob_end_clean(); 254 $post->post_content=str_replace("{{custom_text_1}}",$EnrichedData->custom_text_1,$post->post_content); 255 $post->post_content=str_replace("{{custom_text_2}}",$EnrichedData->custom_text_2,$post->post_content); 256 $post->post_content=str_replace("{{custom_text_3}}",$EnrichedData->custom_text_3,$post->post_content); 257 $post->post_content=str_replace("{{custom_text_4}}",$EnrichedData->custom_text_4,$post->post_content); 258 $post->post_content=str_replace("{{custom_text_5}}",$EnrichedData->custom_text_5,$post->post_content); 259 260 $post->post_title=$EnrichedData->m_meta_title; 261 262 ob_start(); 263 ob_end_clean(); 261 264 262 265 if($EnrichedData->seoInstalled <> true AND $EnrichedData->image_template<>"" AND $_GET['utm_hyperef']<>""){ … … 273 276 echo '<meta property="og:title" content="',$EnrichedData->m_meta_title,'"/>'; 274 277 echo "\n"; 275 echo '<meta property="og:description" content="',$EnrichedData->m_meta_desc,'"/>';276 echo "\n";278 echo '<meta property="og:description" content="',$EnrichedData->m_meta_desc,'"/>'; 279 echo "\n"; 277 280 echo '<meta property="og:image" content="',$EnrichedData->image_url,'"/>'; 278 281 echo "\n"; -
hyperise-opengraph-tags/trunk/readme.txt
r2439687 r2475610 1 1 === HYPERISE Website Personalisation and OpenGraph personalised link previews === 2 2 Plugin Name: HYPERISE Website Personalisation and OpenGraph personalised link previews 3 Version: 2. 53 Version: 2.6 4 4 Tags: personalisation, linkedin, facebook, hyperise, personalization, personalised, images, image, personalized, meta, og , opengraph 5 5 Author: HYPERISE 6 6 Author URI: https://hyperise.com 7 7 Requires at least: 2.9 8 Tested up to: 5. 58 Tested up to: 5.6 9 9 Stable tag: 2.5 10 10
Note: See TracChangeset
for help on using the changeset viewer.