Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_dashboard_browser_nag [ WordPress Function ]

wp_dashboard_browser_nag ( No parameters )
Defined at:



No description yet.

Source


<?php
function wp_dashboard_browser_nag() {
    
$notice '';
    
$response wp_check_browser_version();

    if ( 
$response ) {
        if ( 
$response['insecure'] ) {
            
$msg sprintf__"It looks like you're using an insecure version of <a href='%s'>%s</a>. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), esc_attr$response['update_url'] ), esc_html$response['name'] ) );
        } else {
            
$msg sprintf__"It looks like you're using an old version of <a href='%s'>%s</a>. For the best WordPress experience, please update your browser." ), esc_attr$response['update_url'] ), esc_html$response['name'] ) );
        }

        
$browser_nag_class '';
        if ( !empty( 
$response['img_src'] ) ) {
            
$img_src = ( is_ssl() && ! empty( $response['img_src_ssl'] ) )? $response['img_src_ssl'] : $response['img_src'];

            
$notice .= '<div class="alignright browser-icon"><a href="' esc_attr($response['update_url']) . '"><img src="' esc_attr$img_src ) . '" alt="" /></a></div>';
            
$browser_nag_class ' has-browser-icon';
        }
        
$notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";

        
$browsehappy 'http://browsehappy.com/';
        
$locale get_locale();
        if ( 
'en_US' !== $locale )
            
$browsehappy add_query_arg'locale'$locale$browsehappy );

        
$notice .= '<p>' sprintf__'<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>' ), esc_attr$response['update_url'] ), esc_html$response['name'] ), esc_url$browsehappy ) ) . '</p>';
        
$notice .= '<p class="hide-if-no-js"><a href="" class="dismiss">' __'Dismiss' ) . '</a></p>';
        
$notice .= '<div class="clear"></div>';
    }

    echo 
apply_filters'browse-happy-notice'$notice$response );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics