Esempio n. 1
0
if (!defined("WTG_CSV2POST_NAME")) {
    define("WTG_CSV2POST_NAME", 'CSV 2 POST');
}
if (!defined("WTG_CSV2POST__FILE__")) {
    define("WTG_CSV2POST__FILE__", __FILE__);
}
if (!defined("WTG_CSV2POST_BASENAME")) {
    define("WTG_CSV2POST_BASENAME", plugin_basename(WTG_CSV2POST__FILE__));
}
if (!defined("WTG_CSV2POST_ABSPATH")) {
    define("WTG_CSV2POST_ABSPATH", plugin_dir_path(__FILE__));
}
//C:\AppServ\www\wordpress-testing\wtgplugintemplate\wp-content\plugins\wtgplugintemplate/
if (!defined("WTG_CSV2POST_PHPVERSIONMINIMUM")) {
    define("WTG_CSV2POST_PHPVERSIONMINIMUM", '5.3.0');
}
// The minimum php version that will allow the plugin to work
if (!defined("WTG_CSV2POST_IMAGES_URL")) {
    define("WTG_CSV2POST_IMAGES_URL", plugins_url('images/', __FILE__));
}
// require main class
require_once WTG_CSV2POST_ABSPATH . 'classes/class-csv2post.php';
// call key methods for this package, remove each method that is not required when building a new plugin
$CSV2POST = new CSV2POST();
$CSV2POST->custom_post_types();
// localization
function csv2post_textdomain()
{
    load_plugin_textdomain('csv2post', false, dirname(plugin_basename(__FILE__)) . '/languages/');
}
add_action('plugins_loaded', 'csv2post_textdomain');