Version Description
Download this release
Release Info
Developer | kovshenin |
Plugin | Яндекс Метрика |
Version | 0.8 |
Comparing to | |
See all releases |
Version 0.8
- languages/metrika-ru_RU.mo +0 -0
- languages/metrika-ru_RU.po +49 -0
- languages/metrika.pot +45 -0
- readme.txt +24 -0
- yandex-metrika.php +75 -0
languages/metrika-ru_RU.mo
ADDED
Binary file
|
languages/metrika-ru_RU.po
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Yandex.Metrika\n"
|
4 |
+
"POT-Creation-Date: 2013-06-05 10:53+0400\n"
|
5 |
+
"PO-Revision-Date: 2013-06-05 11:02+0400\n"
|
6 |
+
"Last-Translator: Konstantin Kovshenin <kovshenin@gmail.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: Russian\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.4\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SearchPath-0: .\n"
|
16 |
+
"X-Poedit-SearchPath-1: ..\n"
|
17 |
+
|
18 |
+
#: ../yandex-metrika.php:31
|
19 |
+
msgid "Counter code"
|
20 |
+
msgstr "Код счётчика"
|
21 |
+
|
22 |
+
#: ../yandex-metrika.php:46
|
23 |
+
msgid ""
|
24 |
+
"If you do not have a counter code, you can <a href=\"http://metrika.yandex."
|
25 |
+
"ru/\">request one</a>."
|
26 |
+
msgstr ""
|
27 |
+
"Если у вас нет кода счётчика, вы можете его <a href=\"http://metrika.yandex."
|
28 |
+
"ru/\">получить</a>."
|
29 |
+
|
30 |
+
#: ../yandex-metrika.php:51 ../yandex-metrika.php:58
|
31 |
+
msgid "Yandex Metrika"
|
32 |
+
msgstr "Яндекс Метрика"
|
33 |
+
|
34 |
+
#: ../yandex-metrika.php:59
|
35 |
+
msgid ""
|
36 |
+
"Please enter your Yandex Metrika counter code in the field below and click "
|
37 |
+
"Save Changes."
|
38 |
+
msgstr ""
|
39 |
+
"Введите код вашего счётчика Яндекс.Метрика и щёлкните по кнопке Сохранить "
|
40 |
+
"изменения."
|
41 |
+
|
42 |
+
msgid "Yandex.Metrika"
|
43 |
+
msgstr "Яндекс.Метрика"
|
44 |
+
|
45 |
+
msgid "Enable Yandex.Metrika website analytics on your WordPress site."
|
46 |
+
msgstr "Яндекс.Метрика для вашего сайта WordPress."
|
47 |
+
|
48 |
+
msgid "Konstantin Kovshenin"
|
49 |
+
msgstr "Константин Ковшенин"
|
languages/metrika.pot
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Yandex.Metrika\n"
|
4 |
+
"POT-Creation-Date: 2013-06-05 10:53+0400\n"
|
5 |
+
"PO-Revision-Date: 2013-06-05 10:54+0400\n"
|
6 |
+
"Last-Translator: Konstantin Kovshenin <kovshenin@gmail.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.4\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SearchPath-0: .\n"
|
15 |
+
"X-Poedit-SearchPath-1: ..\n"
|
16 |
+
|
17 |
+
#: ../yandex-metrika.php:31
|
18 |
+
msgid "Counter code"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: ../yandex-metrika.php:46
|
22 |
+
msgid ""
|
23 |
+
"If you do not have a counter code, you can <a href=\"http://metrika.yandex."
|
24 |
+
"ru/\">request one</a>."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../yandex-metrika.php:51 ../yandex-metrika.php:58
|
28 |
+
msgid "Yandex Metrika"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: ../yandex-metrika.php:59
|
32 |
+
msgid ""
|
33 |
+
"Please enter your Yandex Metrika counter code in the field below and click "
|
34 |
+
"Save Changes."
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
# Plugin Headers
|
38 |
+
msgid "Yandex.Metrika"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
msgid "Enable Yandex.Metrika website analytics on your WordPress site."
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
msgid "Konstantin Kovshenin"
|
45 |
+
msgstr ""
|
readme.txt
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Яндекс Метрика ===
|
2 |
+
Contributors: kovshenin
|
3 |
+
Tags: analytics, stats, yandex, metrika, metrica
|
4 |
+
Requires at least: 3.0
|
5 |
+
Tested up to: 3.6
|
6 |
+
Stable tag: 0.8
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Яндекс Метрика для вашего сайта на WordPress.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Данный плагин позволит вам легко вставить код счётчика Яндекс Метрика на ваш сайт. При этом вам не нужно редактировать файлы вашей темы, и счётчик продолжит работать даже при смене вашей активной темы.
|
15 |
+
|
16 |
+
== Installation ==
|
17 |
+
|
18 |
+
1. Распакуйте архив с плагином
|
19 |
+
2. Загрузите папку с плагином в директорию `/wp-content/plugins/` на вашем сервере
|
20 |
+
3. Активируйте плагин Яндекс Метрика в разделе Плагины в панели администрирования WordPress
|
21 |
+
|
22 |
+
== Screenshots ==
|
23 |
+
|
24 |
+
1. Настройки плагина Яндекс Метрика
|
yandex-metrika.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Yandex.Metrika
|
4 |
+
* Description: Enable Yandex.Metrika website analytics on your WordPress site.
|
5 |
+
* Author: Konstantin Kovshenin
|
6 |
+
* Version: 0.8
|
7 |
+
* License: GPLv2
|
8 |
+
* Text Domain: metrika
|
9 |
+
* Domain Path: /languages
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Yandex_Metrika_Plugin {
|
13 |
+
function __construct() {
|
14 |
+
add_action( 'init', array( $this, 'init' ) );
|
15 |
+
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
16 |
+
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
17 |
+
add_action( 'wp_footer', array( $this, 'wp_footer' ) );
|
18 |
+
}
|
19 |
+
|
20 |
+
function init() {
|
21 |
+
$this->options = array_merge( array(
|
22 |
+
'counter-code' => '',
|
23 |
+
), (array) get_option( 'yandex-metrika', array() ) );
|
24 |
+
|
25 |
+
load_plugin_textdomain( 'metrika', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
26 |
+
}
|
27 |
+
|
28 |
+
function admin_init() {
|
29 |
+
register_setting( 'yandex-metrika', 'yandex-metrika', array( $this, 'sanitize' ) );
|
30 |
+
add_settings_section( 'general', '', '', 'yandex-metrika' );
|
31 |
+
add_settings_field( 'counter-code', __( 'Counter code', 'metrika' ), array( $this, 'field_counter_code' ), 'yandex-metrika', 'general' );
|
32 |
+
}
|
33 |
+
|
34 |
+
function sanitize( $input ) {
|
35 |
+
$output = array();
|
36 |
+
|
37 |
+
if ( isset( $input['counter-code'] ) )
|
38 |
+
$output['counter-code'] = ( current_user_can( 'unfiltered_html' ) ) ? $input['counter-code'] : wp_kses_post( $input['counter-code'] );
|
39 |
+
|
40 |
+
return $output;
|
41 |
+
}
|
42 |
+
|
43 |
+
function field_counter_code() {
|
44 |
+
?>
|
45 |
+
<textarea name="yandex-metrika[counter-code]" class="code large-text" rows="10"><?php echo esc_textarea( $this->options['counter-code'] ); ?></textarea>
|
46 |
+
<p class="description"><?php _e( 'If you do not have a counter code, you can <a href="http://metrika.yandex.ru/">request one</a>.', 'metrika' ); ?>
|
47 |
+
<?php
|
48 |
+
}
|
49 |
+
|
50 |
+
function admin_menu() {
|
51 |
+
add_options_page( __( 'Yandex Metrika', 'metrika' ), __( 'Yandex Metrika', 'metrika' ), 'manage_options', 'yandex-metrika', array( $this, 'render_options' ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
function render_options() {
|
55 |
+
?>
|
56 |
+
<div class="wrap">
|
57 |
+
<?php screen_icon(); ?>
|
58 |
+
<h2><?php _e( 'Yandex Metrika', 'metrika' ); ?></h2>
|
59 |
+
<p><?php _e( 'Please enter your Yandex Metrika counter code in the field below and click Save Changes.', 'metrika' ); ?>
|
60 |
+
<form action="options.php" method="POST">
|
61 |
+
<?php settings_fields( 'yandex-metrika' ); ?>
|
62 |
+
<?php do_settings_sections( 'yandex-metrika' ); ?>
|
63 |
+
<?php submit_button(); ?>
|
64 |
+
</form>
|
65 |
+
</div>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
|
69 |
+
function wp_footer() {
|
70 |
+
if ( ! empty( $this->options['counter-code'] ) )
|
71 |
+
echo $this->options['counter-code'];
|
72 |
+
}
|
73 |
+
}
|
74 |
+
$GLOBALS['yandex_metrika_plugin'] = new Yandex_Metrika_Plugin;
|
75 |
+
return;
|