Skip to content

Instantly share code, notes, and snippets.

@sergiopvilar
Created June 5, 2012 19:04
Show Gist options
  • Select an option

  • Save sergiopvilar/2877028 to your computer and use it in GitHub Desktop.

Select an option

Save sergiopvilar/2877028 to your computer and use it in GitHub Desktop.
Snippet para criação de Post Types com o Turumim Framework
<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