Make WordPress Core

Changeset 10382 for trunk/xmlrpc.php


Ignore:
Timestamp:
01/19/2009 07:22:26 PM (16 years ago)
Author:
ryan
Message:

Provide access to sticky status via XMLRPC. Props josephscott. see #8777

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r10380 r10382  
    22202220        }
    22212221
     2222        // Only posts can be sticky
     2223        if ( $post_type == 'post' && isset( $content_struct['sticky'] ) )
     2224            if ( $content_struct['sticky'] == true )
     2225                stick_post( $post_ID );
     2226            elseif ( $content_struct['sticky'] == false )
     2227                unstick_post( $post_ID );
     2228
    22222229        if ( isset($content_struct['custom_fields']) ) {
    22232230            $this->set_custom_fields($post_ID, $content_struct['custom_fields']);
     
    25032510        }
    25042511
     2512        // Only posts can be sticky
     2513        if ( $post_type == 'post' && isset( $content_struct['sticky'] ) )
     2514            if ( $content_struct['sticky'] == true )
     2515                stick_post( $post_ID );
     2516            elseif ( $content_struct['sticky'] == false )
     2517                unstick_post( $post_ID );
     2518
    25052519        if ( isset($content_struct['custom_fields']) ) {
    25062520            $this->set_custom_fields($post_ID, $content_struct['custom_fields']);
     
    25802594                $postdata['post_status'] = 'publish';
    25812595            }
     2596
     2597            $sticky = false;
     2598            if ( is_sticky( $post_ID ) )
     2599                $sticky = true;
    25822600
    25832601            $enclosure = array();
     
    26162634                'date_created_gmt' => new IXR_Date($post_date_gmt),
    26172635                'post_status' => $postdata['post_status'],
    2618                 'custom_fields' => $this->get_custom_fields($post_ID)
     2636                'custom_fields' => $this->get_custom_fields($post_ID),
     2637                'sticky' => $sticky
    26192638            );
    26202639
Note: See TracChangeset for help on using the changeset viewer.