Plugin Directory

Changeset 2248445


Ignore:
Timestamp:
02/21/2020 08:37:15 PM (6 years ago)
Author:
raviry
Message:

Anonymous author shown in the dropdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bbp-topic-and-reply-author-override/trunk/bbp-topic-and-reply-author-override.php

    r2248427 r2248445  
    22/**
    33* Plugin Name: bbPress Topic and Reply Author Override
    4 * Version: 1.1
     4* Version: 1.2
    55* Plugin URI:  http://wordpress.org/plugins/bbp-topic-and-reply-author-override
    66* Description: A qucik way to override bbPress topic and reply author
     
    8888        $users = get_users();
    8989        $user_select = '<select id="bbp_author_override_metabox" name="post_author_override" class="">';
     90
     91        if($post_author_override ==0){
     92            $_bbp_anonymous_name = get_post_meta($post->ID, '_bbp_anonymous_name', true);
     93            $user_select .= '<option value="0" selected="selected">Anonymous/Guest'.($_bbp_anonymous_name?' ('.$_bbp_anonymous_name.')':'').'</option>';
     94        }
    9095        //Leave the admin in the list
    9196        foreach($users as $user) {
Note: See TracChangeset for help on using the changeset viewer.