├── Package Control.user-ca-bundle ├── Package Control.last-run ├── Default (Linux).sublime-keymap ├── Default (OSX).sublime-keymap ├── Default (Windows).sublime-keymap ├── README.md ├── 3024_Day.tmTheme.cache ├── Afterglow.tmTheme.cache ├── Preferences.sublime-settings ├── Package Control.cache └── 01524fae79697630d0454ba3fabd9414.info ├── Package Control.sublime-settings ├── .gitignore ├── template_dir.sublime-snippet ├── custom-editor-style.sublime-snippet ├── scriptlink.sublime-snippet ├── getstylesheetdirectoryuri.sublime-snippet ├── Theme_Head.sublime-snippet ├── The_Loop.sublime-snippet ├── shortcode.sublime-snippet ├── custom-footer-text.sublime-snippet ├── custom-login-url.sublime-snippet ├── remove-screen-options.sublime-snippet ├── wysiwygbuttons.sublime-snippet ├── custom-admin-logo.sublime-snippet ├── custom-login-logo.sublime-snippet ├── add-dashboard-widget.sublime-snippet ├── Register_Sidebar.sublime-snippet ├── deactivate-widgets.sublime-snippet ├── Register-nav-menu.sublime-snippet ├── remove-dashboard-widgets.sublime-snippet ├── adminbar.sublime-snippet ├── disablecomments.sublime-snippet ├── Register-taxonomy.sublime-snippet ├── wordpress-custom-admin.sublime-snippet ├── Register-post-type.sublime-snippet ├── 3024_Day.tmTheme ├── custom-meta-boxes.sublime-snippet └── Afterglow.tmTheme /Package Control.user-ca-bundle: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Package Control.last-run: -------------------------------------------------------------------------------- 1 | 1430648480 -------------------------------------------------------------------------------- /Default (Linux).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /Default (Windows).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | #Wordpress Snippets for Sublime2 -------------------------------------------------------------------------------- /3024_Day.tmTheme.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/Sublime-Snippets-julianweiland/master/3024_Day.tmTheme.cache -------------------------------------------------------------------------------- /Afterglow.tmTheme.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/Sublime-Snippets-julianweiland/master/Afterglow.tmTheme.cache -------------------------------------------------------------------------------- /Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/User/Afterglow.tmTheme", 3 | "ignored_packages": 4 | [ 5 | "Vintage" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /Package Control.cache/01524fae79697630d0454ba3fabd9414.info: -------------------------------------------------------------------------------- 1 | { 2 | "last-modified": "Sun, 03 May 2015 10:20:04 GMT", 3 | "etag": "\"5545f654-32df8\"" 4 | } -------------------------------------------------------------------------------- /Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "in_process_packages": 3 | [ 4 | ], 5 | "installed_packages": 6 | [ 7 | "Package Control", 8 | "Search WordPress Codex" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | Package Control.cache/01524fae79697630d0454ba3fabd9414 3 | 4 | Package Control.cache/01524fae79697630d0454ba3fabd9414 5 | 6 | *.info 7 | 8 | Package Control.last-run 9 | 10 | Package Control.merged-ca-bundle 11 | 12 | Package Control.sublime-settings 13 | 14 | Package Control.system-ca-bundle 15 | -------------------------------------------------------------------------------- /template_dir.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]]> 5 | 6 | template_dir 7 | 8 | 9 | -------------------------------------------------------------------------------- /custom-editor-style.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | editorstyle 8 | 9 | source.php 10 | 11 | -------------------------------------------------------------------------------- /scriptlink.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]]> 5 | 6 | scriptlink 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /getstylesheetdirectoryuri.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]]> 5 | 6 | getstylesheet --> 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Theme_Head.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 15 | Theme Head 16 | themehead 17 | source.css 18 | 19 | -------------------------------------------------------------------------------- /The_Loop.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | ${1:} 5 | 6 | ${2:} 7 | 8 | ${0:} 9 | 10 | ]]> 11 | The Loop 12 | theloop 13 | source.php - variable.other.php 14 | 15 | -------------------------------------------------------------------------------- /shortcode.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${3:value}' 6 | ), $atts ) ); 7 | return '${4:what to return}'; 8 | } 9 | add_shortcode( '${5:shortcode name}', '${1:function name}' ); 10 | ]]> 11 | 12 | shortcode 13 | 14 | 15 | -------------------------------------------------------------------------------- /custom-footer-text.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | footertext 13 | 14 | 15 | 16 | Edit the footer text in wordpress admin area 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /custom-login-url.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | loginurl 14 | 15 | 16 | 17 | Change the url of login logo 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /remove-screen-options.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | removescreenoptions 11 | 12 | 13 | 14 | Edit the footer text in wordpress admin area 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /wysiwygbuttons.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | wysiwygbuttons 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /custom-admin-logo.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/${1:yout_file_name.png}) !important; } 8 | '; 9 | } 10 | add_action('admin_head', 'custom_admin_logo'); 11 | 12 | ]]> 13 | 14 | adminlogo 15 | 16 | 17 | 18 | Add a custom admin logo 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /custom-login-logo.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | h1 a { background-image:url('.get_bloginfo('template_directory').'/images/${1:yout_file_name.png}) !important; } 8 | '; 9 | } 10 | add_action('login_head', 'custom_login_logo'); 11 | 12 | ]]> 13 | 14 | loginlogo 15 | 16 | 17 | 18 | Add a custom logo to login screen 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /add-dashboard-widget.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 |

Hello Wordpress user!

7 |

Fill this with HTML or PHP.

8 |
16 | 17 | dashwidget 18 | 19 | 20 | 21 | Add a custom dashboard widget 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Register_Sidebar.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( '${4:Sidebar name}', '${5:theme_text_domain}' ),} 9 | ${6:'id' => '${7:unique-sidebar-id}',} 10 | ${8:'description' => '${9}',} 11 | ${10:'class' => '${11}',} 12 | ${12:'before_widget' => '${13:
  • }',} 13 | ${14:'after_widget' => '${15:
  • }',} 14 | ${16:'before_title' => '${17:

    }',} 15 | ${18:'after_title' => '${19:

    }'} 16 | }); 17 | 18 | register_sidebar( ${1:\$args} ); 19 | 20 | ]]>
    21 | 22 | registersidebar 23 | 24 | source.php - variable.other.php 25 | register_sidebar All Options 26 |
    -------------------------------------------------------------------------------- /deactivate-widgets.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | deactivatewidgets 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Register-nav-menu.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${4}',} 9 | ${5:'menu' => '${6}',} 10 | ${7:'container' => '${8:div}',} 11 | ${9:'container_class' => '${10:menu-\{menu-slug\}-container}',} 12 | ${11:'container_id' => '${12}',} 13 | ${13:'menu_class' => '${14:menu}',} 14 | ${15:'menu_id' => '${16}',} 15 | ${17:'echo' => ${18:true},} 16 | ${19:'fallback_cb' => '${20:wp_page_menu}',} 17 | ${21:'before' => '${22}',} 18 | ${23:'after' => '${24}',} 19 | ${25:'link_before' => '${26}',} 20 | ${27:'link_after' => '${28}',} 21 | ${29:'items_wrap' => '${30:}',} 22 | ${31:'depth' => ${32:0},} 23 | ${33:'walker' => '${34}'} 24 | }); 25 | 26 | wp_nav_menu( ${1:\$args} ); 27 | ]]> 28 | 29 | registermenu 30 | 31 | source.php - variable.other.php 32 | wp_nav_menu All Options 33 | -------------------------------------------------------------------------------- /remove-dashboard-widgets.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | removedashwidget 21 | 22 | 23 | 24 | Remove the dashboard widgets 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /adminbar.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | remove_node( 'wp-logo' ); // Entfernt das WordPress-Logo 10 | //$wp_admin_bar->remove_node( 'site-name' ); // Entfernt den Namen der Seite 11 | $wp_admin_bar->remove_node( 'comments' ); // Entferne den Abschnitt "Kommentare" 12 | //$wp_admin_bar->remove_node( 'new-content' ); // Entfernt den Abschnitt "Neu" 13 | 14 | // Es ist auch möglich die Unterpunkte des Abschnitts "Neu" einzeln zu entfernen 15 | //$wp_admin_bar->remove_node( 'new-post' ); // Entfernt den Menüpunkt "Neuer Beitrag" 16 | $wp_admin_bar->remove_node( 'new-link' ); // Entfernt den Menüpunkt "Neuer Link" 17 | //$wp_admin_bar->remove_node( 'new-media' ); // Entfernt den Menüpunkt "Neue Datei" 18 | //$wp_admin_bar->remove_node( 'new-page' ); // Entfernt den Menüpunkt "Neue Seite" 19 | $wp_admin_bar->remove_node( 'new-user' ); // Entfernt den Menüpunkt "Neuer Benutzer" 20 | $wp_admin_bar->remove_node( 'search' ); // Entfernt den Menüpunkt "Suche" 21 | $wp_admin_bar->remove_node( 'updates' ); // Entfernt den Menüpunkt "Suche" 22 | }]]> 23 | 24 | adminbar 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /disablecomments.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | remove_menu('comments'); 38 | } 39 | add_action('wp_before_admin_bar_render', 'disable_menus_admin_bar_render');]]> 40 | 41 | disablecomments 42 | 43 | source.php 44 | 45 | -------------------------------------------------------------------------------- /Register-taxonomy.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | _x( '${4:Plural Name}', 'Taxonomy plural name', '${6:text-domain}' ), 18 | 'singular_name' => _x( '${5:Singular Name}', 'Taxonomy singular name', '${7:text-domain}' ), 19 | 'search_items' => __( 'Search ${4:Plural Name}', '${6:text-domain}' ), 20 | 'popular_items' => __( 'Popular ${4:Plural Name}', '${6:text-domain}' ), 21 | 'all_items' => __( 'All ${4:Plural Name}', '${6:text-domain}' ), 22 | 'parent_item' => __( 'Parent ${5:Singular Name}', '${7:text-domain}' ), 23 | 'parent_item_colon' => __( 'Parent ${5:Singular Name}', '${7:text-domain}' ), 24 | 'edit_item' => __( 'Edit ${5:Singular Name}', '${7:text-domain}' ), 25 | 'update_item' => __( 'Update ${5:Singular Name}', '${7:text-domain}' ), 26 | 'add_new_item' => __( 'Add New ${5:Singular Name}', '${7:text-domain}' ), 27 | 'new_item_name' => __( 'New ${5:Singular Name} Name', '${7:text-domain}' ), 28 | 'add_or_remove_items' => __( 'Add or remove ${4:Plural Name}', '${6:text-domain}' ), 29 | 'choose_from_most_used' => __( 'Choose from most used ${7:Plural Name}', '${6:text-domain}' ), 30 | 'menu_name' => __( '${5:Singular Name}', '${7:text-domain}' ), 31 | );} 32 | 33 | ${8:${9:\$args} = array( 34 | ${10:'labels' => ${3:\$labels},} 35 | ${11:'public' => ${12:true},} 36 | ${13:'show_in_nav_menus' => ${14:true},} 37 | ${15:'show_admin_column' => ${16:false},} 38 | ${17:'hierarchical' => ${18:false},} 39 | ${19:'show_tagcloud' => ${20:true},} 40 | ${21:'show_ui' => ${22:true},} 41 | ${23:'query_var' => ${24:true},} 42 | ${25:'rewrite' => ${26:true},} 43 | ${27:'query_var' => ${28:true},} 44 | ${29:'capabilities' => ${30:array()},} 45 | );} 46 | 47 | register_taxonomy( '${31:taxonomy-slug}', array( '${32:post}' ), ${9:\$args} ); 48 | } 49 | 50 | add_action( 'init', '${1:my_taxonomies_name}' ); 51 | ]]> 52 | 53 | registertaxonomy 54 | 55 | source.php - variable.other.php 56 | 57 | Register Taxonomy All Options 58 | -------------------------------------------------------------------------------- /wordpress-custom-admin.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 15 | h1 a { background-image:url('.get_bloginfo('template_directory').'/images/${2:yout_file_name.png}) !important; } 16 | '; 17 | } 18 | add_action('login_head', 'custom_login_logo'); 19 | 20 | 21 | /// add a custom admin logo 22 | function custom_admin_logo() { 23 | echo ''; 26 | } 27 | add_action('admin_head', 'custom_admin_logo'); 28 | 29 | 30 | /// custom footer text 31 | function remove_footer_admin () { 32 | echo '${4:insert your custom text}.'; 33 | } 34 | add_filter('admin_footer_text', 'remove_footer_admin'); 35 | 36 | 37 | /// remove unused dashboard widgets 38 | function remove_dashboard_widgets() { 39 | global \$wp_meta_boxes; 40 | unset(\$wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); 41 | unset(\$wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); 42 | unset(\$wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 43 | unset(\$wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); 44 | unset(\$wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); 45 | unset(\$wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); 46 | unset(\$wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); 47 | unset(\$wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); 48 | } 49 | add_action('wp_dashboard_setup', 'remove_dashboard_widgets' ); 50 | 51 | 52 | /// add a custom dashboard widget 53 | function ${5:your_dashboard_widget}() { ?> 54 |

    Hello Wordpress user!

    55 |

    Fill this with HTML or PHP.

    56 |
    68 | 69 | customadmin 70 | 71 | 72 | 73 | Change the appearance of wordpress admin ui 74 |
    75 | 76 | 77 | -------------------------------------------------------------------------------- /Register-post-type.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( '${4:Plural Name}', '${6:text-domain}' ), 15 | 'singular_name' => __( '${5:Singular Name}', '${6:text-domain}' ), 16 | 'add_new' => _x( 'Add New ${5:Singular Name}', '${6:Name}', '${6:text-domain}' ), 17 | 'add_new_item' => __( 'Add New ${5:Singular Name}', '${6:text-domain}' ), 18 | 'edit_item' => __( 'Edit ${5:Singular Namee}', '${6:text-domain}' ), 19 | 'new_item' => __( 'New ${5:Singular Name}', '${6:text-domain}' ), 20 | 'view_item' => __( 'View ${5:Singular Name}', '${6:text-domain}' ), 21 | 'search_items' => __( 'Search ${4:Plural Name}', '${6:text-domain}' ), 22 | 'not_found' => __( 'No ${4:Plural Name} found', '${6:text-domain}' ), 23 | 'not_found_in_trash' => __( 'No ${4:Plural Name} found in Trash', '${6:text-domain}' ), 24 | 'parent_item_colon' => __( 'Parent ${5:Singular Name}:', '${6:text-domains}' ), 25 | 'menu_name' => __( '${4:Plural Name}', '${6:text-domain}' ), 26 | );} 27 | 28 | ${8:${9:\$args} = array( 29 | 'labels' => ${3:\$labels}, 30 | ${10:'hierarchical' => ${11:false},} 31 | ${12:'description' => '${13:description}',} 32 | ${14:'taxonomies' => array(),} 33 | ${16:'public' => ${17:true},} 34 | ${18:'show_ui' => ${19:true},} 35 | ${20:'show_in_menu' => ${21:true},} 36 | ${22:'show_in_admin_bar' => ${23:true},} 37 | ${24:'menu_position' => ${25:null},} 38 | ${26:'menu_icon' => ${27:null},} 39 | ${28:'show_in_nav_menus' => ${29:true},} 40 | ${30:'publicly_queryable' => ${31:true},} 41 | ${32:'exclude_from_search' => ${33:false},} 42 | ${34:'has_archive' => ${35:true},} 43 | ${36:'query_var' => ${37:true},} 44 | ${38:'can_export' => ${39:true},} 45 | ${40:'rewrite' => ${41:true},} 46 | ${42:'capability_type' => '${43:post}',} 47 | ${44:'supports' => array( 48 | ${45:'${46:title}', '${47:editor}', '${48:author}', '${49:thumbnail}', 49 | '${50:excerpt}','${51:custom-fields}', '${52:trackbacks}', '${53:comments}', 50 | '${54:revisions}', '${55:page-attributes}', '${56:post-formats}' 51 | })} 52 | );} 53 | 54 | register_post_type( '${7:slug}', ${9:\$args} ); 55 | } 56 | 57 | add_action( 'init', '${1:prefix_register_name}' ); 58 | 59 | ]]> 60 | 61 | registerposttype 62 | 63 | source.php - variable.other.php 64 | 65 | Register Post Type All Options 66 | -------------------------------------------------------------------------------- /3024_Day.tmTheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | author 16 | Jan T. Sott 17 | name 18 | 3024 day 19 | comment 20 | https://github.com/idleberg/3024.tmTheme 21 | semanticClass 22 | theme.light.3024 23 | colorSpaceName 24 | sRGB 25 | gutterSettings 26 | 27 | background 28 | #f7f7f7 29 | divider 30 | #f7f7f7 31 | foreground 32 | #4a4543 33 | selectionBackground 34 | #f7f7f7 35 | selectionForeground 36 | #a5a2a2 37 | 38 | settings 39 | 40 | 41 | settings 42 | 43 | background 44 | #f7f7f7 45 | caret 46 | #4a4543 47 | foreground 48 | #4a4543 49 | invisibles 50 | #d6d5d4 51 | lineHighlight 52 | #d6d5d4 53 | selection 54 | #d6d5d4 55 | 56 | 57 | 58 | name 59 | Text 60 | scope 61 | variable.parameter.function 62 | settings 63 | 64 | foreground 65 | #4a4543 66 | 67 | 68 | 69 | name 70 | Comments 71 | scope 72 | comment, punctuation.definition.comment 73 | settings 74 | 75 | foreground 76 | #807d7c 77 | 78 | 79 | 80 | name 81 | Punctuation 82 | scope 83 | punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array 84 | settings 85 | 86 | foreground 87 | #4a4543 88 | 89 | 90 | 91 | name 92 | Delimiters 93 | scope 94 | none 95 | settings 96 | 97 | foreground 98 | #4a4543 99 | 100 | 101 | 102 | name 103 | Operators 104 | scope 105 | keyword.operator 106 | settings 107 | 108 | foreground 109 | #4a4543 110 | 111 | 112 | 113 | name 114 | Keywords 115 | scope 116 | keyword, keyword.control 117 | settings 118 | 119 | foreground 120 | #a16a94 121 | 122 | 123 | 124 | name 125 | Variables 126 | scope 127 | variable 128 | settings 129 | 130 | foreground 131 | #db2d20 132 | 133 | 134 | 135 | name 136 | Functions 137 | scope 138 | entity.name.function, meta.require, support.function.any-method 139 | settings 140 | 141 | foreground 142 | #01a0e4 143 | 144 | 145 | 146 | name 147 | Classes 148 | scope 149 | meta.class, support.class, entity.name.class, entity.name.type.class 150 | settings 151 | 152 | foreground 153 | #ed0c8c 154 | 155 | 156 | 157 | name 158 | Methods 159 | scope 160 | keyword.other.special-method 161 | settings 162 | 163 | foreground 164 | #01a0e4 165 | 166 | 167 | 168 | name 169 | Storage 170 | scope 171 | storage 172 | settings 173 | 174 | foreground 175 | #a16a94 176 | 177 | 178 | 179 | name 180 | Support 181 | scope 182 | support.function 183 | settings 184 | 185 | foreground 186 | #b5e4f4 187 | 188 | 189 | 190 | name 191 | Strings, Inherited Class 192 | scope 193 | string, constant.other.symbol, entity.other.inherited-class 194 | settings 195 | 196 | foreground 197 | #01a252 198 | 199 | 200 | 201 | name 202 | Integers 203 | scope 204 | constant.numeric 205 | settings 206 | 207 | foreground 208 | #ed0c8c 209 | 210 | 211 | 212 | name 213 | Floats 214 | scope 215 | none 216 | settings 217 | 218 | foreground 219 | #ed0c8c 220 | 221 | 222 | 223 | name 224 | Boolean 225 | scope 226 | none 227 | settings 228 | 229 | foreground 230 | #ed0c8c 231 | 232 | 233 | 234 | name 235 | Constants 236 | scope 237 | constant 238 | settings 239 | 240 | foreground 241 | #ed0c8c 242 | 243 | 244 | 245 | name 246 | Tags 247 | scope 248 | entity.name.tag 249 | settings 250 | 251 | foreground 252 | #db2d20 253 | 254 | 255 | 256 | name 257 | Attributes 258 | scope 259 | entity.other.attribute-name 260 | settings 261 | 262 | foreground 263 | #ed0c8c 264 | 265 | 266 | 267 | name 268 | Attribute IDs 269 | scope 270 | entity.other.attribute-name.id, punctuation.definition.entity 271 | settings 272 | 273 | foreground 274 | #01a0e4 275 | 276 | 277 | 278 | name 279 | Selector 280 | scope 281 | meta.selector 282 | settings 283 | 284 | foreground 285 | #a16a94 286 | 287 | 288 | 289 | name 290 | Values 291 | scope 292 | none 293 | settings 294 | 295 | foreground 296 | #ed0c8c 297 | 298 | 299 | 300 | name 301 | Headings 302 | scope 303 | markup.heading punctuation.definition.heading, entity.name.section 304 | settings 305 | 306 | fontStyle 307 | 308 | foreground 309 | #01a0e4 310 | 311 | 312 | 313 | name 314 | Units 315 | scope 316 | keyword.other.unit 317 | settings 318 | 319 | foreground 320 | #ed0c8c 321 | 322 | 323 | 324 | name 325 | Bold 326 | scope 327 | markup.bold, punctuation.definition.bold 328 | settings 329 | 330 | fontStyle 331 | bold 332 | foreground 333 | #ed0c8c 334 | 335 | 336 | 337 | name 338 | Italic 339 | scope 340 | markup.italic, punctuation.definition.italic 341 | settings 342 | 343 | fontStyle 344 | italic 345 | foreground 346 | #a16a94 347 | 348 | 349 | 350 | name 351 | Code 352 | scope 353 | markup.raw.inline 354 | settings 355 | 356 | foreground 357 | #01a252 358 | 359 | 360 | 361 | name 362 | Link Text 363 | scope 364 | string.other.link 365 | settings 366 | 367 | foreground 368 | #db2d20 369 | 370 | 371 | 372 | name 373 | Link Url 374 | scope 375 | meta.link 376 | settings 377 | 378 | foreground 379 | #ed0c8c 380 | 381 | 382 | 383 | name 384 | Lists 385 | scope 386 | markup.list 387 | settings 388 | 389 | foreground 390 | #db2d20 391 | 392 | 393 | 394 | name 395 | Quotes 396 | scope 397 | markup.quote 398 | settings 399 | 400 | foreground 401 | #ed0c8c 402 | 403 | 404 | 405 | name 406 | Separator 407 | scope 408 | meta.separator 409 | settings 410 | 411 | background 412 | #d6d5d4 413 | foreground 414 | #4a4543 415 | 416 | 417 | 418 | name 419 | Inserted 420 | scope 421 | markup.inserted 422 | settings 423 | 424 | foreground 425 | #01a252 426 | 427 | 428 | 429 | name 430 | Deleted 431 | scope 432 | markup.deleted 433 | settings 434 | 435 | foreground 436 | #db2d20 437 | 438 | 439 | 440 | name 441 | Changed 442 | scope 443 | markup.changed 444 | settings 445 | 446 | foreground 447 | #a16a94 448 | 449 | 450 | 451 | name 452 | Colors 453 | scope 454 | constant.other.color 455 | settings 456 | 457 | foreground 458 | #b5e4f4 459 | 460 | 461 | 462 | name 463 | Regular Expressions 464 | scope 465 | string.regexp 466 | settings 467 | 468 | foreground 469 | #b5e4f4 470 | 471 | 472 | 473 | name 474 | Escape Characters 475 | scope 476 | constant.character.escape 477 | settings 478 | 479 | foreground 480 | #b5e4f4 481 | 482 | 483 | 484 | name 485 | Embedded 486 | scope 487 | punctuation.section.embedded, variable.interpolation 488 | settings 489 | 490 | foreground 491 | #cdab53 492 | 493 | 494 | 495 | name 496 | Invalid 497 | scope 498 | invalid.illegal 499 | settings 500 | 501 | background 502 | #db2d20 503 | foreground 504 | #f7f7f7 505 | 506 | 507 | 508 | uuid 509 | 14875ac8-6a02-493d-9cfa-1701c764e24b 510 | 511 | 512 | -------------------------------------------------------------------------------- /custom-meta-boxes.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 'Text Input', 21 | 'desc' => 'A description for the field.', 22 | 'id' => \$prefix.'text', 23 | 'type' => 'text' 24 | ), 25 | array( 26 | 'label' => 'Textarea', 27 | 'desc' => 'A description for the field.', 28 | 'id' => \$prefix.'textarea', 29 | 'type' => 'textarea' 30 | ), 31 | array( 32 | 'label' => 'Checkbox Input', 33 | 'desc' => 'A description for the field.', 34 | 'id' => \$prefix.'checkbox', 35 | 'type' => 'checkbox' 36 | ), 37 | array( 38 | 'label' => 'Select Box', 39 | 'desc' => 'A description for the field.', 40 | 'id' => \$prefix.'select', 41 | 'type' => 'select', 42 | 'options' => array ( 43 | 'one' => array ( 44 | 'label' => 'Option One', 45 | 'value' => 'one' 46 | ), 47 | 'two' => array ( 48 | 'label' => 'Option Two', 49 | 'value' => 'two' 50 | ), 51 | 'three' => array ( 52 | 'label' => 'Option Three', 53 | 'value' => 'three' 54 | ) 55 | ) 56 | ), 57 | array ( 58 | 'label' => 'Radio Group', 59 | 'desc' => 'A description for the field.', 60 | 'id' => \$prefix.'radio', 61 | 'type' => 'radio', 62 | 'options' => array ( 63 | 'one' => array ( 64 | 'label' => 'Option One', 65 | 'value' => 'one' 66 | ), 67 | 'two' => array ( 68 | 'label' => 'Option Two', 69 | 'value' => 'two' 70 | ), 71 | 'three' => array ( 72 | 'label' => 'Option Three', 73 | 'value' => 'three' 74 | ) 75 | ) 76 | ), 77 | array ( 78 | 'label' => 'Checkbox Group', 79 | 'desc' => 'A description for the field.', 80 | 'id' => \$prefix.'checkbox_group', 81 | 'type' => 'checkbox_group', 82 | 'options' => array ( 83 | 'one' => array ( 84 | 'label' => 'Option One', 85 | 'value' => 'one' 86 | ), 87 | 'two' => array ( 88 | 'label' => 'Option Two', 89 | 'value' => 'two' 90 | ), 91 | 'three' => array ( 92 | 'label' => 'Option Three', 93 | 'value' => 'three' 94 | ) 95 | ) 96 | ), 97 | array( 98 | 'label' => 'Category', 99 | 'id' => 'category', 100 | 'type' => 'tax_select' 101 | ), 102 | array( 103 | 'label' => 'Post List', 104 | 'desc' => 'A description for the field.', 105 | 'id' => \$prefix.'post_id', 106 | 'type' => 'post_list', 107 | 'post_type' => array('post','page') 108 | ), 109 | array( 110 | 'label' => 'Date', 111 | 'desc' => 'A description for the field.', 112 | 'id' => \$prefix.'date', 113 | 'type' => 'date' 114 | ), 115 | array( 116 | 'label' => 'Slider', 117 | 'desc' => 'A description for the field.', 118 | 'id' => \$prefix.'slider', 119 | 'type' => 'slider', 120 | 'min' => '0', 121 | 'max' => '100', 122 | 'step' => '5' 123 | ), 124 | array( 125 | 'label' => 'Image', 126 | 'desc' => 'A description for the field.', 127 | 'id' => \$prefix.'image', 128 | 'type' => 'image' 129 | ), 130 | array( 131 | 'label' => 'Repeatable', 132 | 'desc' => 'A description for the field.', 133 | 'id' => \$prefix.'repeatable', 134 | 'type' => 'repeatable' 135 | ) 136 | ); 137 | 138 | // enqueue scripts and styles, but only if is_admin 139 | if(is_admin()) { 140 | wp_enqueue_script('jquery-ui-datepicker'); 141 | wp_enqueue_script('jquery-ui-slider'); 142 | wp_enqueue_script('custom-js', get_template_directory_uri().'/js/custom-js.js'); 143 | wp_enqueue_style('jquery-ui-custom', get_template_directory_uri().'/css/jquery-ui-custom.css'); 144 | } 145 | 146 | // add some custom js to the head of the page 147 | add_action('admin_head','add_custom_scripts'); 148 | function add_custom_scripts() { 149 | global \$${1:custom_meta}_fields, \$post; 150 | 151 | \$output = ''; 177 | 178 | echo \$output; 179 | } 180 | 181 | // The Callback 182 | function show_${1:custom_meta}_box() { 183 | global \$${1:custom_meta}_fields, \$post; 184 | // Use nonce for verification 185 | echo ''; 186 | 187 | // Begin the field table and loop 188 | echo ''; 189 | foreach (\$${1:custom_meta}_fields as \$field) { 190 | // get value of this field if it exists for this post 191 | \$meta = get_post_meta(\$post->ID, \$field['id'], true); 192 | // begin a table row with 193 | echo ' 194 | 195 | '; 309 | } // end foreach 310 | echo '
    '; 196 | switch(\$field['type']) { 197 | // text 198 | case 'text': 199 | echo ' 200 |
    '.\$field['desc'].''; 201 | break; 202 | // textarea 203 | case 'textarea': 204 | echo ' 205 |
    '.\$field['desc'].''; 206 | break; 207 | // checkbox 208 | case 'checkbox': 209 | echo ' 210 | '; 211 | break; 212 | // select 213 | case 'select': 214 | echo '
    '.\$field['desc'].''; 219 | break; 220 | // radio 221 | case 'radio': 222 | foreach ( \$field['options'] as \$option ) { 223 | echo ' 224 |
    '; 225 | } 226 | echo ''.\$field['desc'].''; 227 | break; 228 | // checkbox_group 229 | case 'checkbox_group': 230 | foreach (\$field['options'] as \$option) { 231 | echo ' 232 |
    '; 233 | } 234 | echo ''.\$field['desc'].''; 235 | break; 236 | // tax_select 237 | case 'tax_select': 238 | echo '
    Manage '.\$taxonomy->label.''; 250 | break; 251 | // post_list 252 | case 'post_list': 253 | \$items = get_posts( array ( 254 | 'post_type' => \$field['post_type'], 255 | 'posts_per_page' => -1 256 | )); 257 | echo '
    '.\$field['desc'].''; 263 | break; 264 | // date 265 | case 'date': 266 | echo ' 267 |
    '.\$field['desc'].''; 268 | break; 269 | // slider 270 | case 'slider': 271 | \$value = \$meta != '' ? \$meta : '0'; 272 | echo '
    273 | 274 |
    '.\$field['desc'].''; 275 | break; 276 | // image 277 | case 'image': 278 | \$image = get_template_directory_uri().'/images/image.png'; 279 | echo ''; 280 | if (\$meta) { \$image = wp_get_attachment_image_src(\$meta, 'medium'); \$image = \$image[0]; } 281 | echo ' 282 |
    283 | 284 |  Remove Image 285 |
    '.\$field['desc'].''; 286 | break; 287 | // repeatable 288 | case 'repeatable': 289 | echo '+ 290 |
      '; 291 | \$i = 0; 292 | if (\$meta) { 293 | foreach(\$meta as \$row) { 294 | echo '
    • ||| 295 | 296 | -
    • '; 297 | \$i++; 298 | } 299 | } else { 300 | echo '
    • ||| 301 | 302 | -
    • '; 303 | } 304 | echo '
    305 | '.\$field['desc'].''; 306 | break; 307 | } //end switch 308 | echo '
    '; // end table 311 | } 312 | 313 | function ${1:custom_meta}_remove_taxonomy_boxes() { 314 | remove_meta_box('categorydiv', 'post', 'side'); 315 | } 316 | add_action( 'admin_menu' , '${1:custom_meta}_remove_taxonomy_boxes' ); 317 | 318 | // Save the Data 319 | function save_${1:custom_meta}(\$post_id) { 320 | global \$${1:custom_meta}_fields; 321 | 322 | // verify nonce 323 | if (!wp_verify_nonce(\$_POST['${1:custom_meta}_box_nonce'], basename(__FILE__))) 324 | return \$post_id; 325 | // check autosave 326 | if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) 327 | return \$post_id; 328 | // check permissions 329 | if ('page' == \$_POST['post_type']) { 330 | if (!current_user_can('edit_page', \$post_id)) 331 | return \$post_id; 332 | } elseif (!current_user_can('edit_post', \$post_id)) { 333 | return \$post_id; 334 | } 335 | 336 | // loop through fields and save the data 337 | foreach (\$${1:custom_meta}_fields as \$field) { 338 | if(\$field['type'] == 'tax_select') continue; 339 | \$old = get_post_meta(\$post_id, \$field['id'], true); 340 | \$new = \$_POST[\$field['id']]; 341 | if (\$new && \$new != \$old) { 342 | update_post_meta(\$post_id, \$field['id'], \$new); 343 | } elseif ('' == \$new && \$old) { 344 | delete_post_meta(\$post_id, \$field['id'], \$old); 345 | } 346 | } // enf foreach 347 | 348 | // save taxonomies 349 | \$post = get_post(\$post_id); 350 | \$category = \$_POST['category']; 351 | wp_set_object_terms( \$post_id, \$category, 'category' ); 352 | } 353 | add_action('save_post', 'save_${1:custom_meta}'); 354 | 355 | 356 | ]]>
    357 | 358 | metaboxes 359 | 360 | 361 | 362 | Create custom meta boxes using the Tammy's Hart system, available at https://github.com/tammyhart/Reusable-Custom-WordPress-Meta-Boxes 363 |
    364 | 365 | 366 | -------------------------------------------------------------------------------- /Afterglow.tmTheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Afterglow 7 | settings 8 | 9 | 10 | settings 11 | 12 | background 13 | #2E2E2E 14 | caret 15 | #FFFFFF 16 | foreground 17 | #d6d6d6 19 | invisibles 20 | #404040 21 | lineHighlight 22 | #333435 23 | selection 24 | #5A647E 25 | 26 | 27 | 28 | name 29 | Source 30 | scope 31 | entity.other.attribute-name 32 | settings 33 | 34 | foreground 35 | #cc7832 36 | 37 | 38 | 39 | name 40 | Comment 41 | scope 42 | comment 43 | settings 44 | 45 | fontStyle 46 | 47 | foreground 48 | #797979 49 | 50 | 51 | 52 | name 53 | Keyword 54 | scope 55 | keyword, storage 56 | settings 57 | 58 | fontStyle 59 | 60 | foreground 61 | #CC7833 62 | 63 | 64 | 65 | name 66 | Keyword 67 | scope 68 | storage 69 | settings 70 | 71 | fontStyle 72 | 73 | foreground 74 | #a1617a 75 | 76 | 77 | 78 | name 79 | Function (definition) 80 | scope 81 | entity.name.function, keyword.other.name-of-parameter.objc 82 | settings 83 | 84 | fontStyle 85 | 86 | foreground 87 | #FFC66D 88 | 89 | 90 | 91 | name 92 | Class (definition) 93 | scope 94 | entity.name 95 | settings 96 | 97 | foreground 98 | #FFFFFF 99 | 100 | 101 | 102 | name 103 | Number 104 | scope 105 | constant.numeric 106 | settings 107 | 108 | fontStyle 109 | 110 | foreground 111 | #b4c973 112 | 113 | 114 | 115 | name 116 | Variable 117 | scope 118 | variable.language, variable.other 119 | settings 120 | 121 | fontStyle 122 | 123 | foreground 124 | #D0D0FF 125 | 126 | 127 | 128 | name 129 | Constant 130 | scope 131 | constant 132 | settings 133 | 134 | fontStyle 135 | 136 | foreground 137 | #6D9CBE 138 | 139 | 140 | 141 | name 142 | Constant (other variable) 143 | scope 144 | variable.other.constant 145 | settings 146 | 147 | foreground 148 | #c45837 149 | 150 | 151 | 152 | name 153 | Constant (built-in) 154 | scope 155 | constant.language 156 | settings 157 | 158 | fontStyle 159 | 160 | foreground 161 | #6c99bb 162 | 163 | 164 | 165 | name 166 | String 167 | scope 168 | string 169 | settings 170 | 171 | fontStyle 172 | 173 | foreground 174 | #b4c973 175 | 176 | 177 | 178 | name 179 | Library function 180 | scope 181 | support.function 182 | settings 183 | 184 | fontStyle 185 | 186 | foreground 187 | #c45837 188 | 189 | 190 | 191 | name 192 | Library type 193 | scope 194 | support.type 195 | settings 196 | 197 | foreground 198 | #6c99bb 199 | 200 | 201 | 202 | name 203 | Library constant 204 | scope 205 | support.constant 206 | settings 207 | 208 | foreground 209 | #b4c973 210 | 211 | 212 | 213 | name 214 | Markup tag 215 | scope 216 | meta.tag, declaration.tag, entity.name.tag 217 | settings 218 | 219 | fontStyle 220 | 221 | foreground 222 | #E8BF6A 223 | 224 | 225 | 226 | name 227 | Invalid 228 | scope 229 | invalid 230 | settings 231 | 232 | background 233 | #990000 234 | foreground 235 | #FFFFFF 236 | 237 | 238 | 239 | name 240 | String interpolation 241 | scope 242 | constant.character.escaped, constant.character.escape, string source, string source.ruby 243 | settings 244 | 245 | fontStyle 246 | 247 | foreground 248 | #a1617a 249 | 250 | 251 | 252 | name 253 | Diff Add 254 | scope 255 | markup.inserted 256 | settings 257 | 258 | background 259 | #144212 260 | foreground 261 | #E6E1DC 262 | 263 | 264 | 265 | name 266 | Diff Remove 267 | scope 268 | markup.deleted 269 | settings 270 | 271 | background 272 | #660000 273 | foreground 274 | #E6E1DC 275 | 276 | 277 | 278 | name 279 | Diff Header 280 | scope 281 | meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range 282 | settings 283 | 284 | background 285 | #2F33AB 286 | 287 | 288 | 289 | 290 | 291 | name 292 | CSS: units 293 | scope 294 | keyword.other.unit 295 | settings 296 | 297 | foreground 298 | #b4c973 299 | 300 | 301 | 302 | name 303 | css.id 304 | scope 305 | entity.other.attribute-name.id.css 306 | settings 307 | 308 | foreground 309 | #cc7732 310 | 311 | 312 | 313 | name 314 | css.class 315 | scope 316 | entity.other.attribute-name.class 317 | settings 318 | 319 | foreground 320 | #cc7732 321 | 322 | 323 | 324 | name 325 | less.mixin 326 | scope 327 | entity.other.less.mixin 328 | settings 329 | 330 | foreground 331 | #a1617a 332 | 333 | 334 | 335 | name 336 | less.variable 337 | scope 338 | variable.declaration.less 339 | settings 340 | 341 | foreground 342 | #cc7732 343 | 344 | 345 | 346 | name 347 | css.element 348 | scope 349 | keyword.control.html.elements 350 | settings 351 | 352 | foreground 353 | #e5b567 354 | 355 | 356 | 357 | name 358 | css.string 359 | scope 360 | meta.attribute-selector.css 361 | settings 362 | 363 | foreground 364 | #cc7732 365 | 366 | 367 | 368 | name 369 | Keyword.control 370 | scope 371 | keyword.control.at-rule.css.sass 372 | settings 373 | 374 | foreground 375 | #a1617a 376 | 377 | 378 | 379 | 380 | 381 | name 382 | GitGutter deleted 383 | scope 384 | markup.deleted.git_gutter 385 | settings 386 | 387 | foreground 388 | #90516b 389 | 390 | 391 | 392 | name 393 | GitGutter inserted 394 | scope 395 | markup.inserted.git_gutter 396 | settings 397 | 398 | foreground 399 | #b4c973 400 | 401 | 402 | 403 | name 404 | GitGutter changed 405 | scope 406 | markup.changed.git_gutter 407 | settings 408 | 409 | foreground 410 | #cc7732 411 | 412 | 413 | 414 | name 415 | GitGutter ignored 416 | scope 417 | markup.ignored.git_gutter 418 | settings 419 | 420 | foreground 421 | #999999 422 | 423 | 424 | 425 | name 426 | GitGutter untracked 427 | scope 428 | markup.untracked.git_gutter 429 | settings 430 | 431 | foreground 432 | #cccccc 433 | 434 | 435 | 436 | 437 | 438 | name 439 | SublimeLinter Warning 440 | scope 441 | sublimelinter.mark.warning 442 | settings 443 | 444 | foreground 445 | #e5b567 446 | 447 | 448 | 449 | name 450 | SublimeLinter Error 451 | scope 452 | sublimelinter.mark.error 453 | settings 454 | 455 | foreground 456 | #c45330 457 | 458 | 459 | 460 | name 461 | SublimeLinter Gutter Mark 462 | scope 463 | sublimelinter.gutter-mark 464 | settings 465 | 466 | foreground 467 | #FFFFFF 468 | 469 | 470 | 471 | uuid 472 | B80CD0D8-613C-46FD-9C06-A1201108BC2A 473 | 474 | 475 | --------------------------------------------------------------------------------