500, 'height' => 250, 'flex-width' => true, ) ); // Add custom background color and image support add_theme_support( 'custom-background', array( 'default-image' => '', // Background image default 'default-color' => '', // Background color default (don't add the #) 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ) ); // Add post format support add_theme_support( 'post-formats', array( 'aside', // Title less blurb 'gallery', // Gallery of images 'link', // Quick link to other site 'image', // An image 'quote', // A quick quote 'status', // A Facebook like status update 'video', // Video 'audio', // Audio 'chat' // Chat transcript ) ); /* Register one menu by default */ register_nav_menus( array( 'main-nav' => __( 'Main menu', 'harmonia' ), 'social' => __( 'Social Links Menu', 'harmonia' ), ) ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Enqueue base scripts and styles add_action( 'wp_enqueue_scripts', 'harmonia_scripts_and_styles', 999 ); } add_action( 'after_setup_theme', 'harmonia_setup' ); /* Register one sidebar by default */ function harmonia_register_sidebars() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'harmonia' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'harmonia' ), 'before_widget' => '
', 'before_title' => '\s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content);
}
// Clean random code around images
add_filter( 'the_content', 'harmonia_filter_ptags_on_images' );
// Modify the default excerpt Read More link
function harmonia_excerpt_more( $more ) {
if ( is_admin() ) return $more;
return '... ' . esc_html( 'Continue reading', 'harmonia' ) . ' ' . get_the_title() . '