mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Remove WP_Theme::is_child_theme() in favor of WP_Theme::parent(). see #20546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
efcaf98c41
commit
1e500bd76a
@ -213,7 +213,7 @@ else : ?>
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?php if ( is_child_theme() && ! $theme->is_child_theme() && $theme->get_template() == get_template() ) : ?>
|
<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
|
||||||
<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
|
<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
|
||||||
<?php _e( 'This is a file in your current parent theme.' ); ?></p>
|
<?php _e( 'This is a file in your current parent theme.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -744,18 +744,6 @@ final class WP_Theme implements ArrayAccess {
|
|||||||
return $this->template;
|
return $this->template;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether a theme is a child theme.
|
|
||||||
*
|
|
||||||
* @since 3.4.0
|
|
||||||
* @access public
|
|
||||||
*
|
|
||||||
* @return bool True if a theme is a child theme, false otherwise.
|
|
||||||
*/
|
|
||||||
public function is_child_theme() {
|
|
||||||
return $this->template !== $this->stylesheet;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the absolute path to the directory of a theme's "stylesheet" files.
|
* Returns the absolute path to the directory of a theme's "stylesheet" files.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user