/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/theme/partials/loop-single-event.php
</div>
</div>
</div>
</section>
<?php
$event_start = get_field('date_start');
$event_end = get_field('date_end');
$event_start_formatted = DateTime::createFromFormat('Ymj', $event_start);
$event_end_formatted = DateTime::createFromFormat('Ymj', $event_end);
$months = array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');
?>
<section class="event-body">
<div class="container-fluid">
<div class="row no-gutters">
<div class="col-md-6 offset-md-2">
<ul>
<li>
<?php echo $event_start_formatted->format('d') . ' '. $months[$event_start_formatted->format('n') - 1] . ' al ' . $event_end_formatted->format('d') . ' ' . $months[$event_end_formatted->format('n') - 1]; ?> |
<?php
$separator = '';
if(have_rows('events')) : while(have_rows('events')): the_row();
$day = get_sub_field_object('day');
$value = $day['value'];
$time = get_sub_field('time');
?>
<?php echo $separator . $day['choices'][$value]; ?> - <?php echo $time['hour'].':'.$time['minutes'] .'h'; ?>
<?php $separator = ' | '; endwhile; endif; ?>
</li>
<?php if(get_field('event_price')): ?>
<li><?php the_field('event_price'); ?></li>
<?php endif; ?>
</ul>
<?php the_content(); ?>
<?php if(get_field('event_link')): ?>
<a href="<?php the_field('event_link'); ?>" class="btn" target="_blank">Comprar entrada</a>
<?php endif; ?>
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
*
* @return string
*/
protected function render() {
$__context = $this->getContext();
ob_start();
extract( $__context, EXTR_OVERWRITE );
/** @noinspection PhpIncludeInspection */
include $this->getFilepath();
return ob_get_clean();
}
/**
* {@inheritDoc}
* @throws ViewException
*/
public function toResponse() {
return (new Response())
->withHeader( 'Content-Type', 'text/html' )
->withBody( Psr7\stream_for( $this->toString() ) );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
* Layout to use.
*
* @var ViewInterface|null
*/
protected $layout = null;
/**
* Get the top-most layout content from the stack.
*
* @codeCoverageIgnore
* @return string
*/
public static function getLayoutContent() {
$view = array_pop( static::$layout_content_stack );
if ( ! $view ) {
return '';
}
return $view->render();
}
/**
* Get filepath.
*
* @return string
*/
public function getFilepath() {
return $this->filepath;
}
/**
* Set filepath.
*
* @param string $filepath
* @return static $this
*/
public function setFilepath( $filepath ) {
$this->filepath = $filepath;
return $this;
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
* {@inheritDoc}
* @throws ViewException
*/
public function toString() {
if ( empty( $this->getName() ) ) {
throw new ViewException( 'View must have a name.' );
}
if ( empty( $this->getFilepath() ) ) {
throw new ViewException( 'View must have a filepath.' );
}
$clone = clone $this;
static::$layout_content_stack[] = $clone->compose();
if ( $this->getLayout() !== null ) {
return $this->getLayout()->toString();
}
return static::getLayoutContent();
}
/**
* Compose the context.
*
* @return static $this
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
*
* @return string
*/
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/functions.php
* @see \WPEmerge\Responses\ResponseService::error()
* @param integer $status
* @return \Psr\Http\Message\ResponseInterface
*/
function error( $status ) {
return call_user_func_array( [Response::class, 'error'], func_get_args() );
}
/**
* @codeCoverageIgnore
* @see \WPEmerge\View\ViewService::make()
* @see \WPEmerge\View\ViewInterface::toString()
* @param string|array<string> $views
* @param array<string, mixed> $context
* @return void
*/
function render( $views, $context = [] ) {
$view = view( $views )->with( $context );
View::triggerPartialHooks( $view->getName() );
echo $view->toString();
}
/**
* @codeCoverageIgnore
* @see \WPEmerge\View\PhpView::getLayoutContent()
* @return void
*/
function layout_content() {
echo \WPEmerge\View\PhpView::getLayoutContent();
}
/**
* @codeCoverageIgnore
* @see \WPEmerge\Kernels\HttpKernel::run()
* @param \WPEmerge\Requests\RequestInterface $request
* @param array<string> $middleware
* @param string|\Closure $handler
* @param array $arguments
* @return \Psr\Http\Message\ResponseInterface
*/
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge-theme-core/src/Theme/Theme.php
* @param string $child
* @param array $context
* @return void
*/
public function partial( $partial, $child = '', $context = [] ) {
if ( is_array( $child ) ) {
// Optional argument $child not specified, flip input around.
$context = $child;
$child = '';
}
$templates = [];
if ( $child ) {
$templates[] = "partials/${partial}-${child}.php";
}
$templates[] = "partials/${partial}.php";
WPEmerge\render( $templates, $context );
}
/**
* Alias for WPEmergeTheme\Assets\Assets::getThemeUri().
*
* @see \WPEmergeTheme\Assets\Assets::getThemeUri
* @return string
*/
public function uri() {
return Assets::getThemeUri();
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Support/Facade.php
}
/**
* Handle dynamic, static calls to the object.
*
* @param string $method
* @param array $args
* @return mixed
*
* @throws \RuntimeException
*/
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
if (! $instance) {
throw new RuntimeException('A facade root has not been set.');
}
return call_user_func_array([$instance, $method], $args);
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Support/Facade.php
}
/**
* Handle dynamic, static calls to the object.
*
* @param string $method
* @param array $args
* @return mixed
*
* @throws \RuntimeException
*/
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
if (! $instance) {
throw new RuntimeException('A facade root has not been set.');
}
return call_user_func_array([$instance, $method], $args);
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/theme/single-whq_event.php
<?php
/**
* App Layout: layouts/app.php
*
* This is the template that is used for displaying all posts by default.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WPEmergeTheme
*/
Theme::partial( 'loop', 'single-event' );
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
*
* @return string
*/
protected function render() {
$__context = $this->getContext();
ob_start();
extract( $__context, EXTR_OVERWRITE );
/** @noinspection PhpIncludeInspection */
include $this->getFilepath();
return ob_get_clean();
}
/**
* {@inheritDoc}
* @throws ViewException
*/
public function toResponse() {
return (new Response())
->withHeader( 'Content-Type', 'text/html' )
->withBody( Psr7\stream_for( $this->toString() ) );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
* Layout to use.
*
* @var ViewInterface|null
*/
protected $layout = null;
/**
* Get the top-most layout content from the stack.
*
* @codeCoverageIgnore
* @return string
*/
public static function getLayoutContent() {
$view = array_pop( static::$layout_content_stack );
if ( ! $view ) {
return '';
}
return $view->render();
}
/**
* Get filepath.
*
* @return string
*/
public function getFilepath() {
return $this->filepath;
}
/**
* Set filepath.
*
* @param string $filepath
* @return static $this
*/
public function setFilepath( $filepath ) {
$this->filepath = $filepath;
return $this;
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/functions.php
* @codeCoverageIgnore
* @see \WPEmerge\View\ViewService::make()
* @see \WPEmerge\View\ViewInterface::toString()
* @param string|array<string> $views
* @param array<string, mixed> $context
* @return void
*/
function render( $views, $context = [] ) {
$view = view( $views )->with( $context );
View::triggerPartialHooks( $view->getName() );
echo $view->toString();
}
/**
* @codeCoverageIgnore
* @see \WPEmerge\View\PhpView::getLayoutContent()
* @return void
*/
function layout_content() {
echo \WPEmerge\View\PhpView::getLayoutContent();
}
/**
* @codeCoverageIgnore
* @see \WPEmerge\Kernels\HttpKernel::run()
* @param \WPEmerge\Requests\RequestInterface $request
* @param array<string> $middleware
* @param string|\Closure $handler
* @param array $arguments
* @return \Psr\Http\Message\ResponseInterface
*/
function run( \WPEmerge\Requests\RequestInterface $request, $middleware, $handler, $arguments = [] ) {
$kernel = \WPEmerge\Facades\Application::resolve( WPEMERGE_WORDPRESS_HTTP_KERNEL_KEY );
return call_user_func_array( [$kernel, 'run'], func_get_args() );
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/theme/layouts/app.php
<?php
/**
* Base app layout.
*
* @link https://docs.wpemerge.com/#/framework/views/layouts
*
* @package WPEmergeTheme
*/
WPEmerge\render( 'header' );
if ( ! is_singular() ) {
app_the_title( '<h2 class="post-title">', '</h2>' );
}
WPEmerge\layout_content();
WPEmerge\render( 'footer' );
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
*
* @return string
*/
protected function render() {
$__context = $this->getContext();
ob_start();
extract( $__context, EXTR_OVERWRITE );
/** @noinspection PhpIncludeInspection */
include $this->getFilepath();
return ob_get_clean();
}
/**
* {@inheritDoc}
* @throws ViewException
*/
public function toResponse() {
return (new Response())
->withHeader( 'Content-Type', 'text/html' )
->withBody( Psr7\stream_for( $this->toString() ) );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
* Layout to use.
*
* @var ViewInterface|null
*/
protected $layout = null;
/**
* Get the top-most layout content from the stack.
*
* @codeCoverageIgnore
* @return string
*/
public static function getLayoutContent() {
$view = array_pop( static::$layout_content_stack );
if ( ! $view ) {
return '';
}
return $view->render();
}
/**
* Get filepath.
*
* @return string
*/
public function getFilepath() {
return $this->filepath;
}
/**
* Set filepath.
*
* @param string $filepath
* @return static $this
*/
public function setFilepath( $filepath ) {
$this->filepath = $filepath;
return $this;
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
* {@inheritDoc}
* @throws ViewException
*/
public function toString() {
if ( empty( $this->getName() ) ) {
throw new ViewException( 'View must have a name.' );
}
if ( empty( $this->getFilepath() ) ) {
throw new ViewException( 'View must have a filepath.' );
}
$clone = clone $this;
static::$layout_content_stack[] = $clone->compose();
if ( $this->getLayout() !== null ) {
return $this->getLayout()->toString();
}
return static::getLayoutContent();
}
/**
* Compose the context.
*
* @return static $this
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
*
* @return string
*/
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
}
/**
* {@inheritDoc}
* @throws ViewException
*/
public function toString() {
if ( empty( $this->getName() ) ) {
throw new ViewException( 'View must have a name.' );
}
if ( empty( $this->getFilepath() ) ) {
throw new ViewException( 'View must have a filepath.' );
}
$clone = clone $this;
static::$layout_content_stack[] = $clone->compose();
if ( $this->getLayout() !== null ) {
return $this->getLayout()->toString();
}
return static::getLayoutContent();
}
/**
* Compose the context.
*
* @return static $this
*/
protected function compose() {
$context = $this->getContext();
$this->with( ['global' => View::getGlobals()] );
View::compose( $this );
$this->with( $context );
return $this;
}
/**
* Render the view to a string.
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/View/PhpView.php
*
* @return string
*/
protected function render() {
$__context = $this->getContext();
ob_start();
extract( $__context, EXTR_OVERWRITE );
/** @noinspection PhpIncludeInspection */
include $this->getFilepath();
return ob_get_clean();
}
/**
* {@inheritDoc}
* @throws ViewException
*/
public function toResponse() {
return (new Response())
->withHeader( 'Content-Type', 'text/html' )
->withBody( Psr7\stream_for( $this->toString() ) );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Controllers/WordPressController.php
*/
public function handle( RequestInterface $request, $view = '' ) {
if ( is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
throw new ConfigurationException(
'Attempted to run the default WordPress controller on an ' .
'admin or AJAX page. Did you miss to specify a custom handler for ' .
'a route or accidentally used Route::all() during admin ' .
'requests?'
);
}
if ( empty( $view ) ) {
throw new ConfigurationException(
'No view loaded for default WordPress controller. ' .
'Did you miss to specify a custom handler for an ajax or admin route?'
);
}
return Response::view( $view )
->toResponse()
->withStatus( http_response_code() );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Helpers/Handler.php
if ( $this->handler instanceof Closure ) {
return call_user_func_array( $this->handler, $arguments );
}
$namespace = $this->handler['namespace'];
$class = $this->handler['class'];
$method = $this->handler['method'];
try {
$instance = Application::instantiate( $class );
} catch ( ClassNotFoundException $e ) {
try {
$instance = Application::instantiate( $namespace . $class );
} catch ( ClassNotFoundException $e ) {
throw new ClassNotFoundException( 'Class not found - tried: ' . $class . ', ' . $namespace . $class );
}
}
return call_user_func_array( [$instance, $method], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Helpers/Handler.php
if ( $this->handler instanceof Closure ) {
return call_user_func_array( $this->handler, $arguments );
}
$namespace = $this->handler['namespace'];
$class = $this->handler['class'];
$method = $this->handler['method'];
try {
$instance = Application::instantiate( $class );
} catch ( ClassNotFoundException $e ) {
try {
$instance = Application::instantiate( $namespace . $class );
} catch ( ClassNotFoundException $e ) {
throw new ClassNotFoundException( 'Class not found - tried: ' . $class . ', ' . $namespace . $class );
}
}
return call_user_func_array( [$instance, $method], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/Route.php
$query = Arr::get( $attributes, 'query', null );
$this->middleware( $middleware );
if ( $query !== null) {
$this->setQueryFilter( $query );
}
}
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, $arguments = [] ) {
$arguments = array_merge(
[$request],
$arguments,
array_values( $this->condition->getArguments( $request ) )
);
return call_user_func_array( [$this->getHandler(), 'execute'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/Route.php
$query = Arr::get( $attributes, 'query', null );
$this->middleware( $middleware );
if ( $query !== null) {
$this->setQueryFilter( $query );
}
}
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, $arguments = [] ) {
$arguments = array_merge(
[$request],
$arguments,
array_values( $this->condition->getArguments( $request ) )
);
return call_user_func_array( [$this->getHandler(), 'execute'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Kernels/HttpKernel.php
add_action( 'admin_init', [$this, 'registerAjaxAction'] );
// Admin.
add_action( 'admin_init', [$this, 'registerAdminAction'] );
}
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, $arguments = [] ) {
$route = $this->router->execute( $request );
if ( $route === null ) {
return null;
}
$handler = function () use ( $route ) {
$arguments = func_get_args();
$request = array_shift( $arguments );
return call_user_func( [$route, 'handle'], $request, $arguments );
};
$response = $this->run( $request, $route->getMiddleware(), $handler, $arguments );
$container = $this->app->getContainer();
$container[ WPEMERGE_RESPONSE_KEY ] = $response;
return $response;
}
/**
* {@inheritDoc}
*/
public function run( RequestInterface $request, $middleware, $handler, $arguments = [] ) {
$this->error_handler->register();
try {
$middleware = $this->expandMiddleware( $middleware );
$middleware = $this->uniqueMiddleware( $middleware );
$middleware = $this->sortMiddleware( $middleware );
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Kernels/HttpKernel.php
add_action( 'admin_init', [$this, 'registerAjaxAction'] );
// Admin.
add_action( 'admin_init', [$this, 'registerAdminAction'] );
}
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, $arguments = [] ) {
$route = $this->router->execute( $request );
if ( $route === null ) {
return null;
}
$handler = function () use ( $route ) {
$arguments = func_get_args();
$request = array_shift( $arguments );
return call_user_func( [$route, 'handle'], $request, $arguments );
};
$response = $this->run( $request, $route->getMiddleware(), $handler, $arguments );
$container = $this->app->getContainer();
$container[ WPEMERGE_RESPONSE_KEY ] = $response;
return $response;
}
/**
* {@inheritDoc}
*/
public function run( RequestInterface $request, $middleware, $handler, $arguments = [] ) {
$this->error_handler->register();
try {
$middleware = $this->expandMiddleware( $middleware );
$middleware = $this->uniqueMiddleware( $middleware );
$middleware = $this->sortMiddleware( $middleware );
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Helpers/Handler.php
/**
* Get the parsed handler
*
* @return array|Closure|null
*/
public function get() {
return $this->handler;
}
/**
* Execute the parsed handler with any provided arguments and return the result
*
* @param mixed ,...$arguments
* @return mixed
*/
public function execute() {
$arguments = func_get_args();
if ( $this->handler instanceof Closure ) {
return call_user_func_array( $this->handler, $arguments );
}
$namespace = $this->handler['namespace'];
$class = $this->handler['class'];
$method = $this->handler['method'];
try {
$instance = Application::instantiate( $class );
} catch ( ClassNotFoundException $e ) {
try {
$instance = Application::instantiate( $namespace . $class );
} catch ( ClassNotFoundException $e ) {
throw new ClassNotFoundException( 'Class not found - tried: ' . $class . ', ' . $namespace . $class );
}
}
return call_user_func_array( [$instance, $method], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Helpers/Handler.php
/**
* Get the parsed handler
*
* @return array|Closure|null
*/
public function get() {
return $this->handler;
}
/**
* Execute the parsed handler with any provided arguments and return the result
*
* @param mixed ,...$arguments
* @return mixed
*/
public function execute() {
$arguments = func_get_args();
if ( $this->handler instanceof Closure ) {
return call_user_func_array( $this->handler, $arguments );
}
$namespace = $this->handler['namespace'];
$class = $this->handler['class'];
$method = $this->handler['method'];
try {
$instance = Application::instantiate( $class );
} catch ( ClassNotFoundException $e ) {
try {
$instance = Application::instantiate( $namespace . $class );
} catch ( ClassNotFoundException $e ) {
throw new ClassNotFoundException( 'Class not found - tried: ' . $class . ', ' . $namespace . $class );
}
}
return call_user_func_array( [$instance, $method], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/PipelineHandler.php
if ( is_array( $response ) ) {
return Response::json( $response );
}
if ( $response instanceof ResponsableInterface ) {
return $response->toResponse();
}
return $response;
}
/**
* Execute the handler
*
* @param mixed ,...$arguments
* @return ResponseInterface
*/
public function execute() {
$response = call_user_func_array( [$this->handler, 'execute'], func_get_args() );
$response = $this->getResponse( $response );
if ( ! $response instanceof ResponseInterface ) {
throw new ConfigurationException(
'Response returned by controller is not valid ' .
'(expected ' . ResponseInterface::class . '; received ' . gettype( $response ) . ').'
);
}
return $response;
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/PipelineHandler.php
if ( is_array( $response ) ) {
return Response::json( $response );
}
if ( $response instanceof ResponsableInterface ) {
return $response->toResponse();
}
return $response;
}
/**
* Execute the handler
*
* @param mixed ,...$arguments
* @return ResponseInterface
*/
public function execute() {
$response = call_user_func_array( [$this->handler, 'execute'], func_get_args() );
$response = $this->getResponse( $response );
if ( ! $response instanceof ResponseInterface ) {
throw new ConfigurationException(
'Response returned by controller is not valid ' .
'(expected ' . ResponseInterface::class . '; received ' . gettype( $response ) . ').'
);
}
return $response;
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/Pipeline.php
* @codeCoverageIgnore
* @param array<array> $middleware
* @return static $this
*/
public function pipe( $middleware ) {
$this->middleware = array_merge( $this->middleware, $middleware );
return $this;
}
/**
* Get a response for the given request.
*
* @param RequestInterface $request
* @param array $arguments
* @return \Psr\Http\Message\ResponseInterface
*/
public function run( RequestInterface $request, $arguments ) {
return $this->executeMiddleware( $this->middleware, $request, function () use ( $arguments ) {
return call_user_func_array( [$this->getHandler(), 'execute'], $arguments );
} );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/Pipeline.php
* @codeCoverageIgnore
* @param array<array> $middleware
* @return static $this
*/
public function pipe( $middleware ) {
$this->middleware = array_merge( $this->middleware, $middleware );
return $this;
}
/**
* Get a response for the given request.
*
* @param RequestInterface $request
* @param array $arguments
* @return \Psr\Http\Message\ResponseInterface
*/
public function run( RequestInterface $request, $arguments ) {
return $this->executeMiddleware( $this->middleware, $request, function () use ( $arguments ) {
return call_user_func_array( [$this->getHandler(), 'execute'], $arguments );
} );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
use WPEmerge\Facades\Application;
use WPEmerge\Requests\RequestInterface;
/**
* Allow objects to execute middleware.
*/
trait ExecutesMiddlewareTrait {
/**
* Execute an array of middleware recursively (last in, first out).
*
* @param array<array<string>> $middleware
* @param RequestInterface $request
* @param Closure $next
* @return \Psr\Http\Message\ResponseInterface
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
* Allow objects to execute middleware.
*/
trait ExecutesMiddlewareTrait {
/**
* Execute an array of middleware recursively (last in, first out).
*
* @param array<array<string>> $middleware
* @param RequestInterface $request
* @param Closure $next
* @return \Psr\Http\Message\ResponseInterface
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Input/OldInputMiddleware.php
namespace WPEmerge\Input;
use Closure;
use WPEmerge\Facades\OldInput as OldInputService;
use WPEmerge\Requests\RequestInterface;
/**
* Store current request data and clear old request data
*/
class OldInputMiddleware {
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, Closure $next ) {
if ( OldInputService::enabled() && $request->isPost() ) {
OldInputService::set( $request->post() );
}
return $next( $request );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
* Allow objects to execute middleware.
*/
trait ExecutesMiddlewareTrait {
/**
* Execute an array of middleware recursively (last in, first out).
*
* @param array<array<string>> $middleware
* @param RequestInterface $request
* @param Closure $next
* @return \Psr\Http\Message\ResponseInterface
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Flash/FlashMiddleware.php
* @copyright 2018 Atanas Angelov
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
* @link https://wpemerge.com/
*/
namespace WPEmerge\Flash;
use Closure;
use WPEmerge\Facades\Flash as FlashService;
use WPEmerge\Requests\RequestInterface;
/**
* Store current request data and clear old request data
*/
class FlashMiddleware {
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, Closure $next ) {
$response = $next( $request );
if ( FlashService::enabled() ) {
FlashService::shift();
FlashService::save();
}
return $response;
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Middleware/ExecutesMiddlewareTrait.php
*/
public function executeMiddleware( $middleware, RequestInterface $request, Closure $next ) {
$top_middleware = array_shift( $middleware );
if ( $top_middleware === null ) {
return $next( $request );
}
$top_middleware_next = function ( $request ) use ( $middleware, $next ) {
return $this->executeMiddleware( $middleware, $request, $next );
};
$class = $top_middleware[0];
$arguments = array_merge(
[$request, $top_middleware_next],
array_slice( $top_middleware, 1 )
);
$instance = Application::instantiate( $class );
return call_user_func_array( [$instance, 'handle'], $arguments );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Routing/Pipeline.php
* @param array<array> $middleware
* @return static $this
*/
public function pipe( $middleware ) {
$this->middleware = array_merge( $this->middleware, $middleware );
return $this;
}
/**
* Get a response for the given request.
*
* @param RequestInterface $request
* @param array $arguments
* @return \Psr\Http\Message\ResponseInterface
*/
public function run( RequestInterface $request, $arguments ) {
return $this->executeMiddleware( $this->middleware, $request, function () use ( $arguments ) {
return call_user_func_array( [$this->getHandler(), 'execute'], $arguments );
} );
}
}
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Kernels/HttpKernel.php
$container[ WPEMERGE_RESPONSE_KEY ] = $response;
return $response;
}
/**
* {@inheritDoc}
*/
public function run( RequestInterface $request, $middleware, $handler, $arguments = [] ) {
$this->error_handler->register();
try {
$middleware = $this->expandMiddleware( $middleware );
$middleware = $this->uniqueMiddleware( $middleware );
$middleware = $this->sortMiddleware( $middleware );
$response = ( new Pipeline() )
->pipe( $middleware )
->to( $handler )
->run( $request, array_merge( [$request], $arguments ) );
} catch ( Exception $exception ) {
$response = $this->error_handler->getResponse( $request, $exception );
}
$this->error_handler->unregister();
return $response;
}
/**
* Filter the main query vars.
*
* @param array $query_vars
* @return array
*/
public function filterRequest( $query_vars ) {
/** @var $routes \WPEmerge\Routing\RouteInterface[] */
$routes = $this->router->getRoutes();
foreach ( $routes as $route ) {
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Kernels/HttpKernel.php
add_action( 'admin_init', [$this, 'registerAdminAction'] );
}
/**
* {@inheritDoc}
*/
public function handle( RequestInterface $request, $arguments = [] ) {
$route = $this->router->execute( $request );
if ( $route === null ) {
return null;
}
$handler = function () use ( $route ) {
$arguments = func_get_args();
$request = array_shift( $arguments );
return call_user_func( [$route, 'handle'], $request, $arguments );
};
$response = $this->run( $request, $route->getMiddleware(), $handler, $arguments );
$container = $this->app->getContainer();
$container[ WPEMERGE_RESPONSE_KEY ] = $response;
return $response;
}
/**
* {@inheritDoc}
*/
public function run( RequestInterface $request, $middleware, $handler, $arguments = [] ) {
$this->error_handler->register();
try {
$middleware = $this->expandMiddleware( $middleware );
$middleware = $this->uniqueMiddleware( $middleware );
$middleware = $this->sortMiddleware( $middleware );
$response = ( new Pipeline() )
->pipe( $middleware )
/home/redsaltr/public_html/wp-content/themes/red-salas-teatro-2020/vendor/htmlburger/wpemerge/src/Kernels/HttpKernel.php
}
$query_vars = $route->applyQueryFilter( $this->request, $query_vars );
break;
}
return $query_vars;
}
/**
* Filter the main template file.
*
* @param string $view
* @return string
*/
public function filterTemplateInclude( $view ) {
/** @var $wp_query \WP_Query */
global $wp_query;
$response = $this->handle( $this->request, [$view] );
if ( $response instanceof ResponseInterface ) {
if ( $response->getStatusCode() === 404 ) {
$wp_query->set_404();
}
return WPEMERGE_DIR . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'view.php';
}
return $view;
}
/**
* Register ajax action to hook into current one.
*
* @return void
*/
public function registerAjaxAction() {
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
return;
/home/redsaltr/public_html/wp-includes/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
/home/redsaltr/public_html/wp-includes/plugin.php
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
_wp_call_all_hook( $all_args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return $value;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
// Pass the value to WP_Hook.
array_unshift( $args, $value );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
/**
* Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
*
* @since 3.0.0
*
* @see apply_filters() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_filters Stores the number of times each filter was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the filter hook.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
/home/redsaltr/public_html/wp-includes/template-loader.php
if ( 'is_attachment' === $tag ) {
remove_filter( 'the_content', 'prepend_attachment' );
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
/home/redsaltr/public_html/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/home/redsaltr/public_html/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';