Эту папку кинул в wp-plagins.
Должно быть wp-plugins.
Что надо сделать, чтобы вордпресс начал видеть установленные плагины?
Кроме уже сделанного — ничего, должен видеть. Было бы здорово взглянуть на код плагина.
Модератор
Yui
(@fierevere)
永子
Заголовок плагину написали?
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.7.2
Author URI: http://ma.tt/
*/
Должно быть wp-plugins.
я чего-то не знаю?
wp-content\plugins вроде как.
Точно, wp-content/plugins. Спасибо за поправку!
кароч, вот код
/var/www/html/TestServer/wp-conten/plugins/footer-function/footer-function.php:
<?php
/*
Plugin Name: Функция Футера
Description: Добавление текста в футер
Version: 1.0.2
Author: 魔界ハンター
Text Domain: FooterFunction
*/
/* Copyright ГОД ИМЯ_АВТОРА_ПЛАГИНА (email: E-MAIL_АВТОРА)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//Подключение ff-functions.php
require_once plugin_dir_path(__FILE__) . "includes/ff-functions.php";
/var/www/html/TestServer/wp-conten/plugins/footer-function/includes/ff-function.php:
<?php
add_action("wp_footer", "FooterFunction");
function FooterFunction()
{
echo "ここは何かのテキストが書いてある";
}
Модератор
Юрій
(@yube)
Plugin Name: Функция Футера
Попробуйте без русских букв и пробелов.
С русскими буквами и пробелами всё должно быть ОК 🙂
wp-conten/plugins
Не хватает буквы t: wp-content/plugins.
да, да, нужно t. Уж извините, что на клавишу не дожал. Замена кирилицы на латиницу не помогла.
Это может быть связано с версией 7.2 у php?
Модератор
Юрій
(@yube)
Это может быть связано с версией 7.2 у php?
Вряд ли.
Другие плагины, лежащие рядом, движок видит?
Видит. Предустановленные он видеть может
Модератор
Юрій
(@yube)
Видит.
Сравните права на папку и файлики Вашего и тех, что видит.
О. Повторно выдал права 777 (если кому надо будет: sudo chmod 777 -R /var/www) на директорию www и все заработало. Спасибо всем за помощь
sudo chmod 777 -R /var/www
смело
А какие тогда права посоветуешь выдать директории?