Version Description
- User's PHP code displayed on settings page are escaped for output by
htmlentities()
instead ofesc_attr()
for prevent converting characters to HTML entities. - Added global constant for plugin text-domain.
- Russian translation improved.
Download this release
Release Info
Developer | Arthur Gareginyan |
Plugin | My Custom Functions |
Version | 3.3 |
Comparing to | |
See all releases |
Code changes from version 3.2 to 3.3
- inc/php/settings_page.php +19 -19
- languages/my-custom-functions-ru_RU.mo +0 -0
- languages/my-custom-functions-ru_RU.po +40 -27
- languages/my-custom-functions-zh_TW.mo +0 -0
- languages/my-custom-functions-zh_TW.po +27 -22
- languages/my-custom-functions.pot +26 -21
- my-custom-functions.php +8 -7
- readme.txt +5 -1
inc/php/settings_page.php
CHANGED
@@ -10,7 +10,7 @@ defined('ABSPATH') or die("Restricted access!");
|
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
-
* @since 3.
|
14 |
*/
|
15 |
function MCFunctions_render_submenu_page() {
|
16 |
|
@@ -20,7 +20,7 @@ function MCFunctions_render_submenu_page() {
|
|
20 |
// Successful message
|
21 |
?>
|
22 |
<div id="message" class="updated">
|
23 |
-
<p><?php _e( 'Custom functions updated successfully.',
|
24 |
</div>
|
25 |
<?php
|
26 |
}
|
@@ -31,8 +31,8 @@ function MCFunctions_render_submenu_page() {
|
|
31 |
?>
|
32 |
<div id="message" class="error">
|
33 |
<p>
|
34 |
-
<?php _e( 'Sorry, but your code causes a "Fatal error", so it is not applied!',
|
35 |
-
<?php _e( 'Please, check the code and try again.',
|
36 |
</p>
|
37 |
</div>
|
38 |
<?php
|
@@ -42,10 +42,10 @@ function MCFunctions_render_submenu_page() {
|
|
42 |
?>
|
43 |
<div class="wrap">
|
44 |
<h2>
|
45 |
-
<?php _e( 'My Custom Functions',
|
46 |
<br/>
|
47 |
<span>
|
48 |
-
<?php _e( 'by <a href="http://www.arthurgareginyan.com" target="_blank">Arthur Gareginyan</a>',
|
49 |
<span/>
|
50 |
</h2>
|
51 |
|
@@ -56,29 +56,29 @@ function MCFunctions_render_submenu_page() {
|
|
56 |
<div id="side-sortables" class="meta-box-sortabless ui-sortable">
|
57 |
|
58 |
<div id="about" class="postbox">
|
59 |
-
<h3 class="title"><?php _e( 'About',
|
60 |
<div class="inside">
|
61 |
-
<p><?php _e( 'This plugin allows you to easily and safely add your custome functions (PHP code) to your website.',
|
62 |
</div>
|
63 |
</div>
|
64 |
|
65 |
<div id="using" class="postbox">
|
66 |
-
<h3 class="title"><?php _e( 'Using',
|
67 |
<div class="inside">
|
68 |
-
<p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!',
|
69 |
</div>
|
70 |
</div>
|
71 |
|
72 |
<div id="help" class="postbox">
|
73 |
-
<h3 class="title"><?php _e( 'Help',
|
74 |
<div class="inside">
|
75 |
-
<p><?php _e( 'Got something to say? Need help?',
|
76 |
<p><a href="mailto:arthurgareginyan@gmail.com?subject=My Custom Functions">arthurgareginyan@gmail.com</a></p>
|
77 |
</div>
|
78 |
</div>
|
79 |
|
80 |
<div id="upgrade" class="postbox">
|
81 |
-
<h3 class="title"><?php _e( 'Upgrade',
|
82 |
<div class="inside">
|
83 |
<a href="https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html" target="_blank">
|
84 |
<img src="<?php echo plugins_url('../img/pro-version.png', __FILE__); ?>" alt="PRO">
|
@@ -87,13 +87,13 @@ function MCFunctions_render_submenu_page() {
|
|
87 |
</div>
|
88 |
|
89 |
<div id="donate" class="postbox">
|
90 |
-
<h3 class="title"><?php _e( 'Donate',
|
91 |
<div class="inside">
|
92 |
-
<p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.',
|
93 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
|
94 |
<img src="<?php echo plugins_url('../img/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
|
95 |
</a>
|
96 |
-
<p><?php _e( 'Thanks for your support!',
|
97 |
</div>
|
98 |
</div>
|
99 |
|
@@ -117,18 +117,18 @@ function MCFunctions_render_submenu_page() {
|
|
117 |
?>
|
118 |
<div class="postbox">
|
119 |
<h3 class="title">
|
120 |
-
<label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions (PHP code)',
|
121 |
<div class="trigger">
|
122 |
<input type="checkbox" name="anarcho_cfunctions_settings[enable]" id="anarcho_cfunctions_settings[enable]" <?php echo $enable; ?> >
|
123 |
<label for="anarcho_cfunctions_settings[enable]"></label>
|
124 |
</div>
|
125 |
</h3>
|
126 |
<div class="inside">
|
127 |
-
<textarea name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo
|
128 |
</div>
|
129 |
</div>
|
130 |
|
131 |
-
<?php submit_button( __( 'Save Changes',
|
132 |
|
133 |
</form>
|
134 |
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
+
* @since 3.3
|
14 |
*/
|
15 |
function MCFunctions_render_submenu_page() {
|
16 |
|
20 |
// Successful message
|
21 |
?>
|
22 |
<div id="message" class="updated">
|
23 |
+
<p><?php _e( 'Custom functions updated successfully.', MCFUNC_TEXT ); ?></p>
|
24 |
</div>
|
25 |
<?php
|
26 |
}
|
31 |
?>
|
32 |
<div id="message" class="error">
|
33 |
<p>
|
34 |
+
<?php _e( 'Sorry, but your code causes a "Fatal error", so it is not applied!', MCFUNC_TEXT ); ?><br/>
|
35 |
+
<?php _e( 'Please, check the code and try again.', MCFUNC_TEXT ); ?>
|
36 |
</p>
|
37 |
</div>
|
38 |
<?php
|
42 |
?>
|
43 |
<div class="wrap">
|
44 |
<h2>
|
45 |
+
<?php _e( 'My Custom Functions', MCFUNC_TEXT ); ?>
|
46 |
<br/>
|
47 |
<span>
|
48 |
+
<?php _e( 'by <a href="http://www.arthurgareginyan.com" target="_blank">Arthur Gareginyan</a>', MCFUNC_TEXT ); ?>
|
49 |
<span/>
|
50 |
</h2>
|
51 |
|
56 |
<div id="side-sortables" class="meta-box-sortabless ui-sortable">
|
57 |
|
58 |
<div id="about" class="postbox">
|
59 |
+
<h3 class="title"><?php _e( 'About', MCFUNC_TEXT ); ?></a></h3>
|
60 |
<div class="inside">
|
61 |
+
<p><?php _e( 'This plugin allows you to easily and safely add your custome functions (PHP code) to your website.', MCFUNC_TEXT ); ?></p>
|
62 |
</div>
|
63 |
</div>
|
64 |
|
65 |
<div id="using" class="postbox">
|
66 |
+
<h3 class="title"><?php _e( 'Using', MCFUNC_TEXT ); ?></a></h3>
|
67 |
<div class="inside">
|
68 |
+
<p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!', MCFUNC_TEXT ); ?></p>
|
69 |
</div>
|
70 |
</div>
|
71 |
|
72 |
<div id="help" class="postbox">
|
73 |
+
<h3 class="title"><?php _e( 'Help', MCFUNC_TEXT ); ?></h3>
|
74 |
<div class="inside">
|
75 |
+
<p><?php _e( 'Got something to say? Need help?', MCFUNC_TEXT ); ?></p>
|
76 |
<p><a href="mailto:arthurgareginyan@gmail.com?subject=My Custom Functions">arthurgareginyan@gmail.com</a></p>
|
77 |
</div>
|
78 |
</div>
|
79 |
|
80 |
<div id="upgrade" class="postbox">
|
81 |
+
<h3 class="title"><?php _e( 'Upgrade', MCFUNC_TEXT ); ?></h3>
|
82 |
<div class="inside">
|
83 |
<a href="https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html" target="_blank">
|
84 |
<img src="<?php echo plugins_url('../img/pro-version.png', __FILE__); ?>" alt="PRO">
|
87 |
</div>
|
88 |
|
89 |
<div id="donate" class="postbox">
|
90 |
+
<h3 class="title"><?php _e( 'Donate', MCFUNC_TEXT ); ?></h3>
|
91 |
<div class="inside">
|
92 |
+
<p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.', MCFUNC_TEXT ); ?></p>
|
93 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
|
94 |
<img src="<?php echo plugins_url('../img/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
|
95 |
</a>
|
96 |
+
<p><?php _e( 'Thanks for your support!', MCFUNC_TEXT ); ?></p>
|
97 |
</div>
|
98 |
</div>
|
99 |
|
117 |
?>
|
118 |
<div class="postbox">
|
119 |
<h3 class="title">
|
120 |
+
<label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions (PHP code)', MCFUNC_TEXT ); ?></label>
|
121 |
<div class="trigger">
|
122 |
<input type="checkbox" name="anarcho_cfunctions_settings[enable]" id="anarcho_cfunctions_settings[enable]" <?php echo $enable; ?> >
|
123 |
<label for="anarcho_cfunctions_settings[enable]"></label>
|
124 |
</div>
|
125 |
</h3>
|
126 |
<div class="inside">
|
127 |
+
<textarea name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo htmlentities( $content ); ?></textarea>
|
128 |
</div>
|
129 |
</div>
|
130 |
|
131 |
+
<?php submit_button( __( 'Save Changes', MCFUNC_TEXT ), 'primary', 'submit', true ); ?>
|
132 |
|
133 |
</form>
|
134 |
|
languages/my-custom-functions-ru_RU.mo
CHANGED
Binary file
|
languages/my-custom-functions-ru_RU.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
-
"POT-Creation-Date: 2016-
|
5 |
-
"PO-Revision-Date: 2016-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
@@ -21,25 +21,25 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
#: inc/settings_page.php:23
|
25 |
msgid "Custom functions updated successfully."
|
26 |
msgstr "Пользовательские функции успешно обновлены."
|
27 |
|
28 |
-
#: inc/settings_page.php:34
|
29 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
30 |
msgstr ""
|
31 |
"Извините, но ваш код вызывает \"Fatal error\", так что он не будет применён!"
|
32 |
|
33 |
-
#: inc/settings_page.php:35
|
34 |
msgid "Please, check the code and try again."
|
35 |
msgstr "Пожалуйста, проверьте код и попробуйте ещё раз."
|
36 |
|
37 |
#. Plugin Name of the plugin/theme
|
38 |
-
#: inc/settings_page.php:45 my-custom-functions.php:
|
39 |
msgid "My Custom Functions"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: inc/settings_page.php:48
|
43 |
msgid ""
|
44 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
45 |
"Gareginyan</a>"
|
@@ -47,11 +47,11 @@ msgstr ""
|
|
47 |
"от <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Артур "
|
48 |
"Гарегинян</a>"
|
49 |
|
50 |
-
#: inc/settings_page.php:59
|
51 |
msgid "About"
|
52 |
msgstr "О плагине"
|
53 |
|
54 |
-
#: inc/settings_page.php:61
|
55 |
msgid ""
|
56 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
57 |
"code) to your website."
|
@@ -59,55 +59,61 @@ msgstr ""
|
|
59 |
"Этот плагин даёт вам возможность легко и безопасно добавлять ваши "
|
60 |
"пользовательские функции (PHP код) на ваш веб-сайт."
|
61 |
|
62 |
-
#: inc/settings_page.php:66
|
63 |
msgid "Using"
|
64 |
-
msgstr "
|
65 |
|
66 |
-
#: inc/settings_page.php:68
|
67 |
msgid ""
|
68 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
69 |
"simple!"
|
70 |
msgstr ""
|
71 |
"Для использования, введите ваши пользовательские функции, затем нажмите "
|
72 |
-
"кнопку “Сохранить
|
73 |
|
74 |
-
#: inc/settings_page.php:73
|
75 |
msgid "Help"
|
76 |
msgstr "Помощь"
|
77 |
|
78 |
-
#: inc/settings_page.php:75
|
79 |
msgid "Got something to say? Need help?"
|
80 |
msgstr "Есть что сказать? Нужна помощь?"
|
81 |
|
82 |
-
#: inc/settings_page.php:81
|
|
|
|
|
|
|
|
|
83 |
msgid "Donate"
|
84 |
-
msgstr "
|
85 |
|
86 |
-
#: inc/settings_page.php:
|
87 |
msgid ""
|
88 |
-
"
|
89 |
-
"
|
|
|
90 |
msgstr ""
|
91 |
-
"
|
92 |
-
"
|
|
|
93 |
|
94 |
-
#: inc/settings_page.php:
|
95 |
msgid "Thanks for your support!"
|
96 |
msgstr "Спасибо за вашу поддержку!"
|
97 |
|
98 |
-
#: inc/settings_page.php:
|
99 |
msgid "Functions (PHP code)"
|
100 |
msgstr "Функции (PHP код)"
|
101 |
|
102 |
-
#: inc/settings_page.php:
|
103 |
msgid "Save Changes"
|
104 |
msgstr "Сохранить изменения"
|
105 |
|
106 |
-
#: my-custom-functions.php:
|
107 |
msgid "Settings"
|
108 |
msgstr "Настройки"
|
109 |
|
110 |
-
#: my-custom-functions.php:
|
111 |
msgid "Custom Functions"
|
112 |
msgstr "Пользовательские Функции"
|
113 |
|
@@ -132,6 +138,13 @@ msgstr "Артур Гарегинян"
|
|
132 |
msgid "http://www.arthurgareginyan.com"
|
133 |
msgstr ""
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
#~ msgid ""
|
136 |
#~ "If you like this plugin and find it useful, help me to make this plugin "
|
137 |
#~ "even better and keep it up-to-date."
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
+
"POT-Creation-Date: 2016-10-01 04:16+0300\n"
|
5 |
+
"PO-Revision-Date: 2016-10-01 04:16+0300\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#: inc/php/settings_page.php:23
|
25 |
msgid "Custom functions updated successfully."
|
26 |
msgstr "Пользовательские функции успешно обновлены."
|
27 |
|
28 |
+
#: inc/php/settings_page.php:34
|
29 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
30 |
msgstr ""
|
31 |
"Извините, но ваш код вызывает \"Fatal error\", так что он не будет применён!"
|
32 |
|
33 |
+
#: inc/php/settings_page.php:35
|
34 |
msgid "Please, check the code and try again."
|
35 |
msgstr "Пожалуйста, проверьте код и попробуйте ещё раз."
|
36 |
|
37 |
#. Plugin Name of the plugin/theme
|
38 |
+
#: inc/php/settings_page.php:45 my-custom-functions.php:85
|
39 |
msgid "My Custom Functions"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: inc/php/settings_page.php:48
|
43 |
msgid ""
|
44 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
45 |
"Gareginyan</a>"
|
47 |
"от <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Артур "
|
48 |
"Гарегинян</a>"
|
49 |
|
50 |
+
#: inc/php/settings_page.php:59
|
51 |
msgid "About"
|
52 |
msgstr "О плагине"
|
53 |
|
54 |
+
#: inc/php/settings_page.php:61
|
55 |
msgid ""
|
56 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
57 |
"code) to your website."
|
59 |
"Этот плагин даёт вам возможность легко и безопасно добавлять ваши "
|
60 |
"пользовательские функции (PHP код) на ваш веб-сайт."
|
61 |
|
62 |
+
#: inc/php/settings_page.php:66
|
63 |
msgid "Using"
|
64 |
+
msgstr "Как пользоваться"
|
65 |
|
66 |
+
#: inc/php/settings_page.php:68
|
67 |
msgid ""
|
68 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
69 |
"simple!"
|
70 |
msgstr ""
|
71 |
"Для использования, введите ваши пользовательские функции, затем нажмите "
|
72 |
+
"кнопку “Сохранить изменения”. Это так просто!"
|
73 |
|
74 |
+
#: inc/php/settings_page.php:73
|
75 |
msgid "Help"
|
76 |
msgstr "Помощь"
|
77 |
|
78 |
+
#: inc/php/settings_page.php:75
|
79 |
msgid "Got something to say? Need help?"
|
80 |
msgstr "Есть что сказать? Нужна помощь?"
|
81 |
|
82 |
+
#: inc/php/settings_page.php:81
|
83 |
+
msgid "Upgrade"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/php/settings_page.php:90
|
87 |
msgid "Donate"
|
88 |
+
msgstr "Поддержать разработку"
|
89 |
|
90 |
+
#: inc/php/settings_page.php:92
|
91 |
msgid ""
|
92 |
+
"I'm an independent developer, without a regular income, so every little "
|
93 |
+
"contribution helps cover my costs and lets me spend more time building "
|
94 |
+
"things for people like you to enjoy."
|
95 |
msgstr ""
|
96 |
+
"Я независимый разработчик, без регулярного дохода, так что каждый маленький "
|
97 |
+
"вклад помогает мне покрыть затраты и позволяет тратить больше времени на "
|
98 |
+
"создание программ для людей как вы."
|
99 |
|
100 |
+
#: inc/php/settings_page.php:96
|
101 |
msgid "Thanks for your support!"
|
102 |
msgstr "Спасибо за вашу поддержку!"
|
103 |
|
104 |
+
#: inc/php/settings_page.php:120
|
105 |
msgid "Functions (PHP code)"
|
106 |
msgstr "Функции (PHP код)"
|
107 |
|
108 |
+
#: inc/php/settings_page.php:131
|
109 |
msgid "Save Changes"
|
110 |
msgstr "Сохранить изменения"
|
111 |
|
112 |
+
#: my-custom-functions.php:73
|
113 |
msgid "Settings"
|
114 |
msgstr "Настройки"
|
115 |
|
116 |
+
#: my-custom-functions.php:85
|
117 |
msgid "Custom Functions"
|
118 |
msgstr "Пользовательские Функции"
|
119 |
|
138 |
msgid "http://www.arthurgareginyan.com"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#~ msgid ""
|
142 |
+
#~ "If you like this plugin and find it useful, please help me to make this "
|
143 |
+
#~ "plugin even better and keep it up-to-date."
|
144 |
+
#~ msgstr ""
|
145 |
+
#~ "Если вам нравится этот плагин и вы находите его полезным, то пожалуйста "
|
146 |
+
#~ "помогите мне сделать его ещё лучше."
|
147 |
+
|
148 |
#~ msgid ""
|
149 |
#~ "If you like this plugin and find it useful, help me to make this plugin "
|
150 |
#~ "even better and keep it up-to-date."
|
languages/my-custom-functions-zh_TW.mo
CHANGED
Binary file
|
languages/my-custom-functions-zh_TW.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
-
"POT-Creation-Date: 2016-
|
5 |
-
"PO-Revision-Date: 2016-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: zh_TW\n"
|
@@ -20,85 +20,90 @@ msgstr ""
|
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
-
#: inc/settings_page.php:23
|
24 |
msgid "Custom functions updated successfully."
|
25 |
msgstr "自訂功能已成功更新"
|
26 |
|
27 |
-
#: inc/settings_page.php:34
|
28 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
29 |
msgstr "抱歉!您的程式碼造成了「嚴重錯誤」,所以並沒有套用它!"
|
30 |
|
31 |
-
#: inc/settings_page.php:35
|
32 |
msgid "Please, check the code and try again."
|
33 |
msgstr "請重新檢查程式碼再試一次"
|
34 |
|
35 |
#. Plugin Name of the plugin/theme
|
36 |
-
#: inc/settings_page.php:45 my-custom-functions.php:
|
37 |
msgid "My Custom Functions"
|
38 |
msgstr "我的自訂功能"
|
39 |
|
40 |
-
#: inc/settings_page.php:48
|
41 |
msgid ""
|
42 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
43 |
"Gareginyan</a>"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: inc/settings_page.php:59
|
47 |
msgid "About"
|
48 |
msgstr "關於"
|
49 |
|
50 |
-
#: inc/settings_page.php:61
|
51 |
msgid ""
|
52 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
53 |
"code) to your website."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: inc/settings_page.php:66
|
57 |
msgid "Using"
|
58 |
msgstr "用法"
|
59 |
|
60 |
-
#: inc/settings_page.php:68
|
61 |
msgid ""
|
62 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
63 |
"simple!"
|
64 |
msgstr ""
|
65 |
"要使用它,請輸入您的自訂功能然後按下「儲存變更」就可以了,就是這麼簡單!"
|
66 |
|
67 |
-
#: inc/settings_page.php:73
|
68 |
msgid "Help"
|
69 |
msgstr "幫助"
|
70 |
|
71 |
-
#: inc/settings_page.php:75
|
72 |
msgid "Got something to say? Need help?"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: inc/settings_page.php:81
|
|
|
|
|
|
|
|
|
76 |
msgid "Donate"
|
77 |
msgstr "捐款"
|
78 |
|
79 |
-
#: inc/settings_page.php:
|
80 |
msgid ""
|
81 |
-
"
|
82 |
-
"
|
|
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: inc/settings_page.php:
|
86 |
msgid "Thanks for your support!"
|
87 |
msgstr "謝謝您的贊助!"
|
88 |
|
89 |
-
#: inc/settings_page.php:
|
90 |
msgid "Functions (PHP code)"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: inc/settings_page.php:
|
94 |
msgid "Save Changes"
|
95 |
msgstr "儲存變更"
|
96 |
|
97 |
-
#: my-custom-functions.php:
|
98 |
msgid "Settings"
|
99 |
msgstr "設定"
|
100 |
|
101 |
-
#: my-custom-functions.php:
|
102 |
msgid "Custom Functions"
|
103 |
msgstr "自訂功能"
|
104 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
+
"POT-Creation-Date: 2016-09-20 03:22+0300\n"
|
5 |
+
"PO-Revision-Date: 2016-09-20 03:22+0300\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: zh_TW\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
+
#: inc/php/settings_page.php:23
|
24 |
msgid "Custom functions updated successfully."
|
25 |
msgstr "自訂功能已成功更新"
|
26 |
|
27 |
+
#: inc/php/settings_page.php:34
|
28 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
29 |
msgstr "抱歉!您的程式碼造成了「嚴重錯誤」,所以並沒有套用它!"
|
30 |
|
31 |
+
#: inc/php/settings_page.php:35
|
32 |
msgid "Please, check the code and try again."
|
33 |
msgstr "請重新檢查程式碼再試一次"
|
34 |
|
35 |
#. Plugin Name of the plugin/theme
|
36 |
+
#: inc/php/settings_page.php:45 my-custom-functions.php:85
|
37 |
msgid "My Custom Functions"
|
38 |
msgstr "我的自訂功能"
|
39 |
|
40 |
+
#: inc/php/settings_page.php:48
|
41 |
msgid ""
|
42 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
43 |
"Gareginyan</a>"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: inc/php/settings_page.php:59
|
47 |
msgid "About"
|
48 |
msgstr "關於"
|
49 |
|
50 |
+
#: inc/php/settings_page.php:61
|
51 |
msgid ""
|
52 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
53 |
"code) to your website."
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: inc/php/settings_page.php:66
|
57 |
msgid "Using"
|
58 |
msgstr "用法"
|
59 |
|
60 |
+
#: inc/php/settings_page.php:68
|
61 |
msgid ""
|
62 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
63 |
"simple!"
|
64 |
msgstr ""
|
65 |
"要使用它,請輸入您的自訂功能然後按下「儲存變更」就可以了,就是這麼簡單!"
|
66 |
|
67 |
+
#: inc/php/settings_page.php:73
|
68 |
msgid "Help"
|
69 |
msgstr "幫助"
|
70 |
|
71 |
+
#: inc/php/settings_page.php:75
|
72 |
msgid "Got something to say? Need help?"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: inc/php/settings_page.php:81
|
76 |
+
msgid "Upgrade"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: inc/php/settings_page.php:90
|
80 |
msgid "Donate"
|
81 |
msgstr "捐款"
|
82 |
|
83 |
+
#: inc/php/settings_page.php:92
|
84 |
msgid ""
|
85 |
+
"I'm an independent developer, without a regular income, so every little "
|
86 |
+
"contribution helps cover my costs and lets me spend more time building "
|
87 |
+
"things for people like you to enjoy."
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: inc/php/settings_page.php:96
|
91 |
msgid "Thanks for your support!"
|
92 |
msgstr "謝謝您的贊助!"
|
93 |
|
94 |
+
#: inc/php/settings_page.php:120
|
95 |
msgid "Functions (PHP code)"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: inc/php/settings_page.php:131
|
99 |
msgid "Save Changes"
|
100 |
msgstr "儲存變更"
|
101 |
|
102 |
+
#: my-custom-functions.php:73
|
103 |
msgid "Settings"
|
104 |
msgstr "設定"
|
105 |
|
106 |
+
#: my-custom-functions.php:85
|
107 |
msgid "Custom Functions"
|
108 |
msgstr "自訂功能"
|
109 |
|
languages/my-custom-functions.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: My Custom Functions\n"
|
6 |
-
"POT-Creation-Date: 2016-
|
7 |
"PO-Revision-Date: 2015-08-30 16:22+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
@@ -20,84 +20,89 @@ msgstr ""
|
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
-
#: inc/settings_page.php:23
|
24 |
msgid "Custom functions updated successfully."
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: inc/settings_page.php:34
|
28 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: inc/settings_page.php:35
|
32 |
msgid "Please, check the code and try again."
|
33 |
msgstr ""
|
34 |
|
35 |
#. Plugin Name of the plugin/theme
|
36 |
-
#: inc/settings_page.php:45 my-custom-functions.php:
|
37 |
msgid "My Custom Functions"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: inc/settings_page.php:48
|
41 |
msgid ""
|
42 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
43 |
"Gareginyan</a>"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: inc/settings_page.php:59
|
47 |
msgid "About"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: inc/settings_page.php:61
|
51 |
msgid ""
|
52 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
53 |
"code) to your website."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: inc/settings_page.php:66
|
57 |
msgid "Using"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: inc/settings_page.php:68
|
61 |
msgid ""
|
62 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
63 |
"simple!"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: inc/settings_page.php:73
|
67 |
msgid "Help"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: inc/settings_page.php:75
|
71 |
msgid "Got something to say? Need help?"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: inc/settings_page.php:81
|
|
|
|
|
|
|
|
|
75 |
msgid "Donate"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: inc/settings_page.php:
|
79 |
msgid ""
|
80 |
-
"
|
81 |
-
"
|
|
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: inc/settings_page.php:
|
85 |
msgid "Thanks for your support!"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: inc/settings_page.php:
|
89 |
msgid "Functions (PHP code)"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: inc/settings_page.php:
|
93 |
msgid "Save Changes"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: my-custom-functions.php:
|
97 |
msgid "Settings"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: my-custom-functions.php:
|
101 |
msgid "Custom Functions"
|
102 |
msgstr ""
|
103 |
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: My Custom Functions\n"
|
6 |
+
"POT-Creation-Date: 2016-10-01 04:16+0300\n"
|
7 |
"PO-Revision-Date: 2015-08-30 16:22+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
+
#: inc/php/settings_page.php:23
|
24 |
msgid "Custom functions updated successfully."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: inc/php/settings_page.php:34
|
28 |
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: inc/php/settings_page.php:35
|
32 |
msgid "Please, check the code and try again."
|
33 |
msgstr ""
|
34 |
|
35 |
#. Plugin Name of the plugin/theme
|
36 |
+
#: inc/php/settings_page.php:45 my-custom-functions.php:85
|
37 |
msgid "My Custom Functions"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: inc/php/settings_page.php:48
|
41 |
msgid ""
|
42 |
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
43 |
"Gareginyan</a>"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: inc/php/settings_page.php:59
|
47 |
msgid "About"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: inc/php/settings_page.php:61
|
51 |
msgid ""
|
52 |
"This plugin allows you to easily and safely add your custome functions (PHP "
|
53 |
"code) to your website."
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: inc/php/settings_page.php:66
|
57 |
msgid "Using"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: inc/php/settings_page.php:68
|
61 |
msgid ""
|
62 |
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
63 |
"simple!"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: inc/php/settings_page.php:73
|
67 |
msgid "Help"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: inc/php/settings_page.php:75
|
71 |
msgid "Got something to say? Need help?"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: inc/php/settings_page.php:81
|
75 |
+
msgid "Upgrade"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/php/settings_page.php:90
|
79 |
msgid "Donate"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: inc/php/settings_page.php:92
|
83 |
msgid ""
|
84 |
+
"I'm an independent developer, without a regular income, so every little "
|
85 |
+
"contribution helps cover my costs and lets me spend more time building "
|
86 |
+
"things for people like you to enjoy."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: inc/php/settings_page.php:96
|
90 |
msgid "Thanks for your support!"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: inc/php/settings_page.php:120
|
94 |
msgid "Functions (PHP code)"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: inc/php/settings_page.php:131
|
98 |
msgid "Save Changes"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: my-custom-functions.php:73
|
102 |
msgid "Settings"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: my-custom-functions.php:85
|
106 |
msgid "Custom Functions"
|
107 |
msgstr ""
|
108 |
|
my-custom-functions.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Easily and safely add your custome functions (PHP code) directly out of your WordPress Dashboard without need of an external editor.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
-
* Version: 3.
|
9 |
* License: GPL3
|
10 |
* Text Domain: my-custom-functions
|
11 |
* Domain Path: /languages/
|
@@ -40,13 +40,14 @@ defined('ABSPATH') or die("Restricted access!");
|
|
40 |
/**
|
41 |
* Define constants
|
42 |
*
|
43 |
-
* @since 3.
|
44 |
*/
|
45 |
defined('MCFUNC_DIR') or define('MCFUNC_DIR', dirname(plugin_basename(__FILE__)));
|
46 |
defined('MCFUNC_BASE') or define('MCFUNC_BASE', plugin_basename(__FILE__));
|
47 |
defined('MCFUNC_URL') or define('MCFUNC_URL', plugin_dir_url(__FILE__));
|
48 |
defined('MCFUNC_PATH') or define('MCFUNC_PATH', plugin_dir_path(__FILE__));
|
49 |
-
defined('
|
|
|
50 |
|
51 |
/**
|
52 |
* Register text domain
|
@@ -54,7 +55,7 @@ defined('MCFUNC_VERSION') or define('MCFUNC_VERSION', '3.1');
|
|
54 |
* @since 2.2
|
55 |
*/
|
56 |
function MCFunctions_textdomain() {
|
57 |
-
load_plugin_textdomain(
|
58 |
}
|
59 |
add_action( 'init', 'MCFunctions_textdomain' );
|
60 |
|
@@ -69,11 +70,11 @@ add_action( 'init', 'MCFunctions_textdomain' );
|
|
69 |
* @return array Array of links to be output on Plugin Admin page.
|
70 |
*/
|
71 |
function MCFunctions_settings_link( $links ) {
|
72 |
-
$settings_page = '<a href="' . admin_url( 'themes.php?page=my-custom-functions.php' ) .'">' . __( 'Settings',
|
73 |
array_unshift( $links, $settings_page );
|
74 |
return $links;
|
75 |
}
|
76 |
-
add_filter(
|
77 |
|
78 |
/**
|
79 |
* Register "Custom Functions" submenu in "Appearance" Admin Menu
|
@@ -81,7 +82,7 @@ add_filter( "plugin_action_links_".MCFUNC_BASE, 'MCFunctions_settings_link' );
|
|
81 |
* @since 2.2
|
82 |
*/
|
83 |
function MCFunctions_register_submenu_page() {
|
84 |
-
add_theme_page( __( 'My Custom Functions',
|
85 |
}
|
86 |
add_action( 'admin_menu', 'MCFunctions_register_submenu_page' );
|
87 |
|
5 |
* Description: Easily and safely add your custome functions (PHP code) directly out of your WordPress Dashboard without need of an external editor.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
+
* Version: 3.3
|
9 |
* License: GPL3
|
10 |
* Text Domain: my-custom-functions
|
11 |
* Domain Path: /languages/
|
40 |
/**
|
41 |
* Define constants
|
42 |
*
|
43 |
+
* @since 3.3
|
44 |
*/
|
45 |
defined('MCFUNC_DIR') or define('MCFUNC_DIR', dirname(plugin_basename(__FILE__)));
|
46 |
defined('MCFUNC_BASE') or define('MCFUNC_BASE', plugin_basename(__FILE__));
|
47 |
defined('MCFUNC_URL') or define('MCFUNC_URL', plugin_dir_url(__FILE__));
|
48 |
defined('MCFUNC_PATH') or define('MCFUNC_PATH', plugin_dir_path(__FILE__));
|
49 |
+
defined('MCFUNC_TEXT') or define('MCFUNC_TEXT', 'my-custom-functions');
|
50 |
+
defined('MCFUNC_VERSION') or define('MCFUNC_VERSION', '3.3');
|
51 |
|
52 |
/**
|
53 |
* Register text domain
|
55 |
* @since 2.2
|
56 |
*/
|
57 |
function MCFunctions_textdomain() {
|
58 |
+
load_plugin_textdomain( MCFUNC_TEXT, false, MCFUNC_DIR . '/languages/' );
|
59 |
}
|
60 |
add_action( 'init', 'MCFunctions_textdomain' );
|
61 |
|
70 |
* @return array Array of links to be output on Plugin Admin page.
|
71 |
*/
|
72 |
function MCFunctions_settings_link( $links ) {
|
73 |
+
$settings_page = '<a href="' . admin_url( 'themes.php?page=my-custom-functions.php' ) .'">' . __( 'Settings', MCFUNC_TEXT ) . '</a>';
|
74 |
array_unshift( $links, $settings_page );
|
75 |
return $links;
|
76 |
}
|
77 |
+
add_filter( 'plugin_action_links_'.MCFUNC_BASE, 'MCFunctions_settings_link' );
|
78 |
|
79 |
/**
|
80 |
* Register "Custom Functions" submenu in "Appearance" Admin Menu
|
82 |
* @since 2.2
|
83 |
*/
|
84 |
function MCFunctions_register_submenu_page() {
|
85 |
+
add_theme_page( __( 'My Custom Functions', MCFUNC_TEXT ), __( 'Custom Functions', MCFUNC_TEXT ), 'edit_theme_options', basename( __FILE__ ), 'MCFunctions_render_submenu_page' );
|
86 |
}
|
87 |
add_action( 'admin_menu', 'MCFunctions_register_submenu_page' );
|
88 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: code, php, function, snippet, custom, execute, edit, editing, editor, func
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 3.
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
153 |
|
154 |
|
155 |
== Changelog ==
|
|
|
|
|
|
|
|
|
156 |
= 3.2 =
|
157 |
* Added option for easy disable the custom code for cases of WSOD.
|
158 |
* Style sheet of settings page improved.
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 3.3
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
|
154 |
|
155 |
== Changelog ==
|
156 |
+
= 3.3 =
|
157 |
+
* User's PHP code displayed on settings page are escaped for output by `htmlentities()` instead of `esc_attr()` for prevent converting characters to HTML entities.
|
158 |
+
* Added global constant for plugin text-domain.
|
159 |
+
* Russian translation improved.
|
160 |
= 3.2 =
|
161 |
* Added option for easy disable the custom code for cases of WSOD.
|
162 |
* Style sheet of settings page improved.
|