-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwpai-import-attachments-add-on.php
More file actions
31 lines (26 loc) · 1 KB
/
wpai-import-attachments-add-on.php
File metadata and controls
31 lines (26 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/*
Plugin Name: WP All Import - Import File Attachments
Plugin URI: http://www.wpallimport.com/
Description: A simple add-on for importing attachments with meta data.
Version: 1.0
Author: Soflyy
*/
include "rapid-addon.php";
$wpai_ia_addon = new RapidAddon( 'Import Attachments', 'wpai_import_attachments' );
$wpai_ia_addon->import_files( 'wpaiia_import_attachments_func', 'Attachments' );
$wpai_ia_addon->set_import_function( 'wpaiia_import_attachments' );
$wpai_ia_addon->run();
function wpaiia_import_attachments( $post_id, $data, $import_options, $article ) {
// Nothing needs to be done.
return;
}
function wpaiia_import_attachments_func( $post_id, $data, $import_options ) {
// Nothing extra is needed.
return;
}
function wpaiia_addon_style_load($hook) {
wp_register_style( 'wpaiia-addon-stylesheet', plugins_url( 'admin/css/wpaiiacss.css', __FILE__ ), false, '1.0.0' );
wp_enqueue_style( 'wpaiia-addon-stylesheet' );
}
add_action( 'admin_enqueue_scripts', 'wpaiia_addon_style_load' );