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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.4/jquery.colorbox-min.js"></script> | |
<script type="text/javascript" src="https://raw.githubusercontent.com/padolsey-archive/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js"></script> | |
<script> | |
$(function() { | |
$.ajax({ | |
type: 'GET', | |
url: 'http://target.com/', | |
dataType: 'html', | |
success: function(data) { | |
$.colorbox({html:data.responseText, width:'80%', height:'80%'}); |
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 | |
add_action('init', 'quick_maintenance_mode'); | |
function quick_maintenance_mode() { | |
include_once 'maintenance.php'; | |
die; | |
} |
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 | |
/** | |
* LINE BOT API Helper For Wordpress | |
* @link https://developers.line.me/bot-api/api-reference | |
* @author ki6ool | |
*/ | |
class LB_CONSTANT { | |
const END_POINT = 'https://trialbot-api.line.me'; | |
const TO_CHANNEL = '1383378250'; |
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
$ openssl genrsa -out #name#.key 2048 | |
$ openssl req -new -sha256 -key #name#.key -out #name#.csr | |
# 証明書 | |
上:証明書 | |
下:中間証明書 |
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 | |
class LINE_BOT { | |
private $end_point = 'https://trialbot-api.line.me'; | |
private $channel_id = '***'; | |
private $channel_secret = '***'; | |
private $mid = '***'; | |
private $event_type = '138311608800106203'; | |
private $to_channel = '1383378250'; | |
private $result; | |
private $content; |
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 | |
class ZundokoKiyoshi { | |
private $ZUNDOKO = ['ズン', 'ドコ']; | |
private $PHRASE = ''; | |
function __construct() { | |
do { | |
$step = array_map(array($this, 'section'), range(0, 4)); | |
} while ('00001' != implode('', $step)); | |
printf('%s<strong>%s</strong>', $this->PHRASE, 'キ・ヨ・シ!'); |
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
<!-- | |
リンクから表示の場合は下記の公式通り | |
<a href="#my-id" data-uk-modal="{center:true}"></a> | |
--> | |
<script> | |
var $modal = UIkit.modal(".modalSelector", {center: true}); | |
</script> |
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 | |
/** | |
* @link https://codex.wordpress.org/Rewrite_API/add_feed | |
* @link https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts | |
*/ | |
add_action('init', function() { | |
/* | |
* 投稿条件を変更する場合は pre_get_posts をフック | |
* 設定後パーマリンクの更新 | |
*/ |
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 | |
/** | |
* @link http://betterwp.net/latest-posts-from-each-post-type/ | |
*/ | |
global $wpdb; | |
$query = <<<EOT | |
SELECT * FROM | |
( | |
SELECT post_type, max(post_date) AS tmp FROM {$wpdb->posts} | |
WHERE post_status = 'publish' |
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 | |
/** | |
* @link https://wpdocs.osdn.jp/プラグイン_API/アクションフック一覧 | |
* edit_form_after_title | |
* WordPress 投稿編集画面 (およびカスタム投稿タイプ) のタイトルの後、かつ、ビルトインの WordPress コンテンツ領域の前で実行する。 | |
*/ | |
add_action('edit_form_after_title', function () { | |
global $post; | |
echo "<p>ID: <b>{$post->ID}</b></p>"; | |
}); |
NewerOlder