PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 2.0.5
ShareThis Dashboard for Google Analytics v2.0.5
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / class / Ga_View.php
googleanalytics / class Last commit date
Ga_Admin.php 9 years ago Ga_Autoloader.php 9 years ago Ga_Frontend.php 9 years ago Ga_Helper.php 9 years ago Ga_Hook.php 9 years ago Ga_Stats.php 9 years ago Ga_View.php 9 years ago
Ga_View.php
39 lines
1 <?php
2
3 class Ga_View {
4
5 /**
6 * Name of the view folder.
7 */
8 const PATH = 'view';
9
10 /**
11 * Loads given view file and it's data.
12 * Displays view or returns HTML code.
13 *
14 * @param string $view Filename
15 * @param array $data Data array
16 * @param bool $html Whether to display or return HTML code.
17 *
18 * @return string
19 */
20 public static function load( $view, $data_array = array(), $html = false ) {
21 if ( ! empty( $view ) ) {
22 foreach ( $data_array as $k => $v ) {
23 $$k = $v;
24 }
25 ob_start();
26 include GA_PLUGIN_DIR . "/" . self::PATH . "/" . $view . ".php";
27 if ( $html ) {
28 return ob_get_clean();
29 } else {
30 echo ob_get_clean();
31 }
32 }
33 }
34
35 // private static function buffer($buffer) {
36 // $data = $data_array;
37 // return $buffer;
38 // }
39 }