Comments (2)
I think this is related to Babble clobbering some arguments for already registered post types, here:
https://github.com/Automattic/babble/blob/develop/class-post-public.php#L277-L285
from babble.
I think @joshbetz is on to something. Babble is overwriting menu_position
when calling register_post_type()
, which causes the shadow post types to overwrite the position of the standard post type, and then the shadow post type is removed from the menu in Babble_Post_Public::add_menu_classes()
This can be tested easily with this patch:
Index: class-post-public.php
===================================================================
--- class-post-public.php (revision 224474)
+++ class-post-public.php (working copy)
@@ -325,6 +325,9 @@
$new_args['capabilities']['create_posts'] = 'do_not_allow';
}
+ // Unset menu_position so that shadow post types won't overwrite post types with a hard coded position.
+ unset( $new_args['menu_position'] );
+
$result = register_post_type( $new_post_type, $new_args );
if ( is_wp_error( $result ) ) {
bbl_log( "Error creating shadow post_type for $new_post_type: " . print_r( $result, true ), true );
I'm not sure what changed in 4.4 that causes this to happen though.
from babble.
Related Issues (20)
- Update Hindi in lang switcher
- Print's both current language content and the translated content in the same page
- Make the language selector sticky for repeat visits HOT 1
- Always undefined $leavename variable. HOT 1
- Trashed translation jobs blocking creation of new ones
- Translations not being properly saved/published
- Newly assigned taxonomy terms cannot be edited once translation created.
- Problem with JetPack Edit CSS - pulls entire Post content into editor
- bbl_is_page should accept an array of page IDs or page slugs as is_page does
- 404 after fresh install on WP 4.5.3 HOT 1
- No tick-box in front of pages
- Does this project is dead! HOT 2
- PLEASE HELP BY AUTOMATTIC HOT 1
- Problem installing with Divi
- "Fatal error: Uncaught Exception: Please specify a target term_id in" Problem installing with Kale Theme
- Can not use wordpress HOT 1
- Installing BABBLE throws an error!
- Will this plugin work in WordPress 5.4
- Error right after installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babble.