Closed mjaschen closed 5 years ago
Hi @benhuson,
it's some days since I opened this pull request. Did you've find some time to review and give me feedback if it'll be merged or not?
Best regards
Sorry, I haven't. Let me take a quick look now...
All looks good, just a couple of comments I've added above.
If we can make those adjustments I'll be happy to merge for the next release.
Thank you for contributing 😄
Cool, thanks.
I'll make sure these changes are merged into the next release.
@mjaschen While implementing and testing this, it occurred to me that the subtitle can be activated on multiple post types and users may only want the subtitle to appear above the title on some post types.
Rather than providing an admin UI to cater for this, I've tried a version where the the subtitle can be moved for a specific post type via a filter: https://github.com/benhuson/wp-subtitle/tree/feature/field-position
Please download and try the version above, and implement the following filter to move the field. Valid return values are:
before_title
: Before the title fieldafter_title
: After the title field (default)function my_wps_subtitle_field_position( $position, $post_type ) {
if ( 'my_post_type' == $post_type ) {
return 'before_title';
}
return $position;
}
add_filter( 'wps_subtitle_field_position', 'my_wps_subtitle_field_position', 10, 2 );
Ok, works for me! Thanks.
Great. I'll go with that filter in the next release.
We're using WP Subtitle on our site but we're rendering the sub title string before the main title. To minimize confusion we want to have the input fields in the same order as displayed later. This pull request introduces a config option which enables it to move the sub title field above the main title field.
The setting can be found in WordPress' "Writing" settings page.
The German translation was updated with the newly introduced strings.