header example

$load = $_GET['load'];
if ( is_array( $load ) ) {
    ksort( $load );
    $load = implode( '', $load );
}

$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
$load = array_unique( explode( ',', $load ) );

if ( empty( $load ) ) {
    header( "$protocol 400 Bad Request" );
    exit;
}

require ABSPATH . 'wp-admin/includes/noop.php';
require ABSPATH . WPINC . '/script-loader.php';
require ABSPATH . WPINC . '/version.php';

$expires_offset = 31536000; // 1 year. $out            = '';

$wp_scripts = new WP_Scripts();
// Install all applicable language packs for the plugin.             $lp_upgrader->bulk_upgrade( $language_packs );
        }

        $path          = WP_PLUGIN_DIR . '/' . $file;
        $data          = get_plugin_data( $path, false, false );
        $data['_file'] = $file;

        $response = $this->prepare_item_for_response( $data$request );
        $response->set_status( 201 );
        $response->header( 'Location', rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, substr( $file, 0, - 4 ) ) ) );

        return $response;
    }

    /** * Checks if a given request has access to update a specific plugin. * * @since 5.5.0 * * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise. */

            } else {
                $otherCookies[] = $h;
            }
        }
        if (null === $sessionCookie) {
            return null;
        }

        header_remove('Set-Cookie');
        foreach ($otherCookies as $h) {
            header($h, false);
        }

        return $sessionCookie;
    }
}

        $image = apply_filters_deprecated( 'image_save_pre', array( $image$attachment_id ), '3.5.0', 'image_editor_save_pre' );

        switch ( $mime_type ) {
            case 'image/jpeg':
                header( 'Content-Type: image/jpeg' );
                return imagejpeg( $image, null, 90 );
            case 'image/png':
                header( 'Content-Type: image/png' );
                return imagepng( $image );
            case 'image/gif':
                header( 'Content-Type: image/gif' );
                return imagegif( $image );
            case 'image/webp':
                if ( function_exists( 'imagewebp' ) ) {
                    header( 'Content-Type: image/webp' );
                    return imagewebp( $image, null, 90 );
                }
$replace = 0 === strcasecmp($name, 'Content-Type');

                if (null !== $previousValues && array_diff($previousValues$values)) {
                    header_remove($name);
                    $previousValues = null;
                }

                $newValues = null === $previousValues ? $values : array_diff($values$previousValues);
            }

            foreach ($newValues as $value) {
                header($name.': '.$value$replace$this->statusCode);
            }

            if ($informationalResponse) {
                $this->sentHeaders[$name] = $values;
            }
        }

        // cookies         foreach ($this->headers->getCookies() as $cookie) {
            header('Set-Cookie: '.$cookie, false, $this->statusCode);
        }

        

function wp_check_php_mysql_versions() {
    global $required_php_version$wp_version;

    $php_version = PHP_VERSION;

    if ( version_compare( $required_php_version$php_version, '>' ) ) {
        $protocol = wp_get_server_protocol();
        header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
        header( 'Content-Type: text/html; charset=utf-8' );
        printf(
            'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.',
            $php_version,
            $wp_version,
            $required_php_version
        );
        exit( 1 );
    }

    // This runs before default constants are defined, so we can't assume WP_CONTENT_DIR is set yet.

        do_action( 'rest_after_insert_attachment', $attachment$request, true );

        wp_after_insert_post( $attachment, false, null );

        if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
            /* * Set a custom header with the attachment_id. * Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. */
            header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id );
        }

        // Include media and image functions to get access to wp_generate_attachment_metadata().         require_once ABSPATH . 'wp-admin/includes/media.php';
        require_once ABSPATH . 'wp-admin/includes/image.php';

        /* * Post-process the upload (create image sub-sizes, make PDF thumbnails, etc.) and insert attachment meta. * At this point the server may run out of resources and post-processing of uploaded images may fail. */
        wp_update_attachment_metadata( $attachment_idwp_generate_attachment_metadata( $attachment_id$file ) );

        


    if ( ! $path || ! @is_file( $path ) ) {
        return false;
    }

    return @file_get_contents( $path );
}

$expires_offset = 31536000; // 1 year.
header( 'Content-Type: application/javascript; charset=UTF-8' );
header( 'Vary: Accept-Encoding' ); // Handle proxies. header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
header( "Cache-Control: public, max-age=$expires_offset);

$file = get_file( $basepath . '/wp-tinymce.js' );
if ( isset( $_GET['c'] ) && $file ) {
    echo $file;
} else {
    // Even further back compat.     echo get_file( $basepath . '/tinymce.min.js' );
    echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
}
<?php /** * Database Repair and Optimization Script. * * @package WordPress * @subpackage Database */
define( 'WP_REPAIRING', true );

require_once dirname( dirname( __DIR__ ) ) . '/wp-load.php';

header( 'Content-Type: text/html; charset=utf-8' );
?> <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta name="viewport" content="width=device-width" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex,nofollow" /> <title><?php _e( 'WordPress &rsaquo; Database Repair' ); ?></title> <?php wp_admin_css( 'install', true ); ?> </head> <body class="wp-core-ui"> <p id="logo"><a href="

        // display or fetch         if ($display) {
            if ($this->caching && $this->cache_modified_check) {
                $_isCached = $_template->isCached() && !$_template->has_nocache_code;
                $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
                if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {
                    switch (PHP_SAPI) {
                        case 'cgi':         // php-cgi < 5.3                         case 'cgi-fcgi':    // php-cgi >= 5.3                         case 'fpm-fcgi':    // php-fpm >= 5.3.3                         header('Status: 304 Not Modified');
                        break;

                        case 'cli':
                        if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {
                            $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
                        }
                        break;

                        default:
                        header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified');
                        break;
                    }
<?php /** * RSS2 Feed Template for displaying RSS2 Posts feed. * * @package WordPress */

header( 'Content-Type: ' . feed_content_type( 'rss2' ) . '; charset=' . get_option( 'blog_charset' ), true );
$more = 1;

echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>';

/** * Fires between the xml and rss tags in a feed. * * @since 4.0.0 * * @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments', * 'rdf', 'atom', and 'atom-comments'. */
if ($localFilesyste->checksum('shopware.php') != $remoteFilesyste->checksum('shopware.php')) {
            throw new RuntimeException('Filesytems does not seem to match');
        }
    }

    /** * @param int $code * @param array $data */
    private function toJson($code$data)
    {
        $this->response->header('Content-Type', 'application/json');
        $this->response->status($code);

        if (\defined('JSON_PRETTY_PRINT')) {
            $this->response->body(json_encode($data, JSON_PRETTY_PRINT));
        } else {
            $this->response->body(json_encode($data));
        }
    }
}
$this->init();
        $this->bulk = true;
        $this->upgrade_strings();

        $current = get_site_transient( 'update_themes' );

        add_filter( 'upgrader_pre_install', array( $this, 'current_before' ), 10, 2 );
        add_filter( 'upgrader_post_install', array( $this, 'current_after' ), 10, 2 );
        add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );

        $this->skin->header();

        // Connect to the filesystem first.         $res = $this->fs_connect( array( WP_CONTENT_DIR ) );
        if ( ! $res ) {
            $this->skin->footer();
            return false;
        }

        $this->skin->bulk_header();

        /* * Only start maintenance mode if: * - running Multisite and there are one or more themes specified, OR * - a theme with an update available is currently in use. * @todo For multisite, maintenance mode should only kick in for individual sites if at all possible. */
<?php declare(strict_types=1);

$uri = $_SERVER['REQUEST_URI'] ?? '/v1/release/update';
$fileName = __DIR__ . '/update.zip';

if (str_starts_with($uri, '/swplatform/autoupdate')) {
    header('Content-Type: application/json');
    echo json_encode([]);
    exit;
}

if (str_starts_with($uri, '/v1/release/update')) {
    header('Content-Type: application/json');
    echo json_encode([
        'version' => '6.5.0.0',
        'release_date' => false,
        'security_update' => false,
        'uri' => 'http://localhost:8060/update.zip',
        
$encoding[] = 'UTF-8';
        }
        return $encoding;
    }

    public static function output_javascript()
    {
        if (function_exists('ob_gzhandler'))
        {
            ob_start('ob_gzhandler');
        }
        header('Content-type: text/javascript; charset: UTF-8');
        header('Cache-Control: must-revalidate');
        header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days         ?> function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) { if (placeholder != '') { document.writeln('<embed type="'+type+'" style="cursor:hand; cursor:pointer;" href="'+link+'" src="'+placeholder+'" width="'+width+'" height="'+height+'" autoplay="false" target="myself" controller="false" loop="'+loop+'" scale="aspect" bgcolor="'+bgcolor+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>'); } else { document.writeln('<embed type="'+type+'" style="cursor:hand; cursor:pointer;" src="'+link+'" width="'+width+'" height="'+height+'" autoplay="false" target="myself" controller="true" loop="'+loop+'" scale="aspect" bgcolor="'+bgcolor+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>'); } } function embed_flash(bgcolor, width, height, link, loop, type) { document.writeln('<embed src="'+link+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="'+type+'" quality="high" width="'+width+'" height="'+height+'" bgcolor="'+bgcolor+'" loop="'+loop+'"></embed>'); } function embed_flv(width, height, link, placeholder, loop, player) { document.writeln('<embed src="'+player+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" width="'+width+'" height="'+height+'" wmode="transparent" flashvars="file='+link+'&autostart=false&repeat='+loop+'&showdigits=true&showfsbutton=false"></embed>'); } function embed_wmedia(width, height, link) { document.writeln('<embed type="application/x-mplayer2" src="'+link+'" autosize="1" width="'+width+'" height="'+height+'" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="0"></embed>'); }
Home | Imprint | This part of the site doesn't use cookies.