Welcome, visitor! Log in
 

Source View: browse-happy-notice

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1188                $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr( $img_src ) . '" alt="" /></a></div>';
1189                $browser_nag_class = ' has-browser-icon';
1190           }
1191           $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
1192           $notice .= sprintf( __( '<p><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></p>' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), 'http://browsehappy.com/' );
1193           $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss">' . __( 'Dismiss' ) . '</a></p>';
1194           $notice .= '<div class="clear"></div>';
1195      }
1196
1197      echo apply_filters( 'browse-happy-notice', $notice, $response );
1198 }
1199
1200 function dashboard_browser_nag_class( $classes ) {
1201      $response = wp_check_browser_version();
1202
1203      if ( $response && $response['insecure'] )
1204           $classes[] = 'browser-insecure';
1205
1206      return $classes;