
<!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-schedules.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php

namespace HM\BackUpWordPress;

/**
 * A simple class for loading schedules
 */
class Schedules {

	/**
	 * An array of schedules
	 *
	 * @var mixed
	 * @access private
	 */
	private $schedules;

	/**
	 *
	 */
	protected static $instance;

	public static function get_instance() {

		if ( ! ( self::$instance instanceof Schedules ) ) {
			self::$instance = new Schedules();
		}

		return self::$instance;

	}

	/**
	 * Load the schedules from wp_options and store in $this-&gt;schedules
	 *
	 */
	private function __construct() {
		$this-&gt;refresh_schedules();
	}

	public function refresh_schedules() {

		$schedules = get_transient( &#039;hmbkp_schedules&#039; );

		if ( ! $schedules ) {

			global $wpdb;

			// Load all schedule options from the database.
			$schedules = $wpdb-&gt;get_col( &quot;SELECT option_name from $wpdb-&gt;options WHERE option_name LIKE &#039;hmbkp\_schedule\_%&#039;&quot; );

			set_transient( &#039;hmbkp_schedules&#039;, $schedules, WEEK_IN_SECONDS );
		}

		// Instantiate each one as a Scheduled_Backup
		$this-&gt;schedules = array_map( array( $this, &#039;instantiate&#039; ), array_filter( (array) $schedules ) );

	}

	/**
	 * Get an array of schedules
	 *
	 * @return Scheduled_Backup[]
	 */
	public function get_schedules() {
		return $this-&gt;schedules;
	}

	/**
	 * Get a schedule by ID
	 *
	 * @param $id
	 * @return Scheduled_Backup
	 */
	public function get_schedule( $id ) {

		foreach ( $this-&gt;schedules as $schedule ) {
			if ( $schedule-&gt;get_id() == $id ) {
				return $schedule;
			}
		}

		return null;
	}

	/**
	 * Instantiate the individual scheduled backup objects
	 *
	 * @access private
	 * @param string $id
	 * @return Scheduled_Backup
	 */
	private function instantiate( $id ) {
		return new Scheduled_Backup( str_replace( &#039;hmbkp_schedule_&#039;, &#039;&#039;, $id ) );
	}
}
</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>
