Updatedfetching the domain ID; order of email accounts in page-edit-campaign.php
This commit is contained in:
parent
6815886683
commit
d5a9e5fe46
1 changed files with 11 additions and 1 deletions
|
|
@ -25,7 +25,13 @@ if (isset($_GET['edit'])) {
|
||||||
|
|
||||||
if (isset($_GET['Email_ID'])) {
|
if (isset($_GET['Email_ID'])) {
|
||||||
$email_id = intval($_GET['Email_ID']);
|
$email_id = intval($_GET['Email_ID']);
|
||||||
$domain_id = get_field('domain', $email_id);
|
$domain = get_field('domain', $email_id);
|
||||||
|
if (is_object($domain)) {
|
||||||
|
$domain_id = $domain->ID;
|
||||||
|
} else {
|
||||||
|
$domain_id = $domain;
|
||||||
|
}
|
||||||
|
|
||||||
$email_accounts[] = $email_id;
|
$email_accounts[] = $email_id;
|
||||||
$campaign_name = get_the_title($email_id);
|
$campaign_name = get_the_title($email_id);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -96,6 +102,8 @@ $domains = get_posts([
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
log_to_file("page-edit-campaign.php - Domains: ", $domains);
|
||||||
|
|
||||||
// Get the list of default professions
|
// Get the list of default professions
|
||||||
$professions = rl_get_textarea_meta_as_array('option', 'default_profession_pool');
|
$professions = rl_get_textarea_meta_as_array('option', 'default_profession_pool');
|
||||||
|
|
||||||
|
|
@ -182,6 +190,8 @@ get_header(); ?>
|
||||||
$user_email_accounts = get_posts([
|
$user_email_accounts = get_posts([
|
||||||
'post_type' => 'email-account',
|
'post_type' => 'email-account',
|
||||||
'posts_per_page' => -1,
|
'posts_per_page' => -1,
|
||||||
|
'orderby' => 'title',
|
||||||
|
'order' => 'ASC',
|
||||||
'meta_query' => [
|
'meta_query' => [
|
||||||
[
|
[
|
||||||
'key' => 'owner_id',
|
'key' => 'owner_id',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue