My Custom Functions - Version 3.0

Version Description

  • The structure of files changed.
  • Style sheet of settings page improved and better commented.
  • JS code improved.
  • The "thanks.png" image removed.
  • POT file updated.
  • Russian translation updated.
  • Chinese (Taiwan) translation updated.
Download this release

Release Info

Developer Arthur Gareginyan
Plugin Icon 128x128 My Custom Functions
Version 3.0
Comparing to
See all releases

Code changes from version 2.5.1 to 3.0

inc/{style.css → css/admin.css} RENAMED
@@ -1,15 +1,11 @@
1
  /*
2
- * My Custom Functions
3
- * Style sheet for plugin's page
4
- * @since 2.5
5
- * @agareginyan
6
  */
7
 
8
 
9
- .aligncenter {
10
- text-align: center;
11
- }
12
-
13
  /* Titles
14
  -------------------------------------------------------------- */
15
  h2 {
@@ -41,46 +37,25 @@ h3.title {
41
  display: none;
42
  }
43
 
44
- /* CodeMirror Editor
45
- -------------------------------------------------------------- */
46
- .CodeMirror {
47
- height: 100% !important;
48
- border: 1px solid #ddd;
49
- margin-left: 5px;
50
- margin-right: 5px;
51
- }
52
-
53
  /* Sidebar
54
  -------------------------------------------------------------- */
55
  #side-sortables {
56
  position: relative;
57
  }
58
 
59
- .inner-sidebar h3.title {
60
  text-align: center;
61
  }
62
 
63
- .postbox a {
64
- text-decoration: none;
65
- }
66
-
67
- #about,
68
- #using,
69
- #help,
70
- #donate {
71
  text-align: center;
72
  }
73
 
74
- #help p {
75
  margin: 0;
76
  }
77
 
78
- #donate img,
79
- #donate p {
80
- margin-top: 5px;
81
- }
82
-
83
- /* Responsive
84
  -------------------------------------------------------------- */
85
  @media (max-width: 860px) {
86
  .inner-sidebar {
@@ -91,6 +66,21 @@ h3.title {
91
  }
92
  }
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  /* On/Off Trigger
95
  -------------------------------------------------------------- */
96
  .trigger {
@@ -164,4 +154,4 @@ h3.title {
164
 
165
  .trigger input[type=checkbox]:checked + label {
166
  left: 43px;
167
- }
1
  /*
2
+ * Style sheet for plugin settings page
3
+ *
4
+ * Copyright (c) 2016 Arthur Gareginyan ( http://www.arthurgareginyan.com ).
5
+ * All Rights Reserved.
6
  */
7
 
8
 
 
 
 
 
9
  /* Titles
10
  -------------------------------------------------------------- */
11
  h2 {
37
  display: none;
38
  }
39
 
 
 
 
 
 
 
 
 
 
40
  /* Sidebar
41
  -------------------------------------------------------------- */
42
  #side-sortables {
43
  position: relative;
44
  }
45
 
46
+ #side-sortables .postbox {
47
  text-align: center;
48
  }
49
 
50
+ #side-sortables p {
 
 
 
 
 
 
 
51
  text-align: center;
52
  }
53
 
54
+ #side-sortables #help p {
55
  margin: 0;
56
  }
57
 
58
+ /* Responsive page
 
 
 
 
 
59
  -------------------------------------------------------------- */
60
  @media (max-width: 860px) {
61
  .inner-sidebar {
66
  }
67
  }
68
 
69
+ /* CodeMirror Editor
70
+ -------------------------------------------------------------- */
71
+ .CodeMirror {
72
+ height: 100% !important;
73
+ border: 1px solid #ddd;
74
+ margin-left: 5px;
75
+ margin-right: 5px;
76
+ }
77
+
78
+ /* Other
79
+ -------------------------------------------------------------- */
80
+ .postbox a {
81
+ text-decoration: none;
82
+ }
83
+
84
  /* On/Off Trigger
85
  -------------------------------------------------------------- */
86
  .trigger {
154
 
155
  .trigger input[type=checkbox]:checked + label {
156
  left: 43px;
157
+ }
inc/functions.js DELETED
@@ -1,41 +0,0 @@
1
- /*
2
- * My Custom Functions
3
- * JS functions
4
- * @since 2.5
5
- * @agareginyan
6
- */
7
-
8
-
9
- (function(){
10
- "use strict";
11
-
12
- jQuery(document).ready(function($) {
13
-
14
- // Find all textareas on page
15
- $('textarea').each(function(index, elements) {
16
-
17
- // Change textarea to CodeMirror editor
18
- var editor = CodeMirror.fromTextArea( elements , {
19
- lineNumbers: true,
20
- firstLineNumber: 1,
21
- matchBrackets: true,
22
- indentUnit: 4,
23
- mode: 'text/x-php',
24
- styleActiveLine: true
25
- });
26
-
27
- // Refresh CodeMirror editor after 1 second
28
- setTimeout(function() {
29
- editor.refresh();
30
- },1);
31
- });
32
-
33
- // Remove the "successful" message after 3 seconds
34
- if (".updated") {
35
- setTimeout(function() {
36
- $(".updated").fadeOut();
37
- }, 3000);
38
- }
39
- });
40
-
41
- }());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/images/thanks.png DELETED
Binary file
inc/{images → img}/btn_donateCC_LG.gif RENAMED
File without changes
inc/js/admin.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * JS functions for plugin settings page
3
+ *
4
+ * Copyright (c) 2016 Arthur Gareginyan ( http://www.arthurgareginyan.com ).
5
+ * All Rights Reserved.
6
+ */
7
+
8
+
9
+ jQuery(document).ready(function($) {
10
+
11
+ "use strict";
12
+
13
+ // Find all textareas on page
14
+ $('textarea').each(function(index, elements) {
15
+
16
+ // Change textarea to CodeMirror editor
17
+ var editor = CodeMirror.fromTextArea( elements , {
18
+ lineNumbers: true,
19
+ firstLineNumber: 1,
20
+ matchBrackets: true,
21
+ indentUnit: 4,
22
+ mode: 'text/x-php',
23
+ styleActiveLine: true
24
+ });
25
+
26
+ // Refresh CodeMirror editor after 1 second
27
+ setTimeout(function() {
28
+ editor.refresh();
29
+ },1);
30
+ });
31
+
32
+ // Remove the "successful" message after 3 seconds
33
+ if (".updated") {
34
+ setTimeout(function() {
35
+ $(".updated").fadeOut();
36
+ }, 3000);
37
+ }
38
+
39
+ });
inc/{codemirror → lib/codemirror}/LICENSE RENAMED
File without changes
inc/{codemirror → lib/codemirror}/README.md RENAMED
File without changes
inc/{codemirror → lib/codemirror}/addons/active-line.js RENAMED
File without changes
inc/{codemirror → lib/codemirror}/codemirror-compressed.js RENAMED
File without changes
inc/{codemirror → lib/codemirror}/codemirror.css RENAMED
File without changes
inc/{settings_page.php → php/settings_page.php} RENAMED
@@ -10,7 +10,7 @@ defined('ABSPATH') or die("Restricted access!");
10
  /**
11
  * Render Settings Page
12
  *
13
- * @since 2.5
14
  */
15
  function MCFunctions_render_submenu_page() {
16
 
@@ -56,14 +56,14 @@ 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', 'my-custom-functions' ) ?></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.', 'my-custom-functions' ); ?></p>
62
  </div>
63
  </div>
64
 
65
  <div id="using" class="postbox">
66
- <h3 class="title"><?php _e( 'Using', 'my-custom-functions' ) ?></a></h3>
67
  <div class="inside">
68
  <p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!', 'my-custom-functions' ); ?></p>
69
  </div>
@@ -78,12 +78,11 @@ function MCFunctions_render_submenu_page() {
78
  </div>
79
 
80
  <div id="donate" class="postbox">
81
- <h3 class="title"><?php _e( 'Donate', 'my-custom-functions' ) ?></h3>
82
  <div class="inside">
83
- <img src="<?php echo plugins_url('images/thanks.png', __FILE__); ?>">
84
- <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>
85
  <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
86
- <img src="<?php echo plugins_url('images/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
87
  </a>
88
  <p><?php _e( 'Thanks for your support!', 'my-custom-functions' ); ?></p>
89
  </div>
@@ -109,7 +108,7 @@ function MCFunctions_render_submenu_page() {
109
  ?>
110
  <div class="postbox">
111
  <h3 class="title">
112
- <label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions (PHP code)', 'my-custom-functions' ) ?></label>
113
  <div class="trigger">
114
  <input type="checkbox" name="anarcho_cfunctions_settings[enable]" id="anarcho_cfunctions_settings[enable]" <?php echo $enable; ?> >
115
  <label for="anarcho_cfunctions_settings[enable]"></label>
10
  /**
11
  * Render Settings Page
12
  *
13
+ * @since 3.0
14
  */
15
  function MCFunctions_render_submenu_page() {
16
 
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', 'my-custom-functions' ); ?></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.', 'my-custom-functions' ); ?></p>
62
  </div>
63
  </div>
64
 
65
  <div id="using" class="postbox">
66
+ <h3 class="title"><?php _e( 'Using', 'my-custom-functions' ); ?></a></h3>
67
  <div class="inside">
68
  <p><?php _e( 'To use, enter your custom functions, then click "Save Changes". It\'s that simple!', 'my-custom-functions' ); ?></p>
69
  </div>
78
  </div>
79
 
80
  <div id="donate" class="postbox">
81
+ <h3 class="title"><?php _e( 'Donate', 'my-custom-functions' ); ?></h3>
82
  <div class="inside">
83
+ <p><?php _e( 'If you like this plugin and find it useful, please help me to make this plugin even better and keep it up-to-date.', 'my-custom-functions' ); ?></p>
 
84
  <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank" rel="nofollow">
85
+ <img src="<?php echo plugins_url('../img/btn_donateCC_LG.gif', __FILE__); ?>" alt="Make a donation">
86
  </a>
87
  <p><?php _e( 'Thanks for your support!', 'my-custom-functions' ); ?></p>
88
  </div>
108
  ?>
109
  <div class="postbox">
110
  <h3 class="title">
111
+ <label for="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php _e( 'Functions (PHP code)', 'my-custom-functions' ); ?></label>
112
  <div class="trigger">
113
  <input type="checkbox" name="anarcho_cfunctions_settings[enable]" id="anarcho_cfunctions_settings[enable]" <?php echo $enable; ?> >
114
  <label for="anarcho_cfunctions_settings[enable]"></label>
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-07-26 19:52+0300\n"
5
- "PO-Revision-Date: 2016-07-26 19:52+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru\n"
@@ -83,23 +83,23 @@ msgstr "Есть что сказать? Нужна помощь?"
83
  msgid "Donate"
84
  msgstr "Пожертвование"
85
 
86
- #: inc/settings_page.php:84
87
  msgid ""
88
- "If you like this plugin and find it useful, help me to make this plugin even "
89
- "better and keep it up-to-date."
90
  msgstr ""
91
- "Если вам нравится этот плагин и вы находите его полезным, то помогите мне "
92
- "сделать его ещё лучше."
93
 
94
- #: inc/settings_page.php:88
95
  msgid "Thanks for your support!"
96
  msgstr "Спасибо за вашу поддержку!"
97
 
98
- #: inc/settings_page.php:112
99
  msgid "Functions (PHP code)"
100
  msgstr "Функции (PHP код)"
101
 
102
- #: inc/settings_page.php:123
103
  msgid "Save Changes"
104
  msgstr "Сохранить изменения"
105
 
@@ -132,6 +132,13 @@ msgstr "Артур Гарегинян"
132
  msgid "http://www.arthurgareginyan.com"
133
  msgstr ""
134
 
 
 
 
 
 
 
 
135
  #~ msgid "Functions"
136
  #~ msgstr "Функции"
137
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: My Custom Functions\n"
4
+ "POT-Creation-Date: 2016-08-23 04:35+0300\n"
5
+ "PO-Revision-Date: 2016-08-23 05:20+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru\n"
83
  msgid "Donate"
84
  msgstr "Пожертвование"
85
 
86
+ #: inc/settings_page.php:83
87
  msgid ""
88
+ "If you like this plugin and find it useful, please help me to make this "
89
+ "plugin even better and keep it up-to-date."
90
  msgstr ""
91
+ "Если вам нравится этот плагин и вы находите его полезным, то пожалуйста "
92
+ "помогите мне сделать его ещё лучше."
93
 
94
+ #: inc/settings_page.php:87
95
  msgid "Thanks for your support!"
96
  msgstr "Спасибо за вашу поддержку!"
97
 
98
+ #: inc/settings_page.php:111
99
  msgid "Functions (PHP code)"
100
  msgstr "Функции (PHP код)"
101
 
102
+ #: inc/settings_page.php:122
103
  msgid "Save Changes"
104
  msgstr "Сохранить изменения"
105
 
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."
138
+ #~ msgstr ""
139
+ #~ "Если вам нравится этот плагин и вы находите его полезным, то помогите мне "
140
+ #~ "сделать его ещё лучше."
141
+
142
  #~ msgid "Functions"
143
  #~ msgstr "Функции"
144
 
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-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"
@@ -20,98 +20,77 @@ msgstr ""
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
 
@@ -129,11 +108,9 @@ 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"
@@ -142,3 +119,51 @@ msgstr ""
142
  #. Author URI of the plugin/theme
143
  msgid "http://www.arthurgareginyan.com"
144
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: My Custom Functions\n"
4
+ "POT-Creation-Date: 2016-08-23 05:40+0300\n"
5
+ "PO-Revision-Date: 2016-08-23 05:40+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/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:82
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:83
80
  msgid ""
81
+ "If you like this plugin and find it useful, please help me to make this "
82
+ "plugin even better and keep it up-to-date."
83
  msgstr ""
 
 
84
 
85
+ #: inc/settings_page.php:87
86
  msgid "Thanks for your support!"
87
  msgstr "謝謝您的贊助!"
88
 
89
+ #: inc/settings_page.php:111
90
+ msgid "Functions (PHP code)"
91
+ msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
+ #: inc/settings_page.php:122
94
  msgid "Save Changes"
95
  msgstr "儲存變更"
96
 
108
 
109
  #. Description of the plugin/theme
110
  msgid ""
111
+ "Easily and safely add your custome functions (PHP code) directly out of your "
112
+ "WordPress Dashboard without need of an external editor."
113
  msgstr ""
 
 
114
 
115
  #. Author of the plugin/theme
116
  msgid "Arthur Gareginyan"
119
  #. Author URI of the plugin/theme
120
  msgid "http://www.arthurgareginyan.com"
121
  msgstr ""
122
+
123
+ #~ msgid ""
124
+ #~ "by <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
125
+ #~ "\"Berserkr\" Gareginyan</a>"
126
+ #~ msgstr ""
127
+ #~ "作者 <a href=\"http://www.arthurgareginyan.com\" target=\"_blank\">Arthur "
128
+ #~ "\"Berserkr\" Gareginyan</a>,繁體中文 <a href=\"http://gordon168.tw\" "
129
+ #~ "target=\"_blank\">高登</a>"
130
+
131
+ #~ msgid ""
132
+ #~ "This plugin allows you to easily and safely add your own functions, "
133
+ #~ "snippets or any custom code to your website."
134
+ #~ msgstr ""
135
+ #~ "這個外掛讓你簡單而且安全地加上自已的功能、程式片斷或任何自訂程式碼到你的網"
136
+ #~ "站"
137
+
138
+ #~ msgid "If you want more options then tell me and I will be happy to add it."
139
+ #~ msgstr "如果您還想要更多的選項請跟我說,我會很樂意加上去"
140
+
141
+ #~ msgid ""
142
+ #~ "If you like this plugin and find it useful, help me to make this plugin "
143
+ #~ "even better and keep it up-to-date."
144
+ #~ msgstr ""
145
+ #~ "如果您喜歡這個外掛而且發覺有幫到您的話,請贊助這個外掛讓它更好以及可以持續"
146
+ #~ "更新"
147
+
148
+ #~ msgid "Freelance"
149
+ #~ msgstr "自由工作者"
150
+
151
+ #~ msgid ""
152
+ #~ "Hello, my name is Arthur and I'm a freelance web designer and developer."
153
+ #~ msgstr "嗨!我的名字叫 Arthur 是一個網頁設計及開發的自由工作者"
154
+
155
+ #~ msgid ""
156
+ #~ "Share your thoughts with me. You may have a brilliant idea in your mind "
157
+ #~ "and I can make it happen, so let’s get started!"
158
+ #~ msgstr "請跟我分享您的想法,我可以讓您傑出的點子成真,所以請提供您的建議!"
159
+
160
+ #~ msgid "Functions"
161
+ #~ msgstr "程式碼"
162
+
163
+ #~ msgid ""
164
+ #~ "Easily and safely add your own functions, snippets or any custom codes "
165
+ #~ "directly out of your WordPress Dashboard without need of an external "
166
+ #~ "editor."
167
+ #~ msgstr ""
168
+ #~ "簡單而且安全地在您的 WordPress 控制台加上功能、程式片斷或是任何自訂程式"
169
+ #~ "碼!不需額外的編輯器"
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-07-26 19:52+0300\n"
7
  "PO-Revision-Date: 2015-08-30 16:22+0300\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
@@ -75,21 +75,21 @@ msgstr ""
75
  msgid "Donate"
76
  msgstr ""
77
 
78
- #: inc/settings_page.php:84
79
  msgid ""
80
- "If you like this plugin and find it useful, help me to make this plugin even "
81
- "better and keep it up-to-date."
82
  msgstr ""
83
 
84
- #: inc/settings_page.php:88
85
  msgid "Thanks for your support!"
86
  msgstr ""
87
 
88
- #: inc/settings_page.php:112
89
  msgid "Functions (PHP code)"
90
  msgstr ""
91
 
92
- #: inc/settings_page.php:123
93
  msgid "Save Changes"
94
  msgstr ""
95
 
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: My Custom Functions\n"
6
+ "POT-Creation-Date: 2016-08-23 04:20+0300\n"
7
  "PO-Revision-Date: 2015-08-30 16:22+0300\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
75
  msgid "Donate"
76
  msgstr ""
77
 
78
+ #: inc/settings_page.php:83
79
  msgid ""
80
+ "If you like this plugin and find it useful, please help me to make this "
81
+ "plugin even better and keep it up-to-date."
82
  msgstr ""
83
 
84
+ #: inc/settings_page.php:87
85
  msgid "Thanks for your support!"
86
  msgstr ""
87
 
88
+ #: inc/settings_page.php:111
89
  msgid "Functions (PHP code)"
90
  msgstr ""
91
 
92
+ #: inc/settings_page.php:122
93
  msgid "Save Changes"
94
  msgstr ""
95
 
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: 2.5.1
9
  * License: GPL3
10
  * Text Domain: my-custom-functions
11
  * Domain Path: /languages/
@@ -86,9 +86,9 @@ add_action( 'admin_menu', 'MCFunctions_register_submenu_page' );
86
  /**
87
  * Attach Settings Page
88
  *
89
- * @since 2.0
90
  */
91
- require_once( MCFUNC_PATH . 'inc/settings_page.php' );
92
 
93
  /**
94
  * Register settings
@@ -104,7 +104,7 @@ add_action( 'admin_init', 'MCFunctions_register_settings' );
104
  /**
105
  * Load scripts and style sheet for settings page
106
  *
107
- * @since 2.5
108
  */
109
  function MCFunctions_load_scripts($hook) {
110
 
@@ -113,16 +113,17 @@ function MCFunctions_load_scripts($hook) {
113
  return;
114
  }
115
 
116
- // CodeMirror
117
- wp_enqueue_script('codemirror', MCFUNC_URL . 'inc/codemirror/codemirror-compressed.js');
118
- wp_enqueue_style('codemirror_style', MCFUNC_URL . 'inc/codemirror/codemirror.css');
119
- wp_enqueue_script('codemirror-active-line', MCFUNC_URL . 'inc/codemirror/addons/active-line.js');
120
 
121
- // JS functions
122
- wp_enqueue_script('js-functions', MCFUNC_URL . 'inc/functions.js', array(), false, true);
 
 
 
 
 
123
 
124
- // Style sheet
125
- wp_enqueue_style('styles', MCFUNC_URL . 'inc/style.css');
126
  }
127
  add_action( 'admin_enqueue_scripts', 'MCFunctions_load_scripts' );
128
 
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.0
9
  * License: GPL3
10
  * Text Domain: my-custom-functions
11
  * Domain Path: /languages/
86
  /**
87
  * Attach Settings Page
88
  *
89
+ * @since 3.0
90
  */
91
+ require_once( MCFUNC_PATH . 'inc/php/settings_page.php' );
92
 
93
  /**
94
  * Register settings
104
  /**
105
  * Load scripts and style sheet for settings page
106
  *
107
+ * @since 3.0
108
  */
109
  function MCFunctions_load_scripts($hook) {
110
 
113
  return;
114
  }
115
 
116
+ // Style sheet
117
+ wp_enqueue_style( 'admin-css', MCFUNC_URL . 'inc/css/admin.css' );
 
 
118
 
119
+ // JavaScript
120
+ wp_enqueue_script( 'admin-js', MCFUNC_URL . 'inc/js/admin.js', array(), false, true );
121
+
122
+ // CodeMirror
123
+ wp_enqueue_style( 'codemirror-css', MCFUNC_URL . 'inc/lib/codemirror/codemirror.css' );
124
+ wp_enqueue_script( 'codemirror-js', MCFUNC_URL . 'inc/lib/codemirror/codemirror-compressed.js' );
125
+ wp_enqueue_script( 'codemirror-active-line', MCFUNC_URL . 'inc/lib/codemirror/addons/active-line.js' );
126
 
 
 
127
  }
128
  add_action( 'admin_enqueue_scripts', 'MCFunctions_load_scripts' );
129
 
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: 2.5.1
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -24,7 +24,7 @@ An easy to use WordPress plugin that gives you the ability to easily and safely
24
  * Active line highlighting
25
  * Editor allow for tab indentation
26
  * Trigger for temporary disable the custom functions
27
- * Ready for translation (.pot file included)
28
 
29
  **Coming soon:**
30
  * Reload the settings page at same position after pushing the save button
@@ -34,7 +34,9 @@ An easy to use WordPress plugin that gives you the ability to easily and safely
34
 
35
  = Translation =
36
 
37
- * English
 
 
38
  * Russian
39
  * Chinese (Taiwan)
40
 
@@ -44,7 +46,7 @@ An easy to use WordPress plugin that gives you the ability to easily and safely
44
  >
45
  >* [Donate](http://www.arthurgareginyan.com/donate.html) to support ongoing development. Your contribution would be greatly appreciated.
46
  >* [Rate and Review](https://wordpress.org/support/view/plugin-reviews/my-custom-functions?rate=5#postform) this plugin.
47
- >* [Share with me](mailto:arthurgareginyan@gmail.com) if you have any ideas or suggestions to make this plugin better.
48
 
49
 
50
  == Installation ==
@@ -115,8 +117,8 @@ A. Yes, any financial contributions are welcome! Just visit my website and click
115
 
116
 
117
  == Screenshots ==
118
- 1. Plugin’s page.
119
- 2. Plugin’s page with custom code added.
120
  3. Success message.
121
  4. «Fatal error» message.
122
 
@@ -133,7 +135,7 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
133
 
134
  **Credits**
135
 
136
- [CodeMirror](https://codemirror.net/) is an open-source project shared under a [MIT license](https://codemirror.net/LICENSE).
137
 
138
  **Links**
139
 
@@ -142,6 +144,12 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
142
 
143
 
144
  == Changelog ==
 
 
 
 
 
 
145
  = 2.5.1 =
146
  * The update_option() returned into _duplicates function.
147
  = 2.5 =
@@ -224,6 +232,8 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
224
 
225
 
226
  == Upgrade Notice ==
 
 
227
  = 2.0 =
228
  Please update to new release!
229
  = 1.0 =
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.0
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
24
  * Active line highlighting
25
  * Editor allow for tab indentation
26
  * Trigger for temporary disable the custom functions
27
+ * Ready for translation (POT file included)
28
 
29
  **Coming soon:**
30
  * Reload the settings page at same position after pushing the save button
34
 
35
  = Translation =
36
 
37
+ Please keep in mind that not all translations are up to date. You are welcome to contribute!
38
+
39
+ * English (default)
40
  * Russian
41
  * Chinese (Taiwan)
42
 
46
  >
47
  >* [Donate](http://www.arthurgareginyan.com/donate.html) to support ongoing development. Your contribution would be greatly appreciated.
48
  >* [Rate and Review](https://wordpress.org/support/view/plugin-reviews/my-custom-functions?rate=5#postform) this plugin.
49
+ >* [Share with me](mailto:arthurgareginyan@gmail.com) or view the [GitHub Repo](https://github.com/ArthurGareginyan/my-custom-functions) if you have any ideas or suggestions to make this plugin better.
50
 
51
 
52
  == Installation ==
117
 
118
 
119
  == Screenshots ==
120
+ 1. Plugin page.
121
+ 2. Plugin page with custom code added.
122
  3. Success message.
123
  4. «Fatal error» message.
124
 
135
 
136
  **Credits**
137
 
138
+ [CodeMirror](https://codemirror.net/) is an open-source project shared under the [MIT license](https://codemirror.net/LICENSE).
139
 
140
  **Links**
141
 
144
 
145
 
146
  == Changelog ==
147
+ = 3.0 =
148
+ * The structure of files changed.
149
+ * Style sheet of settings page improved and better commented.
150
+ * JS code improved.
151
+ * The "thanks.png" image removed.
152
+ * POT file updated.
153
  = 2.5.1 =
154
  * The update_option() returned into _duplicates function.
155
  = 2.5 =
232
 
233
 
234
  == Upgrade Notice ==
235
+ = 3.0 =
236
+ Please update to new release!
237
  = 2.0 =
238
  Please update to new release!
239
  = 1.0 =