[wp-meta] [Making WordPress.org] #2358: Make P2s: allow authors with existing moderated comments to upload files

Making WordPress.org noreply at wordpress.org
Tue Jan 10 09:47:46 UTC 2017


#2358: Make P2s: allow authors with existing moderated comments to upload files
--------------------------------------+------------------
 Reporter:  lancewillett              |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:
Component:  Make (Get Involved) / P2  |  Resolution:
 Keywords:  needs-patch               |
--------------------------------------+------------------
Changes (by ocean90):

 * keywords:  2nd-opinion => needs-patch


Comment:

 I've fixed displaying images in [dotorg12682]. Uploads were disabled in
 [3677] and [dotorg12181] by @jmdodd:

 {{{#!php
 <?php
 // Don't allow uploads unless user can upload_files
 function restrict_o2_uploads( $args = array() ) {
         if ( ! current_user_can( 'upload_files' ) ) {
                 return array( 'post', 'comment' );
         } else {
                 return $args;
         }
 }
 add_filter( 'o2_supported_message_types', 'restrict_o2_uploads' );
 }}}

 I guess someone can make a plugin to improve this restriction based on
 other factors, like existing comments.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2358#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list