',
''
);
}
return $message;
},
10,
2
);
add_filter(
'adminoptim_notification_banner_content_' . self::SECTION_ID,
static function (): array {
$content = [
[
'message' => sprintf(
/* translators: 1: Opening strong tag, 2: Closing strong tag. */
__( '%1$sFlexible post types, taxonomies and custom fields without adding another heavyweight plugin.%2$s Leave a ★★★★★ review on WordPress.org and help others build structured WordPress content more easily.', 'admin-optimizer' ),
'',
''
),
'cta_type' => 'review',
],
[
'message' => sprintf(
/* translators: 1: Opening strong tag, 2: Closing strong tag. */
__( '%1$sHaving issues with Admin Optimizer post types or fields?%2$s', 'admin-optimizer' ),
'',
''
),
'cta_type' => 'support',
],
];
return $content[ wp_rand( 0, 1 ) ];
},
);
}
/**
* Ordinary module IDs this Section owns, mapped to their navigation labels.
*
* @return array
*/
protected function section_nav_modules(): array {
return [
'custom_post_status' => 'Custom Post Status',
'custom_post_types' => 'Custom Post Types',
'custom_taxonomies' => 'Custom Taxonomies',
'custom_fields_builder' => 'Custom Fields Builder',
];
}
}