From bfa86a9acadd8c2cacf6a1931086e729809a1c62 Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Sun, 1 Aug 2021 13:32:46 -0400 Subject: [PATCH] Initial commit --- 404.php | 53 + README.md | 3 - archive.php | 48 + category.php | 45 + comments.php | 75 ++ footer.php | 56 + formats/content-aside.php | 20 + formats/content-audio.php | 19 + formats/content-chat.php | 19 + formats/content-gallery.php | 19 + formats/content-image.php | 19 + formats/content-link.php | 20 + formats/content-quote.php | 21 + formats/content-status.php | 20 + formats/content-video.php | 19 + formats/content.php | 20 + formats/excerpt-aside.php | 42 + formats/excerpt-audio.php | 36 + formats/excerpt-chat.php | 36 + formats/excerpt-gallery.php | 36 + formats/excerpt-image.php | 36 + formats/excerpt-link.php | 42 + formats/excerpt-quote.php | 43 + formats/excerpt-status.php | 42 + formats/excerpt-video.php | 36 + formats/excerpt.php | 36 + functions.php | 233 ++++ functions/custom-header.php | 126 ++ functions/customizer.php | 975 ++++++++++++++ functions/jetpack.php | 30 + functions/mobile-menus.php | 26 + functions/template-tags.php | 337 +++++ functions/widget-areas.php | 544 ++++++++ header.php | 122 ++ images/404.jpg | Bin 0 -> 33978 bytes inc/content-entry-meta.php | 14 + inc/content-excerpt.php | 30 + inc/content-main.php | 28 + inc/content-post-nav.php | 9 + inc/excerpt-entry-meta.php | 6 + inc/excerpt-short-meta.php | 5 + inc/page-main.php | 36 + index.php | 37 + js/customizer.js | 44 + js/menumaker.min.js | 1 + js/navigation.js | 81 ++ js/skip-link-focus-fix.js | 33 + lang/.gitignore | 0 notes.txt | 2 + page-no-sidebar.php | 40 + page.php | 49 + readme.md | 45 + readme.txt | 44 + screenshot.png | Bin 0 -> 42643 bytes sidebar.php | 15 + single.php | 33 + style.css | 787 ++++++++++++ styles/menumaker.css | 1084 ++++++++++++++++ styles/menus.css | 1087 ++++++++++++++++ styles/mobile.css | 112 ++ styles/print.css | 90 ++ tag.php | 44 + update/Puc/v4/Factory.php | 271 ++++ update/Puc/v4p1/Autoloader.php | 49 + update/Puc/v4p1/DebugBar/Extension.php | 117 ++ update/Puc/v4p1/DebugBar/Panel.php | 165 +++ update/Puc/v4p1/DebugBar/PluginExtension.php | 33 + update/Puc/v4p1/DebugBar/PluginPanel.php | 38 + update/Puc/v4p1/DebugBar/ThemePanel.php | 21 + update/Puc/v4p1/Metadata.php | 132 ++ update/Puc/v4p1/OAuthSignature.php | 88 ++ update/Puc/v4p1/Plugin/Info.php | 127 ++ update/Puc/v4p1/Plugin/Update.php | 91 ++ update/Puc/v4p1/Plugin/UpdateChecker.php | 546 ++++++++ update/Puc/v4p1/Scheduler.php | 177 +++ update/Puc/v4p1/StateStore.php | 207 +++ update/Puc/v4p1/Theme/Update.php | 84 ++ update/Puc/v4p1/Theme/UpdateChecker.php | 167 +++ update/Puc/v4p1/Update.php | 34 + update/Puc/v4p1/UpdateChecker.php | 825 ++++++++++++ update/Puc/v4p1/UpgraderStatus.php | 199 +++ update/Puc/v4p1/Utils.php | 77 ++ update/Puc/v4p1/Vcs/Api.php | 243 ++++ update/Puc/v4p1/Vcs/BaseChecker.php | 22 + update/Puc/v4p1/Vcs/BitBucketApi.php | 251 ++++ update/Puc/v4p1/Vcs/GitHubApi.php | 289 +++++ update/Puc/v4p1/Vcs/PluginUpdateChecker.php | 198 +++ update/Puc/v4p1/Vcs/Reference.php | 49 + update/Puc/v4p1/Vcs/ThemeUpdateChecker.php | 101 ++ update/README.md | 221 ++++ update/composer.json | 22 + update/css/puc-debug-bar.css | 62 + update/js/debug-bar.js | 52 + update/languages/plugin-update-checker-de_DE.mo | Bin 0 -> 980 bytes update/languages/plugin-update-checker-de_DE.po | 38 + update/languages/plugin-update-checker-fa_IR.mo | Bin 0 -> 1128 bytes update/languages/plugin-update-checker-fa_IR.po | 38 + update/languages/plugin-update-checker-fr_FR.mo | Bin 0 -> 1032 bytes update/languages/plugin-update-checker-fr_FR.po | 38 + update/languages/plugin-update-checker-hu_HU.mo | Bin 0 -> 982 bytes update/languages/plugin-update-checker-hu_HU.po | 41 + update/languages/plugin-update-checker-it_IT.mo | Bin 0 -> 989 bytes update/languages/plugin-update-checker-it_IT.po | 38 + update/languages/plugin-update-checker-ja.mo | Bin 0 -> 1060 bytes update/languages/plugin-update-checker-ja.po | 38 + update/languages/plugin-update-checker-pt_BR.mo | Bin 0 -> 1014 bytes update/languages/plugin-update-checker-pt_BR.po | 48 + update/languages/plugin-update-checker.pot | 43 + update/license.txt | 7 + update/puc.php | 22 + update/vendor/Parsedown.php | 1538 +++++++++++++++++++++++ update/vendor/ParsedownLegacy.php | 1535 ++++++++++++++++++++++ update/vendor/readme-parser.php | 334 +++++ 113 files changed, 15723 insertions(+), 3 deletions(-) create mode 100755 404.php create mode 100755 archive.php create mode 100755 category.php create mode 100755 comments.php create mode 100755 footer.php create mode 100755 formats/content-aside.php create mode 100755 formats/content-audio.php create mode 100755 formats/content-chat.php create mode 100755 formats/content-gallery.php create mode 100755 formats/content-image.php create mode 100755 formats/content-link.php create mode 100755 formats/content-quote.php create mode 100755 formats/content-status.php create mode 100755 formats/content-video.php create mode 100755 formats/content.php create mode 100755 formats/excerpt-aside.php create mode 100755 formats/excerpt-audio.php create mode 100755 formats/excerpt-chat.php create mode 100755 formats/excerpt-gallery.php create mode 100755 formats/excerpt-image.php create mode 100755 formats/excerpt-link.php create mode 100755 formats/excerpt-quote.php create mode 100755 formats/excerpt-status.php create mode 100755 formats/excerpt-video.php create mode 100755 formats/excerpt.php create mode 100755 functions.php create mode 100755 functions/custom-header.php create mode 100755 functions/customizer.php create mode 100755 functions/jetpack.php create mode 100755 functions/mobile-menus.php create mode 100755 functions/template-tags.php create mode 100755 functions/widget-areas.php create mode 100755 header.php create mode 100755 images/404.jpg create mode 100755 inc/content-entry-meta.php create mode 100755 inc/content-excerpt.php create mode 100755 inc/content-main.php create mode 100755 inc/content-post-nav.php create mode 100755 inc/excerpt-entry-meta.php create mode 100755 inc/excerpt-short-meta.php create mode 100755 inc/page-main.php create mode 100755 index.php create mode 100755 js/customizer.js create mode 100755 js/menumaker.min.js create mode 100755 js/navigation.js create mode 100755 js/skip-link-focus-fix.js create mode 100755 lang/.gitignore create mode 100644 notes.txt create mode 100755 page-no-sidebar.php create mode 100755 page.php create mode 100644 readme.md create mode 100755 readme.txt create mode 100755 screenshot.png create mode 100755 sidebar.php create mode 100755 single.php create mode 100755 style.css create mode 100755 styles/menumaker.css create mode 100755 styles/menus.css create mode 100755 styles/mobile.css create mode 100755 styles/print.css create mode 100755 tag.php create mode 100755 update/Puc/v4/Factory.php create mode 100755 update/Puc/v4p1/Autoloader.php create mode 100755 update/Puc/v4p1/DebugBar/Extension.php create mode 100755 update/Puc/v4p1/DebugBar/Panel.php create mode 100755 update/Puc/v4p1/DebugBar/PluginExtension.php create mode 100755 update/Puc/v4p1/DebugBar/PluginPanel.php create mode 100755 update/Puc/v4p1/DebugBar/ThemePanel.php create mode 100755 update/Puc/v4p1/Metadata.php create mode 100755 update/Puc/v4p1/OAuthSignature.php create mode 100755 update/Puc/v4p1/Plugin/Info.php create mode 100755 update/Puc/v4p1/Plugin/Update.php create mode 100755 update/Puc/v4p1/Plugin/UpdateChecker.php create mode 100755 update/Puc/v4p1/Scheduler.php create mode 100755 update/Puc/v4p1/StateStore.php create mode 100755 update/Puc/v4p1/Theme/Update.php create mode 100755 update/Puc/v4p1/Theme/UpdateChecker.php create mode 100755 update/Puc/v4p1/Update.php create mode 100755 update/Puc/v4p1/UpdateChecker.php create mode 100755 update/Puc/v4p1/UpgraderStatus.php create mode 100755 update/Puc/v4p1/Utils.php create mode 100755 update/Puc/v4p1/Vcs/Api.php create mode 100755 update/Puc/v4p1/Vcs/BaseChecker.php create mode 100755 update/Puc/v4p1/Vcs/BitBucketApi.php create mode 100755 update/Puc/v4p1/Vcs/GitHubApi.php create mode 100755 update/Puc/v4p1/Vcs/PluginUpdateChecker.php create mode 100755 update/Puc/v4p1/Vcs/Reference.php create mode 100755 update/Puc/v4p1/Vcs/ThemeUpdateChecker.php create mode 100755 update/README.md create mode 100755 update/composer.json create mode 100755 update/css/puc-debug-bar.css create mode 100755 update/js/debug-bar.js create mode 100755 update/languages/plugin-update-checker-de_DE.mo create mode 100755 update/languages/plugin-update-checker-de_DE.po create mode 100755 update/languages/plugin-update-checker-fa_IR.mo create mode 100755 update/languages/plugin-update-checker-fa_IR.po create mode 100755 update/languages/plugin-update-checker-fr_FR.mo create mode 100755 update/languages/plugin-update-checker-fr_FR.po create mode 100755 update/languages/plugin-update-checker-hu_HU.mo create mode 100755 update/languages/plugin-update-checker-hu_HU.po create mode 100755 update/languages/plugin-update-checker-it_IT.mo create mode 100755 update/languages/plugin-update-checker-it_IT.po create mode 100755 update/languages/plugin-update-checker-ja.mo create mode 100755 update/languages/plugin-update-checker-ja.po create mode 100755 update/languages/plugin-update-checker-pt_BR.mo create mode 100755 update/languages/plugin-update-checker-pt_BR.po create mode 100755 update/languages/plugin-update-checker.pot create mode 100755 update/license.txt create mode 100755 update/puc.php create mode 100755 update/vendor/Parsedown.php create mode 100755 update/vendor/ParsedownLegacy.php create mode 100755 update/vendor/readme-parser.php 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 . '