My Custom Functions - Version 1.6

Version Description

  • Fixed the issue due to which nothing appears below line 26 until you click below that line.
  • Added register_setting for error option.
  • Corrected comments to source code.
Download this release

Release Info

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

Code changes from version 1.5 to 1.6

Files changed (3) hide show
  1. inc/settings_page.php +16 -5
  2. my-custom-functions.php +5 -4
  3. readme.txt +11 -2
inc/settings_page.php CHANGED
@@ -8,7 +8,7 @@ defined('ABSPATH') or die("Restricted access!");
8
  /**
9
  * Render Settings Page
10
  *
11
- * @since 1.2
12
  */
13
  function anarcho_cfunctions_render_submenu_page() {
14
 
@@ -71,8 +71,9 @@ function anarcho_cfunctions_render_submenu_page() {
71
  </p>
72
  <?php do_action( 'anarcho_cfunctions-sidebar-bottom' ); ?>
73
  </div>
74
- <!-- END-SIDEBAR -->
75
- <!-- FORM -->
 
76
  <div id="container" style="margin-right:210px;">
77
  <?php do_action( 'anarcho_cfunctions-form-top' ); ?>
78
  <div>
@@ -81,21 +82,31 @@ function anarcho_cfunctions_render_submenu_page() {
81
  <?php do_action( 'anarcho_cfunctions-textarea-bottom' ); ?>
82
  <?php do_action( 'anarcho_cfunctions-form-bottom' ); ?>
83
  </div>
 
 
 
84
  <script type="text/javascript" language="javascript">
85
- var myCodeMirror = CodeMirror.fromTextArea(document.getElementById('anarcho_cfunctions_settings[anarcho_cfunctions-content]'), {
86
  lineNumbers: true,
87
  matchBrackets: true,
88
  mode: 'application/x-httpd-php',
89
  indentUnit: 4
90
  });
 
 
 
91
  </script>
 
 
 
92
  <style>
93
  .CodeMirror {
94
  border: 1px solid cornflowerblue;
95
  height: auto;
96
  }
97
  </style>
98
- <!-- END-FORM -->
 
99
  </form>
100
  </div>
101
  <?php
8
  /**
9
  * Render Settings Page
10
  *
11
+ * @since 1.6
12
  */
13
  function anarcho_cfunctions_render_submenu_page() {
14
 
71
  </p>
72
  <?php do_action( 'anarcho_cfunctions-sidebar-bottom' ); ?>
73
  </div>
74
+ <!-- END-SIDEBAR -->
75
+
76
+ <!-- FORM -->
77
  <div id="container" style="margin-right:210px;">
78
  <?php do_action( 'anarcho_cfunctions-form-top' ); ?>
79
  <div>
82
  <?php do_action( 'anarcho_cfunctions-textarea-bottom' ); ?>
83
  <?php do_action( 'anarcho_cfunctions-form-bottom' ); ?>
84
  </div>
85
+ <!-- END-FORM -->
86
+
87
+ <!-- SCRIPT -->
88
  <script type="text/javascript" language="javascript">
89
+ var myCodeMirror = CodeMirror.fromTextArea(document.getElementById('anarcho_cfunctions_settings[anarcho_cfunctions-content]'), {
90
  lineNumbers: true,
91
  matchBrackets: true,
92
  mode: 'application/x-httpd-php',
93
  indentUnit: 4
94
  });
95
+ setTimeout(function() {
96
+ myCodeMirror.refresh();
97
+ },1);
98
  </script>
99
+ <!-- END-SCRIPT -->
100
+
101
+ <!-- STYLE -->
102
  <style>
103
  .CodeMirror {
104
  border: 1px solid cornflowerblue;
105
  height: auto;
106
  }
107
  </style>
108
+ <!-- END-STYLE -->
109
+
110
  </form>
111
  </div>
112
  <?php
my-custom-functions.php CHANGED
@@ -5,7 +5,7 @@
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 "Berserkr" Gareginyan
7
  * Author URI: http://mycyberuniverse.com/author.html
8
- * Version: 1.5
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
@@ -82,10 +82,11 @@ require_once( plugin_dir_path( __FILE__ ) . 'inc/settings_page.php' );
82
  /**
83
  * Register settings
84
  *
85
- * @since 0.1
86
  */
87
  function anarcho_cfunctions_register_settings() {
88
  register_setting( 'anarcho_cfunctions_settings_group', 'anarcho_cfunctions_settings' );
 
89
  }
90
  add_action( 'admin_init', 'anarcho_cfunctions_register_settings' );
91
 
@@ -138,9 +139,9 @@ anarcho_cfunctions_exec();
138
  */
139
  function anarcho_cfunctions_uninstall() {
140
  delete_option( 'anarcho_cfunctions_settings' );
141
- delete_option( 'anarcho_cfunctions_error' );
142
  }
143
  register_uninstall_hook( __FILE__, 'anarcho_cfunctions_uninstall' );
144
 
145
  /* That's all folks! */
146
- ?>
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 "Berserkr" Gareginyan
7
  * Author URI: http://mycyberuniverse.com/author.html
8
+ * Version: 1.6
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
82
  /**
83
  * Register settings
84
  *
85
+ * @since 1.6
86
  */
87
  function anarcho_cfunctions_register_settings() {
88
  register_setting( 'anarcho_cfunctions_settings_group', 'anarcho_cfunctions_settings' );
89
+ register_setting( 'anarcho_cfunctions_settings_group', 'anarcho_cfunctions_pro_error' );
90
  }
91
  add_action( 'admin_init', 'anarcho_cfunctions_register_settings' );
92
 
139
  */
140
  function anarcho_cfunctions_uninstall() {
141
  delete_option( 'anarcho_cfunctions_settings' );
142
+ delete_option( 'anarcho_cfunctions_error' );
143
  }
144
  register_uninstall_hook( __FILE__, 'anarcho_cfunctions_uninstall' );
145
 
146
  /* That's all folks! */
147
+ ?>
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=JG3SB73K86FA8
5
  Requires at least: 3.9
6
  Tested up to: 4.3
7
- Stable tag: 1.3
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -37,6 +37,7 @@ This is a simple and perfect tool to use as your site's functionality plugin.
37
  **Coming soon:**
38
 
39
  * Trigger to temporary disable the custom code.
 
40
  * (Got more ideas? Tell me!)
41
 
42
  For more details please visit - [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html)
@@ -116,6 +117,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
116
 
117
 
118
  == Changelog ==
 
 
 
 
119
  = 1.5 =
120
  * CodeMirror scripts are combined and minified.
121
  = 1.4 =
@@ -138,6 +143,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
138
 
139
 
140
  == Upgrade Notice ==
 
 
 
 
141
  = 1.5 =
142
  CodeMirror scripts are combined and minified.
143
  = 1.4 =
@@ -151,4 +160,4 @@ Fixed positioning of the sidebar at the plugin page.
151
  = 1.0 =
152
  Please update to first stable release! Added the check for safety execution code.
153
  = 0.2 =
154
- Please update to beta version.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JG3SB73K86FA8
5
  Requires at least: 3.9
6
  Tested up to: 4.3
7
+ Stable tag: 1.5
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
37
  **Coming soon:**
38
 
39
  * Trigger to temporary disable the custom code.
40
+ * Backuping the custom code to a file.
41
  * (Got more ideas? Tell me!)
42
 
43
  For more details please visit - [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html)
117
 
118
 
119
  == Changelog ==
120
+ = 1.6 =
121
+ * Fixed the issue due to which nothing appears below line 26 until you click below that line.
122
+ * Added “register_setting” for error option.
123
+ * Corrected comments to source code.
124
  = 1.5 =
125
  * CodeMirror scripts are combined and minified.
126
  = 1.4 =
143
 
144
 
145
  == Upgrade Notice ==
146
+ = 1.6 =
147
+ * Fixed the issue due to which nothing appears below line 26 until you click below that line.
148
+ * Added “register_setting” for error option.
149
+ * Corrected comments to source code.
150
  = 1.5 =
151
  CodeMirror scripts are combined and minified.
152
  = 1.4 =
160
  = 1.0 =
161
  Please update to first stable release! Added the check for safety execution code.
162
  = 0.2 =
163
+ Please update to beta version.