Skip to content

Commit

Permalink
不要なglobal $post;を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Mar 12, 2017
1 parent e620f8a commit 3c50bd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion lib/comment.php
Expand Up @@ -91,4 +91,4 @@ function simplicity_comment_form_after() {
}
}
endif;
add_action( 'comment_form_after', 'simplicity_comment_form_after' );
add_action( 'comment_form_after', 'simplicity_comment_form_after' );
9 changes: 0 additions & 9 deletions lib/custom-field.php
Expand Up @@ -35,8 +35,6 @@ function add_custom_boxes(){
// コメント設定
///////////////////////////////////////
function view_comment_custom_box(){
global $post;

$is_comment_form_freeze = get_post_meta(get_the_ID(),'is_comment_form_freeze', true);
$comment_form_freeze_message = get_post_meta(get_the_ID(),'comment_form_freeze_message', true);

Expand Down Expand Up @@ -85,8 +83,6 @@ function get_comment_form_freeze_message(){
// AdSenseの設定
///////////////////////////////////////
function view_ad_custom_box(){
global $post;

$is_ads_removed_in_page = get_post_meta(get_the_ID(),'is_ads_removed_in_page', true);

echo '<label><input type="checkbox" name="is_ads_removed_in_page"';
Expand Down Expand Up @@ -116,8 +112,6 @@ function is_ads_removed_in_page(){
// SEO設定
///////////////////////////////////////
function view_seo_custom_box(){
global $post;

$seo_title = get_post_meta(get_the_ID(),'seo_title', true);
$seo_title = htmlspecialchars($seo_title);
$meta_description = get_post_meta(get_the_ID(),'meta_description', true);
Expand Down Expand Up @@ -244,7 +238,6 @@ function get_meta_robots_tag(){
// ページ設定
///////////////////////////////////////
function view_page_custom_box(){
global $post;
$page_type = get_post_meta(get_the_ID(),'page_type', true);

//ページタイプ
Expand Down Expand Up @@ -349,8 +342,6 @@ function get_main_column_width(){
// AMP設定
///////////////////////////////////////
function view_amp_custom_box(){
global $post;

//$is_noamp = '';
$is_noamp = get_post_meta(get_the_ID(),'is_noamp', true);
// //初期値が空文字のとき「AMPを有効にする」のデフォルト値をonにする(無効にする場合のnullの場合は何もしない)
Expand Down

0 comments on commit 3c50bd1

Please sign in to comment.