Version Description
- Fixed missing image for themes that provide screenshots in other than .png format. Thanks Nick Greaves for reporting this.
Download this release
Release Info
Developer | lordspace |
Plugin | Child Theme Creator by Orbisius |
Version | 1.4.8 |
Comparing to | |
See all releases |
Code changes from version 1.4.7 to 1.4.8
- assets/images/missing_theme_screenshot.jpg +0 -0
- orbisius-child-theme-creator.php +40 -6
- readme.txt +4 -1
assets/images/missing_theme_screenshot.jpg
ADDED
Binary file
|
orbisius-child-theme-creator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Orbisius Child Theme Creator
|
4 |
Plugin URI: http://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.4.
|
7 |
Author: Svetoslav Marinov (Slavi)
|
8 |
Author URI: http://orbisius.com
|
9 |
*/
|
@@ -930,6 +930,8 @@ function orbisius_child_theme_creator_tools_action() {
|
|
930 |
$args = array();
|
931 |
$themes = wp_get_themes($args);
|
932 |
|
|
|
|
|
933 |
// we use the same CSS as in WP's appearances but put only the buttons we want.
|
934 |
foreach ($themes as $theme_basedir_name => $theme_obj) {
|
935 |
$parent_theme = $theme_obj->get('Template');
|
@@ -939,7 +941,25 @@ function orbisius_child_theme_creator_tools_action() {
|
|
939 |
}
|
940 |
|
941 |
// get the web uri for the current theme and go 1 level up
|
942 |
-
$src = dirname(get_template_directory_uri()) . "/$theme_basedir_name/screenshot.png";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
943 |
$functions_file = dirname(get_template_directory()) . "/$theme_basedir_name/functions.php";
|
944 |
$parent_theme_base_dirname_fmt = urlencode($theme_basedir_name);
|
945 |
$create_url = $_SERVER['REQUEST_URI'];
|
@@ -1097,10 +1117,24 @@ function orbisius_child_theme_creator_tools_action() {
|
|
1097 |
}
|
1098 |
|
1099 |
$child_themes_cnt++;
|
1100 |
-
|
1101 |
// get the web uri for the current theme and go 1 level up
|
1102 |
-
$
|
1103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104 |
$author_name = $theme_obj->get('Author');
|
1105 |
$author_name = strip_tags($author_name);
|
1106 |
$author_name = empty($author_name) ? 'n/a' : $author_name;
|
@@ -1562,7 +1596,7 @@ class orbisius_child_theme_creator {
|
|
1562 |
* What files do we have to copy from the parent theme.
|
1563 |
* @var array
|
1564 |
*/
|
1565 |
-
private $main_files = array('screenshot.png', 'header.php', 'footer.php', );
|
1566 |
|
1567 |
/**
|
1568 |
*
|
3 |
Plugin Name: Orbisius Child Theme Creator
|
4 |
Plugin URI: http://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.4.8
|
7 |
Author: Svetoslav Marinov (Slavi)
|
8 |
Author URI: http://orbisius.com
|
9 |
*/
|
930 |
$args = array();
|
931 |
$themes = wp_get_themes($args);
|
932 |
|
933 |
+
$default_theme_thumbail = plugins_url('/assets/images/missing_theme_screenshot.jpg', ORBISIUS_CHILD_THEME_CREATOR_MAIN_PLUGIN_FILE);
|
934 |
+
|
935 |
// we use the same CSS as in WP's appearances but put only the buttons we want.
|
936 |
foreach ($themes as $theme_basedir_name => $theme_obj) {
|
937 |
$parent_theme = $theme_obj->get('Template');
|
941 |
}
|
942 |
|
943 |
// get the web uri for the current theme and go 1 level up
|
944 |
+
// $src = dirname(get_template_directory_uri()) . "/$theme_basedir_name/screenshot.png";
|
945 |
+
|
946 |
+
// get the web uri for the current theme and go 1 level up
|
947 |
+
$web_dir = dirname(get_template_directory_uri());
|
948 |
+
$local_dir = dirname(get_template_directory()) . "/$theme_basedir_name/";
|
949 |
+
|
950 |
+
$src = $default_theme_thumbail;
|
951 |
+
$src_png = $web_dir . "/$theme_basedir_name/screenshot.png";
|
952 |
+
$src_jpg = $web_dir . "/$theme_basedir_name/screenshot.jpg";
|
953 |
+
$src_jpg2 = $web_dir . "/$theme_basedir_name/screenshot.jpeg";
|
954 |
+
|
955 |
+
if (file_exists($local_dir . basename($src_png))) {
|
956 |
+
$src = $src_png;
|
957 |
+
} elseif (file_exists($local_dir . basename($src_jpg))) {
|
958 |
+
$src = $src_jpg;
|
959 |
+
} elseif (file_exists($local_dir . basename($src_jpg2))) {
|
960 |
+
$src = $src_jpg2;
|
961 |
+
}
|
962 |
+
|
963 |
$functions_file = dirname(get_template_directory()) . "/$theme_basedir_name/functions.php";
|
964 |
$parent_theme_base_dirname_fmt = urlencode($theme_basedir_name);
|
965 |
$create_url = $_SERVER['REQUEST_URI'];
|
1117 |
}
|
1118 |
|
1119 |
$child_themes_cnt++;
|
1120 |
+
|
1121 |
// get the web uri for the current theme and go 1 level up
|
1122 |
+
$web_dir = dirname(get_template_directory_uri());
|
1123 |
+
$local_dir = dirname(get_template_directory()) . "/$theme_basedir_name/";
|
1124 |
+
|
1125 |
+
$src = $default_theme_thumbail;
|
1126 |
+
$src_png = $web_dir . "/$theme_basedir_name/screenshot.png";
|
1127 |
+
$src_jpg = $web_dir . "/$theme_basedir_name/screenshot.jpg";
|
1128 |
+
$src_jpg2 = $web_dir . "/$theme_basedir_name/screenshot.jpeg";
|
1129 |
+
|
1130 |
+
if (file_exists($local_dir . basename($src_png))) {
|
1131 |
+
$src = $src_png;
|
1132 |
+
} elseif (file_exists($local_dir . basename($src_jpg))) {
|
1133 |
+
$src = $src_jpg;
|
1134 |
+
} elseif (file_exists($local_dir . basename($src_jpg2))) {
|
1135 |
+
$src = $src_jpg2;
|
1136 |
+
}
|
1137 |
+
|
1138 |
$author_name = $theme_obj->get('Author');
|
1139 |
$author_name = strip_tags($author_name);
|
1140 |
$author_name = empty($author_name) ? 'n/a' : $author_name;
|
1596 |
* What files do we have to copy from the parent theme.
|
1597 |
* @var array
|
1598 |
*/
|
1599 |
+
private $main_files = array('screenshot.png', 'screenshot.jpg', 'screenshot.jpeg', 'header.php', 'footer.php', );
|
1600 |
|
1601 |
/**
|
1602 |
*
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: theme,child theme,childtheme,childthemes,parent theme,child themes,CSS,styling,resposive design,design,custom themeing, shared hosting,theme editor theme,themes,wp,wordpress,orbisius,theme creator,custom theme,theme generator,css,css editor
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Create Child Themes quickly and easily from any theme that you have currently installed on your site/blog.
|
@@ -166,6 +166,9 @@ Todo
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
169 |
= 1.4.7 =
|
170 |
* Made a fix so the plugin doesn't crash WP 4.2 installs wp_scripts (Thanks Leila for reporting this)
|
171 |
* Tested with latest WordPress
|
4 |
Tags: theme,child theme,childtheme,childthemes,parent theme,child themes,CSS,styling,resposive design,design,custom themeing, shared hosting,theme editor theme,themes,wp,wordpress,orbisius,theme creator,custom theme,theme generator,css,css editor
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.4.8
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Create Child Themes quickly and easily from any theme that you have currently installed on your site/blog.
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 1.4.8 =
|
170 |
+
* Fixed missing image for themes that provide screenshots in other than .png format. Thanks Nick Greaves for reporting this.
|
171 |
+
|
172 |
= 1.4.7 =
|
173 |
* Made a fix so the plugin doesn't crash WP 4.2 installs wp_scripts (Thanks Leila for reporting this)
|
174 |
* Tested with latest WordPress
|