Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lumpysimon/5211982 to your computer and use it in GitHub Desktop.
Save lumpysimon/5211982 to your computer and use it in GitHub Desktop.
Sublime Text snippet: WordPress register_extended_post_type PHP
<snippet>
<content><![CDATA[
${1: if ( function_exists( 'register_extended_post_type' ) ) \{
}${3: } register_extended_post_type(
${3: } '${4:name}',
${3: } array(
${3: }${16: ${5:'capability_type' => 'post',
${3: } }${6:'hierarchical' => false,
${3: } }${7:'menu_position' => ${8:99},
${3: } }${9:'public' => false,
${3: } }${10:'publicly_queryable' => false,
${3: } }'right_now' => true,
${3: } ${11:'show_ui' => true,
${3: } }${12:'supports' => array( 'title', 'editor' ),
${3: } }${13:'featured_image' => '$14'}${15:,
${3: } }
${3: }} )
${3: } );
${2:
\}}]]></content>
<tabTrigger>lwprept</tabTrigger>
<scope>source.php</scope>
<description>register_extended_post_type (Lumpy WordPress PHP)</description>
</snippet>
@lumpysimon
Copy link
Author

Step 16 selects all array elements so that alignment can be done with Ctrl-Alt-A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment