Skip to content
Permalink
Browse files

Cut out the fat, rename to "susty"

  • Loading branch information...
jacklenox committed May 31, 2018
1 parent 8a5e0af commit c89af1f789a67f6ce60f3817124d41bcd75e1290
Showing with 252 additions and 471 deletions.
  1. +12 βˆ’12 404.php
  2. +7 βˆ’8 archive.php
  3. +4 βˆ’4 comments.php
  4. +16 βˆ’21 footer.php
  5. +36 βˆ’42 functions.php
  6. +23 βˆ’39 header.php
  7. +1 βˆ’1 inc/custom-header.php
  8. +2 βˆ’2 inc/customizer.php
  9. +2 βˆ’2 inc/jetpack.php
  10. +1 βˆ’1 inc/template-functions.php
  11. +9 βˆ’9 inc/template-tags.php
  12. +8 βˆ’14 index.php
  13. +24 βˆ’24 js/customizer.js
  14. +15 βˆ’0 menu.php
  15. +3 βˆ’4 page.php
  16. +6 βˆ’6 search.php
  17. +0 βˆ’17 sidebar.php
  18. +3 βˆ’4 single.php
  19. +44 βˆ’225 style.css
  20. +10 βˆ’10 template-parts/content-none.php
  21. +9 βˆ’9 template-parts/content-page.php
  22. +6 βˆ’6 template-parts/content-search.php
  23. +11 βˆ’11 template-parts/content.php
24 404.php
@@ -4,22 +4,22 @@
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package Susty_WP
* @package Susty
*/
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main">
<div id="primary">
<main id="main">

<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'susty-wp' ); ?></h1>
<section>
<header>
<h1><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'susty' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'susty-wp' ); ?></p>
<div>
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'susty' ); ?></p>

<?php
get_search_form();
@@ -28,7 +28,7 @@
?>

<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'susty-wp' ); ?></h2>
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'susty' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
@@ -44,14 +44,14 @@

<?php
/* translators: %1$s: smiley */
$susty_wp_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'susty-wp' ), convert_smilies( ':)' ) ) . '</p>';
$susty_wp_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'susty' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$susty_wp_archive_content" );
the_widget( 'WP_Widget_Tag_Cloud' );
?>

</div><!-- .page-content -->
</section><!-- .error-404 -->
</div>
</section>

</main><!-- #main -->
</div><!-- #primary -->
@@ -4,23 +4,23 @@
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Susty_WP
* @package Susty
*/
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main">
<div id="primary">
<main id="main">

<?php if ( have_posts() ) : ?>

<header class="page-header">
<header>
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
the_archive_title( '<h1>', '</h1>' );
the_archive_description( '<div>', '</div>' );
?>
</header><!-- .page-header -->
</header>

<?php
/* Start the Loop */
@@ -49,5 +49,4 @@
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
@@ -7,7 +7,7 @@
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Susty_WP
* @package Susty
*/
/*
@@ -32,13 +32,13 @@
if ( '1' === $susty_wp_comment_count ) {
printf(
/* translators: 1: title. */
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'susty-wp' ),
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'susty' ),
'<span>' . get_the_title() . '</span>'
);
} else {
printf( // WPCS: XSS OK.
/* translators: 1: comment count number, 2: title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $susty_wp_comment_count, 'comments title', 'susty-wp' ) ),
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $susty_wp_comment_count, 'comments title', 'susty' ) ),
number_format_i18n( $susty_wp_comment_count ),
'<span>' . get_the_title() . '</span>'
);
@@ -63,7 +63,7 @@
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'susty-wp' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'susty' ); ?></p>
<?php
endif;
@@ -2,33 +2,28 @@
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Susty_WP
* @package Susty
*/
?>

</div><!-- #content -->
</div>

<footer id="colophon" class="site-footer">
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'susty-wp' ) ); ?>">
<?php
/* translators: %s: CMS name, i.e. WordPress. */
printf( esc_html__( 'Proudly powered by %s', 'susty-wp' ), 'WordPress' );
?>
</a>
<span class="sep"> | </span>
<?php
/* translators: 1: Theme name, 2: Theme author. */
printf( esc_html__( 'Theme: %1$s by %2$s.', 'susty-wp' ), 'susty-wp', '<a href="http://jacklenox.com">Jack Lenox</a>' );
?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<footer id="colophon">
<a href="<?php echo esc_url( __( 'https://wordpress.org', 'susty' ) ); ?>">
<?php
/* translators: %s: CMS name, i.e. WordPress. */
printf( esc_html__( 'Proudly powered by %s', 'susty' ), 'WordPress' );
?>
</a>
<span> | </span>
<?php
/* translators: 1: Theme name, 2: Theme author. */
printf( esc_html__( 'Theme: %1$s by %2$s.', 'susty' ), 'susty', '<a href="https://jacklenox.com">Jack Lenox</a>' );
?>
</footer>
</div>

<?php wp_footer(); ?>

@@ -4,25 +4,25 @@
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Susty_WP
* @package Susty
*/
if ( ! function_exists( 'susty_wp_setup' ) ) :
if ( ! function_exists( 'susty_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function susty_wp_setup() {
function susty_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Susty WP, use a find and replace
* to change 'susty-wp' to the name of your theme in all the template files.
* to change 'susty' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'susty-wp', get_template_directory() . '/languages' );
load_theme_textdomain( 'susty', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
@@ -44,7 +44,7 @@ function susty_wp_setup() {
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'menu-1' => esc_html__( 'Primary', 'susty-wp' ),
'menu-1' => esc_html__( 'Primary', 'susty' ),
) );
/*
@@ -60,8 +60,8 @@ function susty_wp_setup() {
) );
// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'susty_wp_custom_background_args', array(
'default-color' => 'ffffff',
add_theme_support( 'custom-background', apply_filters( 'susty_custom_background_args', array(
'default-color' => 'fffefc',
'default-image' => '',
) ) );
@@ -81,7 +81,7 @@ function susty_wp_setup() {
) );
}
endif;
add_action( 'after_setup_theme', 'susty_wp_setup' );
add_action( 'after_setup_theme', 'susty_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
@@ -90,54 +90,27 @@ function susty_wp_setup() {
*
* @global int $content_width
*/
function susty_wp_content_width() {
function susty_content_width() {
// This variable is intended to be overruled from themes.
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$GLOBALS['content_width'] = apply_filters( 'susty_wp_content_width', 640 );
$GLOBALS['content_width'] = apply_filters( 'susty_content_width', 640 );
}
add_action( 'after_setup_theme', 'susty_wp_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function susty_wp_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'susty-wp' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'susty-wp' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'susty_wp_widgets_init' );
add_action( 'after_setup_theme', 'susty_content_width', 0 );
/**
* Enqueue scripts and styles.
*/
function susty_wp_scripts() {
wp_enqueue_style( 'susty-wp-style', get_stylesheet_uri() );
//wp_enqueue_script( 'susty-wp-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
//wp_enqueue_script( 'susty-wp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
function susty_scripts() {
wp_enqueue_style( 'susty-style', get_stylesheet_uri() );
wp_deregister_script( 'wp-embed' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'susty_wp_scripts' );
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
add_action( 'wp_enqueue_scripts', 'susty_scripts' );
/**
* Custom template tags for this theme.
@@ -163,3 +136,24 @@ function susty_wp_scripts() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
function susty_nav_rewrite_rule() {
add_rewrite_rule( 'menu', 'index.php?menu=true', 'top' );
}
add_action( 'init', 'susty_nav_rewrite_rule' );
function susty_register_query_var( $vars ) {
$vars[] = 'menu';
return $vars;
}
add_filter( 'query_vars', 'susty_register_query_var' );
add_filter( 'template_include', function( $path ) {
if ( get_query_var( 'menu' ) ) {
return get_template_directory() . '/menu.php';
}
return $path;
});

0 comments on commit c89af1f

Please sign in to comment.
You can’t perform that action at this time.