- updated hookdocs markup;

- updated release docs;
This commit is contained in:
Mykyta Synelnikov
2023-06-12 17:02:56 +03:00
parent 71790c44fa
commit ca092d9496
6 changed files with 52 additions and 18 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ GNU Version 2 or Any Later Version
## Releases
[Official Release Version: 2.6.2](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.2).
[Official Release Version: 2.6.3](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.3).
## Changelog
+4 -7
View File
@@ -47,16 +47,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Navmenu' ) ) {
* Fires just before the move buttons of a nav menu item in the menu editor.
* Adds block "Ultimate Member Menu Settings"
*
* @since WP 5.4.0
* @hook wp_nav_menu_item_custom_fields
*
* @param int $item_id Menu item ID.
* @param int $item_id Menu item ID.
* @param \WP_Post $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding.
* @param int $depth Depth of menu item. Used for padding.
* @param \stdClass $args An object of menu item arguments.
* @param int $id Nav menu ID.
* @param int $id Nav menu ID.
*/
function wp_nav_menu_item_custom_fields( $item_id, $item, $depth, $args, $id = null ) {
public function wp_nav_menu_item_custom_fields( $item_id, $item, $depth, $args, $id = null ) {
$um_nav_public = get_post_meta( $item->ID, 'menu-item-um_nav_public', true );
$_nav_roles_meta = get_post_meta( $item->ID, 'menu-item-um_nav_roles', true );
+12
View File
@@ -729,6 +729,18 @@ if ( ! class_exists( 'UM_Functions' ) ) {
* @param {string} $context Function context 'wp-admin' for Admin Dashboard echo, 'templates' for the frontend.
*
* @return {array} Allowed HTML tags with attributes.
*
* @example <caption>It adds iframe HTML tag and 'onclick' attribute for strong tag.</caption>
* function add_extra_kses_allowed_tags( $allowed_html, $context ) {
* if ( 'templates' === $context ) {
* $allowed_html['iframe'] = array(
* 'src' => true,
* );
* $allowed_html['strong']['onclick'] = true;
* }
* return $allowed_html;
* }
* add_filter( 'um_late_escaping_allowed_tags', 'add_extra_kses_allowed_tags', 10, 2 );
*/
$allowed_html = apply_filters( 'um_late_escaping_allowed_tags', $allowed_html, $context );
@@ -51,7 +51,6 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
* UM filter - Restore original arguments on translated page
*
* @description Restore original arguments on load shortcode if they are missed in the WPML translation
* @hook um_pre_args_setup
*
* @global \SitePress $sitepress
* @param array $args
@@ -82,7 +81,6 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
* Integration for the "Transposh Translation Filter" plugin
*
* @description Fix issue "404 Not Found" on profile page
* @hook template_redirect
* @see http://transposh.org/
*
* @global transposh_plugin $my_transposh_plugin
@@ -179,7 +177,6 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
/**
* Change user profile URL for WPML compatibility.
*
* @hook um_external_profile_url
* @see \um\core\Permalinks::profile_permalink()
*
* @param bool|string $profile_url Profile URL.
@@ -217,7 +214,6 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
*
* Note: It's used for User Profile nav links fix
*
* @hook um_get_current_page_url
* @see \um\core\Permalinks::get_current_url()
*
* @param string $page_url Current URL.
@@ -244,7 +240,6 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
/**
* Filters the displayed languages of the WPML language switcher.
*
* @hook icl_ls_languages
* @see https://wpml.org/wpml-hook/icl_ls_languages/
*
* @param array $array Collection of active languages to display in the language switcher.
+5 -4
View File
@@ -1726,14 +1726,15 @@ function um_profile_menu( $args ) {
$nav_link = apply_filters( "um_profile_menu_link_{$id}", $nav_link );
/**
* Filters changing a link's tag attributes.
* Filters a profile menu navigation links' tag attributes.
*
* @since 2.6.3
* @hook um_profile_menu_link_{$id}_attrs
*
* @param {string} $profile_nav_attrs link's tag attributes.
* @param {string} $profile_nav_attrs Link's tag attributes.
* @param {array} $args Profile form arguments.
*
* @return {string} link's tag attributes.
* @return {string} Link's tag attributes.
*
* @example <caption>Add a link's tag attributes.</caption>
* function um_profile_menu_link_attrs( $profile_nav_attrs ) {
@@ -1742,7 +1743,7 @@ function um_profile_menu( $args ) {
* }
* add_filter( 'um_profile_menu_link_{$id}_attrs', 'um_profile_menu_link_attrs', 10, 1 );
*/
$profile_nav_attrs = apply_filters( "um_profile_menu_link_{$id}_attrs", '' );
$profile_nav_attrs = apply_filters( "um_profile_menu_link_{$id}_attrs", '', $args );
$profile_nav_class = '';
if ( ! UM()->options()->get( 'profile_menu_icons' ) ) {
+30 -1
View File
@@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration
Requires PHP: 5.6
Requires at least: 5.5
Tested up to: 6.2
Stable tag: 2.6.2
Stable tag: 2.6.3
License: GNU Version 2 or Any Later Version
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -163,6 +163,35 @@ No, you do not need to use our plugins login or registration pages and can us
* To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0)
* UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin
= 2.6.3: June 14, 2023 =
* Enhancements:
- Added: `um_profile_menu_link_{$id}_attrs` hook for changing link attributes
- Added: `get_member_directory_id()` function for getting member directory ID based on page ID
- Added: The "Order" and "Data type" settings for custom sorting fields based on metakey in Member Directory
- Added: New hooks `um_profile_permalink`,`um_external_profile_url`
- Added: Users dropdown field to Admin Forms class
- Added: New developer docs [here](http://ultimatemember.github.io/ultimatemember/). It will be upgraded from version to version
* Bugfixes:
- Fixed: PHP8.2 PHP errors (deprecated, warnings, etc.)
- Fixed: Filters visibility on member directory page based on public or private visibility for filter's field
- Fixed: Incorrect Member Directory numerical sorting order
- Fixed: wp_editor() doesn't work correctly in content restriction settings for Mac users
- Fixed: Profile links when WPML plugin is active
- Fixed: ACF and UM blocks conflict
- Fixed: `UM()->mail()->locate_template()` function's visibility
* Deprecated:
- Deprecated: `um_localize_permalink_filter`. Use `post_link` instead
* Templates required update:
- members.php
= 2.6.2: May 31, 2023 =
* Bugfixes: