mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added hooks for integration;
This commit is contained in:
@@ -672,7 +672,21 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
*/
|
||||
function load_metabox_directory( $object, $box ) {
|
||||
$box['id'] = str_replace( 'um-admin-form-', '', $box['id'] );
|
||||
include_once UM()->admin()->templates_path . 'directory/'. $box['id'] . '.php';
|
||||
|
||||
preg_match('#\{.*?\}#s', $box['id'], $matches );
|
||||
|
||||
if ( isset( $matches[0] ) ) {
|
||||
$path = $matches[0];
|
||||
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
|
||||
} else {
|
||||
$path = um_path;
|
||||
}
|
||||
|
||||
$path = str_replace('{','', $path );
|
||||
$path = str_replace('}','', $path );
|
||||
|
||||
|
||||
include_once $path . 'includes/admin/templates/directory/'. $box['id'] . '.php';
|
||||
wp_nonce_field( basename( __FILE__ ), 'um_admin_save_metabox_directory_nonce' );
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,9 @@ if ( ( ( $search && $show_search ) || ( $filters && $show_filters && count( $sea
|
||||
<div class="um-members-overlay"><div class="um-ajax-loading"></div></div>
|
||||
|
||||
<div class="um-member-directory-header um-form">
|
||||
|
||||
<?php do_action( 'um_members_directory_before_head', $args ); ?>
|
||||
|
||||
<?php if ( $search && $show_search ) { ?>
|
||||
<div class="um-member-directory-header-row um-member-directory-search-row">
|
||||
<div class="um-member-directory-search-line">
|
||||
|
||||
Reference in New Issue
Block a user