Plugin Directory

Changeset 607624


Ignore:
Timestamp:
10/03/2012 07:46:42 PM (13 years ago)
Author:
jascott
Message:

kickpress_api::get_custom_field_values() must return values for even hidden fields

Location:
kickpress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kickpress/trunk/kickpress-api.php

    r606992 r607624  
    805805    }
    806806
    807     /* Used exclusively for exporting purposes */
     807    /* Used exclusively for exporting purposes - NOT TRUE */
    808808    public function get_custom_field_values( $post_id, $merge = true ) {
    809809        $skip_post_vars = array('ID','post_author','post_date','post_date_gmt','post_content','post_title','post_category','post_excerpt','post_status','comment_status','ping_status','post_password','post_name','to_ping','pinged','post_modified','post_modified_gmt','post_content_filtered','post_parent','guid','menu_order','post_type','post_mime_type','comment_count','tags_input','categories_input','_thumbnail_id');
     
    811811
    812812        foreach ( $this->get_custom_fields( $merge ) as $key => $field ) {
    813             if ( empty( $field[ 'name' ] ) ||
    814                 ( isset( $field[ 'exportable' ] ) && ! $field[ 'exportable' ] ) ||
    815                 in_array( $field[ 'name' ], $skip_post_vars ) ) {
     813            if ( empty( $field[ 'name' ] ) || in_array( $field[ 'name' ], $skip_post_vars ) ) {
     814                //( isset( $field[ 'exportable' ] ) && ! $field[ 'exportable' ] ) ) {
    816815                continue;
    817816            }
  • kickpress/trunk/kickpress-oauth.php

    r606948 r607624  
    340340        if ( is_wp_error( $consumer ) ) {
    341341            die( self::normalize_params( array(
    342                 'oauth_error' => $consumer->get_error_message( 'oauth_error' )
     342                'oauth_error'             => $consumer->get_error_code(),
     343                'oauth_error_description' => $consumer->get_error_message()
    343344            ) ) );
    344345        } else {
     
    376377       
    377378        if ( is_wp_error( $consumer ) ) {
    378             die( http_build_query( array(
    379                 'oauth_error' => $consumer->get_error_message( 'oauth_error' )
     379            die( self::normalize_params( array(
     380                'oauth_error'             => $consumer->get_error_code(),
     381                'oauth_error_description' => $consumer->get_error_message()
    380382            ) ) );
    381383        } else {
     
    410412                } else {
    411413                    die( self::normalize_params( array(
    412                         'oauth_error' => 'Failed to validate oauth consumer key'
     414                        'oauth_error' => 'invalid_client'
    413415                    ) ) );
    414416                }
    415417            } else {
    416418                die( self::normalize_params( array(
    417                     'oauth_error' => 'Failed to validate oauth token'
     419                    'oauth_error' => 'invalid_request'
    418420                ) ) );
    419421            }
     
    577579                                $consumer->set_verifier( $verifier );
    578580                            } else {
    579                                 return new WP_Error( 'oauth_error',
     581                                return new WP_Error( 'invalid_request',
    580582                                    'Failed to verify oauth request' );
    581583                            }
     
    601603                        $consumer->set_token( $token, $token_secret );
    602604                    } else {
    603                         /* return new WP_Error( 'oauth_error',
    604                             'Failed to validate oauth token' ); */
     605                        return new WP_Error( 'invalid_request',
     606                            'Failed to validate oauth token' );
    605607                    }
    606608                }
     
    617619                            $consumer->set_callback( $oauth_callback );
    618620                        } else {
    619                             return new WP_Error( 'oauth_error',
     621                            return new WP_Error( 'callback_uri_mismatch',
    620622                                'Failed to validate oauth callback' );
    621623                        }
     
    624626                    return $consumer;
    625627                } else {
    626                     return new WP_Error( 'oauth_error',
     628                    return new WP_Error( 'invalid_client',
    627629                        'Failed to validate oauth signature and token' );
    628630                }
    629631            } else {
    630                 return new WP_Error( 'oauth_error',
     632                return new WP_Error( 'invalid_client',
    631633                    'Failed to validate oauth signature' );
    632634            }
    633635        } else {
    634             return new WP_Error( 'oauth_error',
     636            return new WP_Error( 'invalid_request',
    635637                'Failed to validate oauth signature' );
    636638        }
  • kickpress/trunk/kickpress-redirects.php

    r606948 r607624  
    250250                $kickpress_api->params['view_alias'] = $first_param;
    251251                $kickpress_api->params['format'] = $format;
     252
     253                if ( ! empty( $other_params ) )
     254                    $kickpress_api->params['extra'] = $other_params;
    252255            }
    253256
Note: See TracChangeset for help on using the changeset viewer.