admin_url( 'admin-ajax.php' ) ) ); if ( is_singular() ): wp_enqueue_script( 'comment-reply' ); endif; } /* mywiki theme starts */ if ( ! function_exists( 'mywiki_setup' ) ) : function mywiki_setup() { /* content width */ global $content_width; if ( ! isset( $content_width ) ) { $content_width = 900; } /* * Make mywiki theme available for translation. * */ load_theme_textdomain( 'mywiki', get_template_directory() . '/languages' ); register_nav_menus( array( 'primary' => __( 'The Main Menu', 'mywiki' ), // main nav in header 'footer-links' => __( 'Footer Links', 'mywiki' ) // secondary nav in footer ) ); // This theme styles the visual editor to resemble the theme style. add_editor_style( 'css/editor-style.css' ); // Add RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'custom-logo', array( 'height' => 160, 'width' => 45, 'flex-height' => true, 'flex-width' => true, 'priority' => 11, 'header-text' => array( 'site-title', 'site-description' ), ) ); /* * Enable support for Post Formats. */ // This theme allows users to set a custom background. add_theme_support( 'custom-background', apply_filters( 'mywiki_custom_background_args', array( 'default-color' => '048eb0', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'mywiki_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height) add_image_size( 'homepage-thumb', 220, 180, true ); //(cropped) add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form' ) ); } endif; // mywiki_setup add_action( 'after_setup_theme', 'mywiki_setup' ); add_filter('get_custom_logo','mywiki_change_logo_class'); function mywiki_change_logo_class($html) { //$html = str_replace('class="custom-logo"', 'class="img-responsive logo-fixed"', $html); $html = str_replace('width=', 'original-width=', $html); $html = str_replace('height=', 'original-height=', $html); $html = str_replace('class="custom-logo-link"', 'class="navbar-brand logo"', $html); return $html; } /*Title*/ function mywiki_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) { return $title; } // end if // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title = "$title $sep $site_description"; } // end if // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) { $title = sprintf(/* translators: 1 is title */ __( 'Page %s', 'mywiki' ), max( $paged, $page ) ) . " $sep $title"; } // end if return $title; } // end mywiki_wp_title add_filter( 'wp_title', 'mywiki_wp_title', 10, 2 ); if ( ! function_exists( 'mywiki_entry_meta' ) ) : /** * Set up post entry meta. * * Meta information for current post: categories, tags, permalink, author, and date. **/ function mywiki_entry_meta() { $mywiki_category_list = get_the_category_list(', '); $mywiki_tags_list = get_the_tags(', '); ?>      /i', $page_markup, $mywiki_matches); $mywiki_toreplace = array(''); $mywiki_replace = array(''); $mywiki_new_markup = str_replace($mywiki_toreplace,$mywiki_replace, $page_markup); $mywiki_new_markup= preg_replace('/