woocommerce/admin/post-types/post-types-init.php

34 lines
1006 B
PHP
Raw Normal View History

2011-12-05 17:08:24 +00:00
<?php
/**
2011-12-12 16:34:56 +00:00
* WooCommerce Post Types Init
*
* Load post types panels
2011-12-05 17:08:24 +00:00
*
* @author WooThemes
* @category Admin
* @package WooCommerce
*/
2011-12-12 16:34:56 +00:00
global $typenow;
include_once( 'writepanels/writepanels-init.php' );
if ($typenow=='post' && isset($_GET['post']) && !empty($_GET['post'])) :
$typenow = $post->post_type;
elseif (empty($typenow) && !empty($_GET['post'])) :
$post = get_post($_GET['post']);
$typenow = $post->post_type;
endif;
if ( $typenow=='product' ) :
include_once('product.php');
include_once('writepanels/writepanel-product_data.php');
elseif ( $typenow=='shop_coupon' ) :
include_once('shop_coupon.php');
include_once('writepanels/writepanel-coupon_data.php');
2012-01-18 11:53:34 +00:00
add_action('load-edit.php', 'woocommerce_admin_help_tab');
2011-12-12 16:34:56 +00:00
elseif ( $typenow=='shop_order' ) :
include_once('shop_order.php');
include_once('writepanels/writepanel-order_data.php');
include_once('writepanels/writepanel-order_notes.php');
2012-01-18 11:53:34 +00:00
add_action('load-edit.php', 'woocommerce_admin_help_tab');
2011-12-12 16:34:56 +00:00
endif;