SEOPress - Version 2.7.2

Version Description

  • NEW Add Vietnamese language (thanks to Anh)
  • NEW Add seopress_titles_canonical hook to filter canonical URL tag
  • NEW Add seopress_social_og_title hook to filter OG title tag
  • NEW Add seopress_social_og_desc hook to filter OG description tag
  • NEW Add seopress_social_og_thumb hook to filter OG thumbnail tag
  • NEW Add seopress_social_og_url hook to filter OG URL tag
  • NEW Add seopress_social_og_site_name hook to filter OG site name tag
  • NEW Add seopress_social_og_locale hook to filter OG locale tag
  • NEW Add seopress_social_twitter_card_title hook to filter Twitter card title tag
  • NEW Add seopress_social_twitter_card_desc hook to filter Twitter card description tag
  • NEW Add seopress_social_twitter_card_thumb hook to filter Twitter card thumbnail tag
  • NEW Add seopress_social_twitter_card_summary hook to filter Twitter card summary tag
  • NEW Add seopress_social_twitter_card_site hook to filter Twitter card site tag
  • NEW Add seopress_social_twitter_card_creator hook to filter Twitter card creator tag
  • NEW Add seopress_dublin_core_title hook to filter Dublic Core title tag
  • NEW Add seopress_dublin_core_desc hook to filter Dublic Core description tag
  • NEW Add seopress_dublin_core_relation hook to filter Dublic Core relation tag
  • NEW Add seopress_dublin_core_source hook to filter Dublic Core source tag
  • INFO Remove canonical URL if noindex set
  • FIX Notice: Undefined variable: seopress_titles_title_template
  • FIX Notice: Undefined variable: seopress_titles_description_template
  • FIX Improve breadcrumbs compatibility with WooCommerce
  • FIX Dutch translation
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.7.1 to 2.7.2

contributors.txt CHANGED
@@ -22,4 +22,12 @@ Translators:
22
  - Italian: Déborah Donnier @deborahdonnier
23
  - Spanish: Rafael Salguero
24
  - German: @likemike2425
25
- - Japan: @s_tayama and @miccweb
 
 
 
 
 
 
 
 
22
  - Italian: Déborah Donnier @deborahdonnier
23
  - Spanish: Rafael Salguero
24
  - German: @likemike2425
25
+ - Japan: @s_tayama and @miccweb
26
+ - Dutch: Sebastiaan Hendriks
27
+ - Vietnamese: Anh
28
+ - Russian: @Dmitriy
29
+ - Tamil: Sankar Srinivasan
30
+ - Brazilian Portuguese: Daniel Pechmann
31
+ - Telugu: Manoj Kumar
32
+ - Indonesian: Tomtom
33
+ - Bulgarian: @ilivanov
inc/functions/options-social.php CHANGED
@@ -350,6 +350,11 @@ function seopress_social_facebook_og_url_hook() {
350
  } else {
351
  $seopress_social_og_url = '<meta property="og:url" content="'.$current_url.'" />';
352
  }
 
 
 
 
 
353
 
354
  echo $seopress_social_og_url."\n";
355
  }
@@ -362,6 +367,11 @@ function seopress_social_facebook_og_site_name_hook() {
362
 
363
  $seopress_social_og_site_name = '<meta property="og:site_name" content="'.get_bloginfo('name').'" />';
364
 
 
 
 
 
 
365
  echo $seopress_social_og_site_name."\n";
366
  }
367
  }
@@ -372,8 +382,15 @@ function seopress_social_facebook_og_locale_hook() {
372
  if (seopress_social_facebook_og_option() =='1') {
373
 
374
  $seopress_social_og_locale = '<meta property="og:locale" content="'.get_locale().'" />';
 
 
 
 
 
375
 
376
- echo $seopress_social_og_locale."\n";
 
 
377
  }
378
  }
379
  add_action( 'wp_head', 'seopress_social_facebook_og_locale_hook', 1 );
@@ -392,6 +409,10 @@ function seopress_social_facebook_og_type_hook() {
392
  $seopress_social_og_type = '<meta property="og:type" content="object" />';
393
  }
394
  if (isset($seopress_social_og_type)) {
 
 
 
 
395
  echo $seopress_social_og_type."\n";
396
  }
397
  }
@@ -421,32 +442,43 @@ function seopress_social_fb_title_home_option() {
421
  }
422
 
423
  function seopress_social_fb_title_hook() {
 
 
 
424
  if (is_home()) {
425
  if (seopress_social_fb_title_home_option() !='') {
426
- echo '<meta property="og:title" content="'.seopress_social_fb_title_home_option().'" />';
427
- echo "\n";
428
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
429
- echo '<meta property="og:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
430
- echo "\n";
431
  }
432
  } elseif (is_tax() || is_category() || is_tag()) {
433
  if (seopress_social_fb_title_term_option() !='') {
434
- echo '<meta property="og:title" content="'.seopress_social_fb_title_term_option().'" />';
435
- echo "\n";
436
  } else {
437
- echo '<meta property="og:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
438
- echo "\n";
439
  }
440
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_title_post_option() !='') {
441
- echo '<meta property="og:title" content="'.seopress_social_fb_title_post_option().'" />';
442
- echo "\n";
443
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
444
- echo '<meta property="og:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
445
- echo "\n";
446
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_title() !='') {
447
- echo '<meta property="og:title" content="'.the_title_attribute('echo=0').'" />';
448
- echo "\n";
449
  }
 
 
 
 
 
 
 
 
450
  }
451
  add_action( 'wp_head', 'seopress_social_fb_title_hook', 1 );
452
 
@@ -474,33 +506,44 @@ function seopress_social_fb_desc_home_option() {
474
 
475
  function seopress_social_fb_desc_hook() {
476
  global $post;
 
 
 
477
  setup_postdata( $post );
478
  if (is_home()) {
479
  if (seopress_social_fb_desc_home_option() !='') {
480
- echo '<meta property="og:description" content="'.seopress_social_fb_desc_home_option().'" />';
481
- echo "\n";
482
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
483
- echo '<meta property="og:description" content="'.seopress_titles_the_description_content().'" />';
484
- echo "\n";
485
  }
486
  } elseif (is_tax() || is_category() || is_tag()) {
487
  if (seopress_social_fb_desc_term_option() !='') {
488
- echo '<meta property="og:description" content="'.seopress_social_fb_desc_term_option().'" />';
489
- echo "\n";
490
  } elseif (term_description() !='') {
491
- echo '<meta property="og:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
492
- echo "\n";
493
  }
494
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_desc_post_option() !='') {
495
- echo '<meta property="og:description" content="'.seopress_social_fb_desc_post_option().'" />';
496
- echo "\n";
497
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
498
- echo '<meta property="og:description" content="'.seopress_titles_the_description_content().'" />';
499
- echo "\n";
500
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_excerpt() !='') {
501
- echo '<meta property="og:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
502
- echo "\n";
503
- }
 
 
 
 
 
 
 
 
504
  }
505
  add_action( 'wp_head', 'seopress_social_fb_desc_hook', 1 );
506
 
@@ -540,24 +583,35 @@ function seopress_social_fb_img_home_option() {
540
  }
541
 
542
  function seopress_social_fb_img_hook() {
 
 
 
543
  if (is_home()) {
544
  if (seopress_social_fb_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
545
- echo '<meta property="og:image" content="'.seopress_social_fb_img_home_option().'" />';
546
- echo "\n";
547
  }
548
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_img_post_option() !='') {
549
- echo '<meta property="og:image" content="'.seopress_social_fb_img_post_option().'" />';
550
- echo "\n";
551
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && has_post_thumbnail() ) {
552
- echo '<meta property="og:image" content="'.get_the_post_thumbnail_url().'" />';
553
- echo "\n";
554
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_fb_img_term_option() !='') {
555
- echo '<meta property="og:image" content="'.seopress_social_fb_img_term_option().'" />';
556
- echo "\n";
557
  } elseif (seopress_social_facebook_og_option() =='1' && seopress_social_facebook_img_option() !='') {
558
- echo '<meta property="og:image" content="'.seopress_social_facebook_img_option().'" />';
559
- echo "\n";
560
  }
 
 
 
 
 
 
 
 
561
  }
562
  add_action( 'wp_head', 'seopress_social_fb_img_hook', 1 );
563
 
@@ -669,7 +723,10 @@ function seopress_social_twitter_card_summary_hook() {
669
  } else {
670
  $seopress_social_twitter_card_summary = '<meta name="twitter:card" content="summary" />';
671
  }
672
-
 
 
 
673
  echo $seopress_social_twitter_card_summary."\n";
674
  }
675
  }
@@ -681,6 +738,10 @@ function seopress_social_twitter_card_site_hook() {
681
 
682
  $seopress_social_twitter_card_site = '<meta name="twitter:site" content="'.seopress_social_accounts_twitter_option().'" />';
683
 
 
 
 
 
684
  echo $seopress_social_twitter_card_site."\n";
685
  }
686
  }
@@ -688,15 +749,23 @@ add_action( 'wp_head', 'seopress_social_twitter_card_site_hook', 1 );
688
 
689
  //Twitter Creator
690
  function seopress_social_twitter_card_creator_hook() {
 
 
 
691
  if (seopress_social_twitter_card_option() =='1' && get_the_author_meta('twitter') ) {
692
 
693
- $seopress_social_twitter_card_creator = '<meta name="twitter:creator" content="@'.get_the_author_meta('twitter').'" />';
694
- echo $seopress_social_twitter_card_creator."\n";
695
 
696
  } elseif (seopress_social_twitter_card_option() =='1' && seopress_social_accounts_twitter_option() !='' ) {
697
 
698
- $seopress_social_twitter_card_creator = '<meta name="twitter:creator" content="'.seopress_social_accounts_twitter_option().'" />';
699
- echo $seopress_social_twitter_card_creator."\n";
 
 
 
 
 
 
700
  }
701
  }
702
  add_action( 'wp_head', 'seopress_social_twitter_card_creator_hook', 1 );
@@ -724,61 +793,58 @@ function seopress_social_twitter_title_home_option() {
724
  }
725
 
726
  function seopress_social_twitter_title_hook() {
 
 
 
727
  if (seopress_social_twitter_card_og_option() =='1') {
728
  if (is_home()) {
729
  if (seopress_social_fb_title_home_option() !='') {
730
- echo '<meta name="twitter:title" content="'.seopress_social_fb_title_home_option().'" />';
731
- echo "\n";
732
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
733
- echo '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
734
- echo "\n";
735
  }
736
  } elseif (is_tax() || is_category() || is_tag()) {
737
  if (seopress_social_fb_title_term_option() !='') {
738
- echo '<meta name="twitter:title" content="'.seopress_social_fb_title_term_option().'" />';
739
- echo "\n";
740
  } else {
741
- echo '<meta name="twitter:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
742
- echo "\n";
743
  }
744
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_title_post_option() !='') {
745
- echo '<meta name="twitter:title" content="'.seopress_social_fb_title_post_option().'" />';
746
- echo "\n";
747
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
748
- echo '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
749
- echo "\n";
750
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_title() !='') {
751
- echo '<meta name="twitter:title" content="'.the_title_attribute('echo=0').'" />';
752
- echo "\n";
753
  }
754
  } else {
755
  if (is_home()) {
756
  if (seopress_social_twitter_title_home_option() !='') {
757
- echo '<meta name="twitter:title" content="'.seopress_social_twitter_title_home_option().'" />';
758
- echo "\n";
759
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
760
- echo '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
761
- echo "\n";
762
  }
763
  } elseif (is_tax() || is_category() || is_tag()) {
764
  if (seopress_social_twitter_title_term_option() !='') {
765
- echo '<meta name="twitter:title" content="'.seopress_social_twitter_title_term_option().'" />';
766
- echo "\n";
767
  } else {
768
- echo '<meta name="twitter:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
769
- echo "\n";
770
  }
771
  } elseif (is_singular() && seopress_social_twitter_card_option() =='1' && seopress_social_twitter_title_post_option() !='') {
772
- echo '<meta name="twitter:title" content="'.seopress_social_twitter_title_post_option().'" />';
773
- echo "\n";
774
  } elseif (seopress_social_twitter_card_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
775
- echo '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
776
- echo "\n";
777
  } elseif (seopress_social_twitter_card_option() =='1' && get_the_title() !='') {
778
- echo '<meta name="twitter:title" content="'.the_title_attribute('echo=0').'" />';
779
- echo "\n";
780
  }
781
  }
 
 
 
 
 
 
 
 
782
  }
783
  add_action( 'wp_head', 'seopress_social_twitter_title_hook', 1 );
784
 
@@ -807,64 +873,59 @@ function seopress_social_twitter_desc_home_option() {
807
  function seopress_social_twitter_desc_hook() {
808
  global $post;
809
  setup_postdata( $post );
 
 
810
 
811
  if (seopress_social_twitter_card_og_option() =='1') {
812
  if (is_home()) {
813
  if (seopress_social_fb_desc_home_option() !='') {
814
- echo '<meta name="twitter:description" content="'.seopress_social_fb_desc_home_option().'" />';
815
- echo "\n";
816
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
817
- echo '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
818
- echo "\n";
819
  }
820
  } elseif (is_tax() || is_category() || is_tag()) {
821
  if (seopress_social_fb_desc_term_option() !='') {
822
- echo '<meta name="twitter:description" content="'.seopress_social_fb_desc_term_option().'" />';
823
- echo "\n";
824
  } elseif (term_description() !='') {
825
- echo '<meta name="twitter:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
826
- echo "\n";
827
  }
828
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_desc_post_option() !='') {
829
- echo '<meta name="twitter:description" content="'.seopress_social_fb_desc_post_option().'" />';
830
- echo "\n";
831
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
832
- echo '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
833
- echo "\n";
834
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_excerpt() !='') {
835
  setup_postdata( $post );
836
- echo '<meta name="twitter:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
837
- echo "\n";
838
  }
839
  } else {
840
  if (is_home()) {
841
  if (seopress_social_twitter_desc_home_option() !='') {
842
- echo '<meta name="twitter:description" content="'.seopress_social_twitter_desc_home_option().'" />';
843
- echo "\n";
844
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
845
- echo '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
846
- echo "\n";
847
  }
848
  } elseif (is_tax() || is_category() || is_tag()) {
849
  if (seopress_social_twitter_desc_term_option() !='') {
850
- echo '<meta name="twitter:description" content="'.seopress_social_twitter_desc_term_option().'" />';
851
- echo "\n";
852
  } elseif (term_description() !='') {
853
- echo '<meta name="twitter:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
854
- echo "\n";
855
  }
856
  } elseif (is_singular() && seopress_social_twitter_card_option() =='1' && seopress_social_twitter_desc_post_option() !='') {
857
- echo '<meta name="twitter:description" content="'.seopress_social_twitter_desc_post_option().'" />';
858
- echo "\n";
859
  } elseif (seopress_social_twitter_card_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
860
- echo '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
861
- echo "\n";
862
  } elseif (seopress_social_twitter_card_option() =='1' && get_the_excerpt() !='') {
863
  setup_postdata( $post );
864
- echo '<meta name="twitter:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
865
- echo "\n";
866
  }
867
  }
 
 
 
 
 
 
 
868
  }
869
  add_action( 'wp_head', 'seopress_social_twitter_desc_hook', 1 );
870
 
@@ -916,95 +977,85 @@ function seopress_social_twitter_img_home_option() {
916
 
917
  function seopress_social_twitter_img_hook() {
918
  if (seopress_social_twitter_card_option() =='1') {
 
 
 
919
  if (seopress_social_twitter_card_og_option() =='1') {
920
  if (is_home()) {
921
  if (seopress_social_fb_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
922
  if (seopress_social_twitter_img_size_option() =='large') {
923
- echo '<meta name="twitter:image:src" content="'.seopress_social_fb_img_home_option().'" />';
924
- echo "\n";
925
  } else {
926
- echo '<meta name="twitter:image" content="'.seopress_social_fb_img_home_option().'" />';
927
- echo "\n";
928
  }
929
  }
930
  } elseif (seopress_social_fb_img_post_option() !='' && is_singular()) {
931
  if (seopress_social_twitter_img_size_option() =='large') {
932
- echo '<meta name="twitter:image:src" content="'.seopress_social_fb_img_post_option().'" />';
933
- echo "\n";
934
  } else {
935
- echo '<meta name="twitter:image" content="'.seopress_social_fb_img_post_option().'" />';
936
- echo "\n";
937
  }
938
  } elseif (has_post_thumbnail() && is_singular()) {
939
  if (seopress_social_twitter_img_size_option() =='large') {
940
- echo '<meta name="twitter:image:src" content="'.get_the_post_thumbnail_url().'" />';
941
- echo "\n";
942
  } else {
943
- echo '<meta name="twitter:image" content="'.get_the_post_thumbnail_url().'" />';
944
- echo "\n";
945
  }
946
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_fb_img_term_option() !='') {
947
  if (seopress_social_twitter_img_size_option() =='large') {
948
- echo '<meta name="twitter:image:src" content="'.seopress_social_fb_img_term_option().'" />';
949
- echo "\n";
950
  } else {
951
- echo '<meta name="twitter:image" content="'.seopress_social_fb_img_term_option().'" />';
952
- echo "\n";
953
  }
954
  } elseif (seopress_social_facebook_img_option() !='') {
955
  if (seopress_social_twitter_img_size_option() =='large') {
956
- echo '<meta name="twitter:image:src" content="'.seopress_social_facebook_img_option().'" />';
957
- echo "\n";
958
  } else {
959
- echo '<meta name="twitter:image" content="'.seopress_social_facebook_img_option().'" />';
960
- echo "\n";
961
  }
962
  }
963
  } else {
964
  if (is_home()) {
965
  if (seopress_social_twitter_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
966
  if (seopress_social_twitter_img_size_option() =='large') {
967
- echo '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_home_option().'" />';
968
- echo "\n";
969
  } else {
970
- echo '<meta name="twitter:image" content="'.seopress_social_twitter_img_home_option().'" />';
971
- echo "\n";
972
  }
973
  }
974
  } elseif (seopress_social_twitter_img_post_option() !='' && is_singular()) {
975
  if (seopress_social_twitter_img_size_option() =='large') {
976
- echo '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_post_option().'" />';
977
- echo "\n";
978
  } else {
979
- echo '<meta name="twitter:image" content="'.seopress_social_twitter_img_post_option().'" />';
980
- echo "\n";
981
  }
982
  } elseif (has_post_thumbnail() && is_singular()) {
983
  if (seopress_social_twitter_img_size_option() =='large') {
984
- echo '<meta name="twitter:image:src" content="'.get_the_post_thumbnail_url().'" />';
985
- echo "\n";
986
  } else {
987
- echo '<meta name="twitter:image" content="'.get_the_post_thumbnail_url().'" />';
988
- echo "\n";
989
  }
990
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_twitter_img_term_option() !='') {
991
  if (seopress_social_twitter_img_size_option() =='large') {
992
- echo '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_term_option().'" />';
993
- echo "\n";
994
  } else {
995
- echo '<meta name="twitter:image" content="'.seopress_social_twitter_img_term_option().'" />';
996
- echo "\n";
997
  }
998
  } elseif (seopress_social_twitter_img_option() !='') {
999
  if (seopress_social_twitter_img_size_option() =='large') {
1000
- echo '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_option().'" />';
1001
- echo "\n";
1002
  } else {
1003
- echo '<meta name="twitter:image" content="'.seopress_social_twitter_img_option().'" />';
1004
- echo "\n";
1005
  }
1006
  }
1007
  }
 
 
 
 
 
 
 
1008
  }
1009
  }
1010
  add_action( 'wp_head', 'seopress_social_twitter_img_hook', 1 );
350
  } else {
351
  $seopress_social_og_url = '<meta property="og:url" content="'.$current_url.'" />';
352
  }
353
+
354
+ //Hook on post OG URL - 'seopress_social_og_url'
355
+ if (has_filter('seopress_social_og_url')) {
356
+ $seopress_social_og_url = apply_filters('seopress_social_og_url', $seopress_social_og_url);
357
+ }
358
 
359
  echo $seopress_social_og_url."\n";
360
  }
367
 
368
  $seopress_social_og_site_name = '<meta property="og:site_name" content="'.get_bloginfo('name').'" />';
369
 
370
+ //Hook on post OG site name - 'seopress_social_og_site_name'
371
+ if (has_filter('seopress_social_og_site_name')) {
372
+ $seopress_social_og_site_name = apply_filters('seopress_social_og_site_name', $seopress_social_og_site_name);
373
+ }
374
+
375
  echo $seopress_social_og_site_name."\n";
376
  }
377
  }
382
  if (seopress_social_facebook_og_option() =='1') {
383
 
384
  $seopress_social_og_locale = '<meta property="og:locale" content="'.get_locale().'" />';
385
+
386
+ //Hook on post OG locale - 'seopress_social_og_locale'
387
+ if (has_filter('seopress_social_og_locale')) {
388
+ $seopress_social_og_locale = apply_filters('seopress_social_og_locale', $seopress_social_og_locale);
389
+ }
390
 
391
+ if (isset($seopress_social_og_locale) && $seopress_social_og_locale !='') {
392
+ echo $seopress_social_og_locale."\n";
393
+ }
394
  }
395
  }
396
  add_action( 'wp_head', 'seopress_social_facebook_og_locale_hook', 1 );
409
  $seopress_social_og_type = '<meta property="og:type" content="object" />';
410
  }
411
  if (isset($seopress_social_og_type)) {
412
+ //Hook on post OG type - 'seopress_social_og_type'
413
+ if (has_filter('seopress_social_og_type')) {
414
+ $seopress_social_og_type = apply_filters('seopress_social_og_type', $seopress_social_og_type);
415
+ }
416
  echo $seopress_social_og_type."\n";
417
  }
418
  }
442
  }
443
 
444
  function seopress_social_fb_title_hook() {
445
+ //Init
446
+ $seopress_social_og_title ='';
447
+
448
  if (is_home()) {
449
  if (seopress_social_fb_title_home_option() !='') {
450
+ $seopress_social_og_title .= '<meta property="og:title" content="'.seopress_social_fb_title_home_option().'" />';
451
+ $seopress_social_og_title .= "\n";
452
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
453
+ $seopress_social_og_title .= '<meta property="og:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
454
+ $seopress_social_og_title .= "\n";
455
  }
456
  } elseif (is_tax() || is_category() || is_tag()) {
457
  if (seopress_social_fb_title_term_option() !='') {
458
+ $seopress_social_og_title .= '<meta property="og:title" content="'.seopress_social_fb_title_term_option().'" />';
459
+ $seopress_social_og_title .= "\n";
460
  } else {
461
+ $seopress_social_og_title .= '<meta property="og:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
462
+ $seopress_social_og_title .= "\n";
463
  }
464
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_title_post_option() !='') {
465
+ $seopress_social_og_title .= '<meta property="og:title" content="'.seopress_social_fb_title_post_option().'" />';
466
+ $seopress_social_og_title .= "\n";
467
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
468
+ $seopress_social_og_title .= '<meta property="og:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
469
+ $seopress_social_og_title .= "\n";
470
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_title() !='') {
471
+ $seopress_social_og_title .= '<meta property="og:title" content="'.the_title_attribute('echo=0').'" />';
472
+ $seopress_social_og_title .= "\n";
473
  }
474
+
475
+ //Hook on post OG title - 'seopress_social_og_title'
476
+ if (has_filter('seopress_social_og_title')) {
477
+ $seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
478
+ }
479
+ if (isset($seopress_social_og_title) && $seopress_social_og_title !='') {
480
+ echo $seopress_social_og_title;
481
+ }
482
  }
483
  add_action( 'wp_head', 'seopress_social_fb_title_hook', 1 );
484
 
506
 
507
  function seopress_social_fb_desc_hook() {
508
  global $post;
509
+ //Init
510
+ $seopress_social_og_desc ='';
511
+
512
  setup_postdata( $post );
513
  if (is_home()) {
514
  if (seopress_social_fb_desc_home_option() !='') {
515
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.seopress_social_fb_desc_home_option().'" />';
516
+ $seopress_social_og_desc .= "\n";
517
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
518
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.seopress_titles_the_description_content().'" />';
519
+ $seopress_social_og_desc .= "\n";
520
  }
521
  } elseif (is_tax() || is_category() || is_tag()) {
522
  if (seopress_social_fb_desc_term_option() !='') {
523
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.seopress_social_fb_desc_term_option().'" />';
524
+ $seopress_social_og_desc .= "\n";
525
  } elseif (term_description() !='') {
526
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
527
+ $seopress_social_og_desc .= "\n";
528
  }
529
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_desc_post_option() !='') {
530
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.seopress_social_fb_desc_post_option().'" />';
531
+ $seopress_social_og_desc .= "\n";
532
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
533
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.seopress_titles_the_description_content().'" />';
534
+ $seopress_social_og_desc .= "\n";
535
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_excerpt() !='') {
536
+ $seopress_social_og_desc .= '<meta property="og:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
537
+ $seopress_social_og_desc .= "\n";
538
+ }
539
+
540
+ //Hook on post OG description - 'seopress_social_og_desc'
541
+ if (has_filter('seopress_social_og_desc')) {
542
+ $seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
543
+ }
544
+ if (isset($seopress_social_og_desc) && $seopress_social_og_desc !='') {
545
+ echo $seopress_social_og_desc;
546
+ }
547
  }
548
  add_action( 'wp_head', 'seopress_social_fb_desc_hook', 1 );
549
 
583
  }
584
 
585
  function seopress_social_fb_img_hook() {
586
+ //Init
587
+ $seopress_social_og_thumb ='';
588
+
589
  if (is_home()) {
590
  if (seopress_social_fb_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
591
+ $seopress_social_og_thumb .= '<meta property="og:image" content="'.seopress_social_fb_img_home_option().'" />';
592
+ $seopress_social_og_thumb .= "\n";
593
  }
594
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_img_post_option() !='') {
595
+ $seopress_social_og_thumb .= '<meta property="og:image" content="'.seopress_social_fb_img_post_option().'" />';
596
+ $seopress_social_og_thumb .= "\n";
597
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && has_post_thumbnail() ) {
598
+ $seopress_social_og_thumb .= '<meta property="og:image" content="'.get_the_post_thumbnail_url().'" />';
599
+ $seopress_social_og_thumb .= "\n";
600
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_fb_img_term_option() !='') {
601
+ $seopress_social_og_thumb .= '<meta property="og:image" content="'.seopress_social_fb_img_term_option().'" />';
602
+ $seopress_social_og_thumb .= "\n";
603
  } elseif (seopress_social_facebook_og_option() =='1' && seopress_social_facebook_img_option() !='') {
604
+ $seopress_social_og_thumb .= '<meta property="og:image" content="'.seopress_social_facebook_img_option().'" />';
605
+ $seopress_social_og_thumb .= "\n";
606
  }
607
+
608
+ //Hook on post OG thumbnail - 'seopress_social_og_thumb'
609
+ if (has_filter('seopress_social_og_thumb')) {
610
+ $seopress_social_og_thumb = apply_filters('seopress_social_og_thumb', $seopress_social_og_thumb);
611
+ }
612
+ if (isset($seopress_social_og_thumb) && $seopress_social_og_thumb !='') {
613
+ echo $seopress_social_og_thumb;
614
+ }
615
  }
616
  add_action( 'wp_head', 'seopress_social_fb_img_hook', 1 );
617
 
723
  } else {
724
  $seopress_social_twitter_card_summary = '<meta name="twitter:card" content="summary" />';
725
  }
726
+ //Hook on post Twitter card summary - 'seopress_social_twitter_card_summary'
727
+ if (has_filter('seopress_social_twitter_card_summary')) {
728
+ $seopress_social_twitter_card_summary = apply_filters('seopress_social_twitter_card_summary', $seopress_social_twitter_card_summary);
729
+ }
730
  echo $seopress_social_twitter_card_summary."\n";
731
  }
732
  }
738
 
739
  $seopress_social_twitter_card_site = '<meta name="twitter:site" content="'.seopress_social_accounts_twitter_option().'" />';
740
 
741
+ //Hook on post Twitter card site - 'seopress_social_twitter_card_site'
742
+ if (has_filter('seopress_social_twitter_card_site')) {
743
+ $seopress_social_twitter_card_site = apply_filters('seopress_social_twitter_card_site', $seopress_social_twitter_card_site);
744
+ }
745
  echo $seopress_social_twitter_card_site."\n";
746
  }
747
  }
749
 
750
  //Twitter Creator
751
  function seopress_social_twitter_card_creator_hook() {
752
+ //Init
753
+ $seopress_social_twitter_card_creator ='';
754
+
755
  if (seopress_social_twitter_card_option() =='1' && get_the_author_meta('twitter') ) {
756
 
757
+ $seopress_social_twitter_card_creator .= '<meta name="twitter:creator" content="@'.get_the_author_meta('twitter').'" />';
 
758
 
759
  } elseif (seopress_social_twitter_card_option() =='1' && seopress_social_accounts_twitter_option() !='' ) {
760
 
761
+ $seopress_social_twitter_card_creator .= '<meta name="twitter:creator" content="'.seopress_social_accounts_twitter_option().'" />';
762
+ }
763
+ //Hook on post Twitter card creator - 'seopress_social_twitter_card_creator'
764
+ if (has_filter('seopress_social_twitter_card_creator')) {
765
+ $seopress_social_twitter_card_creator = apply_filters('seopress_social_twitter_card_creator', $seopress_social_twitter_card_creator);
766
+ }
767
+ if (isset($seopress_social_twitter_card_creator) && $seopress_social_twitter_card_creator !='') {
768
+ echo $seopress_social_twitter_card_creator."\n";
769
  }
770
  }
771
  add_action( 'wp_head', 'seopress_social_twitter_card_creator_hook', 1 );
793
  }
794
 
795
  function seopress_social_twitter_title_hook() {
796
+ //Init
797
+ $seopress_social_twitter_card_title ='';
798
+
799
  if (seopress_social_twitter_card_og_option() =='1') {
800
  if (is_home()) {
801
  if (seopress_social_fb_title_home_option() !='') {
802
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_fb_title_home_option().'" />';
 
803
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
804
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
 
805
  }
806
  } elseif (is_tax() || is_category() || is_tag()) {
807
  if (seopress_social_fb_title_term_option() !='') {
808
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_fb_title_term_option().'" />';
 
809
  } else {
810
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
 
811
  }
812
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_title_post_option() !='') {
813
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_fb_title_post_option().'" />';
 
814
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
815
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
 
816
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_title() !='') {
817
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.the_title_attribute('echo=0').'" />';
 
818
  }
819
  } else {
820
  if (is_home()) {
821
  if (seopress_social_twitter_title_home_option() !='') {
822
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_twitter_title_home_option().'" />';
 
823
  } elseif (function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
824
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
 
825
  }
826
  } elseif (is_tax() || is_category() || is_tag()) {
827
  if (seopress_social_twitter_title_term_option() !='') {
828
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_twitter_title_term_option().'" />';
 
829
  } else {
830
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.single_term_title('', false).' - '.get_bloginfo('name').'" />';
 
831
  }
832
  } elseif (is_singular() && seopress_social_twitter_card_option() =='1' && seopress_social_twitter_title_post_option() !='') {
833
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.seopress_social_twitter_title_post_option().'" />';
 
834
  } elseif (seopress_social_twitter_card_option() =='1' && function_exists('seopress_titles_the_title') && seopress_titles_the_title() !='') {
835
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.esc_attr(seopress_titles_the_title()).'" />';
 
836
  } elseif (seopress_social_twitter_card_option() =='1' && get_the_title() !='') {
837
+ $seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.the_title_attribute('echo=0').'" />';
 
838
  }
839
  }
840
+
841
+ //Hook on post Twitter card title - 'seopress_social_twitter_card_title'
842
+ if (has_filter('seopress_social_twitter_card_title')) {
843
+ $seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
844
+ }
845
+ if (isset($seopress_social_twitter_card_title) && $seopress_social_twitter_card_title !='') {
846
+ echo $seopress_social_twitter_card_title."\n";
847
+ }
848
  }
849
  add_action( 'wp_head', 'seopress_social_twitter_title_hook', 1 );
850
 
873
  function seopress_social_twitter_desc_hook() {
874
  global $post;
875
  setup_postdata( $post );
876
+ //Init
877
+ $seopress_social_twitter_card_desc ='';
878
 
879
  if (seopress_social_twitter_card_og_option() =='1') {
880
  if (is_home()) {
881
  if (seopress_social_fb_desc_home_option() !='') {
882
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_fb_desc_home_option().'" />';
 
883
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
884
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
 
885
  }
886
  } elseif (is_tax() || is_category() || is_tag()) {
887
  if (seopress_social_fb_desc_term_option() !='') {
888
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_fb_desc_term_option().'" />';
 
889
  } elseif (term_description() !='') {
890
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
 
891
  }
892
  } elseif (is_singular() && seopress_social_facebook_og_option() =='1' && seopress_social_fb_desc_post_option() !='') {
893
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_fb_desc_post_option().'" />';
 
894
  } elseif (seopress_social_facebook_og_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
895
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
 
896
  } elseif (seopress_social_facebook_og_option() =='1' && get_the_excerpt() !='') {
897
  setup_postdata( $post );
898
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
 
899
  }
900
  } else {
901
  if (is_home()) {
902
  if (seopress_social_twitter_desc_home_option() !='') {
903
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_twitter_desc_home_option().'" />';
 
904
  } elseif (function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
905
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
 
906
  }
907
  } elseif (is_tax() || is_category() || is_tag()) {
908
  if (seopress_social_twitter_desc_term_option() !='') {
909
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_twitter_desc_term_option().'" />';
 
910
  } elseif (term_description() !='') {
911
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.stripslashes_deep(wp_filter_nohtml_kses(term_description())).' - '.get_bloginfo('name').'" />';
 
912
  }
913
  } elseif (is_singular() && seopress_social_twitter_card_option() =='1' && seopress_social_twitter_desc_post_option() !='') {
914
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_social_twitter_desc_post_option().'" />';
 
915
  } elseif (seopress_social_twitter_card_option() =='1' && function_exists('seopress_titles_the_description_content') && seopress_titles_the_description_content() !='') {
916
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.seopress_titles_the_description_content().'" />';
 
917
  } elseif (seopress_social_twitter_card_option() =='1' && get_the_excerpt() !='') {
918
  setup_postdata( $post );
919
+ $seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), 30).'" />';
 
920
  }
921
  }
922
+ //Hook on post Twitter card description - 'seopress_social_twitter_card_desc'
923
+ if (has_filter('seopress_social_twitter_card_desc')) {
924
+ $seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
925
+ }
926
+ if (isset($seopress_social_twitter_card_desc) && $seopress_social_twitter_card_desc !='') {
927
+ echo $seopress_social_twitter_card_desc."\n";
928
+ }
929
  }
930
  add_action( 'wp_head', 'seopress_social_twitter_desc_hook', 1 );
931
 
977
 
978
  function seopress_social_twitter_img_hook() {
979
  if (seopress_social_twitter_card_option() =='1') {
980
+ //Init
981
+ $seopress_social_twitter_card_thumb ='';
982
+
983
  if (seopress_social_twitter_card_og_option() =='1') {
984
  if (is_home()) {
985
  if (seopress_social_fb_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
986
  if (seopress_social_twitter_img_size_option() =='large') {
987
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_fb_img_home_option().'" />';
 
988
  } else {
989
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_fb_img_home_option().'" />';
 
990
  }
991
  }
992
  } elseif (seopress_social_fb_img_post_option() !='' && is_singular()) {
993
  if (seopress_social_twitter_img_size_option() =='large') {
994
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_fb_img_post_option().'" />';
 
995
  } else {
996
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_fb_img_post_option().'" />';
 
997
  }
998
  } elseif (has_post_thumbnail() && is_singular()) {
999
  if (seopress_social_twitter_img_size_option() =='large') {
1000
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.get_the_post_thumbnail_url().'" />';
 
1001
  } else {
1002
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.get_the_post_thumbnail_url().'" />';
 
1003
  }
1004
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_fb_img_term_option() !='') {
1005
  if (seopress_social_twitter_img_size_option() =='large') {
1006
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_fb_img_term_option().'" />';
 
1007
  } else {
1008
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_fb_img_term_option().'" />';
 
1009
  }
1010
  } elseif (seopress_social_facebook_img_option() !='') {
1011
  if (seopress_social_twitter_img_size_option() =='large') {
1012
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_facebook_img_option().'" />';
 
1013
  } else {
1014
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_facebook_img_option().'" />';
 
1015
  }
1016
  }
1017
  } else {
1018
  if (is_home()) {
1019
  if (seopress_social_twitter_img_home_option() !='' && 'page' == get_option( 'show_on_front' )) {
1020
  if (seopress_social_twitter_img_size_option() =='large') {
1021
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_home_option().'" />';
 
1022
  } else {
1023
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_twitter_img_home_option().'" />';
 
1024
  }
1025
  }
1026
  } elseif (seopress_social_twitter_img_post_option() !='' && is_singular()) {
1027
  if (seopress_social_twitter_img_size_option() =='large') {
1028
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_post_option().'" />';
 
1029
  } else {
1030
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_twitter_img_post_option().'" />';
 
1031
  }
1032
  } elseif (has_post_thumbnail() && is_singular()) {
1033
  if (seopress_social_twitter_img_size_option() =='large') {
1034
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.get_the_post_thumbnail_url().'" />';
 
1035
  } else {
1036
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.get_the_post_thumbnail_url().'" />';
 
1037
  }
1038
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_social_twitter_img_term_option() !='') {
1039
  if (seopress_social_twitter_img_size_option() =='large') {
1040
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_term_option().'" />';
 
1041
  } else {
1042
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_twitter_img_term_option().'" />';
 
1043
  }
1044
  } elseif (seopress_social_twitter_img_option() !='') {
1045
  if (seopress_social_twitter_img_size_option() =='large') {
1046
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image:src" content="'.seopress_social_twitter_img_option().'" />';
 
1047
  } else {
1048
+ $seopress_social_twitter_card_thumb .= '<meta name="twitter:image" content="'.seopress_social_twitter_img_option().'" />';
 
1049
  }
1050
  }
1051
  }
1052
+ //Hook on post Twitter card thumbnail - 'seopress_social_twitter_card_thumb'
1053
+ if (has_filter('seopress_social_twitter_card_thumb')) {
1054
+ $seopress_social_twitter_card_thumb = apply_filters('seopress_social_twitter_card_thumb', $seopress_social_twitter_card_thumb);
1055
+ }
1056
+ if (isset($seopress_social_twitter_card_thumb) && $seopress_social_twitter_card_thumb !='') {
1057
+ echo $seopress_social_twitter_card_thumb."\n";
1058
+ }
1059
  }
1060
  }
1061
  add_action( 'wp_head', 'seopress_social_twitter_img_hook', 1 );
inc/functions/options-titles-metas.php CHANGED
@@ -234,6 +234,9 @@ function seopress_titles_the_title() {
234
  global $post;
235
  global $term;
236
 
 
 
 
237
  //Remove WordPress Filters
238
  $seopress_array_filters = array('category_description', 'tag_description', 'term_description');
239
  foreach ($seopress_array_filters as $key => $value) {
@@ -481,10 +484,12 @@ add_filter( 'pre_get_document_title', 'seopress_titles_the_title', 10 );
481
  function seopress_titles_the_description_content() {
482
  global $post;
483
 
484
- //Template variables
 
485
  $seopress_paged ='';
486
  $seopress_get_author ='';
487
-
 
488
  if (get_query_var('paged') >='1') {
489
  $seopress_paged = get_query_var('paged');
490
  }
@@ -1280,34 +1285,48 @@ function seopress_titles_canonical_term_option() {
1280
  }
1281
  }
1282
 
1283
- if ( is_singular() && seopress_titles_canonical_post_option()) { //CUSTOM SINGLE CANONICAL
1284
- function seopress_titles_canonical_post_hook() {
1285
- $seopress_titles_canonical = '<link rel="canonical" href="'.seopress_titles_canonical_post_option().'" />';
1286
- echo $seopress_titles_canonical."\n";
1287
- }
1288
- add_action( 'wp_head', 'seopress_titles_canonical_post_hook', 1 );
1289
- } elseif ((is_tax() || is_category() || is_tag()) && seopress_titles_canonical_term_option()) { //CUSTOM TERM CANONICAL
1290
- function seopress_titles_canonical_term_hook() {
1291
- $seopress_titles_canonical = '<link rel="canonical" href="'.seopress_titles_canonical_term_option().'" />';
1292
- echo $seopress_titles_canonical."\n";
1293
- }
1294
- add_action( 'wp_head', 'seopress_titles_canonical_term_hook', 1 );
1295
- } else { //DEFAULT CANONICAL
1296
- function seopress_titles_canonical_hook() {
1297
- global $wp;
1298
- if (seopress_advanced_advanced_trailingslash_option()) {
1299
- $current_url = home_url(add_query_arg(array(), $wp->request));
1300
- } else {
1301
- $current_url = trailingslashit(home_url(add_query_arg(array(), $wp->request)));
1302
- }
1303
- if (is_search()) {
1304
- $seopress_titles_canonical = '<link rel="canonical" href="'.get_home_url().'/search/'.get_search_query().'" />';
1305
- } elseif (is_paged()){
1306
- $seopress_titles_canonical = '<link rel="canonical" href="'.get_pagenum_link('1').'" />';
1307
- } else {
1308
- $seopress_titles_canonical = '<link rel="canonical" href="'.$current_url.'" />';
1309
- }
1310
- echo $seopress_titles_canonical."\n";
1311
- }
1312
- add_action( 'wp_head', 'seopress_titles_canonical_hook', 1 );
1313
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  global $post;
235
  global $term;
236
 
237
+ //Init
238
+ $seopress_titles_title_template ='';
239
+
240
  //Remove WordPress Filters
241
  $seopress_array_filters = array('category_description', 'tag_description', 'term_description');
242
  foreach ($seopress_array_filters as $key => $value) {
484
  function seopress_titles_the_description_content() {
485
  global $post;
486
 
487
+ //Init
488
+ $seopress_titles_description_template ='';
489
  $seopress_paged ='';
490
  $seopress_get_author ='';
491
+
492
+ //Template variables
493
  if (get_query_var('paged') >='1') {
494
  $seopress_paged = get_query_var('paged');
495
  }
1285
  }
1286
  }
1287
 
1288
+ if (function_exists('seopress_titles_noindex_bypass') && seopress_titles_noindex_bypass() !='1' && seopress_titles_noindex_bypass() !='yes') {//Remove Canonical if noindex
1289
+ if ( is_singular() && seopress_titles_canonical_post_option()) { //CUSTOM SINGLE CANONICAL
1290
+ function seopress_titles_canonical_post_hook() {
1291
+ $seopress_titles_canonical = '<link rel="canonical" href="'.seopress_titles_canonical_post_option().'" />';
1292
+ //Hook on post canonical URL - 'seopress_titles_canonical'
1293
+ if (has_filter('seopress_titles_canonical')) {
1294
+ $seopress_titles_canonical = apply_filters('seopress_titles_canonical', $seopress_titles_canonical);
1295
+ }
1296
+ echo $seopress_titles_canonical."\n";
1297
+ }
1298
+ add_action( 'wp_head', 'seopress_titles_canonical_post_hook', 1 );
1299
+ } elseif ((is_tax() || is_category() || is_tag()) && seopress_titles_canonical_term_option()) { //CUSTOM TERM CANONICAL
1300
+ function seopress_titles_canonical_term_hook() {
1301
+ $seopress_titles_canonical = '<link rel="canonical" href="'.seopress_titles_canonical_term_option().'" />';
1302
+ //Hook on post canonical URL - 'seopress_titles_canonical'
1303
+ if (has_filter('seopress_titles_canonical')) {
1304
+ $seopress_titles_canonical = apply_filters('seopress_titles_canonical', $seopress_titles_canonical);
1305
+ }
1306
+ echo $seopress_titles_canonical."\n";
1307
+ }
1308
+ add_action( 'wp_head', 'seopress_titles_canonical_term_hook', 1 );
1309
+ } else { //DEFAULT CANONICAL
1310
+ function seopress_titles_canonical_hook() {
1311
+ global $wp;
1312
+ if (seopress_advanced_advanced_trailingslash_option()) {
1313
+ $current_url = home_url(add_query_arg(array(), $wp->request));
1314
+ } else {
1315
+ $current_url = trailingslashit(home_url(add_query_arg(array(), $wp->request)));
1316
+ }
1317
+ if (is_search()) {
1318
+ $seopress_titles_canonical = '<link rel="canonical" href="'.get_home_url().'/search/'.get_search_query().'" />';
1319
+ } elseif (is_paged()){
1320
+ $seopress_titles_canonical = '<link rel="canonical" href="'.get_pagenum_link('1').'" />';
1321
+ } else {
1322
+ $seopress_titles_canonical = '<link rel="canonical" href="'.$current_url.'" />';
1323
+ }
1324
+ //Hook on post canonical URL - 'seopress_titles_canonical'
1325
+ if (has_filter('seopress_titles_canonical')) {
1326
+ $seopress_titles_canonical = apply_filters('seopress_titles_canonical', $seopress_titles_canonical);
1327
+ }
1328
+ echo $seopress_titles_canonical."\n";
1329
+ }
1330
+ add_action( 'wp_head', 'seopress_titles_canonical_hook', 1 );
1331
+ }
1332
+ }
languages/wp-seopress-fr_FR.mo CHANGED
Binary file
languages/wp-seopress-fr_FR.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
- "POT-Creation-Date: 2018-04-05 19:44+0200\n"
6
- "PO-Revision-Date: 2018-04-05 19:44+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: fr_FR\n"
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
+ "POT-Creation-Date: 2018-04-14 10:56+0200\n"
6
+ "PO-Revision-Date: 2018-04-14 10:56+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: fr_FR\n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