WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Restrict Categories] problem uploading images in posts

[Resolved] [Plugin: Restrict Categories] problem uploading images in posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • mauriciomesquita
    Member

    @mauriciomesquita

    I’m using WordPress 3.0.4 and Restrict Categories 1.6.1

    Plugin Author Matthew Muro
    Participant

    @mmuro

    Thanks for reporting this behavior.

    For a temporary fix until I push out an official update, replace lines 486-490 with the following code:

    /* Only restrict the query for posts_types that aren't attachments */
    		if ( $query->get( 'post_type' ) != 'attachment' ){
    
    			/* Make sure the posts are removed by default or if filter category is ran */
    			if ( ! isset( $_REQUEST['cat']) )
    				$query->set( 'category__in', $cat_list_array );
    			elseif( isset( $_REQUEST['cat'] ) && $_REQUEST['cat'] == '0' )
    				$query->set( 'category__in', $cat_list_array );
    
    		}

    Let me know if that works for you.

    mauriciomesquita
    Member

    @mauriciomesquita

    Now it’s all right! The plugin is very useful
    Congratulations

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Restrict Categories] problem uploading images in posts’ is closed to new replies.