wp_add_dashboard_widget example

/* Register Widgets and Controls */
    $wp_dashboard_control_callbacks = array();

    // Browser version     $check_browser = wp_check_browser_version();

    if ( $check_browser && $check_browser['upgrade'] ) {
        add_filter( 'postbox_classes_dashboard_dashboard_browser_nag', 'dashboard_browser_nag_class' );

        if ( $check_browser['insecure'] ) {
            wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'You are using an insecure browser!' ), 'wp_dashboard_browser_nag' );
        } else {
            wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'Your browser is out of date!' ), 'wp_dashboard_browser_nag' );
        }
    }

    // PHP Version.     $check_php = wp_check_php_version();

    if ( $check_php && current_user_can( 'update_php' ) ) {
        // If "not acceptable" the widget will be shown.         if ( isset( $check_php['is_acceptable'] ) && ! $check_php['is_acceptable'] ) {
            
Home | Imprint | This part of the site doesn't use cookies.