通过myphpadmin修改Metabox自定义字段,导致WordPress显示空白

发布于 2025-01-18 01:07:43 字数 1657 浏览 4 评论 0原文

所以基本上在我的 WordPress 网站上,我链接图像并且最近更改了图像域名,所以我进入 phpmyadmin 并输入:

UPDATE `wp_postmeta` SET `meta_value` = Replace(meta_value, 'old-domain.com' , 'new-domain.com')

和我的 mysql/phpmyadmin,它全部更新到新域,但在 WordPress 上,自定义字段尚未获取新详细信息,并且是留空。

这是我的自定义字段数组:

        'title'  => 'Embed Image',
        'pages' => array( 'post' ),
        'tabs'      => array(
            'input-version' => array(
                'label' => 'Input Version',
                'icon'  => 'dashicons-admin-customizer',
        ),
        'tab_style' => 'default',
        'fields' => array(
            array(
                'id'     => 'ab_embedgroup',
                'type'   => 'group',
                'clone'  => true,
                'sort_clone'  => true,
                'save_state' => true,
                'desc' => '<b style="color:red;">Insert embed code</b>',
                'tab'  => 'input-version',
                'fields' => array(
                    array(
                        'name'  => 'Host Name',
                        'id'    => 'ab_hostname',
                        'type'  => 'text',
                    ),
                    array(
                        'name'   => 'IMEmbed',
                        'id'     => 'ab_embed',
                        'type'   => 'textarea',
                        'sanitize_callback' => 'none',```

cleared cache, restarted VPS, tried it all, just cant understand why it wont pick it up.
am i editing it incorrectly? Cant do it one by one because its a few thousand images.

so basically on my wordpress site, i link images and i recently changed my image domain name, so i went into phpmyadmin and typed:

UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, 'old-domain.com', 'new-domain.com')

and my mysql/phpmyadmin, its all updated to the new domain, but on wordpress, the custom field hasnt picked up the new details and is left blank.

this is my array for the custom field:

        'title'  => 'Embed Image',
        'pages' => array( 'post' ),
        'tabs'      => array(
            'input-version' => array(
                'label' => 'Input Version',
                'icon'  => 'dashicons-admin-customizer',
        ),
        'tab_style' => 'default',
        'fields' => array(
            array(
                'id'     => 'ab_embedgroup',
                'type'   => 'group',
                'clone'  => true,
                'sort_clone'  => true,
                'save_state' => true,
                'desc' => '<b style="color:red;">Insert embed code</b>',
                'tab'  => 'input-version',
                'fields' => array(
                    array(
                        'name'  => 'Host Name',
                        'id'    => 'ab_hostname',
                        'type'  => 'text',
                    ),
                    array(
                        'name'   => 'IMEmbed',
                        'id'     => 'ab_embed',
                        'type'   => 'textarea',
                        'sanitize_callback' => 'none',```

cleared cache, restarted VPS, tried it all, just cant understand why it wont pick it up.
am i editing it incorrectly? Cant do it one by one because its a few thousand images.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文