Add new option for Network Permalink Structure

This commit is contained in:
champsupertramp
2016-07-01 10:39:22 +08:00
parent 67c3e6e322
commit da5461376b
2 changed files with 27 additions and 8 deletions
+3 -1
View File
@@ -80,7 +80,9 @@ class UM_Permalinks {
}
}else {
if( um_core_is_local() ){
$network_permalink_structure = um_get_option("network_permalink_structure");
if( $network_permalink_structure == "sub-directory" ){
$page_url = 'http';
+24 -7
View File
@@ -1959,12 +1959,8 @@ $this->sections[] = array(
*** @
***/
$this->sections[] = array(
'icon' => 'um-faicon-wrench',
'title' => __('Advanced','ultimatemember'),
'fields' => array(
$arr_advanced_fields = array(
array(
'id' => 'import_export',
'type' => 'import_export',
@@ -2101,6 +2097,27 @@ $this->sections[] = array(
'off' => __('Off','ultimatemember'),
),
)
);
if( is_multisite() ){
$arr_advanced_fields[] = array(
'id' => 'network_permalink_structure',
'type' => 'select',
'select2' => array( 'allowClear' => 0, 'minimumResultsForSearch' => -1 ),
'title' => __( 'Network Permalink Structure','ultimatemember' ),
'desc' => __( 'Change this If you are having conflicts with profile links or redirections in a multisite setup.','ultimatemember' ),
'default' => 'sub-domain',
'options' => array(
'sub-domain' => __('Sub-Domain','ultimatemember'),
'sub-directory' => __('Sub-Directory','ultimatemember'),
)
);
}
$this->sections[] = array(
'icon' => 'um-faicon-wrench',
'title' => __('Advanced','ultimatemember'),
'fields' => $arr_advanced_fields
);