Rarst\Fragment_Cache\Gallery_Cache::callback PHP Метод

callback() защищенный Метод

Set up post context and generate gallery output.
protected callback ( string $name, array $args ) : string
$name string Fragment name.
$args array Arguments.
Результат string
    protected function callback($name, $args)
    {
        global $post;
        $post = get_post($args['post_id']);
        setup_postdata($post);
        $shortcode = isset($this->original_shortcode) ? $this->original_shortcode : 'gallery_shortcode';
        $output = call_user_func($shortcode, $args['args']) . $this->get_comment($name);
        wp_reset_postdata();
        return $output;
    }