Changeset 17964

Show
Ignore:
Timestamp:
09/06/07 14:45:53 (10 months ago)
Author:
GamerZ
Message:

Fixed a weird get_the_title() bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-email/trunk/email/email.php

    r17536 r17964  
    6161function email_rewrite($wp_rewrite) { 
    6262      $email_link = get_permalink(); 
    63       if(substr($email_link, -1, 1) != '/') { 
     63      if(substr($email_link, -1, 1) != '/' && substr($wp_rewrite->permalink_structure, -1, 1) != '/') { 
    6464            $email_link_text = '/email'; 
    6565            $email_popup_text = '/emailpopup'; 
     
    291291 
    292292 
     293### Function: Get E-Mail Title 
     294function email_get_title() { 
     295      global $post; 
     296      $post_title = $post->post_title; 
     297      if(!empty($post->post_password)) { 
     298            $post_title = sprintf(__('Protected: %s', 'wp-email'), $post_title); 
     299      } elseif($post->post_status == 'private') { 
     300            $post_title = sprintf(__('Private: %s', 'wp-email'), $post_title); 
     301      } 
     302      return $post_title; 
     303} 
     304 
     305 
    293306### Function: E-Mail Title 
    294307function email_title($page_title) { 
     308      global $post; 
    295309      if(in_the_loop()) { 
    296             $post_title = get_the_title(); 
     310            $post_title = email_get_title(); 
    297311            $post_author = the_author('', false);                  
    298312            $post_date = get_the_time(get_option('date_format').' ('.get_option('time_format').')', '', '', false); 
     
    677691                  while(have_posts()) { 
    678692                        the_post(); 
    679                         $post_title = get_the_title(); 
     693                        $post_title = email_get_title(); 
    680694                        $post_author = get_the_author(); 
    681695                        $post_date = get_the_time(get_option('date_format').' ('.get_option('time_format').')', '', '', false); 
     
    929943      // Variables 
    930944      $multipage = false; 
    931       $post_title = get_the_title(); 
     945      $post_title = email_get_title(); 
    932946      $post_author = the_author('', false);                  
    933947      $post_date = get_the_time(get_option('date_format').' ('.get_option('time_format').')', '', '', false); 
  • wp-email/trunk/email/wp-email.pot

    r17536 r17964  
    33"Project-Id-Version: WP-EMail 2.20\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-08-29 00:47+0800\n" 
     5"PO-Revision-Date: 2007-09-06 22:45+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@hotmail.com>\n" 
     
    158158 
    159159#: email-manager.php:126 
    160 #: email.php:437 
    161 #: email.php:574 
    162 #: email.php:861 
    163 #: email.php:898 
    164 #: email.php:1110 
     160#: email.php:451 
     161#: email.php:588 
     162#: email.php:875 
     163#: email.php:912 
     164#: email.php:1124 
    165165msgid "Success" 
    166166msgstr "" 
    167167 
    168168#: email-manager.php:127 
    169 #: email.php:588 
    170 #: email.php:873 
    171 #: email.php:1111 
     169#: email.php:602 
     170#: email.php:887 
     171#: email.php:1125 
    172172msgid "Failed" 
    173173msgstr "" 
     
    372372 
    373373#: email-options.php:122 
    374 #: email.php:1188 
     374#: email.php:1202 
    375375msgid "E-Mail '%EMAIL_POST_TITLE%' To A Friend" 
    376376msgstr "" 
    377377 
    378378#: email-options.php:125 
    379 #: email.php:1189 
     379#: email.php:1203 
    380380msgid "Email a copy of <strong>'%EMAIL_POST_TITLE%'</strong> to a friend" 
    381381msgstr "" 
    382382 
    383383#: email-options.php:128 
    384 #: email.php:1163 
     384#: email.php:1177 
    385385msgid "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%" 
    386386msgstr "" 
     
    410410 
    411411#: email-options.php:137 
    412 #: email.php:1174 
     412#: email.php:1188 
    413413msgid "Back to %EMAIL_POST_TITLE%" 
    414414msgstr "" 
    415415 
    416416#: email-options.php:140 
    417 #: email.php:1175 
     417#: email.php:1189 
    418418msgid "An error has occurred when trying to send this email: " 
    419419msgstr "" 
    420420 
    421421#: email-options.php:143 
    422 #: email.php:1176 
     422#: email.php:1190 
    423423msgid "An error has occurred: " 
    424424msgstr "" 
     
    881881msgstr "" 
    882882 
    883 #: email.php:354 
     883#: email.php:298 
     884#, php-format 
     885msgid "Protected: %s" 
     886msgstr "" 
     887 
     888#: email.php:300 
     889#, php-format 
     890msgid "Private: %s" 
     891msgstr "" 
     892 
     893#: email.php:368 
    884894msgid "Password Protected Post" 
    885895msgstr "" 
    886896 
    887 #: email.php:546 
     897#: email.php:560 
    888898#, php-format 
    889899msgid "Separate multiple entries with a comma. Maximum %s entries." 
    890900msgstr "" 
    891901 
    892 #: email.php:615 
    893 #: email.php:621 
     902#: email.php:629 
     903#: email.php:635 
    894904msgid "emails" 
    895905msgstr "" 
    896906 
    897 #: email.php:625 
    898 #: email.php:795 
    899 #: email.php:872 
     907#: email.php:639 
     908#: email.php:809 
     909#: email.php:886 
    900910msgid "N/A" 
    901911msgstr "" 
    902912 
    903 #: email.php:707 
     913#: email.php:721 
    904914msgid "Your Name is empty" 
    905915msgstr "" 
    906916 
    907 #: email.php:710 
     917#: email.php:724 
    908918msgid "Your Name is invalid" 
    909919msgstr "" 
    910920 
    911 #: email.php:716 
     921#: email.php:730 
    912922msgid "Your Email is empty" 
    913923msgstr "" 
    914924 
    915 #: email.php:719 
     925#: email.php:733 
    916926msgid "Your Email is invalid" 
    917927msgstr "" 
    918928 
    919 #: email.php:725 
     929#: email.php:739 
    920930msgid "Your Remarks is invalid" 
    921931msgstr "" 
    922932 
    923 #: email.php:731 
     933#: email.php:745 
    924934msgid "Friend Name(s) is empty" 
    925935msgstr "" 
    926936 
    927 #: email.php:737 
     937#: email.php:751 
    928938#, php-format 
    929939msgid "Friend Name is empty: %s" 
    930940msgstr "" 
    931941 
    932 #: email.php:739 
     942#: email.php:753 
    933943#, php-format 
    934944msgid "Friend Name is invalid: %s" 
    935945msgstr "" 
    936946 
    937 #: email.php:753 
     947#: email.php:767 
    938948msgid "Friend Email(s) is empty" 
    939949msgstr "" 
    940950 
    941 #: email.php:759 
     951#: email.php:773 
    942952#, php-format 
    943953msgid "Friend Email is empty: %s" 
    944954msgstr "" 
    945955 
    946 #: email.php:761 
     956#: email.php:775 
    947957#, php-format 
    948958msgid "Friend Email is invalid: %s" 
    949959msgstr "" 
    950960 
    951 #: email.php:774 
     961#: email.php:788 
    952962#, php-format 
    953963msgid "Maximum %s Friend(s) allowed" 
    954964msgstr "" 
    955965 
    956 #: email.php:778 
     966#: email.php:792 
    957967msgid "Friend Name(s) count does not tally with Friend Email(s) count" 
    958968msgstr "" 
    959969 
    960 #: email.php:785 
     970#: email.php:799 
    961971msgid "Image Verification is empty" 
    962972msgstr "" 
    963973 
    964 #: email.php:788 
     974#: email.php:802 
    965975msgid "Image Verification failed" 
    966976msgstr "" 
    967977 
    968 #: email.php:965 
     978#: email.php:979 
    969979msgid "* Required Field" 
    970980msgstr "" 
    971981 
    972 #: email.php:968 
     982#: email.php:982 
    973983msgid "Your Name: *" 
    974984msgstr "" 
    975985 
    976 #: email.php:974 
     986#: email.php:988 
    977987msgid "Your E-Mail: *" 
    978988msgstr "" 
    979989 
    980 #: email.php:980 
     990#: email.php:994 
    981991msgid "Your Remark:" 
    982992msgstr "" 
    983993 
    984 #: email.php:986 
     994#: email.php:1000 
    985995msgid "Friend's Name: *" 
    986996msgstr "" 
    987997 
    988 #: email.php:991 
     998#: email.php:1005 
    989999msgid "Friend's E-Mail: *" 
    9901000msgstr "" 
    9911001 
    992 #: email.php:996 
     1002#: email.php:1010 
    9931003msgid "Image Verification: *" 
    9941004msgstr "" 
    9951005 
    996 #: email.php:997 
     1006#: email.php:1011 
    9971007msgid "E-Mail Image Verification" 
    9981008msgstr "" 
    9991009 
    1000 #: email.php:1000 
     1010#: email.php:1014 
    10011011msgid "     Mail It!     " 
    10021012msgstr "" 
    10031013 
    1004 #: email.php:1006 
     1014#: email.php:1020 
    10051015#, php-format 
    10061016msgid "Please wait for <strong>%s Minutes</strong> before sending the next article." 
    10071017msgstr "" 
    10081018 
    1009 #: email.php:1008 
     1019#: email.php:1022 
    10101020msgid "Loading" 
    10111021msgstr "" 
    10121022 
    1013 #: email.php:1072 
    1014 #: email.php:1074 
    1015 #: email.php:1107 
     1023#: email.php:1086 
     1024#: email.php:1088 
     1025#: email.php:1121 
    10161026msgid "WP-EMail" 
    10171027msgstr "" 
    10181028 
    1019 #: email.php:1085 
    1020 #: email.php:1087 
     1029#: email.php:1099 
     1030#: email.php:1101 
    10211031msgid "Most Emailed Posts" 
    10221032msgstr "" 
    10231033 
    1024 #: email.php:1109 
     1034#: email.php:1123 
    10251035msgid "emails were sent." 
    10261036msgstr "" 
    10271037 
    1028 #: email.php:1110 
     1038#: email.php:1124 
    10291039msgid "emails were sent successfully." 
    10301040msgstr "" 
    10311041 
    1032 #: email.php:1111 
     1042#: email.php:1125 
    10331043msgid "emails failed to send." 
    10341044msgstr "" 
    10351045 
    1036 #: email.php:1123 
     1046#: email.php:1137 
    10371047msgid "Most Emailed Post" 
    10381048msgstr "" 
    10391049 
    1040 #: email.php:1164 
     1050#: email.php:1178 
    10411051msgid "<p>Hi <strong>%EMAIL_FRIEND_NAME%</strong>,<br />Your friend, <strong>%EMAIL_YOUR_NAME%</strong>, has recommended this article entitled '<strong>%EMAIL_POST_TITLE%</strong>' to you.</p><p><strong>Here is his/her remark:</strong><br />%EMAIL_YOUR_REMARKS%</p><p><strong>%EMAIL_POST_TITLE%</strong><br />Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%</p>%EMAIL_POST_CONTENT%<p>Article taken from %EMAIL_BLOG_NAME% - <a href=\"%EMAIL_BLOG_URL%\">%EMAIL_BLOG_URL%</a><br />URL to article: <a href=\"%EMAIL_PERMALINK%\">%EMAIL_PERMALINK%</a></p>" 
    10421052msgstr "" 
    10431053 
    1044 #: email.php:1165 
     1054#: email.php:1179 
    10451055msgid "Hi %EMAIL_FRIEND_NAME%," 
    10461056msgstr "" 
    10471057 
    1048 #: email.php:1165 
    1049 #: email.php:1167 
    1050 #: email.php:1169 
    1051 #: email.php:1170 
    1052 #: email.php:1171 
    1053 #: email.php:1172 
     1058#: email.php:1179 
     1059#: email.php:1181 
     1060#: email.php:1183 
     1061#: email.php:1184 
     1062#: email.php:1185 
     1063#: email.php:1186 
    10541064msgid "\n" 
    10551065msgstr "" 
    10561066 
    1057 #: email.php:1166 
     1067#: email.php:1180 
    10581068msgid "Your friend, %EMAIL_YOUR_NAME%, has recommended this article entitled '%EMAIL_POST_TITLE%' to you." 
    10591069msgstr "" 
    10601070 
    1061 #: email.php:1166 
    1062 #: email.php:1168 
     1071#: email.php:1180 
     1072#: email.php:1182 
    10631073msgid "" 
    10641074"\n" 
     
    10661076msgstr "" 
    10671077 
    1068 #: email.php:1167 
     1078#: email.php:1181 
    10691079msgid "Here is his/her remarks:" 
    10701080msgstr "" 
    10711081 
    1072 #: email.php:1168 
     1082#: email.php:1182 
    10731083msgid "%EMAIL_YOUR_REMARKS%" 
    10741084msgstr "" 
    10751085 
    1076 #: email.php:1169 
     1086#: email.php:1183 
    10771087msgid "%EMAIL_POST_TITLE%" 
    10781088msgstr "" 
    10791089 
    1080 #: email.php:1170 
     1090#: email.php:1184 
    10811091msgid "Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%" 
    10821092msgstr "" 
    10831093 
    1084 #: email.php:1171 
     1094#: email.php:1185 
    10851095msgid "%EMAIL_POST_CONTENT%" 
    10861096msgstr "" 
    10871097 
    1088 #: email.php:1172 
     1098#: email.php:1186 
    10891099msgid "Article taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%" 
    10901100msgstr "" 
    10911101 
    1092 #: email.php:1173 
     1102#: email.php:1187 
    10931103msgid "URL to article: %EMAIL_PERMALINK%" 
    10941104msgstr "" 
    10951105 
    1096 #: email.php:1174 
     1106#: email.php:1188 
    10971107msgid "Article: <strong>%EMAIL_POST_TITLE%</strong> has been sent to <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong></p><p>&laquo; <a href=\"%EMAIL_PERMALINK%\">" 
    10981108msgstr "" 
    10991109 
    1100 #: email.php:1174 
     1110#: email.php:1188 
    11011111msgid "</a></p>" 
    11021112msgstr "" 
    11031113 
    1104 #: email.php:1183 
     1114#: email.php:1197 
    11051115msgid "Email This Post" 
    11061116msgstr "" 
    11071117 
    1108 #: email.php:1183 
     1118#: email.php:1197 
    11091119msgid "Email This Page" 
    11101120msgstr ""