| // +----------------------------------------------------------------------+ /** * 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 ''; } echo ''; } ?>
' . $r . '
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 ); $headers = get_post_meta( $id, Visualizer_Plugin::CF_JSON_HEADERS, true ); if ( empty( $headers['method'] ) ) { $headers['method'] = 'get'; } $methods = apply_filters( 'visualizer_json_request_methods', array( 'GET', 'POST' ) ); ?> 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(); } ?> '; } else { echo ''; } } ?> '; if ( $editable_data ) { echo ''; echo ''; } ?> '; echo ''; $index = 0; if ( empty( $row ) ) { echo ''; continue; } foreach ( array_values( $row ) as $value ) { if ( $editable_data ) { echo ''; } else { echo ''; } } echo ''; } ?>
' . $header . '
' . __( 'Value', 'visualizer' ) . '' . ( is_array( $value ) ? __( 'Invalid Data', 'visualizer' ) : $value ) . '