Add dummy sidebar for custom templates

This commit is contained in:
Tetrakern 2024-06-13 00:16:16 +02:00
parent 69dafa7efd
commit 6505e24734
4 changed files with 30 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -176,6 +176,30 @@ function fictioneer_get_theme_info() {
return $info;
}
/**
* Registers (dummy) sidebar
*
* @since 5.20.0
*/
function fictioneer_register_sidebar() {
register_sidebar(
array(
'name' => __( 'Fictioneer Sidebar', 'fictioneer' ),
'id' => 'fictioneer-sidebar',
'description' => __( 'For custom templates. Not used by the default theme.', 'fictioneer' ),
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>'
)
);
}
if ( ! get_option( 'fictioneer_disable_all_widgets' ) ) {
add_action( 'widgets_init', 'fictioneer_register_sidebar' );
}
// =============================================================================
// AFTER UPDATE
// =============================================================================

View File

@ -858,6 +858,10 @@ html:not(.logged-in) body:not(.logged-in) {
}
}
.widget {
list-style: none;
}
.browser-notes {
font-size: 10px;
text-align: center;