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 | |
/** | |
* ページ番号リンクの表示 | |
* @param int $totalPage データの最大件数 | |
* @param int $page 現在のページ番号 | |
* @param int $pageRange $pageから前後何件のページ番号を表示するか | |
*/ | |
function paging2($totalPage, $page = 1, $pageRange = 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
<template> | |
<div id="app"> | |
<div class="content"> | |
<ol> | |
<li v-for="(item, i) in filterItems" :key="i">{{item}}</li> | |
</ol> | |
</div> | |
<prev-next :page="page" :totalPage="totalPage" @change="onPageChange"/> | |
</div> | |
</template> |
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
<template> | |
<div class="pagination"> | |
<a | |
:href="`?page=${prevPage}`" | |
class="prev" | |
v-if="currentPage > 1" | |
@click.prevent="onPrev" | |
>< 前へ</a> | |
<div class="total">ページ {{currentPage}}/{{totalPage}}</div> | |
<a |
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
<template> | |
<div id="app"> | |
<div class="content"> | |
<ol> | |
<li v-for="(item, i) in items" :key="i">{{item}}</li> | |
</ol> | |
</div> | |
</div> | |
</template> |
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
<template> | |
<div id="app"> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "App", | |
components: {}, | |
}; |
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
<template> | |
<div> | |
<p>{{id}}</p> | |
<div>{{profile}}</div> | |
</div> | |
</template> | |
<script> | |
let cacheData = null; | |
export default { | |
name: 'user-index', |
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 | |
/** | |
* 味気ないwp_dieの出力を変更する | |
*/ | |
class CustomDie { | |
public function __cosntruct() { | |
} | |
public function enable_custom_die() { |
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
// モーダル開閉時のフォーカス操作(モーダルのルート要素にtabindex=0必要) | |
$('.uk-modal').on('show', (e) => { | |
$(e.target).data('lastFocusdElement', window.document.activeElement).focus(); | |
}).on('hide', (e) => { | |
$(e.target).data('lastFocusdElement').focus(); | |
}); |
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 percentage-vw($num) { | |
$per: ($num * 100); | |
@return #{$per}vw; | |
} | |
@mixin responsive-width($width, $base: 750px) { | |
width: percentage($width / $base); | |
max-width: $width; | |
} |
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
add_filter( 'rest_endpoints', function( $endpoints ){ | |
if ( isset( $endpoints['/wp/v2/posts'] ) ) { | |
unset( $endpoints['/wp/v2'] ); | |
} | |
if ( isset( $endpoints['/wp/v2/posts'] ) ) { | |
unset( $endpoints['/wp/v2/posts'] ); | |
} | |
if ( isset( $endpoints['/wp/v2/posts'] ) ) { | |
unset( $endpoints['/wp/v2/posts'] ); | |
} |