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 | |
// 一行目はシンタックスハイライトするために追加しています。 | |
// ******************************** | |
// ****** ここから、個人的な設定 ****** | |
// この部分は、サイト運用者で必要か判断 | |
// 自動保存の無効化 | |
function disable_autosave() { | |
wp_deregister_script('autosave'); |
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 | |
// 一行目はシンタックスハイライトするために追加しています。 | |
//****** 自前のグローバル変数 ****** | |
$my_travel_category_default = '旅行全般'; | |
$my_cake_category_default = 'ケーキ全般'; | |
// カスタム投稿タイプでカテゴリ未選択時にデフォルトを設定 | |
function add_defaultcategory_automatically_travel($post_ID) { | |
global $wpdb; |
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 | |
// 一行目はシンタックスハイライトするために追加しています。 | |
// bbpressのパンくずを非表示 | |
add_filter( 'bbp_no_breadcrumb', '__return_true' ); |
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 if(is_user_logged_in()){ ?> | |
<div class="user-name">こんにちは <?php global $current_user; echo $current_user->display_name ?> さん</div> | |
<?php } elseif (is_front_page()) { | |
dynamic_sidebar('top_main_widget'); | |
} ?> |
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 //インデックスページや投稿ページで表示されるカテゴリーリンク | |
if ( is_category_visible() ): //カテゴリを表示する場合?> | |
<?php if ( get_the_category() ) : //投稿ページの場合?> | |
// | |
// 略 | |
// | |
<?php else : //カスタム投稿の場合 ?> | |
<?php global $my_post_icon; |
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 | |
// 一行目はシンタックスハイライトするために追加しています。 | |
// rssにカスタム投稿記事も追加する | |
function mysite_feed_request($vars) { | |
if ( isset( $vars['feed'] ) && !isset( $vars['post_type'] ) ) { | |
$vars['post_type'] = array( | |
'post', | |
'travel', | |
'cake' |
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 | |
// 一行目はシンタックスハイライトするために追加しています。 | |
// Never Let Me Goで編集者/管理者権限は退会させない。 | |
function my_nlmg_validate_user( $errobj, $user_id ) | |
{ | |
$user = get_userdata( $user_id ); | |
if( empty($user) || | |
in_array( 'editor', $user->roles ) || in_array( 'administrator', $user->roles ) ) { | |
return new WP_Error( 'Error', '編集者/管理者権限のユーザーアカウント削除は管理画面より行ってください。' ); |
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-Membersのカスタマイズ ****** | |
//usernameをチェックするプラグインRestrict Usernamesを入れたため、メッセージを変更 | |
function my_default_text_strings( ) { | |
$text = array('reg_non_alphanumeric' => 'ログインIDは、 半角英数字、「 - (ハイフン)」、「 _ (アンダースコア)」が使用できます。また、除外文字列を含めることはできません。<br >除外文字列については「利用規約(TOS)」に記述しています。'); | |
return $text; |
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
.ccm-block-rss-displayer-item { | |
margin-bottom: 16px; | |
} | |
.rssItemThumbnail img { | |
max-width: 125px; | |
height: auto; | |
border-radius: 20px; | |
-webkit-border-radius: 20px; | |
-moz-border-radius: 20px; |
OlderNewer