我正在尝试在两个表之间创建关系.这是每个表和外键创建的查询,
CREATE TABLE IF NOT EXISTS `quotes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`quote` text COLLATE utf8_unicode_ci NOT NULL,
`author` int(11) NOT NULL,
`topic` int(11) NOT NULL,
`language` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `author` (`author`),
KEY `topic` (`topic`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `authors` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author` int(11) NOT NULL,
`period` …Run Code Online (Sandbox Code Playgroud) 因此,我需要在ACF(高级自定义字段)"选项"页面下添加我自己的自定义页面,该页面是我使用ACF站点中的正确代码创建的,该页面工作正常.
所以我做的是这样的:
function options_invoiceno(){ ?>
<div class="wrap">
<h1>testing sub page</h1>
</div>
<?php }
function add_theme_menu_item() {
add_submenu_page(
"acf-options-invoice-design",
"sub page",
"sub page",
"manage_options",
"invoice-number",
"options_invoiceno"
);
}
add_action("admin_menu", "add_theme_menu_item");
Run Code Online (Sandbox Code Playgroud)
它给了我"选项"下边栏中的子菜单:
但是当我点击进入菜单项时,我得到一个404 Not Found页面并且URL不正确:例如 http://example.com/wp-admin/acf-options-invoice-design-sub
我错过了什么吗?这甚至可以在现有的ACF菜单下添加子菜单吗?
任何帮助或指示将不胜感激.
我需要从页面中的所有元素中删除特定的class属性.那就是我们需要从当前html页面的所有元素中删除特定的类.我们只有类名作为引用(我们需要从该页面中删除)而不是其他内容.
请注意,我不能使用任何像id或其他类的引用,也不能使用任何JavaScript库也...
对此有任何建议将不胜感激.
另请注意,我们需要删除的类不会超过两次.
我想<li>在JavaScript字符串中找到数字.
例如.如果,
var lis = "`<ul><li><a href='http://sitename/profile/udhayakumar'>udhayakumar</a></li><li><a href='http://sitename/profile/lovely'>lovely</a></li></ul>`";
Run Code Online (Sandbox Code Playgroud)
然后如何找到标签<li>内的s 数<ul>.是否可以在不插入任何DOM元素的情况下获得此功能.