Created
June 5, 2012 19:04
-
-
Save sergiopvilar/2877028 to your computer and use it in GitHub Desktop.
Snippet para criação de Post Types com o Turumim Framework
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
| <snippet> | |
| <content><![CDATA[ | |
| \$labels = array( | |
| 'name' => _x('${1:SELECTION}s', 'post type general name'), | |
| 'singular_name' => _x('${1:SELECTION}', 'post type singular name'), | |
| 'add_new' => _x('Cadastrar novo', 'edital item'), | |
| 'add_new_item' => __('Cadastrar novo'), | |
| 'edit_item' => __('Editar'), | |
| 'new_item' => __('Cadastrar novo'), | |
| 'view_item' => __('Visualizar'), | |
| 'search_items' => __('Procurar'), | |
| 'not_found' => __('Nada encontrado'), | |
| 'not_found_in_trash' => __('Nada enontrado na lixeira'), | |
| 'parent_item_colon' => '' | |
| ); | |
| \$type['${2:site}'] = array( | |
| 'labels' => $labels, | |
| 'public' => true, | |
| 'publicly_queryable' => true, | |
| 'show_ui' => true, | |
| 'show_in_menu' => true, | |
| 'query_var' => true, | |
| 'rewrite' => array('slug'=>'${2:site}s','with_front'=>true), | |
| 'capability_type' => 'post', | |
| 'has_archive' => true, | |
| 'hierarchical' => false, | |
| 'menu_position' => 5, | |
| 'menu_icon' => IMAGES_URL . '${2:site}.png', | |
| 'supports' => array( 'title', '${2:thumbnail}') | |
| ); | |
| ]]></content> | |
| <tabTrigger>wp-</tabTrigger> | |
| <scope>source.php</scope> | |
| </snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment