do_action( ‘activity_box_end’ )

Fires at the end of the ‘At a Glance’ dashboard widget.

Description

Prior to 3.8.0, the widget was named ‘Right Now’.

More Information

This action adds content to the end of At a Glance widget on the Dashboard. Useful for adding your own notices / information.

Source

do_action( 'activity_box_end' );

Changelog

VersionDescription
2.0.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    Add PHP and MySQL versions at the end of glance widget

    public function wpdocsGetPhpMysqlVersion() {
            $php_version = phpversion();
            $sql_info = mysqli_get_server_info( mysqli_connect( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME ) );   
            $remove ='/^5.5.5-/i';
            $sql_version = preg_replace($remove,'',$sql_info);
    
            echo 'PHP version: ' . $php_version . '. ';
            echo 'MySQL version: ' . $sql_version . '.';
    }
    add_action( 'activity_box_end', 'wpdocsGetPhpMysqlVersion' );

You must log in before being able to contribute a note or feedback.