Add the author to the quick edit dropdown author list if they currently lack the ability to edit so as to avoid stealing their post away from them. fixes #10967
git-svn-id: http://svn.automattic.com/wordpress/trunk@12046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
57b5a0cc30
commit
169c14b225
|
@ -126,6 +126,11 @@ inlineEditPost = {
|
|||
|
||||
// populate the data
|
||||
rowData = $('#inline_'+id);
|
||||
if ( !$(':input[name="post_author"] option[value=' + $('.post_author', rowData).text() + ']', editRow).val() ) {
|
||||
// author no longer has edit caps, so we need to add them to the list of authors
|
||||
$(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>');
|
||||
}
|
||||
|
||||
for ( f = 0; f < fields.length; f++ ) {
|
||||
$(':input[name="'+fields[f]+'"]', editRow).val( $('.'+fields[f], rowData).text() );
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -335,7 +335,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' );
|
||||
$scripts->add_data( 'theme-preview', 'group', 1 );
|
||||
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20090725' );
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20091016' );
|
||||
$scripts->add_data( 'inline-edit-post', 'group', 1 );
|
||||
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.'),
|
||||
|
|
Loading…
Reference in New Issue