Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flint 1.4.0 #201

Merged
merged 13 commits into from
Aug 31, 2015
Merged
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
###Flint 1.4.0
For complete diff, check out [Pull Request](https://github.com/starverte/flint/pull/201)
- Deprecated: `get_flint_reply_link` (use `flint_get_comment_reply_link` instead)
- Deprecated: `flint_reply_link` (use `flint_comment_reply_link` instead)
- Deprecated: `flint_get_widgets` (use `flint_get_sidebar` instead)
- Deprecated: `flint_get_widgets_template` (use `flint_get_sidebar_template` instead)
- Deprecated: `flint_is_active_widgets` (use `flint_is_active_sidebar` instead)
- Deprecated: `flint_render_title` (use [`add_theme_support( 'title-tag' )`](https://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag) instead)
- Improved in-source documentation for functions and classes

###Flint 1.3.9.1
- Cleaned up file headers

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flint 1.3.9.1
Flint 1.4.0
=====
A responsive, minimalist theme built on Twitter's Bootstrap 3 and based on Automattic's _s theme. Make it your own with a custom background, custom header, custom menus, custom colors and more.

Expand Down
10 changes: 5 additions & 5 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* The template for displaying Archive pages
*
* @package Flint
* @since 1.3.9.1
* @since 1.4.0
*/
get_header();
flint_get_widgets('header');
flint_get_sidebar('header');
?>

<section id="primary" class="content-area container">

<div class="row">

<?php flint_get_widgets('left'); ?>
<?php flint_get_sidebar('left'); ?>

<div id="content" role="main" <?php flint_content_class(); ?>>

Expand Down Expand Up @@ -101,14 +101,14 @@

</div><!-- #content -->

<?php flint_get_widgets('right'); ?>
<?php flint_get_sidebar('right'); ?>

</div><!-- .row -->

</section><!-- #primary -->

</div><!-- #page -->

<?php flint_get_widgets('footer'); ?>
<?php flint_get_sidebar('footer'); ?>
<?php get_footer(); ?>

10 changes: 5 additions & 5 deletions front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* or a static page.
*
* @package Flint
* @since 1.3.9.1
* @since 1.4.0
*
*/
get_header();
flint_get_widgets('header');
flint_get_sidebar('header');
?>

<div id="primary" class="content-area container">

<div class="row">

<?php flint_get_widgets('left'); ?>
<?php flint_get_sidebar('left'); ?>

<div id="content" role="main" <?php flint_content_class(); ?>>

Expand All @@ -39,14 +39,14 @@

</div><!-- #content .site-content -->

<?php flint_get_widgets('right'); ?>
<?php flint_get_sidebar('right'); ?>

</div><!-- .row -->

</div><!-- #primary .content-area -->

</div><!-- #page -->

<?php flint_get_widgets('footer'); ?>
<?php flint_get_sidebar('footer'); ?>
<?php get_footer(); ?>

20 changes: 6 additions & 14 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Flint functions and definitions
*
* @package Flint
* @version 1.3.7
* @version 1.4.0
*/

/**
Expand All @@ -24,6 +24,8 @@ function flint_after_setup_theme() {

require( get_template_directory() . '/inc/colors.php' );

require( get_template_directory() . '/inc/deprecated.php' );

require( get_template_directory() . '/inc/extras.php' );

require( get_template_directory() . '/inc/customizer.php' );
Expand Down Expand Up @@ -138,6 +140,9 @@ function flint_widgets_init() {

add_filter( 'jetpack_implode_frontend_css', '__return_false' );

/**
* Deregister the default styles for Jetpack forms.
*/
function flint_print_styles() {
wp_deregister_style( 'grunion.css' );
}
Expand Down Expand Up @@ -233,16 +238,3 @@ function flint_enqueue_scripts() {

add_filter( 'use_default_gallery_style', '__return_false' );


//BEGIN - Backwards compatibility for add_theme_support( 'title-tag' )
//Remove after WordPress 4.3 released
if ( ! function_exists( '_wp_render_title_tag' ) ) {
function flint_render_title() {
?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php
}
add_action( 'wp_head', 'flint_render_title' );
}
//END - Backwards compatibility for add_theme_support( 'title-tag' )

10 changes: 5 additions & 5 deletions home.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* or a static page.
*
* @package Flint
* @since 1.3.9.1
* @since 1.4.0
*
*/
get_header();
flint_get_widgets('header');
flint_get_sidebar('header');
?>

<div id="primary" class="content-area container">

<div class="row">

<?php flint_get_widgets('left'); ?>
<?php flint_get_sidebar('left'); ?>

<div id="content" role="main" <?php flint_content_class(); ?>>

Expand All @@ -39,14 +39,14 @@

</div><!-- #content .site-content -->

<?php flint_get_widgets('right'); ?>
<?php flint_get_sidebar('right'); ?>

</div><!-- .row -->

</div><!-- #primary .content-area -->

</div><!-- #page -->

<?php flint_get_widgets('footer'); ?>
<?php flint_get_sidebar('footer'); ?>
<?php get_footer(); ?>

34 changes: 29 additions & 5 deletions inc/class-flint_bootstrap_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@
* Twitter Bootstrap toolkit Dropdown menus in Wordpress.
* Edited to support n-levels submenu.
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640
* @since 1.3.0
* @since 1.4.0
*/
class Flint_Bootstrap_Menu extends Walker_Nav_Menu {
/**
* Starts the list before the elements are added.
*
* @see Walker_Nav_Menu::start_lvl()
*
* @since 1.3.0
*
* @param string $output Passed by reference. Used to append additional content.
* @param int $depth Depth of menu item. Used for padding.
* @param array $args An array of arguments. @see wp_nav_menu()
*/
function start_lvl( &$output, $depth = 0, $args = array() ) {

$indent = str_repeat( "\t", $depth );
Expand All @@ -15,6 +26,18 @@ function start_lvl( &$output, $depth = 0, $args = array() ) {

}


/**
* Start the element output.
*
* @since 1.3.0
*
* @param string $output Passed by reference. Used to append additional content.
* @param object $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding.
* @param array $args An array of arguments. @see wp_nav_menu()
* @param int $id Current item ID.
*/
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {

$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
Expand Down Expand Up @@ -64,16 +87,17 @@ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}


/**
* Display element
*
* @ignore
*/
function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {
if ( !$element )
return;

$id_field = $this->db_fields['id'];

/**
* Display element
*/
if ( is_array( $args[0] ) )
$args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] );
else if ( is_object( $args[0] ) )
Expand Down
28 changes: 26 additions & 2 deletions inc/colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
* Functions related to changing colors
*
* @package Flint
* @since 1.3.0
* @since 1.4.0
*/

/**
/**
* Converts Hex to HSL
*
* @param string $HexColor A color, in hexadecimal i.e. 'ffffff'
*
* @var double $Hue The hue of the color
* @var double $Saturation The saturation of the hue
* @var double $Luminance The brightness of the hue
*
* @return array Hue, Saturation, and Luminance of the color
*/
function flint_hex_hsl( $HexColor ) {
$HexColor = str_replace( '#', '', $HexColor );
Expand Down Expand Up @@ -56,6 +64,12 @@ function flint_hex_hsl( $HexColor ) {

/**
* Converts HSL to Hex
*
* @param double $Hue The hue of the color
* @param double $Saturation The saturation of the hue
* @param double $Luminance The brightness of the hue
*
* @return string A color, in hexadecimal i.e. 'ffffff'
*/
function flint_hsl_hex( $Hue = 0, $Saturation = 0, $Luminance = 0 ) {

Expand Down Expand Up @@ -134,6 +148,11 @@ function flint_hsl_hex( $Hue = 0, $Saturation = 0, $Luminance = 0 ) {

/**
* Darkens Hex color by defined percentage
*
* @param string $HexColor A color, in hexadecimal i.e. 'ffffff'
* @param double $percent The percentage to darken the color
*
* @return string A hexadecimal color, a darker color than $HexColor
*/
function flint_darken( $HexColor, $percent ) {
$HSLColor = flint_hex_hsl($HexColor);
Expand All @@ -145,6 +164,11 @@ function flint_darken( $HexColor, $percent ) {

/**
* Lightens Hex color by defined percentage
*
* @param string $HexColor A color, in hexadecimal i.e. 'ffffff'
* @param double $percent The percentage to lighten the color
*
* @return string A hexadecimal color, a lighter color than $HexColor
*/
function flint_lighten( $HexColor, $percent ) {
$HSLColor = flint_hex_hsl($HexColor);
Expand Down
Loading