Filebird functions into WP functions.php ?
-
Thanks for the great plugin!!
How can I add these Filebird functions to the WP functions.php file to apply sitewide changes?
Get Folder Detail use FileBird\Model\Folder as FolderModel; FolderModel::findById( $folder_id, 'id, name, parent' ); Get Folders use FileBird\Classes\Tree; Tree::getFolders( null ); Create New Folder use FileBird\Model\Folder as FolderModel; FolderModel::newOrGet( $name, $parent_id ); Get Attachment Ids by Folder Id use FileBird\Classes\Helpers as Helpers; Helpers::getAttachmentIdsByFolderId( $folder_id ); Add attachment(s) to folder use FileBird\Model\Folder as FolderModel; FolderModel::setFoldersForPosts( $ids, $folder );
Enclosing them within a function results in “syntax error, unexpected ‘use’ (T_USE)” but putting them outside the function and attempting to use global throws no errors, but no results either.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Filebird functions into WP functions.php ?’ is closed to new replies.