Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Sync dev with master
Browse files Browse the repository at this point in the history
  • Loading branch information
anteprimorac committed Jul 29, 2016
1 parent 174821d commit 37d5d79
Show file tree
Hide file tree
Showing 7 changed files with 411 additions and 39 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.7] - 2016-07-29
### Fixed
- Fix WP editor read more tag image height (thanks @josephbydeign)

## [1.0.6] - 2016-04-27
### Added
- Theme admin page

### Changed
- Theme logo replaced with custom logo support

### Fixed
- Project list hero block (thanks @racheljcox)
- Page hero block

## [1.0.5] - 2016-04-11
### Changed
- Remove registration of color schemes styles

## [1.0.4] - 2016-04-07
### Added
- Inline docs for filters

### Changed
- Rename pine_portfolio_terms filter to pine_portfolio_taxonomy
- Remove registration of customize controls styles and scripts

### Removed
- Remove searchform HTML5 support. Theme already have searchform.php file.

## [1.0.3] - 2016-03-08
### Changed
- Fonts are loaded trough wp_enqueue_style.
- Change theme url
- Replace default logo with generic logo
- Fix file endings on php files

## [1.0.2] - 2016-03-07
### Added
- Images source and licence informations.
Expand Down
51 changes: 26 additions & 25 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ function pine_setup() {
add_image_size( 'pine-column-full', 1140, 400, true );
add_image_size( 'pine-column', 750, 400, true );

/**
* Enable support for Theme Logo
*
* @link http://codex.wordpress.org/Theme_Logo
*/
add_theme_support( 'custom-logo', array(
'height' => 500,
'width' => 500,
'flex-height' => true,
'flex-width' => true,
'header-text' => array( 'site-title', 'site-description' ),
) );

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'pine' ),
Expand All @@ -60,7 +73,6 @@ function pine_setup() {
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
Expand Down Expand Up @@ -93,7 +105,13 @@ function pine_setup() {
* @global int $content_width
*/
function pine_content_width() {
$GLOBALS['content_width'] = apply_filters( 'pine_content_width', 1140 );
$pine_content_width = 1140;
/**
* Filter content width
*
* @param integer $pine_content_width Default content width.
*/
$GLOBALS['content_width'] = (int) apply_filters( 'pine_content_width', $pine_content_width );
}
add_action( 'after_setup_theme', 'pine_content_width', 0 );

Expand All @@ -115,21 +133,6 @@ function pine_widgets_init() {
}
add_action( 'widgets_init', 'pine_widgets_init' );

/**
* Enqueue admin scripts and styles.
*
* @since 1.0
*/
function pine_admin_scripts() {
wp_register_style( 'pine-customize-control-color-scheme', get_template_directory_uri() . '/admin/css/pine-customize-control-color-scheme.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'pine-customize-control-color-scheme', get_template_directory_uri() . '/admin/js/pine-customize-control-color-scheme.js', array( 'customize-controls', 'jquery' ), '20150610', true );
wp_register_style( 'pine-customize-control-social-buttons', get_template_directory_uri() . '/admin/css/pine-customize-control-social-buttons.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'pine-customize-control-social-buttons', get_template_directory_uri() . '/admin/js/pine-customize-control-social-buttons.js', array( 'customize-controls', 'jquery' ), '20150610', true );
wp_register_style( 'pine-customize-control-layout', get_template_directory_uri() . '/admin/css/pine-customize-control-layout.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'pine-customize-control-layout', get_template_directory_uri() . '/admin/js/pine-customize-control-layout.js', array( 'customize-controls', 'jquery' ), '20140806', true );
}
add_action( 'admin_enqueue_scripts', 'pine_admin_scripts' );

/**
* Enqueue scripts and styles.
*/
Expand All @@ -140,18 +143,11 @@ function pine_scripts() {
// Default style.
wp_enqueue_style( 'pine-style', get_template_directory_uri() . '/css/style.css', array( 'pine-fonts' ), '20160303' );

// Colors.
wp_register_style( 'pine-style-color-blue', get_template_directory_uri() . '/css/color-blue.css', array( 'pine-style' ), '20160303' );
wp_register_style( 'pine-style-color-green', get_template_directory_uri() . '/css/color-green.css', array( 'pine-style' ), '20160303' );
wp_register_style( 'pine-style-color-orange', get_template_directory_uri() . '/css/color-orange.css', array( 'pine-style' ), '20160303' );
wp_register_style( 'pine-style-color-purple', get_template_directory_uri() . '/css/color-purple.css', array( 'pine-style' ), '20160303' );
wp_register_style( 'pine-style-color-yellow', get_template_directory_uri() . '/css/color-yellow.css', array( 'pine-style' ), '20160303' );

// Enqueue choosen color scheme.
$colors = array( 'blue', 'green', 'orange', 'purple', 'yellow' );
$scheme = get_theme_mod( 'pine_scheme', 'red' );
if ( in_array( $scheme, $colors ) ) {
wp_enqueue_style( 'pine-style-color-' . $scheme );
wp_enqueue_style( 'pine-style-color-' . $scheme, get_template_directory_uri() . '/css/color-' . $scheme . '.css', array( 'pine-style' ), '20160411' );
}

// Scripts.
Expand Down Expand Up @@ -195,3 +191,8 @@ function pine_custom_style() {
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';

/**
* Pine Admin Page
*/
require get_template_directory() . '/inc/admin-page.php';
Loading

0 comments on commit 37d5d79

Please sign in to comment.