*/ class Ad_Ink_Public { /** * The ID of this plugin. * * @since 1.0.0 * @access private * @var string $plugin_name The ID of this plugin. */ private $plugin_name; /** * The version of this plugin. * * @since 1.0.0 * @access private * @var string $version The current version of this plugin. */ private $version; const ACTIVE_POST_TYPES_OPTION_NAME = 'ad-ink-post-types'; const TAG_ID_OPTION_NAME = 'ad-ink-tag-id'; const POSITION_OPTION_NAME = 'ad-ink-position'; /** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $plugin_name The name of the plugin. * @param string $version The version of this plugin. */ public function __construct($plugin_name, $version) { $this->plugin_name = $plugin_name; $this->version = $version; } public function insert_automatic_tag() { $position = get_option(self::POSITION_OPTION_NAME, "automatic"); if ($position === "automatic") { $tag = get_option(self::TAG_ID_OPTION_NAME, null); if ($tag !== null && in_array(get_post_type(), get_option(self::ACTIVE_POST_TYPES_OPTION_NAME, []))) { ?> '; } } }