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

Pull request #228

Merged
merged 3 commits into from
Oct 8, 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
2 changes: 0 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ function flint_after_setup_theme() {

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

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

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

require( get_template_directory() . '/inc/options.php' );
Expand Down
5 changes: 2 additions & 3 deletions inc/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ function flint_deprecated_function( $function, $version, $replacement = null ) {
* @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
*/
if ( true === WP_DEBUG ) {
$debug = debug_backtrace();
if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( __( '%1$s is deprecated since Flint version %2$s! Use %3$s instead in file %4$s on line %5$s. Triggered', 'flint' ), $function, $version, $replacement, $debug[1]['file'], $debug[1]['line'] ), E_USER_NOTICE );
trigger_error( sprintf( __( '%1$s is deprecated since Flint version %2$s! Use %3$s instead. Triggered', 'flint' ), $function, $version, $replacement ), E_USER_NOTICE );
} else {
trigger_error( sprintf( __( '%1$s is deprecated since Flint version %2$s with no alternative available in file %3$s on line %4$s. Triggered', 'flint' ), $function, $version, $debug[1]['file'], $debug[1]['line'] ), E_USER_NOTICE );
trigger_error( sprintf( __( '%1$s is deprecated since Flint version %2$s with no alternative available. Triggered', 'flint' ), $function, $version ), E_USER_NOTICE );
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ function flint_get_the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
* @return bool True if the current post has any of the given categories (or any category, if no category specified).
*/
function flint_has_category( $category = '', $thing = null ) {
global $post;
if ( ! $thing ) {
$thing = $post;
}
Expand Down Expand Up @@ -1123,6 +1124,7 @@ function flint_post_width_class() {
*/
function flint_post_margin( $thumbnail = false ) {
$post_width = flint_post_width();
$format = get_post_format();
$output = '';

if ( true === $thumbnail && ! is_active_sidebar( 'left' ) && ! is_active_sidebar( 'right' ) ) {
Expand Down