Making WordPress.org

Changeset 5165


Ignore:
Timestamp:
03/23/2017 12:02:14 AM (8 years ago)
Author:
iandunn
Message:

Central Theme: Update URL for wordcamp post type API endpoint

The v1 endpoint is now deprecated, so everyone should migrate to v2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/template-schedule.php

    r4039 r5165  
    7777                    </li>
    7878                    <li><strong>ICS Calendar</strong> -- Add this URL as a remote calendar in your calendar application to subscribe: <?php echo esc_url( site_url( 'calendar.ics' ) ); ?></li>
    79                     <li><strong>JSON API</strong> -- This can be used by developers of mobile apps, websites, etc: https://central.wordcamp.org/wp-json/posts?type=wordcamp</li>    <?php // URL is hardcoded because the v2 URL for this will probably be different, but back-compat will be maintained ?>
     79                    <li>
     80                        <strong>JSON API</strong> --
     81                        This can be used by developers of mobile apps, websites, etc: <?php echo esc_url( get_rest_url( null, 'wp/v2/wordcamps' ) ); ?>.
     82                        If you'd like to include meetup events too, then you may want to use <a href="https://codex.wordpress.org/WordPress.org_API#Events">api.wordpress.org/events</a> instead.
     83                    </li>
    8084                </ul>
    8185
Note: See TracChangeset for help on using the changeset viewer.