ExImport
in package
implements
IOverrideExImport
Uses
UtilsProvider, ExImport
Import and export functionality.
Table of Contents
Interfaces
Constants
- FILE_BIRD_TABLE_NAME = 'fbv'
- "Filebird" uses also an own database table system for media relationship.
- FILE_BIRD_TABLE_NAME_POSTS = 'fbv_attachment_folder'
- IMPORT_TAX_IGNORE = ['language']
- IMPORT_TAX_MATRIX = ['nt_wmc_folder' => 'FileBird', 'filebase_folder' => 'FileBase', 'media_folder' => 'Folders', 'attachment_category' => 'Media Library Assistant', 'media_category' => 'Enhanced Media Library', 'mlo-category' => 'Media Library Organizer', 'mediamatic_wpfolder' => 'Mediamatic Lite', 'wpmf-category' => 'Media Library Folders', 'rl_media_folder' => 'Responsive Lightbox & Gallery']
- MLF_POST_TYPE = 'mgmlp_media_folder'
- "Media Library Folders" uses `wp_posts` to store available folders.
Properties
Methods
- getCategories() : array<string|int, mixed>
- Get the folder tree of a taxonomy for import process.
- getFolders() : array<string|int, mixed>
- Get the folder tree for import process.
- getHierarchicalTaxos() : array<string|int, string>
- Get the hierarchical taxonomies for the media taxonomy. It also returns taxonomies which are no longer registered
- getInstance() : ExImport
- Get instance.
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- hasFileBird() : mixed
- Checks if "Filebird" was used previously.
- hasMediaLibraryFolders() : mixed
- Checks if "Media Library Folders" was used previously.
- html_rml_button_export() : mixed
- Output export button in options.
- html_rml_button_import_cats() : mixed
- Output import button in options.
- import() : mixed
- importFileBird() : mixed
- importMlf() : mixed
- importShortcuts() : mixed
- importTaxonomy() : mixed
- isImportTaxNoticeDismissed() : bool
- Checks if the import notice in folder tree sidebar is dismissed.
- options_register() : mixed
- Register options in media settings.
- __construct() : mixed
- C'tor.
- clearImportData() : mixed
- Clear importData and importId in posts and folder table.
- importTreeRecursively() : mixed
- Import a tree with __children array and __metas array recursively.
Constants
FILE_BIRD_TABLE_NAME
"Filebird" uses also an own database table system for media relationship.
public
mixed
FILE_BIRD_TABLE_NAME
= 'fbv'
FILE_BIRD_TABLE_NAME_POSTS
public
mixed
FILE_BIRD_TABLE_NAME_POSTS
= 'fbv_attachment_folder'
IMPORT_TAX_IGNORE
public
mixed
IMPORT_TAX_IGNORE
= ['language']
IMPORT_TAX_MATRIX
public
mixed
IMPORT_TAX_MATRIX
= ['nt_wmc_folder' => 'FileBird', 'filebase_folder' => 'FileBase', 'media_folder' => 'Folders', 'attachment_category' => 'Media Library Assistant', 'media_category' => 'Enhanced Media Library', 'mlo-category' => 'Media Library Organizer', 'mediamatic_wpfolder' => 'Mediamatic Lite', 'wpmf-category' => 'Media Library Folders', 'rl_media_folder' => 'Responsive Lightbox & Gallery']
MLF_POST_TYPE
"Media Library Folders" uses `wp_posts` to store available folders.
public
mixed
MLF_POST_TYPE
= 'mgmlp_media_folder'
Tags
Properties
$columns
Column names for import and export.
private
mixed
$columns
= []
$idOffset
private
mixed
$idOffset
= null
$me
private
static mixed
$me
= null
Methods
getCategories()
Get the folder tree of a taxonomy for import process.
public
getCategories(string $tax) : array<string|int, mixed>
Parameters
- $tax : string
Return values
array<string|int, mixed>getFolders()
Get the folder tree for import process.
public
getFolders() : array<string|int, mixed>
Return values
array<string|int, mixed>getHierarchicalTaxos()
Get the hierarchical taxonomies for the media taxonomy. It also returns taxonomies which are no longer registered
public
getHierarchicalTaxos() : array<string|int, string>
Return values
array<string|int, string>getInstance()
Get instance.
public
static getInstance() : ExImport
Return values
ExImportgetPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringhasFileBird()
Checks if "Filebird" was used previously.
public
hasFileBird() : mixed
hasMediaLibraryFolders()
Checks if "Media Library Folders" was used previously.
public
hasMediaLibraryFolders() : mixed
Tags
html_rml_button_export()
Output export button in options.
public
html_rml_button_export() : mixed
html_rml_button_import_cats()
Output import button in options.
public
html_rml_button_import_cats() : mixed
import()
public
import(mixed $tree) : mixed
Parameters
- $tree : mixed
importFileBird()
public
importFileBird() : mixed
importMlf()
public
importMlf() : mixed
importShortcuts()
public
importShortcuts() : mixed
importTaxonomy()
public
importTaxonomy(mixed $tax) : mixed
Parameters
- $tax : mixed
isImportTaxNoticeDismissed()
Checks if the import notice in folder tree sidebar is dismissed.
public
isImportTaxNoticeDismissed([bool $set = null ]) : bool
Parameters
- $set : bool = null
Return values
booloptions_register()
Register options in media settings.
public
options_register() : mixed
__construct()
C'tor.
private
__construct() : mixed
clearImportData()
Clear importData and importId in posts and folder table.
private
clearImportData() : mixed
importTreeRecursively()
Import a tree with __children array and __metas array recursively.
private
importTreeRecursively(array<string|int, mixed> $tree[, int $idOffset = null ][, int $parent = null ]) : mixed
Parameters
- $tree : array<string|int, mixed>
-
The tree, for example from $this::getFolders()
- $idOffset : int = null
-
The id offset for inserting unique keys
- $parent : int = null
-
THe parent for the import