Skip to content

Commit

Permalink
Merge pull request #205 from LezWatch/feature/shadow-taxonomies
Browse files Browse the repository at this point in the history
[Production] Support Shadow Taxonomies
  • Loading branch information
Ipstenu committed Mar 18, 2024
2 parents 8a17bcc + 52ee3ef commit 0d7796b
Show file tree
Hide file tree
Showing 64 changed files with 352 additions and 307 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 5 additions & 13 deletions functions.php
Expand Up @@ -24,9 +24,9 @@ function lwtv_admin_notice_missing_plugin() {
// Versioning for efficient developers.
if ( ! defined( 'LWTV_THEME_VERSION' ) ) {
$versions = array(
'lwtv-underscores' => '6.0.0', // Bump this any time you make serious CSS changes.
'lwtv-underscores' => '6.0.2', // Bump this any time you make serious CSS changes.
'font-awesome' => '6.5.1', // Bump when you update Font Awesome.
'bootstrap' => '5.3.2', // Bump when you update bootstrap.
'bootstrap' => '5.3.3', // Bump when you update bootstrap.
'lwtv-blocks' => '1.0.0', // Bump when you update the blocks.
'yikes-nav' => '20201024', // Last date this was updated.
);
Expand Down Expand Up @@ -95,14 +95,6 @@ function lwtv_custom_excerpt_length( $length ) {
require_once 'inc/widgets/filter-widget2.php';
require_once 'inc/widgets/otd-widget.php';

/**
* Theme Logo
*/
function yks_the_custom_logo() {
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
}
}

/**
* Images
Expand Down Expand Up @@ -411,16 +403,16 @@ function yikes_starter_scripts() {
}

// Bootstrap
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/inc/bootstrap/css/bootstrap.css', array(), $bootstrap, 'all', false );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/inc/bootstrap/css/bootstrap.min.css', array(), $bootstrap, 'all', false );
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/inc/bootstrap/js/bootstrap.bundle.min.js', array( 'jquery' ), $bootstrap, 'all', true );

// Font Awesome PRO.
wp_enqueue_script( 'font-awesome', get_template_directory_uri() . '/inc/fontawesome/js/all.min.js', array(), $font_awesome, 'all', false );
wp_add_inline_script( 'font-awesome', 'FontAwesomeConfig = { searchPseudoElements: true };', 'before' );

// Fonts
wp_enqueue_style( 'open-sans', '//fonts.bunny.net/css?family=Open+Sans:400,600,700', array(), $lwtv_underscores, false );
wp_enqueue_style( 'oswald', '//fonts.bunny.net/css?family=Oswald:400,500', array(), $lwtv_underscores, false );
wp_enqueue_style( 'open-sans', '//fonts.googleapis.com/css?family=Open+Sans:400,600,700', array(), $lwtv_underscores, false );
wp_enqueue_style( 'oswald', '//fonts.googleapis.com/css?family=Oswald:400,500', array(), $lwtv_underscores, false );

// This has to be at the bottom to override Bootstrap 4.x.
wp_enqueue_style( 'yikes-starter-style', get_stylesheet_directory_uri() . '/style.min.css', array(), $bootstrap, false );
Expand Down
71 changes: 52 additions & 19 deletions header.php
Expand Up @@ -13,38 +13,71 @@
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php
if ( is_front_page() ) {
?>
<!-- Preload the LCP images with a high fetchpriority so it starts loading with the stylesheet. -->
<?php
$image = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' );

if ( has_header_image() ) {
$header_image = get_header_image();

if ( str_ends_with( $header_image, 'webp' ) ) {
$image_type = 'webp';
} elseif ( str_ends_with( $header_image, 'png' ) ) {
$image_type = 'png';
} else {
$image_type = 'jpeg';
}
?>
<link rel="preload" fetchpriority="high" as="image" href="<?php echo esc_url( $header_image ); ?>" type="image/<?php echo esc_attr( $image_type ); ?>">
<?php
}

if ( false !== $image ) {
?>
<link rel="preload" fetchpriority="high" as="image" href="<?php echo esc_url( $image[0] ); ?>" type="image/png">
<?php
}
}
?>

<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

<header id="masthead" class="site-header" role="banner">
<nav id="site-navigation" class="navbar fixed-top navbar-expand navbar-light bg-light main-nav" role="navigation">
<nav id="site-navigation" class="navbar fixed-top navbar-expand-md navbar-light bg-light main-nav" role="navigation">
<div class="container">
<div class="screen-reader-text">
<a href="#main">Skip to Main Content</a>
</div>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" class="navbar-brand">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/lezwatch-logo-icon.png" alt="<?php bloginfo( 'name' ); ?>">
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" class="navbar-brand">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/lezwatch-logo-icon.png" alt="Return to <?php bloginfo( 'name' ); ?> homepage" width="72px" height="80px">
<span class="navbar-brand-text">
<?php bloginfo( 'name' ); ?>
</span>
</a>
<div class="collapse navbar-collapse" id="primary">
<?php
wp_nav_menu(
array(
'menu' => 'primary',
'theme_location' => 'primary',
'depth' => 3,
'container' => false,
'menu_class' => 'navbar-nav ms-auto',
'fallback_cb' => 'wp_page_menu',
'walker' => new WP_Bootstrap_Navwalker(),
'items_wrap' => '<ul id="%1$s" class="%2$s" aria-labelledby="main-navigation">%3$s</ul>',
)
);
?>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleLWTV" aria-controls="navbarToggleLWTV" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggleLWTV">
<?php
wp_nav_menu(
array(
'menu' => 'primary',
'theme_location' => 'primary',
'depth' => 3,
'container' => false,
'menu_class' => 'navbar-nav ms-auto',
'fallback_cb' => 'wp_page_menu',
'walker' => new WP_Bootstrap_Navwalker(),
'items_wrap' => '<ul id="%1$s" class="%2$s" aria-labelledby="main-navigation">%3$s</ul>',
)
);
?>
</div>

<span class="nav-item search" id="search-btn">
Expand Down Expand Up @@ -94,7 +127,7 @@
<div class="row">
<div class="col-sm-3">
<div class="header-logo">
<?php yks_the_custom_logo(); ?>
<?php the_custom_logo(); ?>
</div>
</div>

Expand Down
Binary file added images/mystery-woman.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-grid.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-grid.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-grid.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-grid.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-grid.rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-grid.rtl.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-grid.rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-grid.rtl.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-reboot.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-reboot.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-reboot.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-reboot.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/bootstrap/css/bootstrap-reboot.rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/bootstrap/css/bootstrap-reboot.rtl.css.map

Large diffs are not rendered by default.

0 comments on commit 0d7796b

Please sign in to comment.