Plugin Directory

Changeset 334629


Ignore:
Timestamp:
01/19/2011 03:36:22 PM (15 years ago)
Author:
croakingtoad
Message:

renamed a few functions to eliminate plugin conflicts

Location:
custom-author-byline/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-author-byline/trunk/custom-author-byline.php

    r281129 r334629  
    33Plugin Name: Custom Author Byline
    44Plugin URI: http://seoserpent.com/wordpress/custom-author-byline
    5 Version: 1.0
     5Version: 1.1
    66License: GPL2
    77Description: Allows you to add a custom author name to the post/article byline other than the logged in user writing/editing the post
     
    2222
    2323// 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 =
    2525    array(
    2626    "author" => array(
     
    3030    );
    3131
    32 function new_meta_boxes() {
    33     global $post, $new_meta_boxes;
     32function cab_new_meta_boxes() {
     33    global $post, $cab_new_meta_boxes;
    3434
    35     foreach($new_meta_boxes as $meta_box) {
     35    foreach($cab_new_meta_boxes as $meta_box) {
    3636        $meta_box_value = get_post_meta($post->ID, $meta_box['name'], true);
    3737
     
    4545}
    4646
    47 function create_meta_box() {
     47function cab_create_meta_box() {
    4848    global $theme_name;
    4949    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' );
    5151    }
    5252}
    5353
    54 function save_postdata( $post_id ) {
    55     global $post, $new_meta_boxes;
     54function cab_save_postdata( $post_id ) {
     55    global $post, $cab_new_meta_boxes;
    5656
    57     foreach($new_meta_boxes as $meta_box) {
     57    foreach($cab_new_meta_boxes as $meta_box) {
    5858        if ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) {
    5959            return $post_id;
     
    7878    }
    7979}
    80 add_action('admin_menu', 'create_meta_box');
    81 add_action('save_post', 'save_postdata');
     80add_action('admin_menu', 'cab_create_meta_box');
     81add_action('save_post', 'cab_save_postdata');
    8282
    8383
  • custom-author-byline/trunk/readme.txt

    r290043 r334629  
    44Tags: author, byline, custom author, custom author name, custom author byline
    55Requires at least: 2.9.2
    6 Tested up to: 3.0.1
    7 Stable tag: 1.0
     6Tested up to: 3.0.4
     7Stable tag: 1.1
    88
    99Allows 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.
     
    2626== Changelog ==
    2727
     28= 1.1 =
     29Renamed function(s) to eliminate conflict with some other plugins.
     30
    2831= 1.0 =
    2932Brand 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.