stats_convert_chart_urls

Stats Convert Chart URLs.

Description

stats_convert_chart_urls( $html ); 

Parameters (1)

0. $html
The html.

Usage

  1. if ( !function_exists( 'stats_convert_chart_urls' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/stats.php'; 
  3.  
  4. // The html. 
  5. $html = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = stats_convert_chart_urls($html); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/stats.php  
  1. function stats_convert_chart_urls( $html ) { 
  2. $html = preg_replace_callback( '|https?://[-.a-z0-9]+/wp-includes/charts/([-.a-z0-9]+).php(\??)|',  
  3. create_function( 
  4. '$matches',  
  5. // If there is a query string, change the beginning '?' to a '&' so it fits into the middle of this query string 
  6. 'return "admin.php?page=stats&noheader&chart=" . $matches[1] . str_replace( "?", "&", $matches[2] );' 
  7. ),  
  8. $html ); 
  9. return $html;