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
function mysm_widgets_init() { | |
register_sidebar( array( | |
'name' => 'テスト: 本文上', | |
'id' => 'mysm-widget-test-main-top', | |
'before_widget' => '<div id="%1$s" class="c-widget widget_block">', | |
'after_widget' => '</div>', | |
) ); | |
} |
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
function mysm_render_meta( $html, $name, $vars ) { | |
if( ( get_post_type() === 'test' ) || ( is_post_type_archive( 'test' ) ) ) { | |
$html = <<< EOL | |
<div class="c-entry-summary__meta"> | |
<ul class="c-meta"> | |
<li class="c-meta__item c-meta__item--sample"> | |
EOL; | |
$html .= get_field('sample'); |
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
{"class_name":"","html":"<!-- mt-beb t=\"core-context\" m='{\"1\":{\"label\":\"見出しの文字列\",\"className\":\"mt-admin-title-label\"},\"2\":{\"options\":\"デザイン:装飾なし左寄せ\\nデザイン:装飾なし中央寄せ\\nデザイン:下線左寄せ\\nデザイン:下線中央寄せ\\nデザイン:網掛け\\nデザイン:マーク付き\",\"blockElement\":\"p\",\"text\":\"デザイン:装飾なし左寄せ\",\"label\":\"見出しのデザイン\",\"className\":\"mt-admin-title-design\"},\"3\":{\"options\":\"サイズ:極大\\nサイズ:大\\nサイズ:中\\nサイズ:小\\nサイズ:極小\\nサイズ:極々小\",\"blockElement\":\"\",\"text\":\"サイズ:中\",\"label\":\"見出しのサイズ\"},\"4\":{\"options\":\"タグ:h1\\nタグ:h2\\nタグ:h3\\nタグ:h4\\nタグ:h5\\nタグ:h6\\nタグ:p\",\"blockElement\":\"\",\"text\":\"タグ:h3\",\"label\":\"見出しタグ\",\"helpText\":\"見出しに使用するHTMLタグを選択してください。\"}}' --><!-- /mt-beb --><!-- mt-beb m='1' --><p class=\"mt-admin-title-label\">見出しの文字列を入力してください</p><!-- /mt-beb --><!-- mt-beb t=\"sixapart-select\" m='2' --><p class=\"mt-admin-title-design\">デザイン:装飾なし左寄せ</p><!-- /mt-beb --><!-- mt-beb t=\"sixapart-select\" m='3' -->サイズ:中<!-- /mt-beb --><!-- mt-beb t=\"sixapart-select\" m='4' -->タグ:h3<!-- /mt-beb -->","icon":"da |
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
<mt:Ignore> | |
# ======================= | |
# | |
# カスタムブロック-グループ | |
# | |
# vars: | |
# __group_html__ | |
# __group_class__ | |
# __group_exclass__ | |
# __group_align__ |
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
<mt:Ignore> | |
# ======================= | |
# | |
# カスタムブロック-高度なテーブル | |
# | |
# vars: | |
# __table_html__ | |
# __table_type__ | |
# __table_class__ | |
# |
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
var mcMakePost = function( obj, title_tag = 'h2' ) { | |
var item = ""; | |
for( var i = 0; i < obj.length; ++i ){ | |
item += "<article class=\"c-post\">"; | |
item += "<div class=\"c-post-object\"><div class=\"m-thumbnail\"><img src=\"" | |
item += obj[i].post_image.url | |
item += "\"></div></div>"; |
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> | |
ACMS.Ready(function() { | |
var f = $('form#entryForm'); | |
var current_rccd = '%{RCCD}'; | |
var current_ccd = '%{CCD}'; | |
var current_cname = '%{CATEGORY_NAME}'; | |
var current_eid = '%{EID}'; | |
// ここにスクリプトを書きます |
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
function WS_remove_block_editor( $user_block_editor, $post ) { | |
if ( $post->post_type === 'acf-field-group' ) { | |
$use_block_editor = false; | |
} else { | |
$use_block_editor = true; | |
} | |
return $use_block_editor; | |
} | |
add_filter( 'use_block_editor_for_post', 'WS_remove_block_editor', 10, 2 ); |
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
class ACMS_User_Corrector | |
{ | |
/** | |
* distance | |
* 数値を距離に変換する | |
* | |
* @param string $txt - 校正オプションが適用されている文字列 | |
* @return string - 校正後の文字列 | |
*/ |
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
ACMS.addListener("acmsAfterPostInclude", function() { | |
//ここに処理が入ります。 | |
FONTPLUS.reload(); | |
}, $('.js-post_include').get(0)); |
NewerOlder