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"
languages/wp-seopress-vi.mo ADDED
Binary file
languages/wp-seopress-vi.po ADDED
@@ -0,0 +1,2913 @@
1
+ # Copyright (C) 2017 SEOPress
2
+ # This file is distributed under the same license as the SEOPress package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: SEOPress 2.1.7\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-seopress\n"
7
+ "POT-Creation-Date: 2018-04-14 10:57+0200\n"
8
+ "PO-Revision-Date: 2018-04-14 11:01+0200\n"
9
+ "Last-Translator: warcraft14115 <goddeadbb@gmail.com>\n"
10
+ "Language-Team: Vietnamese\n"
11
+ "Language: vi\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.0.6\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_x;esc_attr_e;esc_attr__;esc_html__;esc_html_e\n"
18
+ "X-Poedit-Basepath: ..\n"
19
+ "Plural-Forms: nplurals=1; plural=0;\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: inc/admin/admin-header.php:11
23
+ msgid "SEOPress"
24
+ msgstr "SEOPress"
25
+
26
+ #: inc/admin/admin-header.php:15 inc/admin/adminbar.php:72
27
+ msgid "PRO"
28
+ msgstr "PRO"
29
+
30
+ #: inc/admin/admin-header.php:27 inc/admin/admin.php:184
31
+ #: inc/admin/adminbar.php:22
32
+ msgid "Titles & Metas"
33
+ msgstr "Tiêu đề & Metas"
34
+
35
+ #: inc/admin/admin-header.php:33 inc/admin/admin.php:185
36
+ #: inc/admin/adminbar.php:28
37
+ msgid "XML / HTML Sitemap"
38
+ msgstr "XML / HTML Sitemap"
39
+
40
+ #: inc/admin/admin-header.php:39 inc/admin/admin.php:186
41
+ #: inc/admin/admin.php:1321 inc/admin/adminbar.php:34
42
+ msgid "Social Networks"
43
+ msgstr "Mang xã hội"
44
+
45
+ #: inc/admin/admin-header.php:45 inc/admin/admin.php:187
46
+ #: inc/admin/admin.php:1359 inc/admin/adminbar.php:40
47
+ msgid "Google Analytics"
48
+ msgstr "Google Analytics"
49
+
50
+ #: inc/admin/admin-header.php:51 inc/admin/admin-metaboxes-form.php:91
51
+ #: inc/admin/admin.php:188 inc/admin/admin.php:329 inc/admin/admin.php:605
52
+ #: inc/admin/admin.php:1397 inc/admin/adminbar.php:46
53
+ msgid "Advanced"
54
+ msgstr "Nâng cao"
55
+
56
+ #: inc/admin/admin-header.php:59 inc/admin/admin.php:1426
57
+ msgid "WooCommerce"
58
+ msgstr "WooCommerce"
59
+
60
+ #: inc/admin/admin-header.php:65 inc/admin/admin.php:1454
61
+ msgid "Easy Digital Downloads"
62
+ msgstr "Easy Digital Downloads"
63
+
64
+ #: inc/admin/admin-header.php:71 inc/admin/admin.php:1482
65
+ msgid "Local Business"
66
+ msgstr "Địa điểm kinh doanh"
67
+
68
+ #: inc/admin/admin-header.php:77 inc/admin/admin.php:1510
69
+ msgid "Dublin Core"
70
+ msgstr "Dublin Core"
71
+
72
+ #: inc/admin/admin-header.php:83 inc/admin/admin.php:1538
73
+ msgid "Structured Data Types"
74
+ msgstr "Các loại dữ liệu có cấu trúc"
75
+
76
+ #: inc/admin/admin-header.php:89 inc/admin/admin.php:1566
77
+ msgid "Breadcrumbs"
78
+ msgstr "Breadcrumbs"
79
+
80
+ #: inc/admin/admin-header.php:95 inc/admin/admin.php:1604
81
+ msgid "Google Page Speed"
82
+ msgstr "Google tốc độ trang"
83
+
84
+ #: inc/admin/admin-header.php:102 inc/admin/admin.php:1625
85
+ msgid "robots.txt"
86
+ msgstr "robots.txt"
87
+
88
+ #: inc/admin/admin-header.php:109 inc/admin/admin.php:1666
89
+ msgid "Google News Sitemap"
90
+ msgstr "Sơ đồ trang web Google tin tức"
91
+
92
+ #: inc/admin/admin-header.php:115 inc/admin/admin.php:1694
93
+ #: inc/admin/adminbar.php:78
94
+ msgid "Redirections"
95
+ msgstr "Các chuyển hướng"
96
+
97
+ #: inc/admin/admin-header.php:121 inc/admin/admin.php:1733
98
+ msgid "SEOPress BOT - Broken links"
99
+ msgstr "SEOPress BOT - Liên kết bị hỏng"
100
+
101
+ #: inc/admin/admin-header.php:127 inc/admin/admin.php:1744
102
+ #: inc/admin/adminbar.php:90
103
+ msgid "Backlinks"
104
+ msgstr "Backlinks"
105
+
106
+ #: inc/admin/admin-header.php:134 inc/admin/admin.php:1756
107
+ msgid ".htaccess"
108
+ msgstr ".htaccess"
109
+
110
+ #: inc/admin/admin-header.php:141 inc/admin/admin.php:1768
111
+ msgid "RSS"
112
+ msgstr "RSS"
113
+
114
+ #: inc/admin/admin-header.php:147 inc/admin/admin.php:1801
115
+ #: inc/admin/adminbar.php:66
116
+ msgid "License"
117
+ msgstr "Giấy phép"
118
+
119
+ #: inc/admin/admin-header.php:154 inc/admin/admin.php:189
120
+ #: inc/admin/admin.php:1780 inc/admin/adminbar.php:52
121
+ msgid "Tools"
122
+ msgstr "Công cụ"
123
+
124
+ #: inc/admin/admin-header.php:176
125
+ msgid "See the changelog (new window)"
126
+ msgstr "Xem các thay đổi (mở trong cửa sổ mới)"
127
+
128
+ #: inc/admin/admin-header.php:178
129
+ msgid "See the changelog"
130
+ msgstr "Xem các thay đổi"
131
+
132
+ #: inc/admin/admin-header.php:180 inc/admin/admin-header.php:182
133
+ msgid "Send feedback"
134
+ msgstr "Gửi phản hồi"
135
+
136
+ #: inc/admin/admin-header.php:184
137
+ msgid "Follow us on Twitter (new window)"
138
+ msgstr "Theo dõi chúng tôi trên Twitter (mở trong cửa sổ mới)"
139
+
140
+ #: inc/admin/admin-header.php:186
141
+ msgid "Follow us on Twitter"
142
+ msgstr "Theo dõi chúng tôi trên Twitter"
143
+
144
+ #: inc/admin/admin-header.php:188
145
+ msgid "Follow us on YouTube (new window)"
146
+ msgstr "Theo dõi chúng tôi trên YOUTUBE (mở trong cửa sổ mới)"
147
+
148
+ #: inc/admin/admin-header.php:190
149
+ msgid "Follow us on YouTube"
150
+ msgstr "Theo dõi chúng tôi trên YouTube"
151
+
152
+ #: inc/admin/admin-header.php:192
153
+ msgid "Official website (new window)"
154
+ msgstr "Trang web chính thức ( mở trong cửa sổ mới)"
155
+
156
+ #: inc/admin/admin-header.php:194
157
+ msgid "Official website"
158
+ msgstr "Trang web chính thức"
159
+
160
+ #: inc/admin/admin-header.php:196
161
+ msgid "Support (new window)"
162
+ msgstr "Hỗ trợ (Mở trong cửa sổ mới)"
163
+
164
+ #: inc/admin/admin-header.php:198
165
+ msgid "Support"
166
+ msgstr "Hỗ trợ"
167
+
168
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:5
169
+ msgid "Enter a few keywords for analysis and help you write optimized content."
170
+ msgstr ""
171
+ "Nhập một vài từ khóa để phân tích và giúp bạn viết nội dung được tối ưu hóa."
172
+
173
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:6
174
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:7
175
+ msgid "Target keywords"
176
+ msgstr "Tìm kiếm từ khóa"
177
+
178
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:7
179
+ msgid "Enter your target keywords"
180
+ msgstr "Tìm kiếm từ khóa"
181
+
182
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:8
183
+ msgid ""
184
+ "Separate target keywords with commas, do not use space after comma unless "
185
+ "it's wanted."
186
+ msgstr ""
187
+ "Tách các từ khóa mục tiêu bằng dấu phẩy, không sử dụng dấu cách sau dấu phẩy "
188
+ "trừ khi nó được yêu cầu."
189
+
190
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:12
191
+ msgid "Analyse my content"
192
+ msgstr "Phân tích nội dung của tôi"
193
+
194
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:14
195
+ msgid "Refresh analysis"
196
+ msgstr "Làm mới lại phân tích"
197
+
198
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:17
199
+ msgid "Analysis completed"
200
+ msgstr "Phân tích hoàn thành"
201
+
202
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:19
203
+ msgid "Save your post first, to get the most accurate analysis."
204
+ msgstr "Lưu bài viết của bạn trước, để có được phân tích chính xác nhất."
205
+
206
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:23
207
+ msgid "Optimisations"
208
+ msgstr "Tối ưu hóa"
209
+
210
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:24
211
+ msgid "Configuration"
212
+ msgstr "Cấu hình"
213
+
214
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:25
215
+ msgid "Images"
216
+ msgstr "Ảnh"
217
+
218
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:26
219
+ msgid "Links"
220
+ msgstr "Các đường dẫn"
221
+
222
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:32
223
+ msgid "Words counter"
224
+ msgstr "Words counter"
225
+
226
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:34
227
+ msgid "words found."
228
+ msgstr "các từ được tìm thấy."
229
+
230
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:35
231
+ msgid "unique words found."
232
+ msgstr "những từ độc đáo được tìm thấy."
233
+
234
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:38
235
+ msgid ""
236
+ "Your content is composed of more than 300 words, which is the minimum for a "
237
+ "post."
238
+ msgstr ""
239
+ "Nội dung của bạn có hơn 300 từ, đây là điều tối thiểu cho một bài đăng."
240
+
241
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:40
242
+ msgid "Your content lacks words. Add a few more paragraphs!"
243
+ msgstr "Nội dung của bạn thiếu từ. Thêm một vài đoạn nữa!"
244
+
245
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:46
246
+ msgid "Post title"
247
+ msgstr "Tiêu đề bài đăng"
248
+
249
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:49
250
+ msgid "Target keywords were found in Post Title."
251
+ msgstr "Các từ khóa mục tiêu đã được tìm thấy trong Tiêu đề bài đăng."
252
+
253
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:57
254
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:86
255
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:104
256
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:123
257
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:152
258
+ #, php-format
259
+ msgid "%s was found %d times."
260
+ msgstr "%s was found %d times."
261
+
262
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:61
263
+ msgid "None of your target keywords were found in the Post Title."
264
+ msgstr ""
265
+ "Không có từ khoá mục tiêu nào của bạn được tìm thấy trong Tiêu đề bài đăng."
266
+
267
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:64
268
+ msgid "No post title set for this post!"
269
+ msgstr "Không có tiêu đề được đặt cho bài viết này!"
270
+
271
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:69
272
+ msgid "H1 (Heading 1)"
273
+ msgstr "H1 (Thẻ tiêu đề H1)"
274
+
275
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:71
276
+ #, php-format
277
+ msgid "We found %d Heading 1 (H1) in your content."
278
+ msgstr "We found %d Heading 1 (H1) in your content."
279
+
280
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:72
281
+ msgid ""
282
+ "You should not use Heading 1 in your post content because your post title is "
283
+ "already an H1. The rule is simple: 1 H1 for 1 web page."
284
+ msgstr ""
285
+ "Bạn không nên sử dụng Tiêu đề 1 trong nội dung bài đăng của bạn vì tiêu đề "
286
+ "bài đăng của bạn đã là chữ H1. Quy tắc rất đơn giản: một thẻ H1 cho 1 trang "
287
+ "web."
288
+
289
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:76
290
+ msgid "H2 (Heading 2)"
291
+ msgstr "H2 (Thẻ tiêu đề 2)"
292
+
293
+ #: inc/admin/admin-metaboxes-content-analysis-form.php:78
294
+ msgid "Target keywords were found in Heading 2 (H2)."
295
+ msgstr "Từ khoá mục tiêu đã được tìm thấy trong Tiêu đề 2 (H2)."