Shortcode in Menus - Version 1.0

Version Description

  • Added prefix to function which was conflicting with another plugin
Download this release

Release Info

Developer gagan0123
Plugin Icon 128x128 Shortcode in Menus
Version 1.0
Comparing to
See all releases

Code changes from version 0.1 to 1.0

Files changed (2) hide show
  1. index.php +8 -8
  2. readme.txt +8 -3
index.php CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: Shortcodes in Menus
4
  Description: Allows you to add shortcodes in WordPress Navigation Menus
5
  Plugin URI: http://wordpress.org/plugins/shortcode-in-menus/
6
- Version: 0.1
7
  Author URI: http://gagan.pro
8
- Author: Gagan0123
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -13,28 +13,28 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
  /**
14
  * Allows shortcode to be saved in database
15
  */
16
- function gs_allow_saving_shortcode_custom_links( $url, $orig_url, $context ){
17
  if($context=='db'){
18
  return $orig_url;
19
  }
20
  return $url;
21
  }
22
 
23
- function gs_sw_security_check(){
24
  if(current_user_can('activate_plugins')){
25
  //Conditionally adding the function for database context for
26
- add_filter( 'clean_url', 'gs_allow_saving_shortcode_custom_links', 99, 3 );
27
  }
28
  }
29
- add_action('wp_loaded','gs_sw_security_check');
30
 
31
  /**
32
  * Allows shortcode to be processed and displayed
33
  */
34
- function gs_allow_display_shortcode_custom_links( $url, $orig_url, $context ){
35
  if( $context=='display' ){
36
  return do_shortcode($orig_url);
37
  }
38
  return $url;
39
  }
40
- add_filter( 'clean_url', 'gs_allow_display_shortcode_custom_links', 1, 3 );
3
  Plugin Name: Shortcodes in Menus
4
  Description: Allows you to add shortcodes in WordPress Navigation Menus
5
  Plugin URI: http://wordpress.org/plugins/shortcode-in-menus/
6
+ Version: 1.0
7
  Author URI: http://gagan.pro
8
+ Author: Gagan Deep Singh
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
  /**
14
  * Allows shortcode to be saved in database
15
  */
16
+ function gs_sim_allow_saving_shortcode_custom_links( $url, $orig_url, $context ){
17
  if($context=='db'){
18
  return $orig_url;
19
  }
20
  return $url;
21
  }
22
 
23
+ function gs_sim_security_check(){
24
  if(current_user_can('activate_plugins')){
25
  //Conditionally adding the function for database context for
26
+ add_filter( 'clean_url', 'gs_sim_allow_saving_shortcode_custom_links', 99, 3 );
27
  }
28
  }
29
+ add_action('wp_loaded','gs_sim_security_check');
30
 
31
  /**
32
  * Allows shortcode to be processed and displayed
33
  */
34
+ function gs_sim_allow_display_shortcode_custom_links( $url, $orig_url, $context ){
35
  if( $context=='display' ){
36
  return do_shortcode($orig_url);
37
  }
38
  return $url;
39
  }
40
+ add_filter( 'clean_url', 'gs_sim_allow_display_shortcode_custom_links', 1, 3 );
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Shortcodes in Menus ===
2
- Contributors: Gagan0123
3
  Tags: Shortcode, Menus, Custom Link
4
  Requires at least: 3.5
5
  Tested up to: 3.6.1
6
- Stable tag: 0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -21,4 +21,9 @@ generate the links dynamically.
21
  1. You can now add shortcodes in the custom links of the menus
22
 
23
  == Changelog ==
24
- 0.1 Initial plugin
 
 
 
 
 
1
  === Shortcodes in Menus ===
2
+ Contributors: gagan0123
3
  Tags: Shortcode, Menus, Custom Link
4
  Requires at least: 3.5
5
  Tested up to: 3.6.1
6
+ Stable tag: 1.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
21
  1. You can now add shortcodes in the custom links of the menus
22
 
23
  == Changelog ==
24
+
25
+ = 0.1 =
26
+ * Initial Plugin uploaded.
27
+
28
+ = 1.0 =
29
+ * Added prefix to function which was conflicting with another plugin