Initial commit. State 04.2021.

This commit is contained in:
2021-04-22 17:57:16 +02:00
commit 82781cca41
2974 changed files with 975656 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
/*
Theme Name: <?php echo $new_theme_title, "\n"; ?>
Description: <?php echo $new_theme_description, "\n"; ?>
Author: <?php echo $new_theme_author, "\n"; ?>
Template: <?php echo $parent_theme_template, "\n"; ?>
(optional values you can add: Theme URI, Author URI, Version, License, License URI, Tags, Text Domain)
*/

View File

@@ -0,0 +1,50 @@
<?php
/**
* Page for showing the child theme creation form. (In the Theme > Child Theme submenu.)
*
* Local Variables
* - $this/self: the OCCT object
* - $parent_theme_name: the human-readable name of the parent theme
* - $theme_name: form variable (if error)
* - $description: form variable (if error)
* - $author: form variable
* @author terry chay <tychay@php.net>
*/
?>
<div class="wrap">
<h2><?php esc_html_e('Create a Child Theme', self::_SLUG) ?></h2>
<div class="copy"><?php printf( __( 'Fill out this form to create a child theme based on %s (your current theme).', self::_SLUG ), $parent_theme_name ); ?></div>
<form action="admin-post.php" method="post" id="create_child_form">
<input type="hidden" name="action" value="<?php echo $this->_createChildFormId; ?>" />
<?php wp_nonce_field($this->_createChildFormId.'-verify'); ?>
<table class="form-table">
<tr>
<th scope="row"><label for="create_child_theme_name"><?php esc_html_e( 'Theme Name', self::_SLUG ); ?></label></th>
<td>
<input type="text" name="theme_name" value="<?php esc_attr_e($theme_name); ?>" id="create_child_theme_name" />
<p class="description"><?php esc_html_e( 'Give your theme a name.', self::_SLUG ); ?>
</td>
</tr>
<tr>
<th scope="row"><label for="create_child_description"><?php esc_html_e( 'Description', 'one-click-child-theme' ); ?></label></th>
<td>
<textarea name="description" value="<?php echo $description; ?>" rows="2" cols="40" id="create_child_description"><?php esc_html_e($description); ?></textarea>
<p class="description"><?php esc_html_e( 'Describe your theme.', self::_SLUG ); ?>
</td>
</tr>
<tr>
<th scope="row"><label for="create_child_author_name"><?php esc_html_e( 'Author', self::_SLUG ); ?></label></th>
<td>
<input name="author_name" value="<?php esc_attr_e($author); ?>" id="create_child_author_name" />
<p class="description"><?php esc_html_e( 'Your name.', self::_SLUG ); ?>
</td>
</tr>
</table>
<p class="submit">
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Create Child', self::_SLUG ); ?>" />
</p>
</form>
</div>

View File

@@ -0,0 +1,16 @@
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
);
}
//
// Your code goes below
//

View File

@@ -0,0 +1,87 @@
<?php
/**
* Page for showing the child theme creation form. (In the Theme > Child Theme submenu.)
*
* @author terry chay <tychay@php.net>
*/
?>
<div class="wrap">
<h2><?php esc_html_e( sprintf( __('%s is already a child theme', self::_SLUG), $current_theme->Name ) ); ?></h2>
<?php
if ( $child_needs_repair ) :
?>
<h3><?php esc_html_e('Child theme needs repair', self::_SLUG) ?></h3>
<div class="copy"><?php esc_html_e( 'Detected outdated child theme mechanism. Click the button below to attempt a one-click repair.', self::_SLUG ); ?></div>
<form action="admin-post.php" method="post" id="repair_child_form">
<input type="hidden" name="action" value="<?php echo $this->_repairChildFormId; ?>" />
<?php wp_nonce_field($this->_repairChildFormId.'-verify'); ?>
<p class="submit">
<input type="submit" class="button button-primary" value="<?php esc_html_e( 'Repair Child Theme', self::_SLUG ); ?>" />
</p>
</form>
<?php
endif;
if ( !empty($template_files) ) :
?>
<h3><?php esc_html_e('Child files',self::_SLUG) ?></h3>
<div class="copy"><?php esc_html_e( 'If you wish to modify the behavior of a template file, select it and click the "Copy Template" button below.', self::_SLUG ); ?></div>
<form action="admin-post.php" method="post" id="copy_template_file_form">
<input type="hidden" name="action" value="<?php echo $this->_copyTemplateFormId; ?>" />
<?php wp_nonce_field($this->_copyTemplateFormId.'-verify'); ?>
<table class="form-table">
<tr>
<th scope="row"><label for="copy_template_file_name"><?php esc_html_e( 'Template File', self::_SLUG ); ?></label></th>
<td><select name="filename" id="copy_template_file_name">
<?php
foreach ($template_files as $filename) :
?>
<option value="<?php esc_attr_e($filename); ?>"><?php esc_html_e($filename) ?></option>
<?php
endforeach;
?>
</select></td>
</tr>
</table>
<p class="submit">
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Copy Template', self::_SLUG ); ?>" />
</p>
</form>
<?php
endif;
?>
<h3><?php esc_html_e('Screenshot',self::_SLUG) ?></h3>
<div class="copy"><?php esc_html_e( 'By default One-Click Child Theme uses the parent themes screenshot. You can use WordPress.coms mshot service to replace the current child themes screenshot with a screenshot of your current web sites homepage (if publicly accessible over the web).', self::_SLUG ); ?></div>
<form action="admin-post.php" method="post" id="mshot_homepage_form">
<input type="hidden" name="action" value="<?php echo $this->_mshotSiteFormId; ?>" />
<?php wp_nonce_field($this->_mshotSiteFormId.'-verify'); ?>
<div class="theme-browser">
<div class="theme">
<?php if ($child_theme_screenshot_url) : ?>
<div class="theme-screenshot">
<img src="<?php echo $child_theme_screenshot_url ?>" />
<p><?php esc_html_e('No screenshot', self::_SLUG); ?></p>
</div>
<?php else : ?>
<div class="theme-screenshot blank"></div>
<?php endif; ?>
<div class="theme-name"><?php esc_html_e('Current', self::_SLUG); ?></div>
</div>
<div class="theme">
<div class="theme-screenshot">
<img src="<?php echo $mshot_url ?>" />
</div>
<div class="theme-name"><?php esc_html_e('mShot', self::_SLUG); ?></div>
</div>
</div>
<br clear="all" />
<p class="submit">
<input type="submit" class="button button-primary" value="<?php esc_html_e( 'Replace Screenshot', self::_SLUG ); ?>" />
</p>
</form>
<h3><?php esc_html_e('Grandchild theme?',self::_SLUG) ?></h3>
<div class="copy"><?php esc_html_e( 'WordPress has no formal support for theme grandchildren. No other actions currently supported in One Click Child Theme.', self::_SLUG ); ?></div>
</div>

View File

@@ -0,0 +1,7 @@
/*
Theme Name: <?php echo $new_theme_title, "\n"; ?>
Template: <?php echo $parent_template_name, "\n"; ?>
Right to Left text support.
*/
@import url("../<?php echo $rtl_theme; ?>/rtl.css");