Changeset 1597748
- Timestamp:
- 02/17/2017 06:01:10 AM (9 years ago)
- Location:
- somatic-framework
- Files:
-
- 128 added
- 2 edited
-
tags/1.8.12 (added)
-
tags/1.8.12/css (added)
-
tags/1.8.12/css/soma-admin-styles.css (added)
-
tags/1.8.12/css/soma-login-styles.css (added)
-
tags/1.8.12/css/soma-metabox-styles.css (added)
-
tags/1.8.12/css/soma-public-styles.css (added)
-
tags/1.8.12/css/soma-sorter.css (added)
-
tags/1.8.12/dev (added)
-
tags/1.8.12/dev/debug-bar-panel.php (added)
-
tags/1.8.12/dev/kint (added)
-
tags/1.8.12/dev/kint/Kint.class.php (added)
-
tags/1.8.12/dev/kint/config.default.php (added)
-
tags/1.8.12/dev/kint/view (added)
-
tags/1.8.12/dev/kint/view/kint.css (added)
-
tags/1.8.12/dev/kint/view/kint.js (added)
-
tags/1.8.12/dev/kint/view/src (added)
-
tags/1.8.12/dev/kint/view/src/kint.css (added)
-
tags/1.8.12/dev/kint/view/src/kint.js (added)
-
tags/1.8.12/dev/kint/view/trace.phtml (added)
-
tags/1.8.12/doc (added)
-
tags/1.8.12/doc/hooks-example.php (added)
-
tags/1.8.12/doc/meta-config-example.php (added)
-
tags/1.8.12/doc/type-config-example.php (added)
-
tags/1.8.12/images (added)
-
tags/1.8.12/images/Arrow_Down_32.png (added)
-
tags/1.8.12/images/Arrow_Left_32.png (added)
-
tags/1.8.12/images/Arrow_Right_32.png (added)
-
tags/1.8.12/images/Arrow_Up_32.png (added)
-
tags/1.8.12/images/bullet_delete.png (added)
-
tags/1.8.12/images/bullet_disk.png (added)
-
tags/1.8.12/images/bullet_down.png (added)
-
tags/1.8.12/images/bullet_toggle_minus.png (added)
-
tags/1.8.12/images/bullet_toggle_plus.png (added)
-
tags/1.8.12/images/cross.png (added)
-
tags/1.8.12/images/file-icons (added)
-
tags/1.8.12/images/file-icons/aif.png (added)
-
tags/1.8.12/images/file-icons/aiff.png (added)
-
tags/1.8.12/images/file-icons/bin.png (added)
-
tags/1.8.12/images/file-icons/csv.png (added)
-
tags/1.8.12/images/file-icons/doc.png (added)
-
tags/1.8.12/images/file-icons/exe.png (added)
-
tags/1.8.12/images/file-icons/gif.png (added)
-
tags/1.8.12/images/file-icons/jpeg.png (added)
-
tags/1.8.12/images/file-icons/jpg.png (added)
-
tags/1.8.12/images/file-icons/json.png (added)
-
tags/1.8.12/images/file-icons/m4v.png (added)
-
tags/1.8.12/images/file-icons/mov.png (added)
-
tags/1.8.12/images/file-icons/mp3.png (added)
-
tags/1.8.12/images/file-icons/mp4.png (added)
-
tags/1.8.12/images/file-icons/pdf.png (added)
-
tags/1.8.12/images/file-icons/png.png (added)
-
tags/1.8.12/images/file-icons/psd.png (added)
-
tags/1.8.12/images/file-icons/rtf.png (added)
-
tags/1.8.12/images/file-icons/schematic.png (added)
-
tags/1.8.12/images/file-icons/txt.png (added)
-
tags/1.8.12/images/file-icons/wav.png (added)
-
tags/1.8.12/images/file-icons/xls.png (added)
-
tags/1.8.12/images/file-icons/yml.png (added)
-
tags/1.8.12/images/file-icons/zip.png (added)
-
tags/1.8.12/images/generic-class-thumb.png (added)
-
tags/1.8.12/images/generic-female-thumb.png (added)
-
tags/1.8.12/images/generic-female.png (added)
-
tags/1.8.12/images/generic-male-thumb.png (added)
-
tags/1.8.12/images/generic-male.png (added)
-
tags/1.8.12/images/icon-audio.png (added)
-
tags/1.8.12/images/icon-image.png (added)
-
tags/1.8.12/images/icon-video.png (added)
-
tags/1.8.12/images/placeholder-audio.png (added)
-
tags/1.8.12/images/placeholder-image.png (added)
-
tags/1.8.12/images/placeholder-video.png (added)
-
tags/1.8.12/images/play-hover.png (added)
-
tags/1.8.12/images/play-static.png (added)
-
tags/1.8.12/images/siteground.png (added)
-
tags/1.8.12/images/wpengine.png (added)
-
tags/1.8.12/inc (added)
-
tags/1.8.12/inc/api.php (added)
-
tags/1.8.12/inc/somaDownload.php (added)
-
tags/1.8.12/inc/somaExport.php (added)
-
tags/1.8.12/inc/somaFunctions.php (added)
-
tags/1.8.12/inc/somaMetaboxes.php (added)
-
tags/1.8.12/inc/somaOptions.php (added)
-
tags/1.8.12/inc/somaRequest.php (added)
-
tags/1.8.12/inc/somaSave.php (added)
-
tags/1.8.12/inc/somaSorter.php (added)
-
tags/1.8.12/inc/somaTypes.php (added)
-
tags/1.8.12/inc/somaUploadField.php (added)
-
tags/1.8.12/inc/zip_min.inc.php (added)
-
tags/1.8.12/js (added)
-
tags/1.8.12/js/colorbox (added)
-
tags/1.8.12/js/colorbox/colorbox.css (added)
-
tags/1.8.12/js/colorbox/images (added)
-
tags/1.8.12/js/colorbox/images/border.png (added)
-
tags/1.8.12/js/colorbox/images/controls.png (added)
-
tags/1.8.12/js/colorbox/images/loading.gif (added)
-
tags/1.8.12/js/colorbox/images/loading_background.png (added)
-
tags/1.8.12/js/colorbox/jquery.colorbox-min.js (added)
-
tags/1.8.12/js/colorbox/jquery.colorbox.js (added)
-
tags/1.8.12/js/jquery.autosize-min.js (added)
-
tags/1.8.12/js/soma-admin-jquery.js (added)
-
tags/1.8.12/js/soma-metabox-jquery.js (added)
-
tags/1.8.12/js/soma-plupload.js (added)
-
tags/1.8.12/js/soma-public-jquery.js (added)
-
tags/1.8.12/js/soma-sorter.js (added)
-
tags/1.8.12/js/ui (added)
-
tags/1.8.12/js/ui/calendar-icon.png (added)
-
tags/1.8.12/js/ui/clock-icon.png (added)
-
tags/1.8.12/js/ui/cross.png (added)
-
tags/1.8.12/js/ui/jquery-ui-timepicker-addon.css (added)
-
tags/1.8.12/js/ui/jquery-ui-timepicker-addon.js (added)
-
tags/1.8.12/js/ui/jquery-ui-timepicker-addon.min.js (added)
-
tags/1.8.12/js/ui/smoothness (added)
-
tags/1.8.12/js/ui/smoothness/images (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-icons_222222_256x240.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-icons_454545_256x240.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-icons_888888_256x240.png (added)
-
tags/1.8.12/js/ui/smoothness/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.8.12/js/ui/smoothness/jquery-ui.css (added)
-
tags/1.8.12/readme.txt (added)
-
tags/1.8.12/somaticFramework.php (added)
-
trunk/inc/somaTypes.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
somatic-framework/trunk/inc/somaTypes.php
r1317240 r1597748 10 10 add_action( 'contextual_help', array( __CLASS__, 'custom_type_help_text' ), 10, 3 ); 11 11 add_action( 'right_now_content_table_end' , array( __CLASS__, 'custom_types_rightnow' ) ); 12 add_action( 'admin_head-nav-menus.php', array( __CLASS__, 'filters_for_cpt_archives' ) ); // hacks the output of CPT nav menu items displayed in Appearance -> Menus13 add_filter( 'hidden_meta_boxes', array( __CLASS__, 'show_cpt_menus' ), 10, 2 ); // hacks the display of CPT in Appearance -> Menus (screen options hack)14 12 add_filter( 'parse_query', array( __CLASS__, 'filter_current_query' ) ); // modifies ordering when querying CPTs 15 13 add_filter( 'posts_orderby', array( __CLASS__, 'posts_orderby' ) ); // modifies ordering when querying CPTs … … 438 436 } 439 437 440 // generate filter hooks for adding cpt archive checkboxes441 // props to Kevin Langley https://github.com/klangley/cpt-archive-to-nav442 function filters_for_cpt_archives() {443 $post_type_args = array(444 'show_in_nav_menus' => true445 );446 447 $post_types = get_post_types( $post_type_args, 'object' );448 449 foreach ( $post_types as $post_type ) {450 if ( $post_type->has_archive ) {451 add_filter( 'nav_menu_items_' . $post_type->name, array( __CLASS__, 'add_cpt_archive_checkbox' ), null, 3 );452 }453 }454 }455 456 // inject a new checkbox item in Apppearance -> Menus -> (your cpt) visible in the "view all" tab --- so you can manually add a custom nav menu item for your CPT archive pages457 // props to Kevin Langley https://github.com/klangley/cpt-archive-to-nav458 function add_cpt_archive_checkbox( $posts, $args, $post_type ) {459 global $_nav_menu_placeholder, $wp_rewrite;460 $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;461 462 array_unshift( $posts, (object) array(463 'ID' => 0,464 'object_id' => $_nav_menu_placeholder,465 'post_content' => '',466 'post_excerpt' => '',467 'post_title' => $post_type['args']->labels->name,468 'post_name' => $post_type['args']->name,469 'post_type' => 'nav_menu_item',470 'type' => 'custom',471 'url' => get_post_type_archive_link( $args['post_type'] )472 ) );473 474 return $posts;475 }476 477 // shows the metabox listing the custom post type or taxonomy in Appearance->Menus478 function show_cpt_menus( $boxes, $screen ) {479 $args = array( '_builtin' => false, 'show_in_nav_menus'=> true );480 $types = array_keys( get_post_types( $args ) );481 $taxes = array_keys( get_taxonomies( $args ) );482 $list = array_merge( $types, $taxes );483 foreach ( $list as $item ) {484 $killkey = array_search( "add-".$item, $boxes );485 if ( $killkey ) {486 unset( $boxes[$killkey] );487 }488 }489 return $boxes;490 }491 492 438 // kill the core Publish metabox 493 439 function remove_publish_box() { -
somatic-framework/trunk/readme.txt
r1317240 r1597748 5 5 Requires at least: 4.0 6 6 Tested up to: 4.1 7 Stable tag: 1.8.1 17 Stable tag: 1.8.12 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 = 1.8.12 = 36 36 * no longer using custom menu icons, but the built-in dashicons set, so the custom post type argument "icon_set" is deprecated. Simply provide the argument "menu_icon" in the post type declaration. Documentation https://developer.wordpress.org/resource/dashicons/ 37 * removed hacks for injecting custom post type archives into the Nav Menu editor (not needed anymore, and was breaking editor) 37 38 38 39 = 1.8.11 =
Note: See TracChangeset
for help on using the changeset viewer.