core/Container/Nav_Menu_Item_Container.php 1 location
|
@@ 129-141 (lines=13) @@
|
126 |
|
* @param int $object_id |
127 |
|
* @return bool |
128 |
|
**/ |
129 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
130 |
|
$post = get_post( $object_id ); |
131 |
|
|
132 |
|
if ( ! $post ) { |
133 |
|
return false; |
134 |
|
} |
135 |
|
|
136 |
|
if ( $post->post_type !== 'nav_menu_item' ) { |
137 |
|
return false; |
138 |
|
} |
139 |
|
|
140 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
141 |
|
} |
142 |
|
|
143 |
|
/** |
144 |
|
* Output the container markup |
core/Container/Post_Meta_Container.php 1 location
|
@@ 186-194 (lines=9) @@
|
183 |
|
* @param int $object_id |
184 |
|
* @return bool |
185 |
|
**/ |
186 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
187 |
|
$post = get_post( intval( $object_id ) ); |
188 |
|
|
189 |
|
if ( ! $post ) { |
190 |
|
return false; |
191 |
|
} |
192 |
|
|
193 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
194 |
|
} |
195 |
|
|
196 |
|
/** |
197 |
|
* Add meta box for each of the container post types |