Changeset 334629
- Timestamp:
- 01/19/2011 03:36:22 PM (15 years ago)
- Location:
- custom-author-byline/trunk
- Files:
-
- 2 edited
-
custom-author-byline.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-author-byline/trunk/custom-author-byline.php
r281129 r334629 3 3 Plugin Name: Custom Author Byline 4 4 Plugin URI: http://seoserpent.com/wordpress/custom-author-byline 5 Version: 1. 05 Version: 1.1 6 6 License: GPL2 7 7 Description: Allows you to add a custom author name to the post/article byline other than the logged in user writing/editing the post … … 22 22 23 23 // Add custom write panel to post editor page (props to Spencer at Function http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/) 24 $ new_meta_boxes =24 $cab_new_meta_boxes = 25 25 array( 26 26 "author" => array( … … 30 30 ); 31 31 32 function new_meta_boxes() {33 global $post, $ new_meta_boxes;32 function cab_new_meta_boxes() { 33 global $post, $cab_new_meta_boxes; 34 34 35 foreach($ new_meta_boxes as $meta_box) {35 foreach($cab_new_meta_boxes as $meta_box) { 36 36 $meta_box_value = get_post_meta($post->ID, $meta_box['name'], true); 37 37 … … 45 45 } 46 46 47 function c reate_meta_box() {47 function cab_create_meta_box() { 48 48 global $theme_name; 49 49 if ( function_exists('add_meta_box') ) { 50 add_meta_box( ' new-meta-boxes', 'Custom Author Byline', 'new_meta_boxes', 'post', 'normal', 'high' );50 add_meta_box( 'cab-new-meta-boxes', 'Custom Author Byline', 'cab_new_meta_boxes', 'post', 'normal', 'high' ); 51 51 } 52 52 } 53 53 54 function save_postdata( $post_id ) {55 global $post, $ new_meta_boxes;54 function cab_save_postdata( $post_id ) { 55 global $post, $cab_new_meta_boxes; 56 56 57 foreach($ new_meta_boxes as $meta_box) {57 foreach($cab_new_meta_boxes as $meta_box) { 58 58 if ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) { 59 59 return $post_id; … … 78 78 } 79 79 } 80 add_action('admin_menu', 'c reate_meta_box');81 add_action('save_post', ' save_postdata');80 add_action('admin_menu', 'cab_create_meta_box'); 81 add_action('save_post', 'cab_save_postdata'); 82 82 83 83 -
custom-author-byline/trunk/readme.txt
r290043 r334629 4 4 Tags: author, byline, custom author, custom author name, custom author byline 5 5 Requires at least: 2.9.2 6 Tested up to: 3.0. 17 Stable tag: 1. 06 Tested up to: 3.0.4 7 Stable tag: 1.1 8 8 9 9 Allows you to add an author name to the byline, other than the actual logged in user, without that custom author having to have a WordPress account. … … 26 26 == Changelog == 27 27 28 = 1.1 = 29 Renamed function(s) to eliminate conflict with some other plugins. 30 28 31 = 1.0 = 29 32 Brand new release. Props to @ron_r for giving me a hand with a filter/function.
Note: See TracChangeset
for help on using the changeset viewer.