diff --git a/404.php b/404.php new file mode 100755 index 0000000..0405b97 --- /dev/null +++ b/404.php @@ -0,0 +1,53 @@ + + + + +
+ + +
+

+ +

+ + +
+

+

+ +

+

+ +

+

+ +

+
+ +
+ +
+
+ + diff --git a/README.md b/README.md index 9146ec1..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,3 +0,0 @@ -# portage - -An updated theme (based on Atticus Finch) for ClassicPress \ No newline at end of file diff --git a/archive.php b/archive.php new file mode 100755 index 0000000..3363d82 --- /dev/null +++ b/archive.php @@ -0,0 +1,48 @@ + + +
+ +
+ + ' . get_the_date() . '' ); ?> + + ' . get_the_date( __( 'F Y', 'atticus-finch' ) ) . '' ); ?> + + ' . get_the_date( 'Y' ) . '' ); ?> + + + +
+ + + + + + + + + + + + +
+ + + +
+ + diff --git a/category.php b/category.php new file mode 100755 index 0000000..82c7364 --- /dev/null +++ b/category.php @@ -0,0 +1,45 @@ + + +
+ +
+

+ %s” category:', 'atticus-finch' ), single_cat_title( '', false ) ); + ?> +

+ +
+ + + + + + + + + + + + +
+ + + +
+ + diff --git a/comments.php b/comments.php new file mode 100755 index 0000000..72fb9bb --- /dev/null +++ b/comments.php @@ -0,0 +1,75 @@ +
+ + + +This post is password protected. Enter the password to view comments.

'; + return; + } +?> + + +

+ 'comment','post_id' => $post->ID)) ); + printf( _nx( 'One comment on “%2$s”', '%1$s comments on “%2$s”', $post_comments, 'comments title', 'atticus-finch' ), + number_format_i18n( $post_comments ), '' . get_the_title() . '' ); + ?> +

+
    + 'div', + 'short_ping' => false, + 'avatar_size' => 32, + 'type' => 'comment', + 'format' => 'xhtml', + ) ); + ?> +
+ + +

+ 'pings', 'post_id' => $post->ID )) ); + if ( $post_pings > 0 ) { + printf( _nx( 'One pingback/trackback on “%2$s”', '%1$s pingbacks/trackbacks on “%2$s”', $post_pings, 'pingbacks title', 'atticus-finch' ), + number_format_i18n( $post_pings ), '' . get_the_title() . '' ); + } + ?> +

+
    + 'div', + 'short_ping' => true, + 'avatar_size' => 0, + 'type' => 'pings', + 'format' => 'xhtml', + ) ); + ?> +
+ + 1 && get_option( 'page_comments' ) ) : + ?> + + + + +

+ + + + + + + + +
\ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100755 index 0000000..c3a3444 --- /dev/null +++ b/footer.php @@ -0,0 +1,56 @@ + + + + +
+ + + + + + + + + + + diff --git a/formats/content-aside.php b/formats/content-aside.php new file mode 100755 index 0000000..e3e89a3 --- /dev/null +++ b/formats/content-aside.php @@ -0,0 +1,20 @@ + +
> + + + + + + +

+ + + + +

+ + +

+ + + diff --git a/formats/content-audio.php b/formats/content-audio.php new file mode 100755 index 0000000..584fa0e --- /dev/null +++ b/formats/content-audio.php @@ -0,0 +1,19 @@ + +
> + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/content-chat.php b/formats/content-chat.php new file mode 100755 index 0000000..4819293 --- /dev/null +++ b/formats/content-chat.php @@ -0,0 +1,19 @@ + +
> + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/content-gallery.php b/formats/content-gallery.php new file mode 100755 index 0000000..ba7c028 --- /dev/null +++ b/formats/content-gallery.php @@ -0,0 +1,19 @@ + +
> + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/content-image.php b/formats/content-image.php new file mode 100755 index 0000000..d6d0ab8 --- /dev/null +++ b/formats/content-image.php @@ -0,0 +1,19 @@ + +
> + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/content-link.php b/formats/content-link.php new file mode 100755 index 0000000..492f6cf --- /dev/null +++ b/formats/content-link.php @@ -0,0 +1,20 @@ + +
> + + + + + + +

+ + + + +

+ + +

+ + + diff --git a/formats/content-quote.php b/formats/content-quote.php new file mode 100755 index 0000000..798bdc2 --- /dev/null +++ b/formats/content-quote.php @@ -0,0 +1,21 @@ + +
> + + + + + + +

+ + + + + +

+ + +

+ + + diff --git a/formats/content-status.php b/formats/content-status.php new file mode 100755 index 0000000..ee78cc3 --- /dev/null +++ b/formats/content-status.php @@ -0,0 +1,20 @@ + +
> + + + + + + +

+ + + + +

+ + +

+ + + diff --git a/formats/content-video.php b/formats/content-video.php new file mode 100755 index 0000000..b92fe2c --- /dev/null +++ b/formats/content-video.php @@ -0,0 +1,19 @@ + +
> + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/content.php b/formats/content.php new file mode 100755 index 0000000..a921202 --- /dev/null +++ b/formats/content.php @@ -0,0 +1,20 @@ + +
> + + + + + + +

+ '; + } else { + echo ''; + } + ?> + +

+ + diff --git a/formats/excerpt-aside.php b/formats/excerpt-aside.php new file mode 100755 index 0000000..623dc5f --- /dev/null +++ b/formats/excerpt-aside.php @@ -0,0 +1,42 @@ + +
> + + + + +

+ + + + +

+ + +
+ + +
+

+ + + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-audio.php b/formats/excerpt-audio.php new file mode 100755 index 0000000..0980eb6 --- /dev/null +++ b/formats/excerpt-audio.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-chat.php b/formats/excerpt-chat.php new file mode 100755 index 0000000..0a8c3f1 --- /dev/null +++ b/formats/excerpt-chat.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-gallery.php b/formats/excerpt-gallery.php new file mode 100755 index 0000000..3a2cb95 --- /dev/null +++ b/formats/excerpt-gallery.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-image.php b/formats/excerpt-image.php new file mode 100755 index 0000000..8ac4cc3 --- /dev/null +++ b/formats/excerpt-image.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-link.php b/formats/excerpt-link.php new file mode 100755 index 0000000..98871cc --- /dev/null +++ b/formats/excerpt-link.php @@ -0,0 +1,42 @@ + +
> + + + + +

+ + + + +

+ + +
+ + +
+

+ + + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-quote.php b/formats/excerpt-quote.php new file mode 100755 index 0000000..067770e --- /dev/null +++ b/formats/excerpt-quote.php @@ -0,0 +1,43 @@ + +
> + + + + +

+ + + + + +

+ + +
+ + +
+

+ + + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-status.php b/formats/excerpt-status.php new file mode 100755 index 0000000..b64f42b --- /dev/null +++ b/formats/excerpt-status.php @@ -0,0 +1,42 @@ + +
> + + + + +

+ + + + +

+ + +
+ + +
+

+ + + + + + +
+ +
+ + + +
diff --git a/formats/excerpt-video.php b/formats/excerpt-video.php new file mode 100755 index 0000000..2214333 --- /dev/null +++ b/formats/excerpt-video.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/formats/excerpt.php b/formats/excerpt.php new file mode 100755 index 0000000..87d52c9 --- /dev/null +++ b/formats/excerpt.php @@ -0,0 +1,36 @@ + +
> + + + +

+ + '; + } else { + echo ''; + } + ?> + + +

+ + +
+ + + + + +
+ +
+ + + +
diff --git a/functions.php b/functions.php new file mode 100755 index 0000000..3b92285 --- /dev/null +++ b/functions.php @@ -0,0 +1,233 @@ + tag in the document head, and expect WordPress to + * provide it for us. + */ + add_theme_support( 'title-tag' ); + + /* + * Enable support for Post Thumbnails on posts and pages. + * + * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails + */ + add_theme_support( 'post-thumbnails' ); + + // This theme uses wp_nav_menu() in three locations. + register_nav_menus( array( + 'top-menu' => esc_html__( 'Top Menu', 'atticus-finch' ), + 'primary-menu' => esc_html__( 'Primary Menu', 'atticus-finch' ), + 'footer-menu' => esc_html__( 'Footer Menu', 'atticus-finch' ), + ) ); + + /* + * Switch default core markup for search form, comment form, and comments + * to output valid HTML5. + */ + add_theme_support( 'html5', array( + 'search-form', + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + ) ); + + /* + * Enable support for Post Formats. + * See http://codex.wordpress.org/Post_Formats + */ + add_theme_support( 'post-formats', array( + 'aside', + 'audio', + 'chat', + 'gallery', + 'image', + 'link', + 'quote', + 'status', + 'video', + ) ); + + // Set up the WordPress core custom background feature. + add_theme_support( 'custom-background', apply_filters( 'atticus_finch_custom_background_args', array( + 'default-color' => 'ffffff', + 'default-image' => '', + ) ) ); +} +endif; // atticus_finch_setup +add_action( 'after_setup_theme', 'atticus_finch_setup' ); + +/** + * Set the content width in pixels, based on the theme's design and stylesheet. + * + * Priority 0 to make it available to lower priority callbacks. + * + * @global int $content_width + */ +function atticus_finch_content_width() { + $GLOBALS['content_width'] = apply_filters( 'atticus_finch_content_width', 620 ); +} +add_action( 'after_setup_theme', 'atticus_finch_content_width', 0 ); + +/** + * Register widget area. + * + * @link http://codex.wordpress.org/Function_Reference/register_sidebar + */ +function atticus_finch_widgets_init() { + register_sidebar( array( + 'name' => esc_html__( 'Sidebar', 'atticus-finch' ), + 'id' => 'sidebar-1', + 'description' => '', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); +} +add_action( 'widgets_init', 'atticus_finch_widgets_init' ); + +/** + * Enqueue scripts and styles. + */ +function atticus_finch_scripts() { + wp_enqueue_style( 'atticus-finch-googlefont', 'https://fonts.googleapis.com/css?family=IM+Fell+English:400,400italic', 'atticus-finch-style', wp_get_theme() -> get( 'Version' ), 'all' ); + +if ( !wp_style_is( 'font-awesome.min.css', 'enqueued' ) ) { + wp_enqueue_style( 'atticus-finch-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', 'atticus-finch-style', wp_get_theme() -> get( 'Version' ), 'all' ); +} + + wp_enqueue_style( 'atticus-finch-style', get_stylesheet_uri() ); + + wp_enqueue_style( 'atticus-finch-menus', get_template_directory_uri() . '/styles/menus.css', array( 'atticus-finch-style' ), wp_get_theme() -> get( 'Version' ) ); + + wp_enqueue_style( 'atticus-finch-mobile', get_template_directory_uri() . '/styles/mobile.css', array( 'atticus-finch-style' ), wp_get_theme() -> get( 'Version' ), 'screen and (max-width: '. get_theme_mod( 'atticus_finch_mobile_breakpoint' ) . 'px)' ); + + wp_enqueue_style( 'atticus-finch-print', get_template_directory_uri() . '/styles/print.css', array( 'atticus-finch-style' ), wp_get_theme() -> get( 'Version' ), 'print' ); + + wp_enqueue_script( 'atticus-finch-menumaker', get_template_directory_uri() . '/js/menumaker.js', array( 'jquery' ), wp_get_theme() -> get( 'Version' ), true ); + + wp_enqueue_script( 'atticus-finch-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), wp_get_theme() -> get( 'Version' ), true ); + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } +} +add_action( 'wp_enqueue_scripts', 'atticus_finch_scripts' ); + +/** + * Enable live changes in the customizer + */ +function atticus_finch_customizer_script() { + wp_enqueue_script( 'atticus-finch-theme-customizer', get_template_directory_uri() . '/js/customizer.js', array(), wp_get_theme() -> get( 'Version' ), true ); +} +add_action( 'customize_preview_init', 'atticus_finch_customizer_script' ); + + +// Change "read more" link on excerpts +// codex.wordpress.org/Function_Reference/the_excerpt +function atticus_finch_excerpt_more( $more ) { + $text = get_theme_mod( 'atticus_finch_readmore', '…read more…' ); + return ' ' . $text . ''; +} +add_filter( 'excerpt_more', 'atticus_finch_excerpt_more' ); + + +// Add descriptions to main menu +// http://www.wpbeginner.com/wp-themes/how-to-add-menu-descriptions-in-your-wordpress-themes/ +/* +class Atticus_Finch_Menu_With_Description extends Walker_Nav_Menu { + function start_el(&$output, $item, $depth=0, $args = array(), $id=0) { + global $wp_query; + $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; + + $class_names = $value = ''; + + $classes = empty( $item->classes ) ? array() : (array) $item->classes; + + $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); + $class_names = ' class="' . esc_attr( $class_names ) . '"'; + + $output .= $indent . '