php - How to access wordpress custom post type Object -


please help:

i getting custom post type object within wordpress. print_r($this) returns.

how can content of 'key', example?

post_types object (      [post_types_definition:post_types:private] => array (          [0] => array (              [key] => solutions              [name] => solutions              [taxonomies] => array ( )              [categories] =>              [show_in_nav_menus] =>              [settings] => array (                  [0] => array (                      [title] => solutions settings field                      [description] => solutions settings field                      [type] => text                      [properties] => array (                          [text-id] => solutions_settings_field_2                      )                     )                 )          )      ) ) 

any highly appreciated it!

run get_object_vars() on $this variables available you. there, should able access variable name through instance so:

$this->my_variable 

unless dynamically-created variable, should able @ code, considering such simple object. however, if ever in pickle, find particularly helpful.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -