#mt-debug-bar .mt-debug-bar-title { margin-bottom: 1em; } #mt-debug-bar .mt-debug-bar-context-table { width: 100%; font-size: 120%; } #mt-debug-bar .mt-debug-bar-context-table td { padding: .5em .5em .5em 1em; border: black solid 1px; } #mt-debug-bar .mt-debug-bar-context-table th { padding: 1em; border: black solid 1px; } '; $html .= '
'; $html .= '

' . esc_html__( 'The Events Calendar Context', 'tribe-common' ) . '

'; $html .= '
'; $html .= '

' . esc_html__( 'PHP Render Context', 'tribe-common' ) . '

'; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $locations = tribe_context()->get_locations(); $context = tribe_context()->to_array(); $orm_args = tribe_context()->get_orm_args(); foreach ( $locations as $key => $rw_data ) { $orm_arg_key = Arr::get( $locations, [ $key, 'orm_arg' ], $key ); $orm_arg_value = Arr::get( $orm_args, $orm_arg_key, null ); $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; } $html .= '
' . __( 'Key', 'tribe-common' ) . '' . __( 'Value', 'tribe-common' ) . '' . __( 'ORM arg', 'tribe-common' ) . '' . __( 'Reads', 'tribe-common' ) . '' . __( 'Writes', 'tribe-common' ) . '
' . $key . '' . ( isset( $context[ $key ] ) ? print_r( $context[ $key ], true ) : 'undefined' ) . '' . ( false !== $orm_arg_key ? '' . print_r( $orm_arg_key, true ) . ' => ' . print_r( $orm_arg_value, true ) . '' : '' ) . '' . ( isset( $locations[ $key ]['read'] ) ? 'yes' : 'no' ) . '' . ( isset( $locations[ $key ]['write'] ) ? 'yes' : 'no' ) . '
'; $html .= '
'; $html .= '
'; $state = tribe_context()->get_state(); $html .= '

' . esc_attr__( 'State', 'tribe-common' ) . '

'; $html .= '' . json_encode( $state, JSON_PRETTY_PRINT ) . '
'; $html .= '
'; echo $html; } }