Skip to content

Commit

Permalink
Merge branch 'release-1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
thingsym committed Oct 21, 2019
2 parents 52c189b + 550b695 commit 5a7a369
Show file tree
Hide file tree
Showing 26 changed files with 5,328 additions and 2,181 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ indent_size = 2

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[composer.json]
indent_style = space
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ Small patches and bug reports can be submitted a issue tracker in Github. Forkin

## Changelog

### [1.3.0] - 2019.10.21

- fix test case
- bundle javascript files
- add webpack, replace from uglify-es
- move javascript files to src directory
- fix error content
- remove paginated with archive

### [1.2.0] - 2019.09.30

- add Class Editor
Expand Down
13 changes: 12 additions & 1 deletion functions/customizer/class-customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class Customizer {
public function __construct() {
add_action( 'customize_register', array( $this, 'customizer' ) );
add_action( 'customize_controls_enqueue_scripts', array( $this, 'control_enqueue_scripts' ) );
add_action( 'customize_preview_init', array( $this, 'preview_enqueue_scripts' ) );
}

Expand Down Expand Up @@ -61,10 +62,20 @@ public function render_partial_blogdescription() {
bloginfo( 'description' );
}

public function control_enqueue_scripts() {
wp_enqueue_script(
'wp-theme-boilerplate-customizer-control',
get_template_directory_uri() . '/js/customize-control.bundle.js',
array(),
'20191008',
true
);
}

public function preview_enqueue_scripts() {
wp_enqueue_script(
'wp-theme-boilerplate-customizer-preview',
get_template_directory_uri() . '/js/customizer.min.js',
get_template_directory_uri() . '/js/customize-preview.bundle.js',
array( 'customize-preview' ),
'20151215',
true
Expand Down
14 changes: 3 additions & 11 deletions functions/setup/class-style-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,9 @@ public function enqueue_styles() {
*/
public function enqueue_scripts() {
wp_enqueue_script(
'wp-theme-boilerplate-navigation',
get_template_directory_uri() . '/js/navigation.min.js',
array(),
'20151215',
true
);

wp_enqueue_script(
'wp-theme-boilerplate-skip-link-focus-fix',
get_template_directory_uri() . '/js/skip-link-focus-fix.min.js',
array(),
'wp-theme-boilerplate-bundle',
get_template_directory_uri() . '/js/main.bundle.js',
array( 'jquery' ),
'20151215',
true
);
Expand Down
36 changes: 15 additions & 21 deletions functions/theme-hook/class-theme-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ public function __construct() {
add_action( 'wp_theme_boilerplate/theme_hook/entry/meta/header', array( $this, 'entry_meta_header' ) );
add_action( 'wp_theme_boilerplate/theme_hook/entry/meta/footer', array( $this, 'entry_meta_footer' ) );

add_action( 'wp_theme_boilerplate/theme_hook/content/index/prepend', array( $this, 'prepend_content_index' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/archive/prepend', array( $this, 'prepend_content_archive' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/index/prepend', array( $this, 'add_page_header' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/archive/prepend', array( $this, 'add_page_header' ) );

add_action( 'wp_theme_boilerplate/theme_hook/content/index/append', array( $this, 'append_content_archive' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/archive/append', array( $this, 'append_content_archive' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/search/append', array( $this, 'append_content_archive' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/index/append', array( $this, 'add_posts_navigation' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/archive/append', array( $this, 'add_posts_navigation' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/search/append', array( $this, 'add_posts_navigation' ) );

add_action( 'wp_theme_boilerplate/theme_hook/content/page/append', array( $this, 'append_content_page' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/single/append', array( $this, 'append_content_single' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/single/append', array( $this, 'add_post_navigation' ) );

add_action( 'wp_theme_boilerplate/theme_hook/content/page/append', array( $this, 'add_comments' ) );
add_action( 'wp_theme_boilerplate/theme_hook/content/single/append', array( $this, 'add_comments' ) );
}

public function header() {
Expand Down Expand Up @@ -66,35 +68,27 @@ public function entry_meta_footer() {
Entry_Meta::entry_footer();
}

public function prepend_content_index() {
public function add_page_header() {
if ( is_home() && ! is_front_page() ) {
get_template_part( 'templates/parts/page-header-single-post' );
}
}

public function prepend_content_archive() {
if ( is_archive() ) {
elseif ( is_archive() ) {
get_template_part( 'templates/parts/page-header-archive' );
}
elseif ( is_search() ) {
get_template_part( 'templates/parts/page-header-search' );
}
}

public function append_content_archive() {
public function add_posts_navigation() {
the_posts_navigation();
}

public function append_content_page() {
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template( '/templates/parts/comments.php', true );
}
}

public function append_content_single() {
public function add_post_navigation() {
the_post_navigation();
}

public function add_comments() {
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template( '/templates/parts/comments.php', true );
Expand Down
1 change: 1 addition & 0 deletions js/customize-control.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions js/customize-preview.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion js/customizer.min.js

This file was deleted.

1 change: 1 addition & 0 deletions js/main.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion js/navigation.min.js

This file was deleted.

1 change: 0 additions & 1 deletion js/skip-link-focus-fix.min.js

This file was deleted.

Loading

0 comments on commit 5a7a369

Please sign in to comment.