所以,因为我很少犯错误,所以在将本地文件合并到我的开发环境中时,我遇到了冲突。
我在一个Wordpress网站上做维护工作。我首先在本地环境中测试更新,然后将其推送到开发环境中,但我在开发环境中意外地更新了一些插件,而没有注意到这一点。当我注意到我切换到本地文件并在那里进行更新时,当我想要将本地文件合并到dev环境中时,我在我的终端中得到了这个错误。
> * branch develop -> FETCH_HEAD
Updating f08f8fb..c72a8b7
error: The following untracked working tree
我一直在尝试实现对.js文件中的几个字符串的转换,但是没有什么效果。
首先,尝试像我在php中所做的那样,在.js文件中添加这个变量var __ = wp.i18n.__;,并将字符串设置为__( 'Hello World', 'text-domain'),,但它没有工作。
在寻找有关它的信息之后,我找到了一个帖子,他们在那里谈论用wp_localize_script传递翻译过的字符串之类的东西。
// Localize the script with new data
$translation_array = array(
'some_stri
因此,我安装了wp管理包,但我似乎无法让她工作,一个错误弹出告诉我xdg-打开的doenst存在。对于安装,我使用了:
wp package install git@github.com:wp-cli/admin-command.git
Installing package wp-cli/admin-command (dev-master)
Updating ~.wp-cli\packages\composer.json to require the package...
Registering git@github.com:wp-cli/admin-command.git as a VCS
我正在尝试在wordpress中创建一个个性化的主题,我有一个将我的脚本排入队列的功能,但当我结束时,我会在控制台中添加我的脚本并加载我的网站。 QMIGRATE: Migrate is installed, version 3.3.2
mouse.min.js?ver=5.6:11 Uncaught TypeError: o.widget is not a function
at mouse.min.js?ver=5.6:11
at mouse.min.js?ver=5.6:11
at mouse.min.js?ver=5.6:11
(anonymous) @ mo
我在远程git存储库中有一个项目,当我推送代码时,它在远程存储库中显示如下:
<<<<<<< HEAD
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to lo
当我编辑一个页面时,我会随机得到这个错误,例如在/wp-admin/post.php?post=5323&action=edit
我不认为我需要包含任何代码,因为这似乎没有引用任何插件。所有的问题都在/wp-includes/js中
TypeError: Cannot read property 'MediaFrame' of undefined
at Object.wp.media (/wp-includes/js/media-models.min.js?ver=5.4.1:2:1052)
at new t (/wp-includes/js/dist/
我知道我可以在wordpress的页脚中添加一个脚本文件,它需要使用以下代码的jquery:
<?php
function my_scripts_method() {
// register your script location, dependencies and version
wp_register_script('custom_script',
get_template_directory_uri() . '/js/custom_script.js',
array('jquery'),