WordPress.org

Ready to get started?Download WordPress

Forums

Media Author
[resolved] Small bug prevents display of other users in media upload popup (3 posts)

  1. Ov3rfly
    Member
    Posted 1 year ago #

    A small bug prevents display of other users (which do not own the media) in media upload popup, plugin 1.0.1, WordPress 3.4.2

    For the current user a " selected='selected'" attribute is added, for the other users a wrong "/" is added (an empty string "" should be added) which leads to display problems in browsers as e.g. Firefox 15 regards the option tag as closed and adds the displayname after the tag which makes it invisible in the popup.

    Wrong code: <option value="2"/>Display Name</option>

    foreach ($user_list as $user) {
    	$html .= "<option value='".$user->user_id."'".(($author_id == $user->user_id)? " selected='selected'" : "/").">".$user->display_name."</option>";
    }

    Corrected code: <option value="2">Display Name</option>

    foreach ($user_list as $user) {
    	$html .= "<option value='".$user->user_id."'".(($author_id == $user->user_id)? " selected='selected'" : "").">".$user->display_name."</option>";
    }

    An easy fix, in line 69 replace the "/" with ""

    Besides that, the plugin works fine.

    http://wordpress.org/extend/plugins/media-author/

  2. John Luetke
    Member
    Plugin Author

    Posted 1 year ago #

    This has been fixed in version 1.0.2. Thanks for finding it!

  3. Ov3rfly
    Member
    Posted 1 year ago #

    Thanks for quick feedback and fix. Works as expected now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.