* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ function add_hook($hook, $title, $description, $position = 1) { return (bool) Db::getInstance()->execute(' INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`, `position`) VALUES ("' . pSQL($hook) . '", "' . pSQL($title) . '", "' . pSQL($description) . '", ' . (int) $position . ') ON DUPLICATE KEY UPDATE `title` = VALUES(`title`), `description` = VALUES(`description`) '); }