Plugin Directory

Changeset 1524167


Ignore:
Timestamp:
10/28/2016 05:04:33 PM (9 years ago)
Author:
riselab
Message:

fully translated plugin into english

Location:
wp-custom-comments/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-custom-comments/trunk/readme.txt

    r1522633 r1524167  
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Замена стандартной формы комментариев WordPress на произвольный HTML-код.
     10Replacing the standard WordPress commenting form with custom HTML/JavaScript code.
    1111
    1212== Description ==
    1313
    14 С помощью плагина вы легко сможете заменить стандартную форму комментариев **WordPress** на виджет любой из популярных систем комментирования, таких как [**Disqus**](https://disqus.com/) и [**HyperComments**](https://www.hypercomments.com/), либо на виджет комментариев **ВКонтакте**.
     14With this plugin you can easily replace the standard **WordPress** commenting form with one of the popular commenting system's widget, such as  [**Disqus**](https://disqus.com/) and [**HyperComments**](https://www.hypercomments.com/) or with the **VKontakte** comments widget.
    1515
    16 = Работа с плагином =
    17 * После установки необходимо перейти на страницу настроек плагина в разделе ***Комментарии*** и вставить код виджета комментариев в единственное поле формы, после чего нажать кнопку ***Сохранить изменения***.
    18 * Чтобы получить код виджета, вы должны будете зарегистрироваться в соответствующей системе комментирования (либо создать простое приложение для **ВКонтакте**).
    19 * Вы можете добавить к коду виджета произвольную HTML-разметку.
    20 * Любой произвольный текст и HTML/JavaScript-код будет отображаться вместо стандартной формы комментариев **WordPress**.
    21 * Просто оставьте поле пустым, чтобы скрыть комментарии на всех страницах сайта.
     16= Working with plugin =
     17* After installation you should go to the plugin settings page in the ***Comments*** section and paste the comments widget into a single form field and then click ***Save Changes***.
     18* To get the widget code you will need to register at the appropriate commenting system's website (or create a simple application for **VKontakte**).
     19* You can add to the widget code any custom HTML markup.
     20* Any custom text or HTML/JavaScript code will be displayed instead of the standard **WordPress** comments.
     21* Just leave the field empty to hide the comments on all pages.
    2222
    2323== Installation ==
    2424
    25 Установите плагин через установщик **WordPress** либо скопируйте файлы плагина в папку */wp-content/plugins/* сайта, после чего активируйте его через панель управления.
     25Install the plugin through the **WordPress** installer or copy the plugin's files into your site's */wp-content/plugins/* folder and then activate it via the control panel.
    2626
    2727== Changelog ==
    2828
    2929= 1.0 =
    30 * Первая версия плагина
     30* Initial release
  • wp-custom-comments/trunk/wp-custom-comments.php

    r1523323 r1524167  
    44Plugin URI: http://riselab.ru/
    55Text Domain: wp-custom-comments
    6 Description: Плагин позволяет заменить стандартную форму комментариев WordPress на произвольный HTML/JavaScript-код, например на виджет одной из популярных систем комментирования (Disqus, HyperComments) либо на виджет комментариев ВКонтакте.
     6Description: The plugin allows you to replace the standard WordPress commenting form with custom HTML/JavaScript code, such as one of the popular commenting system's widget (Disqus, HyperComments) or with the VKontakte comments widget.
    77Version: 1.0
    8 Author: Kei
     8Author: Vadim Alekseyenko
    99Author URI: http://riselab.ru/
    1010*/
    1111
    1212/**
    13 * Абстрактный класс плагина
     13* Plugin abstract class
    1414*/
    1515class WPCustomComments
    1616{
    1717
    18     // Функция инициализации
     18    // Init function
    1919    public static function Init()
    2020    {
    21         // Загрузка домена плагина
     21        // Loading plugin's text domain
    2222        add_action('plugins_loaded', Array(get_called_class(), 'LoadTextDomain'));
    2323
    24         // Добавление страницы настроек в меню панели администрирования
     24        // Adding settings page to the administration panel menu
    2525        if (defined('ABSPATH') && is_admin()){
    2626            add_action('admin_menu', Array(get_called_class(), 'SettingsMenu'));
    2727        }
    2828
    29         // Замена стандартного шаблона комментариев
     29        // Replacing default commenting form
    3030        add_filter('comments_template', Array(get_called_class(), 'GetCommentsTemplate'));
    3131    }
    3232
    33     // Функция получения страницы настроек
     33    // Get settings page content function
    3434    public static function SettingsPage()
    3535    {
    36         // Изменение шаблона комментариев при сохранении
     36        // Changing commenting form template on save
    3737        if (isset($_POST['submit'])){
    3838            file_put_contents(self::GetCommentsTemplate(), stripslashes($_POST['commentsTemplate']));
    3939        }
    40         // Вывод формы настроек
     40        // Show settings form
    4141        echo '
    4242            <div class="wrap">
    4343                <h1>' . get_admin_page_title() . '</h1>
    44                     <p>Код для замены стандартной формы комментирования:</p>
     44                    <p>' . __('Enter HTML/JavaScript code to replace the standard WordPress commenting form:', 'wp-custom-comments') . '</p>
    4545                    <form action="" method="post">
    4646                        <textarea name="commentsTemplate" style="height: 340px; width: 100%;">' . file_get_contents(self::GetCommentsTemplate()) . '</textarea>
     
    5353    }
    5454
    55     // Функция добавления страницы настроек в меню панели администрирования
     55    // Add settings page to the administration panel menu function
    5656    public static function SettingsMenu()
    5757    {
    58         // Проверка прав пользователя
     58        // Checking permissions
    5959        if (!current_user_can('manage_options')){
    6060            return;
     
    6363    }
    6464
    65     // Функция получения имени файла шаблона комментариев
     65    // Get comments template file path function
    6666    public static function GetCommentsTemplate()
    6767    {
     
    6969    }
    7070
    71     // Функция загрузки домена плагина
     71    // Load plugin's text domain function
    7272    public static function LoadTextDomain()
    7373    {
     
    7777}
    7878
    79 // Инициализация
     79// Plugin initialization
    8080WPCustomComments::Init();
Note: See TracChangeset for help on using the changeset viewer.