Home Blog wp_Dev. function admin 컬러 디자인 등록 및 기본색으로 설정하기

admin 컬러 디자인 등록 및 기본색으로 설정하기

admin color scheme change
관리자를 위한 새로운 컬러 디자인을 등록하고 전체적인 사이트 분위기와 유사한 색으로 설정하는 방법.
먼저, 기본적인 컬러 css 구조는 ‘wp-admin/css/colors/ 내에 있는 색 조합 css 파일을 이용하면 기본적인 구조를 갖출 수 있다. ?원하는 컬러 디자인의 css 파일을 복사 후, 현재 작업 중인 테마의 폴더 내에 넣고, 복사해 놓은 css를 열어서 원하는 색으로 치환해서 저장. (크게 4가지 색) 새로운 색 조합의 이름을 워드프레스에 등록 후 그것을 디폴트 설정하면 끝.
/* admin color scheme regist */
function wpt_admin_color_schemes() {
      $theme_dir = get_stylesheet_directory_uri();
      wp_admin_css_color( 'dromeda', __( 'Dromeda' ), $theme_dir . '/admin-colors/dromeda/colors.css', array( '#1F2C39', '#2c3e50', '#00a685', '#3cc7ab' ));
}
add_action('admin_init', 'wpt_admin_color_schemes');

/* default admin color set */
add_filter('get_user_option_admin_color', 'change_admin_color');
function change_admin_color($result) {
      return 'dromeda';
}

 

2 댓글. Leave new

  • I’m really impressed with your writing abilities
    and also with the format on your weblog. Is that this a paid theme or did you customize it yourself?

    Either way stay up the excellent high quality writing,
    it is uncommon to peer a great weblog like this
    one today..

    응답

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Fill out this field
Fill out this field
유효한 이메일 주소를 입력해주세요.
You need to agree with the terms to proceed

다음
이미지 업로드 시 자동생성되는 추가 이미지 관리
이전
Sub Categories Widget