This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
File Name: detect-bom.php | |
Description: WordPressのインストールディレクトリに配置する事で、テーマ、プラグインの簡易的な検査と、それぞれのテーマやテンプレートファイルで使われているファイルのMD5_FILEを、表示します。テーマやプラグインのルートディレクトリにcheck-same.phpとして表示された配列をphpとしてペーストしておくと、次回の検査で、check-same.php配置後に変更されたテーマやテンプレートの同一性をチェックする事ができます。 | |
Author: Tenman | |
Author URI: http://www.tenman.info/ | |
Version: 0.1 | |
License: GNU General Public License v2.0 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// プラグインの有効化時/無効化時の処理を登録 | |
register_activation_hook( __FILE__ , 'my_activation_callback' ); | |
register_deactivation_hook( __FILE__ , 'my_deactivation_callback' ); | |
// 他のプラグインや管理者の操作によってflush_rewrite_rules()が発火した際にこのプラグイン用のrewrite ruleを再登録する | |
add_action( 'delete_option', 'my_delete_option', 10, 1 ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Job; | |
use Concrete\Core\Cache\Cache; | |
use Config; | |
use Job as AbstractJob; | |
use Core; | |
use Database; | |
use PermissionKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!class_exists('WP_AddRewriteRules')): | |
class WP_AddRewriteRules{ | |
private $rule = null; | |
private $query = null; | |
private $callback = null; | |
function __construct($rule, $query, $callback) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
------------------------------------------------------- | |
Plugin Name: RSCSV/Posts 2 Posts | |
Description: Connect imported posts using Posts 2 Posts connections | |
Author: Chris Weissenberger, Aleksandr Beliaev | |
Version: 1.3 | |
*/ | |
add_filter('really_simple_csv_importer_post_saved', function($post) { | |
if (is_object($post)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* modernizr-test_position_fixed_ios.js | |
* Original by Daniel Ott (https://gist.github.com/1333800) | |
* 3 March 2011 | |
* Updated by Philipp Söhnlein 3 November 2011 | |
* Custom Tests using Modernizr's addTest API | |
*/ | |
/* iOS | |
* There may be times when we need a quick way to reference whether iOS is in play or not. | |
* While a primative means, will be helpful for that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pref_codes = array("01" => "北海道", "02" => "青森県", "03" => "岩手県", "04" => "宮城県", "05" => "秋田県", "06" => "山形県", "07" => "福島県", "08" => "茨城県", "09" => "栃木県", "10" => "群馬県", "11" => "埼玉県", "12" => "千葉県", "13" => "東京都", "14" => "神奈川県", "15" => "新潟県", "16" => "富山県", "17" => "石川県", "18" => "福井県", "19" => "山梨県", "20" => "長野県", "21" => "岐阜県", "22" => "静岡県", "23" => "愛知県", "24" => "三重県", "25" => "滋賀県", "26" => "京都府", "27" => "大阪府", "28" => "兵庫県", "29" => "奈良県", "30" => "和歌山県", "31" => "鳥取県", "32" => "島根県", "33" => "岡山県", "34" => "広島県", "35" => "山口県", "36" => "徳島県", "37" => "香川県", "38" => "愛媛県", "39" => "高知県", "40" => "福岡県", "41" => "佐賀県", "42" => "長崎県", "43" => "熊本県", "44" => "大分県", "45" => "宮崎県", "46" => "鹿児島県", "47" => "沖縄県"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists( 'PM_Schedule_Post' ) ) { | |
class PM_Schedule_Post { | |
protected $from = ''; | |
protected $to = ''; | |
protected $label = ''; | |
public function __construct( $from, $to, $label = 'expired' ) { | |
$this->from = $from; | |
$this->to = $to; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -- concrete5 urls start -- | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# Change RewriteBase path if this concrete5 is installed on subdirectory / concrete5 がサブディレクトリにインストールされていたら、RewriteBase の変更が必要です。 | |
# IP address restriction starts here / IP アドレス制限、アクセス許可するのIPの設定 | |
RewriteCond %{REMOTE_ADDR} !123\.4\.56\.789 | |
RewriteCond %{REMOTE_ADDR} !123\.123\.123\.123 | |
# Add more lines is you have more IP / もっとIPがある場合は、行を追加してください |