Version Description
22.03.2010 - 1st release.
=
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- css/index.php +3 -0
- css/ure-admin.css +73 -0
- images/changelog-icon.png +0 -0
- images/donate-icon.png +0 -0
- images/faq-icon.png +0 -0
- images/index.php +4 -0
- images/user-role-editor-icon.png +0 -0
- images/vladimir.png +0 -0
- index.php +3 -0
- lang/index.php +3 -0
- lang/ure-ru_RU.mo +0 -0
- lang/ure-ru_RU.po +471 -0
- lang/ure.mo +0 -0
- lang/ure.pot +120 -0
- readme.txt +52 -0
- screenshot-1.png +0 -0
- ure-lib.php +77 -0
- ure-options.php +251 -0
- user-role-editor.php +140 -0
css/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
?>
|
css/ure-admin.css
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : sig-guard_admin
|
3 |
+
Created on : 10.03.2010
|
4 |
+
Author : Vladimir Garagulya
|
5 |
+
Description:
|
6 |
+
Silence is Golden Guard WordPress plugin Admin Settings Page CSS
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*
|
10 |
+
Syntax recommendation http://www.w3.org/TR/REC-CSS2/
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
.txt_left {
|
15 |
+
text-align: left;
|
16 |
+
}
|
17 |
+
.txt_center {
|
18 |
+
text-align: center;
|
19 |
+
}
|
20 |
+
.txt_right {
|
21 |
+
text-align: right;
|
22 |
+
}
|
23 |
+
|
24 |
+
.form_color_row {
|
25 |
+
float: left;
|
26 |
+
display: block;
|
27 |
+
margin-bottom: 5px;
|
28 |
+
width: 100%;
|
29 |
+
clear: both;
|
30 |
+
}
|
31 |
+
|
32 |
+
img.input_radio {
|
33 |
+
vertical-align: middle;
|
34 |
+
}
|
35 |
+
|
36 |
+
a.ure_rsb_link {
|
37 |
+
padding:4px;
|
38 |
+
display:block;
|
39 |
+
padding-left:25px;
|
40 |
+
background-repeat:no-repeat;
|
41 |
+
background-position:5px 50%;
|
42 |
+
text-decoration:none;
|
43 |
+
border:none;
|
44 |
+
}
|
45 |
+
|
46 |
+
a.ure_rsb_link:hover {
|
47 |
+
border-bottom-width:1px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.ure-submit {
|
51 |
+
width: 130px;
|
52 |
+
}
|
53 |
+
|
54 |
+
input.warning:hover, a.warning:hover {
|
55 |
+
color: red;
|
56 |
+
}
|
57 |
+
|
58 |
+
.fli {
|
59 |
+
float: left;
|
60 |
+
display: inline;
|
61 |
+
}
|
62 |
+
|
63 |
+
#foldersdiv {
|
64 |
+
border-style:solid;
|
65 |
+
border-width:1px;
|
66 |
+
height:300px;
|
67 |
+
width: 450px;
|
68 |
+
overflow:auto;
|
69 |
+
padding:0.5em 0.9em;
|
70 |
+
margin-top: 5px;
|
71 |
+
margin-bottom: 0px;
|
72 |
+
white-space: nowrap;
|
73 |
+
}
|
images/changelog-icon.png
ADDED
Binary file
|
images/donate-icon.png
ADDED
Binary file
|
images/faq-icon.png
ADDED
Binary file
|
images/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php
|
3 |
+
// Silence is golden.
|
4 |
+
?>
|
images/user-role-editor-icon.png
ADDED
Binary file
|
images/vladimir.png
ADDED
Binary file
|
index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
?>
|
lang/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
?>
|
lang/ure-ru_RU.mo
ADDED
Binary file
|
lang/ure-ru_RU.po
ADDED
@@ -0,0 +1,471 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Thank You Counter Button 1.0.02\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-03-20 17:42+0600\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: vladimir <vladimir@shinephp.com>\n"
|
8 |
+
"Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Russian\n"
|
13 |
+
"X-Poedit-Country: RUSSIAN FEDERATION\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
|
16 |
+
#: ../ure-options.php:114
|
17 |
+
msgid "Backup record is created for the current role capabilities"
|
18 |
+
msgstr "Для текущего распределения возможностей по ролям создана резервная копия"
|
19 |
+
|
20 |
+
#: ../ure-options.php:131
|
21 |
+
msgid "Role "
|
22 |
+
msgstr "Роль"
|
23 |
+
|
24 |
+
#: ../ure-options.php:131
|
25 |
+
msgid " is updated successfully"
|
26 |
+
msgstr "изменена успешно"
|
27 |
+
|
28 |
+
#: ../ure-options.php:165
|
29 |
+
msgid "About this Plugin:"
|
30 |
+
msgstr "Об этом плагине"
|
31 |
+
|
32 |
+
#: ../ure-options.php:166
|
33 |
+
msgid "Author's website"
|
34 |
+
msgstr "Вебсайт автора"
|
35 |
+
|
36 |
+
#: ../ure-options.php:167
|
37 |
+
msgid "Plugin webpage"
|
38 |
+
msgstr "Страница плагина"
|
39 |
+
|
40 |
+
#: ../ure-options.php:168
|
41 |
+
#: ../user-role-editor.php:103
|
42 |
+
msgid "Changelog"
|
43 |
+
msgstr "Журнал изменений"
|
44 |
+
|
45 |
+
#: ../ure-options.php:169
|
46 |
+
msgid "FAQ"
|
47 |
+
msgstr "Часто задаваемые вопросы"
|
48 |
+
|
49 |
+
#: ../ure-options.php:170
|
50 |
+
msgid "Donate"
|
51 |
+
msgstr "Поддержать"
|
52 |
+
|
53 |
+
#: ../ure-options.php:172
|
54 |
+
msgid "Greetings:"
|
55 |
+
msgstr "Приветствия"
|
56 |
+
|
57 |
+
#: ../ure-options.php:173
|
58 |
+
msgid "It's me, the author"
|
59 |
+
msgstr "Это я, автор"
|
60 |
+
|
61 |
+
#: ../ure-options.php:174
|
62 |
+
msgid "Do you wish to see your name with link to your site here? You are welcome! Your help with translation and new ideas are very appreciated."
|
63 |
+
msgstr "Желаете увидеть свое имя и ссылку на Ваш сайт здесь? Добро пожаловать! Ваша помощь с переводом и новые идеи приветствуются."
|
64 |
+
|
65 |
+
#: ../ure-options.php:185
|
66 |
+
msgid ": Please confirm to continue"
|
67 |
+
msgstr ": Пожалуйста, подтвердите продолжение "
|
68 |
+
|
69 |
+
#: ../ure-options.php:201
|
70 |
+
#, php-format
|
71 |
+
msgid "Role \"%s\" update: please confirm to continue"
|
72 |
+
msgstr "Изменение роли \"%s\": пожалуйста, подтвердите продолжение "
|
73 |
+
|
74 |
+
#: ../ure-options.php:209
|
75 |
+
msgid "Select Role and change its capabilities list"
|
76 |
+
msgstr "Выбери Роль и измени список разрешённых операций"
|
77 |
+
|
78 |
+
#: ../ure-options.php:243
|
79 |
+
msgid "Update"
|
80 |
+
msgstr "Сохранить"
|
81 |
+
|
82 |
+
#: ../ure-options.php:243
|
83 |
+
msgid "Save Changes"
|
84 |
+
msgstr "Сохранить изменения"
|
85 |
+
|
86 |
+
#: ../ure-options.php:244
|
87 |
+
msgid "Cancel"
|
88 |
+
msgstr "Отмена"
|
89 |
+
|
90 |
+
#: ../ure-options.php:244
|
91 |
+
msgid "Cancel not saved changes"
|
92 |
+
msgstr "Отказ от сохранения изменений"
|
93 |
+
|
94 |
+
#: ../ure-options.php:245
|
95 |
+
msgid "Reset"
|
96 |
+
msgstr "Сброс"
|
97 |
+
|
98 |
+
#: ../ure-options.php:245
|
99 |
+
msgid "Return to default WordPress user role capabilities"
|
100 |
+
msgstr "Вернуться к исходному состоянию ролей WordPress"
|
101 |
+
|
102 |
+
#: ../user-role-editor.php:38
|
103 |
+
msgid "User Role Editor requires WordPress 2.8 or newer."
|
104 |
+
msgstr "Редактор ролей пользователей требует WordPress 2.8 или выше."
|
105 |
+
|
106 |
+
#: ../user-role-editor.php:38
|
107 |
+
msgid "Please update!"
|
108 |
+
msgstr "Пожалуйста, обновите!"
|
109 |
+
|
110 |
+
#: ../user-role-editor.php:63
|
111 |
+
msgid "User Role Editor"
|
112 |
+
msgstr "Редактор ролей пользователей"
|
113 |
+
|
114 |
+
#: ../user-role-editor.php:93
|
115 |
+
msgid "Settings"
|
116 |
+
msgstr "Установки"
|
117 |
+
|
118 |
+
#~ msgid "action"
|
119 |
+
#~ msgstr "операции"
|
120 |
+
#~ msgid "Please confirm to continue role \""
|
121 |
+
#~ msgstr "Пожалуйста подтвердите продолжение для роли"
|
122 |
+
#~ msgid "Edit"
|
123 |
+
#~ msgstr "Изменить"
|
124 |
+
#~ msgid "Silence Is Golden Guard Plugin"
|
125 |
+
#~ msgstr "Silence Is Golden Guard плагин"
|
126 |
+
#~ msgid "file open error"
|
127 |
+
#~ msgstr "ошибка открытия файла"
|
128 |
+
#~ msgid "file read error"
|
129 |
+
#~ msgstr "ошибка чтения файла"
|
130 |
+
#~ msgid "file close error"
|
131 |
+
#~ msgstr "ошибка при закрытии файла"
|
132 |
+
#~ msgid "file backup copy error"
|
133 |
+
#~ msgstr "ошибка при создании резервной копии файла"
|
134 |
+
#~ msgid "file permissions change error"
|
135 |
+
#~ msgstr "ошибка при изменении прав на файл"
|
136 |
+
#~ msgid "file write error"
|
137 |
+
#~ msgstr "ошибка записи в файл"
|
138 |
+
#~ msgid "is modified"
|
139 |
+
#~ msgstr "изменен"
|
140 |
+
#~ msgid "file create error"
|
141 |
+
#~ msgstr "ошибка создания файла"
|
142 |
+
#~ msgid "permissions change error"
|
143 |
+
#~ msgstr "ошибка при изменении прав"
|
144 |
+
#~ msgid "file is created"
|
145 |
+
#~ msgstr "файл создан"
|
146 |
+
#~ msgid "\"Silence is Golden\" Scan is finished: "
|
147 |
+
#~ msgstr "\"Silence is Golden\" сканирование завершено: "
|
148 |
+
#~ msgid "Does not create index.php file in the checked folders"
|
149 |
+
#~ msgstr "Не создавать index.php файл в отмеченных каталогах"
|
150 |
+
#~ msgid "Exclude Folders for index.php"
|
151 |
+
#~ msgstr "Исключить Каталоги для index.php"
|
152 |
+
#~ msgid "Modify Apache .htaccess"
|
153 |
+
#~ msgstr "Изменить Apache .htaccess"
|
154 |
+
#~ msgid ""
|
155 |
+
#~ "Modify Apache .htaccess file in the site root folder. Add \"Options -"
|
156 |
+
#~ "Indexes\" line to prevent directory listing by Apache Web server.\n"
|
157 |
+
#~ " If it is turned on (+Indexes) or absent, then if a "
|
158 |
+
#~ "URL which maps to a directory is requested, and there is no "
|
159 |
+
#~ "DirectoryIndex (e.g., index.html or index.php) file in that directory, "
|
160 |
+
#~ "then Web server will return a formatted listing of the directory."
|
161 |
+
#~ msgstr ""
|
162 |
+
#~ "Изменить файл Apache .htaccess в корневом каталоге сайта. Добавить строку "
|
163 |
+
#~ "\"Options -Indexes\", чтобы исключить листинг содержимого катлогов Web "
|
164 |
+
#~ "сервером Apache.\n"
|
165 |
+
#~ "Если опция включена (+Indexes) или отсутствует, тогда, если "
|
166 |
+
#~ "запроашивается адрес URL, соответствующий каталогу, и в этом каталоге "
|
167 |
+
#~ "отстутсвует файл типа DirectoryIndex (т.е. index.html или index.php), "
|
168 |
+
#~ "тогда Web сервер вернёт отформатированный листин этого каталога."
|
169 |
+
#~ msgid "Check folders state automatically with specified period"
|
170 |
+
#~ msgstr "Проверять состояние каталогов автоматически с заданным периодом"
|
171 |
+
#~ msgid "Auto Monitor"
|
172 |
+
#~ msgstr "Авто Мониторинг"
|
173 |
+
#~ msgid "Scan Now"
|
174 |
+
#~ msgstr "Сканировать Сейчас"
|
175 |
+
#~ msgid "Scan and Fix directories listing related problems Now"
|
176 |
+
#~ msgstr ""
|
177 |
+
#~ "Сканировать и Исправлять проблемы, связанные с листингом содержимого "
|
178 |
+
#~ "каталогов"
|
179 |
+
#~ msgid ""
|
180 |
+
#~ "Every time a new visitor clicks the \"Thank you\" button, one point is "
|
181 |
+
#~ "added to the total \"thanks\" counter for this post."
|
182 |
+
#~ msgstr ""
|
183 |
+
#~ "Каждый раз, когда новый посетитель щелкает по кнопке \"Спасибо\", единица "
|
184 |
+
#~ "добавляется к счетчику благодарностей для данной статьи."
|
185 |
+
#~ msgid "Thank You Counter Button Plugin"
|
186 |
+
#~ msgstr "Установки для плагина: Кнопка подсчета благодарностей"
|
187 |
+
#~ msgid "Statistics"
|
188 |
+
#~ msgstr "Статистика"
|
189 |
+
#~ msgid "You left “Thanks” already for this post"
|
190 |
+
#~ msgstr "Вы уже оставили благодарность за эту статью"
|
191 |
+
#~ msgid "Click to left “Thanks” for this post"
|
192 |
+
#~ msgstr "Щелкните мышью, чтобы оставить благодарность за эту статью"
|
193 |
+
#~ msgid "View statistics details for \"%s\""
|
194 |
+
#~ msgstr "Просмотр детализированной статистики для \"%s\""
|
195 |
+
#~ msgid "Hide these shortcuts"
|
196 |
+
#~ msgstr "Скрыть ссылки доступа к установкам и статистике плагина"
|
197 |
+
#~ msgid "Do you really want to hide these shortcuts?"
|
198 |
+
#~ msgstr "Вы действительно хотите скрыть эти ссылки?"
|
199 |
+
#~ msgid "Thank You"
|
200 |
+
#~ msgstr "Спасибо"
|
201 |
+
#~ msgid "Additional Documentation"
|
202 |
+
#~ msgstr "Дополнительная документация"
|
203 |
+
#~ msgid "operation is prohibited"
|
204 |
+
#~ msgstr "операция запрещена"
|
205 |
+
#~ msgid "Default Settings are restored"
|
206 |
+
#~ msgstr "Установки по-умолчанию восстановлены"
|
207 |
+
#~ msgid "All Thanks Counters are cleared"
|
208 |
+
#~ msgstr "Все счётчики благодраностей обнулены"
|
209 |
+
#~ msgid "Additional documentation"
|
210 |
+
#~ msgstr "Дополнительная документация"
|
211 |
+
#~ msgid ""
|
212 |
+
#~ "for the help with Spanish translation, ideas and new versions testing"
|
213 |
+
#~ msgstr "за помощь с испанским переводом, идеи и тестирование новых версий"
|
214 |
+
#~ msgid "for the excelent JQuery color picker"
|
215 |
+
#~ msgstr "за отличный JQuery-плагин для работы с цветовой палитрой"
|
216 |
+
#~ msgid ""
|
217 |
+
#~ "for the help with French translation, ideas, source code contributions "
|
218 |
+
#~ "and new versions testing"
|
219 |
+
#~ msgstr ""
|
220 |
+
#~ "за помощь с французским переводом, идеи, вклад в разработку и "
|
221 |
+
#~ "тестирование новых версий"
|
222 |
+
#~ msgid "for the help with German translation"
|
223 |
+
#~ msgstr "за помощь с немецким переводом"
|
224 |
+
#~ msgid "for setting page layout idea and html markup examples"
|
225 |
+
#~ msgstr "за идею по компоновке экрана с опциями и примеры HTML разметки"
|
226 |
+
#~ msgid "for the form input slider code"
|
227 |
+
#~ msgstr "за код слайдера для текстового поля input HTML формы"
|
228 |
+
#~ msgid "for the cute online button image generator"
|
229 |
+
#~ msgstr "за прекрасный онлайновый генератор изображений кнопок"
|
230 |
+
#~ msgid ""
|
231 |
+
#~ "All settings for TYCB plugin will be return to the default values, "
|
232 |
+
#~ "Continue?"
|
233 |
+
#~ msgstr ""
|
234 |
+
#~ "Всем установкам для TYCB плагина будут возвращены значения по-умолчанию, "
|
235 |
+
#~ "Продолжить?"
|
236 |
+
#~ msgid ""
|
237 |
+
#~ "All thanks counters for all posts will be set to 0,\\n all thanks click "
|
238 |
+
#~ "history will be cleared, Continue?"
|
239 |
+
#~ msgstr ""
|
240 |
+
#~ "Все счетчики благодарностей для всех статей будут обнулены,\\n вся "
|
241 |
+
#~ "история кликов по кнопкам благодарности будет обнулена, Продолжить?"
|
242 |
+
#~ msgid "Display"
|
243 |
+
#~ msgstr "Отображение"
|
244 |
+
#~ msgid "Display button at Pages"
|
245 |
+
#~ msgstr "Отображать на Страницах"
|
246 |
+
#~ msgid "Display button at Home page, Categories/Tags archive pages"
|
247 |
+
#~ msgstr "Отображать на Домашней странице, архивах категорий/тэгов"
|
248 |
+
#~ msgid "Do not show button for selected categories"
|
249 |
+
#~ msgstr "Не отображать кнопку для отмеченных категорий"
|
250 |
+
#~ msgid "Position in the Post text"
|
251 |
+
#~ msgstr "Расположение в статье"
|
252 |
+
#~ msgid "Before"
|
253 |
+
#~ msgstr "До"
|
254 |
+
#~ msgid "At first page of multipaged posts only"
|
255 |
+
#~ msgstr "Только на первой странице многостраничных статей "
|
256 |
+
#~ msgid "After"
|
257 |
+
#~ msgstr "После"
|
258 |
+
#~ msgid "At last page of multipaged posts only"
|
259 |
+
#~ msgstr "Только на последней странице многостраничных статей"
|
260 |
+
#~ msgid "Shortcode [thankyou]"
|
261 |
+
#~ msgstr "Аббревиатура [thankyou]"
|
262 |
+
#~ msgid "Manual"
|
263 |
+
#~ msgstr "Вручную"
|
264 |
+
#~ msgid "Button Caption"
|
265 |
+
#~ msgstr "Надпись на кнопке"
|
266 |
+
#~ msgid "Button Styling"
|
267 |
+
#~ msgstr "Стиль для Кнопки"
|
268 |
+
#~ msgid "Add style to the div:"
|
269 |
+
#~ msgstr "Cтиль для div"
|
270 |
+
#~ msgid "e.g.,"
|
271 |
+
#~ msgstr ", например, "
|
272 |
+
#~ msgid "to the Caption font:"
|
273 |
+
#~ msgstr "для шрифта:"
|
274 |
+
#~ msgid "font color: "
|
275 |
+
#~ msgstr "цвет шрифта:"
|
276 |
+
#~ msgid "Size"
|
277 |
+
#~ msgstr "Размер"
|
278 |
+
#~ msgid "Normal"
|
279 |
+
#~ msgstr "Нормальный"
|
280 |
+
#~ msgid "Compact"
|
281 |
+
#~ msgstr "Компактный размер"
|
282 |
+
#~ msgid "Form and Color"
|
283 |
+
#~ msgstr "Форма и Цвет"
|
284 |
+
#~ msgid "Custom button image URL"
|
285 |
+
#~ msgstr "URL изображения собственной кнопки"
|
286 |
+
#~ msgid "Width, px"
|
287 |
+
#~ msgstr "Ширина, px"
|
288 |
+
#~ msgid "Height, px"
|
289 |
+
#~ msgstr "Высота, px"
|
290 |
+
#~ msgid "Misc"
|
291 |
+
#~ msgstr "Разное"
|
292 |
+
#~ msgid "Check IP-address"
|
293 |
+
#~ msgstr "Контролировать IP-адрес"
|
294 |
+
#~ msgid "Only one Thanks for post for one IP-address limit"
|
295 |
+
#~ msgstr "Только одно Спасибо на статью с одного IP-адреса"
|
296 |
+
#~ msgid "Time limit:"
|
297 |
+
#~ msgstr "Ограничение по времени:"
|
298 |
+
#~ msgid "Forever"
|
299 |
+
#~ msgstr "Навсегда"
|
300 |
+
#~ msgid "Only for this period"
|
301 |
+
#~ msgstr "Только на данный промежуток"
|
302 |
+
#~ msgid "seconds"
|
303 |
+
#~ msgstr "секунд"
|
304 |
+
#~ msgid "Display settings shortcuts"
|
305 |
+
#~ msgstr "Вывод служебных ссылок"
|
306 |
+
#~ msgid "Add shortcuts next to the buttons for settings quick access"
|
307 |
+
#~ msgstr ""
|
308 |
+
#~ "Отобразить служебные ссылки справа от кнопок для быстрого доступа к "
|
309 |
+
#~ "разделу настроек"
|
310 |
+
#~ msgid "Return to Defaults"
|
311 |
+
#~ msgstr "Вернуть значения по-умолчанию"
|
312 |
+
#~ msgid "Restore the default values for all settings"
|
313 |
+
#~ msgstr "Восстановить значения по-умолчанию для всех установок"
|
314 |
+
#~ msgid "Reset Counters"
|
315 |
+
#~ msgstr "Обнулить Счетчики"
|
316 |
+
#~ msgid "Reset all thanks counters for the all posts"
|
317 |
+
#~ msgstr "Сбросить все счетчики благодарностей для всех статей"
|
318 |
+
#~ msgid "Button DIV Style Preview"
|
319 |
+
#~ msgstr "Стиль для раздела Кнопки"
|
320 |
+
#~ msgid "Post Title"
|
321 |
+
#~ msgstr "Заголовок статьи"
|
322 |
+
#~ msgid "None"
|
323 |
+
#~ msgstr "Нет"
|
324 |
+
#~ msgid "Back to main statistics"
|
325 |
+
#~ msgstr "Вернуться к основной статистике"
|
326 |
+
#~ msgid "Not available"
|
327 |
+
#~ msgstr "Не доступен"
|
328 |
+
#~ msgid "Details for “%s”"
|
329 |
+
#~ msgstr "Подробности для “%s”"
|
330 |
+
#~ msgid "Post Id"
|
331 |
+
#~ msgstr "Id статьи"
|
332 |
+
#~ msgid "Thanks Quant"
|
333 |
+
#~ msgstr "Количество благодарностей"
|
334 |
+
#~ msgid "View Post"
|
335 |
+
#~ msgstr "Просмотр статьи"
|
336 |
+
#~ msgid "View \"%s\""
|
337 |
+
#~ msgstr "Просмотр \"%s\""
|
338 |
+
#~ msgid "Edit Post"
|
339 |
+
#~ msgstr "Изменить статью"
|
340 |
+
#~ msgid "Reset this post counter"
|
341 |
+
#~ msgstr "Обнулить счетчик для этой статьи"
|
342 |
+
#~ msgid ""
|
343 |
+
#~ "You are about to reset this post '%s' thanks counter. Click 'Cancel' to "
|
344 |
+
#~ "do nothing, 'OK' to reset it."
|
345 |
+
#~ msgstr ""
|
346 |
+
#~ "Вы собираетесь обнулить счетчик этой статьи '%s'.\n"
|
347 |
+
#~ " Используйте 'Отмена' чтобы отказаться, 'OK' чтобы произвести обнуление."
|
348 |
+
#~ msgid "Reset Counter"
|
349 |
+
#~ msgstr "Обнулить Счетчик"
|
350 |
+
#~ msgid "Displaying %s–%s of %s"
|
351 |
+
#~ msgstr "Вывод %s–%s из %s"
|
352 |
+
#~ msgid "IP address"
|
353 |
+
#~ msgstr "IP-адрес"
|
354 |
+
#~ msgid "Last Thank Date"
|
355 |
+
#~ msgstr "Дата последней благодарности"
|
356 |
+
#~ msgid "Look up IP country"
|
357 |
+
#~ msgstr "Найти страну по IP адресу"
|
358 |
+
#~ msgid "Show all post dates"
|
359 |
+
#~ msgstr "Показать статьи за все даты"
|
360 |
+
#~ msgid "View all categories"
|
361 |
+
#~ msgstr "Просмотр всех категорий"
|
362 |
+
#~ msgid "Show Posts without Thanks"
|
363 |
+
#~ msgstr "Показать статьи без благодарностей"
|
364 |
+
#~ msgid "Rows per page: "
|
365 |
+
#~ msgstr "Строк на страницу:"
|
366 |
+
#~ msgid "Refresh"
|
367 |
+
#~ msgstr "Обновить"
|
368 |
+
#~ msgid "descending"
|
369 |
+
#~ msgstr "убывающем"
|
370 |
+
#~ msgid "Ascending order"
|
371 |
+
#~ msgstr "Возрастающий порядок"
|
372 |
+
#~ msgid "ascending"
|
373 |
+
#~ msgstr "возрастающем"
|
374 |
+
#~ msgid "Descending order"
|
375 |
+
#~ msgstr "Убывающий порядок"
|
376 |
+
#~ msgid "Click to sort in %s order"
|
377 |
+
#~ msgstr "Щелкни для сортировки в %s порядке"
|
378 |
+
#~ msgid "View details"
|
379 |
+
#~ msgstr "Просмотр деталей"
|
380 |
+
#~ msgid ""
|
381 |
+
#~ "You are about to reset this post '%s' thanks counter.\n"
|
382 |
+
#~ " Click 'Cancel' to do nothing, 'OK' to reset it."
|
383 |
+
#~ msgstr ""
|
384 |
+
#~ "Вы собираетесь обнулить счетчик этой статьи '%s'.\n"
|
385 |
+
#~ " Используйте 'Отмена' чтобы отказаться, 'OK' чтобы произвести обнуление."
|
386 |
+
#~ msgid "No posts with thanks found"
|
387 |
+
#~ msgstr "Статьи c благодарностями не найдены"
|
388 |
+
#~ msgid "the latest or the most thanked post titles with total thanks quant"
|
389 |
+
#~ msgstr ""
|
390 |
+
#~ "Отблагдаренные пооследними статьи с общим количеством благодарностей или "
|
391 |
+
#~ "статьи с наибольшим количеством благодарностей"
|
392 |
+
#~ msgid "Thanks Stat"
|
393 |
+
#~ msgstr "Статистика благодарностей"
|
394 |
+
#~ msgid "Total quant of thanks: "
|
395 |
+
#~ msgstr "Общее количество благодарностей:"
|
396 |
+
#~ msgid "Title:"
|
397 |
+
#~ msgstr "Заголовок статьи"
|
398 |
+
#~ msgid "Number of posts to show:"
|
399 |
+
#~ msgstr "Количество статей для показа:"
|
400 |
+
#~ msgid "What posts to show:"
|
401 |
+
#~ msgstr "Какие статьи показывать:"
|
402 |
+
#~ msgid "Latest thanked"
|
403 |
+
#~ msgstr "Последние благодарности"
|
404 |
+
#~ msgid "Most thanked"
|
405 |
+
#~ msgstr "Максимум благодарностей"
|
406 |
+
#~ msgid "Total quant of thanks"
|
407 |
+
#~ msgstr "Общее количество благодарностей:"
|
408 |
+
#~ msgid "Display total quant of thanks"
|
409 |
+
#~ msgstr "Показать общее количество благодарностей"
|
410 |
+
#~ msgid "Check Full Statistics"
|
411 |
+
#~ msgstr "Просмотр полной статистики"
|
412 |
+
#~ msgid "Plugin author home page"
|
413 |
+
#~ msgstr "Сайт автора плагина"
|
414 |
+
#~ msgid "No thanks yet"
|
415 |
+
#~ msgstr "Пока благодарностей нет"
|
416 |
+
#~ msgid "Posts number to show:"
|
417 |
+
#~ msgstr "Количество статей для показа:"
|
418 |
+
#~ msgid "Display Full Statistics link"
|
419 |
+
#~ msgstr "Просмотр полной статистики"
|
420 |
+
#~ msgid "Display plugin author link"
|
421 |
+
#~ msgstr "Показать ссылку на сайт автора плагина"
|
422 |
+
#~ msgid "Latest Thanks"
|
423 |
+
#~ msgstr "Последние благодарности"
|
424 |
+
#~ msgid "Most Thanked"
|
425 |
+
#~ msgstr "Максимум благодарностей"
|
426 |
+
#~ msgid "Unknown Post!"
|
427 |
+
#~ msgstr "Неизвестная статья!"
|
428 |
+
#~ msgid "Default"
|
429 |
+
#~ msgstr "По-умолчанию"
|
430 |
+
#~ msgid "Submit"
|
431 |
+
#~ msgstr "Отправить"
|
432 |
+
#~ msgid "Show total quant of thanks"
|
433 |
+
#~ msgstr "Показать общее количество благодарностей"
|
434 |
+
#~ msgid ""
|
435 |
+
#~ "This plugin installs the Thank You Counter Button for each of your blog "
|
436 |
+
#~ "post.\n"
|
437 |
+
#~ " It can have custom style in your blog posts."
|
438 |
+
#~ msgstr ""
|
439 |
+
#~ "Этот плагин добавляет кнопку подсчета благодарностей к каждой статье "
|
440 |
+
#~ "Вашего блога.\n"
|
441 |
+
#~ " Стиль и расположение кнопки могут быть адаптированы к "
|
442 |
+
#~ "стилю вашего блога."
|
443 |
+
#~ msgid ""
|
444 |
+
#~ "To exclude Thank You button from particular post use shortcode "
|
445 |
+
#~ "[nothankyou] there"
|
446 |
+
#~ msgstr ""
|
447 |
+
#~ "Чтобы не показывать кнопку Спасибо для конкректной статьи, вставьте в ее "
|
448 |
+
#~ "текст код [notthankyou]"
|
449 |
+
#~ msgid "(at most 15)"
|
450 |
+
#~ msgstr "(до 15)"
|
451 |
+
#~ msgid "Before and After"
|
452 |
+
#~ msgstr "До и После"
|
453 |
+
#~ msgid "Filter"
|
454 |
+
#~ msgstr "Фильтр"
|
455 |
+
#~ msgid "Position"
|
456 |
+
#~ msgstr "Расположение"
|
457 |
+
#~ msgid "Add style to the Thank You button's div, e.g.,"
|
458 |
+
#~ msgstr "Добавить стиль в раздел div кнопки Спасибо"
|
459 |
+
#~ msgid "Color"
|
460 |
+
#~ msgstr "Цвет"
|
461 |
+
#~ msgid "Blue"
|
462 |
+
#~ msgstr "Синий"
|
463 |
+
#~ msgid "Red"
|
464 |
+
#~ msgstr "Красный"
|
465 |
+
#~ msgid "Green"
|
466 |
+
#~ msgstr "Зеленый"
|
467 |
+
#~ msgid "Grey"
|
468 |
+
#~ msgstr "Серый"
|
469 |
+
#~ msgid "Black"
|
470 |
+
#~ msgstr "Черный"
|
471 |
+
|
lang/ure.mo
ADDED
Binary file
|
lang/ure.pot
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Thank You Counter Button 1.0.02\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-03-20 17:42+0600\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: vladimir <vladimir@shinephp.com>\n"
|
8 |
+
"Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: English\n"
|
13 |
+
"X-Poedit-Country: RUSSIAN FEDERATION\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-Basepath: .\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
|
19 |
+
#: ../ure-options.php:114
|
20 |
+
msgid "Backup record is created for the current role capabilities"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../ure-options.php:131
|
24 |
+
msgid "Role "
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../ure-options.php:131
|
28 |
+
msgid " is updated successfully"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: ../ure-options.php:165
|
32 |
+
msgid "About this Plugin:"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: ../ure-options.php:166
|
36 |
+
msgid "Author's website"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: ../ure-options.php:167
|
40 |
+
msgid "Plugin webpage"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: ../ure-options.php:168
|
44 |
+
#: ../user-role-editor.php:103
|
45 |
+
msgid "Changelog"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../ure-options.php:169
|
49 |
+
msgid "FAQ"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../ure-options.php:170
|
53 |
+
msgid "Donate"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../ure-options.php:172
|
57 |
+
msgid "Greetings:"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../ure-options.php:173
|
61 |
+
msgid "It's me, the author"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../ure-options.php:174
|
65 |
+
msgid "Do you wish to see your name with link to your site here? You are welcome! Your help with translation and new ideas are very appreciated."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: ../ure-options.php:185
|
69 |
+
msgid ": Please confirm to continue"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: ../ure-options.php:201
|
73 |
+
#, php-format
|
74 |
+
msgid "Role \"%s\" update: please confirm to continue"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../ure-options.php:209
|
78 |
+
msgid "Select Role and change its capabilities list"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: ../ure-options.php:243
|
82 |
+
msgid "Update"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../ure-options.php:243
|
86 |
+
msgid "Save Changes"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../ure-options.php:244
|
90 |
+
msgid "Cancel"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../ure-options.php:244
|
94 |
+
msgid "Cancel not saved changes"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../ure-options.php:245
|
98 |
+
msgid "Reset"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../ure-options.php:245
|
102 |
+
msgid "Return to default WordPress user role capabilities"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../user-role-editor.php:38
|
106 |
+
msgid "User Role Editor requires WordPress 2.8 or newer."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../user-role-editor.php:38
|
110 |
+
msgid "Please update!"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../user-role-editor.php:63
|
114 |
+
msgid "User Role Editor"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../user-role-editor.php:93
|
118 |
+
msgid "Settings"
|
119 |
+
msgstr ""
|
120 |
+
|
readme.txt
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== User Role Editor ===
|
2 |
+
Contributors: ShinePHP
|
3 |
+
Donate link: http://www.shinephp.com/donate/
|
4 |
+
Tags: user, role, editor, security, access, permission, capability
|
5 |
+
Requires at least: 2.8.
|
6 |
+
Tested up to: 2.9.2
|
7 |
+
Stable tag: 1.0
|
8 |
+
|
9 |
+
User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role (except administrator) with a few clicks.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role (except administrator) with a few clicks.
|
14 |
+
Just turn on check boxes of capabilities you wish to add to the selected role and click "Update" button to save your changes. That's done. In case you made some unneccessary change you always have the "Reset" button to return to the default state of WordPress user roles.
|
15 |
+
To read more about 'User Role Editor' visit this link http://www.shinephp.com/user-role-editor-wordpress-plugin/
|
16 |
+
|
17 |
+
== Installation ==
|
18 |
+
|
19 |
+
Installation procedure:
|
20 |
+
|
21 |
+
1. Deactivate plugin if you have the previous version installed.
|
22 |
+
2. Extract "user-role-editor.x.x.x.zip" archive content to the "/wp-content/plugins/user-role-editor" directory.
|
23 |
+
3. Activate "User Role Editor" plugin via 'Plugins' menu in WordPress admin menu.
|
24 |
+
4. Go to the "Settings"-"User Role Editor" menu item and change your WordPress standard roles capabilities according to your needs.
|
25 |
+
|
26 |
+
== Frequently Asked Questions ==
|
27 |
+
- coming soon with your help
|
28 |
+
|
29 |
+
== Screenshots ==
|
30 |
+
1. screenshot-1.png User Role Editor main form
|
31 |
+
|
32 |
+
== Translations ==
|
33 |
+
* Russian: [ShinePHP](http://shinephp.com)
|
34 |
+
|
35 |
+
Dear plugin User,
|
36 |
+
if you wish to help me with this plugin translation I very appreciate it. Please send your language .po and .mo files to vladimir[at-sign]shinephp.com email. Do not forget include you site link in order I can show it with greetings for the translation help at shinephp.com, plugin settings page and in this readme.txt file.
|
37 |
+
|
38 |
+
== Special Thanks to ==
|
39 |
+
You are welcome! Help me with plugin translation, share with me new ideas about it further development and link to your site will appear here.
|
40 |
+
|
41 |
+
== Changelog ==
|
42 |
+
= 1.0 = 22.03.2010
|
43 |
+
- 1st release.
|
44 |
+
|
45 |
+
== Additional Documentation ==
|
46 |
+
|
47 |
+
You can find more information about "User Role Editor" plugin at this page
|
48 |
+
http://www.shinephp.com/user-role-editor-wordpress-plugin/
|
49 |
+
|
50 |
+
I am ready to answer on your questions about plugin usage. Use ShinePHP forum at
|
51 |
+
http://shinephp.com/community/forum/user-role-editor/
|
52 |
+
or plugin page comments and site contact form for it please.
|
screenshot-1.png
ADDED
Binary file
|
ure-lib.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* * User Role Editor plugin Lirary general staff
|
4 |
+
* Author: Vladimir Garagulya vladimir@shinephp.com
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
if (!defined("WPLANG")) {
|
10 |
+
die; // Silence is golden, direct call is prohibited
|
11 |
+
}
|
12 |
+
|
13 |
+
$ure_siteURL = get_option( 'siteurl' );
|
14 |
+
|
15 |
+
// Pre-2.6 compatibility
|
16 |
+
if ( !defined( 'WP_CONTENT_URL' ) )
|
17 |
+
define( 'WP_CONTENT_URL', $thanks_siteURL . '/wp-content' );
|
18 |
+
if ( ! defined( 'WP_CONTENT_DIR' ) )
|
19 |
+
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
20 |
+
if ( ! defined( 'WP_PLUGIN_URL' ) )
|
21 |
+
define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
|
22 |
+
if ( ! defined( 'WP_PLUGIN_DIR' ) )
|
23 |
+
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
|
24 |
+
|
25 |
+
$urePluginDirName = substr(dirname(__FILE__), strlen(WP_PLUGIN_DIR) + 1, strlen(__FILE__) - strlen(WP_PLUGIN_DIR)-1);
|
26 |
+
|
27 |
+
define('URE_PLUGIN_URL', WP_PLUGIN_URL.'/'.$urePluginDirName);
|
28 |
+
define('URE_PLUGIN_DIR', WP_PLUGIN_DIR.'/'.$urePluginDirName);
|
29 |
+
define('URE_WP_ADMIN_URL', $ure_siteURL.'/wp-admin');
|
30 |
+
define('URE_ERROR', 'Error is encountered');
|
31 |
+
|
32 |
+
|
33 |
+
global $wpdb, $ure_OptionsTable;
|
34 |
+
|
35 |
+
$ure_OptionsTable = $wpdb->prefix .'options';
|
36 |
+
|
37 |
+
|
38 |
+
function ure_logEvent($message, $showMessage = false) {
|
39 |
+
include(ABSPATH .'wp-includes/version.php');
|
40 |
+
|
41 |
+
$fileName = URE_PLUGIN_DIR.'/user-role-editor.log';
|
42 |
+
$fh = fopen($fileName,'a');
|
43 |
+
$cr = "\n";
|
44 |
+
$s = $cr.date("d-m-Y H:i:s").$cr.
|
45 |
+
'WordPress version: '.$wp_version.', PHP version: '.phpversion().', MySQL version: '.mysql_get_server_info().$cr;
|
46 |
+
fwrite($fh, $s);
|
47 |
+
fwrite($fh, $message.$cr);
|
48 |
+
fclose($fh);
|
49 |
+
|
50 |
+
if ($showMessage) {
|
51 |
+
ure_showMessage('Error is occur. Please check the log file.');
|
52 |
+
}
|
53 |
+
}
|
54 |
+
// end of ure_logEvent()
|
55 |
+
|
56 |
+
function ure_optionSelected($value, $etalon) {
|
57 |
+
$selected = '';
|
58 |
+
if ($value==$etalon) {
|
59 |
+
$selected = 'selected="selected"';
|
60 |
+
}
|
61 |
+
|
62 |
+
return $selected;
|
63 |
+
}
|
64 |
+
// end of ure_optionSelected()
|
65 |
+
|
66 |
+
|
67 |
+
function ure_showMessage($message) {
|
68 |
+
|
69 |
+
if ($message) {
|
70 |
+
echo '<div class="updated" style="margin:0;">'.$message.'</div><br style="clear: both;"/>';
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
// end of ure_showMessage()
|
75 |
+
|
76 |
+
|
77 |
+
?>
|
ure-options.php
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Silence Is Golden Guard plugin Settings form
|
4 |
+
*
|
5 |
+
*/
|
6 |
+
|
7 |
+
if (!defined('URE_PLUGIN_URL')) {
|
8 |
+
die; // Silence is golden, direct call is prohibited
|
9 |
+
}
|
10 |
+
|
11 |
+
$shinephpFavIcon = URE_PLUGIN_URL.'/images/vladimir.png';
|
12 |
+
$mess = '';
|
13 |
+
|
14 |
+
$option_name = $wpdb->prefix.'user_roles';
|
15 |
+
|
16 |
+
// restore roles capabilities from the backup record
|
17 |
+
if (isset($_GET['action']) && $_GET['action']=='reset') {
|
18 |
+
$backup_option_name = $wpdb->prefix.'backup_user_roles';
|
19 |
+
$query = "select option_value
|
20 |
+
from $ure_OptionsTable
|
21 |
+
where option_name='$backup_option_name'
|
22 |
+
limit 0, 1";
|
23 |
+
$option_value = $wpdb->get_var($query);
|
24 |
+
if ($wpdb->last_error) {
|
25 |
+
ure_logEvent($wpdb->last_error, true);
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
$query = "update $ure_OptionsTable
|
29 |
+
set option_value='$option_value'
|
30 |
+
where option_name='$option_name'
|
31 |
+
limit 1";
|
32 |
+
$record = $wpdb->query($query);
|
33 |
+
if ($wpdb->last_error) {
|
34 |
+
ure_logEvent($wpdb->last_error, true);
|
35 |
+
return;
|
36 |
+
}
|
37 |
+
if ($mess) {
|
38 |
+
$mess .= '<br/';
|
39 |
+
}
|
40 |
+
$mess = 'Roles capabilities are restored from the backup data';
|
41 |
+
if (isset($_REQUEST['user_role'])) {
|
42 |
+
$_REQUEST['user_role'] = null;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
$query = "select option_id, option_value
|
47 |
+
from $ure_OptionsTable
|
48 |
+
where option_name='$option_name'
|
49 |
+
limit 0, 1";
|
50 |
+
$record = $wpdb->get_results($query);
|
51 |
+
if ($wpdb->last_error) {
|
52 |
+
ure_logEvent($wpdb->last_error);
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
$roles = unserialize($record[0]->option_value);
|
56 |
+
|
57 |
+
$rolesId = array();
|
58 |
+
foreach ($roles as $key=>$value) {
|
59 |
+
$rolesId[] = $key;
|
60 |
+
}
|
61 |
+
|
62 |
+
$currentRole = $rolesId[count($rolesId) - 1];
|
63 |
+
if (isset($_REQUEST['user_role']) && $_REQUEST['user_role']) {
|
64 |
+
$currentRole = $_REQUEST['user_role'];
|
65 |
+
}
|
66 |
+
|
67 |
+
$roleSelectHTML = '<select id="user_role" name="user_role" onchange="ure_Actions(\'role-change\', this.value);">';
|
68 |
+
foreach ($roles as $key=>$value) {
|
69 |
+
$selected = ure_optionSelected($key, $currentRole);
|
70 |
+
if ($key!='administrator') {
|
71 |
+
$roleSelectHTML .= '<option value="'.$key.'" '.$selected.'>'.$value['name'].'</option>';
|
72 |
+
}
|
73 |
+
}
|
74 |
+
$roleSelectHTML .= '</select>';
|
75 |
+
|
76 |
+
$fullCapabilities = array();
|
77 |
+
$role = $roles['administrator'];
|
78 |
+
foreach ($role['capabilities'] as $key=>$value) {
|
79 |
+
$fullCapabilities[] = $key;
|
80 |
+
}
|
81 |
+
|
82 |
+
// save role changes to database block
|
83 |
+
if (isset($_POST['action']) && $_POST['action']=='update' && isset($_POST['user_role'])) {
|
84 |
+
$currentRole = $_POST['user_role'];
|
85 |
+
$capabilityToSave = array();
|
86 |
+
foreach($roles['administrator']['capabilities'] as $availableCapability=>$value) {
|
87 |
+
if (isset($_POST[$availableCapability])) {
|
88 |
+
$capabilityToSave[$availableCapability] = 1;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
if (count($capabilityToSave)>0) {
|
92 |
+
// check if backup user roles record exists already
|
93 |
+
$backup_option_name = $wpdb->prefix.'backup_user_roles';
|
94 |
+
$query = "select option_id
|
95 |
+
from $ure_OptionsTable
|
96 |
+
where option_name='$backup_option_name'
|
97 |
+
limit 0, 1";
|
98 |
+
$option_id = $wpdb->get_var($query);
|
99 |
+
if ($wpdb->last_error) {
|
100 |
+
ure_logEvent($wpdb->last_error, true);
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
if (!$option_id) {
|
104 |
+
// create user roles record backup
|
105 |
+
$serialized_roles = mysql_real_escape_string(serialize($roles));
|
106 |
+
$query = "insert into $ure_OptionsTable
|
107 |
+
(option_name, option_value, autoload)
|
108 |
+
values ('$backup_option_name', '$serialized_roles', 'yes')";
|
109 |
+
$record = $wpdb->query($query);
|
110 |
+
if ($wpdb->last_error) {
|
111 |
+
ure_logEvent($wpdb->last_error, true);
|
112 |
+
return;
|
113 |
+
}
|
114 |
+
$mess .= __('Backup record is created for the current role capabilities');
|
115 |
+
}
|
116 |
+
// save role changes into the database
|
117 |
+
$roles[$currentRole]['capabilities'] = $capabilityToSave;
|
118 |
+
$serialized_roles = serialize($roles);
|
119 |
+
$query = "update $ure_OptionsTable
|
120 |
+
set option_value='$serialized_roles'
|
121 |
+
where option_name='$option_name'
|
122 |
+
limit 1";
|
123 |
+
$record = $wpdb->query($query);
|
124 |
+
if ($wpdb->last_error) {
|
125 |
+
ure_logEvent($wpdb->last_error, true);
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
if ($mess) {
|
129 |
+
$mess .= '<br/';
|
130 |
+
}
|
131 |
+
$mess = __('Role ').$roles[$currentRole]['name'].__(' is updated successfully');
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
|
136 |
+
// options page display part
|
137 |
+
function ure_displayBoxStart($title) {
|
138 |
+
?>
|
139 |
+
<div class="postbox" style="float: left;">
|
140 |
+
<h3 style="cursor:default;"><span><?php echo $title ?></span></h3>
|
141 |
+
<div class="inside">
|
142 |
+
<?php
|
143 |
+
}
|
144 |
+
// end of thanks_displayBoxStart()
|
145 |
+
|
146 |
+
function ure_displayBoxEnd() {
|
147 |
+
?>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<?php
|
151 |
+
}
|
152 |
+
// end of thanks_displayBoxEnd()
|
153 |
+
|
154 |
+
|
155 |
+
ure_showMessage($mess);
|
156 |
+
|
157 |
+
?>
|
158 |
+
<form method="post" action="options-general.php?page=user-role-editor.php" onsubmit="return ure_onSubmit();">
|
159 |
+
<?php
|
160 |
+
settings_fields('ure-quard-options');
|
161 |
+
?>
|
162 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
163 |
+
<div class="inner-sidebar" >
|
164 |
+
<div id="side-sortables" class="meta-box-sortabless ui-sortable" style="position:relative;">
|
165 |
+
<?php ure_displayBoxStart(__('About this Plugin:', 'ure')); ?>
|
166 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo $shinephpFavIcon; ?>);" target="_blank" href="http://www.shinephp.com/"><?php _e("Author's website", 'ure'); ?></a>
|
167 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo URE_PLUGIN_URL.'/images/user-role-editor-icon.png'; ?>" target="_blank" href="http://www.shinephp.com/user-role-editor-wordpress-plugin/"><?php _e('Plugin webpage', 'ure'); ?></a>
|
168 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo URE_PLUGIN_URL.'/images/changelog-icon.png'; ?>);" target="_blank" href="http://www.shinephp.com/user-role-editor-wordpress-plugin/#changelog"><?php _e('Changelog', 'ure'); ?></a>
|
169 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo URE_PLUGIN_URL.'/images/faq-icon.png'; ?>)" target="_blank" href="http://www.shinephp.com/user-role-editor-wordpress-plugin/#faq"><?php _e('FAQ', 'ure'); ?></a>
|
170 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo URE_PLUGIN_URL.'/images/donate-icon.png'; ?>)" target="_blank" href="http://www.shinephp.com/donate"><?php _e('Donate', 'ure'); ?></a>
|
171 |
+
<?php ure_displayBoxEnd(); ?>
|
172 |
+
<?php ure_displayBoxStart(__('Greetings:','ure')); ?>
|
173 |
+
<a class="ure_rsb_link" style="background-image:url(<?php echo $shinephpFavIcon; ?>);" target="_blank" title="<?php _e("It's me, the author", 'ure'); ?>" href="http://www.shinephp.com/">Vladimir</a>
|
174 |
+
<?php _e('Do you wish to see your name with link to your site here? You are welcome! Your help with translation and new ideas are very appreciated.', 'ure'); ?>
|
175 |
+
<?php ure_displayBoxEnd(); ?>
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
<div class="has-sidebar" >
|
179 |
+
<div id="post-body-content" class="has-sidebar-content">
|
180 |
+
<script language="javascript" type="text/javascript">
|
181 |
+
function ure_Actions(action, value) {
|
182 |
+
if (action=='cancel') {
|
183 |
+
document.location = '<?php echo URE_WP_ADMIN_URL; ?>/options-general.php?page=user-role-editor.php';
|
184 |
+
} else {
|
185 |
+
if (action!='role-change' && !confirm(action +'<?php _e(': Please confirm to continue'); ?>')) {
|
186 |
+
return false;
|
187 |
+
}
|
188 |
+
if (action!='update') {
|
189 |
+
$url = '<?php echo URE_WP_ADMIN_URL; ?>/options-general.php?page=user-role-editor.php&action='+ action;
|
190 |
+
if (value!='') {
|
191 |
+
$url = $url +'&user_role='+ value;
|
192 |
+
}
|
193 |
+
document.location = $url;
|
194 |
+
} else {
|
195 |
+
document.getElementById('ure-form').submit();
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
function ure_onSubmit() {
|
201 |
+
if (!confirm('<?php echo sprintf(__('Role "%s" update: please confirm to continue'), $roles[$currentRole]['name']); ?>')) {
|
202 |
+
return false;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
</script>
|
208 |
+
<?php
|
209 |
+
ure_displayBoxStart(__('Select Role and change its capabilities list', 'ure')); ?>
|
210 |
+
<table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
|
211 |
+
<tr>
|
212 |
+
<td style="vertical-align:top;width:200px;" colspan="3">
|
213 |
+
Select Role: <?php echo $roleSelectHTML; ?>
|
214 |
+
</td>
|
215 |
+
</tr>
|
216 |
+
<tr>
|
217 |
+
<td style="vertical-align:top;">
|
218 |
+
<?php
|
219 |
+
$quant = count($fullCapabilities);
|
220 |
+
$i = 0; $quantInCell = 0;
|
221 |
+
while($i<$quant) {
|
222 |
+
$checked = '';
|
223 |
+
//$capability = $roles[$currentRole]['capabilities']; if (isset($capability[$fullCapabilities[$i]])) {
|
224 |
+
if (isset($roles[$currentRole]['capabilities'][$fullCapabilities[$i]])) {
|
225 |
+
$checked = 'checked="checked"';
|
226 |
+
}
|
227 |
+
?>
|
228 |
+
<input type="checkbox" name="<?php echo $fullCapabilities[$i]; ?>" id="<?php echo $fullCapabilities[$i]; ?>" value="<?php echo $fullCapabilities[$i]; ?>" <?php echo $checked; ?>/> <?php echo $fullCapabilities[$i]; ?><br/>
|
229 |
+
<?php
|
230 |
+
$i++; $quantInCell++;
|
231 |
+
if ($quantInCell>=23) {
|
232 |
+
$quantInCell = 0;
|
233 |
+
echo '</td>
|
234 |
+
<td style="vertical-align:top;">';
|
235 |
+
}
|
236 |
+
}
|
237 |
+
?>
|
238 |
+
</td>
|
239 |
+
</tr>
|
240 |
+
</table>
|
241 |
+
<?php ure_displayBoxEnd();?>
|
242 |
+
<div class="fli submit" style="padding-top: 0px;">
|
243 |
+
<input type="submit" name="submit" value="<?php _e('Update', 'ure'); ?>" title="<?php _e('Save Changes', 'ure'); ?>" />
|
244 |
+
<input type="button" name="cancel" value="<?php _e('Cancel', 'ure') ?>" title="<?php _e('Cancel not saved changes','ure');?>" onclick="ure_Actions('cancel');"/>
|
245 |
+
<input type="button" name="default" value="<?php _e('Reset', 'ure') ?>" title="<?php _e('Return to default WordPress user role capabilities','ure');?>" onclick="ure_Actions('reset');"/>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</form>
|
251 |
+
|
user-role-editor.php
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: User Role Editor
|
4 |
+
Plugin URI: http://www.shinephp.com/user-role-editor-wordpress-plugin/
|
5 |
+
Description: It allows you to change any standard WordPress user roles (except administrator) capabilities list with a few clicks.
|
6 |
+
Version: 1.0
|
7 |
+
Author: Vladimir Garagulya
|
8 |
+
Author URI: http://www.shinephp.com
|
9 |
+
Text Domain: ure
|
10 |
+
Domain Path: /lang/
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
Copyright 2009 Vladimir Garagulya (email: vladimir@shinephp.com)
|
15 |
+
|
16 |
+
This program is free software; you can redistribute it and/or modify
|
17 |
+
it under the terms of the GNU General Public License as published by
|
18 |
+
the Free Software Foundation; either version 2 of the License, or
|
19 |
+
(at your option) any later version.
|
20 |
+
|
21 |
+
This program is distributed in the hope that it will be useful,
|
22 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
+
GNU General Public License for more details.
|
25 |
+
|
26 |
+
You should have received a copy of the GNU General Public License
|
27 |
+
along with this program; if not, write to the Free Software
|
28 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29 |
+
*/
|
30 |
+
|
31 |
+
|
32 |
+
if (!function_exists("get_option")) {
|
33 |
+
die; // Silence is golden, direct call is prohibited
|
34 |
+
}
|
35 |
+
|
36 |
+
global $wp_version;
|
37 |
+
|
38 |
+
$exit_msg = __('User Role Editor requires WordPress 2.8 or newer.').'<a href="http://codex.wordpress.org/Upgrading_WordPress">'.__('Please update!').'</a>';
|
39 |
+
|
40 |
+
if (version_compare($wp_version,"2.8","<"))
|
41 |
+
{
|
42 |
+
return ($exit_msg);
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
require_once('ure-lib.php');
|
47 |
+
|
48 |
+
load_plugin_textdomain('ure','', $urePluginDirName.'/lang');
|
49 |
+
|
50 |
+
|
51 |
+
function ure_optionsPage() {
|
52 |
+
|
53 |
+
global $wpdb, $ure_OptionsTable;
|
54 |
+
|
55 |
+
if (!current_user_can('activate_plugins')) {
|
56 |
+
die('action is forbidden');
|
57 |
+
}
|
58 |
+
|
59 |
+
?>
|
60 |
+
|
61 |
+
<div class="wrap">
|
62 |
+
<div class="icon32" id="icon-options-general"><br/></div>
|
63 |
+
<h2><?php _e('User Role Editor', 'ure'); ?></h2>
|
64 |
+
<?php require ('ure-options.php'); ?>
|
65 |
+
</div>
|
66 |
+
<?php
|
67 |
+
|
68 |
+
}
|
69 |
+
// end of ure_optionsPage()
|
70 |
+
|
71 |
+
|
72 |
+
// Install plugin
|
73 |
+
function ure_install() {
|
74 |
+
|
75 |
+
add_option('ure_auto_monitor', 0);
|
76 |
+
|
77 |
+
ure_logEvent('URE Plugin is installed successfully.');
|
78 |
+
}
|
79 |
+
// end of ure_install()
|
80 |
+
|
81 |
+
|
82 |
+
function ure_init() {
|
83 |
+
|
84 |
+
if(function_exists('register_setting')) {
|
85 |
+
register_setting('ure-options', 'ure_option');
|
86 |
+
}
|
87 |
+
}
|
88 |
+
// end of ure_init()
|
89 |
+
|
90 |
+
|
91 |
+
function ure_plugin_action_links($links, $file) {
|
92 |
+
if ($file == plugin_basename(dirname(__FILE__).'/user-role-editor.php')){
|
93 |
+
$settings_link = "<a href='options-general.php?page=user-role-editor.php'>".__('Settings','ure')."</a>";
|
94 |
+
array_unshift( $links, $settings_link );
|
95 |
+
}
|
96 |
+
return $links;
|
97 |
+
}
|
98 |
+
// end of ure_plugin_action_links
|
99 |
+
|
100 |
+
|
101 |
+
function ure_plugin_row_meta($links, $file) {
|
102 |
+
if ($file == plugin_basename(dirname(__FILE__).'/user-role_editor.php')){
|
103 |
+
$links[] = '<a target="_blank" href="http://www.shinephp.com/user-role-editor-wordpress-plugin/#changelog">'.__('Changelog', 'ure').'</a>';
|
104 |
+
}
|
105 |
+
return $links;
|
106 |
+
} // end of ure_plugin_row_meta
|
107 |
+
|
108 |
+
|
109 |
+
function ure_settings_menu() {
|
110 |
+
if ( function_exists('add_options_page') ) {
|
111 |
+
$ure_page = add_options_page('User Role Editor', 'User Role Editor', 9, basename(__FILE__), 'ure_optionsPage');
|
112 |
+
add_action( "admin_print_styles-$ure_page", 'ure_adminCssAction' );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
// end of ure_settings_menu()
|
116 |
+
|
117 |
+
function ure_adminCssAction() {
|
118 |
+
|
119 |
+
wp_enqueue_style('ure_admin_css', URE_PLUGIN_URL.'/css/ure-admin.css', array(), false, 'screen');
|
120 |
+
|
121 |
+
}
|
122 |
+
// end of ure_adminCssAction()
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
if (is_admin()) {
|
127 |
+
// activation action
|
128 |
+
register_activation_hook(__FILE__, "ure_install");
|
129 |
+
|
130 |
+
add_action('admin_init', 'ure_init');
|
131 |
+
// add a Settings link in the installed plugins page
|
132 |
+
add_filter('plugin_action_links', 'ure_plugin_action_links', 10, 2);
|
133 |
+
add_filter('plugin_row_meta', 'ure_plugin_row_meta', 10, 2);
|
134 |
+
add_action('admin_menu', 'ure_settings_menu');
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
?>
|