This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Admin Files | |
| require_once ( plugin_dir_path( __FILE__ ) . '/include/admin/post_type.php' ); | |
| require_once ( plugin_dir_path( __FILE__ ) . '/include/admin/meta_box.php' ); | |
| require_once ( plugin_dir_path( __FILE__ ) . '/include/admin/add_column.php' ); | |
| //Frontend Files | |
| require_once ( plugin_dir_path( __FILE__ ) . '/include/product-detail.php' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Check if WooCommerce is active | |
| **/ | |
| if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
| // Put your plugin code here | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // don't call the file directly | |
| if ( ! defined( 'ABSPATH' ) ) exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Wcik Manufacturer | |
| Plugin URI: http://codeinform.com/woocommerce-custom-plugin-development-from-scratch/ | |
| Description: A Woocommerce plugin that add products manufacturer features. | |
| Author: Imran Khan | |
| Version: 1.0 | |
| Author URI: http://codeinform.com/ | |
| License: GPL2 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'add_meta_boxes', 'manufacturer_meta_box_add' ); | |
| function manufacturer_meta_box_add() | |
| { | |
| add_meta_box( 'manufacturer-meta-box-id', 'All Manufacturers', 'meta_box_manufacturer', 'product', 'side', 'high' ); | |
| } | |
| function meta_box_manufacturer( $post ) | |
| { | |
| // $post is already set, and contains an object: the WordPress post | |
| global $post; |
NewerOlder