Skip to content

Commit

Permalink
Coding Standards
Browse files Browse the repository at this point in the history
  • Loading branch information
rinatkhaziev committed Jul 6, 2013
1 parent 41ccc4b commit 798e5db
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions frontend-uploader.php
Expand Up @@ -300,7 +300,7 @@ function _upload_post() {
$users = get_users( array(
'search' => $author,
'fields' => 'ID'
) );
) );

if ( isset( $users[0] ) ) {
$post_array['post_author'] = (int) $users[0];
Expand Down Expand Up @@ -437,7 +437,7 @@ function _handle_result( $result = array() ) {
}

$query_args['errors'] = join( ';', $errors_formatted );
}
}

wp_safe_redirect( add_query_arg( array( $query_args ) , $url ) );
}
Expand Down Expand Up @@ -740,17 +740,17 @@ function upload_form( $atts, $content = null ) {
echo do_shortcode ( '[input type="text" context="title" name="post_title" id="ug_post_title" description="' . __( 'Title', 'frontend-uploader' ) . '" class="required"]' );

// Display default form fields
switch( $form_layout ) {
case 'post_image':
case 'post_media':
case 'image':
case 'media':
echo do_shortcode( '[textarea name="post_content" context="content" class="textarea" id="ug_content" class="required" description="'. __( 'Post content or file description', 'frontend-uploader' ) .'"]
switch ( $form_layout ) {
case 'post_image':
case 'post_media':
case 'image':
case 'media':
echo do_shortcode( '[textarea name="post_content" context="content" class="textarea" id="ug_content" class="required" description="'. __( 'Post content or file description', 'frontend-uploader' ) .'"]
[input type="file" name="files" id="ug_photo" description="'. $file_desc .'" multiple=""]
' );
break;
case 'post':
echo do_shortcode( '[textarea name="post_content" context="content" class="textarea" id="ug_content" class="required" description="'. __( 'Post content', 'frontend-uploader' ) .'"]' );
case 'post':
echo do_shortcode( '[textarea name="post_content" context="content" class="textarea" id="ug_content" class="required" description="'. __( 'Post content', 'frontend-uploader' ) .'"]' );
break;
break;
}
Expand Down Expand Up @@ -888,7 +888,7 @@ function _display_errors( $errors ) {
if ( isset( $map[ $error_type[0] ]['format'] ) )
$message = vsprintf( $map[ $error_type[0] ]['format'], $details );
else
$message = $map[ $error_type[0] ]['text'];
$message = $map[ $error_type[0] ]['text'];
}
$output .= $this->_notice_html( $message, 'failure' );
}
Expand Down

0 comments on commit 798e5db

Please sign in to comment.