wp_dashboard_events_news() WordPress Function

The wp_dashboard_events_news() function is used to display the latest news and events from WordPress.org in the WordPress Dashboard. This information is fetched from the WordPress.org news feed.

wp_dashboard_events_news() #

Renders the Events and News dashboard widget.


Source

File: wp-admin/includes/dashboard.php

1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
function wp_dashboard_events_news() {
    wp_print_community_events_markup();
 
    ?>
 
    <div class="wordpress-news hide-if-no-js">
        <?php wp_dashboard_primary(); ?>
    </div>
 
    <p class="community-events-footer">
        <?php
            printf(
                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
                __( 'Meetups' ),
                /* translators: Accessibility text. */
                __( '(opens in a new tab)' )
            );
        ?>
 
        |
 
        <?php
            printf(
                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
                'https://central.wordcamp.org/schedule/',
                __( 'WordCamps' ),
                /* translators: Accessibility text. */
                __( '(opens in a new tab)' )
            );
        ?>
 
        |
 
        <?php
            printf(
                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
                /* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
                esc_url( _x( 'https://wordpress.org/news/', 'Events and News dashboard widget' ) ),
                __( 'News' ),
                /* translators: Accessibility text. */
                __( '(opens in a new tab)' )
            );
        ?>
    </p>
 
    <?php
}


Top ↑

Changelog

Changelog
VersionDescription
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.