Created
April 24, 2016 10:13
-
-
Save twlca/19c42de2f6e9bb4418fd83d1475a529d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Plugin Name: 愛德資訊系統 | |
* Plugin URI: | |
* Author: 饒裕奇 | |
* Author URI: | |
* Version: 0.0.1 | |
* Description: 結合社工與志工的資料庫 | |
* License | |
* Text Domain: lca_docs | |
**/ | |
?> | |
<?php | |
/** | |
* 建立 CPT lca_new_cpt_formal_docs | |
* | |
* 建立包含公文收文及發文摘要文件 | |
* | |
**/ | |
function lca_new_cpt_formal_docs() { | |
$post_type = 'formal_docs'; | |
$labels = array( | |
'name' => _x( '公文總覽', '', ''), | |
'singular_name' => _x( '公文摘要', '', ''), | |
'menu_name' => __( '公文彙整系統', '' ), | |
'add_new' => __( '新增公文', '' ), | |
'add_new_item' => __( '新增公文摘要', '' ), | |
'edit_item' => __( '編輯公文摘要', '' ), | |
'view_all' => __( '檢視公文', '' ), | |
'search_items' => __( '搜尋公文摘要', '' ), | |
'not_found' => __( '沒有找到符合條件的公文摘要', '' ), | |
'not_found_in_trash' => __( '沒有在回收筒中找到符合條件的公文摘要', '' ), | |
); | |
$args = array | |
'public' => true, | |
'show_ui' => true, | |
'show_in_menu' => '', | |
'show_in_admin_bar' => true, | |
'has_archive' => true, | |
'capability_type' => 'formal_doc', | |
'menu_icon' => 'dashicons-media-document', | |
'description' => '提供公文摘要輸入與查詢', | |
'publicly_queriable' => true, | |
'query_var' => true, | |
'hierarchical' => false, | |
); | |
register_post_type( $post_type, $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment