core/Container/Post_Meta_Container.php 1 location
|
@@ 181-189 (lines=9) @@
|
178 |
|
* @param int $object_id |
179 |
|
* @return bool |
180 |
|
*/ |
181 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
182 |
|
$post = get_post( intval( $object_id ) ); |
183 |
|
|
184 |
|
if ( ! $post ) { |
185 |
|
return false; |
186 |
|
} |
187 |
|
|
188 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
189 |
|
} |
190 |
|
|
191 |
|
/** |
192 |
|
* Add meta box for each of the container post types |
core/Container/Nav_Menu_Item_Container.php 1 location
|
@@ 143-155 (lines=13) @@
|
140 |
|
* @param int $object_id |
141 |
|
* @return bool |
142 |
|
*/ |
143 |
|
public function is_valid_attach_for_object( $object_id = null ) { |
144 |
|
$post = get_post( $object_id ); |
145 |
|
|
146 |
|
if ( ! $post ) { |
147 |
|
return false; |
148 |
|
} |
149 |
|
|
150 |
|
if ( $post->post_type !== 'nav_menu_item' ) { |
151 |
|
return false; |
152 |
|
} |
153 |
|
|
154 |
|
return $this->all_conditions_pass( intval( $post->ID ) ); |
155 |
|
} |
156 |
|
|
157 |
|
/** |
158 |
|
* Output the container markup |