Changeset 760469
- Timestamp:
- 08/22/2013 02:55:27 AM (13 years ago)
- Location:
- exxmlrpc/tags/0.2.0.8
- Files:
-
- 2 edited
-
Readme.txt (modified) (1 diff)
-
exxmlrpc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
exxmlrpc/tags/0.2.0.8/Readme.txt
r748678 r760469 52 52 * first releace version. 53 53 54 = 0.2.0.8 = 55 Fix the search function of past articles. 56 57 54 58 == Upgrade Notice == 55 59 -
exxmlrpc/tags/0.2.0.8/exxmlrpc.php
r738064 r760469 2 2 /* 3 3 Plugin Name: ExXmlRpc for WordPressPost 4 Version: 0.2.0. 74 Version: 0.2.0.8 5 5 Plugin URI:http://wpp.nethmk.com/plugin/ExXmlRpcForWPP/ExXmlRpc.zip 6 6 Description:ExXmlRpc(WordPressPost) is a plugin to post to WordPress from WordPressPost. … … 39 39 $this->methods['wpex.findRecentPostTitles'] = 'this:wpex_findRecentPostTitles'; 40 40 $this->methods['wpex.replaceString'] = 'this:wpex_replaceString'; 41 $this->methods['wpex.getPages'] = 'this:wpex_getPages'; 41 42 } 42 43 … … 560 561 561 562 if ( $postdate <> '' ){ 562 $postedDate = date('Ymd',strtotime($entry['post_date_gmt'])); 563 /* $postedDate = date('Ymd',strtotime($entry['post_date_gmt'])); */ 564 $postedDate = date('Ymd',strtotime($entry['post_date'])); 563 565 if ( stristr($postedDate , $postdate) == false ){ 564 566 $findPost = false; … … 759 761 } 760 762 763 /* ------------------------------------------------------------------------- */ 764 /* Get Pages */ 765 /* ------------------------------------------------------------------------- */ 766 function wpex_getPages($args) { 767 768 $this->escape($args); 769 770 $blog_id = (int) $args[0]; 771 $username = $args[1]; 772 $password = $args[2]; 773 $num_pages = isset($args[3]) ? (int) $args[3] : 10; 774 775 if ( !$user = $this->login($username, $password) ) 776 return $this->error; 777 778 if ( !current_user_can( 'edit_pages' ) ) 779 return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) ); 780 781 do_action('xmlrpc_call', 'wp.getPages'); 782 783 $pages = get_posts( array('post_type' => 'page', 'post_status' => 'any', 'numberposts' => $num_pages) ); 784 $num_pages = count($pages); 785 786 // If we have pages, put together their info. 787 if ( $num_pages >= 1 ) { 788 $pages_struct = array(); 789 790 foreach ($pages as $page) { 791 if ( current_user_can( 'edit_page', $page->ID ) ) 792 793 $post_date = mysql2date('Ymd\TH:i:s', $page['post_date'], false); 794 $pages_struct[] = array( 795 'dateCreated' => new IXR_Date($post_date), 796 'title' => $page->post_title, 797 'userid' => $page->post_author, 798 'page_id' => $page->ID, 799 'page_status' => $page->post_status 800 ); 801 802 } 803 804 return($pages_struct); 805 } 806 // If no pages were found return an error. 807 else { 808 return(array()); 809 } 810 } 811 761 812 } 762 813 763 764 814 ?>
Note: See TracChangeset
for help on using the changeset viewer.