name; } else if ($permalink['type'] == "CAT") { $permalink['link'] = get_category_link($permalink['id']); $cat = get_term($permalink['id'], 'category'); $permalink['title'] = $cat->name; } else { ABJ_404_Solution_Functions::debugMessage("Unrecognized permalink type: " . wp_kses_post(json_encode($permalink))); } return $permalink; } /** @return boolean true if debug mode is on. false otherwise. */ static function isDebug() { global $abj404logic; $options = $abj404logic->getOptions(1); return (@$options['debug_mode'] == true); } /** Send a message to the error_log if debug mode is on. * This goes to a file and is used by every other class so it goes here. * @param type $message */ static function debugMessage($message) { if (ABJ_404_Solution_Functions::isDebug()) { error_log("ABJ-404-SOLUTION (DEBUG): " . $message); } } /** Always send a message to the error_log. * This goes to a file and is used by every other class so it goes here. * @param type $message */ static function errorMessage($message) { error_log("ABJ-404-SOLUTION (ERROR): " . $message); } }