WordPress(ワードプレス)その22
■ このスレッドは過去ログ倉庫に格納されています
0001Trackback(774)
2013/02/21(木) 07:17:12.81ID:mbE3h3uqWordPress について語るスレです。
WordPress.com(ブログレンタルサービス)の話題も扱いますが、
混乱を避けるために、名前にレンタルブログと入れることを推奨します。
■ 前スレ
WordPress(ワードプレス)その21
http://toro.2ch.net/test/read.cgi/blog/1334244754/
■ 本家サイト
○ WordPress (ホーム)
http://wordpress.org/
○ WordPress.com (ブログレンタルサービス)
http://ja.wordpress.com/
○ bbPress (フォーラム用ソフト)
http://bbpress.org/
■ WordPress 日本語ローカルサイト
○ WordPress | 日本語 (ホーム)
http://ja.wordpress.org/
○ WordPress > フォーラム
http://ja.forums.wordpress.org/
■ 本家の関連サイト
○ WordPress Codex (ドキュメント)
http://codex.wordpress.org/
○ Theme Viewer (テーマ紹介)
http://themes.wordpress.net/
○ WordPress > WordPress Plugins (プラグイン紹介)
http://wordpress.org/extend/plugins/
■ 日本語関連サイトの一部
○ WordPress Codex 日本語版
http://wpdocs.sourceforge.jp/
○ WordPress Plugins/JSeries
http://wppluginsj.sourceforge.jp/
○ WordPress ME 2.0.x サポート
http://wpme.sourceforge.jp/
0713Trackback(774)
2013/08/19(月) NY:AN:NY.ANID:NxtNFzyfこんなプラグインを自作するのは?php詳しくなかったらごめんね。
<?php
/*
Plugin Name: Maintenance switcher by 2ch no name
*/
/* Copyright 2013 名無しさん (email : sage)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// メンテナンス開始・終了時刻の設定
$maintenance_start = "02:00";
$maintenance_end = "06:00";
// 処理開始
$dt_st_ar = explode(":",$maintenance_start);
$dt_ed_ar = explode(":",$maintenance_end);
$dt_st = mktime($dt_st_ar[0],$dt_st_ar[1],0,0,0,0);
$dt_ed = mktime($dt_ed_ar[0],$dt_ed_ar[1],0,0,0,0);
$dt = time();
if ($dt>=$dt_st && $dt<$dt_ed) {
@fp = fopen(ABSPATH.".maintenance","w");
@fwrite($fp,"<?php $upgrading = time(); ?>");
@fclose($fp);
} else {
@unlink(ABSPATH.".maintenance");
}
?>
0714Trackback(774)
2013/08/19(月) NY:AN:NY.ANID:NxtNFzyf$dt_st = mktime($dt_st_ar[0],$dt_st_ar[1],0,date("m"),date("d"),date("Y"));
$dt_ed = mktime($dt_ed_ar[0],$dt_ed_ar[1],0,date("m"),date("d"),date("Y"));
0715Trackback(774)
2013/08/19(月) NY:AN:NY.ANID:NxtNFzyfcron使えるんだったら、crontab -eでこうか。
0 2 0 0 0 echo "<?php $upgrading = time(); ?>" > /path/to/wp/.maintenance && chmod 644 /path/to/wp/.maintenance
0 2 0 0 0 em -f /path/to/wp/.maintenance
■ このスレッドは過去ログ倉庫に格納されています