|
@@ -3,51 +3,17 @@
|
|
|
if ( ! function_exists( 'dw_setup' ) ):
|
|
|
function dw_setup() {
|
|
|
require( get_template_directory() . '/inc/template.php' );
|
|
|
+ require( get_template_directory() . '/inc/tweaks.php' );
|
|
|
}
|
|
|
endif;
|
|
|
add_action( 'after_setup_theme', 'dw_setup' );
|
|
|
|
|
|
-remove_action('wp_head', 'index_rel_link' );
|
|
|
-remove_action('wp_head', 'rel_canonical');
|
|
|
-remove_action('wp_head', 'start_post_rel_link', 10, 0 );
|
|
|
-remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
|
|
|
-remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 );
|
|
|
-remove_action('wp_head', 'parent_post_rel_link', 10, 0 );
|
|
|
-remove_action('wp_head', 'rsd_link');
|
|
|
-remove_action('wp_head', 'wlwmanifest_link');
|
|
|
-remove_action('wp_head', 'wp_generator');
|
|
|
-remove_action('wp_head', 'feed_links_extra', 3 );
|
|
|
-remove_action('wp_head', 'feed_links', 2 );
|
|
|
-
|
|
|
-add_editor_style();
|
|
|
add_theme_support( 'post-thumbnails' );
|
|
|
set_post_thumbnail_size( 150, 150, true );
|
|
|
add_image_size( 'post-large', 770, 577, true );
|
|
|
add_theme_support( 'automatic-feed-links' );
|
|
|
add_theme_support( 'menus' );
|
|
|
|
|
|
-function dw_remove_wp_ver_css_js( $src ) {
|
|
|
- if ( strpos( $src, 'ver=' ) )
|
|
|
- $src = remove_query_arg( 'ver', $src );
|
|
|
- return $src;
|
|
|
-}
|
|
|
-add_filter( 'style_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
|
|
|
-add_filter( 'script_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
|
|
|
-
|
|
|
-add_action( 'admin_head', 'dw_hide' );
|
|
|
-function dw_hide() {
|
|
|
- ?>
|
|
|
- <style type="text/css" media="screen">
|
|
|
- #footer {display:none;}
|
|
|
- #contextual-help-link-wrap {display: none;}
|
|
|
- #wpadminbar {display: none;}
|
|
|
- body.admin-bar #wpcontent, body.admin-bar #adminmenu {padding-top:0;}
|
|
|
- html.wp-toolbar{padding-top:0;}
|
|
|
- #postexcerpt p {display: none;}
|
|
|
- </style>
|
|
|
-<?php }
|
|
|
-
|
|
|
-add_action( 'wp_enqueue_scripts', 'dw_scripts' );
|
|
|
function dw_scripts() {
|
|
|
global $post;
|
|
|
wp_deregister_script('jquery');
|
|
@@ -58,5 +24,32 @@ function dw_scripts() {
|
|
|
wp_enqueue_script( 'comment-reply' );
|
|
|
}
|
|
|
}
|
|
|
+add_action( 'wp_enqueue_scripts', 'dw_scripts' );
|
|
|
+
|
|
|
+function dw_editor() {
|
|
|
+ //add_editor_style( 'style.css' );
|
|
|
+}
|
|
|
+add_action( 'init', 'dw_editor' );
|
|
|
+
|
|
|
+$comments_args = array(
|
|
|
+ 'comment_notes_after' => '',
|
|
|
+ 'fields' => apply_filters( 'comment_form_default_fields', $fields ),
|
|
|
+ 'comment_field' => '<p class="comment-form-comment">...',
|
|
|
+ 'must_log_in' => '<p class="must-log-in">...',
|
|
|
+ 'logged_in_as' => '<p class="logged-in-as">...',
|
|
|
+ 'comment_notes_before' => '<p class="comment-notes">...',
|
|
|
+ //'comment_notes_after' => '<dl class="form-allowed-tags">...',
|
|
|
+ 'id_form' => 'commentform',
|
|
|
+ 'id_submit' => 'submit',
|
|
|
+ 'title_reply' => __( 'Leave a Reply' ),
|
|
|
+ 'title_reply_to' => __( 'Leave a Reply to %s' ),
|
|
|
+ 'cancel_reply_link' => __( 'Cancel reply' ),
|
|
|
+ 'label_submit' => __( 'Post Comment' ),
|
|
|
+ );
|
|
|
+comment_form($comments_args);
|
|
|
+
|
|
|
+function dw_ping($comment, $args, $depth) {
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
?>
|