Skip to content
This repository
  • 9 commits
  • 2 files changed
  • 0 comments
  • 3 contributors
Dec 11, 2012
Alex King Merge branch 'release/1.1' into develop 722d699
Dec 18, 2012
Paul Fix Display On Pages
added an additional add_action on line 81 as the edit_form_advanced doesn't seem to work on pages.  The admin now displays and functions on 'pages' when post formats are enabled for pages as well.
97396bd
Dec 31, 2012
Paul Change Action for setup to edit_form_after_title
This seems to do the trick in terms of having the admin UI work on posts, pages and custom post types correctly.
01434d3
Alex King Merge pull request #33 from Pushplaybang/develop
Fix Display On Pages
06c69ad
Aug 30, 2013
Jared Cornwall Only run cfpf_format_auto_title_post() if the post title does not alr…
…eady exist. This keep the title from being overwritten.
2b8fa34
Jared Cornwall Only run cfpf_format_auto_title_post() if the post title does not alr…
…eady exist, with empty check this time.
c7bf9d1
Nov 13, 2013
Alex King Merge pull request #41 from jaredkc/develop
Only run cfpf_format_auto_title_post() if the post title does not alread... Thanks!
b0b0a1f
Alex King bump version, update changelog dffac39
Alex King Merge branch 'release/1.2' c08a6da
4  CHANGELOG.txt
... ...
@@ -1,5 +1,9 @@
1 1
 # CF Post Formats
2 2
 
  3
+## Version 1.2
  4
+
  5
+- (fix) Don't auto-set the post title for status posts if a title already exists
  6
+
3 7
 ## Version 1.1
4 8
 
5 9
 - WordPress 3.5 compatibility
25  cf-post-formats.php
@@ -3,13 +3,13 @@
3 3
 Plugin Name: CF Post Formats
4 4
 Plugin URI: http://crowdfavorite.com
5 5
 Description: Custom post format admin UI
6  
-Version: 1.1
  6
+Version: 1.2
7 7
 Author: crowdfavorite
8  
-Author URI: http://crowdfavorite.com 
  8
+Author URI: http://crowdfavorite.com
9 9
 */
10 10
 
11 11
 /**
12  
- * Copyright (c) 2011-2012 Crowd Favorite, Ltd. All rights reserved.
  12
+ * Copyright (c) 2011-2013 Crowd Favorite, Ltd. All rights reserved.
13 13
  *
14 14
  * Released under the GPL license
15 15
  * http://www.opensource.org/licenses/gpl-license.php
@@ -22,7 +22,7 @@
22 22
  * it under the terms of the GNU General Public License as published by
23 23
  * the Free Software Foundation; either version 2 of the License, or
24 24
  * (at your option) any later version.
25  
- * 
  25
+ *
26 26
  * This program is distributed in the hope that it will be useful,
27 27
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 28
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -32,7 +32,7 @@
32 32
 
33 33
 if (!defined('CFPF_VERSION')) {
34 34
 
35  
-define('CFPF_VERSION', '1.1');
  35
+define('CFPF_VERSION', '1.2');
36 36
 
37 37
 function cfpf_base_url() {
38 38
 	return trailingslashit(apply_filters('cfpf_base_url', plugins_url('', __FILE__)));
@@ -69,15 +69,15 @@ function cfpf_add_meta_boxes($post_type) {
69 69
 		wp_enqueue_style('cf-post-formats', cfpf_base_url().'css/admin.css', array(), CFPF_VERSION, 'screen');
70 70
 
71 71
 		wp_localize_script(
72  
-			'cf-post-formats', 
73  
-			'cfpf_post_format', 
  72
+			'cf-post-formats',
  73
+			'cfpf_post_format',
74 74
 			array(
75 75
 				'loading' => __('Loading...', 'cf-post-formats'),
76 76
 				'wpspin_light' => admin_url('images/wpspin_light.gif')
77 77
 			)
78 78
 		);
79  
-		
80  
-		add_action('edit_form_advanced', 'cfpf_post_admin_setup');
  79
+
  80
+		add_action('edit_form_after_title', 'cfpf_post_admin_setup');
81 81
 	}
82 82
 }
83 83
 add_action('add_meta_boxes', 'cfpf_add_meta_boxes');
@@ -94,7 +94,7 @@ function cfpf_post_admin_setup() {
94 94
 		global $post;
95 95
 		$current_post_format = get_post_format($post->ID);
96 96
 
97  
-		// support the possibility of people having hacked in custom 
  97
+		// support the possibility of people having hacked in custom
98 98
 		// post-formats or that this theme doesn't natively support
99 99
 		// the post-format in the current post - a tab will be added
100 100
 		// for this format but the default WP post UI will be shown ~sp
@@ -129,6 +129,11 @@ function cfpf_format_link_save_post($post_id) {
129 129
 // action added in cfpf_admin_init()
130 130
 
131 131
 function cfpf_format_auto_title_post($post_id, $post) {
  132
+	// get out early if a title is already set
  133
+	if (!empty($post->post_title)) {
  134
+		return;
  135
+	}
  136
+
132 137
 	remove_action('save_post', 'cfpf_format_status_save_post', 10, 2);
133 138
 	remove_action('save_post', 'cfpf_format_quote_save_post', 10, 2);
134 139
 

No commit comments for this range

Something went wrong with that request. Please try again.