Changeset 1117387
- Timestamp:
- 03/21/2015 08:40:46 AM (11 years ago)
- Location:
- one-click-child-theme/trunk
- Files:
-
- 1 added
- 2 edited
-
child-theme-css.php (modified) (1 diff)
-
functions.php (added)
-
one-click-child-theme.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
one-click-child-theme/trunk/child-theme-css.php
r427950 r1117387 5 5 Template: <?php echo $parent_theme_template, "\n"; ?> 6 6 7 (optional values you can add: Theme URI, Author URI, Version )7 (optional values you can add: Theme URI, Author URI, Version, License, License URI, Tags, Text Domain) 8 8 */ 9 10 @import url("../<?php echo $parent_theme_name; ?>/style.css"); -
one-click-child-theme/trunk/one-click-child-theme.php
r427950 r1117387 4 4 Plugin Name: One-Click Child Theme 5 5 Plugin URI: http://terrychay.com/wordpress-plugins/one-click-child-theme 6 Version: 1. 26 Version: 1.4 7 7 Description: Allows you to easily child theme any theme from the theme 8 8 options on the wp-admin instead of going into shell or … … 12 12 13 13 **************************************************************************/ 14 /* Copyright 2011 terry chay (email : tychay@automattic.com)14 /* Copyright 2011-2015 terry chay (email : tychay@php.net) 15 15 16 16 This program is free software; you can redistribute it and/or modify … … 31 31 function __construct() { 32 32 $this->plugin_dir = dirname(__FILE__); 33 // it has to be buried liek this or you get an error "You do not have sufficient permissions to access this page" 33 // it has to be buried like this or you get an error: 34 // "You do not have sufficient permissions to access this page" 34 35 add_filter( 'admin_menu', array( $this, 'createMenu' ) ); 35 36 } … … 39 40 40 41 /** 41 * Show the theme page which has a form allowing you to child theme currently selected theme. 42 * Show the theme page which has a form allowing you to child theme 43 * currently selected theme. 42 44 */ 43 45 function showThemePage() { … … 81 83 * 82 84 * 1. style.css: Follows the rules outlined in {@link http://codex.wordpress.org/Child_Themes the Codex} 83 * 2. rtl.css: right to left language support, if not avaialble in parent, it 84 * uses TwentyEleven's rtl 85 * 3. screenshot.png: screenshot if available in the parent 85 * 2. function.php: Followed the updated rules outlined in the Codex. Note 86 * that since WordPress ?.? functions.php hierarchy is automatically 87 * included. 88 * 3. rtl.css: right to left language support, if not avaialble in parent, it 89 * uses TwentyFifteen's rtl 90 * 4. screenshot.png: screenshot if available in the parent 86 91 * 87 92 * @author terry chay <tychay@autoamttic.com> … … 117 122 file_put_contents( $new_theme_path.'/style.css', $css ); 118 123 124 // Copy functions.php 125 copy( $this->plugin_dir.'/functions.php', $new_theme_path.'/functions.php' ); 126 119 127 // RTL support 120 128 $rtl_theme = ( file_exists( $theme_root.'/'.$parent_theme_name.'/rtl.css' ) ) 121 129 ? $parent_theme_name 122 : 'twenty eleven'; //use the latest default theme rtl file130 : 'twentyfifteen'; //use the latest default theme rtl file 123 131 ob_start(); 124 132 require $this->plugin_dir.'/rtl-css.php';
Note: See TracChangeset
for help on using the changeset viewer.