Plugin Directory

Changeset 762579

Timestamp:
08/26/2013 07:58:40 PM (13 years ago)
Author:
tmoorewp
Message:

Subscriptions: Send the remote user address with the subscription request for spam checking. Also kill the extract.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/subscriptions.php

    r762565 r762579  
    283283     *  unknown_status  : strange error.  Jetpack servers at WordPress.com returned something I didn't understand.
    284284     */
    285     function subscribe( $email, $post_ids = 0, $async = true ) {
     285    function subscribe( $email, $post_ids = 0, $async = true ) {
    286286        if ( !is_email( $email ) ) {
    287287            return new Jetpack_Error( 'invalid_email' );
     
    302302
    303303            if ( $async ) {
    304                 Jetpack::xmlrpc_async_call( 'jetpack.subscribeToSite', $email, $post_id );
     304                Jetpack::xmlrpc_async_call( 'jetpack.subscribeToSite', $email, $post_id );
    305305            } else {
    306                 $xml->addCall( 'jetpack.subscribeToSite', $email, $post_id );
     306                $xml->addCall( 'jetpack.subscribeToSite', $email, $post_id );
    307307            }
    308308        }
     
    386386        }
    387387
    388         $subscribe = Jetpack_Subscriptions::subscribe( $_REQUEST['email'], 0, false );
     388        $subscribe = Jetpack_Subscriptions::subscribe( $_REQUEST['email'], 0, false );
    389389
    390390        if ( is_wp_error( $subscribe ) ) {
     
    530530        global $current_user;
    531531
    532         $source = 'widget';
    533 
    534         extract( $args );
    535 
     532        $source                 = 'widget';
    536533        $instance               = wp_parse_args( (array) $instance, $this->defaults() );
    537534        $title                  = isset( $instance['title'] )               ? stripslashes( $instance['title'] )               : '';
     
    596593                <input type="hidden" name="sub-type" value="<?php echo esc_attr( $source ); ?>" />
    597594                <input type="hidden" name="redirect_fragment" value="<?php echo esc_attr( $widget_id ); ?>" />
    598                 <?php
     595                <?php
    599596                    if ( is_user_logged_in() ) {
    600                         wp_nonce_field( 'blogsub_subscribe_'. get_current_blog_id(), '_wpnonce', false );
     597                        wp_nonce_field( 'blogsub_subscribe_'. get_current_blog_id(), '_wpnonce', false );
    601598                    }
    602599                ?>
Note: See TracChangeset for help on using the changeset viewer.