本文整理汇总了PHP中PMXI_Plugin::getEddName方法的典型用法代码示例。如果您正苦于以下问题:PHP PMXI_Plugin::getEddName方法的具体用法?PHP PMXI_Plugin::getEddName怎么用?PHP PMXI_Plugin::getEddName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMXI_Plugin
的用法示例。
在下文中一共展示了PMXI_Plugin::getEddName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wp_all_import_pro_updater
function wp_all_import_pro_updater()
{
// retrieve our license key from the DB
$wp_all_import_options = get_option('PMXI_Plugin_Options');
// setup the updater
$updater = new PMXI_Updater($wp_all_import_options['info_api_url'], __FILE__, array('version' => PMXI_VERSION, 'license' => !empty($wp_all_import_options['licenses']['PMXI_Plugin']) ? $wp_all_import_options['licenses']['PMXI_Plugin'] : false, 'item_name' => PMXI_Plugin::getEddName(), 'author' => 'Soflyy'));
}
示例2: get_default_import_options
* Method returns default import options, main utility of the method is to avoid warnings when new
* option is introduced but already registered imports don't have it
*/
public static function get_default_import_options()
{
return array('type' => 'post', 'wizard_type' => 'new', 'custom_type' => '', 'featured_delim' => ',', 'atch_delim' => ',', 'post_taxonomies' => array(), 'parent' => 0, 'order' => 0, 'status' => 'publish', 'page_template' => 'default', 'page_taxonomies' => array(), 'date_type' => 'specific', 'date' => 'now', 'date_start' => 'now', 'date_end' => 'now', 'custom_name' => array(), 'custom_value' => array(), 'custom_format' => array(), 'custom_mapping' => array(), 'serialized_values' => array(), 'custom_mapping_rules' => array(), 'comment_status' => 'open', 'ping_status' => 'open', 'create_draft' => 'no', 'author' => '', 'post_excerpt' => '', 'post_slug' => '', 'attachments' => '', 'is_import_specified' => 0, 'import_specified' => '', 'is_delete_source' => 0, 'is_cloak' => 0, 'unique_key' => '', 'tmp_unique_key' => '', 'feed_type' => 'auto', 'create_new_records' => 1, 'is_delete_missing' => 0, 'set_missing_to_draft' => 0, 'is_update_missing_cf' => 0, 'update_missing_cf_name' => '', 'update_missing_cf_value' => '', 'is_keep_former_posts' => 'no', 'is_update_status' => 1, 'is_update_content' => 1, 'is_update_title' => 1, 'is_update_slug' => 1, 'is_update_excerpt' => 1, 'is_update_categories' => 1, 'is_update_author' => 1, 'update_categories_logic' => 'full_update', 'taxonomies_list' => array(), 'taxonomies_only_list' => array(), 'taxonomies_except_list' => array(), 'is_update_attachments' => 1, 'is_update_images' => 1, 'update_images_logic' => 'full_update', 'is_update_dates' => 1, 'is_update_menu_order' => 1, 'is_update_parent' => 1, 'is_keep_attachments' => 0, 'is_keep_imgs' => 0, 'is_update_custom_fields' => 1, 'update_custom_fields_logic' => 'full_update', 'custom_fields_list' => array(), 'custom_fields_only_list' => array(), 'custom_fields_except_list' => array(), 'duplicate_matching' => 'auto', 'duplicate_indicator' => 'title', 'custom_duplicate_name' => '', 'custom_duplicate_value' => '', 'is_update_previous' => 0, 'is_scheduled' => '', 'scheduled_period' => '', 'friendly_name' => '', 'records_per_request' => 20, 'auto_rename_images' => 0, 'auto_rename_images_suffix' => '', 'images_name' => 'filename', 'post_format' => 'standard', 'encoding' => 'UTF-8', 'delimiter' => '', 'image_meta_title' => '', 'image_meta_title_delim' => ',', 'image_meta_caption' => '', 'image_meta_caption_delim' => ',', 'image_meta_alt' => '', 'image_meta_alt_delim' => ',', 'image_meta_description' => '', 'image_meta_description_delim' => ',', 'status_xpath' => '', 'download_images' => 'yes', 'converted_options' => 0, 'update_all_data' => 'yes', 'is_fast_mode' => 0, 'chuncking' => 1, 'import_processing' => 'ajax', 'title' => '', 'content' => '', 'name' => '', 'is_keep_linebreaks' => 0, 'is_leave_html' => 0, 'fix_characters' => 0, 'featured_image' => '', 'download_featured_image' => '', 'download_featured_delim' => ',', 'is_featured' => 1, 'set_image_meta_title' => 0, 'set_image_meta_caption' => 0, 'set_image_meta_alt' => 0, 'set_image_meta_description' => 0, 'auto_set_extension' => 0, 'new_extension' => '', 'tax_logic' => array(), 'tax_assing' => array(), 'tax_single_xpath' => array(), 'tax_multiple_xpath' => array(), 'tax_hierarchical_xpath' => array(), 'tax_multiple_delim' => array(), 'tax_hierarchical_delim' => array(), 'tax_hierarchical_logic_entire' => array(), 'tax_hierarchical_logic_manual' => array(), 'tax_enable_mapping' => array(), 'tax_mapping' => array(), 'nested_files' => array());
}
/*
* Convert csv to xml
*/
public static function csv_to_xml($csv_url)
{
include_once self::ROOT_DIR . '/libraries/XmlImportCsvParse.php';
$csv = new PMXI_CsvParser($csv_url);
$wp_uploads = wp_upload_dir();
$tmpname = wp_unique_filename($wp_uploads['path'], str_replace("csv", "xml", basename($csv_url)));
$xml_file = $wp_uploads['path'] . '/' . $tmpname;
file_put_contents($xml_file, $csv->toXML());
return $xml_file;
}
public static function is_ajax()
{
return strpos($_SERVER["HTTP_ACCEPT"], 'json') !== false;
}
}
PMXI_Plugin::getInstance();
// retrieve our license key from the DB
$options = get_option('PMXI_Plugin_Options');
// setup the updater
$updater = new PMXI_Updater($options['info_api_url'], __FILE__, array('version' => PMXI_VERSION, 'license' => false, 'item_name' => PMXI_Plugin::getEddName(), 'author' => 'Soflyy'));
}