From 2.1 to 2.2
Contents
Deprecated APIs
elgg.ui.riverJavaScript library: Remove calls toelgg_load_js('elgg.ui.river')from plugin code. Updatecore/river/filterandforms/comment/save, if overwritten, to require component AMD modules
elgg.ui.popupOpen()andelgg.ui.popupClose()methods inelgg.uiJS library: Useelgg/popupmodule instead.
lightbox.jslibrary: Do not useelgg_load_js('lightbox.js');unless your code references deprecatedelgg.ui.lightboxnamespace. Useelgg/lightboxAMD module instead.
elgg.embedlibrary andelgg.embedobject: Do not useelgg_load_js('elgg.embed'). Useelgg/embedAMD module insteadAccessing
icons_sizesconfig value directly: Useelgg_get_icon_sizes()
can_write_to_container(): UseElggEntity::canWriteToContainer()
Deprecated Views
elgg/ui.river.jsis deprecated: Do not rely on simplecache URLs to work.
groups/jsis deprecated: Usegroups/navigationAMD module as a menu item dependency for “feature” and “unfeature” menu items instead.
lightbox/settings.jsis deprecated: UsegetOptions, ui.lightboxJS plugin hook ordata-colorbox-optsattribute.
elgg/ckeditor/insert.jsis deprecated: You no longer need to include it, hook registration takes place inelgg/ckeditormodule
embed/embed.jsis deprecated: Useelgg/embedAMD module.
Added elgg/popup module
New elgg/popup module can be used to build out more complex trigger-popup interactions, including binding custom anchor types and opening/closing popups programmatically.
Added elgg/lightbox module
New elgg/lightbox module can be used to open and close the lightbox programmatically.
Added elgg/embed module
Even though rarely necessary, elgg/embed AMD module can be used to access the embed methods programmatically. The module bootstraps itself when necessary and is unlikely to require further decoration.
New API for handling entity icons
ElggEntitynow implements\Elgg\EntityIconinterface
elgg_get_icon_sizes()- return entity type/subtype specific icon sizes
ElggEntity::saveIconFromUploadedFile()- creates icons from an uploaded file
ElggEntity::saveIconFromLocalFile()- creates icons from a local file
ElggEntity::saveIconFromElggFile()- creates icons from an instance ofElggFile
ElggEntity::getIcon()- returns an instanceofElggIconthat points to entity icon location on filestore (this may be just a placeholder, useElggEntity::hasIcon()to validate if file has been written)
ElggEntity::deleteIcon()- deletes entity icons
ElggEntity::getIconLastChange()- return modified time of the icon file
ElggEntity::hasIcon()- checks if an icon with given size has been created
elgg_get_embed_url()- can be used to return an embed URL for an entity’s icon (served via /serve-icon handler)
User avatars are now served via serve-file handler. Plugins should start using elgg_get_inline_url() and note that:
/avatar/viewpage handler and resource view have been deprecated
/mod/profile/icondirect.phpfile has been deprecated
profile_set_icon_url()is no longer registered as a callback for"entity:icon:url","user"plugin hook
Group avatars are now served via serve-file handler. Plugins should start using elgg_get_inline_url() and note that:
groupiconpage handler (groups_icon_handler()) has been deprecated
/mod/groups/icon.phpfile has been deprecated
File entity thumbs and downloads are now served via serve-file handler. Plugins should start using elgg_get_inline_url() and elgg_get_download_url() and note that:
file/downloadpage handler and resource view have been deprecated
mod/file/thumbnail.phpfile has been deprecatedSeveral views have been updated to use new download URLs, including:
mod/file/views/default/file/specialcontent/audio/default.php
mod/file/views/default/file/specialcontent/image/default.php
mod/file/views/default/resources/file/view.php
mod/file/views/rss/file/enclosure.php
Removed APIs
Just a warning that the private entity cache functions (e.g. _elgg_retrieve_cached_entity) have been removed. Some plugins may have been using them. Plugins should not use private APIs as they will more often be removed without notice.
Improved elgg/ckeditor module
elgg/ckeditor module can now be used to add WYSIWYG to a textarea programmatically with elgg/ckeditor#bind.