This file contains hidden or 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
| // add_action() で登録されたアクションフックを実行します。 | |
| // この関数が記述されているところがアクションフックを実行している箇所ともいえる | |
| <?php | |
| // $tag 必須 実行したいアクションフック名 | |
| // $arg 任意 第一引数で実行するアクションフックにわたすパラメタ 省略すると空が渡る | |
| function do_action( $tag, $arg = '' ) { | |
| // グローバル変数 | |
| // $wp_filter フィルターとアクションをすべて格納 | |
| // $wp_actions アクションが呼び出された回数 | |
| // $wp_current_filter 現在呼び出されているフィルターフックまたはアクションフックの名前を取得 |
This file contains hidden or 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 | |
| // 言語属性を取得 | |
| function language_attributes( $doctype = 'html' ) { | |
| // ドキュメントタイプを出力(言語) | |
| // 対象範囲が限定なら直接書いたほうがサーバにアクセスしない分早く出力できそうかも | |
| echo get_language_attributes( $doctype ); | |
| } |
This file contains hidden or 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 | |
| // 言語属性の取得 | |
| function get_language_attributes( $doctype = 'html' ) { | |
| $attributes = array(); | |
| // is_rtl() ロケールが RTL (Right To Left: アラビア語やヘブライ語のように右から左へ記述する言語) であるか否かをチェックする関数 | |
| if ( function_exists( 'is_rtl' ) && is_rtl() ) { | |
| $attributes[] = 'dir="rtl"'; | |
| } | |
| // get_bloginfo( 'language' ) はこの関数が呼ばれた時にそのときの言語を返却する |
This file contains hidden or 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 | |
| // 初期値 | |
| // $show:'', $filter: 'raw' | |
| function get_bloginfo( $show = '', $filter = 'raw' ) { | |
| // 第一引数に指定した文字列をもとに実行する箇所を決める | |
| switch ( $show ) { | |
| // 非推奨 | |
| case 'home': // DEPRECATED | |
| // 非推奨 | |
| case 'siteurl': // DEPRECATED |
This file contains hidden or 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 | |
| function _deprecated_argument( $function, $version, $message = null ) { | |
| /** | |
| * Fires when a deprecated argument is called. | |
| * | |
| * @since 3.0.0 | |
| * | |
| * @param string $function The function that was called. | |
| * @param string $message A message regarding the change. |
This file contains hidden or 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
| package diary; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.time.LocalDate; | |
| public class Diary { | |
| enum Date { |
This file contains hidden or 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
| package nikki2; | |
| import java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.logging.Logger; |
This file contains hidden or 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
| javascript:(function(){ document.getElementById("account").value="loginName";document.getElementById("password").value="loginpassword";})(); |
This file contains hidden or 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
| /* | |
| key-value形式で管理する設定情報を扱うクラス | |
| 全てのユーザーがアクセスできるプロパティストアを扱う | |
| */ | |
| function Property () { | |
| // クラス内使いまわすためにPropertiesService.getScriptProperties()の呼び出し結果を保存 | |
| this.service = PropertiesService.getScriptProperties() | |
| /* | |
| 設定情報を設定する関数 |