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 | |
//キャプションにaria-labelledbyを付ける | |
add_shortcode('caption', 'my_img_caption_shortcode'); | |
function my_img_caption_shortcode( $attr, $content = null ) { | |
// New-style shortcode with the caption inside the shortcode with the link and image tags. | |
if ( ! isset( $attr['caption'] ) ) { | |
if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) { | |
$content = $matches[1]; | |
$attr['caption'] = trim( $matches[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
//配列をリバース | |
@function reverse($list) { | |
$result: (); | |
@for $i from length($list)*-1 through -1 { | |
$result: append($result, nth($list, abs($i)), comma); | |
} | |
@return $result; | |
} |
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
// ---- | |
// libsass (v3.3.6) | |
// ---- | |
$z-index:( | |
// ↑レイヤー上 | |
child, | |
pulldown, | |
nav, | |
header |
OlderNewer