WordPress ripro主题专用友情链接添加 自助申请页面添加教程(5)
2022-04-17 来源:118图库
20 ){wp_die(‘连接名称必须填写,且长度不得超过30字’);}if ( empty($link_url) || strlen($link_url) > 60 || !preg_match(“/^(//)?(((.)?[a-zA-Z0-9_-] (.[a-zA-Z0-9_-] )?.([a-zA-Z] ))|(([0-1]?[0-9]?[0-9]|2[0-5][0-5]).([0-1]?[0-9]?[0-9]|2[0-5][0-5]).([0-1]?[0-9]?[0-9]|2[0-5][0-5]).([0-1]?[0-9]?[0-9]|2[0-5][0-5]))(:d{0,4})?)(/[w- ./?%&=]*)?$/i”
, $link_url)) { //验证urlwp_die(‘链接地址必须填写’);}$sql_link = $wpdb->insert($wpdb->links,array(‘link_name’ => ‘【待审核】— ‘.$link_name,’link_url’ => $link_url,’link_target’ => $link_target,’link_description’ => $link_description,’link_visible’ => $link_visible));
, $link_url)) { //验证urlwp_die(‘链接地址必须填写’);}$sql_link = $wpdb->insert($wpdb->links,array(‘link_name’ => ‘【待审核】— ‘.$link_name,’link_url’ => $link_url,’link_target’ => $link_target,’link_description’ => $link_description,’link_visible’ => $link_visible));