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
/* =============================================== | |
ajax_base | |
=============================================== */ | |
/* ajax url,nounce | |
=============================================== */ | |
function add_ajaxurl_and_nounce() { | |
?> | |
<script> | |
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php'); ?>'; | |
var ajaxnounse = '<?php echo wp_create_nonce("ajax_base");?>'; |
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(isset($GET_['num']) && $GET_['num']){ | |
$num = (int)htmlspecialchars($_GET['num']); | |
}else{ | |
$num = 10; | |
} | |
// ユーザネームから固有のuser_IDを取得する。 | |
define("INSTAGRAM_ACCESS_TOKEN", ACCESS TOKEN); | |
// ユーザアカウント名 | |
$user_account = ACCOUNT; |
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_filter('mwform_admin_mail_mw-wp-form-xxx', [$this, 'adminMailBlock'], 9, 3); | |
//略 | |
public function adminMailBlock($Mail, $values, $Data){ | |
$Mail->to = ''; | |
add_filter( 'mwform_is_mail_sended', function(){ | |
return true; | |
} ); | |
return $Mail; |
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 | |
// https://documentation.concrete5.org/api/8.4.1/Concrete/Core/Tree/Node/Type/FileFolder.html | |
$file = \File::getByID(624); | |
$folder = $file->getFileFolderObject(); | |
var_dump($folder->getTreeNodeDisplayName()); |
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 | |
//毎回忘れる | |
public function csv_gen($data_array,$user_id){ | |
try { | |
//一時ファイルの用意 | |
$csvFileName = '/tmp/' . time() . rand() . '.csv'; | |
$res = fopen($csvFileName, 'w'); | |
if ($res === FALSE) { | |
throw new Exception('ファイルの書き込みに失敗しました。'); | |
} |
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 | |
$messageMap = array( | |
'E00000000'=>'特になし', | |
'E01010001'=>'ショップIDが指定されていません。', | |
'E01020001'=>'ショップパスワードが指定されていません。', | |
'E01030002'=>'指定されたIDとパスワードのショップが存在しません。', | |
'E01040001'=>'オーダーIDが指定されていません。', | |
'E01040003'=>'オーダーIDが最大文字数を超えています。', | |
'E01040010'=>'既にオーダーIDが存在しています。', | |
'E01040013'=>'オーダーIDに不正な文字が存在します。', |
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
.post_content{ | |
header { | |
margin-bottom: 55px; | |
} | |
h2 { | |
font-size : 18px; | |
line-height : 33.25px; | |
letter-spacing : 0.72px; | |
color : #1C3775; | |
} |
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
■ DL&設置 | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
■ 移動 | |
~/usr/local/bin/wp/wp-cli.phar | |
■ bashでコマンド化 |
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 | |
// http://concrete5-japan.org/help/5-7/developer/working-with-pages/searching-and-sorting-with-the-pagelist-object/ | |
$list = new \Concrete\Core\Page\PageList(); | |
//ページタイプでフィルター | |
$list->filterByPageTypeHandle('blog_entry'); | |
//複数のタイプでフィルター | |
$list->filterByPageTypeHandle(array('blog_entry', 'press_release')); | |
//キーワードでフィルター(シンプル) |
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
import * as gd from "generative-design-library.js"; | |
import * as p5 from 'p5'; | |
let s = (sk) => { | |
let img; | |
let colors = []; | |
let sortMode = null; | |
let strokeColor; | |
const sc = new SortColors(sk); |
NewerOlder