1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【管理画面非表示】力技でパスワード保護やステータスを消す

Last updated at Posted at 2012-04-10

僕には、こんなやり方しか思いつかなかったよ。
functions.phpに書き足して使います。
記事の編集ページで、公開のpostboxの項目「パスワード保護」と「ステータス」を非表示にしています。

function my_head() {
  echo '<script type="text/javascript">
jQuery(document).ready(function($){
	$("#minor-publishing .misc-pub-section").each(function(i){
		if(i == 0){
			$(this).css("display","none");
		} else if(i == 1){
			$("#post-visibility-select #visibility-radio-password").css("display","none").next().css("display","none").next().remove();
		}
	});
	$("#the-list .editinline").click(function(){
		$(this).find(".inline-edit-col").css("display","none");
	});
	
});
  </script>';
}
add_action('admin_head', 'my_head', 11);
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?