WP Subtitle - Version 2.3.2

Version Description

  • Show subtitle admin field when adding new post. Props Gabriel Doty.
Download this release

Release Info

Developer husobj
Plugin Icon 128x128 WP Subtitle
Version 2.3.2
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.2

Files changed (3) hide show
  1. admin/admin.php +12 -1
  2. readme.txt +7 -4
  3. wp-subtitle.php +1 -1
admin/admin.php CHANGED
@@ -32,7 +32,18 @@ class WPSubtitle_Admin {
32
  */
33
  static function _admin_init() {
34
 
35
- $post_type = isset( $_GET['post'] ) ? get_post_type( $_GET['post'] ) : '';
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  // Setup Field / Meta Box
38
  if ( WPSubtitle::is_supported_post_type( $post_type ) ) {
32
  */
33
  static function _admin_init() {
34
 
35
+ global $pagenow;
36
+
37
+ // Get post type
38
+ $post_type = '';
39
+
40
+ if ( isset( $_GET['post_type'] ) ) {
41
+ $post_type = $_GET['post_type'];
42
+ } elseif ( isset( $_GET['post'] ) ) {
43
+ $post_type = get_post_type( $_GET['post'] );
44
+ } elseif ( $pagenow == 'post-new.php' ) {
45
+ $post_type = 'post';
46
+ }
47
 
48
  // Setup Field / Meta Box
49
  if ( WPSubtitle::is_supported_post_type( $post_type ) ) {
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WP Subtitle ===
2
- Contributors: husani, husobj
3
  Tags: subtitle, content, title, subheading, subhead, alternate title
4
- Requires at least: 3.0
5
- Tested up to: 4.0
6
- Stable tag: 2.3.1
7
  License: GPL2
8
 
9
  Add subtitles (subheadings) to your pages, posts or custom post types.
@@ -98,6 +98,9 @@ The plugin is [hosted on GitHub](https://github.com/benhuson/wp-subtitle) and pu
98
 
99
  == Changelog ==
100
 
 
 
 
101
  = 2.3.1 =
102
  * Security Update: Ensure subtitles are sanitized when saving.
103
 
1
  === WP Subtitle ===
2
+ Contributors: husobj, husani
3
  Tags: subtitle, content, title, subheading, subhead, alternate title
4
+ Requires at least: 3.7
5
+ Tested up to: 4.1
6
+ Stable tag: 2.3.2
7
  License: GPL2
8
 
9
  Add subtitles (subheadings) to your pages, posts or custom post types.
98
 
99
  == Changelog ==
100
 
101
+ = 2.3.2 =
102
+ * Show subtitle admin field when adding new post. Props Gabriel Doty.
103
+
104
  = 2.3.1 =
105
  * Security Update: Ensure subtitles are sanitized when saving.
106
 
wp-subtitle.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wordpress.org/plugins/wp-subtitle/
6
  Description: Adds a subtitle field to pages and posts. Possible to add support for custom post types.
7
  Author: Husani Oakley, Ben Huson
8
  Author URI: https://github.com/benhuson/wp-subtitle
9
- Version: 2.3.1
10
  License: GPLv2
11
  */
12
 
6
  Description: Adds a subtitle field to pages and posts. Possible to add support for custom post types.
7
  Author: Husani Oakley, Ben Huson
8
  Author URI: https://github.com/benhuson/wp-subtitle
9
+ Version: 2.3.2
10
  License: GPLv2
11
  */
12