Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Add Hook Customization to Customizer #85

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "dev/vendor"
}
"directory": "dev/vendor"
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
release
dev/vendor/*
dev/vendor/*
30 changes: 15 additions & 15 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"esnext": true,
"immed": true,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"strict": false,
"trailing": true
}
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"esnext": true,
"immed": true,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"strict": false,
"trailing": true
}
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Travis CI (MIT License) configuration file for Flat WordPress Theme
# Travis CI (MIT License) configuration file for Pacific WordPress Theme
# @link https://travis-ci.org/

# For use with the Flat WordPress Theme
# @link https://github.com/yoarts/flat
# For use with the Pacific WordPress Theme
# @link https://github.com/BrazenlyGeek/Pacific

# Declare project language.
# @link http://about.travis-ci.org/docs/user/languages/php/
Expand Down Expand Up @@ -43,4 +43,4 @@ script:
# -n flag: Do not print warnings (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- $(pwd)/php-codesniffer/scripts/phpcs -p -s -v -n flat --standard=WordPress --extensions=php
- $(pwd)/php-codesniffer/scripts/phpcs -p -s -v -n pacific --standard=WordPress --extensions=php
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
2.0.0
=====

* Updated dependencies

1.5.7
=====

* Fix: Missing Hook on Pages
* Add: Load main stylesheet for childtheme supports
Expand Down
24 changes: 12 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ module.exports = function(grunt) {

var jsFileList = [
'dev/vendor/bootstrap/js/transition.js',
'dev/vendor/bootstrap/js/alert.js',
'dev/vendor/bootstrap/js/button.js',
'dev/vendor/bootstrap/js/carousel.js',
'dev/vendor/bootstrap/js/collapse.js',
'dev/vendor/bootstrap/js/dropdown.js',
'dev/vendor/bootstrap/js/modal.js',
'dev/vendor/bootstrap/js/tooltip.js',
'dev/vendor/bootstrap/js/popover.js',
'dev/vendor/bootstrap/js/scrollspy.js',
'dev/vendor/bootstrap/js/tab.js',
'dev/vendor/bootstrap/js/affix.js',
'dev/vendor/bootstrap/js/alert.js',
'dev/vendor/bootstrap/js/button.js',
'dev/vendor/bootstrap/js/carousel.js',
'dev/vendor/bootstrap/js/collapse.js',
'dev/vendor/bootstrap/js/dropdown.js',
'dev/vendor/bootstrap/js/modal.js',
'dev/vendor/bootstrap/js/tooltip.js',
'dev/vendor/bootstrap/js/popover.js',
'dev/vendor/bootstrap/js/scrollspy.js',
'dev/vendor/bootstrap/js/tab.js',
'dev/vendor/bootstrap/js/affix.js',
'dev/js/*.js'
];

Expand Down Expand Up @@ -145,4 +145,4 @@ module.exports = function(grunt) {
'concat',
'compress'
]);
};
};
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Flat
# Pacific

[![Travis CI Build Status](https://travis-ci.org/yoarts/flat.svg?branch=master)](https://travis-ci.org/yoarts/flat) [![devDependency Status](https://david-dm.org/yoarts/flat/dev-status.svg)](https://david-dm.org/yoarts/flat#info=devDependencies) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/yoarts/flat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)
* Author: YoArts
* Author URL: http://www.yoarts.com
[![Travis CI Build Status](https://travis-ci.org/BrazenlyGeek/Pacific.svg?branch=master)](https://travis-ci.org/BrazenlyGeek/Pacific) [![devDependency Status](https://david-dm.org/BrazenlyGeek/Pacific/dev-status.svg)](https://david-dm.org/BrazenlyGeek/Pacific#info=devDependencies) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/BrazenlyGeek/Pacific)
* Author: Rick Beckman
* Author URL: https://rickbeckman.com
* Contributor: @yoarts, @ghost, @ashfame, @kevinpapst, @abovethewater
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html

## Description

Flat is a responsive WordPress theme designed by YoArts. We would like to say that Flat is both beautiful and charming at the same time.
Pacific is a responsive WordPress theme designed by YoArts. We would like to say that Pacific is both beautiful and charming at the same time.

## Features

Expand Down Expand Up @@ -46,7 +46,7 @@ Flat is a responsive WordPress theme designed by YoArts. We would like to say th

## Resources

Flat is built with the following resources:
Pacific is built with the following resources:

* **Code based on [DW Minion](http://www.designwall.com/wordpress/themes/dw-minion/)**
* Copyright: [DesignWall](http://www.designwall.com/)
Expand Down Expand Up @@ -81,7 +81,7 @@ Flat is built with the following resources:

## Theme development

Flat uses [Grunt](http://gruntjs.com/) for compiling LESS to CSS, checking for JS errors, live reloading, concatenating and minifying files.
Pacific uses [Grunt](http://gruntjs.com/) for compiling LESS to CSS, checking for JS errors, live reloading, concatenating and minifying files.

Add the following to your `wp-config.php` on your development installation:

Expand All @@ -108,7 +108,7 @@ When completed, you'll be able to run the various Grunt commands provided from t

## Customization

Flat is able to be customized extensively by the [WordPress hooks & filters API](http://codex.wordpress.org/Plugin_API), which is a fancy way of saying that without creating a child theme, you have the freedom to add, remove, and change a lot of what makes Flat _Flat_. In addition to the default hooks & filters that just about any WordPress theme has available, Flat is equipped with the following:
Pacific is able to be customized extensively by the [WordPress hooks & filters API](http://codex.wordpress.org/Plugin_API), which is a fancy way of saying that without creating a child theme, you have the freedom to add, remove, and change a lot of what makes Pacific _Pacific_. In addition to the default hooks & filters that just about any WordPress theme has available, Pacific is equipped with the following:

### Available hooks

Expand Down
36 changes: 18 additions & 18 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "flat",
"version": "1.5.7",
"homepage": "http://www.yoarts.com",
"authors": [
"Thanh Luu <hi@yoarts.com>"
],
"license": "GPL-3.0+",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"assets/vendor"
],
"dependencies": {
"fontawesome": "4.3.0",
"bootstrap": "3.3.2"
}
}
"name": "Pacific",
"version": "2.0.0",
"homepage": "https://rickbeckman.com",
"authors": [
"Rick Beckman <rick.beckman@gmail.com>"
],
"license": "GPL-3.0+",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"assets/vendor"
],
"dependencies": {
"fontawesome": "4.5.0",
"bootstrap": "3.3.6"
}
}
28 changes: 0 additions & 28 deletions dev/js/flat.js

This file was deleted.

28 changes: 28 additions & 0 deletions dev/js/pacific.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(function($){
'use strict';
$(document).ready(function() {
$('.toggle-sidebar').click(function() {
$('.row-offcanvas').toggleClass('active');
});
$('.toggle-navigation').click(function() {
$(this).toggleClass('open').next('#site-navigation').slideToggle(300);
});

$('#site-navigation .sub-menu, #site-navigation .children').before('<i class="fa fa-caret-right"></i>');

if(!!('ontouchstart' in window)){
$('#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa')
.click(function() {
$(this).toggleClass('open').next('ul').slideToggle(300);
});
} else {
$('#site-navigation .menu-item-has-children, #site-navigation .page_item_has_children')
.not('.current-menu-parent, .current_page_parent, .current_page_ancestor, .current-menu-ancestor')
.hover(function() {
$(this).children('.fa').toggleClass('open').next('ul').stop(true, true).delay(200).slideDown();
},function() {
$(this).children('.fa').toggleClass('open').next('ul').stop(true, true).delay(500).slideUp();
});
}
});
})(jQuery);
2 changes: 1 addition & 1 deletion dev/less/_variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@
// Point at which the navbar becomes uncollapsed
@grid-float-breakpoint: @screen-lg-min;
// Point at which the navbar begins collapsing
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
4 changes: 2 additions & 2 deletions dev/less/flat.less → dev/less/pacific.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Bootstrap
@import "_bootstrap";

// Flat
// Pacific
@import "_variables.less";
@import "_theme";
@import "_layout";
@import "_layout";
6 changes: 3 additions & 3 deletions dist/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Used when users get lost along the way.
*
* @package Flat
* @package Pacific
*/

# Prevent direct access to this file
Expand All @@ -18,10 +18,10 @@
?>
<section id="content" class="site-content error-404 not-found" role="main">
<header>
<h2 class="page-title"><?php echo esc_html( apply_filters( 'flat_404_title', __( 'Not Found', 'flat' ) ) ); ?></h2>
<h2 class="page-title"><?php echo esc_html( apply_filters( 'pacific_404_title', __( 'Not Found', 'pacific' ) ) ); ?></h2>
</header>
<div class="page-content">
<?php flat_hook_404_content(); ?>
<?php pacific_hook_404_content(); ?>
</div>
</section>
<?php get_footer(); ?>
16 changes: 8 additions & 8 deletions dist/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Used on generic month, category, tag, tax, and author archives if no
* more specific template is present (such as in a child theme).
*
* @package Flat
* @package Pacific
*/

# Prevent direct access to this file
Expand All @@ -21,29 +21,29 @@
<?php if ( is_author() && get_the_author_meta( 'description' ) ) : ?>
<div class="author-info">
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'flat_author_bio_avatar_size', 80 ) ); ?>
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'pacific_author_bio_avatar_size', 80 ) ); ?>
</div>
<div class="author-description">
<h4><?php printf( esc_html__( 'About %s', 'flat' ), get_the_author() ); ?></h4>
<h4><?php printf( esc_html__( 'About %s', 'pacific' ), get_the_author() ); ?></h4>
<p><?php the_author_meta( 'description' ); ?></p>
</div>
</div>
<?php endif; ?>

<?php flat_hook_archive_before(); ?>
<?php pacific_hook_archive_before(); ?>

<div id="content" class="site-content" role="main">
<?php flat_hook_archive_top(); ?>
<?php pacific_hook_archive_top(); ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php the_posts_pagination( array( 'prev_text' => __( '<i class="fa fa-chevron-left"></i>', 'flat' ), 'next_text' => __( '<i class="fa fa-chevron-right"></i>', 'flat' ) ) ); ?>
<?php the_posts_pagination( array( 'prev_text' => __( '<i class="fa fa-chevron-left"></i>', 'pacific' ), 'next_text' => __( '<i class="fa fa-chevron-right"></i>', 'pacific' ) ) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
<?php flat_hook_archive_bottom(); ?>
<?php pacific_hook_archive_bottom(); ?>
</div>

<?php flat_hook_archive_after(); ?>
<?php pacific_hook_archive_after(); ?>
<?php get_footer(); ?>
Loading