Read here: How to add PHP hooks in your WordPress Site in my blog

You have selected/installed the following plugins:





Actions

lv_after_breadcrumb_end
After breadcrumb end action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * After breadcrumb end action.
 *
 * With this action, you can echo any content you want after
 * closing of div with class library-viewer--breadcrumb.
 *
 * @since 2.0.0
 *
 * @param array $this->globals See property's documentation.
 */
do_action('lv_after_breadcrumb_end', $this->globals);
lv_after_breadcrumb_start
After breadcrumb start action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * After breadcrumb start action.
 *
 * With this action, you can echo any content you want after
 * opening of div with class library-viewer--breadcrumb.
 *
 * @since 2.0.0
 *
 * @param array $this->globals See property's documentation.
 */
do_action('lv_after_breadcrumb_start', $this->globals);
lv_after_file
After file html action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * After file html action.
 *
 * Print any html you want after closing of
 * div with class library-viewer--file.
 *
 * @since 2.0.0
 * @since 2.0.3 $file_abs_path is added in the $all_files parameter ( $all_files['file_abs_path'] ).
 *
 * @param string $file_html The html output of printed file.
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 *         @type string $file_abs_path File's absolute URL.
 * }
 * @param array $this->globals See property's documentation.
 */
do_action('lv_after_file', $file_html, $file, $this->globals);
lv_after_folder
After folder html action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * After folder html action.
 *
 * Print any html you want after closing of
 * div with class library-viewer--folder.
 *
 * @since 2.0.0
 *
 * @param string $folder_html The html output of printed folder.
 * @param array $folder {
 *         Details of the printed folder.
 *
 *         @type string $folder_name Folder's name.
 *         @type string $folder_fake_link Folder's fake link.
 *         @type string $folder_real_link Folder's real (relative) link.
 *         (Used nowhere, just an extra parameter in the filter)
 *         @type string $folder_abs_path The folder's absolute path.
 *          (Used nowhere, just an extra parameter in the filter)
 * }
 * @param array $this->globals See property's documentation.
 */
do_action('lv_after_folder', $folder_html, $folder, $this->globals);
lv_before_breadcrumb_end
Before breadcrumb end action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Before breadcrumb end action.
 *
 * With this action, you can echo any content you want before
 * closing of div with class library-viewer--breadcrumb.
 *
 * @since 2.0.0
 *
 * @param array $this->globals See property's documentation.
 */
do_action('lv_before_breadcrumb_end', $this->globals);
lv_before_breadcrumb_start
Before breadcrumb start action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Before breadcrumb start action.
 *
 * With this action, you can echo any content you want before
 * opening of div with class library-viewer--breadcrumb.
 *
 * @since 2.0.0
 *
 * @param array $this->globals See property's documentation.
 */
do_action('lv_before_breadcrumb_start', $this->globals);
lv_before_file
Before file html action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Before file html action.
 *
 * Print any html you want before opening of
 * div with class library-viewer--file.
 *
 * @since 2.0.0
 * @since 2.0.3 $file_abs_path is added in the $all_files parameter ( $all_files['file_abs_path'] ).
 *
 * @param string $file_html The html output of printed file.
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 *         @type string $file_abs_path File's absolute URL.
 * }
 * @param array $this->globals See property's documentation.
 */
do_action('lv_before_file', $file_html, $file, $this->globals);
lv_before_folder
Before folder html action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Before folder html action.
 *
 * Print any html you want before opening of
 * div with class library-viewer--folder.
 *
 * @since 2.0.0
 *
 * @param string $folder_html The html output of printed folder.
 * @param array $folder {
 *         Details of the printed folder.
 *
 *         @type string $folder_name Folder's name.
 *         @type string $folder_fake_link Folder's fake link.
 *         @type string $folder_real_link Folder's real (relative) link.
 *         (Used nowhere, just an extra parameter in the filter)
 *         @type string $folder_abs_path The folder's absolute path.
 *          (Used nowhere, just an extra parameter in the filter)
 * }
 * @param array $this->globals See property's documentation.
 */
do_action('lv_before_folder', $folder_html, $folder, $this->globals);
lv_file_was_viewed
File was viewed action.
file: library-viewer/frontend/class-library-viewer-file.php

/**
 * File was viewed action.
 *
 * Do some actions if a file was accessed/viewed.
 *
 * @since 2.0.0
 *
 * @param string $file_name The name of file.
 * @param string $file_extension The extension of the file.
 * @param array $this->globals See property's documentation.
 */
do_action('lv_file_was_viewed', $file_name, $file_extension, $this->globals);
lv_folder_was_viewed
Folder was viewed action.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder was viewed action.
 *
 * Do some actions if a folder was accessed/viewed.
 *
 * @since 2.0.0
 *
 * @param string $real_path The real (relative) path of current folder.
 * @param string $folder_abs_path The absolute path of current folder.
 * @param array $this->globals See property's documentation.
 */
do_action('lv_folder_was_viewed', $real_path, $folder_abs_path, $this->globals);

Filters

lv_breadcrumb_folder_delimiter_html
Breadcrumb folder delimiter html filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Breadcrumb folder delimiter html filter.
 *
 * With this filter, you can change the html of the breadcrumb delimiter.
 *
 * @since 2.0.0
 *
 * @param string $delimiter The html of breadcrumb delimiter.
 * @param array $this->globals See property's documentation.
 */
$delimiter = apply_filters('lv_breadcrumb_folder_delimiter_html', $delimiter, $this->globals);
lv_breadcrumb_html
The breadcrumb html filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * The breadcrumb html filter.
 *
 * With this filter, you can filter the html of breadcrumb.
 * Contains the div with class `library-viewer--breadcrumb`.
 *
 * @since 2.0.3
 *
 * @param string $breadcrumb_html The html of the breadcrumb.
 * @param $breadcrumb_items {
 *         The items of breadcrumb, separated with delimiter(/).
 *
 *         @type string $folder_name The folder name as link text.
 *         @type string $folder_abs_path The absolute path of the folder.
 *         @type string $folder_fake_link The folder fake link as link URL.
 * }
 * @param array $this->globals See property's documentation.
 */
$breadcrumb_html = apply_filters('lv_breadcrumb_html', $breadcrumb_html, $breadcrumb_items, $this->globals);
lv_breadcrumb_items
Breadcrumb items filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Breadcrumb items filter.
 *
 * With this filter, you can alter the breadcrumb items,
 * for example the folder name and folder fake link.
 *
 * @since 2.0.0
 *
 * @param $breadcrumb_items {
 *         The items of breadcrumb, separated with delimiter(/).
 *
 *         @type string $folder_name The folder name as link text.
 *         @type string $folder_abs_path The absolute path of the folder.
 *         @type string $folder_fake_link The folder fake link as link URL.
 * }
 * @param array $this->globals See property's documentation.
 */
$url_parts = apply_filters('lv_breadcrumb_items', $breadcrumb_items, $this->globals);
lv_containing_files
Containing files of current folder filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Containing files of current folder filter.
 *
 * With this filter, we can filter the files that will be
 * displayed in the library (front-end), their name, URL or order.
 * Files that are contained in the current folder ($this->real_path).
 *
 * @since 2.0.0
 * @since 2.0.3 $file_abs_path is added in the $all_files parameter ( $all_files['file_abs_path'] ).
 *
 * @param array $all_files {
 *        All files.
 *
 *         @type array $key {
 *             The file's array.
 *
 *             @type string $file_name File's name.
 *             @type string $file_fake_link File's fake link.
 *             @type string $file_real_link File's real (relative) link.
 *             @type string $file_full_url File's full URL (with site_url as prefix).
 *             @type string $file_abs_path File's absolute URL.
 *             @type string $file_icon_html If exists, replaces the default file icon.
 *         }
 * }
 * @param array $this->globals See property's documentation.
 */
$all_files = apply_filters('lv_containing_files', $all_files, $this->globals);
lv_containing_folders
Containing folders of current folder filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Containing folders of current folder filter.
 *
 * With this filter, we can filter the folders that will be
 * displayed in the library (front-end), their name, URL or order.
 * Folders that are contained in the current folder ($this->real_path).
 *
 * @since 2.0.0
 *
 * @param array $all_folders {
 *        All folders.
 *
 *         @type array $key {
 *             The folder's array.
 *
 *             @type string $folder_name Folder's name.
 *             @type string $folder_fake_link Folder's fake link.
 *             @type string $folder_real_link Folder's real (relative) link.
 *             @type string $folder_abs_path The folder's absolute path.
 *             @type string $folder_icon_html If exists, replaces the default folder icon.
 *         }
 * }
 */
$all_folders = apply_filters('lv_containing_folders', $all_folders, $this->globals);
lv_empty_folder_html
Empty folder html message.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Empty folder html message.
 *
 * If the current folder contains neither files nor folders,
 * an equivalent message will be displayed an with filter.
 * With this filter you can change it.
 *
 * @since 2.0.0
 *
 * @param string $empty_folder_html The html of the empty folder message.
 * @param array $this->globals See property's documentation.
 */
$empty_folder_html = apply_filters('lv_empty_folder_html', $empty_folder_html, $this->globals);
lv_error_message
Error message filter.
file: library-viewer/library-viewer.php

/**
 * Error message filter.
 *
 * Filter the plugin's error messages according to $case.
 *
 * @since 2.0.3
 * @since 2.0.7 $s & $s2 parameters added
 *
 * @param string $string The error message HTML.
 * @param string $case The case. According to this,
 * different messages will be displayed.
 * @param string $s The first string that is used in the main string. If exists, in that case.
 * @param string $s2 The second string that is used in the main string. If exists, in that case.
 */
$string = apply_filters('lv_error_message', $string, $case, $s, $s);
lv_file_action
File action filter.
file: library-viewer/frontend/class-library-viewer-file.php

/**
 * File action filter.
 *
 * Determine which action the file viewer will do.
 *
 * @since 2.0.0
 *
 * @param string $action The file action. Accepts `view_file`, `file_not_allowed`, `file_not_exists`,
 * `php_forbidden`, `no_appropriate_capabilities`, `redirect_to_login`.
 * @param array $this->globals See property's documentation.
 */
$action = apply_filters('lv_file_action', $action, $this->globals);
lv_file_anchor_html
File anchor html filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * File anchor html filter.
 *
 * With this filter, we can change the a html tag of the printed file.
 *
 * @since 2.0.0
 * @since 2.0.3 The variable $file_anchor_href has been also added in the array $file (2nd parameter).
 *
 * @param string $anchor_html The html tag a of a printed file.
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 *         @type string $file_anchor_href The href attribute of html anchor.
 * }
 * @param array $this->globals See property's documentation.
 */
$anchor_html = apply_filters('lv_file_anchor_html', $anchor_html, $file, $this->globals);
lv_file_fake_path_symbols
File fake path symbols filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * File fake path symbols filter.
 *
 * File fake path is the path of file
 * that user sees in the front-end.
 * With this filter, we can change the symbols of the
 * fake path of files, that user sees in the front-end.
 * So, these symbols will replace the `$file_real_path_symbols`.
 *
 * @since 2.0.0
 *
 * @param array $lv_folder_fake_path_symbols The array of folder fake path's symbols
 * @param array $this->globals See property's documentation.
 */
$this->globals['file_fake_path_symbols'] = apply_filters('lv_file_fake_path_symbols', $lv_file_fake_path_symbols, $this->globals);
lv_file_html
File HTML filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * File HTML filter.
 *
 * Used to filter the html output of printed file.
 *
 * @since 2.0.0
 * @since 2.0.3 $file_abs_path is added in the $all_files parameter ( $all_files['file_abs_path'] ).
 *
 * @param string $file_html The html output of printed file.
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 *         @type string $file_abs_path File's absolute URL.
 * }
 * @param array $this->globals See property's documentation.
 */
$file_html = apply_filters('lv_file_html', $file_html, $file, $this->globals);
lv_file_icon_html
File icon html filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * File icon html filter.
 *
 * With this filter, we can change the html (the span html element)
 * before the file in the Library in the front-end.
 * Before 2.0.0, we could set an icon for files using only css
 * (width, height & background-image attributes).
 * Now, we can set the file icon also with the php filter `lv_file_icon_html`.
 *
 *         Example:
 *         add_filter('lv_file_icon_html', function($html, $extension){
 *             if ( 'pdf' == $extension ) {
 *                 $html = '<svg style="width: 25px;" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 56 56" style="enable-background:new 0 0 56 56;" xml:space="preserve"> <g> <path style="fill:#E9E9E0;" d="M36.985,0H7.963C7.155,0,6.5,0.655,6.5,1.926V55c0,0.345,0.655,1,1.463,1h40.074 c0.808,0,1.463-0.655,1.463-1V12.978c0-0.696-0.093-0.92-0.257-1.085L37.607,0.257C37.442,0.093,37.218,0,36.985,0z"/> <polygon style="fill:#D9D7CA;" points="37.5,0.151 37.5,12 49.349,12     "/> <path style="fill:#CC4B4C;" d="M19.514,33.324L19.514,33.324c-0.348,0-0.682-0.113-0.967-0.326 c-1.041-0.781-1.181-1.65-1.115-2.242c0.182-1.628,2.195-3.332,5.985-5.068c1.504-3.296,2.935-7.357,3.788-10.75 c-0.998-2.172-1.968-4.99-1.261-6.643c0.248-0.579,0.557-1.023,1.134-1.215c0.228-0.076,0.804-0.172,1.016-0.172 c0.504,0,0.947,0.649,1.261,1.049c0.295,0.376,0.964,1.173-0.373,6.802c1.348,2.784,3.258,5.62,5.088,7.562 c1.311-0.237,2.439-0.358,3.358-0.358c1.566,0,2.515,0.365,2.902,1.117c0.32,0.622,0.189,1.349-0.39,2.16 c-0.557,0.779-1.325,1.191-2.22,1.191c-1.216,0-2.632-0.768-4.211-2.285c-2.837,0.593-6.15,1.651-8.828,2.822 c-0.836,1.774-1.637,3.203-2.383,4.251C21.273,32.654,20.389,33.324,19.514,33.324z M22.176,28.198 c-2.137,1.201-3.008,2.188-3.071,2.744c-0.01,0.092-0.037,0.334,0.431,0.692C19.685,31.587,20.555,31.19,22.176,28.198z M35.813,23.756c0.815,0.627,1.014,0.944,1.547,0.944c0.234,0,0.901-0.01,1.21-0.441c0.149-0.209,0.207-0.343,0.23-0.415 c-0.123-0.065-0.286-0.197-1.175-0.197C37.12,23.648,36.485,23.67,35.813,23.756z M28.343,17.174 c-0.715,2.474-1.659,5.145-2.674,7.564c2.09-0.811,4.362-1.519,6.496-2.02C30.815,21.15,29.466,19.192,28.343,17.174z M27.736,8.712c-0.098,0.033-1.33,1.757,0.096,3.216C28.781,9.813,27.779,8.698,27.736,8.712z"/> <path style="fill:#CC4B4C;" d="M48.037,56H7.963C7.155,56,6.5,55.345,6.5,54.537V39h43v15.537C49.5,55.345,48.845,56,48.037,56z"/> <g> <path style="fill:#FFFFFF;" d="M17.385,53h-1.641V42.924h2.898c0.428,0,0.852,0.068,1.271,0.205 c0.419,0.137,0.795,0.342,1.128,0.615c0.333,0.273,0.602,0.604,0.807,0.991s0.308,0.822,0.308,1.306 c0,0.511-0.087,0.973-0.26,1.388c-0.173,0.415-0.415,0.764-0.725,1.046c-0.31,0.282-0.684,0.501-1.121,0.656 s-0.921,0.232-1.449,0.232h-1.217V53z M17.385,44.168v3.992h1.504c0.2,0,0.398-0.034,0.595-0.103 c0.196-0.068,0.376-0.18,0.54-0.335c0.164-0.155,0.296-0.371,0.396-0.649c0.1-0.278,0.15-0.622,0.15-1.032 c0-0.164-0.023-0.354-0.068-0.567c-0.046-0.214-0.139-0.419-0.28-0.615c-0.142-0.196-0.34-0.36-0.595-0.492 c-0.255-0.132-0.593-0.198-1.012-0.198H17.385z"/> <path style="fill:#FFFFFF;" d="M32.219,47.682c0,0.829-0.089,1.538-0.267,2.126s-0.403,1.08-0.677,1.477s-0.581,0.709-0.923,0.937 s-0.672,0.398-0.991,0.513c-0.319,0.114-0.611,0.187-0.875,0.219C28.222,52.984,28.026,53,27.898,53h-3.814V42.924h3.035 c0.848,0,1.593,0.135,2.235,0.403s1.176,0.627,1.6,1.073s0.74,0.955,0.95,1.524C32.114,46.494,32.219,47.08,32.219,47.682z M27.352,51.797c1.112,0,1.914-0.355,2.406-1.066s0.738-1.741,0.738-3.09c0-0.419-0.05-0.834-0.15-1.244 c-0.101-0.41-0.294-0.781-0.581-1.114s-0.677-0.602-1.169-0.807s-1.13-0.308-1.914-0.308h-0.957v7.629H27.352z"/> <path style="fill:#FFFFFF;" d="M36.266,44.168v3.172h4.211v1.121h-4.211V53h-1.668V42.924H40.9v1.244H36.266z"/> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>';
 *                 //instead of span with background image
 *             }
 *            return $html;
 *        }, 10, 2);
 *
 * @since 2.0.0
 * @since 2.0.3 $file_abs_path is added in the $all_files parameter ( $all_files['file_abs_path'] ).
 *
 * @param string $icon_html The html of the file icon.
 * @param string $extension The extension of the current file (pdf, png etc).
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 *         @type string $file_abs_path File's absolute URL.
 * }
 * @param array $this->globals See property's documentation.
 */
$default_file_icon_html = apply_filters('lv_file_icon_html', $default_file_icon_html, $extension, $file, $this->globals);
lv_file_identifier
Library Viewer file identifier filter.
file: library-viewer/library-viewer.php

/**
 * Library Viewer file identifier filter.
 *
 * If file identifier is found in REQUEST_URI this plugins readfile and exits the code.
 * So with this filter, we can change this string to this of our choice.
 * BE CAREFUL!! If this string will be found in a URL of your website, the php execution will stops here.
 *
 * @param string $file_identifier Library Viewer file identifier keyword.
 * @since 2.0.0
 */
$file_identifier = apply_filters('lv_file_identifier', $file_identifier);
lv_file_real_path_symbols
File real(relative) path symbols filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * File real(relative) path symbols filter.
 *
 * File real path is the relative path of file,
 * that user doesn't see in the front-end.
 * With this filter, we can change the symbols of the
 * real(relative) path of files that user doesn't see in the front-end.
 * So, these symbols will replace the `$file_fake_path_symbols`.
 *
 * @since 2.0.0
 *
 * @param array $file_real_path_symbols The array of file real path's symbols.
 * @param array $this->globals See property's documentation.
 */
$this->globals['file_real_path_symbols'] = apply_filters( 'lv_file_real_path_symbols', $lv_file_real_path_symbols, $this->globals );
lv_file_status
Filter the status of the file.
file: library-viewer/frontend/class-library-viewer-file.php

/**
 * Filter the status of the file.
 *
 * This array determines which headers will be sent,
 * possible error messages and
 * which file will be read if needed.
 *
 * @since 2.0.0
 *
 * @param array $file_status {
 *         The array that contains the file status details.
 *
 *         @type array $header {
 *             This array contains the headers that will be sent. Default is empty array.
 *
 *             @type string $key The header that will be sent.
 *         }
 *         @type string $error_message The error message that will be displayed in WordPress error page,
 *                                     according to $action. Default is empty string.
 *         @type string $error_page_title The WordPress error page title (second parameter of wp_die function).
 *         @type string $readfile The file that will be displayed. Default is empty string.
 * }
 * @param string $action The value that `lv_file_action` filter returns.
 * @param array $this->globals See property's documentation.
 */
$this->file_status = apply_filters('lv_file_status', $this->file_status, $action, $this->globals);
lv_filter_global_[$global]
Filter the $global (the parameters as globals 'have_file_access' etc...).
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Filter the $global (the parameters as globals 'have_file_access' etc...).
 *
 * With this filter, you can filter the global variables that class allows.
 * The globals that can be filtered, maybe are the parameters of the shortcode.
 * These parameters can be filtered AFTER the rest globals' initialization.
 *
 * But I mean the corresponding globals variables,
 * not exactly the strings/parameters that user pass in the shortcode.
 *
 * For example,
 * When the shortcode is
 * [library-viewer have_file_access="editor, author"]
 * the $global variable have_file_access is the array
 * array(
 *        0 => 'editor',
 *        1 => 'author'
 * )
 * and NOT the 'editor, author' string.
 *
 * @since 2.0.0
 *
 * @param string|array $this->globals[$global] The value of the $global variable.
 * @param array $this->globals See property's documentation.
 */
$this->globals[$global] = apply_filters("lv_filter_global_{$global}", $this->globals[$global], $this->globals);
lv_filter_global_[$parameter]
Filter the $parameter (the parameters as globals 'have_file_access' etc...).
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Filter the $parameter (the parameters as globals 'have_file_access' etc...).
 *
 * With this filter, you can filter the parameters (as global variables).
 * These parameters can be filtered BEFORE the rest globals' initialization.
 *
 * But I mean the corresponding globals variables,
 * not exactly the strings/parameters that user pass in the shortcode.
 *
 * For example,
 * When the shortcode is
 * [library-viewer have_file_access="editor, author"]
 * the $global variable have_file_access is the array
 * array(
 *        0 => 'editor',
 *        1 => 'author'
 * )
 * and NOT the 'editor, author' string.
 *
 * @since 2.0.3
 *
 * @param string|array $this->globals[$parameter] The value of the $parameter variable.
 * @param array $this->globals See property's documentation.
 */
$this->globals[$parameter] = apply_filters("lv_filter_global_{$parameter}", $this->globals[$parameter], $this->globals);
lv_folder_fake_path_symbols
Folder fake path symbols filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder fake path symbols filter.
 *
 * Folder fake path is the path of folder
 * that user sees in the front-end.
 * With this filter, we can change the symbols of the
 * fake path of folders that user sees in the front-end.
 * So, these symbols will replace the `$folder_real_path_symbols`.
 *
 * @since 2.0.0
 *
 * @param array $lv_folder_fake_path_symbols The array of folder fake path's symbols.
 * @param array $this->globals See property's documentation.
 */
$this->globals['folder_fake_path_symbols'] = apply_filters('lv_folder_fake_path_symbols', $lv_folder_fake_path_symbols, $this->globals);
lv_folder_html
Folder HTML filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder HTML filter.
 *
 * Used to filter the html output of printed folder.
 *
 * @since 2.0.0
 *
 * @param string $folder_html The html output of printed folder.
 * @param array $folder {
 *         Details of the printed folder.
 *
 *         @type string $folder_name Folder's name.
 *         @type string $folder_fake_link Folder's fake link.
 *         @type string $folder_real_link Folder's real (relative) link.
 *         (Used nowhere, just an extra parameter in the filter)
 *         @type string $folder_abs_path The folder's absolute path.
 *          (Used nowhere, just an extra parameter in the filter)
 * }
 * @param array $this->globals See property's documentation.
 */
$folder_html = apply_filters('lv_folder_html', $folder_html, $folder, $this->globals);
lv_folder_icon_html
Folder icon html filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder icon html filter.
 *
 * With this filter we can change the folder icon that is printed
 * before the folder in the Library in the front-end.
 * Before 2.0.0, we could change the folder icon using only css
 * (background-image attribute).
 * Now, we can set the folder icon with the php filter `lv_folder_icon_html`.
 *
 *         Example:
 *         add_filter('lv_folder_icon_html', function($html){
 *             $html = '<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="45px" height="45px" viewBox="0 0 45 45" style="enable-background:new 0 0 45 45;" xml:space="preserve"> <g> <path d="M44.45,13.436c-0.474-0.591-1.192-0.936-1.95-0.936H40c0-1.381-1.119-2.5-2.5-2.5H35V7.5C35,6.119,33.881,5,32.5,5h-30 C1.119,5,0,6.119,0,7.5v30C0,38.881,1.119,40,2.5,40h5h25h5c1.172,0,2.188-0.814,2.439-1.958l5-22.5 C45.105,14.802,44.925,14.027,44.45,13.436z M2.5,7.5h30V10H30c-1.381,0-2.5,1.119-2.5,2.5h-15c-1.172,0-2.186,0.814-2.44,1.958 c0,0-5.058,22.862-5.058,23.042H2.5V7.5L2.5,7.5z"/> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>';
 *             //instead of span with background image
 *             return $html;
 *        });
 *
 * @since 2.0.0
 * @param string $default_folder_icon_html The html of the default folder icon.
 * @param array $this->globals See property's documentation.
 */
$default_folder_icon_html = apply_filters('lv_folder_icon_html', $default_folder_icon_html, $this->globals);
lv_folder_real_path_symbols
Folder real(relative) path symbols filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder real(relative) path symbols filter.
 *
 * Folder real path is the relative path of folder,
 * that user doesn't see in the front-end.
 * With this filter, we can change the symbols of the
 * real(relative) path of folders that user doesn't see in the front-end.
 * So, these symbols will replace the `$folder_fake_path_symbols`.
 *
 * @since 2.0.0
 *
 * @param array $folder_real_path_symbols The array of folder real path's symbols.
 * @param array $this->globals See property's documentation.
 */
$this->globals['folder_real_path_symbols'] = apply_filters('lv_folder_real_path_symbols', $lv_folder_real_path_symbols, $this->globals);
lv_folder_text_at_beginning
Folder text at beginning filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder text at beginning filter.
 *
 * This filter allow us to add or change the text at beginning of the folder,
 * i.e. the text before the first containing folder.
 *
 * THE OTHER WAY to add text at beginning is
 * adding the php file include.php with a variable $text_at_beginning.
 *
 * @since 2.0.0
 *
 * @param string $text_at_beginning The beginning text.
 * @param array $this->globals See property's documentation.
 */
$text_at_beginning = apply_filters('lv_folder_text_at_beginning', $text_at_beginning, $this->globals);
lv_folder_text_at_end
Folder text at end filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * Folder text at end filter.
 *
 * This filter allow us to add or change the text at end of the files,
 * i.e. the text after the last containing file.
 *
 * THE OTHER WAY to add text at end is
 * adding the php file include.php with a variable $text_at_end.
 *
 * @since 2.0.0
 *
 * @param string $text_at_end The ending text.
 * @param array $this->globals See property's documentation.
 */
$text_at_end = apply_filters('lv_folder_text_at_end', $text_at_end, $this->globals);
lv_mime_types
Supported mime types filter.
file: library-viewer/frontend/class-library-viewer-file.php

/**
 * Supported mime types filter.
 *
 * With this filter we can add or remove support for specific mime types.
 * Examples below.
 *
 * @since 2.0.0
 *
 * @param array $mime_types The supported mime types. Default is the wp_get_mime_types() array.
 * @param string $file_extension The file extension.
 * @param array $this->globals See property's documentation.
 *
 * [wordpress default mime types] => Array(
 *        [jpg|jpeg|jpe] => image/jpeg
 *        [gif] => image/gif
 *        [png] => image/png
 *        [bmp] => image/bmp
 *        [tiff|tif] => image/tiff
 *        [ico] => image/x-icon
 *        [asf|asx] => video/x-ms-asf
 *        [wmv] => video/x-ms-wmv
 *        [wmx] => video/x-ms-wmx
 *        [wm] => video/x-ms-wm
 *        [avi] => video/avi
 *        [divx] => video/divx
 *        [flv] => video/x-flv
 *        [mov|qt] => video/quicktime
 *        [mpeg|mpg|mpe] => video/mpeg
 *        [mp4|m4v] => video/mp4
 *        [ogv] => video/ogg
 *        [webm] => video/webm
 *        [mkv] => video/x-matroska
 *        [3gp|3gpp] => video/3gpp
 *        [3g2|3gp2] => video/3gpp2
 *        [txt|asc|c|cc|h|srt] => text/plain
 *        [csv] => text/csv
 *        [tsv] => text/tab-separated-values
 *        [ics] => text/calendar
 *        [rtx] => text/richtext
 *        [css] => text/css
 *        [htm|html] => text/html
 *        [vtt] => text/vtt
 *        [dfxp] => application/ttaf+xml
 *        [mp3|m4a|m4b] => audio/mpeg
 *        [aac] => audio/aac
 *        [ra|ram] => audio/x-realaudio
 *        [wav] => audio/wav
 *        [ogg|oga] => audio/ogg
 *        [flac] => audio/flac
 *        [mid|midi] => audio/midi
 *        [wma] => audio/x-ms-wma
 *        [wax] => audio/x-ms-wax
 *        [mka] => audio/x-matroska
 *        [rtf] => application/rtf
 *        [js] => application/javascript
 *        [pdf] => application/pdf
 *        [swf] => application/x-shockwave-flash
 *        [class] => application/java
 *        [tar] => application/x-tar
 *        [zip] => application/zip
 *        [gz|gzip] => application/x-gzip
 *        [rar] => application/rar
 *        [7z] => application/x-7z-compressed
 *        [exe] => application/x-msdownload
 *        [psd] => application/octet-stream
 *        [xcf] => application/octet-stream
 *        [doc] => application/msword
 *        [pot|pps|ppt] => application/vnd.ms-powerpoint
 *        [wri] => application/vnd.ms-write
 *        [xla|xls|xlt|xlw] => application/vnd.ms-excel
 *        [mdb] => application/vnd.ms-access
 *        [mpp] => application/vnd.ms-project
 *        [docx] => application/vnd.openxmlformats-officedocument.wordprocessingml.document
 *        [docm] => application/vnd.ms-word.document.macroEnabled.12
 *        [dotx] => application/vnd.openxmlformats-officedocument.wordprocessingml.template
 *        [dotm] => application/vnd.ms-word.template.macroEnabled.12
 *        [xlsx] => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
 *        [xlsm] => application/vnd.ms-excel.sheet.macroEnabled.12
 *        [xlsb] => application/vnd.ms-excel.sheet.binary.macroEnabled.12
 *        [xltx] => application/vnd.openxmlformats-officedocument.spreadsheetml.template
 *        [xltm] => application/vnd.ms-excel.template.macroEnabled.12
 *        [xlam] => application/vnd.ms-excel.addin.macroEnabled.12
 *        [pptx] => application/vnd.openxmlformats-officedocument.presentationml.presentation
 *        [pptm] => application/vnd.ms-powerpoint.presentation.macroEnabled.12
 *        [ppsx] => application/vnd.openxmlformats-officedocument.presentationml.slideshow
 *        [ppsm] => application/vnd.ms-powerpoint.slideshow.macroEnabled.12
 *        [potx] => application/vnd.openxmlformats-officedocument.presentationml.template
 *        [potm] => application/vnd.ms-powerpoint.template.macroEnabled.12
 *        [ppam] => application/vnd.ms-powerpoint.addin.macroEnabled.12
 *        [sldx] => application/vnd.openxmlformats-officedocument.presentationml.slide
 *        [sldm] => application/vnd.ms-powerpoint.slide.macroEnabled.12
 *        [onetoc|onetoc2|onetmp|onepkg] => application/onenote
 *        [oxps] => application/oxps
 *        [xps] => application/vnd.ms-xpsdocument
 *        [odt] => application/vnd.oasis.opendocument.text
 *        [odp] => application/vnd.oasis.opendocument.presentation
 *        [ods] => application/vnd.oasis.opendocument.spreadsheet
 *        [odg] => application/vnd.oasis.opendocument.graphics
 *        [odc] => application/vnd.oasis.opendocument.chart
 *        [odb] => application/vnd.oasis.opendocument.database
 *        [odf] => application/vnd.oasis.opendocument.formula
 *        [wp|wpd] => application/wordperfect
 *        [key] => application/vnd.apple.keynote
 *        [numbers] => application/vnd.apple.numbers
 *        [pages] => application/vnd.apple.pages
 * )
 *
 * TIPS:
 * - If you want to force every file to be downloaded, you can hook the $mime_types variable and return an empty array
 * and set the shortcode parameter my_doc_viewer="library-viewer"
 *     Example Code:
 * add_filter('lv_mime_types', function(){
 *     return array();
 * });
 *
 * - If you want to force files with specific extension to be downloaded, just unset the value from the array.
 * Example Code:
 * add_filter('lv_mime_types', function($mime_types){
 *         unset( $mime_types['pdf'] ); //force only pdfs to be downloaded
 *         return $mime_types;
 * });
 */
$mime_types = apply_filters( 'lv_mime_types', $mime_types, $this->globals);
lv_my_doc_viewer_file_encoded
my doc viewer file encoded filter.
file: library-viewer/frontend/class-library-viewer-shortcode.php

/**
 * my doc viewer file encoded filter.
 *
 * With this filter, we can determine if the file will be appended to `my_doc_viewer` as encoded or not default is true (encoded).
 *
 * @since 2.0.0
 *
 * @param bool $to_be_encoded Encoded or not?
 * @param array $file {
 *         Details of the printed file.
 *
 *         @type string $file_name File's name.
 *         @type string $file_fake_link File's fake link.
 *         @type string $file_real_link File's real (relative) link.
 *         @type string $file_full_url File's full URL (with site_url as prefix).
 * }
 * @param array $this->globals See property's documentation.
 */
$to_be_encoded = apply_filters('lv_my_doc_viewer_file_encoded', $to_be_encoded, $file, $this->globals);
lv_redirect_to_url
Redirection to URL filter.
file: library-viewer/frontend/class-library-viewer-file.php

/**
 * Redirection to URL filter.
 *
 * With this filter, you can filter the url that the user is redirected to login page
 * when attempting to view a file that
 * is restricted to logged-in users or users with specific capabilities/roles.
 * When the user will log in, will be redirected to that URL of file.
 *
 * @since 2.0.0
 *
 * @param string $url The full URL that user will be redirected to
 * if hasn't the capabilities to view the file.
 * @param string $current_page_url The library viewer's URL of the file.
 * Not the actual URL of the file. This that will be encoded
 * and be passed to GET parameter `redirect_to` of $url.
 * @param array $this->globals See property's documentation.
 */
$url = apply_filters('lv_redirect_to_url', $url, $current_page_url, $this->globals);
Scroll to top