- added hooks for integration;

This commit is contained in:
nikitasinelnikov
2019-12-05 11:07:21 +02:00
parent 73ce00c7eb
commit d4266c08cc
2 changed files with 18 additions and 1 deletions
+15 -1
View File
@@ -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' );
}