fixing php warning
This commit is contained in:
parent
849fcdade8
commit
d49997d4d9
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
function homegrade_brochure_post_title_updater($post_id)
|
||||
{
|
||||
if (!$post_id) return;
|
||||
|
||||
$my_post = array();
|
||||
$my_post['ID'] = $post_id;
|
||||
|
|
@ -9,10 +10,8 @@ function homegrade_brochure_post_title_updater($post_id)
|
|||
$fields = get_fields($post_id);
|
||||
if (!$fields) return;
|
||||
|
||||
$brochureTaxonomy = $fields['publications_taxonomy'];
|
||||
|
||||
if (!$post_id) return;
|
||||
|
||||
$brochureTaxonomy = $fields['publications_taxonomy'] ?? null;
|
||||
if (!$brochureTaxonomy) return;
|
||||
|
||||
if (get_post_type() == 'brochures') {
|
||||
$my_post['post_title'] = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user