|
// +----------------------------------------------------------------------+
/**
* Layout rendering class.
*
* @category Visualizer
* @package Render
*/
class Visualizer_Render_Layout extends Visualizer_Render {
/**
* Renders template.
*
* @since 1.0.0
*
* @abstract
* @access protected
*/
protected function _toHTML() {
// empty.
}
/**
* Show the layout by delegating the call to the layout-specific method with the params.
*
* @access public
*/
public static function show( $layout ) {
return call_user_func( array( __CLASS__, '_render' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $layout ) ) ) ), func_get_args() );
}
/**
* Show the DB query box.
*
* @access public
*/
public static function _renderDbQuery( $args ) {
$query = $args[1];
?>
' . $header['label'] . '';
}
?>
';
foreach ( $result as $r ) {
echo '' . $r . ' | ';
}
echo '';
}
?>
Visualizer_Plugin::ACTION_JSON_SET_DATA,
'security' => wp_create_nonce( Visualizer_Plugin::ACTION_JSON_SET_DATA . Visualizer_Plugin::VERSION ),
'chart' => $id,
),
admin_url( 'admin-ajax.php' )
);
$url = get_post_meta( $id, Visualizer_Plugin::CF_JSON_URL, true );
$root = get_post_meta( $id, Visualizer_Plugin::CF_JSON_ROOT, true );
$paging = get_post_meta( $id, Visualizer_Plugin::CF_JSON_PAGING, true );
?>
Visualizer_Plugin::ACTION_UPLOAD_DATA,
'nonce' => wp_create_nonce(),
'chart' => $chart_id,
),
admin_url( 'admin-ajax.php' )
);
?>
post_content ) ), $type );
} else {
$headers = array_keys( $data[0] );
}
$classes = implode( ' ', array( 'viz-editor-table', $class ) );
if ( $series ) {
$temp = $series;
$series = array();
foreach ( $temp as $array ) {
$series[ $array['label'] ] = $array['type'];
}
}
if ( ! $echo ) {
ob_start();
}
?>