WordPress.org

Making WordPress.org

Changeset 6506


Ignore:
Timestamp:
02/01/2018 07:14:50 PM (4 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Show error when venue address can't be geocoded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r6186 r6506  
    10381038                ),
    10391039            ),
     1040
     1041            4 => array(
     1042                'type'   => 'error',
     1043                'notice' => __( 'The physical address could not be geocoded, which prevents the camp from showing up in the Events Widget. Please tweak the address so that Google can parse it.', 'wordcamporg' )
     1044            ),
    10401045        );
     1046
     1047        // Show this error permenantly, not just after updating.
     1048        if ( ! empty( $post->{'Physical Address'} ) && empty( get_post_meta( $post->ID, '_venue_coordinates', true ) ) ) {
     1049            $_REQUEST['wcpt_messages'] = empty( $_REQUEST['wcpt_messages'] ) ? '4' : $_REQUEST['wcpt_messages'] . ',4';
     1050        }
    10411051
    10421052        if ( ! empty( $_REQUEST['wcpt_messages'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.