Submitting Prechecks
Prechecks for submitting theme to wordpress.org
This commit is contained in:
parent
9c3305c7a9
commit
2e61bda37e
|
@ -65,8 +65,11 @@ if ( post_password_required() ) {
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// Loads the comment-form.php template
|
||||
get_template_part('comment-form');
|
||||
/* Loads the comment-form.php template
|
||||
/* get_template_part('comment-form');
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div><!-- #comments -->
|
||||
|
|
|
@ -25,7 +25,8 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_slider_count_setting', array(
|
||||
'default' => '1'
|
||||
'default' => '1',
|
||||
'sanitize_callback' => 'esc_textarea'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'understrap_theme_slider_count', array(
|
||||
|
@ -36,7 +37,8 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_slider_time_setting', array(
|
||||
'default' => '5000'
|
||||
'default' => '5000',
|
||||
'sanitize_callback' => 'esc_textarea'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'understrap_theme_slider_time', array(
|
||||
|
@ -47,7 +49,8 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_slider_loop_setting', array(
|
||||
'default' => 'true'
|
||||
'default' => 'true',
|
||||
'sanitize_callback' => 'esc_textarea'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'understrap_theme_loop', array(
|
||||
|
@ -66,7 +69,8 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_script_code_setting', array(
|
||||
'default' => ''
|
||||
'default' => '',
|
||||
'sanitize_callback' => 'esc_textarea'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'understrap_theme_script_code', array(
|
||||
|
@ -78,6 +82,8 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
}
|
||||
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,7 @@ function understrap_body_classes( $classes ) {
|
|||
}
|
||||
add_filter( 'body_class', 'understrap_body_classes' );
|
||||
|
||||
if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
||||
if ( version_compare( $GLOBALS['wp_version'], '4.1', '<' ) ) :
|
||||
/**
|
||||
* Filters wp_title to print a neat <title> tag based on what is being viewed.
|
||||
*
|
||||
|
@ -47,26 +47,35 @@ if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
|||
if ( is_feed() ) {
|
||||
return $title;
|
||||
}
|
||||
|
||||
global $page, $paged;
|
||||
|
||||
// Add the blog name
|
||||
// Add the blog name
|
||||
$title .= get_bloginfo( 'name', 'display' );
|
||||
|
||||
// Add the blog description for the home/front page.
|
||||
// Add the blog description for the home/front page.
|
||||
$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) {
|
||||
$title .= " $sep $site_description";
|
||||
}
|
||||
|
||||
// Add a page number if necessary:
|
||||
// Add a page number if necessary:
|
||||
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
|
||||
$title .= " $sep " . sprintf( __( 'Page %s', 'understrap' ), max( $paged, $page ) );
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
add_filter( 'wp_title', 'understrap_wp_title', 10, 2 );
|
||||
/**
|
||||
* Title shim for sites older than WordPress 4.1.
|
||||
*
|
||||
* @link https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
|
||||
* @todo Remove this function when WordPress 4.3 is released.
|
||||
*/
|
||||
function understrap_render_title() {
|
||||
|
||||
?>
|
||||
<title><?php wp_title( '|', true, 'right' ); ?></title>
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'understrap_render_title' );
|
||||
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
||||
|
@ -76,8 +85,11 @@ if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
|||
* @link https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
|
||||
* @todo Remove this function when WordPress 4.3 is released.
|
||||
*/
|
||||
|
||||
function understrap_render_title() {
|
||||
echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n";
|
||||
?>
|
||||
<title><?php wp_title( '|', true, 'right' ); ?></title>
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'understrap_render_title' );
|
||||
endif;
|
||||
|
|
|
@ -20,13 +20,12 @@ get_header(); ?>
|
|||
|
||||
<?php understrap_post_nav(); ?>
|
||||
|
||||
<?php
|
||||
/** */<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
comments_template();
|
||||
endif;
|
||||
?>
|
||||
|
||||
?>**/
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
|
|
18
style.css
18
style.css
|
@ -4,13 +4,27 @@ Theme URI: http://holgerkoenemann.de/understrap
|
|||
Author: Holger Koenemann
|
||||
Author URI: http://www.holgerkoenemann.de
|
||||
Description: Combination of Automattic´s _s theme and Bootstrap SASS
|
||||
Version: 0.2.8
|
||||
Version: 0.2.9
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: understrap
|
||||
Details URI: http://example.com/my-theme-changelog.html
|
||||
Tags: light, red, white, one-column, responsive-layout, custom-header, custom-menu, featured-images, flexible-header, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||
|
||||
This theme, like WordPress, is licensed under the GPL.
|
||||
UnderStrap is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc.
|
||||
|
||||
Resource Licenses:
|
||||
Font Awesome: http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
||||
Bootstrap: http://getbootstrap.com | https://github.com/twbs/bootstrap/blob/master/LICENSE (Code licensed under MIT, documentation under CC BY 3.0.)
|
||||
Owl Carousel 2: http://www.owlcarousel.owlgraphic.com/ | https://github.com/smashingboxes/OwlCarousel2/blob/develop/LICENSE (Code licensed under MIT)
|
||||
Portions of Jasnys Bootstrap "missing components": http://jasny.github.io/bootstrap/ (released under the Apache 2.0 license)
|
||||
and of course
|
||||
jQuery: https://jquery.org | (Code licensed under MIT)
|
||||
|
||||
*/
|
||||
|
||||
/*This file is just used to identify the theme in wordpress. The compiles CSS output can be found in /css/theme.css
|
||||
The SASS sources for it can be found in this folder: /sass/
|
||||
|
||||
...and no go out and play!
|
||||
*/
|
||||
|
|
Reference in New Issue