| @@ 131-145 (lines=15) @@ | ||
| 128 | <?php  | 
                                |
| 129 | }  | 
                                |
| 130 | ||
| 131 | 	function get_post_by_email_address() { | 
                                |
| 132 | $xml = new Jetpack_IXR_Client( array(  | 
                                |
| 133 | 'user_id' => get_current_user_id(),  | 
                                |
| 134 | ) );  | 
                                |
| 135 | $xml->query( 'jetpack.getPostByEmailAddress' );  | 
                                |
| 136 | ||
| 137 | if ( $xml->isError() )  | 
                                |
| 138 | return NULL;  | 
                                |
| 139 | ||
| 140 | $response = $xml->getResponse();  | 
                                |
| 141 | if ( empty( $response ) )  | 
                                |
| 142 | return NULL;  | 
                                |
| 143 | ||
| 144 | return $response;  | 
                                |
| 145 | }  | 
                                |
| 146 | ||
| 147 | 	function create_post_by_email_address() { | 
                                |
| 148 | self::__process_ajax_proxy_request(  | 
                                |
| @@ 1725-1738 (lines=14) @@ | ||
| 1722 | /**  | 
                                |
| 1723 | * Get the wpcom email of the current|specified connected user.  | 
                                |
| 1724 | */  | 
                                |
| 1725 | 	public static function get_connected_user_email( $user_id = null ) { | 
                                |
| 1726 | 		if ( ! $user_id ) { | 
                                |
| 1727 | $user_id = get_current_user_id();  | 
                                |
| 1728 | }  | 
                                |
| 1729 | ||
| 1730 | $xml = new Jetpack_IXR_Client(  | 
                                |
| 1731 | array(  | 
                                |
| 1732 | 'user_id' => $user_id,  | 
                                |
| 1733 | )  | 
                                |
| 1734 | );  | 
                                |
| 1735 | $xml->query( 'wpcom.getUserEmail' );  | 
                                |
| 1736 | 		if ( ! $xml->isError() ) { | 
                                |
| 1737 | return $xml->getResponse();  | 
                                |
| 1738 | }  | 
                                |
| 1739 | return false;  | 
                                |
| 1740 | }  | 
                                |
| 1741 | ||