$post_type,
'title' => $page_title,
'post_status' => 'all',
'numberposts' => 1,
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'orderby' => 'post_date ID',
'order' => 'ASC',
)
);
if ( ! empty( $posts ) ) {
$post = $posts[0];
} else {
$post = null;
}
return $post;
}
/**
* Fix skip link focus in IE11.
*
* This does not enqueue the script because it is tiny and because it is only for IE11,
* thus it does not warrant having an entire dedicated blocking script being loaded.
*
* @link https://git.io/vWdr2
*/
function arendelle_skip_link_focus_fix() {
// The following is minified via `terser --compress --mangle -- assets/js/skip-link-focus-fix.js`.
?>
id === "post" ) {
$classes = 'arendelle-' . arendelle_layout_type( 'single_post' );
}
// Add page layout class
if ( $screen->id === "page" ) {
$classes = 'arendelle-' . arendelle_layout_type( 'page' );
}
return $classes;
}
add_filter( 'admin_body_class', 'arendelle_admin_body_classes' );