mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 11:46:27 +09:00
- added free extension;
- 3rd party integration; - fixed CPT & Taxonomies titles;
This commit is contained in:
@@ -185,15 +185,29 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
)
|
||||
) );
|
||||
|
||||
$all_post_types = get_post_types( array( 'public' => true ) );
|
||||
$post_types_options = array();
|
||||
$all_post_types = get_post_types( array( 'public' => true ), 'objects' );
|
||||
foreach ( $all_post_types as $key => $post_type_data ) {
|
||||
$post_types_options[ $key ] = $post_type_data->labels->singular_name;
|
||||
}
|
||||
|
||||
$all_taxonomies = get_taxonomies( array( 'public' => true ) );
|
||||
$taxonomies_options = array();
|
||||
$exclude_taxonomies = UM()->excluded_taxonomies();
|
||||
|
||||
$all_taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
||||
$duplicates = array();
|
||||
foreach ( $all_taxonomies as $key => $taxonomy ) {
|
||||
if( in_array( $key , $exclude_taxonomies ) ) {
|
||||
unset( $all_taxonomies[ $key ] );
|
||||
if ( in_array( $key , $exclude_taxonomies ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! in_array( $taxonomy->labels->singular_name, $duplicates ) ) {
|
||||
$duplicates[] = $taxonomy->labels->singular_name;
|
||||
$label = $taxonomy->labels->singular_name;
|
||||
} else {
|
||||
$label = $taxonomy->labels->singular_name . ' (' . $key . ')';
|
||||
}
|
||||
|
||||
$taxonomies_options[ $key ] = $label;
|
||||
}
|
||||
|
||||
$restricted_access_post_metabox_value = array();
|
||||
@@ -292,7 +306,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'type' => 'multi_checkbox',
|
||||
'label' => __( 'Restricted Access to Posts','ultimate-member' ),
|
||||
'tooltip' => __( 'Restriction content of the current Posts','ultimate-member' ),
|
||||
'options' => $all_post_types,
|
||||
'options' => $post_types_options,
|
||||
'columns' => 3,
|
||||
'value' => $restricted_access_post_metabox_value,
|
||||
'default' => UM()->options()->get_default( 'restricted_access_post_metabox' ),
|
||||
@@ -302,7 +316,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'type' => 'multi_checkbox',
|
||||
'label' => __( 'Restricted Access to Taxonomies','ultimate-member' ),
|
||||
'tooltip' => __( 'Restriction content of the current Taxonomies','ultimate-member' ),
|
||||
'options' => $all_taxonomies,
|
||||
'options' => $taxonomies_options,
|
||||
'columns' => 3,
|
||||
'value' => $restricted_access_taxonomy_metabox_value,
|
||||
'default' => UM()->options()->get_default( 'restricted_access_taxonomy_metabox' ),
|
||||
|
||||
@@ -155,6 +155,13 @@ $free['terms-conditions'] = array(
|
||||
'image' => 'https://ultimatemember.com/wp-content/uploads/edd/2017/07/terms-conditions.png',
|
||||
'name' => 'Terms & Conditions',
|
||||
'desc' => 'Add terms & conditions to your registration form',
|
||||
);
|
||||
|
||||
$free['forumwp'] = array(
|
||||
'url' => 'https://ultimatemember.com/extensions/forumwp/',
|
||||
'image' => 'https://ultimatemember.com/wp-content/uploads/bb-plugin/cache/um-forumwp-extension-circle.png',
|
||||
'name' => 'ForumWP',
|
||||
'desc' => 'Integrates Ultimate Member with the forum plugin <a href="https://forumwpplugin.com" target="_blank">ForumWP</a>',
|
||||
); ?>
|
||||
|
||||
<div id="um-extensions-wrap" class="wrap">
|
||||
|
||||
@@ -28,6 +28,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
||||
|
||||
|
||||
add_action( 'um_access_fix_external_post_content', array( &$this, 'bbpress_no_access_message_fix' ), 10 );
|
||||
add_action( 'um_access_fix_external_post_content', array( &$this, 'forumwp_fix' ), 11 );
|
||||
|
||||
add_filter( 'um_localize_permalink_filter', array( &$this, 'um_localize_permalink_filter' ), 10, 2 );
|
||||
add_filter( 'icl_ls_languages', array( &$this, 'um_core_page_wpml_permalink' ), 10, 1 );
|
||||
@@ -140,6 +141,16 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fixed ForumWP access to Forums message
|
||||
*/
|
||||
function forumwp_fix() {
|
||||
if ( function_exists( 'FMWP' ) ) {
|
||||
remove_filter( 'single_template', array( FMWP()->shortcodes(), 'cpt_template' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $profile_url
|
||||
* @param $page_id
|
||||
|
||||
+307
-307
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user