rename from settings to options
This commit is contained in:
parent
e19b894737
commit
6632c1ab14
2 changed files with 3 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
defined( 'ABSPATH' ) or exit;
|
defined( 'ABSPATH' ) or exit;
|
||||||
|
|
||||||
class Gitea_Updater_Settings {
|
class Gitea_Options {
|
||||||
|
|
||||||
private static $_instance;
|
private static $_instance;
|
||||||
|
|
||||||
|
|
@ -37,7 +37,6 @@ class Gitea_Updater_Settings {
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<form action="<?=admin_url('options-general.php?page=gitea-updater')?>" method="post">
|
<form action="<?=admin_url('options-general.php?page=gitea-updater')?>" method="post">
|
||||||
<?php /* settings_fields('gitea_options_page'); */ ?>
|
|
||||||
|
|
||||||
<h1>Gitea Updater</h1>
|
<h1>Gitea Updater</h1>
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ TODO:
|
||||||
defined( 'ABSPATH' ) or exit;
|
defined( 'ABSPATH' ) or exit;
|
||||||
|
|
||||||
|
|
||||||
require 'gitea-updater-settings.php';
|
require 'gitea-options.php';
|
||||||
|
|
||||||
class Gitea_Updater {
|
class Gitea_Updater {
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ class Gitea_Updater {
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
|
||||||
Gitea_Updater_Settings::getInstance();
|
Gitea_Options::getInstance();
|
||||||
|
|
||||||
add_action('admin_init', array($this, 'admin_init'));
|
add_action('admin_init', array($this, 'admin_init'));
|
||||||
|
|
||||||
|
|
@ -85,7 +85,6 @@ class Gitea_Updater {
|
||||||
// if is time... update data
|
// if is time... update data
|
||||||
if (($now - $last_checked) > $check_interval) {
|
if (($now - $last_checked) > $check_interval) {
|
||||||
$this->get_gitea_all();
|
$this->get_gitea_all();
|
||||||
|
|
||||||
update_option('gitea_last_checked', $now);
|
update_option('gitea_last_checked', $now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -94,7 +93,6 @@ class Gitea_Updater {
|
||||||
function get_gitea_all() {
|
function get_gitea_all() {
|
||||||
$this->get_gitea_plugins();
|
$this->get_gitea_plugins();
|
||||||
$this->get_gitea_themes();
|
$this->get_gitea_themes();
|
||||||
$time_end = microtime(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_gitea_plugins() {
|
function get_gitea_plugins() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue