PHPDoc Real Media Library
  • Namespace
  • Function

Namespaces

  • MatthiasWeb
    • RealMediaLibrary
      • api
  • None

Functions

  • _wp_rml_active
  • _wp_rml_root
  • _wp_rml_sanitize
  • add_media_folder_meta
  • add_rml_meta_box
  • add_rml_user_settings_box
  • delete_media_folder_meta
  • delete_media_folder_meta_by_key
  • get_media_folder_meta
  • is_rml_folder
  • truncate_media_folder_meta
  • update_media_folder_meta
  • wp_attachment_ensure_source_file
  • wp_attachment_folder
  • wp_attachment_get_shortcuts
  • wp_attachment_has_shortcuts
  • wp_attachment_is_shortcut
  • wp_attachment_order_update
  • wp_rml_create
  • wp_rml_create_or_return_existing_id
  • wp_rml_create_shortcuts
  • wp_rml_created_shortcuts_last_ids
  • wp_rml_delete
  • wp_rml_dropdown
  • wp_rml_dropdown_collection
  • wp_rml_dropdown_gallery
  • wp_rml_dropdown_gallery_or_collection
  • wp_rml_get_attachments
  • wp_rml_get_by_absolute_path
  • wp_rml_get_by_id
  • wp_rml_get_object_by_id
  • wp_rml_get_parent_id
  • wp_rml_is_type
  • wp_rml_move
  • wp_rml_objects
  • wp_rml_register_creatable
  • wp_rml_rename
  • wp_rml_root_childs
  • wp_rml_select_tree
  • wp_rml_structure_reset
  • wp_rml_update_count

Function wp_rml_select_tree

Returns a .rml-root-list with an given tree. The selected folder id is saved automatically in a hidden input type.

Note #1 The select tree has a javascript callback when it is initalized. You can bind it with this snippet:

window.rml.hooks.register("tree/custom", function(obj, $) {
      //if (obj.hasClass("my-extra-class")) {
           alert(obj.html());
      //}
});

Note #2 If you want to use the select tree after a DOM change (ajax, for example: Modal dialog in visual editor) please call the javascript function

window.rml.library.customLists()

to affect the initalization referred to Note #1.

Note #3 You can use a sub class of IFolder to customize your tree.

Returns: string Formatted HTML string
Located at folders.php

Parameters summary

string $inputName the name for the hidden input type and the name for the list
integer $selected the selected folder id (saved also in hidden input type)
IFolder $tree = null The root view
string $extraClasses = "" classes for the rml root list container
PHPDoc Real Media Library API documentation generated by ApiGen