[pageview url="url" title="title"] Version: 1.6 Author: John Godley Author URI: http://urbangiraffe.com */ class PageView { public function __construct() { add_shortcode( 'pageview', array( &$this, 'shortcode' ) ); } private function render( $url, $title, $desc, $width, $height, $border, $scroll ) { $width = preg_replace( '/[^0-9%px]/', '', $width ); $height = preg_replace( '/[^0-9%px]/', '', $height ); $border = ( $border == 'yes' ) ? 'border: 1px solid #999' : ''; if ( !in_array( $scroll, array( 'auto', 'yes', 'no' ) ) ) $scroll = 'no'; ob_start(); ?>
2 ) $desc = implode( ' ', array_slice( $attrs, 2 ) ); } if ( $url ) return $this->render( $url, $title, $desc, $width, $height, $border, $scrolling ); return ''; } } function register_pageview() { global $pageview; $pageview = new PageView(); } add_action( 'init', 'register_pageview' );