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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'harmonia_register_sidebars' ); function harmonia_content_width() { // This variable is intended to be overruled from themes. $GLOBALS['content_width'] = apply_filters( 'harmonia_content_width', 768 ); } add_action( 'after_setup_theme', 'harmonia_content_width', 0 ); /* // To embed Google Fonts uncomment the below lines. function harmonia_fonts() { wp_enqueue_style('googleFonts', 'https://fonts.googleapis.com/css2?family=Noto+Serif&family=Arimo&family=Playball&display=swap'); } add_action('wp_enqueue_scripts', 'harmonia_fonts'); */ // Detect if Javascript is in use. You can remove this if you use Modernizer. function harmonia_javascript_detection() { echo "\n"; } add_action( 'wp_head', 'harmonia_javascript_detection', 0 ); function harmonia_filter_ptags_on_images($content){ return preg_replace('/

\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 '...

'; } add_filter( 'excerpt_more', 'harmonia_excerpt_more' ); /********************************** COMMENT LAYOUT ***********************************/ // A better and more semantic comment layout function harmonia_comments( $comment, $args, $depth ) { ?>
%1$s %2$s', get_comment_author_link(), esc_html( edit_comment_link( esc_html( '(Edit)', 'harmonia' ), ' ', '' ) ) ); ?>
comment_approved == '0') : ?>

$depth, 'max_depth' => $args['max_depth']))) ?>
is added by WordPress automatically ?>