Plugin Directory

Changeset 493699


Ignore:
Timestamp:
01/23/2012 05:37:15 AM (14 years ago)
Author:
easwy
Message:

default select Add Header and/or Footer Text for Old Post

Location:
wp-posturl/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wp-posturl/trunk/posturl-options.php

    r492558 r493699  
    116116        <table class="form-table">
    117117            <tr>
     118                <td valign="top" width="30%"><?php _e('Add Header and/or Footer For Old Posts (Keep selected if in doubt):', 'wp-posturl'); ?></td>
     119                <td>
     120                    <input name="add_url_by_default" id="add_url_by_default" type="checkbox" value="true" <?php if($posturl_options['add_url_by_default']) echo 'checked="checked"'; ?> />
     121                </td>
     122            </tr>
     123            <tr>
    118124                <td valign="top" width="30%"><strong><?php _e('Header Text:', 'wp-posturl'); ?></strong><br />
    119125                    <?php _e('This text will be inserted at beginning of your post if not empty.', 'wp-posturl'); ?><br /><br />
     
    185191                    <td>
    186192                        <input name="add_to_feed" id="add_to_feed" type="checkbox" value="true" <?php if($posturl_options['add_to_feed']) echo 'checked="checked"'; ?> />
    187                     </td>
    188                 </tr>
    189                 <tr>
    190                     <td valign="top" width="30%"><?php _e('Add Header and/or Footer For Existed Posts:', 'wp-posturl'); ?></td>
    191                     <td>
    192                         <input name="add_url_by_default" id="add_url_by_default" type="checkbox" value="true" <?php if($posturl_options['add_url_by_default']) echo 'checked="checked"'; ?> />
    193193                    </td>
    194194                </tr>
  • wp-posturl/trunk/readme.txt

    r492558 r493699  
    55Requires at least: 2.7
    66Tested up to: 3.3.1
    7 Stable tag: 2.0.1
     7Stable tag: 2.0.2
    88
    99This plugin allows you to insert a user specific text (such as copyright,
     
    4949For posts without this Custom Field (i.e., the existed posts before you use
    5050WP-PostURL plugin), you can define the default behavior. If you select "Add
    51 Header and/or Footer Text For Existed Post", then all posts without this Custom
     51Header and/or Footer Text For Old Posts", then all posts without this Custom
    5252Field will be added the header text and/or footer text; otherwise those posts
    5353will not be added the header text and/or footer text. If some of those posts
     
    7979
    8080* In a word, please check if you select "Add Header and/or Footer Text For
    81 Existed Post" option. If not, select it then have a look.
     81Old Posts" option. If not, select it then have a look.
     82* Please check "Add Post URL?" option for posts you want the text to be added.
    8283* If it still not work, make sure regenerate the cache if you a WordPress
    8384Cache Plugin (such as WP Super Cache), then have a look.
    8485
    85 Here are some detail information for "Add Header and/or Footer Text For Existed
    86 Post" option:
     86Here are some detail information for "Add Header and/or Footer Text For Old
     87Posts" option:
    8788
    8889In release 2.0 and above, I add a new feature: allow user decide which posts
     
    9192But for the posts you published before use WP-PostURL 2.0+, they do not have
    9293Custom Field "posturl_add_url". For those posts, you need configure  "Add
    93 Header and/or Footer Text For Existed Post" option. If you check this option,
     94Header and/or Footer Text For Old Posts" option. If you check this option,
    9495all existed posts will be added the header and/or footer text; otherwise those
    9596posts will not be added the header text and/or footer text. If some of those
     
    104105
    105106= 2.0.2 =
    106 * Fix: Rename description name to avoid confusing.
     107
     108* Fix: Set "Add Header and/or Footer For Old Posts" to true by default, to fix no header/footer in release 2.0.1. If you uncheck this option but re-install or re-activate this plugin, you need uncheck it again.
    107109
    108110= 2.0.1 =
  • wp-posturl/trunk/wp-posturl-zh_CN.po

    r492558 r493699  
    33"Project-Id-Version: WP-PostURL 1.0\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-01-20 17:30+0800\n"
    6 "PO-Revision-Date: 2012-01-20 17:32+0800\n"
     5"POT-Creation-Date: 2012-01-23 13:21+0800\n"
     6"PO-Revision-Date: 2012-01-23 13:24+0800\n"
    77"Last-Translator: Easwy Yang <easwy.mail@gmail.com>\n"
    88"Language-Team: Easwy Yang <easwy.mail@gmail.com>\n"
     
    1515"X-Poedit-KeywordsList: __;_e\n"
    1616"X-Poedit-Basepath: .\n"
    17 "X-Poedit-SearchPath-0: L:\\workspace\\wordpress\\wp-posturl\\trunk\n"
    18 
    19 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:36
    20 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:114
     17"X-Poedit-SearchPath-0: /home/eyang/05workspace/wordpress/wp-posturl/trunk\n"
     18
     19#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:42
     20#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:43
     21#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:288
     22msgid "Add Post URL"
     23msgstr "添加文章链接"
     24
     25#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:106
     26#, php-format
     27msgid "<div style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\"><p>Post Footer automatically generated by <a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl plugin</a> for wordpress.</p></div>"
     28msgstr "<p style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\">文章的脚注信息由WordPress的<a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl插件</a>自动生成</p>"
     29
     30#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:118
     31#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:98
     32msgid "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>From</strong> <a href=\"%site_url%\">%site_name%</a>, <strong>post</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
     33msgstr "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>原创文章,转载请注明:</strong> 转载自<a href=\"%site_url%\">%site_name%</a></p><p><strong>本文链接地址:</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
     34
     35#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:276
     36msgid "Add Post URL?"
     37msgstr "添加文章链接?"
     38
     39#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:278
     40#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:250
     41msgid "Yes"
     42msgstr "是"
     43
     44#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:279
     45msgid "No"
     46msgstr "否"
     47
     48#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:36
     49#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:114
    2150msgid "Post URL Options"
    2251msgstr "添加文章链接插件选项"
    2352
    24 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:41
     53#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:41
    2554msgid "Updated"
    2655msgstr "更新"
    2756
    28 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:46
     57#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:46
    2958msgid "No Post URL Option Updated"
    3059msgstr "无配置选项更新"
    3160
    32 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:52
    33 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:251
     61#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:52
     62#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:251
    3463msgid "UNINSTALL Add Post URL"
    3564msgstr "卸载添加文章链接插件"
    3665
    37 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:60
     66#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:60
    3867#, php-format
    3968msgid "Setting Key '%s' has been deleted."
    4069msgstr "配置选项 '%s' 已被删除"
    4170
    42 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:64
     71#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:64
    4372#, php-format
    4473msgid "Error deleting Setting Key '%s'."
    4574msgstr "删除配置选项'%s'错误"
    4675
    47 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:86
    48 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:219
     76#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:86
     77#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:219
    4978msgid "Uninstall Add Post URL"
    5079msgstr "卸载添加文章链接插件"
    5180
    52 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:87
     81#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:87
    5382#, php-format
    5483msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And Add Post URL Will Be Deactivated Automatically."
    5584msgstr "<a href=\"%s\">点击这里</a>完成卸载,添加文章链接插件会自动停用。"
    5685
    57 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:98
    58 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:118
    59 msgid "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>From</strong> <a href=\"%site_url%\">%site_name%</a>, <strong>post</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
    60 msgstr "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>原创文章,转载请注明:</strong> 转载自<a href=\"%site_url%\">%site_name%</a></p><p><strong>本文链接地址:</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
    61 
    62 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:115
     86#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:115
    6387msgid "Post URL Text"
    6488msgstr "配置选项"
    6589
    66 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:118
     90#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:118
     91msgid "Add Header and/or Footer For Old Posts (Keep selected if in doubt):"
     92msgstr "给以前发表的文章添加自定义文本(若有疑问,请保持该项选中):"
     93
     94#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:124
    6795msgid "Header Text:"
    6896msgstr "Header文本:"
    6997
    70 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:119
     98#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:125
    7199msgid "This text will be inserted at beginning of your post if not empty."
    72100msgstr "如果不为空,这段文字会被插入到你文章的开头"
    73101
    74 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:120
    75 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:135
     102#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:126
     103#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:141
    76104msgid "Allowed Variables:"
    77105msgstr "允许使用的变量:"
    78106
    79 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:122
    80 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:137
     107#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:128
     108#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:143
    81109msgid "<code>%site_url%</code> - the URL of your site"
    82110msgstr "<code>%site_url%</code> - 站点URL"
    83111
    84 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:123
    85 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:138
     112#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:129
     113#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:144
    86114msgid "<code>%site_name%</code> - the name of your site"
    87115msgstr "<code>%site_name%</code> - 站点名称"
    88116
    89 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:124
    90 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:139
     117#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:130
     118#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:145
    91119msgid "<code>%post_url%</code>  - the URL of a post"
    92120msgstr "<code>%post_url%</code>  - 文章URL"
    93121
    94 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:125
    95 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:140
     122#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:131
     123#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:146
    96124msgid "<code>%post_title%</code> -the title of a post"
    97125msgstr "<code>%post_title%</code> - 文章标题"
    98126
    99 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:133
     127#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:139
    100128msgid "Footer Text:"
    101129msgstr "Footer文本:"
    102130
    103 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:134
     131#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:140
    104132msgid "This text will be inserted at end of your post if not empty."
    105133msgstr "如果不为空,这段文字会被插入到你文章的结尾"
    106134
    107 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:148
     135#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:154
    108136msgid "Add To Blog Home:"
    109137msgstr "在博客首页显示:"
    110138
    111 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:154
     139#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:160
    112140msgid "Add To Pages:"
    113141msgstr "在Page页面中显示:"
    114142
    115 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:160
     143#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:166
    116144msgid "Add To Categories:"
    117145msgstr "在分类页面中显示:"
    118146
    119 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:166
     147#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:172
    120148msgid "Add To Tags:"
    121149msgstr "在Tag页面中显示:"
    122150
    123 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:172
     151#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:178
    124152msgid "Add To Archives:"
    125153msgstr "在归档页面中显示:"
    126154
    127 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:178
     155#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:184
    128156msgid "Add To Single:"
    129157msgstr "在单篇文章中显示:"
    130158
    131 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:184
     159#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:190
    132160msgid "Add To Feed:"
    133161msgstr "在Feed中显示:"
    134162
    135 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:190
    136 msgid "Add Header and/or Footer For Existed Posts:"
    137 msgstr "给以前发表的文章添加自定义文本:"
    138 
    139 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:196
     163#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:196
    140164msgid "Help Promote WP-PostURL Plugin:"
    141165msgstr "帮助推广WP-PostURL插件:"
    142166
    143 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:205
     167#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:205
    144168msgid "Save Changes"
    145169msgstr "保存修改"
    146170
    147 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:209
     171#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:209
    148172msgid "Restore Default Values"
    149173msgstr "恢复缺省值"
    150174
    151 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:221
     175#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:221
    152176msgid "Deactivating Add Post URL plugin does not remove any data that may have been created, such as the post URL options. To completely remove this plugin, you can uninstall it here."
    153177msgstr "停用添加文章链接插件不会删除插件创建的数据,例如插件所用的选项值。要完全删除这个插件,请可以在此处选择卸载。"
    154178
    155 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:224
     179#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:224
    156180msgid "WARNING:"
    157181msgstr "警告:"
    158182
    159 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:225
     183#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:225
    160184msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
    161185msgstr "卸载操作不能被撤销。如果您想保留您所做的配置,请先使用WordPress的数据库备份插件来备份你的数据。"
    162186
    163 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:228
     187#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:228
    164188msgid "The following WordPress Options will be DELETED:"
    165189msgstr "下列WordPress选项将被删除:"
    166190
    167 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:233
     191#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:233
    168192msgid "WordPress Options"
    169193msgstr "WordPress选项"
    170194
    171 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:250
    172 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:271
    173 msgid "Yes"
    174 msgstr "是"
    175 
    176 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:251
     195#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:251
    177196msgid ""
    178197"You Are About To Uninstall Add Post URL From WordPress.\\n"
     
    186205" 要停止卸载,请选择 [取消], 选择 [确定] 继续卸载。"
    187206
    188 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:42
    189 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:43
    190 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:281
    191 msgid "Add Post URL"
    192 msgstr "添加文章链接"
    193 
    194 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:106
    195 #, php-format
    196 msgid "<div style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\"><p>Post Footer automatically generated by <a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl plugin</a> for wordpress.</p></div>"
    197 msgstr "<p style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\">文章的脚注信息由WordPress的<a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl插件</a>自动生成</p>"
    198 
    199 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:269
    200 msgid "Add Post URL?"
    201 msgstr "添加文章链接?"
    202 
    203 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:272
    204 msgid "No"
    205 msgstr "否"
    206 
    207207#~ msgid "User Specific String:"
    208208#~ msgstr "用户自定义字符串:"
    209 
    210209#~ msgid "Add To Beginning:"
    211210#~ msgstr "添加到文章开头:"
    212 
    213211#~ msgid "User Specific Inner Post Text:"
    214212#~ msgstr "用户自定义文内字符串:"
    215 
    216213#~ msgid ""
    217214#~ "If not empty, string \"<code>%wpurl%</code>\" within your post content "
     
    219216#~ msgstr ""
    220217#~ "如果不为空,文章内容中的\"<code>%wpurl%</code>\"字符串会被替换成此内容。"
    221 
    222218#~ msgid ""
    223219#~ "Also allow these variables: <code>%site_url%</code>, <code>%site_name%</"
     
    226222#~ "支持下列变量: <code>%site_url%</code>, <code>%site_name%</code> , <code>%"
    227223#~ "post_url%</code>和<code>%post_title%</code>."
    228 
    229224#~ msgid ""
    230225#~ "<strong>Note:</strong> Use this feature with care. If you disable this "
     
    235230#~ "了WP-PostURL插件,你文章中的\"<code>%wpurl%</code>\"字符串会被原封不动的显"
    236231#~ "示出来."
    237 
    238232#~ msgid "Keep Plugin Credit:"
    239233#~ msgstr "保留插件版权:"
    240 
    241234#~ msgid "Post Copyright String:"
    242235#~ msgstr "文章版权信息:"
     236
  • wp-posturl/trunk/wp-posturl.php

    r492491 r493699  
    44Plugin URI: http://easwy.com/blog/wordpress/wp-posturl/
    55Description: This plugin allows you to insert a user specific text (such as copyright, credit, advertisement, etc.) at the beginning/ending of your posts. You can also decide which posts display the specific text.
    6 Version: 2.0.1
     6Version: 2.0.2
    77Author: Easwy Yang
    88Author URI: http://easwy.com/
     
    121121    if ($posturl_options = get_option('posturl_options'))
    122122    {
    123         if (isset($posturl_options['add_credit']))
    124         {
    125             if ($posturl_options['add_credit'] == 'Yes'
    126                 || $posturl_options['add_credit'] == true)
     123        if (array_key_exists('add_credit', $posturl_options))
     124        {
     125            if ($posturl_options['add_credit'] == 'No'
     126                || $posturl_options['add_credit'] == false)
     127            {
     128                $posturl_options['add_credit'] = false;
     129            }
     130            else
    127131            {
    128132                $posturl_options['add_credit'] = true;
    129133            }
    130             else
    131             {
    132                 $posturl_options['add_credit'] = false;
    133             }
    134134        }
    135135        else
     
    139139
    140140        // Upgrade add_to_beginning
    141         if (isset($posturl_options['add_to_beginning']))
     141        if (array_key_exists('add_to_beginning', $posturl_options))
    142142        {
    143143            if ($posturl_options['add_to_beginning'] == 'No')
    144144            {
    145                 if (isset($posturl_options['post_url_text']))
     145                if (array_key_exists('post_url_text', $posturl_options))
    146146                {
    147147                    $posturl_options['footer_text'] = $posturl_options['post_url_text'];
     
    154154            else
    155155            {
    156                 if (isset($posturl_options['post_url_text']))
     156                if (array_key_exists('post_url_text', $posturl_options))
    157157                {
    158158                    $posturl_options['header_text'] = $posturl_options['post_url_text'];
     
    170170        else
    171171        {
    172             if (!isset($posturl_options['header_text']))
     172            if (!array_key_exists('header_text', $posturl_options))
    173173            {
    174174                $posturl_options['header_text'] = '';
    175175            }
    176176
    177             if (!isset($posturl_options['footer_text']))
     177            if (!array_key_exists('footer_text', $posturl_options))
    178178            {
    179179                $posturl_options['footer_text'] = $default_footer_text;
     
    185185        }
    186186
    187         if (!isset($posturl_options['add_to_home']))
     187        if (!array_key_exists('add_to_home', $posturl_options))
    188188        {
    189189            $posturl_options['add_to_home'] = false;
    190190        }
    191191
    192         if (!isset($posturl_options['add_to_category']))
     192        if (!array_key_exists('add_to_category', $posturl_options))
    193193        {
    194194            $posturl_options['add_to_category'] = false;
    195195        }
    196196
    197         if (!isset($posturl_options['add_to_tag']))
     197        if (!array_key_exists('add_to_tag', $posturl_options))
    198198        {
    199199            $posturl_options['add_to_tag'] = false;
    200200        }
    201201
    202         if (!isset($posturl_options['add_to_archive']))
     202        if (!array_key_exists('add_to_archive', $posturl_options))
    203203        {
    204204            $posturl_options['add_to_archive'] = false;
    205205        }
    206206
    207         if (!isset($posturl_options['add_to_single']))
     207        if (!array_key_exists('add_to_single', $posturl_options))
    208208        {
    209209            $posturl_options['add_to_single'] = true;
    210210        }
    211211
    212         if (!isset($posturl_options['add_to_feed']))
     212        if (!array_key_exists('add_to_feed', $posturl_options))
    213213        {
    214214            $posturl_options['add_to_feed'] = false;
    215215        }
    216216
    217         if (!isset($posturl_options['add_to_page']))
     217        if (!array_key_exists('add_to_page', $posturl_options))
    218218        {
    219219            $posturl_options['add_to_page'] = false;
    220220        }
    221221
    222         if (!isset($posturl_options['add_url_by_default']))
    223         {
    224             $posturl_options['add_url_by_default'] = true;
    225         }
     222        /*
     223         * To fix the problem in 2.0.1, set to true by default
     224         * It may change the user configuration if you re-install/re-activate
     225         * the plugin
     226         */
     227        /*
     228         *if (!array_key_exists('add_url_by_default', $posturl_options))
     229         *{
     230         *    $posturl_options['add_url_by_default'] = true;
     231         *}
     232         */
     233        $posturl_options['add_url_by_default'] = true;
    226234
    227235        // refresh options
    228         //update_option('posturl_options', $posturl_options);
    229236        delete_option('posturl_options');
    230237        add_option('posturl_options', $posturl_options);
  • wp-posturl/trunk/wp-posturl.pot

    r492558 r493699  
    33"Project-Id-Version: wp-posturl\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-01-20 17:33+0800\n"
     5"POT-Creation-Date: 2012-01-23 13:25+0800\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Easwy Yang <easwy.mail@gmail.com>\n"
     
    1515"X-Poedit-KeywordsList: __;_e\n"
    1616"X-Poedit-Basepath: .\n"
    17 "X-Poedit-SearchPath-0: L:\\workspace\\wordpress\\wp-posturl\\trunk\n"
    18 
    19 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:36
    20 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:114
     17"X-Poedit-SearchPath-0: /home/eyang/05workspace/wordpress/wp-posturl/trunk\n"
     18
     19#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:42
     20#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:43
     21#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:288
     22msgid "Add Post URL"
     23msgstr ""
     24
     25#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:106
     26#, php-format
     27msgid "<div style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\"><p>Post Footer automatically generated by <a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl plugin</a> for wordpress.</p></div>"
     28msgstr ""
     29
     30#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:118
     31#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:98
     32msgid "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>From</strong> <a href=\"%site_url%\">%site_name%</a>, <strong>post</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
     33msgstr ""
     34
     35#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:276
     36msgid "Add Post URL?"
     37msgstr ""
     38
     39#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:278
     40#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:250
     41msgid "Yes"
     42msgstr ""
     43
     44#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/wp-posturl.php:279
     45msgid "No"
     46msgstr ""
     47
     48#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:36
     49#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:114
    2150msgid "Post URL Options"
    2251msgstr ""
    2352
    24 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:41
     53#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:41
    2554msgid "Updated"
    2655msgstr ""
    2756
    28 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:46
     57#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:46
    2958msgid "No Post URL Option Updated"
    3059msgstr ""
    3160
    32 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:52
    33 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:251
     61#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:52
     62#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:251
    3463msgid "UNINSTALL Add Post URL"
    3564msgstr ""
    3665
    37 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:60
     66#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:60
    3867#, php-format
    3968msgid "Setting Key '%s' has been deleted."
    4069msgstr ""
    4170
    42 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:64
     71#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:64
    4372#, php-format
    4473msgid "Error deleting Setting Key '%s'."
    4574msgstr ""
    4675
    47 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:86
    48 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:219
     76#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:86
     77#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:219
    4978msgid "Uninstall Add Post URL"
    5079msgstr ""
    5180
    52 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:87
     81#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:87
    5382#, php-format
    5483msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And Add Post URL Will Be Deactivated Automatically."
    5584msgstr ""
    5685
    57 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:98
    58 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:118
    59 msgid "<div style=\"margin-top: 15px; font-style: italic\"><p><strong>From</strong> <a href=\"%site_url%\">%site_name%</a>, <strong>post</strong> <a href=\"%post_url%\">%post_title%</a></p></div>"
    60 msgstr ""
    61 
    62 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:115
     86#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:115
    6387msgid "Post URL Text"
    6488msgstr ""
    6589
    66 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:118
     90#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:118
     91msgid "Add Header and/or Footer For Old Posts (Keep selected if in doubt):"
     92msgstr ""
     93
     94#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:124
    6795msgid "Header Text:"
    6896msgstr ""
    6997
    70 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:119
     98#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:125
    7199msgid "This text will be inserted at beginning of your post if not empty."
    72100msgstr ""
    73101
    74 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:120
    75 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:135
     102#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:126
     103#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:141
    76104msgid "Allowed Variables:"
    77105msgstr ""
    78106
    79 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:122
    80 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:137
     107#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:128
     108#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:143
    81109msgid "<code>%site_url%</code> - the URL of your site"
    82110msgstr ""
    83111
    84 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:123
    85 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:138
     112#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:129
     113#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:144
    86114msgid "<code>%site_name%</code> - the name of your site"
    87115msgstr ""
    88116
    89 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:124
    90 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:139
     117#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:130
     118#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:145
    91119msgid "<code>%post_url%</code>  - the URL of a post"
    92120msgstr ""
    93121
    94 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:125
    95 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:140
     122#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:131
     123#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:146
    96124msgid "<code>%post_title%</code> -the title of a post"
    97125msgstr ""
    98126
    99 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:133
     127#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:139
    100128msgid "Footer Text:"
    101129msgstr ""
    102130
    103 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:134
     131#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:140
    104132msgid "This text will be inserted at end of your post if not empty."
    105133msgstr ""
    106134
    107 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:148
     135#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:154
    108136msgid "Add To Blog Home:"
    109137msgstr ""
    110138
    111 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:154
     139#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:160
    112140msgid "Add To Pages:"
    113141msgstr ""
    114142
    115 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:160
     143#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:166
    116144msgid "Add To Categories:"
    117145msgstr ""
    118146
    119 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:166
     147#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:172
    120148msgid "Add To Tags:"
    121149msgstr ""
    122150
    123 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:172
     151#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:178
    124152msgid "Add To Archives:"
    125153msgstr ""
    126154
    127 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:178
     155#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:184
    128156msgid "Add To Single:"
    129157msgstr ""
    130158
    131 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:184
     159#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:190
    132160msgid "Add To Feed:"
    133161msgstr ""
    134162
    135 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:190
    136 msgid "Add Header and/or Footer For Existed Posts:"
    137 msgstr ""
    138 
    139 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:196
     163#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:196
    140164msgid "Help Promote WP-PostURL Plugin:"
    141165msgstr ""
    142166
    143 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:205
     167#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:205
    144168msgid "Save Changes"
    145169msgstr ""
    146170
    147 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:209
     171#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:209
    148172msgid "Restore Default Values"
    149173msgstr ""
    150174
    151 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:221
     175#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:221
    152176msgid "Deactivating Add Post URL plugin does not remove any data that may have been created, such as the post URL options. To completely remove this plugin, you can uninstall it here."
    153177msgstr ""
    154178
    155 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:224
     179#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:224
    156180msgid "WARNING:"
    157181msgstr ""
    158182
    159 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:225
     183#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:225
    160184msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
    161185msgstr ""
    162186
    163 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:228
     187#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:228
    164188msgid "The following WordPress Options will be DELETED:"
    165189msgstr ""
    166190
    167 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:233
     191#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:233
    168192msgid "WordPress Options"
    169193msgstr ""
    170194
    171 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:250
    172 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:271
    173 msgid "Yes"
    174 msgstr ""
    175 
    176 #: L:\workspace\wordpress\wp-posturl\trunk/posturl-options.php:251
     195#: /home/eyang/05workspace/wordpress/wp-posturl/trunk/posturl-options.php:251
    177196msgid ""
    178197"You Are About To Uninstall Add Post URL From WordPress.\\n"
     
    182201msgstr ""
    183202
    184 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:42
    185 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:43
    186 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:281
    187 msgid "Add Post URL"
    188 msgstr ""
    189 
    190 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:106
    191 #, php-format
    192 msgid "<div style=\"margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%%; font-style: italic\"><p>Post Footer automatically generated by <a href=\"%1$s\" style=\"color: #8888FF; text-decoration: underline;\">wp-posturl plugin</a> for wordpress.</p></div>"
    193 msgstr ""
    194 
    195 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:269
    196 msgid "Add Post URL?"
    197 msgstr ""
    198 
    199 #: L:\workspace\wordpress\wp-posturl\trunk/wp-posturl.php:272
    200 msgid "No"
    201 msgstr ""
    202 
Note: See TracChangeset for help on using the changeset viewer.