| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yatra\Core\Compatibility; |
| 4 |
|
| 5 |
use Yatra\Core\Constant; |
| 6 |
|
| 7 |
class Astra |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Init WordPress hook |
| 11 |
* |
| 12 |
* @since 2.2.1 |
| 13 |
*/ |
| 14 |
public static function init() |
| 15 |
{ |
| 16 |
$self = new self; |
| 17 |
add_action('do_meta_boxes', array($self, 'remove_metabox'), 1, 3); |
| 18 |
|
| 19 |
} |
| 20 |
|
| 21 |
public function remove_metabox($post_type, $context, $post) |
| 22 |
{ |
| 23 |
if ($post_type !== Constant::TOUR_POST_TYPE) { |
| 24 |
return; |
| 25 |
} |
| 26 |
remove_meta_box('astra_settings_meta_box', $post_type, $context); |
| 27 |
remove_meta_box('postcustom', $post_type, $context); |
| 28 |
|
| 29 |
} |
| 30 |
} |
| 31 |
|