0
我在Wordpress中獲取此自定義帖子類型對象。這實際上是print_r($ this)返回的內容。
如何獲取'key'的內容,例如?
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
)
)
)
)
)
)
任何幫助,高度讚賞它!
$ this的上下文是什麼? –
print_r($ this)輸出上面列出的 – george
這不會告訴我任何東西。我們需要更多的代碼繼續。看起來$這實際上是指你試圖訪問的對象?? –