Browse files

Fix notice when using a logo.png in a child theme

PHP notice because of the undefined constant CHILD_THEME_URI. Changed it
to get_stylesheet_directory_uri()

Props Roger on Jayj.dk
  • Loading branch information...
1 parent fb5a2e7 commit 9391c163a972b9c97869cef03ac4372169ed9d76 @jayj committed Jun 10, 2012
Showing with 11 additions and 11 deletions.
  1. +10 −10 inc/theme-options.php
  2. +1 −1 loop-single.php
View
20 inc/theme-options.php
@@ -86,7 +86,7 @@ function japibas_theme_options_add_page() {
* @since Japibas 2.0
*/
function japibas_color_schemes() {
-
+
// Refresh the option on the Theme Options page
if ( is_admin() ) {
global $pagenow;
@@ -108,7 +108,7 @@ function japibas_color_schemes() {
);
// Find color schemes from the colors/ folder
- foreach ( glob( get_template_directory() . '/colors/*.css' ) as $style ) :
+ foreach ( glob( get_template_directory() . '/colors/*.css' ) as $style ) :
// Get info about the color scheme from the header
$data = get_file_data( $style, array( 'name' => 'Name', 'slug' => 'Slug', 'description' => 'Description', 'linkcolor' => 'Link color' ), 'japibas' );
@@ -185,7 +185,7 @@ function japibas_logos() {
);
// Look in each color scheme for a logo.png
- foreach ( glob( get_template_directory() . '/colors/*.css' ) as $style ) {
+ foreach ( glob( get_template_directory() . '/colors/*.css' ) as $style ) {
// Get the color scheme name and slug from the header
$data = get_file_data( $style, array( 'name' => 'Name', 'slug' => 'Slug' ), 'japibas' );
$slug = $data['slug'];
@@ -202,8 +202,8 @@ function japibas_logos() {
// If the user is using a child theme, add the logo.png from that as well
if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/images/logo.png' ) )
$logos['japibas-childtheme-logo'] = array(
- 'url' => CHILD_THEME_URI . '/images/logo.png',
- 'thumbnail_url' => CHILD_THEME_URI . '/images/logo.png',
+ 'url' => get_stylesheet_directory_uri() . '/images/logo.png',
+ 'thumbnail_url' => get_stylesheet_directory_uri() . '/images/logo.png',
'description' => __( 'Logo.png from the Japibas child theme images folder', 'japibas' )
);
@@ -383,7 +383,7 @@ function japibas_theme_options_render_page() { ?>
<label class="description">
<select name="japibas_theme_options[exclude_cats][]" multiple="multiple">
<?php foreach ( get_categories( array( 'hide_empty' => 0 ) ) as $cat ) { ?>
- <?php $selected = ( in_array( $cat->term_id, $options['exclude_cats'] ) ) ? 'selected="selected"' : ''; ?>
+ <?php $selected = ( in_array( $cat->term_id, $options['exclude_cats'] ) ) ? 'selected="selected"' : ''; ?>
<option value="<?php echo intval( $cat->term_id ); ?>" <?php echo $selected; ?>><?php echo $cat->name; ?></option>
<?php } ?>
</select>
@@ -395,9 +395,9 @@ function japibas_theme_options_render_page() { ?>
</tr>
</table>
-
+
<h3><?php _e( 'Slider', 'japibas' ); ?></h3>
-
+
<table class="form-table">
<tr valign="top" class="image-radio-option color-scheme"><th scope="row"><?php _e( 'Slider Category', 'japibas' ); ?></th>
@@ -433,7 +433,7 @@ function japibas_theme_options_render_page() { ?>
</tr>
</table>
-
+
<h3><?php _e( 'Other settings', 'japibas' ); ?></h3>
<table class="form-table">
@@ -596,4 +596,4 @@ function japibas_get_logo( $logo = null ) {
return $logos[ $logo ]['url'];
}
-?>
+?>
View
2 loop-single.php
@@ -7,7 +7,7 @@
<article <?php post_class(); ?>>
<header class="entry-header">
- <h1 class="entry-title"><?php the_title(); ?></h1>
+ <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
<time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" pubdate>

0 comments on commit 9391c16

Please sign in to comment.