WordPress.org

Plugin Directory

Changeset 623875


Ignore:
Timestamp:
11/12/12 04:25:59 (18 months ago)
Author:
mdawaffe
Message:

Contact Form: If the contact form is in a widget, send the site's home_url() in the notification email.

Previously, we were (usually) sending the URL of the last post in the loop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/contact-form/grunion-contact-form.php

    r622277 r623875  
    991991        $message .= __( 'Time:', 'jetpack' ) . ' ' . $time . "\n"; 
    992992        $message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . "\n"; 
    993         $message .= __( 'Contact Form URL:', 'jetpack' ) . ' ' . get_permalink( $post->ID ) . "\n"; 
    994  
     993 
     994        if ( $widget ) { 
     995            $url = home_url( '/' ); 
     996        } else { 
     997            $url = get_permalink( $post->ID ); 
     998        } 
     999 
     1000        $message .= __( 'Contact Form URL:', 'jetpack' ) . " $url\n"; 
    9951001 
    9961002        if ( is_user_logged_in() ) { 
Note: See TracChangeset for help on using the changeset viewer.