Update
This commit is contained in:
parent
d12ef914b3
commit
c93c699a77
@ -9,48 +9,54 @@ if ( ! opalestate_get_option( 'enable_single_author_box' ) ) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $property->get_author_type();
|
$type = $property->get_author_type();
|
||||||
$data = get_userdata( $post->post_author );
|
$data = get_userdata( $post->post_author );
|
||||||
$layout = '';
|
$layout = '';
|
||||||
switch ( $type ) {
|
switch ( $type ) {
|
||||||
case 'hide':
|
case 'hide':
|
||||||
return ;
|
return;
|
||||||
break;
|
break;
|
||||||
case 'agent' :
|
case 'agent' :
|
||||||
$agent_id = $property->get_metabox_value( 'agent' );
|
$agent_id = $property->get_metabox_value( 'agent' );
|
||||||
|
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
array( 'author' => $data,
|
'author' => $data,
|
||||||
'id' => $agent_id ,
|
'id' => $agent_id,
|
||||||
'prefix' => OPALESTATE_AGENT_PREFIX,
|
'prefix' => OPALESTATE_AGENT_PREFIX,
|
||||||
'picture' => '',
|
'picture' => '',
|
||||||
'type' => 'agent',
|
'type' => 'agent',
|
||||||
'hide_description' => true ) );
|
'hide_description' => true,
|
||||||
break;
|
] );
|
||||||
case 'agency' :
|
break;
|
||||||
$agency_id = $property->get_metabox_value( 'agency' );
|
case 'agency' :
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$agency_id = $property->get_metabox_value( 'agency' );
|
||||||
array( 'author' => $data,
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
'id' => $agency_id ,
|
'author' => $data,
|
||||||
'picture' => '',
|
'id' => $agency_id,
|
||||||
'type' => 'agency',
|
'picture' => '',
|
||||||
'hide_description' => true ) );
|
'type' => 'agency',
|
||||||
break;
|
'hide_description' => true,
|
||||||
default:
|
] );
|
||||||
|
break;
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', array('author' => $data , 'hide_description' => true ), $layout );
|
default:
|
||||||
|
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [
|
||||||
break;
|
'author' => $data,
|
||||||
}
|
'hide_description' => true,
|
||||||
|
],
|
||||||
|
$layout
|
||||||
|
);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<div class="opalestate-box-content property-agent-section">
|
<div class="opalestate-box-content property-agent-section">
|
||||||
<div class="opalestate-box">
|
<div class="opalestate-box">
|
||||||
<div class="author-content-box">
|
<div class="author-content-box">
|
||||||
<div class="property-agent-info">
|
<div class="property-agent-info">
|
||||||
<?php echo wp_kses_post( $author_info ); ?>
|
<?php echo wp_kses_post( $author_info ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,30 +14,32 @@ switch ( $type ) {
|
|||||||
case 'agent' :
|
case 'agent' :
|
||||||
$agent_id = $property->get_metabox_value( 'agent' );
|
$agent_id = $property->get_metabox_value( 'agent' );
|
||||||
|
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
[
|
'author' => $data,
|
||||||
'author' => $data,
|
'id' => $agent_id,
|
||||||
'id' => $agent_id,
|
'prefix' => OPALESTATE_AGENT_PREFIX,
|
||||||
'prefix' => OPALESTATE_AGENT_PREFIX,
|
'picture' => '',
|
||||||
'picture' => '',
|
'type' => 'agent',
|
||||||
'type' => 'agent',
|
'hide_description' => true,
|
||||||
'hide_description' => true,
|
] );
|
||||||
] );
|
|
||||||
break;
|
break;
|
||||||
case 'agency' :
|
case 'agency' :
|
||||||
$agency_id = $property->get_metabox_value( 'agency' );
|
$agency_id = $property->get_metabox_value( 'agency' );
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
[
|
'author' => $data,
|
||||||
'author' => $data,
|
'id' => $agency_id,
|
||||||
'id' => $agency_id,
|
'picture' => '',
|
||||||
'picture' => '',
|
'type' => 'agency',
|
||||||
'type' => 'agency',
|
'hide_description' => true,
|
||||||
'hide_description' => true,
|
] );
|
||||||
] );
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ 'author' => $data, 'hide_description' => true ], $layout );
|
'author' => $data,
|
||||||
|
'hide_description' => true,
|
||||||
|
],
|
||||||
|
$layout
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -14,30 +14,32 @@ switch ( $type ) {
|
|||||||
case 'agent' :
|
case 'agent' :
|
||||||
$agent_id = $property->get_metabox_value( 'agent' );
|
$agent_id = $property->get_metabox_value( 'agent' );
|
||||||
|
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
[
|
'author' => $data,
|
||||||
'author' => $data,
|
'id' => $agent_id,
|
||||||
'id' => $agent_id,
|
'prefix' => OPALESTATE_AGENT_PREFIX,
|
||||||
'prefix' => OPALESTATE_AGENT_PREFIX,
|
'picture' => '',
|
||||||
'picture' => '',
|
'type' => 'agent',
|
||||||
'type' => 'agent',
|
'hide_description' => true,
|
||||||
'hide_description' => true,
|
] );
|
||||||
] );
|
|
||||||
break;
|
break;
|
||||||
case 'agency' :
|
case 'agency' :
|
||||||
$agency_id = $property->get_metabox_value( 'agency' );
|
$agency_id = $property->get_metabox_value( 'agency' );
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
|
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [
|
||||||
[
|
'author' => $data,
|
||||||
'author' => $data,
|
'id' => $agency_id,
|
||||||
'id' => $agency_id,
|
'picture' => '',
|
||||||
'picture' => '',
|
'type' => 'agency',
|
||||||
'type' => 'agency',
|
'hide_description' => true,
|
||||||
'hide_description' => true,
|
] );
|
||||||
] );
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [
|
||||||
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ 'author' => $data, 'hide_description' => true ], $layout );
|
'author' => $data,
|
||||||
|
'hide_description' => true,
|
||||||
|
],
|
||||||
|
$layout
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user