Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/beastaugh/tarski
Browse files Browse the repository at this point in the history
Conflicts:
	functions.php
	library/helpers/admin_helper.php
	library/helpers/template_helper.php
	style.css
  • Loading branch information
tfnab committed May 2, 2012
2 parents e2a0e36 + 0265027 commit 9b81605
Show file tree
Hide file tree
Showing 11 changed files with 637 additions and 187 deletions.
123 changes: 14 additions & 109 deletions app/api/deprecated.php
Expand Up @@ -11,6 +11,20 @@
* @link http://tarskitheme.com/forum/
*/

/**
* Return the current theme version.
*
* @since 2.0
* @deprecated 3.2.0
*
* @return string
*/
function theme_version() {
_deprecated_function('wp_get_theme', '3.2.0');

return wp_get_theme()->Version;
}

/**
* Returns the document title.
*
Expand Down Expand Up @@ -64,113 +78,4 @@ function tarski_doctitle($sep = '·') {
echo $doctitle;
}

/**
* If debug mode is enabled, use uncompressed (development mode) JavaScript.
*
* @since 2.7
* @deprecated 3.1.0
*
* @see TARSKI_DEBUG
* @uses _tarski_compressible_asset_path
*
* @param string $path
* @return string
*/
function tarski_js($path) {
_deprecated_function(__FUNCTION__, '3.1.0');

return tarski_asset_path($path);
}

/**
* If debug mode is enabled, use uncompressed (development mode) CSS.
*
* @since 2.7
* @deprecated 3.1.0
*
* @see TARSKI_DEBUG
* @uses _tarski_compressible_asset_path
*
* @param string $path
* @return string
*/
function tarski_css($path) {
_deprecated_function(__FUNCTION__, '3.1.0');

return tarski_asset_path($path);
}

/**
* Adds JavaScript to the Tarski Options page.
*
* @since 1.4
* @deprecated 3.1.0
*
* @uses get_bloginfo
* @uses wp_enqueue_script
*
* @return void
*/
function tarski_inject_scripts() {
_deprecated_function(__FUNCTION__, '3.1.0');
}

/**
* Returns the number of authors who have published posts.
*
* @since 2.0.3
* @deprecated 3.1.0
*
* @global object $wpdb
* @return integer
*/
function tarski_count_authors() {
_deprecated_function(__FUNCTION__, '3.1.0');

global $wpdb;
return count($wpdb->get_col($wpdb->prepare(
"SELECT post_author, COUNT(DISTINCT post_author)
FROM $wpdb->posts
WHERE post_status = 'publish'
GROUP BY post_author"
), 1));
}

/**
* Determines whether Tarski should show authors.
*
* @since 2.0.3
* @deprecated 3.1.0
*
* @uses tarski_count_authors()
*
* @global object $wpdb
* @return boolean
*/
function tarski_should_show_authors() {
_deprecated_function(__FUNCTION__, '3.1.0');

$show_authors = tarski_count_authors() > 1;
return (bool) apply_filters('tarski_show_authors', $show_authors);
}

/**
* Re-saves Tarski's 'show_authors' option.
*
* If more than one author is detected, it will turn the 'show_authors'
* option on; otherwise it will turn it off.
*
* @since 2.0.3
* @deprecated 3.1.0
*
* @uses tarski_should_show_authors
*/
function tarski_resave_show_authors() {
_deprecated_function(__FUNCTION__, '3.1.0');

if (get_option('tarski_options')) {
update_tarski_option('show_authors', tarski_should_show_authors());
}
}

?>
11 changes: 11 additions & 0 deletions changelog.txt
Expand Up @@ -2,10 +2,21 @@

### Version 3.2.0

* Added option to display featured post images in the header.
* Moved language files to `/languages` directory.
* Added POT file to theme files in `languages` directory.
* Replaced use of deprecated `add_custom_image_header` function.
* Stop defining header image constants.
* Deprecated `tarski_doctitle` in favour of a filter on `wp_title`.
* Updated the author details per Theme Directory requirements.
* Updated theme description to explain more of its advantages.
* Fixed options saving bug so post and page sidebar selection works properly.
* Replaced use of deprecated `get_current_theme` and `get_theme_data`
functions.
* Deprecated `tarski_version` in favour of core `wp_get_theme` function.
* Added white background to main content wrapper.
* Replaced use of deprecated `add_custom_background` function.
* Removed functions deprecated in version 3.1.0.


### Version 3.1.3
Expand Down
56 changes: 34 additions & 22 deletions functions.php
Expand Up @@ -76,27 +76,31 @@
*/

// Localisation
load_theme_textdomain('tarski');

// Custom header image
if (!defined('HEADER_TEXTCOLOR'))
define('HEADER_TEXTCOLOR', '');
if (!defined('HEADER_IMAGE')) // %s is theme directory URI
define('HEADER_IMAGE', '%s/headers/' . get_tarski_option('header'));
if (!defined('HEADER_IMAGE_WIDTH'))
define('HEADER_IMAGE_WIDTH', 720);
if (!defined('HEADER_IMAGE_HEIGHT'))
define('HEADER_IMAGE_HEIGHT', 180);
if (!defined('NO_HEADER_TEXT'))
define('NO_HEADER_TEXT', true);

add_custom_image_header('', 'tarski_admin_header_style');
load_theme_textdomain('tarski', get_template_directory() . '/languages');

// Custom header support
add_theme_support('custom-header', array(
'default-image' => '%s/headers/' . get_tarski_option('header'),
'random-default' => false,
'width' => 720,
'height' => 180,
'flex-height' => false,
'flex-width' => false,
'default-text-color' => '',
'header-text' => false,
'uploads' => true,
'wp-head-callback' => '',
'admin-head-callback' => 'tarski_admin_header_style',
'admin-preview-callback' => ''
));

register_default_headers(_tarski_list_header_images());

// Content width; set this in a plugin or child theme if you want to change
// the width of the theme via a stylesheet.
if (!isset($content_width))
if (!isset($content_width)) {
$content_width = 500;
}

// Main sidebar widgets
register_sidebar(array(
Expand Down Expand Up @@ -149,14 +153,22 @@
register_nav_menu('tarski_navbar', __('Tarski navbar', 'tarski'));

// Custom background support
add_custom_background();
add_theme_support('custom-background');

// Post thumbnails; change these settings via a child theme or plugin
add_theme_support('post-thumbnails');
if (get_tarski_option('featured_header'))
set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
else
set_post_thumbnail_size(150, 150, false);

if (get_tarski_option('featured_header')) {
set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
} else {
set_post_thumbnail_size($content_width, 300, false);
}

// Image size for large feature images, used in the header
add_image_size('large-feature', HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);

// Image size for featured posts if a large-feature doesn't exist
add_image_size('small-feature', $content_width, 300);

// Post types
add_theme_support('post-formats', array('aside'));
Expand Down Expand Up @@ -222,4 +234,4 @@
add_action('th_footer', 'tarski_feedlink');
add_action('th_footer', 'tarski_credits');

?>
?>

0 comments on commit 9b81605

Please sign in to comment.