_get_custom_object_labels [ WordPress Function ]
_get_custom_object_labels ( $object, $nohier_vs_hier_defaults )
| Access: |
|
| Defined at: |
|
Soorgelijke functies: get_post_type_labels, get_custom_header, wp_get_object_terms, get_taxonomy_labels, get_comment_class
Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object
Source
<?php
function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
if ( isset( $object->label ) && empty( $object->labels['name'] ) )
$object->labels['name'] = $object->label;
if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) )
$object->labels['singular_name'] = $object->labels['name'];
if ( ! isset( $object->labels['name_admin_bar'] ) )
$object->labels['name_admin_bar'] = isset( $object->labels['singular_name'] ) ? $object->labels['singular_name'] : $object->name;
if ( !isset( $object->labels['menu_name'] ) && isset( $object->labels['name'] ) )
$object->labels['menu_name'] = $object->labels['name'];
if ( !isset( $object->labels['all_items'] ) && isset( $object->labels['menu_name'] ) )
$object->labels['all_items'] = $object->labels['menu_name'];
foreach ( $nohier_vs_hier_defaults as $key => $value )
$defaults[$key] = $object->hierarchical ? $value[1] : $value[0];
$labels = array_merge( $defaults, $object->labels );
return (object)$labels;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WordPress › Support » Installation Fatal Error
Fatal error: Call to undefined function _get_custom_object_labels() in D:\domains \xxxxxxx.com\wwwroot\2010\wp-includes\taxonomy.php on line 371. Any help?
wordpress.org - _get_custom_object_labels (WordPress Function) - WPSeek.com
WordPress lookup for _get_custom_object_labels, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - _get_custom_object_labels
Function and Method Cross Reference. _get_custom_object_labels(). Defined at: /wp-includes/post.php -> line 1251. Referenced 2 times: ...
phpxref.ftwr.co.uk - _get_custom_object_labels() WordPress function reference ...
Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object.
queryposts.com