Skip to content

Commit

Permalink
Remove disconnected changes
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Apr 26, 2021
1 parent 8bfa272 commit 09aaf47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 65 deletions.
25 changes: 0 additions & 25 deletions quadrat/block-templates/index.html

This file was deleted.

44 changes: 4 additions & 40 deletions quadrat/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,15 @@
* @package Quadrat
* @since 1.0.0
*/

function get_nav_menu() {
$menus = wp_get_nav_menus();

if ( is_wp_error( $menus ) || empty( $menus ) ) {
return false;
}

$counts = wp_list_pluck( $menus, 'count' );
$menus = array_combine( $counts, $menus );
ksort( $menus );
$menus = array_reverse( $menus );
$menus = array_values( $menus );
$menu = array_shift( $menus );

if ( empty( $menu->count ) ) {
return false;
}

return $menu;
}

get_header();

// the header
echo do_blocks( file_get_contents( get_stylesheet_directory() . '/templates/header.html' ) );

if ( is_active_sidebar( 'navigation' ) ) {
dynamic_sidebar( 'navigation' );
} else {
$menu = get_nav_menu();
the_widget(
'WP_Nav_Menu_Widget',
array(
'nav_menu' => $menu,
)
);
}

if ( is_active_sidebar( 'social-icons' ) ) {
dynamic_sidebar( 'social-icons' );
}
// the header
echo do_blocks( file_get_contents( get_stylesheet_directory() . '/templates/header.html' ) );

// the query
echo do_blocks( '<!-- wp:post-content {"layout":{"inherit":true}} /-->' );

// the footer
echo do_blocks( file_get_contents( get_stylesheet_directory() . '/templates/footer.html' ) );

get_footer();

0 comments on commit 09aaf47

Please sign in to comment.