core/Container/Nav_Menu_Item_Container.php 1 location
|
@@ 144-156 (lines=13) @@
|
141 |
|
* @param int $object_id |
142 |
|
* @return bool |
143 |
|
*/ |
144 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
145 |
|
$post = get_post( $object_id ); |
146 |
|
|
147 |
|
if ( ! $post ) { |
148 |
|
return false; |
149 |
|
} |
150 |
|
|
151 |
|
if ( $post->post_type !== 'nav_menu_item' ) { |
152 |
|
return false; |
153 |
|
} |
154 |
|
|
155 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
156 |
|
} |
157 |
|
|
158 |
|
/** |
159 |
|
* Output the container markup |
core/Container/Post_Meta_Container.php 1 location
|
@@ 197-205 (lines=9) @@
|
194 |
|
* @param int $object_id |
195 |
|
* @return bool |
196 |
|
*/ |
197 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
198 |
|
$post = get_post( intval( $object_id ) ); |
199 |
|
|
200 |
|
if ( ! $post ) { |
201 |
|
return false; |
202 |
|
} |
203 |
|
|
204 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
205 |
|
} |
206 |
|
|
207 |
|
/** |
208 |
|
* Add meta box for each of the container post types |