Child Theme Creator by Orbisius - Version 1.1.7

Version Description

  • Added Plugin's links to the admin nav bar.
  • Added site preview button in the theme editor
Download this release

Release Info

Developer lordspace
Plugin Icon wp plugin Child Theme Creator by Orbisius
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

nbproject/private/private.xml CHANGED
@@ -13,14 +13,18 @@
13
  <url>orbisius-child-theme-creator.php</url>
14
  <bookmark id="4">
15
  <name/>
16
- <line>1516</line>
17
  <key/>
18
  </bookmark>
19
  <bookmark id="3">
20
  <name/>
21
- <line>1744</line>
22
  <key/>
23
  </bookmark>
24
  </file>
25
  </editor-bookmarks>
 
 
 
 
26
  </project-private>
13
  <url>orbisius-child-theme-creator.php</url>
14
  <bookmark id="4">
15
  <name/>
16
+ <line>1821</line>
17
  <key/>
18
  </bookmark>
19
  <bookmark id="3">
20
  <name/>
21
+ <line>2067</line>
22
  <key/>
23
  </bookmark>
24
  </file>
25
  </editor-bookmarks>
26
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
27
+ <file>file:/C:/projects/default/htdocs/wordpress313/wp-content/plugins/orbisius-child-theme-creator/orbisius-child-theme-creator.php</file>
28
+ <file>file:/C:/projects/default/htdocs/wordpress313/wp-content/plugins/orbisius-child-theme-creator/readme.txt</file>
29
+ </open-files>
30
  </project-private>
orbisius-child-theme-creator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Orbisius Child Theme Creator
4
  Plugin URI: http://club.orbisius.com/products/wordpress-plugins/orbisius-child-theme-creator/
5
  Description: This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog.
6
- Version: 1.1.6
7
  Author: Svetoslav Marinov (Slavi)
8
  Author URI: http://orbisius.com
9
  */
@@ -35,12 +35,23 @@ add_action('wp_footer', 'orbisius_child_theme_creator_add_plugin_credits', 1000)
35
  add_action('admin_notices', 'orbisius_child_theme_creator_admin_notice_message');
36
  add_action('network_admin_notices', 'orbisius_child_theme_creator_admin_notice_message');
37
 
 
 
38
  add_action( 'wp_ajax_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_ajax');
39
  add_action( 'wp_ajax_nopriv_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_ajax');
40
 
41
 
42
  register_activation_hook( __FILE__, 'orbisius_child_theme_creator_on_activate' );
43
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  *
46
  */
@@ -85,6 +96,59 @@ function orbisius_child_theme_creator_admin_init() {
85
 
86
  }
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  /**
89
  * Sets the setting variables
90
  */
@@ -1694,6 +1758,8 @@ function orbisius_ctc_theme_editor() {
1694
  <button type="button" class='button' id="theme_1_new_file_btn" name="theme_1_new_file_btn">New File</button>
1695
  <button type="button" class='button' id="theme_1_syntax_chk_btn" name="theme_1_syntax_chk_btn">PHP Syntax Check</button>
1696
  <button type="button" class='button' id="theme_1_send_btn" name="theme_1_send_btn">Send</button>
 
 
1697
 
1698
  <!--
1699
  <button type="button" class='button' id="theme_1_new_folder_btn" name="theme_1_new_folder_btn">New Folder</button>-->
3
  Plugin Name: Orbisius Child Theme Creator
4
  Plugin URI: http://club.orbisius.com/products/wordpress-plugins/orbisius-child-theme-creator/
5
  Description: This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog.
6
+ Version: 1.1.7
7
  Author: Svetoslav Marinov (Slavi)
8
  Author URI: http://orbisius.com
9
  */
35
  add_action('admin_notices', 'orbisius_child_theme_creator_admin_notice_message');
36
  add_action('network_admin_notices', 'orbisius_child_theme_creator_admin_notice_message');
37
 
38
+ add_action('wp_before_admin_bar_render', 'orbisius_child_theme_creator_admin_bar_render', 100);
39
+
40
  add_action( 'wp_ajax_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_ajax');
41
  add_action( 'wp_ajax_nopriv_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_ajax');
42
 
43
 
44
  register_activation_hook( __FILE__, 'orbisius_child_theme_creator_on_activate' );
45
 
46
+ /**
47
+ * Adds admin bar items for easy access to the theme creator and editor
48
+ */
49
+ function orbisius_child_theme_creator_admin_bar_render() {
50
+ orbisius_child_theme_creator_add_admin_bar('Orbisius');
51
+ orbisius_child_theme_creator_add_admin_bar('Orbisius Child Theme Creator', orbisius_child_theme_creator_util::get_create_child_pages_link(), 'Orbisius');
52
+ orbisius_child_theme_creator_add_admin_bar('Orbisius Theme Editor', orbisius_child_theme_creator_util::get_theme_editor_link(), 'Orbisius');
53
+ }
54
+
55
  /**
56
  *
57
  */
96
 
97
  }
98
 
99
+ /**
100
+ * Add's menu parent or submenu item.
101
+ * @param string $name the label of the menu item
102
+ * @param string $href the link to the item (settings page or ext site)
103
+ * @param string $parent Parent label (if creating a submenu item)
104
+ *
105
+ * @return void
106
+ * @author Slavi Marinov <http://orbisius.com>
107
+ * */
108
+ function orbisius_child_theme_creator_add_admin_bar($name, $href = '', $parent = '', $custom_meta = array()) {
109
+ global $wp_admin_bar;
110
+
111
+ if (!is_super_admin()
112
+ || !is_admin_bar_showing()
113
+ || !is_object($wp_admin_bar)
114
+ || !function_exists('is_admin_bar_showing')) {
115
+ return;
116
+ }
117
+
118
+ // Generate ID based on the current filename and the name supplied.
119
+ $id = str_replace('.php', '', basename(__FILE__)) . '-' . $name;
120
+ $id = preg_replace('#[^\w-]#si', '-', $id);
121
+ $id = strtolower($id);
122
+ $id = trim($id, '-');
123
+
124
+ $parent = trim($parent);
125
+
126
+ // Generate the ID of the parent.
127
+ if (!empty($parent)) {
128
+ $parent = str_replace('.php', '', basename(__FILE__)) . '-' . $parent;
129
+ $parent = preg_replace('#[^\w-]#si', '-', $parent);
130
+ $parent = strtolower($parent);
131
+ $parent = trim($parent, '-');
132
+ }
133
+
134
+ // links from the current host will open in the current window
135
+ $site_url = site_url();
136
+
137
+ $meta_default = array();
138
+ $meta_ext = array( 'target' => '_blank' ); // external links open in new tab/window
139
+
140
+ $meta = (strpos($href, $site_url) !== false) ? $meta_default : $meta_ext;
141
+ $meta = array_merge($meta, $custom_meta);
142
+
143
+ $wp_admin_bar->add_node(array(
144
+ 'parent' => $parent,
145
+ 'id' => $id,
146
+ 'title' => $name,
147
+ 'href' => $href,
148
+ 'meta' => $meta,
149
+ ));
150
+ }
151
+
152
  /**
153
  * Sets the setting variables
154
  */
1758
  <button type="button" class='button' id="theme_1_new_file_btn" name="theme_1_new_file_btn">New File</button>
1759
  <button type="button" class='button' id="theme_1_syntax_chk_btn" name="theme_1_syntax_chk_btn">PHP Syntax Check</button>
1760
  <button type="button" class='button' id="theme_1_send_btn" name="theme_1_send_btn">Send</button>
1761
+ <a href="<?php echo site_url('/');?>" class='button' target="_blank" title="new tab/window"
1762
+ id="theme_1_site_preview_btn" name="theme_1_site_preview_btn">View Site</button>
1763
 
1764
  <!--
1765
  <button type="button" class='button' id="theme_1_new_folder_btn" name="theme_1_new_folder_btn">New Folder</button>-->
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: child theme, childtheme,childthemes,child themes,CSS, styling,resposive design,design,custom themeing, shared hosting, theme,themes,wp,wordpress,orbisius,theme creator
5
  Requires at least: 3.4
6
  Tested up to: 3.8
7
- Stable tag: 1.1.6
8
  License: GPLv2 or later
9
 
10
  This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog.
@@ -123,6 +123,10 @@ Let's talk.
123
 
124
  == Changelog ==
125
 
 
 
 
 
126
  = 1.1.6 =
127
  * Added settings link in the Plugin listing.
128
 
4
  Tags: child theme, childtheme,childthemes,child themes,CSS, styling,resposive design,design,custom themeing, shared hosting, theme,themes,wp,wordpress,orbisius,theme creator
5
  Requires at least: 3.4
6
  Tested up to: 3.8
7
+ Stable tag: 1.1.7
8
  License: GPLv2 or later
9
 
10
  This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog.
123
 
124
  == Changelog ==
125
 
126
+ = 1.1.7 =
127
+ * Added Plugin's links to the admin nav bar.
128
+ * Added site preview button in the theme editor
129
+
130
  = 1.1.6 =
131
  * Added settings link in the Plugin listing.
132