My Custom Functions - Version 1.8

Version Description

  • The mode of CodeMirror editor changed from 'application/x-httpd-php' (HTML+PHP) to 'text/x-php' (PHP).
  • Placeholder of
  • Removed more unused do_action() from settings_page.php file.
Download this release

Release Info

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

Code changes from version 1.7 to 1.8

Files changed (4) hide show
  1. inc/editor.js +3 -3
  2. inc/settings_page.php +2 -9
  3. my-custom-functions.php +1 -1
  4. readme.txt +13 -6
inc/editor.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * My Custom Functions
3
  * CodeMirror editor
4
- * @since 1.7
5
  * @agareginyan
6
  */
7
 
@@ -10,11 +10,11 @@
10
  var editor = CodeMirror.fromTextArea(document.getElementById('anarcho_cfunctions_settings[anarcho_cfunctions-content]'), {
11
  lineNumbers: true,
12
  matchBrackets: true,
13
- mode: 'application/x-httpd-php',
14
  indentUnit: 4
15
  });
16
 
17
  // Refresh CodeMirror editor after 1 second
18
  setTimeout(function() {
19
  editor.refresh();
20
- },1);
1
  /*
2
  * My Custom Functions
3
  * CodeMirror editor
4
+ * @since 1.8
5
  * @agareginyan
6
  */
7
 
10
  var editor = CodeMirror.fromTextArea(document.getElementById('anarcho_cfunctions_settings[anarcho_cfunctions-content]'), {
11
  lineNumbers: true,
12
  matchBrackets: true,
13
+ mode: 'text/x-php', // PHP='text/x-php', HTML+PHP='application/x-httpd-php'.
14
  indentUnit: 4
15
  });
16
 
17
  // Refresh CodeMirror editor after 1 second
18
  setTimeout(function() {
19
  editor.refresh();
20
+ },1);
inc/settings_page.php CHANGED
@@ -8,15 +8,13 @@ defined('ABSPATH') or die("Restricted access!");
8
  /**
9
  * Render Settings Page
10
  *
11
- * @since 1.7
12
  */
13
  function anarcho_cfunctions_render_submenu_page() {
14
 
15
  // Variables
16
  $options = get_option( 'anarcho_cfunctions_settings' );
17
- $content = isset( $options['anarcho_cfunctions-content'] ) && ! empty( $options['anarcho_cfunctions-content'] ) ? $options['anarcho_cfunctions-content'] : '<?php
18
-
19
- /* Enter Your Custom Functions Here */';
20
  $error = get_option( 'anarcho_cfunctions_error' );
21
 
22
  // Settings update message
@@ -57,7 +55,6 @@ function anarcho_cfunctions_render_submenu_page() {
57
 
58
  <!-- SIDEBAR -->
59
  <div id="templateside">
60
- <?php do_action( 'anarcho_cfunctions-sidebar-top' ); ?>
61
  <p>
62
  <?php _e( 'This plugin allows you to EASILY and SAFELY add your own functions, snippets or any custom code to your site.', 'mcfunctions' ) ?>
63
  </p>
@@ -70,18 +67,14 @@ function anarcho_cfunctions_render_submenu_page() {
70
  <img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Make a donation">
71
  </a>
72
  </p>
73
- <?php do_action( 'anarcho_cfunctions-sidebar-bottom' ); ?>
74
  </div>
75
  <!-- END-SIDEBAR -->
76
 
77
  <!-- FORM -->
78
  <div id="container">
79
- <?php do_action( 'anarcho_cfunctions-form-top' ); ?>
80
  <div>
81
  <textarea cols="70" rows="30" name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo esc_attr( $content ); ?></textarea>
82
  </div>
83
- <?php do_action( 'anarcho_cfunctions-textarea-bottom' ); ?>
84
- <?php do_action( 'anarcho_cfunctions-form-bottom' ); ?>
85
  </div>
86
  <!-- END-FORM -->
87
 
8
  /**
9
  * Render Settings Page
10
  *
11
+ * @since 1.8
12
  */
13
  function anarcho_cfunctions_render_submenu_page() {
14
 
15
  // Variables
16
  $options = get_option( 'anarcho_cfunctions_settings' );
17
+ $content = isset( $options['anarcho_cfunctions-content'] ) && ! empty( $options['anarcho_cfunctions-content'] ) ? $options['anarcho_cfunctions-content'] : '/* Enter Your Custom Functions Here */';
 
 
18
  $error = get_option( 'anarcho_cfunctions_error' );
19
 
20
  // Settings update message
55
 
56
  <!-- SIDEBAR -->
57
  <div id="templateside">
 
58
  <p>
59
  <?php _e( 'This plugin allows you to EASILY and SAFELY add your own functions, snippets or any custom code to your site.', 'mcfunctions' ) ?>
60
  </p>
67
  <img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Make a donation">
68
  </a>
69
  </p>
 
70
  </div>
71
  <!-- END-SIDEBAR -->
72
 
73
  <!-- FORM -->
74
  <div id="container">
 
75
  <div>
76
  <textarea cols="70" rows="30" name="anarcho_cfunctions_settings[anarcho_cfunctions-content]" id="anarcho_cfunctions_settings[anarcho_cfunctions-content]" ><?php echo esc_attr( $content ); ?></textarea>
77
  </div>
 
 
78
  </div>
79
  <!-- END-FORM -->
80
 
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.7
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
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.8
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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=JG3SB73K86FA8
5
  Requires at least: 3.9
6
- Tested up to: 4.3
7
- Stable tag: 1.7
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -96,10 +96,9 @@ Please visit [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-p
96
 
97
 
98
  == Screenshots ==
99
- 1. Plugin’s page.
100
- 2. Plugin’s page with custom code added.
101
- 3. Success message.
102
- 4. «Fatal error» message.
103
 
104
 
105
  == Other Notes ==
@@ -126,6 +125,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
126
 
127
 
128
  == Changelog ==
 
 
 
 
129
  = 1.7 =
130
  * The stylesheet of plugin's page moved to separate file.
131
  * The javascript from settings_page.php moved to separate file.
@@ -158,6 +161,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
158
 
159
 
160
  == Upgrade Notice ==
 
 
 
 
161
  = 1.7 =
162
  * The stylesheet of plugin's page moved to separate file.
163
  * The javascript from settings_page.php moved to separate file.
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=JG3SB73K86FA8
5
  Requires at least: 3.9
6
+ Tested up to: 4.4
7
+ Stable tag: 1.8
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
96
 
97
 
98
  == Screenshots ==
99
+ 1. Plugin’s page with custom code added.
100
+ 2. Success message.
101
+ 3. «Fatal error» message.
 
102
 
103
 
104
  == Other Notes ==
125
 
126
 
127
  == Changelog ==
128
+ = 1.8 =
129
+ * The mode of CodeMirror editor changed from 'application/x-httpd-php' (HTML+PHP) to 'text/x-php' (PHP).
130
+ * Placeholder of <textarea> changed to "/* Enter Your Custom Functions Here */".
131
+ * Removed more unused do_action() from settings_page.php file.
132
  = 1.7 =
133
  * The stylesheet of plugin's page moved to separate file.
134
  * The javascript from settings_page.php moved to separate file.
161
 
162
 
163
  == Upgrade Notice ==
164
+ = 1.8 =
165
+ * The mode of CodeMirror editor changed from 'application/x-httpd-php' (HTML+PHP) to 'text/x-php' (PHP).
166
+ * Placeholder of <textarea> changed to "/* Enter Your Custom Functions Here */".
167
+ * Removed more unused do_action() from settings_page.php file.
168
  = 1.7 =
169
  * The stylesheet of plugin's page moved to separate file.
170
  * The javascript from settings_page.php moved to separate file.