Making WordPress.org

Changeset 1904


Ignore:
Timestamp:
09/21/2015 10:29:37 PM (10 years ago)
Author:
coffee2code
Message:

jobs.wordpress.net: Show all job poster email addresses in job admin list table.

List public howtoapply email address (when applicable) alongside private contact email address in admin list table for jobs. When emailed by job poster, this makes it easier to scan and find their associated job.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/jobs.wordpress.net/public_html/wp-content/plugins/jobswp/jobswp.php

    r1655 r1904  
    196196                if ( empty( $name ) )
    197197                    $name = get_post_meta( $post_id, 'post_name', true );
    198                 echo esc_attr( $name );
     198                echo esc_html( $name );
    199199                break;
    200200            case 'poster_email':
    201                 echo esc_attr( get_post_meta( $post_id, 'email', true ) );
     201                $email = get_post_meta( $post_id, 'email', true );
     202
     203                echo esc_html( $email );
     204
     205                // Also show the public howtoapply email address.
     206                if ( 'email' === get_post_meta( $post_id, 'howtoapply_method', true ) ) {
     207                    $contact_email = get_post_meta( $post_id, 'howtoapply', true );
     208                    if ( strtolower( $contact_email ) !== strtolower( $email ) ) {
     209                        echo '<br />';
     210                        echo esc_html( $contact_email );
     211                    }
     212                }
    202213                break;
    203214        }
Note: See TracChangeset for help on using the changeset viewer.