
<!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-delete-endpoint.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName

/**
 * Themes delete endpoint class.
 * POST  /sites/%s/plugins/%s/delete
 */
class Jetpack_JSON_API_Themes_Delete_Endpoint extends Jetpack_JSON_API_Themes_Endpoint {

	/**
	 * Needed capabilities.
	 *
	 * @var string
	 */
	protected $needed_capabilities = &#039;delete_themes&#039;;

	/**
	 * The action.
	 *
	 * @var string
	 */
	protected $action = &#039;delete&#039;;

	/**
	 * Delete the theme.
	 *
	 * @return bool|WP_Error
	 */
	protected function delete() {

		foreach ( $this-&gt;themes as $theme ) {

			// Don&#039;t delete an active child theme
			if ( is_child_theme() &amp;&amp; $theme === get_stylesheet() ) {
				$error                        = &#039;You cannot delete a theme while it is active on the main site.&#039;;
				$this-&gt;log[ $theme ][&#039;error&#039;] = $error;
				continue;
			}

			if ( $theme === get_template() ) {
				$error                        = &#039;You cannot delete a theme while it is active on the main site.&#039;;
				$this-&gt;log[ $theme ][&#039;error&#039;] = $error;
				continue;
			}

			/**
			 * Filters whether to use an alternative process for deleting a WordPress.com theme.
			 * The alternative process can be executed during the filter.
			 *
			 * The filter can also return an instance of WP_Error; in which case the endpoint response will
			 * contain this error.
			 *
			 * @module json-api
			 *
			 * @since 4.4.2
			 *
			 * @param bool   $use_alternative_delete_method Whether to use the alternative method of deleting
			 *                                              a WPCom theme.
			 * @param string $theme_slug                    Theme name (slug). If it is a WPCom theme,
			 *                                              it should be suffixed with `-wpcom`.
			 */
			$result = apply_filters( &#039;jetpack_wpcom_theme_delete&#039;, false, $theme );

			if ( ! $result ) {
				$result = delete_theme( $theme );
			}

			if ( is_wp_error( $result ) ) {
				$error                        = $result-&gt;get_error_messages();
				$this-&gt;log[ $theme ][&#039;error&#039;] = $error;
			} else {
				$this-&gt;log[ $theme ][] = &#039;Theme deleted&#039;;
			}
		}

		if ( ! $this-&gt;bulk &amp;&amp; isset( $error ) ) {
			return new WP_Error( &#039;delete_theme_error&#039;, $error, 400 );
		}

		return true;
	}
}
</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>
