"; } public static function render() { // Note that can_render() dumps an HTML comment in the output if it returns "false". if(!self::can_render("AllEarsHtmlMeta::render")) { return; } $curr_post_id = get_the_ID(); if($curr_post_id === false) { return; } // AllEarsUtils::add_comment("AllEarsHtmlMeta::render: starting processing for post ID = " . $curr_post_id); $aec = AllEarsPostMeta::get_aec_url($curr_post_id); $output = ""; if($aec !== "") { $output .= self::renderOne("ae:fullAecUrl", $aec); } $curr_title = get_the_title(); if($curr_title !== "") { $output .= self::renderOne("ae:title", $curr_title); } $output .= self::renderOne("ae:plugin", "allEars for WordPress v." . ALLEARS_GLOBALS["version"]); echo $output; } public static function init() { // https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head add_action("wp_head", array("AllEarsHtmlMeta", "render")); } } AllEarsHtmlMeta::init();