Making WordPress.org


Ignore:
Timestamp:
11/15/2018 01:35:26 AM (6 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Create DRY list of venue address post meta fields.

File:
1 edited

Legend:

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

    r7728 r7853  
    263263
    264264        /**
    265          * meta_keys ()
    266          *
    267          * Returns post meta key
     265         * Returns the names and types of post meta fields that have corresponding UI fields.
     266         *
     267         * For keys that don't have UI, see `get_venue_address_meta_keys()` and any similar functions.
    268268         *
    269269         * @param string $meta_group
     
    450450
    451451        /**
     452         * Returns the slugs of the post meta fields for the venue's address.
     453         *
     454         * These aren't included in `meta_keys()` because they have no corresponding UI.
     455         *
     456         * @return array
     457         */
     458        static function get_venue_address_meta_keys() {
     459            return array(
     460                '_venue_coordinates',
     461                '_venue_city',
     462                '_venue_state',
     463                '_venue_country_code',
     464                '_venue_country_name',
     465                '_venue_zip',
     466            );
     467        }
     468
     469        /**
    452470         * Fired during admin_print_styles
    453471         * Adds jQuery UI
Note: See TracChangeset for help on using the changeset viewer.