/** * ドメイン非依存URL出力フィルタ * javadrill.tech移行時はwp_options.home/siteurlのみ変更すればよい * * データベースには絶対URL(https://minner.asia)を保持し、 * 表示時に現在のドメイン(home_url())に動的変換する */ function javadrill_make_urls_dynamic($content) { if (empty($content)) { return $content; } // データベース内の絶対URLを現在のhome_url()に置換 $old_url = 'https://minner.asia'; $new_url = untrailingslashit(home_url()); // http版も対応(念のため) $content = str_replace($old_url, $new_url, $content); $content = str_replace('http://minner.asia', $new_url, $content); return $content; } // 投稿本文、ウィジェット、タームの説明、抜粋に適用 add_filter('the_content', 'javadrill_make_urls_dynamic', 20); add_filter('widget_text', 'javadrill_make_urls_dynamic', 20); add_filter('term_description', 'javadrill_make_urls_dynamic', 20); add_filter('get_the_excerpt', 'javadrill_make_urls_dynamic', 20); 013 クラスライブラリ | ページ 5 | Javaドリル

013 クラスライブラリ

013 クラスライブラリ

013 クラスライブラリ(文字列を扱うクラス) 002解答例

文字列の結合:public class StringConcatenation { public static void main(String[] args) { // 2つの文字列 Strin...
013 クラスライブラリ

013 クラスライブラリ(文字列を扱うクラス) 002 問題

問題2つの文字列を結合するプログラムを作成してください。また、カンマで区切られたæ–...
013 クラスライブラリ

013 クラスライブラリ(文字列を扱うクラス) 001 解答例

public class ReverseString { public static void main(String[] args) { // 入力として与えられた文字列 String ...
013 クラスライブラリ

013 クラスライブラリ(文字列を扱うクラス) 001 問題

問題与えられた文字列を逆順にするプログラムを作成してください。例: 入力が “Hello” のå...