Skip to content

Commit

Permalink
WDSUS-4 - Remove extra functions and fix content issue
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed Sep 4, 2023
1 parent 754f539 commit 2ac8d76
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 79 deletions.
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
?>

<div id="comments" class="comments-area">
<div id="comments" class="comments-area is-layout-constrained">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment section', 'wd_s' ); ?></h2>

<?php
Expand Down
23 changes: 0 additions & 23 deletions inc/setup/content-width.php

This file was deleted.

43 changes: 0 additions & 43 deletions inc/setup/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ function setup() {
register_nav_menus(
[
'primary' => esc_html__( 'Primary Menu', 'wd_s' ),
'footer' => esc_html__( 'Footer Menu', 'wd_s' ),
'mobile' => esc_html__( 'Mobile Menu', 'wd_s' ),
]
);

Expand All @@ -69,18 +67,6 @@ function setup() {
]
);

// Set up the WordPress core custom background feature.
add_theme_support(
'custom-background',
apply_filters(
'wd_s_custom_background_args',
[
'default-color' => 'ffffff',
'default-image' => '',
]
)
);

// Custom logo support.
add_theme_support(
'custom-logo',
Expand All @@ -99,39 +85,10 @@ function setup() {
// Gutenberg support for full-width/wide alignment of supported blocks.
add_theme_support( 'align-wide' );

// Gutenberg defaults for font sizes.
add_theme_support(
'editor-font-sizes',
[
[
'name' => __( 'Small', 'wd_s' ),
'size' => 12,
'slug' => 'small',
],
[
'name' => __( 'Normal', 'wd_s' ),
'size' => 16,
'slug' => 'normal',
],
[
'name' => __( 'Large', 'wd_s' ),
'size' => 36,
'slug' => 'large',
],
[
'name' => __( 'Huge', 'wd_s' ),
'size' => 50,
'slug' => 'huge',
],
]
);

// Gutenberg editor styles support.
add_theme_support( 'editor-styles' );
add_editor_style( 'build/index.css' );

// Gutenberg responsive embed support.
add_theme_support( 'responsive-embeds' );
}

add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' );
4 changes: 2 additions & 2 deletions inc/template-tags/print-entry-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function print_entry_footer() {
esc_html__( 'Edit %s', 'wd_s' ),
wp_kses_post( get_the_title( '<span class="screen-reader-text">"', '"</span>', false ) )
),
'<span class="edit-link">',
'</span>'
'<div class="edit-link">',
'</div>'
);
}
8 changes: 4 additions & 4 deletions template-parts/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'is-layout-constrained' ); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<header class="entry-header is-layout-constrained">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
Expand All @@ -29,16 +29,16 @@
</div><!-- .entry-content -->

<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<footer class="entry-footer is-layout-constrained">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'wd_s' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
'<div class="edit-link">',
'</div>'
);
?>
</footer><!-- .entry-footer -->
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-password-protected.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'is-layout-constrained' ); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<header class="entry-header is-layout-constrained">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
Expand Down
6 changes: 3 additions & 3 deletions template-parts/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

?>

<article <?php post_class( 'is-layout-constrained' ); ?>>
<article <?php post_class(); ?>>

<header class="entry-header is-layout-constrained">
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
Expand All @@ -26,11 +26,11 @@
<?php endif; ?>
</header><!-- .entry-header -->

<div class="entry-summary">
<div class="entry-summary is-layout-constrained">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->

<footer class="entry-footer">
<footer class="entry-footer is-layout-constrained">
<?php print_entry_footer(); ?>
</footer><!-- .entry-footer -->

Expand Down
4 changes: 2 additions & 2 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

?>

<article <?php post_class( 'post-container is-layout-constrained' ); ?>>
<article <?php post_class( 'post-container' ); ?>>

<header class="entry-header is-layout-constrained">
<?php
Expand Down Expand Up @@ -58,7 +58,7 @@
?>
</div><!-- .entry-content -->

<footer class="entry-footer">
<footer class="entry-footer is-layout-constrained">
<?php print_entry_footer(); ?>
</footer><!-- .entry-footer -->

Expand Down

0 comments on commit 2ac8d76

Please sign in to comment.