プラグインの作り方 投稿記事を置き換える
add_filter('the_content','wp_shortlink');add_filter(‘the_content’,’変換する関数名’);
もちろん、変換部は、
function wp_shortlink($content) { 変換本体 : return($content); }変換すべき内容は、$content に入ってくる。
変換結果をreturnしてやればいい。
スポンサーリンク
add_filter('the_content','wp_shortlink');add_filter(‘the_content’,’変換する関数名’);
function wp_shortlink($content) { 変換本体 : return($content); }変換すべき内容は、$content に入ってくる。
スポンサーリンク
スポンサーリンク
特殊文字
シングルクォート : '
ダブルクォート : "
WP設定内表示前処理(htmlタグ許可項目)
$str = str_replace(‘<','<' ,$str);
$str = str_replace(‘>’,’>’ ,$str);
$str = str_replace(‘\”‘,’"’,$str);
$str = str_replace(“\'”,’'’ ,$str);
WO設定項目表示前処理(htmlタグ許可項目)
$str = str_replace(‘\”‘,'”‘,$str);
$str = str_replace(“\'”,”‘”,$str);
・テーマ
get_theme_root_uri()
get_theme_root()
・WP 情報
get_bloginfo( $show )
・Wp config FTP 情報 設置
define( ‘FTP_HOST’, ‘host’ );
define( ‘FTP_USER’, ‘id’ );
define( ‘FTP_PASS’, ‘pw’ );
define( ‘FTP_SSL’, false );
弾に使う
placeholder:ユーザー入力補助
Copyright © ゆずまるの技術情報 | HTML,CSS,PHP,ワードプレスカスタマイズ 技術情報資料