Version Description
- Added Chinese (Taiwan) translation. (Thanks Gordon Yu)
- Text domain changed to "my-custom-functions".
- Added compatibility with the translate.wordpress.org.
Download this release
Release Info
Developer | Arthur Gareginyan |
Plugin | My Custom Functions |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.2
- inc/settings_page.php +20 -20
- languages/{MCFunctions-ru_RU.mo → my-custom-functions-ru_RU.mo} +0 -0
- languages/{MCFunctions-ru_RU.po → my-custom-functions-ru_RU.po} +2 -2
- languages/my-custom-functions-zh_TW.mo +0 -0
- languages/my-custom-functions-zh_TW.po +144 -0
- languages/{MCFunctions.pot → my-custom-functions.pot} +1 -1
- my-custom-functions.php +8 -8
- readme.txt +11 -6
inc/settings_page.php
CHANGED
@@ -10,7 +10,7 @@ defined('ABSPATH') or die("Restricted access!");
|
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
-
* @since 2.
|
14 |
*/
|
15 |
function MCFunctions_render_submenu_page() {
|
16 |
|
@@ -18,7 +18,7 @@ function MCFunctions_render_submenu_page() {
|
|
18 |
if ( isset( $_GET['settings-updated'] ) ) :
|
19 |
?>
|
20 |
<div id="message" class="updated">
|
21 |
-
<p><?php _e( 'Custom functions updated successfully.', '
|
22 |
</div>
|
23 |
<?php
|
24 |
endif;
|
@@ -29,8 +29,8 @@ function MCFunctions_render_submenu_page() {
|
|
29 |
?>
|
30 |
<div id="message" class="error">
|
31 |
<p>
|
32 |
-
<?php _e( 'Sorry, but your code causes a "Fatal error", so it is not applied!', '
|
33 |
-
<?php _e( 'Please, check the code and try again.', '
|
34 |
</p>
|
35 |
</div>
|
36 |
<?php
|
@@ -40,10 +40,10 @@ function MCFunctions_render_submenu_page() {
|
|
40 |
?>
|
41 |
<div class="wrap">
|
42 |
<h2>
|
43 |
-
<?php _e( 'My Custom Functions', '
|
44 |
<br/>
|
45 |
<span>
|
46 |
-
<?php _e( 'by <a href="http://www.arthurgareginyan.com" target="_blank">Arthur "Berserkr" Gareginyan</a>', '
|
47 |
<span/>
|
48 |
</h2>
|
49 |
|
@@ -54,45 +54,45 @@ function MCFunctions_render_submenu_page() {
|
|
54 |
<div id="side-sortables" class="meta-box-sortabless ui-sortable">
|
55 |
|
56 |
<div id="about" class="postbox">
|
57 |
-
<h3 class="title"><?php _e( 'About', '
|
58 |
<div class="inside">
|
59 |
-
<p><?php _e( 'This plugin allows you to easily and safely add your own functions, snippets or any custom code to your website.', '
|
60 |
</div>
|
61 |
</div>
|
62 |
|
63 |
<div id="using" class="postbox">
|
64 |
-
<h3 class="title"><?php _e( 'Using', '
|
65 |
<div class="inside">
|
66 |
-
<p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!', '
|
67 |
</div>
|
68 |
</div>
|
69 |
|
70 |
<div id="help" class="postbox">
|
71 |
-
<h3 class="title"><?php _e( 'Help', '
|
72 |
<div class="inside">
|
73 |
-
<p><?php _e( 'If you want more options then tell me and I will be happy to add it.', '
|
74 |
<p><a href="mailto:arthurgareginyan@gmail.com">arthurgareginyan@gmail.com</a></p>
|
75 |
</div>
|
76 |
</div>
|
77 |
|
78 |
<div id="donate" class="postbox">
|
79 |
-
<h3 class="title"><?php _e( 'Donate', '
|
80 |
<div class="inside">
|
81 |
<img src="<?php echo plugins_url('images/thanks.png', __FILE__); ?>">
|
82 |
-
<p><?php _e( 'If you like this plugin and find it useful, help me to make this plugin even better and keep it up-to-date.', '
|
83 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
|
84 |
<img src="<?php echo plugins_url('images/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
|
85 |
</a>
|
86 |
-
<p><?php _e( 'Thanks for your support!', '
|
87 |
</div>
|
88 |
</div>
|
89 |
|
90 |
<div id="freelance" class="postbox">
|
91 |
-
<h3 class="title"><?php _e( 'Freelance', '
|
92 |
<div class="inside">
|
93 |
<img src="<?php echo plugins_url('images/author.png', __FILE__); ?>">
|
94 |
-
<p><?php _e( 'Hello, my name is Arthur and I\'m a freelance web designer and developer.', '
|
95 |
-
<p><?php _e( 'Share your thoughts with me. You may have a brilliant idea in your mind and I can make it happen, so let’s get started!', '
|
96 |
<p><a href="http://www.arthurgareginyan.com/" target="_blank">www.arthurgareginyan.com</a></p>
|
97 |
</div>
|
98 |
</div>
|
@@ -116,14 +116,14 @@ function MCFunctions_render_submenu_page() {
|
|
116 |
?>
|
117 |
<div class="postbox">
|
118 |
<h3 class="title">
|
119 |
-
<label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions', '
|
120 |
</h3>
|
121 |
<div class="inside">
|
122 |
<textarea name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo esc_attr( $content ); ?></textarea>
|
123 |
</div>
|
124 |
</div>
|
125 |
|
126 |
-
<?php submit_button( __( 'Save Changes', '
|
127 |
|
128 |
</form>
|
129 |
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
+
* @since 2.2
|
14 |
*/
|
15 |
function MCFunctions_render_submenu_page() {
|
16 |
|
18 |
if ( isset( $_GET['settings-updated'] ) ) :
|
19 |
?>
|
20 |
<div id="message" class="updated">
|
21 |
+
<p><?php _e( 'Custom functions updated successfully.', 'my-custom-functions' ); ?></p>
|
22 |
</div>
|
23 |
<?php
|
24 |
endif;
|
29 |
?>
|
30 |
<div id="message" class="error">
|
31 |
<p>
|
32 |
+
<?php _e( 'Sorry, but your code causes a "Fatal error", so it is not applied!', 'my-custom-functions' ); ?><br/>
|
33 |
+
<?php _e( 'Please, check the code and try again.', 'my-custom-functions' ); ?>
|
34 |
</p>
|
35 |
</div>
|
36 |
<?php
|
40 |
?>
|
41 |
<div class="wrap">
|
42 |
<h2>
|
43 |
+
<?php _e( 'My Custom Functions', 'my-custom-functions' ); ?>
|
44 |
<br/>
|
45 |
<span>
|
46 |
+
<?php _e( 'by <a href="http://www.arthurgareginyan.com" target="_blank">Arthur "Berserkr" Gareginyan</a>', 'my-custom-functions' ); ?>
|
47 |
<span/>
|
48 |
</h2>
|
49 |
|
54 |
<div id="side-sortables" class="meta-box-sortabless ui-sortable">
|
55 |
|
56 |
<div id="about" class="postbox">
|
57 |
+
<h3 class="title"><?php _e( 'About', 'my-custom-functions' ) ?></a></h3>
|
58 |
<div class="inside">
|
59 |
+
<p><?php _e( 'This plugin allows you to easily and safely add your own functions, snippets or any custom code to your website.', 'my-custom-functions' ) ?></p>
|
60 |
</div>
|
61 |
</div>
|
62 |
|
63 |
<div id="using" class="postbox">
|
64 |
+
<h3 class="title"><?php _e( 'Using', 'my-custom-functions' ) ?></a></h3>
|
65 |
<div class="inside">
|
66 |
+
<p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!', 'my-custom-functions' ) ?></p>
|
67 |
</div>
|
68 |
</div>
|
69 |
|
70 |
<div id="help" class="postbox">
|
71 |
+
<h3 class="title"><?php _e( 'Help', 'my-custom-functions' ); ?></h3>
|
72 |
<div class="inside">
|
73 |
+
<p><?php _e( 'If you want more options then tell me and I will be happy to add it.', 'my-custom-functions' ); ?></p>
|
74 |
<p><a href="mailto:arthurgareginyan@gmail.com">arthurgareginyan@gmail.com</a></p>
|
75 |
</div>
|
76 |
</div>
|
77 |
|
78 |
<div id="donate" class="postbox">
|
79 |
+
<h3 class="title"><?php _e( 'Donate', 'my-custom-functions' ) ?></h3>
|
80 |
<div class="inside">
|
81 |
<img src="<?php echo plugins_url('images/thanks.png', __FILE__); ?>">
|
82 |
+
<p><?php _e( 'If you like this plugin and find it useful, help me to make this plugin even better and keep it up-to-date.', 'my-custom-functions' ) ?></p>
|
83 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
|
84 |
<img src="<?php echo plugins_url('images/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
|
85 |
</a>
|
86 |
+
<p><?php _e( 'Thanks for your support!', 'my-custom-functions' ) ?></p>
|
87 |
</div>
|
88 |
</div>
|
89 |
|
90 |
<div id="freelance" class="postbox">
|
91 |
+
<h3 class="title"><?php _e( 'Freelance', 'my-custom-functions' ) ?></h3>
|
92 |
<div class="inside">
|
93 |
<img src="<?php echo plugins_url('images/author.png', __FILE__); ?>">
|
94 |
+
<p><?php _e( 'Hello, my name is Arthur and I\'m a freelance web designer and developer.', 'my-custom-functions' ) ?></p>
|
95 |
+
<p><?php _e( 'Share your thoughts with me. You may have a brilliant idea in your mind and I can make it happen, so let’s get started!', 'my-custom-functions' ) ?></p>
|
96 |
<p><a href="http://www.arthurgareginyan.com/" target="_blank">www.arthurgareginyan.com</a></p>
|
97 |
</div>
|
98 |
</div>
|
116 |
?>
|
117 |
<div class="postbox">
|
118 |
<h3 class="title">
|
119 |
+
<label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions', 'my-custom-functions' ) ?></label>
|
120 |
</h3>
|
121 |
<div class="inside">
|
122 |
<textarea name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo esc_attr( $content ); ?></textarea>
|
123 |
</div>
|
124 |
</div>
|
125 |
|
126 |
+
<?php submit_button( __( 'Save Changes', 'my-custom-functions' ), 'primary', 'submit', true ); ?>
|
127 |
|
128 |
</form>
|
129 |
|
languages/{MCFunctions-ru_RU.mo → my-custom-functions-ru_RU.mo}
RENAMED
Binary file
|
languages/{MCFunctions-ru_RU.po → my-custom-functions-ru_RU.po}
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
-
"POT-Creation-Date: 2016-04-
|
5 |
-
"PO-Revision-Date: 2016-04-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: My Custom Functions\n"
|
4 |
+
"POT-Creation-Date: 2016-04-08 14:08+0300\n"
|
5 |
+
"PO-Revision-Date: 2016-04-08 14:08+0300\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
languages/my-custom-functions-zh_TW.mo
ADDED
Binary file
|
languages/my-custom-functions-zh_TW.po
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: My Custom Functions\n"
|
4 |
+
"POT-Creation-Date: 2016-04-08 14:08+0300\n"
|
5 |
+
"PO-Revision-Date: 2016-04-08 14:08+0300\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: zh_TW\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
13 |
+
"X-Generator: Poedit 1.8.4\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"X-Poedit-WPHeader: my-custom-functions.php\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
18 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
19 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
+
|
23 |
+
#: inc/settings_page.php:21
|
24 |
+
msgid "Custom functions updated successfully."
|
25 |
+
msgstr "自訂功能已成功更新"
|
26 |
+
|
27 |
+
#: inc/settings_page.php:32
|
28 |
+
msgid "Sorry, but your code causes a \"Fatal error\", so it is not applied!"
|
29 |
+
msgstr "抱歉!您的程式碼造成了「嚴重錯誤」,所以並沒有套用它!"
|
30 |
+
|
31 |
+
#: inc/settings_page.php:33
|
32 |
+
msgid "Please, check the code and try again."
|
33 |
+
msgstr "請重新檢查程式碼再試一次"
|
34 |
+
|
35 |
+
#. Plugin Name of the plugin/theme
|
36 |
+
#: inc/settings_page.php:43 my-custom-functions.php:82
|
37 |
+
msgid "My Custom Functions"
|
38 |
+
msgstr "我的自訂功能"
|
39 |
+
|
40 |
+
#: inc/settings_page.php:46
|
41 |
+
msgid ""
|
42 |
+
"by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
43 |
+
"\"Berserkr\" Gareginyan</a>"
|
44 |
+
msgstr ""
|
45 |
+
"作者 <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
|
46 |
+
"\"Berserkr\" Gareginyan</a>,繁體中文 <a href=\"http://gordon168.tw\" target="
|
47 |
+
"\"_blank\">高登</a>"
|
48 |
+
|
49 |
+
#: inc/settings_page.php:57
|
50 |
+
msgid "About"
|
51 |
+
msgstr "關於"
|
52 |
+
|
53 |
+
#: inc/settings_page.php:59
|
54 |
+
msgid ""
|
55 |
+
"This plugin allows you to easily and safely add your own functions, snippets "
|
56 |
+
"or any custom code to your website."
|
57 |
+
msgstr ""
|
58 |
+
"這個外掛讓你簡單而且安全地加上自已的功能、程式片斷或任何自訂程式碼到你的網站"
|
59 |
+
|
60 |
+
#: inc/settings_page.php:64
|
61 |
+
msgid "Using"
|
62 |
+
msgstr "用法"
|
63 |
+
|
64 |
+
#: inc/settings_page.php:66
|
65 |
+
msgid ""
|
66 |
+
"To use, enter your custom functions, then click \"Save Changes\". It's that "
|
67 |
+
"simple!"
|
68 |
+
msgstr ""
|
69 |
+
"要使用它,請輸入您的自訂功能然後按下「儲存變更」就可以了,就是這麼簡單!"
|
70 |
+
|
71 |
+
#: inc/settings_page.php:71
|
72 |
+
msgid "Help"
|
73 |
+
msgstr "幫助"
|
74 |
+
|
75 |
+
#: inc/settings_page.php:73
|
76 |
+
msgid "If you want more options then tell me and I will be happy to add it."
|
77 |
+
msgstr "如果您還想要更多的選項請跟我說,我會很樂意加上去"
|
78 |
+
|
79 |
+
#: inc/settings_page.php:79
|
80 |
+
msgid "Donate"
|
81 |
+
msgstr "捐款"
|
82 |
+
|
83 |
+
#: inc/settings_page.php:82
|
84 |
+
msgid ""
|
85 |
+
"If you like this plugin and find it useful, help me to make this plugin even "
|
86 |
+
"better and keep it up-to-date."
|
87 |
+
msgstr ""
|
88 |
+
"如果您喜歡這個外掛而且發覺有幫到您的話,請贊助這個外掛讓它更好以及可以持續更"
|
89 |
+
"新"
|
90 |
+
|
91 |
+
#: inc/settings_page.php:86
|
92 |
+
msgid "Thanks for your support!"
|
93 |
+
msgstr "謝謝您的贊助!"
|
94 |
+
|
95 |
+
#: inc/settings_page.php:91
|
96 |
+
msgid "Freelance"
|
97 |
+
msgstr "自由工作者"
|
98 |
+
|
99 |
+
#: inc/settings_page.php:94
|
100 |
+
msgid ""
|
101 |
+
"Hello, my name is Arthur and I'm a freelance web designer and developer."
|
102 |
+
msgstr "嗨!我的名字叫 Arthur 是一個網頁設計及開發的自由工作者"
|
103 |
+
|
104 |
+
#: inc/settings_page.php:95
|
105 |
+
msgid ""
|
106 |
+
"Share your thoughts with me. You may have a brilliant idea in your mind and "
|
107 |
+
"I can make it happen, so let’s get started!"
|
108 |
+
msgstr "請跟我分享您的想法,我可以讓您傑出的點子成真,所以請提供您的建議!"
|
109 |
+
|
110 |
+
#: inc/settings_page.php:119
|
111 |
+
msgid "Functions"
|
112 |
+
msgstr "程式碼"
|
113 |
+
|
114 |
+
#: inc/settings_page.php:126
|
115 |
+
msgid "Save Changes"
|
116 |
+
msgstr "儲存變更"
|
117 |
+
|
118 |
+
#: my-custom-functions.php:70
|
119 |
+
msgid "Settings"
|
120 |
+
msgstr "設定"
|
121 |
+
|
122 |
+
#: my-custom-functions.php:82
|
123 |
+
msgid "Custom Functions"
|
124 |
+
msgstr "自訂功能"
|
125 |
+
|
126 |
+
#. Plugin URI of the plugin/theme
|
127 |
+
msgid "https://github.com/ArthurGareginyan/my-custom-functions"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#. Description of the plugin/theme
|
131 |
+
msgid ""
|
132 |
+
"Easily and safely add your own functions, snippets or any custom codes "
|
133 |
+
"directly out of your WordPress Dashboard without need of an external editor."
|
134 |
+
msgstr ""
|
135 |
+
"簡單而且安全地在您的 WordPress 控制台加上功能、程式片斷或是任何自訂程式碼!不"
|
136 |
+
"需額外的編輯器"
|
137 |
+
|
138 |
+
#. Author of the plugin/theme
|
139 |
+
msgid "Arthur Gareginyan"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#. Author URI of the plugin/theme
|
143 |
+
msgid "http://www.arthurgareginyan.com"
|
144 |
+
msgstr ""
|
languages/{MCFunctions.pot → my-custom-functions.pot}
RENAMED
@@ -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-04-
|
7 |
"PO-Revision-Date: 2015-08-30 16:22+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: My Custom Functions\n"
|
6 |
+
"POT-Creation-Date: 2016-04-08 14:08+0300\n"
|
7 |
"PO-Revision-Date: 2015-08-30 16:22+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
my-custom-functions.php
CHANGED
@@ -5,9 +5,9 @@
|
|
5 |
* Description: Easily and safely add your own functions, snippets or any custom codes 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: 2.
|
9 |
* License: GPL3
|
10 |
-
* Text Domain:
|
11 |
* Domain Path: /languages/
|
12 |
*
|
13 |
* Copyright 2014-2016 Arthur "Berserkr" Gareginyan (email : arthurgareginyan@gmail.com)
|
@@ -49,10 +49,10 @@ defined('MCFUNC_PATH') or define('MCFUNC_PATH', plugin_dir_path(__FILE__));
|
|
49 |
/**
|
50 |
* Register text domain
|
51 |
*
|
52 |
-
* @since 2.
|
53 |
*/
|
54 |
function MCFunctions_textdomain() {
|
55 |
-
load_plugin_textdomain( '
|
56 |
}
|
57 |
add_action( 'init', 'MCFunctions_textdomain' );
|
58 |
|
@@ -62,12 +62,12 @@ add_action( 'init', 'MCFunctions_textdomain' );
|
|
62 |
* Fetches array of links generated by WP Plugin admin page ( Deactivate | Edit )
|
63 |
* and inserts a link to the Custom Functions admin page
|
64 |
*
|
65 |
-
* @since 2.
|
66 |
* @param array $links Array of links generated by WP in Plugin Admin page.
|
67 |
* @return array Array of links to be output on Plugin Admin page.
|
68 |
*/
|
69 |
function MCFunctions_settings_link( $links ) {
|
70 |
-
$settings_page = '<a href="' . admin_url( 'themes.php?page=my-custom-functions.php' ) .'">' . __( 'Settings', '
|
71 |
array_unshift( $links, $settings_page );
|
72 |
return $links;
|
73 |
}
|
@@ -76,10 +76,10 @@ add_filter( "plugin_action_links_".MCFUNC_BASE, 'MCFunctions_settings_link' );
|
|
76 |
/**
|
77 |
* Register "Custom Functions" submenu in "Appearance" Admin Menu
|
78 |
*
|
79 |
-
* @since
|
80 |
*/
|
81 |
function MCFunctions_register_submenu_page() {
|
82 |
-
add_theme_page( __( 'My Custom Functions', '
|
83 |
}
|
84 |
add_action( 'admin_menu', 'MCFunctions_register_submenu_page' );
|
85 |
|
5 |
* Description: Easily and safely add your own functions, snippets or any custom codes 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: 2.2
|
9 |
* License: GPL3
|
10 |
+
* Text Domain: my-custom-functions
|
11 |
* Domain Path: /languages/
|
12 |
*
|
13 |
* Copyright 2014-2016 Arthur "Berserkr" Gareginyan (email : arthurgareginyan@gmail.com)
|
49 |
/**
|
50 |
* Register text domain
|
51 |
*
|
52 |
+
* @since 2.2
|
53 |
*/
|
54 |
function MCFunctions_textdomain() {
|
55 |
+
load_plugin_textdomain( 'my-custom-functions', false, MCFUNC_DIR . '/languages/' );
|
56 |
}
|
57 |
add_action( 'init', 'MCFunctions_textdomain' );
|
58 |
|
62 |
* Fetches array of links generated by WP Plugin admin page ( Deactivate | Edit )
|
63 |
* and inserts a link to the Custom Functions admin page
|
64 |
*
|
65 |
+
* @since 2.2
|
66 |
* @param array $links Array of links generated by WP in Plugin Admin page.
|
67 |
* @return array Array of links to be output on Plugin Admin page.
|
68 |
*/
|
69 |
function MCFunctions_settings_link( $links ) {
|
70 |
+
$settings_page = '<a href="' . admin_url( 'themes.php?page=my-custom-functions.php' ) .'">' . __( 'Settings', 'my-custom-functions' ) . '</a>';
|
71 |
array_unshift( $links, $settings_page );
|
72 |
return $links;
|
73 |
}
|
76 |
/**
|
77 |
* Register "Custom Functions" submenu in "Appearance" Admin Menu
|
78 |
*
|
79 |
+
* @since 2.2
|
80 |
*/
|
81 |
function MCFunctions_register_submenu_page() {
|
82 |
+
add_theme_page( __( 'My Custom Functions', 'my-custom-functions' ), __( 'Custom Functions', 'my-custom-functions' ), 'edit_theme_options', basename( __FILE__ ), 'MCFunctions_render_submenu_page' );
|
83 |
}
|
84 |
add_action( 'admin_menu', 'MCFunctions_register_submenu_page' );
|
85 |
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== My Custom Functions ===
|
2 |
Contributors: Arthur Gareginyan
|
3 |
-
Tags: code, php, function, snippet, custom, execute, edit, editing, editor, functionality plugin, codemirror, syntax highlighting, syntaxhighlighting, syntax highlighter, syntaxhighlighter, syntax,
|
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.
|
7 |
-
Stable tag: 2.
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -107,9 +107,10 @@ A. Yes, any financial contributions are welcome! Just visit my website and click
|
|
107 |
|
108 |
|
109 |
== Screenshots ==
|
110 |
-
1. Plugin’s page
|
111 |
-
2.
|
112 |
-
3.
|
|
|
113 |
|
114 |
|
115 |
== Other Notes ==
|
@@ -133,6 +134,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
133 |
|
134 |
|
135 |
== Changelog ==
|
|
|
|
|
|
|
|
|
136 |
= 2.1 =
|
137 |
* In the settings_page.php, on the line 21, fixed typo.
|
138 |
* Removed extra rules in style.css file.
|
1 |
=== My Custom Functions ===
|
2 |
Contributors: Arthur Gareginyan
|
3 |
+
Tags: code, php, function, snippet, custom, execute, edit, editing, editor, functionality plugin, codemirror, syntax highlighting, syntaxhighlighting, syntax highlighter, syntaxhighlighter, syntax, highlighting, highlighter,
|
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.5
|
7 |
+
Stable tag: 2.1
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
107 |
|
108 |
|
109 |
== Screenshots ==
|
110 |
+
1. Plugin’s page.
|
111 |
+
2. Plugin’s page with custom code added.
|
112 |
+
3. Success message.
|
113 |
+
4. «Fatal error» message.
|
114 |
|
115 |
|
116 |
== Other Notes ==
|
134 |
|
135 |
|
136 |
== Changelog ==
|
137 |
+
= 2.2 =
|
138 |
+
* Added Chinese (Taiwan) translation. (Thanks Gordon Yu)
|
139 |
+
* Text domain changed to "my-custom-functions".
|
140 |
+
* Added compatibility with the translate.wordpress.org.
|
141 |
= 2.1 =
|
142 |
* In the settings_page.php, on the line 21, fixed typo.
|
143 |
* Removed extra rules in style.css file.
|