| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Post Type Transfer |
| 4 |
* Plugin URI: https://wordpress.org/plugins/post-type-transfer/ |
| 5 |
* Description: This plugin will allow user to change post type to other public post types or page. |
| 6 |
* Author: KrishaWeb |
| 7 |
* Author URI: https://www.krishaweb.com/ |
| 8 |
* Text Domain: post-type-transfer |
| 9 |
* Domain Path: /languages |
| 10 |
* Version: 1.3 |
| 11 |
* |
| 12 |
* @package Post_Type_Transfer |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 16 |
|
| 17 |
require_once plugin_dir_path( __FILE__ ) . 'admin/class-post-type-transfer-admin.php'; |
| 18 |
require_once plugin_dir_path( __FILE__ ) . 'admin/class-quick-edit.php'; |
| 19 |
require_once plugin_dir_path( __FILE__ ) . 'lib/block/class-ptt-guntenberg-metabox.php'; |
| 20 |
|
| 21 |
/** |
| 22 |
* Load plugin textdomain. |
| 23 |
*/ |
| 24 |
add_action( 'plugins_loaded', 'ptt_textdomain' ); |
| 25 |
function ptt_textdomain() { |
| 26 |
load_plugin_textdomain( 'post-type-transfer', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Plugin activate hook. |
| 31 |
*/ |
| 32 |
register_activation_hook( __FILE__ , 'ptt_activate' ); |
| 33 |
function ptt_activate() { |
| 34 |
// Activation code here... |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* Plugin deactivate hook. |
| 39 |
*/ |
| 40 |
register_deactivation_hook( __FILE__ , 'ptt_deactivate' ); |
| 41 |
function ptt_deactivate() { |
| 42 |
// Deactivation code here... |
| 43 |
} |
| 44 |
|
| 45 |
/** |
| 46 |
* Plugin class init. |
| 47 |
*/ |
| 48 |
function ptt_init() { |
| 49 |
new Post_Type_Transfer; |
| 50 |
} |
| 51 |
ptt_init(); |
| 52 |
|