My Custom Functions - Version 1.4

Version Description

  • Fixed the issue due to which the alert message was appearing after installation.
Download this release

Release Info

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

Code changes from version 1.3 to 1.4

Files changed (2) hide show
  1. my-custom-functions.php +11 -9
  2. readme.txt +8 -3
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.3
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
@@ -113,7 +113,7 @@ add_action( 'admin_enqueue_scripts', 'anarcho_enqueue_codemirror_scripts' );
113
  /**
114
  * Execute My Custom Functions
115
  *
116
- * @since 1.0
117
  */
118
  function anarcho_cfunctions_exec() {
119
  // Read from BD
@@ -124,13 +124,15 @@ function anarcho_cfunctions_exec() {
124
  $content = trim( $content );
125
  $content = trim( $content, '<?php' );
126
 
127
- // Reset error value
128
- update_option( 'anarcho_cfunctions_error', '0' );
129
-
130
  // Parsing and execute safe
131
- if( false === @eval( $content ) ) {
132
- // ERROR
133
- update_option( 'anarcho_cfunctions_error', '1' );
 
 
 
 
 
134
  }
135
  }
136
  anarcho_cfunctions_exec();
@@ -149,4 +151,4 @@ register_uninstall_hook( __FILE__, 'anarcho_cfunctions_uninstall' );
149
 
150
 
151
  /* That's all folks! */
152
- ?>
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.4
9
  * License: GPL3
10
  * Text Domain: mcfunctions
11
  * Domain Path: /languages/
113
  /**
114
  * Execute My Custom Functions
115
  *
116
+ * @since 1.4
117
  */
118
  function anarcho_cfunctions_exec() {
119
  // Read from BD
124
  $content = trim( $content );
125
  $content = trim( $content, '<?php' );
126
 
 
 
 
127
  // Parsing and execute safe
128
+ if ( !empty($content) ) {
129
+ if( false === @eval( $content ) ) {
130
+ //ERROR
131
+ update_option( 'anarcho_cfunctions_error', '1' );
132
+ } else {
133
+ // Reset error value
134
+ update_option( 'anarcho_cfunctions_error', '0' );
135
+ }
136
  }
137
  }
138
  anarcho_cfunctions_exec();
151
 
152
 
153
  /* That's all folks! */
154
+ ?>
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.2
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -78,7 +78,7 @@ I don't limit the number of characters.
78
  Yes. But If your language is not available then you can make one. This plugin is ready for translation. The .pot file is included and placed in "languages" folder. Many of plugin users would be delighted if you shared your translation with the community. Just send the translation files (*.po, *.mo) to me at the arthurgareginyan@gmail.com and I will include the translation within the next plugin update.
79
 
80
  = Where to report bug if found? =
81
- Please visit [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html) and report.
82
 
83
  = Where to share any ideas or suggestions to make the plugin better? =
84
  Please visit [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html) and share.
@@ -111,9 +111,12 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
111
 
112
  * [Developer Website](http://mycyberuniverse.com)
113
  * [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html)
 
114
 
115
 
116
  == Changelog ==
 
 
117
  = 1.3 =
118
  * .pot file included.
119
  * Minor fixes.
@@ -132,6 +135,8 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
132
 
133
 
134
  == Upgrade Notice ==
 
 
135
  = 1.3 =
136
  Please update to new version!
137
  = 1.2 =
@@ -141,4 +146,4 @@ Fixed positioning of the sidebar at the plugin page.
141
  = 1.0 =
142
  Please update to first stable release! Added the check for safety execution code.
143
  = 0.2 =
144
- 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.3
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
78
  Yes. But If your language is not available then you can make one. This plugin is ready for translation. The .pot file is included and placed in "languages" folder. Many of plugin users would be delighted if you shared your translation with the community. Just send the translation files (*.po, *.mo) to me at the arthurgareginyan@gmail.com and I will include the translation within the next plugin update.
79
 
80
  = Where to report bug if found? =
81
+ Please visit [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/my-custom-functions) and report.
82
 
83
  = Where to share any ideas or suggestions to make the plugin better? =
84
  Please visit [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html) and share.
111
 
112
  * [Developer Website](http://mycyberuniverse.com)
113
  * [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-plugin-my-custom-functions.html)
114
+ * [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/my-custom-functions)
115
 
116
 
117
  == Changelog ==
118
+ = 1.4 =
119
+ * Fixed the issue due to which the alert message was appearing after installation.
120
  = 1.3 =
121
  * .pot file included.
122
  * Minor fixes.
135
 
136
 
137
  == Upgrade Notice ==
138
+ = 1.4 =
139
+ Please update to new version!
140
  = 1.3 =
141
  Please update to new version!
142
  = 1.2 =
146
  = 1.0 =
147
  Please update to first stable release! Added the check for safety execution code.
148
  = 0.2 =
149
+ Please update to beta version.