[wp-trac] [WordPress Trac] #42442: Install & Preview of themes doesn't work.
WordPress Trac
noreply at wordpress.org
Mon Nov 6 05:33:15 UTC 2017
#42442: Install & Preview of themes doesn't work.
--------------------------+--------------------
Reporter: atachibana | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+--------------------
Comment (by dd32):
Added a patch which fixes the PHP Notice, and shows how that part of the
API is supposed to work. It seems unrelated to the issue at hand though.
Here's that part of the API, easier than explaining it:
{{{
if ( $this->fields['template'] || $this->fields['parent'] ) {
$parent = get_post( $theme->post_parent );
if ( is_a( $parent, 'WP_Post' ) ) {
if ( $this->fields['template'] ) {
$phil->template = $parent->post_name;
}
if ( $this->fields['parent'] ) {
$phil->parent = array(
'slug' => $parent->post_name,
'name' => $parent->post_title,
'homepage' =>
"https://wordpress.org/themes/{$parent->post_name}/",
);
}
}
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42442#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list