Adds some plugins
No files matched your search
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 208 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 207 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,7 @@
|
||||
/*! jQuery UI - v1.10.4 - 2014-01-18
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4emLine truncated
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Document : ure_admin
|
||||
Created on : 10.03.2010
|
||||
Author : Vladimir Garagulya
|
||||
Description:
|
||||
User Role Editor plugin Admin Settings Page CSS
|
||||
*/
|
||||
|
||||
/*
|
||||
Syntax recommendation http://www.w3.org/TR/REC-CSS2/
|
||||
*/
|
||||
|
||||
|
||||
.txt_left {
|
||||
text-align: left;
|
||||
}
|
||||
.txt_center {
|
||||
text-align: center;
|
||||
}
|
||||
.txt_right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.form_color_row {
|
||||
float: left;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
img.input_radio {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a.ure_rsb_link {
|
||||
padding:4px;
|
||||
display:block;
|
||||
padding-left:25px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:5px 50%;
|
||||
text-decoration:none;
|
||||
border:none;
|
||||
}
|
||||
|
||||
a.ure_rsb_link:hover {
|
||||
border-bottom-width:1px;
|
||||
}
|
||||
|
||||
input.warning:hover, a.warning:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.fli {
|
||||
float: left;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#foldersdiv {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
height:300px;
|
||||
width: 450px;
|
||||
overflow:auto;
|
||||
padding:0.5em 0.9em;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ure-sidebar {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#ure_greetings {
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#ure_form_controls {
|
||||
float: left;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#ure_toolbar {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #dfdfdf;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: #f5f5f5;
|
||||
padding: 5px;
|
||||
max-width: 145px;
|
||||
}
|
||||
|
||||
.ure_toolbar_button {
|
||||
width: 143px;
|
||||
}
|
||||
|
||||
#ure_update {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#ure_update_user {
|
||||
margin-top: 190px;
|
||||
margin-bottom: 190px;
|
||||
}
|
||||
|
||||
|
||||
#ure_service_tools {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ure-modal-dialog {
|
||||
display: none;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.ure-label {
|
||||
clear: left;
|
||||
float: left;
|
||||
display: block;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.ure-input {
|
||||
float: left;
|
||||
display: inline;
|
||||
width: 200px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.ure-user-roles {
|
||||
vertical-align: text-top;
|
||||
padding-right: 10px;
|
||||
padding-top: 5px;
|
||||
font-size: 1.1em;
|
||||
border-top: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
/* Multipe select */
|
||||
.countLabel
|
||||
{
|
||||
color:Gray;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
.storageBox
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.copiedOption
|
||||
{
|
||||
background-color:Yellow;
|
||||
}
|
||||
|
||||
#ure-icon {
|
||||
background-image: url("../images/user-role-editor-page-icon.png");
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
#other_default_roles {
|
||||
display: block;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.ure-dialog {
|
||||
display: none;
|
||||
}
|
||||
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 786 B |
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 867 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 767 B |
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* User Role Editor plugin: advertisement showing class
|
||||
* Author: Vladimir Garagulya
|
||||
* email: vladimir@shinephp.com
|
||||
* site: http://shinephp.com
|
||||
*
|
||||
*/
|
||||
|
||||
class ure_Advertisement {
|
||||
|
||||
private $slots = array(0=>'', 1=>'', 2=>'');
|
||||
|
||||
function __construct() {
|
||||
|
||||
$used = array(-1);
|
||||
$index = $this->rand_unique( $used );
|
||||
$this->slots[$index] = $this->admin_menu_editor();
|
||||
|
||||
$used[] = $index;
|
||||
$index = $this->rand_unique( $used );
|
||||
$this->slots[$index] = $this->manage_wp();
|
||||
|
||||
}
|
||||
// end of __construct
|
||||
|
||||
|
||||
/**
|
||||
* Returns random number not included into input array
|
||||
*
|
||||
* @param array $used - array of numbers used already
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private function rand_unique( $used = array(-1) ) {
|
||||
$index = rand(0, 2);
|
||||
while (in_array($index, $used)) {
|
||||
$index = rand(0, 2);
|
||||
}
|
||||
|
||||
return $index;
|
||||
}
|
||||
// return rand_unique()
|
||||
|
||||
|
||||
// content of Admin Menu Editor advertisement slot
|
||||
private function admin_menu_editor() {
|
||||
|
||||
$output = '
|
||||
<div style="text-align: center;">
|
||||
<a href="http://w-shadow.com/admin-menu-editor-pro/?utm_source=UserRoleEditor&utm_medium=banner&utm_campaign=Plugins " target="_new" >
|
||||
<img src="'. URE_PLUGIN_URL . 'images/admin-menu-editor-pro.jpg' .'" alt="Admin Menu Editor Pro" title="Move, rename, hide, add admin menu items, restrict access"/>
|
||||
</a>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $output;
|
||||
}
|
||||
// end of admin_menu_editor()
|
||||
|
||||
|
||||
// content of Manage WP advertisement slot
|
||||
private function manage_wp() {
|
||||
|
||||
$output = '
|
||||
<div style="text-align: center;">
|
||||
<a title="ManageWP" href="http://managewp.com/?utm_source=user_role_editor&utm_medium=Banner&utm_content=mwp250_2&utm_campaign=Plugins" target="_new" >
|
||||
<img width="250" height="250" alt="ManageWP" src="'. URE_PLUGIN_URL .'images/mwp250_2.png">
|
||||
</a>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $output;
|
||||
}
|
||||
// end of manage_wp()
|
||||
|
||||
|
||||
/**
|
||||
* Output all existed ads slots
|
||||
*/
|
||||
public function display() {
|
||||
|
||||
foreach ($this->slots as $slot) {
|
||||
echo $slot."\n";
|
||||
}
|
||||
|
||||
}
|
||||
// end of display()
|
||||
|
||||
}
|
||||
// end of ure_Advertisement
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* User Role Editor WordPress plugin
|
||||
* Author: Vladimir Garagulya
|
||||
* Email: support@role-editor.com
|
||||
* License: GPLv2 or later
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Process AJAX requrest from User Role Editor
|
||||
*
|
||||
* @author vladimir
|
||||
*/
|
||||
class URE_Ajax_Processor {
|
||||
|
||||
protected $lib = null;
|
||||
|
||||
|
||||
public function __construct($lib) {
|
||||
|
||||
$this->lib = $lib;
|
||||
|
||||
}
|
||||
// end of __construct()
|
||||
|
||||
|
||||
protected function ajax_check_permissions() {
|
||||
|
||||
if (!wp_verify_nonce($_REQUEST['wp_nonce'], 'user-role-editor')) {
|
||||
echo json_encode(array('result'=>'error', 'message'=>'URE: Wrong or expired request'));
|
||||
die;
|
||||
}
|
||||
|
||||
$key_capability = $this->lib->get_key_capability();
|
||||
if (!current_user_can($key_capability)) {
|
||||
echo json_encode(array('result'=>'error', 'message'=>'URE: Insufficient permissions'));
|
||||
die;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected function get_users_without_role() {
|
||||
global $wp_roles;
|
||||
|
||||
$new_role = filter_input(INPUT_POST, 'new_role', FILTER_SANITIZE_STRING);
|
||||
if (empty($new_role)) {
|
||||
$answer = array('result'=>'failure', 'message'=>'Provide new role');
|
||||
return $answer;
|
||||
}
|
||||
if ($new_role==='no_rights') {
|
||||
$this->lib->create_no_rights_role();
|
||||
}
|
||||
|
||||
if (!isset($wp_roles)) {
|
||||
$wp_roles = new WP_Roles();
|
||||
}
|
||||
if (!isset($wp_roles->roles[$new_role])) {
|
||||
$answer = array('result'=>'failure', 'message'=>'Selected new role does not exist');
|
||||
return $answer;
|
||||
}
|
||||
|
||||
$users = $this->lib->get_users_without_role();
|
||||
$answer = array('result'=>'success', 'users'=>$users, 'new_role'=>$new_role, 'message'=>'success');
|
||||
|
||||
return $answer;
|
||||
}
|
||||
// end of get_users_without_role()
|
||||
|
||||
|
||||
protected function _dispatch($action) {
|
||||
switch ($action) {
|
||||
case 'get_users_without_role':
|
||||
$answer = $this->get_users_without_role();
|
||||
break;
|
||||
default:
|
||||
$answer = array('result' => 'error', 'message' => 'unknown action "' . $action . '"');
|
||||
}
|
||||
|
||||
return $answer;
|
||||
}
|
||||
// end of _dispatch()
|
||||
|
||||
|
||||
/**
|
||||
* AJAX requests dispatcher
|
||||
*/
|
||||
public function dispatch() {
|
||||
|
||||
$this->ajax_check_permissions();
|
||||
|
||||
$action = filter_input(INPUT_POST, 'sub_action', FILTER_SANITIZE_STRING);
|
||||
if (empty($action)) {
|
||||
$action = filter_input(INPUT_GET, 'sub_action', FILTER_SANITIZE_STRING);
|
||||
}
|
||||
|
||||
$answer = $this->_dispatch($action);
|
||||
|
||||
$json_answer = json_encode($answer);
|
||||
echo $json_answer;
|
||||
die;
|
||||
}
|
||||
|
||||
}
|
||||
// end of URE_Ajax_Processor
|
||||
@@ -0,0 +1,224 @@
|
||||
<?php
|
||||
/*
|
||||
* General stuff for usage at WordPress plugins
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: vladimir@shinephp.com
|
||||
* Author URI: http://shinephp.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This class contains general stuff for usage at WordPress plugins
|
||||
*/
|
||||
class Garvs_WP_Lib {
|
||||
|
||||
private static $instance = null; // object exemplar reference
|
||||
protected $options_id = ''; // identifire to save/retrieve plugin options to/from wp_option DB table
|
||||
protected $options = array(); // plugin options data
|
||||
public $multisite = false;
|
||||
public $blog_ids = null;
|
||||
protected $main_blog_id = 0;
|
||||
public $log_to_file = false; // set to true in order to record data about critical actions to log file
|
||||
private $log_file_name = ''; // file name to write log messages
|
||||
|
||||
/**
|
||||
* class constructor
|
||||
* @param string $option_name identifire to save/retrieve plugin options to/from wp_option DB table
|
||||
*/
|
||||
public function __construct($options_id) {
|
||||
|
||||
$this->multisite = function_exists('is_multisite') && is_multisite();
|
||||
if ($this->multisite) {
|
||||
$this->blog_ids = $this->get_blog_ids();
|
||||
// get Id of 1st (main) blog
|
||||
$this->main_blog_id = $this->blog_ids[0][0];
|
||||
}
|
||||
|
||||
$this->init_options($options_id);
|
||||
|
||||
add_action('admin_notices', array(&$this, 'show_message'));
|
||||
}
|
||||
// end of __construct()
|
||||
|
||||
|
||||
/**
|
||||
* Returns the array of multisite WP blogs IDs
|
||||
* @global wpdb $wpdb
|
||||
* @return array
|
||||
*/
|
||||
protected function get_blog_ids() {
|
||||
global $wpdb;
|
||||
|
||||
$blog_ids = $wpdb->get_col("select blog_id from $wpdb->blogs order by blog_id asc");
|
||||
|
||||
return $blog_ids;
|
||||
}
|
||||
// end of get_blog_ids()
|
||||
|
||||
|
||||
/**
|
||||
* get current options for this plugin
|
||||
*/
|
||||
protected function init_options($options_id) {
|
||||
$this->options_id = $options_id;
|
||||
$this->options = get_option($options_id);
|
||||
}
|
||||
// end of init_options()
|
||||
|
||||
/**
|
||||
* Return HTML formatted message
|
||||
*
|
||||
* @param string $message message text
|
||||
* @param string $error_style message div CSS style
|
||||
*/
|
||||
public function show_message($message, $error_style=false) {
|
||||
|
||||
if ($message) {
|
||||
if ($error_style) {
|
||||
echo '<div id="message" class="error" >';
|
||||
} else {
|
||||
echo '<div id="message" class="updated fade">';
|
||||
}
|
||||
echo $message . '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
// end of show_message()
|
||||
|
||||
|
||||
/**
|
||||
* Returns value by name from GET/POST/REQUEST. Minimal type checking is provided
|
||||
*
|
||||
* @param string $var_name Variable name to return
|
||||
* @param string $request_type type of request to process get/post/request (default)
|
||||
* @param string $var_type variable type to provide value checking
|
||||
* @return mix variable value from request
|
||||
*/
|
||||
public function get_request_var($var_name, $request_type='request', $var_type='string') {
|
||||
|
||||
$result = 0;
|
||||
if ($request_type == 'get') {
|
||||
if (isset($_GET[$var_name])) {
|
||||
$result = $_GET[$var_name];
|
||||
}
|
||||
} else if ($request_type == 'post') {
|
||||
if (isset($_POST[$var_name])) {
|
||||
if ($var_type!='checkbox') {
|
||||
$result = $_POST[$var_name];
|
||||
} else {
|
||||
$result = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isset($_REQUEST[$var_name])) {
|
||||
$result = $_REQUEST[$var_name];
|
||||
}
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
if ($var_type == 'int' && !is_numeric($result)) {
|
||||
$result = 0;
|
||||
}
|
||||
if ($var_type!='int') {
|
||||
$result = esc_attr($result);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
// end of get_request_var()
|
||||
|
||||
|
||||
/**
|
||||
* returns option value for option with name in $option_name
|
||||
*/
|
||||
public function get_option($option_name, $default = false) {
|
||||
|
||||
if ( isset( $this->options[ $option_name ] ) ) {
|
||||
return $this->options[$option_name];
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
|
||||
}
|
||||
// end of get_option()
|
||||
|
||||
|
||||
/**
|
||||
* puts option value according to $option_name option name into options array property
|
||||
*/
|
||||
public function put_option($option_name, $option_value, $flush_options=false) {
|
||||
|
||||
$this->options[$option_name] = $option_value;
|
||||
if ($flush_options) {
|
||||
$this->flush_options();
|
||||
}
|
||||
|
||||
}
|
||||
// end of put_option()
|
||||
|
||||
|
||||
/**
|
||||
* saves options array into WordPress database wp_options table
|
||||
*/
|
||||
public function flush_options() {
|
||||
|
||||
update_option($this->options_id, $this->options);
|
||||
|
||||
}
|
||||
// end of flush_options()
|
||||
|
||||
|
||||
/**
|
||||
* Check product versrion and stop execution if product version is not compatible
|
||||
* @param type $must_have_version
|
||||
* @param type $version_to_check
|
||||
* @param type $error_message
|
||||
* @return type
|
||||
*/
|
||||
public static function check_version($must_have_version, $version_to_check, $error_message, $plugin_file_name) {
|
||||
|
||||
if (version_compare( $must_have_version, $version_to_check, '<' ) ) {
|
||||
if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
|
||||
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
||||
deactivate_plugins( $plugin_file_name );
|
||||
wp_die( $error_message );
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// end of check_version()
|
||||
|
||||
|
||||
/**
|
||||
* returns 'selected' HTML cluster if $value matches to $etalon
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $etalon
|
||||
* @return string
|
||||
*/
|
||||
public function option_selected($value, $etalon) {
|
||||
$selected = '';
|
||||
if (strcasecmp($value, $etalon) == 0) {
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
|
||||
return $selected;
|
||||
}
|
||||
// end of option_selected()
|
||||
|
||||
|
||||
public function get_current_url() {
|
||||
global $wp;
|
||||
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
|
||||
|
||||
return $current_url;
|
||||
}
|
||||
// end of get_current_url()
|
||||
|
||||
|
||||
//
|
||||
}
|
||||
// end of Garvs_WP_Lib class
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* User Role Editor On Screen Help class
|
||||
*
|
||||
*/
|
||||
|
||||
class URE_Screen_Help {
|
||||
|
||||
protected function get_settings_overview_tab_help() {
|
||||
|
||||
$text = '<h2>User Role Editor Options page help</h2>
|
||||
<p>
|
||||
<ul>
|
||||
<li><strong>' . esc_html__('Show Administrator role at User Role Editor', 'ure').'</strong> - ' .
|
||||
esc_html__('turn this option on in order to make the "Administrator" role available at the User Role Editor '
|
||||
. 'roles selection drop-down list. It is hidden by default for security reasons.','ure') . '</li>
|
||||
<li><strong>' . esc_html__('Show capabilities in the human readable form','ure').'</strong> - ' .
|
||||
esc_html__('automatically converts capability names from the technical form for internal use like '
|
||||
. '"edit_others_posts" to more user friendly form, e.g. "Edit others posts".','ure') . '</li>
|
||||
<li><strong>' . esc_html__('Show deprecated capabilities','ure').'</strong> - '.
|
||||
esc_html__('Capabilities like "level_0", "level_1" are deprecated and are not used by WordPress. '
|
||||
. 'They are left at the user roles for the compatibility purpose with the old themes and plugins code. '
|
||||
. 'Turning on this option will show those deprecated capabilities.', 'ure') . '</li>';
|
||||
if (is_multisite()) {
|
||||
$text .='
|
||||
<li><strong>' . esc_html__('Allow create, edit and delete users to not super-admininstrators', 'ure').'</strong> - ' .
|
||||
esc_html__('Super administrator only may create, edit and delete users under WordPress multi-site. '
|
||||
. 'Turn this option on in order to remove this limitation.','ure') . '</li>';
|
||||
}
|
||||
$text = apply_filters('ure_get_settings_overview_tab_help', $text);
|
||||
$text .='
|
||||
</ul>
|
||||
</p>';
|
||||
|
||||
return $text;
|
||||
}
|
||||
// end of get_settings_overview_tab_help()
|
||||
|
||||
|
||||
public function get_settings_help($tab_name) {
|
||||
switch ($tab_name) {
|
||||
case 'overview':{
|
||||
$text = $this->get_settings_overview_tab_help();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
// end of get_settings_help()
|
||||
|
||||
|
||||
}
|
||||
// end of URE_Screen_Help
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Constant definitions for use in User Role Editor WordPress plugin
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: vladimir@shinephp.com
|
||||
* Author URI: http://shinephp.com
|
||||
*
|
||||
*/
|
||||
|
||||
define('URE_WP_ADMIN_URL', admin_url());
|
||||
define('URE_ERROR', 'Error is encountered');
|
||||
define('URE_SPACE_REPLACER', '_URE-SR_');
|
||||
define('URE_PARENT', is_network_admin() ? 'network/users.php':'users.php');
|
||||
define('URE_KEY_CAPABILITY', 'administrator');
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Miscellaneous support stuff, which should still be defined beyond of classes
|
||||
*
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: vladimir@shinephp.com
|
||||
* Author URI: http://shinephp.com
|
||||
* License: GPL v3
|
||||
*
|
||||
*/
|
||||
|
||||
if (class_exists('GFForms') ) { // if Gravity Forms is installed
|
||||
// Support for Gravity Forms capabilities
|
||||
// As Gravity Form has integrated support for the Members plugin - let's imitate its presense,
|
||||
// so GF code, like
|
||||
// self::has_members_plugin())
|
||||
// considers that it is has_members_plugin()
|
||||
if (!function_exists('members_get_capabilities')) {
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
if (!is_plugin_active('members/members.php')) {
|
||||
// define stub function to say "Gravity Forms" plugin: 'Hey! While I'm not the "Members" plugin, but I'm "User Role Editor" and
|
||||
// I'm capable to manage your roles and capabilities too
|
||||
function members_get_capabilities() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/*
|
||||
* User Role Editor WordPress plugin options page
|
||||
*
|
||||
* @Author: Vladimir Garagulya
|
||||
* @URL: http://role-editor.com
|
||||
* @package UserRoleEditor
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<a href="http://role-editor.com">
|
||||
<div id="ure-icon" class="icon32"><br></div>
|
||||
</a>
|
||||
<h2><?php esc_html_e('User Role Editor - Options', 'ure'); ?></h2>
|
||||
|
||||
<div id="ure_tabs" style="clear: left;">
|
||||
<ul>
|
||||
<li><a href="#ure_tabs-1"><?php esc_html_e('General', 'ure');?></a></li>
|
||||
<li><a href="#ure_tabs-2"><?php esc_html_e('Additional Modules', 'ure');?></a></li>
|
||||
<li><a href="#ure_tabs-3"><?php esc_html_e('Default Roles', 'ure');?></a></li>
|
||||
<?php
|
||||
if ($this->lib->multisite) {
|
||||
?>
|
||||
<li><a href="#ure_tabs-4"><?php esc_html_e('Multisite', 'ure');?></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<li><a href="#ure_tabs-5"><?php esc_html_e('About', 'ure');?></a></li>
|
||||
</ul>
|
||||
<div id="ure_tabs-1">
|
||||
<div id="ure-settings-form">
|
||||
<form method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
||||
<table id="ure_settings">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="show_admin_role" id="show_admin_role" value="1"
|
||||
<?php echo ($show_admin_role == 1) ? 'checked="checked"' : ''; ?>
|
||||
<?php echo defined('URE_SHOW_ADMIN_ROLE') ? 'disabled="disabled" title="Predefined by \'URE_SHOW_ADMIN_ROLE\' constant at wp-config.php"' : ''; ?> />
|
||||
<label for="show_admin_role"><?php esc_html_e('Show Administrator role at User Role Editor', 'ure'); ?></label></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="caps_readable" id="caps_readable" value="1"
|
||||
<?php echo ($caps_readable == 1) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="caps_readable"><?php esc_html_e('Show capabilities in the human readable form', 'ure'); ?></label></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="show_deprecated_caps" id="show_deprecated_caps" value="1"
|
||||
<?php echo ($show_deprecated_caps == 1) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="show_deprecated_caps"><?php esc_html_e('Show deprecated capabilities', 'ure'); ?></label></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
do_action('ure_settings_show1');
|
||||
?>
|
||||
</table>
|
||||
<?php wp_nonce_field('user-role-editor'); ?>
|
||||
<input type="hidden" name="ure_tab_idx" value="0" />
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" name="ure_settings_update" value="<?php _e('Save', 'ure') ?>" />
|
||||
</p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- ure_tabs-1 -->
|
||||
|
||||
<div id="ure_tabs-2">
|
||||
<form name="ure_additional_modules" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
||||
<table id="ure_addons">
|
||||
<?php
|
||||
if (!$this->lib->multisite) {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="count_users_without_role" id="count_users_without_role" value="1"
|
||||
<?php echo ($count_users_without_role == 1) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="count_users_without_role"><?php esc_html_e('Count users without role', 'ure'); ?></label></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
do_action('ure_settings_show2');
|
||||
?>
|
||||
</table>
|
||||
<?php wp_nonce_field('user-role-editor'); ?>
|
||||
<input type="hidden" name="ure_tab_idx" value="1" />
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" name="ure_addons_settings_update" value="<?php _e('Save', 'ure') ?>" />
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ure_tabs-3">
|
||||
<form name="ure_default_roles" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
||||
<?php
|
||||
if (!$this->lib->multisite) {
|
||||
esc_html_e('Primary default role: ', 'ure');
|
||||
echo $this->lib->role_default_html;
|
||||
?>
|
||||
<hr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php esc_html_e('Other default roles for new registered user: ', 'ure'); ?>
|
||||
<div id="other_default_roles">
|
||||
<?php $this->lib->show_other_default_roles(); ?>
|
||||
</div>
|
||||
<?php
|
||||
if ($this->lib->multisite) {
|
||||
echo '<p>'. esc_html__('Note for multisite environment: take into account that other default roles should exist at the site, in order to be assigned to the new registered users.', 'ure') .'</p>';
|
||||
}
|
||||
?>
|
||||
<hr>
|
||||
<?php wp_nonce_field('user-role-editor'); ?>
|
||||
<input type="hidden" name="ure_tab_idx" value="2" />
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" name="ure_default_roles_update" value="<?php _e('Save', 'ure') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div> <!-- ure_tabs-3 -->
|
||||
|
||||
<?php
|
||||
if ($this->lib->multisite) {
|
||||
?>
|
||||
<div id="ure_tabs-4">
|
||||
<div id="ure-settings-form-ms">
|
||||
<form name="ure_settings_ms" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
||||
<table id="ure_settings_ms">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="allow_edit_users_to_not_super_admin" id="allow_edit_users_to_not_super_admin" value="1"
|
||||
<?php echo ($allow_edit_users_to_not_super_admin == 1) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="allow_edit_users_to_not_super_admin"><?php esc_html_e('Allow non super administrators to create, edit, and delete users', 'ure'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
do_action('ure_settings_ms_show');
|
||||
?>
|
||||
</table>
|
||||
<?php wp_nonce_field('user-role-editor'); ?>
|
||||
<input type="hidden" name="ure_tab_idx" value="3" />
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" name="ure_settings_ms_update" value="<?php _e('Save', 'ure') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div> <!-- ure-settings-form-ms -->
|
||||
</div> <!-- ure_tabs-4 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div id="ure_tabs-5">
|
||||
<?php $this->lib->about(); ?>
|
||||
</div> <!-- ure_tabs-5 -->
|
||||
</div> <!-- ure_tabs -->
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function() {
|
||||
jQuery('#ure_tabs').tabs();
|
||||
<?php
|
||||
if ($ure_tab_idx>0) {
|
||||
?>
|
||||
jQuery("#ure_tabs").tabs("option", "active", <?php echo $ure_tab_idx; ?>);
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* User Role Editor plugin: role editor page
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('URE_PLUGIN_URL')) {
|
||||
die; // Silence is golden, direct call is prohibited
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="has-sidebar-content">
|
||||
<div class="postbox" style="float: left; min-width:850px;">
|
||||
<h3><?php esc_html_e('Select Role and change its capabilities:', 'ure'); ?> <?php echo $this->role_select_html; ?></h3>
|
||||
<div class="inside">
|
||||
<?php
|
||||
if ($this->caps_readable) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
$caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0);
|
||||
if (is_super_admin() || !$this->multisite || !class_exists('User_Role_Editor_Pro') || !$caps_access_restrict_for_simple_admin) {
|
||||
?>
|
||||
<input type="checkbox" name="ure_caps_readable" id="ure_caps_readable" value="1"
|
||||
<?php echo $checked; ?> onclick="ure_turn_caps_readable(0);"/>
|
||||
<label for="ure_caps_readable"><?php esc_html_e('Show capabilities in human readable form', 'ure'); ?></label>
|
||||
<?php
|
||||
if ($this->show_deprecated_caps) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="ure_show_deprecated_caps" id="ure_show_deprecated_caps" value="1"
|
||||
<?php echo $checked; ?> onclick="ure_turn_deprecated_caps(0);"/>
|
||||
<label for="ure_show_deprecated_caps"><?php esc_html_e('Show deprecated capabilities', 'ure'); ?></label>
|
||||
<?php
|
||||
}
|
||||
if (is_multisite() && !is_network_admin() && is_main_site( get_current_blog_id() ) && is_super_admin()) {
|
||||
$hint = esc_html__('If checked, then apply action to ALL sites of this Network');
|
||||
if ($this->apply_to_all) {
|
||||
$checked = 'checked="checked"';
|
||||
$fontColor = 'color:#FF0000;';
|
||||
} else {
|
||||
$checked = '';
|
||||
$fontColor = '';
|
||||
}
|
||||
?>
|
||||
<div style="float: right; margin-left:10px; margin-right: 20px; <?php echo $fontColor;?>" id="ure_apply_to_all_div">
|
||||
<input type="checkbox" name="ure_apply_to_all" id="ure_apply_to_all" value="1"
|
||||
<?php echo $checked; ?> title="<?php echo $hint;?>" onclick="ure_applyToAllOnClick(this)"/>
|
||||
<label for="ure_apply_to_all" title="<?php echo $hint;?>"><?php esc_html_e('Apply to All Sites', 'ure');?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br /><br />
|
||||
<hr />
|
||||
<?php esc_html_e('Core capabilities:', 'ure'); ?>
|
||||
<div style="display:table-inline; float: right; margin-right: 12px;">
|
||||
<?php esc_html_e('Quick filter:', 'ure'); ?>
|
||||
<input type="text" id="quick_filter" name="quick_filter" value="" size="20" onkeyup="ure_filter_capabilities(this.value);" />
|
||||
</div>
|
||||
|
||||
<table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<?php $this->show_capabilities( true, true ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php $this->toolbar(!empty($this->role_delete_html), !empty($this->capability_remove_html));?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$quant = count( $this->full_capabilities ) - count( $this->get_built_in_wp_caps() );
|
||||
if ($quant>0) {
|
||||
echo '<hr />';
|
||||
esc_html_e('Custom capabilities:', 'ure');
|
||||
?>
|
||||
<table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<?php $this->show_capabilities( false, true ); ?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} // if ($quant>0)
|
||||
?>
|
||||
|
||||
<input type="hidden" name="object" value="role" />
|
||||
<?php
|
||||
$this->display_box_end();
|
||||
?>
|
||||
<div style="clear: left; float: left; width: 800px;"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* User Role Editor plugin: user capabilities editor page
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('URE_PLUGIN_URL')) {
|
||||
die; // Silence is golden, direct call is prohibited
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="has-sidebar-content">
|
||||
<?php
|
||||
if (!is_multisite() || current_user_can('manage_network_users')) {
|
||||
$anchor_start = '<a href="' . wp_nonce_url("user-edit.php?user_id={$this->user_to_edit->ID}",
|
||||
"ure_user_{$this->user_to_edit->ID}") .'" >';
|
||||
$anchor_end = '</a>';
|
||||
} else {
|
||||
$anchor_start = '';
|
||||
$anchor_end = '';
|
||||
}
|
||||
$user_info = ' <span style="font-weight: bold;">'.$anchor_start. $this->user_to_edit->user_login;
|
||||
if ($this->user_to_edit->display_name!==$this->user_to_edit->user_login) {
|
||||
$user_info .= ' ('.$this->user_to_edit->display_name.')';
|
||||
}
|
||||
$user_info .= $anchor_end.'</span>';
|
||||
if (is_multisite() && is_super_admin($this->user_to_edit->ID)) {
|
||||
$user_info .= ' <span style="font-weight: bold; color:red;">'. esc_html__('Network Super Admin', 'ure') .'</span>';
|
||||
}
|
||||
|
||||
$this->display_box_start(esc_html__('Change capabilities for user', 'ure').$user_info, 'min-width:1100px;');
|
||||
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" style="width: 100%;">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="padding-left: 10px; padding-bottom: 5px;">
|
||||
<?php
|
||||
$caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0);
|
||||
if (is_super_admin() || !$this->multisite || !class_exists('User_Role_Editor_Pro') || !$caps_access_restrict_for_simple_admin) {
|
||||
if ($this->caps_readable) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="checkbox" name="ure_caps_readable" id="ure_caps_readable" value="1"
|
||||
<?php echo $checked; ?> onclick="ure_turn_caps_readable(<?php echo $this->user_to_edit->ID; ?>);" />
|
||||
<label for="ure_caps_readable"><?php esc_html_e('Show capabilities in human readable form', 'ure'); ?></label>
|
||||
<?php
|
||||
if ($this->show_deprecated_caps) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="ure_show_deprecated_caps" id="ure_show_deprecated_caps" value="1"
|
||||
<?php echo $checked; ?> onclick="ure_turn_deprecated_caps(<?php echo $this->user_to_edit->ID; ?>);"/>
|
||||
<label for="ure_show_deprecated_caps"><?php esc_html_e('Show deprecated capabilities', 'ure'); ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ure-user-roles">
|
||||
<div style="margin-bottom: 5px; font-weight: bold;"><?php esc_html_e('Primary Role:', 'ure'); ?></div>
|
||||
<?php
|
||||
$show_admin_role = $this->show_admin_role_allowed();
|
||||
// output primary role selection dropdown list
|
||||
$this->user_primary_role_dropdown_list($this->user_to_edit->roles);
|
||||
|
||||
$values = array_values($this->user_to_edit->roles);
|
||||
$primary_role = array_shift($values); // get 1st element from roles array
|
||||
if (function_exists('bbp_filter_blog_editable_roles') ) { // bbPress plugin is active
|
||||
?>
|
||||
<div style="margin-top: 5px;margin-bottom: 5px; font-weight: bold;"><?php esc_html_e('bbPress Role:', 'ure'); ?></div>
|
||||
<?php
|
||||
// Get the roles
|
||||
$dynamic_roles = bbp_get_dynamic_roles();
|
||||
$bbp_user_role = bbp_get_user_role($this->user_to_edit->ID);
|
||||
if (!empty($bbp_user_role)) {
|
||||
echo $dynamic_roles[$bbp_user_role]['name'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div style="margin-top: 5px;margin-bottom: 5px; font-weight: bold;"><?php esc_html_e('Other Roles:', 'ure'); ?></div>
|
||||
<?php
|
||||
|
||||
foreach ($this->roles as $role_id => $role) {
|
||||
if ( ($show_admin_role || $role_id!='administrator') && ($role_id!==$primary_role) ) {
|
||||
if ( $this->user_can( $role_id ) ) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
echo '<label for="wp_role_' . $role_id .'"><input type="checkbox" id="wp_role_' . $role_id .
|
||||
'" name="wp_role_' . $role_id . '" value="' . $role_id . '"' . $checked .' /> ' .
|
||||
esc_html__($role['name'], 'ure') . '</label><br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td style="padding-left: 5px; padding-top: 5px; border-top: 1px solid #ccc;">
|
||||
<span style="font-weight: bold;"><?php esc_html_e('Core capabilities:', 'ure'); ?></span>
|
||||
<div style="display:table-inline; float: right; margin-right: 12px;">
|
||||
<?php esc_html_e('Quick filter:', 'ure'); ?>
|
||||
<input type="text" id="quick_filter" name="quick_filter" value="" size="20" onkeyup="ure_filter_capabilities(this.value);" />
|
||||
</div>
|
||||
|
||||
<table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<?php $this->show_capabilities( true, false ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php $this->toolbar();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$quant = count( $this->full_capabilities ) - count( $this->get_built_in_wp_caps() );
|
||||
if ($quant>0) {
|
||||
echo '<hr />';
|
||||
?>
|
||||
<span style="font-weight: bold;"><?php esc_html_e('Custom capabilities:', 'ure'); ?></span>
|
||||
<table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<?php $this->show_capabilities( false, false ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} // if ($quant>0)
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="object" value="user" />
|
||||
<input type="hidden" name="user_id" value="<?php echo $this->user_to_edit->ID; ?>" />
|
||||
<?php
|
||||
$this->display_box_end();
|
||||
?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,394 @@
|
||||
// get/post via jQuery
|
||||
(function($) {
|
||||
$.extend({
|
||||
ure_getGo: function(url, params) {
|
||||
document.location = url + '?' + $.param(params);
|
||||
},
|
||||
ure_postGo: function(url, params) {
|
||||
var $form = $("<form>")
|
||||
.attr("method", "post")
|
||||
.attr("action", url);
|
||||
$.each(params, function(name, value) {
|
||||
$("<input type='hidden'>")
|
||||
.attr("name", name)
|
||||
.attr("value", value)
|
||||
.appendTo($form);
|
||||
});
|
||||
$form.appendTo("body");
|
||||
$form.submit();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
||||
jQuery(function() {
|
||||
jQuery("#ure_select_all").button({
|
||||
label: ure_data.select_all
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
ure_select_all(1);
|
||||
});
|
||||
|
||||
if (typeof ure_current_role === 'undefined' || 'administrator' !== ure_current_role ) {
|
||||
jQuery("#ure_unselect_all").button({
|
||||
label: ure_data.unselect_all
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
ure_select_all(0);
|
||||
});
|
||||
|
||||
jQuery("#ure_reverse_selection").button({
|
||||
label: ure_data.reverse
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
ure_select_all(-1);
|
||||
});
|
||||
}
|
||||
|
||||
jQuery("#ure_update_role").button({
|
||||
label: ure_data.update
|
||||
}).click(function(){
|
||||
if (!confirm(ure_data.confirm_submit)) {
|
||||
return false;
|
||||
}
|
||||
jQuery('#ure_form').submit();
|
||||
});
|
||||
|
||||
|
||||
function ui_button_text(caption) {
|
||||
var wrapper = '<span class="ui-button-text">'+ caption +'</span>';
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
||||
jQuery("#ure_add_role").button({
|
||||
label: ure_data.add_role
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
jQuery(function($) {
|
||||
$info = $('#ure_add_role_dialog');
|
||||
$info.dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 400,
|
||||
height: 230,
|
||||
resizable: false,
|
||||
title: ure_data.add_new_role_title,
|
||||
'buttons' : {
|
||||
'Add Role': function () {
|
||||
var role_id = $('#user_role_id').val();
|
||||
if (role_id == '') {
|
||||
alert( ure_data.role_name_required );
|
||||
return false;
|
||||
}
|
||||
if (!(/^[\w-]*$/.test(role_id))) {
|
||||
alert( ure_data.role_name_valid_chars );
|
||||
return false;
|
||||
}
|
||||
if ((/^[0-9]*$/.test(role_id))) {
|
||||
alert( ure_data.numeric_role_name_prohibited );
|
||||
return false;
|
||||
}
|
||||
var role_name = $('#user_role_name').val();
|
||||
var role_copy_from = $('#user_role_copy_from').val();
|
||||
|
||||
$(this).dialog('close');
|
||||
$.ure_postGo( ure_data.page_url,
|
||||
{ action: 'add-new-role', user_role_id: role_id, user_role_name: role_name, user_role_copy_from: role_copy_from,
|
||||
ure_nonce: ure_data.wp_nonce} );
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog('close');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.ui-dialog-buttonpane button:contains("Add Role")').attr("id", "dialog-add-role-button");
|
||||
$('#dialog-add-role-button').html(ui_button_text(ure_data.add_role));
|
||||
$('.ui-dialog-buttonpane button:contains("Cancel")').attr("id", "add-role-dialog-cancel-button");
|
||||
$('#add-role-dialog-cancel-button').html(ui_button_text(ure_data.cancel));
|
||||
});
|
||||
});
|
||||
|
||||
jQuery("#ure_delete_role").button({
|
||||
label: ure_data.delete_role
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
jQuery(function($) {
|
||||
$('#ure_delete_role_dialog').dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 320,
|
||||
height: 190,
|
||||
resizable: false,
|
||||
title: ure_data.delete_role,
|
||||
buttons: {
|
||||
'Delete Role': function() {
|
||||
var user_role_id = $('#del_user_role').val();
|
||||
if (!confirm(ure_data.delete_role)) {
|
||||
return false;
|
||||
}
|
||||
$(this).dialog('close');
|
||||
$.ure_postGo(ure_data.page_url,
|
||||
{action: 'delete-role', user_role_id: user_role_id, ure_nonce: ure_data.wp_nonce});
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
// translate buttons caption
|
||||
$('.ui-dialog-buttonpane button:contains("Delete Role")').attr("id", "dialog-delete-button");
|
||||
$('#dialog-delete-button').html(ui_button_text(ure_data.delete_role));
|
||||
$('.ui-dialog-buttonpane button:contains("Cancel")').attr("id", "delete-role-dialog-cancel-button");
|
||||
$('#delete-role-dialog-cancel-button').html(ui_button_text(ure_data.cancel));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
jQuery("#ure_add_capability").button({
|
||||
label: ure_data.add_capability
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
jQuery(function($) {
|
||||
$info = $('#ure_add_capability_dialog');
|
||||
$info.dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 350,
|
||||
height: 190,
|
||||
resizable: false,
|
||||
title: ure_data.add_capability,
|
||||
'buttons' : {
|
||||
'Add Capability': function () {
|
||||
var capability_id = $('#capability_id').val();
|
||||
if (capability_id == '') {
|
||||
alert( ure_data.capability_name_required );
|
||||
return false;
|
||||
}
|
||||
if (!(/^[\w-]*$/.test(capability_id))) {
|
||||
alert( ure_data.capability_name_valid_chars );
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).dialog('close');
|
||||
$.ure_postGo( ure_data.page_url,
|
||||
{ action: 'add-new-capability', capability_id: capability_id, ure_nonce: ure_data.wp_nonce} );
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.ui-dialog-buttonpane button:contains("Add Capability")').attr("id", "dialog-add-capability-button");
|
||||
$('#dialog-add-capability-button').html(ui_button_text(ure_data.add_capability));
|
||||
$('.ui-dialog-buttonpane button:contains("Cancel")').attr("id", "add-capability-dialog-cancel-button");
|
||||
$('#add-capability-dialog-cancel-button').html(ui_button_text(ure_data.cancel));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
jQuery("#ure_delete_capability").button({
|
||||
label: ure_data.delete_capability
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
jQuery(function($) {
|
||||
$('#ure_delete_capability_dialog').dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 320,
|
||||
height: 190,
|
||||
resizable: false,
|
||||
title: ure_data.delete_capability,
|
||||
buttons: {
|
||||
'Delete Capability': function() {
|
||||
if (!confirm(ure_data.delete_capability +' - '+ ure_data.delete_capability_warning)) {
|
||||
return;
|
||||
}
|
||||
$(this).dialog('close');
|
||||
var user_capability_id = $('#remove_user_capability').val();
|
||||
$.ure_postGo(ure_data.page_url,
|
||||
{action: 'delete-user-capability', user_capability_id: user_capability_id, ure_nonce: ure_data.wp_nonce});
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
// translate buttons caption
|
||||
$('.ui-dialog-buttonpane button:contains("Delete Capability")').attr("id", "dialog-delete-capability-button");
|
||||
$('#dialog-delete-capability-button').html(ui_button_text(ure_data.delete_capability));
|
||||
$('.ui-dialog-buttonpane button:contains("Cancel")').attr("id", "delete-capability-dialog-cancel-button");
|
||||
$('#delete-capability-dialog-cancel-button').html(ui_button_text(ure_data.cancel));
|
||||
});
|
||||
});
|
||||
|
||||
jQuery("#ure_default_role").button({
|
||||
label: ure_data.default_role
|
||||
}).click(function(event){
|
||||
event.preventDefault();
|
||||
jQuery(function($) {
|
||||
$('#ure_default_role_dialog').dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 320,
|
||||
height: 190,
|
||||
resizable: false,
|
||||
title: ure_data.default_role,
|
||||
buttons: {
|
||||
'Set New Default Role': function() {
|
||||
$(this).dialog('close');
|
||||
var user_role_id = $('#default_user_role').val();
|
||||
$.ure_postGo(ure_data.page_url,
|
||||
{action: 'change-default-role', user_role_id: user_role_id, ure_nonce: ure_data.wp_nonce});
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
// translate buttons caption
|
||||
$('.ui-dialog-buttonpane button:contains("Set New Default Role")').attr("id", "dialog-default-role-button");
|
||||
$('#dialog-default-role-button').html(ui_button_text(ure_data.set_new_default_role));
|
||||
$('.ui-dialog-buttonpane button:contains("Cancel")').attr("id", "default-role-dialog-cancel-button");
|
||||
$('#default-role-dialog-cancel-button').html(ui_button_text(ure_data.cancel));
|
||||
});
|
||||
});
|
||||
|
||||
jQuery("#ure_reset_roles").button({
|
||||
label: ure_data.reset
|
||||
}).click(function(){
|
||||
event.preventDefault();
|
||||
if (!confirm( ure_data.reset_warning )) {
|
||||
return false;
|
||||
}
|
||||
jQuery.ure_postGo(ure_data.page_url, {action: 'reset', ure_nonce: ure_data.wp_nonce});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// change color of apply to all check box - for multi-site setup only
|
||||
function ure_applyToAllOnClick(cb) {
|
||||
el = document.getElementById('ure_apply_to_all_div');
|
||||
if (cb.checked) {
|
||||
el.style.color = '#FF0000';
|
||||
} else {
|
||||
el.style.color = '#000000';
|
||||
}
|
||||
}
|
||||
// end of ure_applyToAllOnClick()
|
||||
|
||||
|
||||
// turn on checkbox back if clicked to turn off
|
||||
function turn_it_back(control) {
|
||||
|
||||
control.checked = true;
|
||||
|
||||
}
|
||||
// end of turn_it_back()
|
||||
|
||||
|
||||
/**
|
||||
* Manipulate mass capability checkboxes selection
|
||||
* @param {bool} selected
|
||||
* @returns {none}
|
||||
*/
|
||||
function ure_select_all(selected) {
|
||||
|
||||
var qfilter = jQuery('#quick_filter').val();
|
||||
var form = document.getElementById('ure_form');
|
||||
for (i = 0; i < form.elements.length; i++) {
|
||||
el = form.elements[i];
|
||||
if (el.type !== 'checkbox') {
|
||||
continue;
|
||||
}
|
||||
if (el.name === 'ure_caps_readable' || el.name === 'ure_show_deprecated_caps' ||
|
||||
el.name === 'ure_apply_to_all' || el.disabled ||
|
||||
el.name.substr(0, 8) === 'wp_role_') {
|
||||
continue;
|
||||
}
|
||||
if (qfilter!=='' && !form.elements[i].parentNode.ure_tag) {
|
||||
continue;
|
||||
}
|
||||
if (selected >= 0) {
|
||||
form.elements[i].checked = selected;
|
||||
} else {
|
||||
form.elements[i].checked = !form.elements[i].checked;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// end of ure_select_all()
|
||||
|
||||
|
||||
function ure_turn_caps_readable(user_id) {
|
||||
|
||||
if (user_id === 0) {
|
||||
var ure_object = 'role';
|
||||
} else {
|
||||
var ure_object = 'user';
|
||||
}
|
||||
|
||||
jQuery.ure_postGo(ure_data.page_url, {action: 'caps-readable', object: ure_object, user_id: user_id, ure_nonce: ure_data.wp_nonce});
|
||||
|
||||
}
|
||||
// end of ure_turn_caps_readable()
|
||||
|
||||
|
||||
function ure_turn_deprecated_caps(user_id) {
|
||||
|
||||
var ure_object = '';
|
||||
if (user_id === 0) {
|
||||
ure_object = 'role';
|
||||
} else {
|
||||
ure_object = 'user';
|
||||
}
|
||||
jQuery.ure_postGo(ure_data.page_url, {action: 'show-deprecated-caps', object: ure_object, user_id: user_id, ure_nonce: ure_data.wp_nonce});
|
||||
|
||||
}
|
||||
// ure_turn_deprecated_caps()
|
||||
|
||||
|
||||
function ure_role_change(role_name) {
|
||||
|
||||
jQuery.ure_postGo(ure_data.page_url, {action: 'role-change', object: 'role', user_role: role_name, ure_nonce: ure_data.wp_nonce});
|
||||
|
||||
}
|
||||
// end of ure_role_change()
|
||||
|
||||
|
||||
function ure_filter_capabilities(cap_id) {
|
||||
var div_list = jQuery("div[id^='ure_div_cap_']");
|
||||
for (i=0; i<div_list.length; i++) {
|
||||
if (cap_id!=='' && div_list[i].id.substr(11).indexOf(cap_id)!==-1) {
|
||||
div_list[i].ure_tag = true;
|
||||
div_list[i].style.color = '#27CF27';
|
||||
} else {
|
||||
div_list[i].style.color = '#000000';
|
||||
div_list[i].ure_tag = false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
// end of ure_filter_capabilities()
|
||||
|
||||
|
||||
function ure_hide_pro_banner() {
|
||||
|
||||
jQuery.ure_postGo(ure_data.page_url, {action: 'hide-pro-banner', ure_nonce: ure_data.wp_nonce});
|
||||
|
||||
}
|
||||
// end of ure_hide_this_banner()
|
||||
@@ -0,0 +1,95 @@
|
||||
/* User Role Editor for users.php */
|
||||
|
||||
function ure_move_users_from_no_role_dialog() {
|
||||
jQuery('#move_from_no_role_dialog').dialog({
|
||||
dialogClass: 'wp-dialog',
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
closeOnEscape: true,
|
||||
width: 400,
|
||||
height: 200,
|
||||
resizable: false,
|
||||
title: ure_users_data.move_from_no_role_title,
|
||||
'buttons' : {
|
||||
'OK': function () {
|
||||
ure_move_users_from_no_role();
|
||||
|
||||
},
|
||||
Cancel: function() {
|
||||
jQuery(this).dialog('close');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var options = jQuery("#new_role > option").clone();
|
||||
jQuery('#ure_new_role').empty().append(options);
|
||||
if (jQuery('#ure_new_role option[value="no_rights"]').length===0) {
|
||||
jQuery('#ure_new_role').append('<option value="no_rights">'+ ure_users_data.no_rights_caption +'</option>');
|
||||
}
|
||||
|
||||
// Exclude change role to
|
||||
jQuery('#selectBox option[value=""]').remove();
|
||||
var new_role = jQuery('#new_role').find(":selected").val();
|
||||
if (new_role.length>0) {
|
||||
jQuery("#ure_new_role").val(new_role);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ure_move_users_from_no_role() {
|
||||
new_role = jQuery('#ure_new_role').find(":selected").val();
|
||||
if (new_role.length==0) {
|
||||
alert(ure_users_data.provide_new_role_caption);
|
||||
return;
|
||||
}
|
||||
jQuery.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
data: {
|
||||
action: 'ure_ajax',
|
||||
sub_action: 'get_users_without_role',
|
||||
wp_nonce: ure_users_data.wp_nonce,
|
||||
new_role: new_role
|
||||
},
|
||||
success: function(response) {
|
||||
var data = jQuery.parseJSON(response);
|
||||
if (typeof data.result !== 'undefined') {
|
||||
if (data.result === 'success') {
|
||||
ure_post_move_users_command(data);
|
||||
} else if (data.result === 'failure') {
|
||||
alert(data.message);
|
||||
} else {
|
||||
alert('Wrong response: ' + response)
|
||||
}
|
||||
} else {
|
||||
alert('Wrong response: ' + response)
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, exception) {
|
||||
alert("Ajax failure\n" + errortext);
|
||||
},
|
||||
async: true
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ure_post_move_users_command(data) {
|
||||
var options = jQuery("#ure_new_role > option").clone();
|
||||
jQuery('#new_role').empty().append(options);
|
||||
jQuery("#new_role").val(data.new_role);
|
||||
var el = jQuery('.bulkactions').append();
|
||||
for(var i=0; i<data.users.length; i++) {
|
||||
if (jQuery('#user_'+ data.users[i]).length>0) {
|
||||
jQuery('#user_'+ data.users[i]).prop('checked', true);
|
||||
} else {
|
||||
var html = '<input type="checkbox" name="users[]" id="user_'+ data.users[i] +'" value="'+ data.users[i] +'" checked="checked" style="display: none;">';
|
||||
el.append(html);
|
||||
}
|
||||
}
|
||||
|
||||
// submit form
|
||||
jQuery('#changeit').click();
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,816 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: User Role Editor v. 2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-04-06 12:21+0700\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
|
||||
"Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
|
||||
"Language: es_RU\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
||||
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
||||
"X-Poedit-Basepath: ../../\n"
|
||||
"X-Textdomain-Support: yes\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: user-role-editor\n"
|
||||
|
||||
#: ../includes/settings-template.php:80 ../includes/settings-template.php:111
|
||||
#: ../includes/settings-template.php:140
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:104
|
||||
msgid ""
|
||||
"Note for multisite environment: take into account that other default roles "
|
||||
"should exist at the site, in order to be assigned to the new registered "
|
||||
"users."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:185
|
||||
msgid "Change role for users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:186
|
||||
msgid "No rights"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:187
|
||||
msgid "Provide new role"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:271
|
||||
#: ../includes/class-user-role-editor.php:273
|
||||
msgid "You do not have permission to edit this user."
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:414
|
||||
msgid "Capabilities"
|
||||
msgstr "Capacitats"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:507
|
||||
msgid "Settings"
|
||||
msgstr "Opcions"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:520
|
||||
#: ../includes/class-ure-lib.php:2235
|
||||
msgid "Changelog"
|
||||
msgstr "Registre de canvis"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:542
|
||||
msgid "Overview"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
# @ default
|
||||
#: ../includes/class-user-role-editor.php:551
|
||||
#: ../includes/class-user-role-editor.php:579
|
||||
#: ../includes/class-user-role-editor.php:873
|
||||
#: ../includes/class-ure-lib.php:225
|
||||
msgid "User Role Editor"
|
||||
msgstr "User Role Editor"
|
||||
|
||||
# @ ure
|
||||
# @ default
|
||||
#: ../includes/class-user-role-editor.php:639
|
||||
#: ../includes/class-user-role-editor.php:684
|
||||
msgid "User Role Editor options are updated"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:668
|
||||
#, fuzzy
|
||||
msgid "Default Roles are updated"
|
||||
msgstr "Rol predeterminat"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:692
|
||||
msgid ""
|
||||
"You do not have sufficient permissions to manage options for User Role "
|
||||
"Editor."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:764
|
||||
msgid "Insufficient permissions to work with User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:818
|
||||
msgid "Select All"
|
||||
msgstr "Seleccionar-ho tot"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:819
|
||||
msgid "Unselect All"
|
||||
msgstr "De-selecciona-ho tot"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:820
|
||||
msgid "Reverse"
|
||||
msgstr "Invertir"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:821
|
||||
msgid "Update"
|
||||
msgstr "Actualitzar"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:822
|
||||
msgid "Please confirm permissions update"
|
||||
msgstr "Si us plau confirmeu l'actualització de permisos "
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:823
|
||||
msgid "Add New Role"
|
||||
msgstr "Afegir nou Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:824
|
||||
msgid " Role name (ID) can not be empty!"
|
||||
msgstr "El nom de rol (ID) no pot estar buit!"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:825
|
||||
msgid ""
|
||||
" Role name (ID) must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr "Error: nom del rol (ID) ha de tenir només lletres llatines i dígits!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:826
|
||||
msgid ""
|
||||
" WordPress does not support numeric Role name (ID). Add latin characters to "
|
||||
"it."
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:827
|
||||
msgid "Add Role"
|
||||
msgstr "Afegir nou Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:828
|
||||
msgid "Delete Role"
|
||||
msgstr "Eliminar Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:829
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel·lar"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:830
|
||||
msgid "Add Capability"
|
||||
msgstr "Afegir nou privilegi"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:831
|
||||
#: ../includes/class-user-role-editor.php:840
|
||||
msgid "Delete Capability"
|
||||
msgstr "Eliminar privilegi"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:832
|
||||
msgid "Reset"
|
||||
msgstr "Reiniciar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:833
|
||||
msgid "DANGER! Resetting will restore default settings from WordPress Core."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:834
|
||||
msgid ""
|
||||
"If any plugins have changed capabilities in any way upon installation (such "
|
||||
"as S2Member, WooCommerce, and many more), those capabilities will be DELETED!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:835
|
||||
msgid ""
|
||||
"For more information on how to undo changes and restore plugin capabilities "
|
||||
"go to"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:837
|
||||
msgid "Continue?"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:838
|
||||
msgid "Default Role"
|
||||
msgstr "Rol predeterminat"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:839
|
||||
msgid "Set New Default Role"
|
||||
msgstr "Assignar com a rol predeterminat"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:841
|
||||
msgid ""
|
||||
"Warning! Be careful - removing critical capability could crash some plugin "
|
||||
"or other custom code"
|
||||
msgstr ""
|
||||
"Advertència! Vés amb compte - Remoure privilegis crítics podria inutilitzar "
|
||||
"algun connector o algun altre codi personalitzat."
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:842
|
||||
msgid " Capability name (ID) can not be empty!"
|
||||
msgstr "El nom de priviliegi (ID) no pot estar buit!"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:843
|
||||
msgid ""
|
||||
" Capability name (ID) must contain latin characters, digits, hyphens or "
|
||||
"underscore only!"
|
||||
msgstr ""
|
||||
"Error: el nom del privilegi (ID) només ha de contenir caràcters llatins i "
|
||||
"dígits."
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:876
|
||||
#: ../includes/class-user-role-editor.php:905
|
||||
msgid "Other Roles"
|
||||
msgstr "Altres rols"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-user-role-editor.php:887
|
||||
msgid "Edit"
|
||||
msgstr "Editar"
|
||||
|
||||
# @ default
|
||||
#: ../includes/ure-role-edit.php:44
|
||||
msgid "If checked, then apply action to ALL sites of this Network"
|
||||
msgstr "Si està marcat s'aplica l'acció a TOTS els llocs d'aquesta xarxa"
|
||||
|
||||
#: ../includes/class-ure-lib.php:143
|
||||
msgid "Error: wrong request"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Error: "
|
||||
msgstr "Error:"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Role"
|
||||
msgstr "Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:323
|
||||
msgid "does not exist"
|
||||
msgstr "no existeix"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:366
|
||||
msgid "Role is updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:368
|
||||
msgid "Roles are updated for all network"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:374
|
||||
msgid "Error occured during role(s) update"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:381
|
||||
msgid "User capabilities are updated successfully"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:386
|
||||
msgid "Error occured during user update"
|
||||
msgstr "Error trobat durant l'actualització del rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:441
|
||||
msgid "User Roles are restored to WordPress default values. "
|
||||
msgstr ""
|
||||
"Els rols d'usuari es restableixen als valors predeterminats de WordPress."
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1340
|
||||
msgid "Help"
|
||||
msgstr "Ajuda"
|
||||
|
||||
# ure
|
||||
#: ../includes/class-ure-lib.php:1690
|
||||
msgid "Error is occur. Please check the log file."
|
||||
msgstr "Ha ocorregut un error. Si us plau revisa l'arxiu de registres."
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1733
|
||||
msgid ""
|
||||
"Error: Role ID must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr "Error: nom del rol (ID) ha de tenir només lletres llatines i dígits!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1737
|
||||
msgid ""
|
||||
"Error: WordPress does not support numeric Role name (ID). Add latin "
|
||||
"characters to it."
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1752
|
||||
#, php-format
|
||||
msgid "Role %s exists already"
|
||||
msgstr "Rol %s ja existeix"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1767
|
||||
msgid "Error is encountered during new role create operation"
|
||||
msgstr "Error trobat durant la creació d'un nou Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1769
|
||||
#, php-format
|
||||
msgid "Role %s is created successfully"
|
||||
msgstr "Rol %s s'ha creat correctament"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1838
|
||||
msgid "Error encountered during role delete operation"
|
||||
msgstr "Error trobat durant l'eliminació del Rol"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1840
|
||||
msgid "Unused roles are deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1842
|
||||
#, php-format
|
||||
msgid "Role %s is deleted successfully"
|
||||
msgstr "Rol %s s'elimina amb èxit"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1867
|
||||
msgid "Error encountered during default role change operation"
|
||||
msgstr "Error trobat durant el canvi de Rol per defecte"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1873
|
||||
#, php-format
|
||||
msgid "Default role for new users is set to %s successfully"
|
||||
msgstr "Rol predeterminat per a nous usuaris està establert en %s amb èxit"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1892
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1893
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1894
|
||||
msgid "Contributor"
|
||||
msgstr "Col·laborador"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1895
|
||||
msgid "Subscriber"
|
||||
msgstr "Subscriptor"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1897
|
||||
msgid "Switch themes"
|
||||
msgstr "Canviar plantilles"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1898
|
||||
msgid "Edit themes"
|
||||
msgstr "Editar plantilles"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1899
|
||||
msgid "Activate plugins"
|
||||
msgstr "Activar connectors"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1900
|
||||
msgid "Edit plugins"
|
||||
msgstr "Editar connectors"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1901
|
||||
msgid "Edit users"
|
||||
msgstr "Editar usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1902
|
||||
msgid "Edit files"
|
||||
msgstr "Editar arxius"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1903
|
||||
msgid "Manage options"
|
||||
msgstr "Administrar opcions"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1904
|
||||
msgid "Moderate comments"
|
||||
msgstr "Moderar comentaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1905
|
||||
msgid "Manage categories"
|
||||
msgstr "Administrar categories"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1906
|
||||
msgid "Manage links"
|
||||
msgstr "Administrar enllaços"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1907
|
||||
msgid "Upload files"
|
||||
msgstr "Pujar arxius"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1908
|
||||
msgid "Import"
|
||||
msgstr "Importar"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1909
|
||||
msgid "Unfiltered html"
|
||||
msgstr "Ometre Filtrat d'HTML"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1910
|
||||
msgid "Edit posts"
|
||||
msgstr "Editar missatges"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1911
|
||||
msgid "Edit others posts"
|
||||
msgstr "Editar missatges de altres"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1912
|
||||
msgid "Edit published posts"
|
||||
msgstr "Editar els missatges publicats"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1913
|
||||
msgid "Publish posts"
|
||||
msgstr "Publicar missatges"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1914
|
||||
msgid "Edit pages"
|
||||
msgstr "Editar pàgines"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1915
|
||||
msgid "Read"
|
||||
msgstr "Llegir"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1916
|
||||
msgid "Level 10"
|
||||
msgstr "Nivell 10"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1917
|
||||
msgid "Level 9"
|
||||
msgstr "Nivell 9"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1918
|
||||
msgid "Level 8"
|
||||
msgstr "Nivell 8"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1919
|
||||
msgid "Level 7"
|
||||
msgstr "Nivell 7"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1920
|
||||
msgid "Level 6"
|
||||
msgstr "Nivell 6"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1921
|
||||
msgid "Level 5"
|
||||
msgstr "Nivell 5"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1922
|
||||
msgid "Level 4"
|
||||
msgstr "Nivell 4"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1923
|
||||
msgid "Level 3"
|
||||
msgstr "Nivell 3"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1924
|
||||
msgid "Level 2"
|
||||
msgstr "Nivell 2"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1925
|
||||
msgid "Level 1"
|
||||
msgstr "Nivell 1"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1926
|
||||
msgid "Level 0"
|
||||
msgstr "Nivell 0"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1927
|
||||
msgid "Edit others pages"
|
||||
msgstr "Editar pàgines de altres"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1928
|
||||
msgid "Edit published pages"
|
||||
msgstr "Editar pàgines publicades"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1929
|
||||
msgid "Publish pages"
|
||||
msgstr "Publicar pàgines"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1930
|
||||
msgid "Delete pages"
|
||||
msgstr "Eliminar pàgines"
|
||||
|
||||
# ure
|
||||
#: ../includes/class-ure-lib.php:1931
|
||||
msgid "Delete others pages"
|
||||
msgstr "Eliminar pàgines de altres"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1932
|
||||
msgid "Delete published pages"
|
||||
msgstr "Eliminar pàgines publicades"
|
||||
|
||||
# ure
|
||||
#: ../includes/class-ure-lib.php:1933
|
||||
msgid "Delete posts"
|
||||
msgstr "Eliminar missatges"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1934
|
||||
msgid "Delete others posts"
|
||||
msgstr "Eliminar missatges de altres"
|
||||
|
||||
# ure
|
||||
#: ../includes/class-ure-lib.php:1935
|
||||
msgid "Delete published posts"
|
||||
msgstr "Eliminar missatges publicats"
|
||||
|
||||
# ure
|
||||
#: ../includes/class-ure-lib.php:1936
|
||||
msgid "Delete private posts"
|
||||
msgstr "Eliminar missatges privats"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1937
|
||||
msgid "Edit private posts"
|
||||
msgstr "Editar missatges privats"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1938
|
||||
msgid "Read private posts"
|
||||
msgstr "Llegir missatges privats"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1939
|
||||
msgid "Delete private pages"
|
||||
msgstr "Eliminar pàgines privades"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1940
|
||||
msgid "Edit private pages"
|
||||
msgstr "Editar pàgines privades"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1941
|
||||
msgid "Read private pages"
|
||||
msgstr "Llegir pàgines privades"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1942
|
||||
msgid "Delete users"
|
||||
msgstr "Eliminar usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1943
|
||||
msgid "Create users"
|
||||
msgstr "Crear usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1944
|
||||
msgid "Unfiltered upload"
|
||||
msgstr "Sense filtre de càrrega"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1945
|
||||
msgid "Edit dashboard"
|
||||
msgstr "Editar taulell"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1946
|
||||
msgid "Update plugins"
|
||||
msgstr "Actualitzar connectors"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1947
|
||||
msgid "Delete plugins"
|
||||
msgstr "Eliminar connectors"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1948
|
||||
msgid "Install plugins"
|
||||
msgstr "Instal·lar connectors"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1949
|
||||
msgid "Update themes"
|
||||
msgstr "Actualitzar plantilles"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1950
|
||||
msgid "Install themes"
|
||||
msgstr "Instal·lar plantilles"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1951
|
||||
msgid "Update core"
|
||||
msgstr "Actualitzar nucli"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1952
|
||||
msgid "List users"
|
||||
msgstr "Llistar usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1953
|
||||
msgid "Remove users"
|
||||
msgstr "Eliminar usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1954
|
||||
msgid "Add users"
|
||||
msgstr "Afegir usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1955
|
||||
msgid "Promote users"
|
||||
msgstr "Promoure usuaris"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1956
|
||||
msgid "Edit theme options"
|
||||
msgstr "Editar opcions de plantilla"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1957
|
||||
msgid "Delete themes"
|
||||
msgstr "Eliminar plantilles"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:1958
|
||||
msgid "Export"
|
||||
msgstr "Exportar"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2068
|
||||
msgid "Error: Capability name must contain latin characters and digits only!"
|
||||
msgstr ""
|
||||
"Error: el nom del Privilegi només ha de contenir caràcters llatins i dígits."
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2081
|
||||
#, php-format
|
||||
msgid "Capability %s is added successfully"
|
||||
msgstr "Privilegi %s s'ha afegit correctament"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2083
|
||||
#, php-format
|
||||
msgid "Capability %s exists already"
|
||||
msgstr "Ja existeix el privilegi %s"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2108
|
||||
#, php-format
|
||||
msgid "Error! You do not have permission to delete this capability: %s!"
|
||||
msgstr "¡Error! No tens permisos per esborrar aquest privilegi: %s !"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2127
|
||||
#, php-format
|
||||
msgid "Capability %s is removed successfully"
|
||||
msgstr "El privilegi %s s'ha eliminat amb èxit"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2232
|
||||
msgid "Author's website"
|
||||
msgstr "Lloc web del autor"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2233
|
||||
msgid "Plugin webpage"
|
||||
msgstr "Pàgina web del connector"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2234
|
||||
#, fuzzy
|
||||
msgid "Plugin download"
|
||||
msgstr "Pàgina web del connector"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2236
|
||||
msgid "FAQ"
|
||||
msgstr "FAQ"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2284
|
||||
msgid "None"
|
||||
msgstr "Cap"
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-lib.php:2311
|
||||
msgid "Delete All Unused Roles"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2335
|
||||
msgid "— No role for this site —"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:31
|
||||
msgid "Network Super Admin"
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/ure-user-edit.php:34
|
||||
msgid "Change capabilities for user"
|
||||
msgstr "Canviar privilegis d'usuari"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:15
|
||||
msgid "Show Administrator role at User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:16
|
||||
msgid ""
|
||||
"turn this option on in order to make the \"Administrator\" role available at "
|
||||
"the User Role Editor roles selection drop-down list. It is hidden by default "
|
||||
"for security reasons."
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-screen-help.php:18
|
||||
#, fuzzy
|
||||
msgid "Show capabilities in the human readable form"
|
||||
msgstr "Mostra privilegis de forma llegible"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:19
|
||||
msgid ""
|
||||
"automatically converts capability names from the technical form for internal "
|
||||
"use like \"edit_others_posts\" to more user friendly form, e.g. \"Edit "
|
||||
"others posts\"."
|
||||
msgstr ""
|
||||
|
||||
# @ ure
|
||||
#: ../includes/class-ure-screen-help.php:21
|
||||
msgid "Show deprecated capabilities"
|
||||
msgstr "Mostrar privilegis obsolets"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:22
|
||||
msgid ""
|
||||
"Capabilities like \"level_0\", \"level_1\" are deprecated and are not used "
|
||||
"by WordPress. They are left at the user roles for the compatibility purpose "
|
||||
"with the old themes and plugins code. Turning on this option will show those "
|
||||
"deprecated capabilities."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:27
|
||||
msgid "Allow create, edit and delete users to not super-admininstrators"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:28
|
||||
msgid ""
|
||||
"Super administrator only may create, edit and delete users under WordPress "
|
||||
"multi-site. Turn this option on in order to remove this limitation."
|
||||
msgstr ""
|
||||
@@ -0,0 +1,821 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: User Role Editor 2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-11 11:20+0700\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
|
||||
"Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
|
||||
"Language: es_ES\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../includes/settings-template.php:17
|
||||
#, fuzzy
|
||||
msgid "User Role Editor - Options"
|
||||
msgstr "Editor de Roles"
|
||||
|
||||
#: ../includes/settings-template.php:21
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:22
|
||||
msgid "Additional Modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:23
|
||||
#, fuzzy
|
||||
msgid "Default Roles"
|
||||
msgstr "Rol Predeterminado"
|
||||
|
||||
#: ../includes/settings-template.php:27
|
||||
msgid "Multisite"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:31
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:42
|
||||
#: ../includes/class-ure-screen-help.php:15
|
||||
msgid "Show Administrator role at User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:50
|
||||
#: ../includes/class-ure-screen-help.php:18
|
||||
#, fuzzy
|
||||
msgid "Show capabilities in the human readable form"
|
||||
msgstr "Mostrar Capacidades de forma legible"
|
||||
|
||||
#: ../includes/settings-template.php:58 ../includes/ure-role-edit.php:40
|
||||
#: ../includes/ure-user-edit.php:63 ../includes/class-ure-screen-help.php:21
|
||||
msgid "Show deprecated capabilities"
|
||||
msgstr "Mostrar Capacidades obsoletas"
|
||||
|
||||
#: ../includes/settings-template.php:69 ../includes/settings-template.php:101
|
||||
#: ../includes/settings-template.php:131 ../includes/settings-template.php:160
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
|
||||
#: ../includes/settings-template.php:86
|
||||
msgid "Count users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:111
|
||||
#, fuzzy
|
||||
msgid "Primary default role: "
|
||||
msgstr "Rol Primario:"
|
||||
|
||||
#: ../includes/settings-template.php:118
|
||||
msgid "Other default roles for new registered user: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:124
|
||||
msgid ""
|
||||
"Note for multisite environment: take into account that other default roles "
|
||||
"should exist at the site, in order to be assigned to the new registered "
|
||||
"users."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:147
|
||||
msgid "Allow non super administrators to create, edit, and delete users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:185
|
||||
msgid "Change role for users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:186
|
||||
msgid "No rights"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:187
|
||||
msgid "Provide new role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:271
|
||||
#: ../includes/class-user-role-editor.php:273
|
||||
msgid "You do not have permission to edit this user."
|
||||
msgstr "No tienes los suficientes permisos para editar este usuario"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:414
|
||||
msgid "Capabilities"
|
||||
msgstr "Capacidades"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:507
|
||||
msgid "Settings"
|
||||
msgstr "Configuración"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:520
|
||||
#: ../includes/class-ure-lib.php:2207
|
||||
msgid "Changelog"
|
||||
msgstr "Registro de cambios"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:542
|
||||
msgid "Overview"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:551
|
||||
#: ../includes/class-user-role-editor.php:579
|
||||
#: ../includes/class-user-role-editor.php:890
|
||||
#: ../includes/class-ure-lib.php:225
|
||||
msgid "User Role Editor"
|
||||
msgstr "Editor de Roles"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:636
|
||||
#: ../includes/class-user-role-editor.php:654
|
||||
#: ../includes/class-user-role-editor.php:698
|
||||
msgid "User Role Editor options are updated"
|
||||
msgstr "Opciones actualizadas"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:682
|
||||
#, fuzzy
|
||||
msgid "Default Roles are updated"
|
||||
msgstr "Rol Predeterminado"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:706
|
||||
msgid ""
|
||||
"You do not have sufficient permissions to manage options for User Role "
|
||||
"Editor."
|
||||
msgstr "Permisos insuficientes para trabajar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:781
|
||||
msgid "Insufficient permissions to work with User Role Editor"
|
||||
msgstr "Permisos insuficientes para trabajar con el Editor de Roles"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:835
|
||||
msgid "Select All"
|
||||
msgstr "Seleccionar todo"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:836
|
||||
msgid "Unselect All"
|
||||
msgstr "Deseleccionar todo"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:837
|
||||
msgid "Reverse"
|
||||
msgstr "Revertir"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:838
|
||||
msgid "Update"
|
||||
msgstr "Actualizar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:839
|
||||
msgid "Please confirm permissions update"
|
||||
msgstr "Por favor confirma las actualizaciones de permisos"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:840
|
||||
msgid "Add New Role"
|
||||
msgstr "Agregar nuevo Rol"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:841
|
||||
msgid " Role name (ID) can not be empty!"
|
||||
msgstr "¡El nombre del Rol (ID) no puede estar vacío!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:842
|
||||
msgid ""
|
||||
" Role name (ID) must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
"¡El nombre del Rol (ID) sólo debe contener caracteres alfanuméricos, guiones "
|
||||
"altos o bajos!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:843
|
||||
msgid ""
|
||||
" WordPress does not support numeric Role name (ID). Add latin characters to "
|
||||
"it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:844
|
||||
msgid "Add Role"
|
||||
msgstr "Agregar Rol"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:845
|
||||
msgid "Delete Role"
|
||||
msgstr "Eliminar Rol"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:846
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:847
|
||||
msgid "Add Capability"
|
||||
msgstr "Agregar Capacidad"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:848
|
||||
#: ../includes/class-user-role-editor.php:857
|
||||
msgid "Delete Capability"
|
||||
msgstr "Eliminar Capacidades"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:849
|
||||
msgid "Reset"
|
||||
msgstr "Reiniciar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:850
|
||||
msgid "DANGER! Resetting will restore default settings from WordPress Core."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:851
|
||||
msgid ""
|
||||
"If any plugins have changed capabilities in any way upon installation (such "
|
||||
"as S2Member, WooCommerce, and many more), those capabilities will be DELETED!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:852
|
||||
msgid ""
|
||||
"For more information on how to undo changes and restore plugin capabilities "
|
||||
"go to"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:854
|
||||
msgid "Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:855
|
||||
msgid "Default Role"
|
||||
msgstr "Rol Predeterminado"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:856
|
||||
msgid "Set New Default Role"
|
||||
msgstr "Establecer nuevo Rol"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:858
|
||||
msgid ""
|
||||
"Warning! Be careful - removing critical capability could crash some plugin "
|
||||
"or other custom code"
|
||||
msgstr ""
|
||||
"¡Atención! Ten cuidado - Eliminar Capacidadess esenciales podría inhabilitar "
|
||||
"algún plugin o código personalizado"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:859
|
||||
msgid " Capability name (ID) can not be empty!"
|
||||
msgstr "¡El nombre de la Capacidad (ID) no puede estar vacío!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:860
|
||||
msgid ""
|
||||
" Capability name (ID) must contain latin characters, digits, hyphens or "
|
||||
"underscore only!"
|
||||
msgstr ""
|
||||
"¡El nombre de la Capacidad (ID) sólo debe contener caracteres alfanuméricos, "
|
||||
"guiones altos o bajos!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:893
|
||||
#: ../includes/class-user-role-editor.php:922
|
||||
msgid "Other Roles"
|
||||
msgstr "Otros Roles"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:904
|
||||
msgid "Edit"
|
||||
msgstr "Editar"
|
||||
|
||||
#: ../includes/ure-role-edit.php:17
|
||||
#, fuzzy
|
||||
msgid "Select Role and change its capabilities:"
|
||||
msgstr "Selecciona un rol y modifica su lista de Capacidades"
|
||||
|
||||
#: ../includes/ure-role-edit.php:30 ../includes/ure-user-edit.php:53
|
||||
#, fuzzy
|
||||
msgid "Show capabilities in human readable form"
|
||||
msgstr "Mostrar Capacidades de forma legible"
|
||||
|
||||
#: ../includes/ure-role-edit.php:44
|
||||
msgid "If checked, then apply action to ALL sites of this Network"
|
||||
msgstr "Si está marcado, se aplicará la acción a TODOS los sitios de la Red"
|
||||
|
||||
#: ../includes/ure-role-edit.php:56
|
||||
msgid "Apply to All Sites"
|
||||
msgstr "Aplicar a todos los Sitios"
|
||||
|
||||
#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109
|
||||
msgid "Core capabilities:"
|
||||
msgstr "Capacidades del núcleo del sistema:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:65 ../includes/ure-user-edit.php:111
|
||||
msgid "Quick filter:"
|
||||
msgstr "Filtro rápido:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:83 ../includes/ure-user-edit.php:130
|
||||
msgid "Custom capabilities:"
|
||||
msgstr "Capacidades personalizadas:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:143
|
||||
msgid "Error: wrong request"
|
||||
msgstr "Error: Petición inválida"
|
||||
|
||||
#: ../includes/class-ure-lib.php:175
|
||||
msgid "Role name (ID): "
|
||||
msgstr "Nombre del Rol (ID):"
|
||||
|
||||
#: ../includes/class-ure-lib.php:177
|
||||
msgid "Display Role Name: "
|
||||
msgstr "Mostrar nombre del Rol:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:179
|
||||
msgid "Make copy of: "
|
||||
msgstr "Hacer copia de:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:186
|
||||
msgid "Select Role:"
|
||||
msgstr "Seleccionar Rol:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:201
|
||||
msgid "Delete:"
|
||||
msgstr "Eliminar:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:208
|
||||
msgid "Capability name (ID): "
|
||||
msgstr "Nombre de la Capacidad (ID):"
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Error: "
|
||||
msgstr "Error:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Role"
|
||||
msgstr "Rol"
|
||||
|
||||
#: ../includes/class-ure-lib.php:323
|
||||
msgid "does not exist"
|
||||
msgstr "no existe"
|
||||
|
||||
#: ../includes/class-ure-lib.php:366
|
||||
msgid "Role is updated successfully"
|
||||
msgstr "El Rol fue exitosamente actualizado"
|
||||
|
||||
#: ../includes/class-ure-lib.php:368
|
||||
msgid "Roles are updated for all network"
|
||||
msgstr "Roles actualizados en toda la Red"
|
||||
|
||||
#: ../includes/class-ure-lib.php:374
|
||||
msgid "Error occured during role(s) update"
|
||||
msgstr "Ocurrió un error durante la actualización del Rol"
|
||||
|
||||
#: ../includes/class-ure-lib.php:381
|
||||
msgid "User capabilities are updated successfully"
|
||||
msgstr "Las Capacidades de Usuario fueron actualizadas exitosamente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:386
|
||||
msgid "Error occured during user update"
|
||||
msgstr "Ocurrió un error durante la actualización del Usuario"
|
||||
|
||||
#: ../includes/class-ure-lib.php:441
|
||||
msgid "User Roles are restored to WordPress default values. "
|
||||
msgstr ""
|
||||
"Los Roles de Usuario fueron restaurados a los predeterminados de WordPress"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1312
|
||||
msgid "Help"
|
||||
msgstr "Ayuda"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1662
|
||||
msgid "Error is occur. Please check the log file."
|
||||
msgstr "Un error ha ocurrido. Por favor revisa el archivo de registro."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1705
|
||||
msgid ""
|
||||
"Error: Role ID must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
"Error: ¡La ID del Rol sólo debe contener caracteres alfanuméricos, guiones "
|
||||
"altos o bajos!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1709
|
||||
msgid ""
|
||||
"Error: WordPress does not support numeric Role name (ID). Add latin "
|
||||
"characters to it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1724
|
||||
#, php-format
|
||||
msgid "Role %s exists already"
|
||||
msgstr "El Rol %s ya existe"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1739
|
||||
msgid "Error is encountered during new role create operation"
|
||||
msgstr "Un error fue encontrado durante la creación del nuevo Rol"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1741
|
||||
#, php-format
|
||||
msgid "Role %s is created successfully"
|
||||
msgstr "El Rol %s fue creado exitosamente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1810
|
||||
msgid "Error encountered during role delete operation"
|
||||
msgstr "Un error fue encontrado durante la eliminación del Rol"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1812
|
||||
msgid "Unused roles are deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1814
|
||||
#, php-format
|
||||
msgid "Role %s is deleted successfully"
|
||||
msgstr "El Rol %s fue eliminado exitosamente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1839
|
||||
msgid "Error encountered during default role change operation"
|
||||
msgstr "Un error fue encontrado durante el cambio del Rol predeterminado"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1845
|
||||
#, php-format
|
||||
msgid "Default role for new users is set to %s successfully"
|
||||
msgstr "El Rol predeterminado para nuevos usuarios ha sido establecido a %s"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1864
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1865
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1866
|
||||
msgid "Contributor"
|
||||
msgstr "Contribuyente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1867
|
||||
msgid "Subscriber"
|
||||
msgstr "Suscriptor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1869
|
||||
msgid "Switch themes"
|
||||
msgstr "Cambiar temas (plantillas)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1870
|
||||
msgid "Edit themes"
|
||||
msgstr "Editar temas (plantillas)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1871
|
||||
msgid "Activate plugins"
|
||||
msgstr "Activar plugins"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1872
|
||||
msgid "Edit plugins"
|
||||
msgstr "Editar plugins"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1873
|
||||
msgid "Edit users"
|
||||
msgstr "Editar usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1874
|
||||
msgid "Edit files"
|
||||
msgstr "Editar archivos"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1875
|
||||
msgid "Manage options"
|
||||
msgstr "Administrar opciones"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1876
|
||||
msgid "Moderate comments"
|
||||
msgstr "Moderar comentarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1877
|
||||
msgid "Manage categories"
|
||||
msgstr "Administrar categorías"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1878
|
||||
msgid "Manage links"
|
||||
msgstr "Administrar enlaces"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1879
|
||||
msgid "Upload files"
|
||||
msgstr "Subir archivos"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1880
|
||||
msgid "Import"
|
||||
msgstr "Importar"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1881
|
||||
msgid "Unfiltered html"
|
||||
msgstr "HTML sin filtrar"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1882
|
||||
msgid "Edit posts"
|
||||
msgstr "Editar entradas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1883
|
||||
msgid "Edit others posts"
|
||||
msgstr "Editar entradas ajenas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1884
|
||||
msgid "Edit published posts"
|
||||
msgstr "Editar entradas publicadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1885
|
||||
msgid "Publish posts"
|
||||
msgstr "Publicar entradas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1886
|
||||
msgid "Edit pages"
|
||||
msgstr "Editar páginas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1887
|
||||
msgid "Read"
|
||||
msgstr "Leer"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1888
|
||||
msgid "Level 10"
|
||||
msgstr "Nivel 10"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1889
|
||||
msgid "Level 9"
|
||||
msgstr "Nivel 9"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1890
|
||||
msgid "Level 8"
|
||||
msgstr "Nivel 8"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1891
|
||||
msgid "Level 7"
|
||||
msgstr "Nivel 7"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1892
|
||||
msgid "Level 6"
|
||||
msgstr "Nivel 6"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1893
|
||||
msgid "Level 5"
|
||||
msgstr "Nivel 5"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1894
|
||||
msgid "Level 4"
|
||||
msgstr "Nivel 4"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1895
|
||||
msgid "Level 3"
|
||||
msgstr "Nivel 3"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1896
|
||||
msgid "Level 2"
|
||||
msgstr "Nivel 2"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1897
|
||||
msgid "Level 1"
|
||||
msgstr "Nivel 1"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1898
|
||||
msgid "Level 0"
|
||||
msgstr "Nivel 0"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1899
|
||||
msgid "Edit others pages"
|
||||
msgstr "Editar páginas ajenas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1900
|
||||
msgid "Edit published pages"
|
||||
msgstr "Editar páginas publicadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1901
|
||||
msgid "Publish pages"
|
||||
msgstr "Publicar páginas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1902
|
||||
msgid "Delete pages"
|
||||
msgstr "Eliminar páginas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1903
|
||||
msgid "Delete others pages"
|
||||
msgstr "Eliminar páginas ajenas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1904
|
||||
msgid "Delete published pages"
|
||||
msgstr "Eliminar páginas publicadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1905
|
||||
msgid "Delete posts"
|
||||
msgstr "Eliminar entradas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1906
|
||||
msgid "Delete others posts"
|
||||
msgstr "Eliminar entradas ajenas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1907
|
||||
msgid "Delete published posts"
|
||||
msgstr "Eliminar entradas publicadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1908
|
||||
msgid "Delete private posts"
|
||||
msgstr "Eliminar entradas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1909
|
||||
msgid "Edit private posts"
|
||||
msgstr "Editar entradas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1910
|
||||
msgid "Read private posts"
|
||||
msgstr "Leer entradas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1911
|
||||
msgid "Delete private pages"
|
||||
msgstr "Eliminar páginas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1912
|
||||
msgid "Edit private pages"
|
||||
msgstr "Editar páginas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1913
|
||||
msgid "Read private pages"
|
||||
msgstr "Leer páginas privadas"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1914
|
||||
msgid "Delete users"
|
||||
msgstr "Eliminar usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1915
|
||||
msgid "Create users"
|
||||
msgstr "Crear usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1916
|
||||
msgid "Unfiltered upload"
|
||||
msgstr "Subir sin filtrado"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1917
|
||||
msgid "Edit dashboard"
|
||||
msgstr "Editar escritorio"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1918
|
||||
msgid "Update plugins"
|
||||
msgstr "Actualizar plugins"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1919
|
||||
msgid "Delete plugins"
|
||||
msgstr "Eliminar plugins"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1920
|
||||
msgid "Install plugins"
|
||||
msgstr "Instalar plugins"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1921
|
||||
msgid "Update themes"
|
||||
msgstr "Actualizar temas (plantillas)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1922
|
||||
msgid "Install themes"
|
||||
msgstr "Instalar temas (plantillas)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1923
|
||||
msgid "Update core"
|
||||
msgstr "Actualizar núcleo"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1924
|
||||
msgid "List users"
|
||||
msgstr "Listar usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1925
|
||||
msgid "Remove users"
|
||||
msgstr "Eliminar usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1926
|
||||
msgid "Add users"
|
||||
msgstr "Agregar usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1927
|
||||
msgid "Promote users"
|
||||
msgstr "Promover usuarios"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1928
|
||||
msgid "Edit theme options"
|
||||
msgstr "Editar opciones del tema (plantilla)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1929
|
||||
msgid "Delete themes"
|
||||
msgstr "Eliminar temas (plantillas)"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1930
|
||||
msgid "Export"
|
||||
msgstr "Exportar"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2040
|
||||
msgid "Error: Capability name must contain latin characters and digits only!"
|
||||
msgstr ""
|
||||
"Error: El nombre de la Capacidad sólo debe contener caracteres alfanuméricos!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2053
|
||||
#, php-format
|
||||
msgid "Capability %s is added successfully"
|
||||
msgstr "La Capacidad %s fue agregada exitosamente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2055
|
||||
#, php-format
|
||||
msgid "Capability %s exists already"
|
||||
msgstr "La Capacidad %s ya existe"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2080
|
||||
#, php-format
|
||||
msgid "Error! You do not have permission to delete this capability: %s!"
|
||||
msgstr ""
|
||||
"¡Error! No cuentas con suficientes permisos para eliminar esta Capacidad: %s!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2099
|
||||
#, php-format
|
||||
msgid "Capability %s is removed successfully"
|
||||
msgstr "La Capacidad %s fue eliminada exitosamente"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2203
|
||||
msgid "Version:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2204
|
||||
msgid "Author's website"
|
||||
msgstr "Sitio web del Autor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2205
|
||||
msgid "Plugin webpage"
|
||||
msgstr "Página web del Plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2206
|
||||
#, fuzzy
|
||||
msgid "Plugin download"
|
||||
msgstr "Página web del Plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2208
|
||||
msgid "FAQ"
|
||||
msgstr "FAQ"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2256
|
||||
msgid "None"
|
||||
msgstr "Ninguno"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2283
|
||||
msgid "Delete All Unused Roles"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2307
|
||||
msgid "— No role for this site —"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:31
|
||||
msgid "Network Super Admin"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:34
|
||||
msgid "Change capabilities for user"
|
||||
msgstr "Cambiar Capacidades para el usuario"
|
||||
|
||||
#: ../includes/ure-user-edit.php:71
|
||||
msgid "Primary Role:"
|
||||
msgstr "Rol Primario:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:81
|
||||
msgid "bbPress Role:"
|
||||
msgstr "Rol de bbPress:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:91
|
||||
msgid "Other Roles:"
|
||||
msgstr "Otros Roles:"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:16
|
||||
msgid ""
|
||||
"turn this option on in order to make the \"Administrator\" role available at "
|
||||
"the User Role Editor roles selection drop-down list. It is hidden by default "
|
||||
"for security reasons."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:19
|
||||
msgid ""
|
||||
"automatically converts capability names from the technical form for internal "
|
||||
"use like \"edit_others_posts\" to more user friendly form, e.g. \"Edit "
|
||||
"others posts\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:22
|
||||
msgid ""
|
||||
"Capabilities like \"level_0\", \"level_1\" are deprecated and are not used "
|
||||
"by WordPress. They are left at the user roles for the compatibility purpose "
|
||||
"with the old themes and plugins code. Turning on this option will show those "
|
||||
"deprecated capabilities."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:27
|
||||
msgid "Allow create, edit and delete users to not super-admininstrators"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:28
|
||||
msgid ""
|
||||
"Super administrator only may create, edit and delete users under WordPress "
|
||||
"multi-site. Turn this option on in order to remove this limitation."
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "About this Plugin:"
|
||||
#~ msgstr "Acerca de este Plugin:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Reset Roles to WordPress defaults. Be careful, all changes made by you or "
|
||||
#~ "plugins will be lost. Some plugins, e.g. S2Member, WooCommerce "
|
||||
#~ "reactivation could be needed. Continue?"
|
||||
#~ msgstr ""
|
||||
#~ "Reiniciar Roles a los predeterminados de WordPress. Ten cuidado, todos "
|
||||
#~ "los cambios que tú hayas realizado (o ejecutados por algún plugin) se "
|
||||
#~ "perderán. Algunos plugins como S2Member, WooCommerce podrían necesitar "
|
||||
#~ "una reactivación ¿Deseas continuar?"
|
||||
|
||||
#~ msgid "Only"
|
||||
#~ msgstr "Solamente"
|
||||
|
||||
#~ msgid "is allowed to use"
|
||||
#~ msgstr "está permitido usarlo"
|
||||
@@ -0,0 +1,810 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: User Role Editor 2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-11 11:20+0700\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
|
||||
"Language-Team: Morteza Gholami <Morteza.Gholami@Yahoo.Com>\n"
|
||||
"Language: en_RU\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Poedit-SearchPath-1: ..\n"
|
||||
|
||||
#: ../includes/settings-template.php:17
|
||||
msgid "User Role Editor - Options"
|
||||
msgstr "ویرایشگر نقش کاربر - تنظیمات"
|
||||
|
||||
#: ../includes/settings-template.php:21
|
||||
msgid "General"
|
||||
msgstr "عمومی"
|
||||
|
||||
#: ../includes/settings-template.php:22
|
||||
msgid "Additional Modules"
|
||||
msgstr "ماژولهای اضافی"
|
||||
|
||||
#: ../includes/settings-template.php:23
|
||||
msgid "Default Roles"
|
||||
msgstr "نقشهای پیشفرض"
|
||||
|
||||
#: ../includes/settings-template.php:27
|
||||
msgid "Multisite"
|
||||
msgstr "چندسایتی"
|
||||
|
||||
#: ../includes/settings-template.php:31
|
||||
msgid "About"
|
||||
msgstr "درباره"
|
||||
|
||||
#: ../includes/settings-template.php:42
|
||||
#: ../includes/class-ure-screen-help.php:15
|
||||
msgid "Show Administrator role at User Role Editor"
|
||||
msgstr "نمایش نقش مدیر در ویرایشگر نقش کاربر"
|
||||
|
||||
#: ../includes/settings-template.php:50
|
||||
#: ../includes/class-ure-screen-help.php:18
|
||||
msgid "Show capabilities in the human readable form"
|
||||
msgstr "نمایش قابلیتها در حالت قابل خواندن برای انسان"
|
||||
|
||||
#: ../includes/settings-template.php:58 ../includes/ure-role-edit.php:40
|
||||
#: ../includes/ure-user-edit.php:63 ../includes/class-ure-screen-help.php:21
|
||||
msgid "Show deprecated capabilities"
|
||||
msgstr "نمایش قابلیتهای بد دانسته شده"
|
||||
|
||||
#: ../includes/settings-template.php:69 ../includes/settings-template.php:101
|
||||
#: ../includes/settings-template.php:131 ../includes/settings-template.php:160
|
||||
msgid "Save"
|
||||
msgstr "ذخیره"
|
||||
|
||||
#: ../includes/settings-template.php:86
|
||||
msgid "Count users without role"
|
||||
msgstr "شمارش کاربران بدون نقش"
|
||||
|
||||
#: ../includes/settings-template.php:111
|
||||
msgid "Primary default role: "
|
||||
msgstr "نقش پیشفرض اولیه: "
|
||||
|
||||
#: ../includes/settings-template.php:118
|
||||
msgid "Other default roles for new registered user: "
|
||||
msgstr "دیگر نقشهای پیشفرض برای کاربران تازه ثبتنام شده: "
|
||||
|
||||
#: ../includes/settings-template.php:124
|
||||
msgid ""
|
||||
"Note for multisite environment: take into account that other default roles "
|
||||
"should exist at the site, in order to be assigned to the new registered "
|
||||
"users."
|
||||
msgstr ""
|
||||
"قابل توجه محیط چند سایتی: رفتن به حسابی که در سایت نقشهای پیش فرض دیگری "
|
||||
"موجود است، به منظور اختصاص دادن به کاربران تازه ثبتنام شده."
|
||||
|
||||
#: ../includes/settings-template.php:147
|
||||
msgid "Allow non super administrators to create, edit, and delete users"
|
||||
msgstr "اجازه به غیر مدیران اصلی برای ایجاد، ویرایش و حذف کاربران"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:185
|
||||
msgid "Change role for users without role"
|
||||
msgstr "تغییر نقش برای کاربران بدون نقش"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:186
|
||||
msgid "No rights"
|
||||
msgstr "هیچ حقوقی"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:187
|
||||
msgid "Provide new role"
|
||||
msgstr "ارائهی نقش جدید"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:271
|
||||
#: ../includes/class-user-role-editor.php:273
|
||||
msgid "You do not have permission to edit this user."
|
||||
msgstr "شما اجازهی ویرایش این کاربر را ندارید."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:414
|
||||
msgid "Capabilities"
|
||||
msgstr "قابلیتها"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:507
|
||||
msgid "Settings"
|
||||
msgstr "تنظیمات"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:520
|
||||
#: ../includes/class-ure-lib.php:2207
|
||||
msgid "Changelog"
|
||||
msgstr "گزارش تغییرات"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:542
|
||||
msgid "Overview"
|
||||
msgstr "مرور کلی"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:551
|
||||
#: ../includes/class-user-role-editor.php:579
|
||||
#: ../includes/class-user-role-editor.php:890
|
||||
#: ../includes/class-ure-lib.php:225
|
||||
msgid "User Role Editor"
|
||||
msgstr "ویرایشگر نقش کاربر"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:636
|
||||
#: ../includes/class-user-role-editor.php:654
|
||||
#: ../includes/class-user-role-editor.php:698
|
||||
msgid "User Role Editor options are updated"
|
||||
msgstr "تنظیمات ویرایشگر نقش کاربر بروز شد"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:682
|
||||
msgid "Default Roles are updated"
|
||||
msgstr "نقشهای پیش فرض بروز شدند"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:706
|
||||
msgid ""
|
||||
"You do not have sufficient permissions to manage options for User Role "
|
||||
"Editor."
|
||||
msgstr "شما مجوز کافی برای مدیریت تنظیمات ویرایشگر نقش کاربر را ندارید."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:781
|
||||
msgid "Insufficient permissions to work with User Role Editor"
|
||||
msgstr "مجوز ناکافی برای کار با ویرایشگر نقش کاربر"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:835
|
||||
msgid "Select All"
|
||||
msgstr "انتخاب همه"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:836
|
||||
msgid "Unselect All"
|
||||
msgstr "عدمانتخاب همه"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:837
|
||||
msgid "Reverse"
|
||||
msgstr "وارونه"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:838
|
||||
msgid "Update"
|
||||
msgstr "بروزرسانی"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:839
|
||||
msgid "Please confirm permissions update"
|
||||
msgstr "لطفا مجوز بروزرسانی را تایید کنید"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:840
|
||||
msgid "Add New Role"
|
||||
msgstr "افزودن نقش جدید"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:841
|
||||
msgid " Role name (ID) can not be empty!"
|
||||
msgstr " نام نقش (شناسه) نمی تواند خالی باشد!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:842
|
||||
msgid ""
|
||||
" Role name (ID) must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
" نام نقش (شناسه) باید فقط شامل حروف لاتین، اعداد، خط فاصله یا زیرخط باشد!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:843
|
||||
msgid ""
|
||||
" WordPress does not support numeric Role name (ID). Add latin characters to "
|
||||
"it."
|
||||
msgstr ""
|
||||
" وردپرس از نام نقش (شناسه) عددی پشتیبانی نمیکند. حروف لاتین به آن اضافه کنید."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:844
|
||||
msgid "Add Role"
|
||||
msgstr "افزودن نقش"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:845
|
||||
msgid "Delete Role"
|
||||
msgstr "حذف نقش"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:846
|
||||
msgid "Cancel"
|
||||
msgstr "لغو"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:847
|
||||
msgid "Add Capability"
|
||||
msgstr "افزودن قابلیت"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:848
|
||||
#: ../includes/class-user-role-editor.php:857
|
||||
msgid "Delete Capability"
|
||||
msgstr "حذف قابلیت"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:849
|
||||
msgid "Reset"
|
||||
msgstr "بازنشانی"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:850
|
||||
msgid "DANGER! Resetting will restore default settings from WordPress Core."
|
||||
msgstr "خطر! بازنشانی، تنظیمات پیشفرض را از هستهی وردپرس بازمیگرداند."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:851
|
||||
msgid ""
|
||||
"If any plugins have changed capabilities in any way upon installation (such "
|
||||
"as S2Member, WooCommerce, and many more), those capabilities will be DELETED!"
|
||||
msgstr ""
|
||||
"اگر هریک از افزونهها پس از نصب به هر نحو قابلیتها را تغییر دهند (مانند "
|
||||
"S2Member ، WooCommerce و بسیاری دیگر) آن قابلیتها حذف خواهند شد!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:852
|
||||
msgid ""
|
||||
"For more information on how to undo changes and restore plugin capabilities "
|
||||
"go to"
|
||||
msgstr ""
|
||||
"برای کسب اطلاعات بیشتر درباره چگونگی خنثیسازی تغییرات و ترمیمکردن قابلیت ها "
|
||||
"مراجعه کنید به"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:854
|
||||
msgid "Continue?"
|
||||
msgstr "ادامه؟"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:855
|
||||
msgid "Default Role"
|
||||
msgstr "نقش پیشفرض"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:856
|
||||
msgid "Set New Default Role"
|
||||
msgstr "نشاندن نقش پیشفرض جدید"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:858
|
||||
msgid ""
|
||||
"Warning! Be careful - removing critical capability could crash some plugin "
|
||||
"or other custom code"
|
||||
msgstr ""
|
||||
"اخطار! مراقب باشید - حذف قابلیت مهم میتواند برخی از افزونهها یا دیگر کدهای "
|
||||
"سفارشی را دچار سانحه کند"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:859
|
||||
msgid " Capability name (ID) can not be empty!"
|
||||
msgstr " نام قابلیت (شناسه) نمی تواند خالی باشد!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:860
|
||||
msgid ""
|
||||
" Capability name (ID) must contain latin characters, digits, hyphens or "
|
||||
"underscore only!"
|
||||
msgstr ""
|
||||
" نام قابلیت (شناسه) باید فقط شامل حروف لاتین، اعداد، خط فاصله یا زیرخط باشد!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:893
|
||||
#: ../includes/class-user-role-editor.php:922
|
||||
msgid "Other Roles"
|
||||
msgstr "دیگر نقشها"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:904
|
||||
msgid "Edit"
|
||||
msgstr "ویرایش"
|
||||
|
||||
#: ../includes/ure-role-edit.php:17
|
||||
msgid "Select Role and change its capabilities:"
|
||||
msgstr "انتخاب نقش و تغییر قابلیتهای آن:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:30 ../includes/ure-user-edit.php:53
|
||||
msgid "Show capabilities in human readable form"
|
||||
msgstr "نمایش قابلیتها در حالت قابل خواندن برای انسان"
|
||||
|
||||
#: ../includes/ure-role-edit.php:44
|
||||
msgid "If checked, then apply action to ALL sites of this Network"
|
||||
msgstr "در صورت انتخاب، این عمل به تمامی سایتهای شبکه اعمال میشود"
|
||||
|
||||
#: ../includes/ure-role-edit.php:56
|
||||
msgid "Apply to All Sites"
|
||||
msgstr "اعمال به تمامی سایتها"
|
||||
|
||||
#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109
|
||||
msgid "Core capabilities:"
|
||||
msgstr "قابلیتهای هسته:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:65 ../includes/ure-user-edit.php:111
|
||||
msgid "Quick filter:"
|
||||
msgstr "فیلتر سریع:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:83 ../includes/ure-user-edit.php:130
|
||||
msgid "Custom capabilities:"
|
||||
msgstr "قابلیتهای سفارشی:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:143
|
||||
msgid "Error: wrong request"
|
||||
msgstr "خطا: درخواست اشتباه"
|
||||
|
||||
#: ../includes/class-ure-lib.php:175
|
||||
msgid "Role name (ID): "
|
||||
msgstr "نام نقش (شناسه): "
|
||||
|
||||
#: ../includes/class-ure-lib.php:177
|
||||
msgid "Display Role Name: "
|
||||
msgstr "نمایش نام نقش: "
|
||||
|
||||
#: ../includes/class-ure-lib.php:179
|
||||
msgid "Make copy of: "
|
||||
msgstr "ایجاد رونوشت از: "
|
||||
|
||||
#: ../includes/class-ure-lib.php:186
|
||||
msgid "Select Role:"
|
||||
msgstr "انتخاب نقش:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:201
|
||||
msgid "Delete:"
|
||||
msgstr "حذف:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:208
|
||||
msgid "Capability name (ID): "
|
||||
msgstr "نام قابلیت (شناسه): "
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Error: "
|
||||
msgstr "خطا: "
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Role"
|
||||
msgstr "نقش"
|
||||
|
||||
#: ../includes/class-ure-lib.php:323
|
||||
msgid "does not exist"
|
||||
msgstr "موجود نمیباشد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:366
|
||||
msgid "Role is updated successfully"
|
||||
msgstr "نقش با موفقیت بروز شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:368
|
||||
msgid "Roles are updated for all network"
|
||||
msgstr "نقشها برای تمامی شبکه بروز شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:374
|
||||
msgid "Error occured during role(s) update"
|
||||
msgstr "خطایی در هنگام بروزسانی نقش(ها) رخ داد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:381
|
||||
msgid "User capabilities are updated successfully"
|
||||
msgstr "قابلیتهای کاربر با موفقیت بروز شدند"
|
||||
|
||||
#: ../includes/class-ure-lib.php:386
|
||||
msgid "Error occured during user update"
|
||||
msgstr "خطایی در هنگام بروزرسانی کاربر رخ داد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:441
|
||||
msgid "User Roles are restored to WordPress default values. "
|
||||
msgstr "نقشهای کاربر به مقدار پیشفرض وردپرس ترمیم شد."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1312
|
||||
msgid "Help"
|
||||
msgstr "راهنما"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1662
|
||||
msgid "Error is occur. Please check the log file."
|
||||
msgstr "خطایی رخ داده است. لطفا فایل گزارش را چک کنید."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1705
|
||||
msgid ""
|
||||
"Error: Role ID must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
"خطا: شناسهی نقش باید فقط شامل حروف لاتین، اعداد، خط فاصله یا زیرخط باشد!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1709
|
||||
msgid ""
|
||||
"Error: WordPress does not support numeric Role name (ID). Add latin "
|
||||
"characters to it."
|
||||
msgstr ""
|
||||
"خطا: وردپرس از نام نقش (شناسه) عددی پشتیبانی نمیکند. حروف لاتین به آن اضافه "
|
||||
"کنید."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1724
|
||||
#, php-format
|
||||
msgid "Role %s exists already"
|
||||
msgstr "نقش %s از پیش موجود است"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1739
|
||||
msgid "Error is encountered during new role create operation"
|
||||
msgstr "با خطایی در هنگام عملیات ساخت نقش جدید روبرو شدیم"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1741
|
||||
#, php-format
|
||||
msgid "Role %s is created successfully"
|
||||
msgstr "نقش %s با موفقیت ایجاد شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1810
|
||||
msgid "Error encountered during role delete operation"
|
||||
msgstr "با خطایی در هنگام عملیات حذف نقش روبرو شدیم"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1812
|
||||
msgid "Unused roles are deleted successfully"
|
||||
msgstr "نقشهای استفاده نشده با موفقیت حذف شدند"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1814
|
||||
#, php-format
|
||||
msgid "Role %s is deleted successfully"
|
||||
msgstr "نقش %s با موفقیت حذف شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1839
|
||||
msgid "Error encountered during default role change operation"
|
||||
msgstr "با خطایی در هنگام عملیات تغییر نقش پیشفرض روبرو شدیم"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1845
|
||||
#, php-format
|
||||
msgid "Default role for new users is set to %s successfully"
|
||||
msgstr "نقش پیشفرض برای کاربران جدید با موفقیت روی %s نشانده شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1864
|
||||
msgid "Editor"
|
||||
msgstr "ویرایشگر"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1865
|
||||
msgid "Author"
|
||||
msgstr "نویسنده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1866
|
||||
msgid "Contributor"
|
||||
msgstr "مشارکتکننده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1867
|
||||
msgid "Subscriber"
|
||||
msgstr "مشترک"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1869
|
||||
msgid "Switch themes"
|
||||
msgstr "تغییر پوستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1870
|
||||
msgid "Edit themes"
|
||||
msgstr "ویرایش پوستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1871
|
||||
msgid "Activate plugins"
|
||||
msgstr "فعالسازی افزونهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1872
|
||||
msgid "Edit plugins"
|
||||
msgstr "ویرایش افزونهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1873
|
||||
msgid "Edit users"
|
||||
msgstr "ویرایش کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1874
|
||||
msgid "Edit files"
|
||||
msgstr "ویرایش فایلها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1875
|
||||
msgid "Manage options"
|
||||
msgstr "مدیریت تنظیمات"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1876
|
||||
msgid "Moderate comments"
|
||||
msgstr "مدیریت دیدگاهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1877
|
||||
msgid "Manage categories"
|
||||
msgstr "مدیریت دستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1878
|
||||
msgid "Manage links"
|
||||
msgstr "مدیریت پیوندها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1879
|
||||
msgid "Upload files"
|
||||
msgstr "بارگذاری فایلها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1880
|
||||
msgid "Import"
|
||||
msgstr "درونریزی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1881
|
||||
msgid "Unfiltered html"
|
||||
msgstr "اچتیامال فیلترنشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1882
|
||||
msgid "Edit posts"
|
||||
msgstr "ویرایش نوشتهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1883
|
||||
msgid "Edit others posts"
|
||||
msgstr "ویرایش نوشتهی دیگران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1884
|
||||
msgid "Edit published posts"
|
||||
msgstr "ویرایش نوشتههای منتشرشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1885
|
||||
msgid "Publish posts"
|
||||
msgstr "انتشار نوشتهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1886
|
||||
msgid "Edit pages"
|
||||
msgstr "ویرایش صفحات"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1887
|
||||
msgid "Read"
|
||||
msgstr "خواندن"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1888
|
||||
msgid "Level 10"
|
||||
msgstr "سطح ۱۰"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1889
|
||||
msgid "Level 9"
|
||||
msgstr "سطح ۹"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1890
|
||||
msgid "Level 8"
|
||||
msgstr "سطح ۸"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1891
|
||||
msgid "Level 7"
|
||||
msgstr "سطح ۷"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1892
|
||||
msgid "Level 6"
|
||||
msgstr "سطح ۶"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1893
|
||||
msgid "Level 5"
|
||||
msgstr "سطح ۵"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1894
|
||||
msgid "Level 4"
|
||||
msgstr "سطح ۴"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1895
|
||||
msgid "Level 3"
|
||||
msgstr "سطح ۳"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1896
|
||||
msgid "Level 2"
|
||||
msgstr "سطح ۲"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1897
|
||||
msgid "Level 1"
|
||||
msgstr "سطح ۱"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1898
|
||||
msgid "Level 0"
|
||||
msgstr "سطح ۰"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1899
|
||||
msgid "Edit others pages"
|
||||
msgstr "ویرایش صفحات دیگران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1900
|
||||
msgid "Edit published pages"
|
||||
msgstr "ویرایش صفحات منتشرشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1901
|
||||
msgid "Publish pages"
|
||||
msgstr "انتشار صفحات"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1902
|
||||
msgid "Delete pages"
|
||||
msgstr "حذف صفحات"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1903
|
||||
msgid "Delete others pages"
|
||||
msgstr "حذف صفحات دیگران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1904
|
||||
msgid "Delete published pages"
|
||||
msgstr "حذف صفحات منتشرشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1905
|
||||
msgid "Delete posts"
|
||||
msgstr "حذف صفحات"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1906
|
||||
msgid "Delete others posts"
|
||||
msgstr "حذف نوشتههای دیگران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1907
|
||||
msgid "Delete published posts"
|
||||
msgstr "حذف نوشتههای منتشرشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1908
|
||||
msgid "Delete private posts"
|
||||
msgstr "حذف نوشتههای خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1909
|
||||
msgid "Edit private posts"
|
||||
msgstr "ویرایش نوشتههای خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1910
|
||||
msgid "Read private posts"
|
||||
msgstr "خواندن نوشتههای خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1911
|
||||
msgid "Delete private pages"
|
||||
msgstr "حذف صفحات خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1912
|
||||
msgid "Edit private pages"
|
||||
msgstr "ویرایش صفحات خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1913
|
||||
msgid "Read private pages"
|
||||
msgstr "خواندن صفحات خصوصی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1914
|
||||
msgid "Delete users"
|
||||
msgstr "حذف کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1915
|
||||
msgid "Create users"
|
||||
msgstr "ایجاد کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1916
|
||||
msgid "Unfiltered upload"
|
||||
msgstr "بارگذاری فیلترشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1917
|
||||
msgid "Edit dashboard"
|
||||
msgstr "ویرایش پیشخوان"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1918
|
||||
msgid "Update plugins"
|
||||
msgstr "بروزرسانی افزونهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1919
|
||||
msgid "Delete plugins"
|
||||
msgstr "حذف افزونهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1920
|
||||
msgid "Install plugins"
|
||||
msgstr "نصب افزونهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1921
|
||||
msgid "Update themes"
|
||||
msgstr "بروزرسانی پوستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1922
|
||||
msgid "Install themes"
|
||||
msgstr "نصب پوستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1923
|
||||
msgid "Update core"
|
||||
msgstr "بروزرسانی هسته"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1924
|
||||
msgid "List users"
|
||||
msgstr "فهرست کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1925
|
||||
msgid "Remove users"
|
||||
msgstr "حذف کابران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1926
|
||||
msgid "Add users"
|
||||
msgstr "افزودن کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1927
|
||||
msgid "Promote users"
|
||||
msgstr "ارتقاء کاربران"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1928
|
||||
msgid "Edit theme options"
|
||||
msgstr "ویرایش تنظیمات پوسته"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1929
|
||||
msgid "Delete themes"
|
||||
msgstr "حذف پوستهها"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1930
|
||||
msgid "Export"
|
||||
msgstr "برونریزی"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2040
|
||||
msgid "Error: Capability name must contain latin characters and digits only!"
|
||||
msgstr "خطا: نام قابلیت باید فقط شامل حروف لاتین و اعداد باشد!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2053
|
||||
#, php-format
|
||||
msgid "Capability %s is added successfully"
|
||||
msgstr "قابلیت %s با موفقیت افزوده شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2055
|
||||
#, php-format
|
||||
msgid "Capability %s exists already"
|
||||
msgstr "قابلیت %s از پیش موجود است"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2080
|
||||
#, php-format
|
||||
msgid "Error! You do not have permission to delete this capability: %s!"
|
||||
msgstr "خطا! شما اجازهی حذف این قابلیت را ندارید: %s!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2099
|
||||
#, php-format
|
||||
msgid "Capability %s is removed successfully"
|
||||
msgstr "قابلیت %s با موفقیت حذف شد"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2203
|
||||
msgid "Version:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2204
|
||||
msgid "Author's website"
|
||||
msgstr "وبگاه نویسنده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2205
|
||||
msgid "Plugin webpage"
|
||||
msgstr "صفحه افزونه"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2206
|
||||
msgid "Plugin download"
|
||||
msgstr "بارگیری افزونه"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2208
|
||||
msgid "FAQ"
|
||||
msgstr "سوالات مکرر"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2256
|
||||
msgid "None"
|
||||
msgstr "هیچکدام"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2283
|
||||
msgid "Delete All Unused Roles"
|
||||
msgstr "حذف همهی نقشهای استفادهنشده"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2307
|
||||
msgid "— No role for this site —"
|
||||
msgstr "— هیچ نقشی برای این سایت —"
|
||||
|
||||
#: ../includes/ure-user-edit.php:31
|
||||
msgid "Network Super Admin"
|
||||
msgstr "مدیر اصلی شبکه"
|
||||
|
||||
#: ../includes/ure-user-edit.php:34
|
||||
msgid "Change capabilities for user"
|
||||
msgstr "تغییر قابلیتها برای کاربر"
|
||||
|
||||
#: ../includes/ure-user-edit.php:71
|
||||
msgid "Primary Role:"
|
||||
msgstr "نقش اولیه:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:81
|
||||
msgid "bbPress Role:"
|
||||
msgstr "نقش بیبیپرس:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:91
|
||||
msgid "Other Roles:"
|
||||
msgstr "دیگر نقشها:"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:16
|
||||
msgid ""
|
||||
"turn this option on in order to make the \"Administrator\" role available at "
|
||||
"the User Role Editor roles selection drop-down list. It is hidden by default "
|
||||
"for security reasons."
|
||||
msgstr ""
|
||||
"روشن کردن این گزینه به منظور قابل دسترس شدن نقش \"مدیر\" در فهرست کشویی "
|
||||
"ویرایشگر نقش کاربر میباشد. این امکان به صورت پیشفرض به دلیل مسائل امنیتی "
|
||||
"مخفی میباشد."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:19
|
||||
msgid ""
|
||||
"automatically converts capability names from the technical form for internal "
|
||||
"use like \"edit_others_posts\" to more user friendly form, e.g. \"Edit "
|
||||
"others posts\"."
|
||||
msgstr ""
|
||||
"به طور خودکار نام قابلیتها را از حالت فنی به منظور استفادههای داخلی تبدیل "
|
||||
"میکند. مانند \"edit_others_posts\" به حالت کاربر پسندتر، مثلا \"ویرایش "
|
||||
"نوشتههای دیگران\"."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:22
|
||||
msgid ""
|
||||
"Capabilities like \"level_0\", \"level_1\" are deprecated and are not used "
|
||||
"by WordPress. They are left at the user roles for the compatibility purpose "
|
||||
"with the old themes and plugins code. Turning on this option will show those "
|
||||
"deprecated capabilities."
|
||||
msgstr ""
|
||||
"قابلیتهایی شبیه \"سطح ۰\"، \"سطح ۱\" بد دانسته شدهاند و توسط وردپرس استفاده "
|
||||
"نمیشوند. این قابلیتها در نقشهای کاربران به منظور سازگاری با پوستههای قدیمی و "
|
||||
"کد افزونهها باقی گذاشته شدهاند. روشن کردن این گزینه، آن قابلیتهای بد دانسته "
|
||||
"شده را نمایش میدهد."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:27
|
||||
msgid "Allow create, edit and delete users to not super-admininstrators"
|
||||
msgstr "اجازهی ایجاد، ویرایش و حذف کاربران به غیر مدیران اصلی"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:28
|
||||
msgid ""
|
||||
"Super administrator only may create, edit and delete users under WordPress "
|
||||
"multi-site. Turn this option on in order to remove this limitation."
|
||||
msgstr ""
|
||||
"در وردپرس چند سایتی تنها مدیران اصلی اجازهی ایجاد، ویرایش و حذف کاربران را "
|
||||
"دارند. این "
|
||||
@@ -0,0 +1,824 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: User Role Editor 2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-11 11:20+0700\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
|
||||
"Language-Team: http://al-badar.net <nasrulhaq81@gmail.com>\n"
|
||||
"Language: id_ID\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;esc_html__\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../includes/settings-template.php:17
|
||||
#, fuzzy
|
||||
msgid "User Role Editor - Options"
|
||||
msgstr "User Role Editor"
|
||||
|
||||
#: ../includes/settings-template.php:21
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:22
|
||||
msgid "Additional Modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:23
|
||||
#, fuzzy
|
||||
msgid "Default Roles"
|
||||
msgstr "Peran "
|
||||
|
||||
#: ../includes/settings-template.php:27
|
||||
msgid "Multisite"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:31
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:42
|
||||
#: ../includes/class-ure-screen-help.php:15
|
||||
msgid "Show Administrator role at User Role Editor"
|
||||
msgstr "Tampilkan peran Administrator di User Role Editor"
|
||||
|
||||
#: ../includes/settings-template.php:50
|
||||
#: ../includes/class-ure-screen-help.php:18
|
||||
msgid "Show capabilities in the human readable form"
|
||||
msgstr "Tampilkan kemampuan dalam bentuk yang dapat dibaca manusia"
|
||||
|
||||
#: ../includes/settings-template.php:58 ../includes/ure-role-edit.php:40
|
||||
#: ../includes/ure-user-edit.php:63 ../includes/class-ure-screen-help.php:21
|
||||
msgid "Show deprecated capabilities"
|
||||
msgstr "Tampilkan kemampuan usang"
|
||||
|
||||
#: ../includes/settings-template.php:69 ../includes/settings-template.php:101
|
||||
#: ../includes/settings-template.php:131 ../includes/settings-template.php:160
|
||||
msgid "Save"
|
||||
msgstr "Simpan"
|
||||
|
||||
#: ../includes/settings-template.php:86
|
||||
msgid "Count users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:111
|
||||
#, fuzzy
|
||||
msgid "Primary default role: "
|
||||
msgstr "Peran Utama:"
|
||||
|
||||
#: ../includes/settings-template.php:118
|
||||
msgid "Other default roles for new registered user: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:124
|
||||
msgid ""
|
||||
"Note for multisite environment: take into account that other default roles "
|
||||
"should exist at the site, in order to be assigned to the new registered "
|
||||
"users."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:147
|
||||
msgid "Allow non super administrators to create, edit, and delete users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:185
|
||||
msgid "Change role for users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:186
|
||||
msgid "No rights"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:187
|
||||
msgid "Provide new role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:271
|
||||
#: ../includes/class-user-role-editor.php:273
|
||||
msgid "You do not have permission to edit this user."
|
||||
msgstr "Anda tidak diizinkan untuk menyunting user ini. "
|
||||
|
||||
#: ../includes/class-user-role-editor.php:414
|
||||
msgid "Capabilities"
|
||||
msgstr "Kemampuan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:507
|
||||
msgid "Settings"
|
||||
msgstr "Pengaturan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:520
|
||||
#: ../includes/class-ure-lib.php:2207
|
||||
msgid "Changelog"
|
||||
msgstr "log Perubahan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:542
|
||||
msgid "Overview"
|
||||
msgstr "Ikhtisar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:551
|
||||
#: ../includes/class-user-role-editor.php:579
|
||||
#: ../includes/class-user-role-editor.php:890
|
||||
#: ../includes/class-ure-lib.php:225
|
||||
msgid "User Role Editor"
|
||||
msgstr "User Role Editor"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:636
|
||||
#: ../includes/class-user-role-editor.php:654
|
||||
#: ../includes/class-user-role-editor.php:698
|
||||
msgid "User Role Editor options are updated"
|
||||
msgstr "Pilihan User Role Editor diperbarui"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:682
|
||||
#, fuzzy
|
||||
msgid "Default Roles are updated"
|
||||
msgstr "Peran "
|
||||
|
||||
#: ../includes/class-user-role-editor.php:706
|
||||
msgid ""
|
||||
"You do not have sufficient permissions to manage options for User Role "
|
||||
"Editor."
|
||||
msgstr ""
|
||||
"Anda tidak memiliki izin yang memadai untuk mengelola pilihan User Role "
|
||||
"Editor."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:781
|
||||
msgid "Insufficient permissions to work with User Role Editor"
|
||||
msgstr "Izin yang tidak sesuai untuk bekerja dengan User Role Editor"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:835
|
||||
msgid "Select All"
|
||||
msgstr "Pilih Semua"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:836
|
||||
msgid "Unselect All"
|
||||
msgstr "Batalkan Semua"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:837
|
||||
msgid "Reverse"
|
||||
msgstr "Memutar"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:838
|
||||
msgid "Update"
|
||||
msgstr "Pembaruan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:839
|
||||
msgid "Please confirm permissions update"
|
||||
msgstr "Harap konfirmasi pembaruan izin"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:840
|
||||
msgid "Add New Role"
|
||||
msgstr "Tambah Peran Baru"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:841
|
||||
msgid " Role name (ID) can not be empty!"
|
||||
msgstr "Nama peran (ID) tidak boleh kosong!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:842
|
||||
msgid ""
|
||||
" Role name (ID) must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
"Nama peran (ID) harus berisi karakter latin, angka, tanda hubung atau garis "
|
||||
"bawah saja!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:843
|
||||
msgid ""
|
||||
" WordPress does not support numeric Role name (ID). Add latin characters to "
|
||||
"it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:844
|
||||
msgid "Add Role"
|
||||
msgstr "Tambah Peran"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:845
|
||||
msgid "Delete Role"
|
||||
msgstr "Hapus Peran"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:846
|
||||
msgid "Cancel"
|
||||
msgstr "Batalkan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:847
|
||||
msgid "Add Capability"
|
||||
msgstr "Tambah Kemampuan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:848
|
||||
#: ../includes/class-user-role-editor.php:857
|
||||
msgid "Delete Capability"
|
||||
msgstr "Hapus Kemampuan"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:849
|
||||
msgid "Reset"
|
||||
msgstr "Atur Ulang"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:850
|
||||
msgid "DANGER! Resetting will restore default settings from WordPress Core."
|
||||
msgstr ""
|
||||
"BAHAYA! Reset akan mengembalikan pengaturan default dari WordPress Inti."
|
||||
|
||||
#: ../includes/class-user-role-editor.php:851
|
||||
msgid ""
|
||||
"If any plugins have changed capabilities in any way upon installation (such "
|
||||
"as S2Member, WooCommerce, and many more), those capabilities will be DELETED!"
|
||||
msgstr ""
|
||||
"Jika ada plugin telah mengubah kemampuan dengan cara apapun atas instalasi "
|
||||
"(seperti S2Member, WooCommerce, dan banyak lagi), kemampuan mereka akan "
|
||||
"DIHAPUS!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:852
|
||||
msgid ""
|
||||
"For more information on how to undo changes and restore plugin capabilities "
|
||||
"go to"
|
||||
msgstr ""
|
||||
"Untuk informasi lebih lanjut tentang cara membatalkan perubahan dan "
|
||||
"mengembalikan kemampuan Plugin pergi ke"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:854
|
||||
msgid "Continue?"
|
||||
msgstr "Lanjut?"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:855
|
||||
msgid "Default Role"
|
||||
msgstr "Peran "
|
||||
|
||||
#: ../includes/class-user-role-editor.php:856
|
||||
msgid "Set New Default Role"
|
||||
msgstr "Atur Peran Baru Default"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:858
|
||||
msgid ""
|
||||
"Warning! Be careful - removing critical capability could crash some plugin "
|
||||
"or other custom code"
|
||||
msgstr ""
|
||||
"Peringatan! Hati-hati - menghapus kemampuan kritis dapat menyebabkan crash "
|
||||
"beberapa Plugin atau kode kustom lainnya"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:859
|
||||
msgid " Capability name (ID) can not be empty!"
|
||||
msgstr "Nama Kemampuan (ID) tidak boleh kosong!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:860
|
||||
msgid ""
|
||||
" Capability name (ID) must contain latin characters, digits, hyphens or "
|
||||
"underscore only!"
|
||||
msgstr ""
|
||||
"Nama Kemampuan (ID) harus mengandung karakter latin, angka, kata penghubung "
|
||||
"atau garis bawah saja!"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:893
|
||||
#: ../includes/class-user-role-editor.php:922
|
||||
msgid "Other Roles"
|
||||
msgstr "Peran Lainnya"
|
||||
|
||||
#: ../includes/class-user-role-editor.php:904
|
||||
msgid "Edit"
|
||||
msgstr "Sunting"
|
||||
|
||||
#: ../includes/ure-role-edit.php:17
|
||||
#, fuzzy
|
||||
msgid "Select Role and change its capabilities:"
|
||||
msgstr "Pilih Peran dan ubah daftar kemampuan"
|
||||
|
||||
#: ../includes/ure-role-edit.php:30 ../includes/ure-user-edit.php:53
|
||||
msgid "Show capabilities in human readable form"
|
||||
msgstr "Tampilkan kemampuan dalam bentuk yang dapat dibaca manusia"
|
||||
|
||||
#: ../includes/ure-role-edit.php:44
|
||||
msgid "If checked, then apply action to ALL sites of this Network"
|
||||
msgstr ""
|
||||
"Jika dicentang, kemudian terapkan tindakan untuk SEMUA situs Jaringan ini"
|
||||
|
||||
#: ../includes/ure-role-edit.php:56
|
||||
msgid "Apply to All Sites"
|
||||
msgstr "Terapkan ke Semua Situs"
|
||||
|
||||
#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109
|
||||
msgid "Core capabilities:"
|
||||
msgstr "Kemampuan inti:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:65 ../includes/ure-user-edit.php:111
|
||||
msgid "Quick filter:"
|
||||
msgstr "Saring Cepat:"
|
||||
|
||||
#: ../includes/ure-role-edit.php:83 ../includes/ure-user-edit.php:130
|
||||
msgid "Custom capabilities:"
|
||||
msgstr "Kustom kemampuan:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:143
|
||||
msgid "Error: wrong request"
|
||||
msgstr "Salah: salah permintaan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:175
|
||||
msgid "Role name (ID): "
|
||||
msgstr "Nama Peran (ID):"
|
||||
|
||||
#: ../includes/class-ure-lib.php:177
|
||||
msgid "Display Role Name: "
|
||||
msgstr "Tampilkan Nama Peran:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:179
|
||||
msgid "Make copy of: "
|
||||
msgstr "buat salinan:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:186
|
||||
msgid "Select Role:"
|
||||
msgstr "Pilih Peran:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:201
|
||||
msgid "Delete:"
|
||||
msgstr "Hapus:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:208
|
||||
msgid "Capability name (ID): "
|
||||
msgstr "Nama Kemampuan (ID):"
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Error: "
|
||||
msgstr "Salah:"
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Role"
|
||||
msgstr "Peran"
|
||||
|
||||
#: ../includes/class-ure-lib.php:323
|
||||
msgid "does not exist"
|
||||
msgstr "tidak ada"
|
||||
|
||||
#: ../includes/class-ure-lib.php:366
|
||||
msgid "Role is updated successfully"
|
||||
msgstr "Peran berhasil diperbarui"
|
||||
|
||||
#: ../includes/class-ure-lib.php:368
|
||||
msgid "Roles are updated for all network"
|
||||
msgstr "Peran diperbarui untuk semua jaringan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:374
|
||||
msgid "Error occured during role(s) update"
|
||||
msgstr "Kesalahan terjadi selama pembaruan peran"
|
||||
|
||||
#: ../includes/class-ure-lib.php:381
|
||||
msgid "User capabilities are updated successfully"
|
||||
msgstr "Kemampuan pengguna berhasil diperbarui"
|
||||
|
||||
#: ../includes/class-ure-lib.php:386
|
||||
msgid "Error occured during user update"
|
||||
msgstr "Kesalahan terjadi sepanjang pembaruan pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:441
|
||||
msgid "User Roles are restored to WordPress default values. "
|
||||
msgstr "Peran Pengguna dikembalikan ke nilai Wordpress default."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1312
|
||||
msgid "Help"
|
||||
msgstr "Bantuan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1662
|
||||
msgid "Error is occur. Please check the log file."
|
||||
msgstr "kesalahan terjadi, Harap periksa log data."
|
||||
|
||||
#: ../includes/class-ure-lib.php:1705
|
||||
msgid ""
|
||||
"Error: Role ID must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
"Kesalahan: ID Peran harus mengandung karakter latin, angka, kata penghubung "
|
||||
"dan garis bawah saja!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1709
|
||||
msgid ""
|
||||
"Error: WordPress does not support numeric Role name (ID). Add latin "
|
||||
"characters to it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1724
|
||||
#, php-format
|
||||
msgid "Role %s exists already"
|
||||
msgstr "Peran %s telah ada"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1739
|
||||
msgid "Error is encountered during new role create operation"
|
||||
msgstr "Kesalahan ditemui selama peran baru membuat operasi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1741
|
||||
#, php-format
|
||||
msgid "Role %s is created successfully"
|
||||
msgstr "Peran %s berhasil dibuat"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1810
|
||||
msgid "Error encountered during role delete operation"
|
||||
msgstr "Kesalahan ditemui selama operasi penghapusan peran"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1812
|
||||
msgid "Unused roles are deleted successfully"
|
||||
msgstr "Peran yang tidak digunakan berhasil dihapus"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1814
|
||||
#, php-format
|
||||
msgid "Role %s is deleted successfully"
|
||||
msgstr "Peran %s berhasil dihapus"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1839
|
||||
msgid "Error encountered during default role change operation"
|
||||
msgstr "Kesalahan ditemui selama operasi perubahan peran standar"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1845
|
||||
#, php-format
|
||||
msgid "Default role for new users is set to %s successfully"
|
||||
msgstr "Peran standar untuk pengguna baru diatur ke %s dengan sukses"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1864
|
||||
msgid "Editor"
|
||||
msgstr "Penyunting"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1865
|
||||
msgid "Author"
|
||||
msgstr "Pengarang"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1866
|
||||
msgid "Contributor"
|
||||
msgstr "Kontributor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1867
|
||||
msgid "Subscriber"
|
||||
msgstr "Pelanggan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1869
|
||||
msgid "Switch themes"
|
||||
msgstr "Ganti tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1870
|
||||
msgid "Edit themes"
|
||||
msgstr "Sunting tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1871
|
||||
msgid "Activate plugins"
|
||||
msgstr "Aktifkan plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1872
|
||||
msgid "Edit plugins"
|
||||
msgstr "Sunting plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1873
|
||||
msgid "Edit users"
|
||||
msgstr "Sunting pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1874
|
||||
msgid "Edit files"
|
||||
msgstr "Sunting data"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1875
|
||||
msgid "Manage options"
|
||||
msgstr "kelola pilihan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1876
|
||||
msgid "Moderate comments"
|
||||
msgstr "Moderasi komentar"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1877
|
||||
msgid "Manage categories"
|
||||
msgstr "Kelola kategori"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1878
|
||||
msgid "Manage links"
|
||||
msgstr "Kelola tautan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1879
|
||||
msgid "Upload files"
|
||||
msgstr "Unggah data"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1880
|
||||
msgid "Import"
|
||||
msgstr "Impor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1881
|
||||
msgid "Unfiltered html"
|
||||
msgstr "HTML tidak tersaring"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1882
|
||||
msgid "Edit posts"
|
||||
msgstr "Sunting posting"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1883
|
||||
msgid "Edit others posts"
|
||||
msgstr "Sunting posting lainnya"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1884
|
||||
msgid "Edit published posts"
|
||||
msgstr "Sunting posting terpublikasi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1885
|
||||
msgid "Publish posts"
|
||||
msgstr "Publikasi posting"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1886
|
||||
msgid "Edit pages"
|
||||
msgstr "Sunting halaman"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1887
|
||||
msgid "Read"
|
||||
msgstr "Baca"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1888
|
||||
msgid "Level 10"
|
||||
msgstr "Tingkat 10"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1889
|
||||
msgid "Level 9"
|
||||
msgstr "Tingkat 9"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1890
|
||||
msgid "Level 8"
|
||||
msgstr "Tingkat 8"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1891
|
||||
msgid "Level 7"
|
||||
msgstr "Tingkat 7"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1892
|
||||
msgid "Level 6"
|
||||
msgstr "Tingkat 6"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1893
|
||||
msgid "Level 5"
|
||||
msgstr "Tingkat 5"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1894
|
||||
msgid "Level 4"
|
||||
msgstr "Tingkat 4"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1895
|
||||
msgid "Level 3"
|
||||
msgstr "Tingkat 3"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1896
|
||||
msgid "Level 2"
|
||||
msgstr "Tingkat 2"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1897
|
||||
msgid "Level 1"
|
||||
msgstr "Tingkat 1"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1898
|
||||
msgid "Level 0"
|
||||
msgstr "Tingkat 0"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1899
|
||||
msgid "Edit others pages"
|
||||
msgstr "Sunting halaman lainnya"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1900
|
||||
msgid "Edit published pages"
|
||||
msgstr "Sunting halaman terpublikasi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1901
|
||||
msgid "Publish pages"
|
||||
msgstr "Publikasi halaman"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1902
|
||||
msgid "Delete pages"
|
||||
msgstr "Hapus halaman"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1903
|
||||
msgid "Delete others pages"
|
||||
msgstr "Hapus halaman lainnya"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1904
|
||||
msgid "Delete published pages"
|
||||
msgstr "Hapus halaman terpublikasi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1905
|
||||
msgid "Delete posts"
|
||||
msgstr "hapus posting"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1906
|
||||
msgid "Delete others posts"
|
||||
msgstr "Hapus posting lainnya"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1907
|
||||
msgid "Delete published posts"
|
||||
msgstr "Hapus posting terpublikasi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1908
|
||||
msgid "Delete private posts"
|
||||
msgstr "Hapus posting pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1909
|
||||
msgid "Edit private posts"
|
||||
msgstr "Sunting posting pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1910
|
||||
msgid "Read private posts"
|
||||
msgstr "Baca posting pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1911
|
||||
msgid "Delete private pages"
|
||||
msgstr "Hapus halaman pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1912
|
||||
msgid "Edit private pages"
|
||||
msgstr "Sunting halaman pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1913
|
||||
msgid "Read private pages"
|
||||
msgstr "baca halaman pribadi"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1914
|
||||
msgid "Delete users"
|
||||
msgstr "Hapus pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1915
|
||||
msgid "Create users"
|
||||
msgstr "Buat pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1916
|
||||
msgid "Unfiltered upload"
|
||||
msgstr "Unggahan tidak tersaring"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1917
|
||||
msgid "Edit dashboard"
|
||||
msgstr "Sunting dasbor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1918
|
||||
msgid "Update plugins"
|
||||
msgstr "Perbarui plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1919
|
||||
msgid "Delete plugins"
|
||||
msgstr "Hapus plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1920
|
||||
msgid "Install plugins"
|
||||
msgstr "Pasang plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1921
|
||||
msgid "Update themes"
|
||||
msgstr "Perbarui tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1922
|
||||
msgid "Install themes"
|
||||
msgstr "Pasang tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1923
|
||||
msgid "Update core"
|
||||
msgstr "Perbarui inti"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1924
|
||||
msgid "List users"
|
||||
msgstr "Daftar pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1925
|
||||
msgid "Remove users"
|
||||
msgstr "Hapus pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1926
|
||||
msgid "Add users"
|
||||
msgstr "Tambah pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1927
|
||||
msgid "Promote users"
|
||||
msgstr "Promosi pengguna"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1928
|
||||
msgid "Edit theme options"
|
||||
msgstr "Sunting pilihan tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1929
|
||||
msgid "Delete themes"
|
||||
msgstr "Hapus tema"
|
||||
|
||||
#: ../includes/class-ure-lib.php:1930
|
||||
msgid "Export"
|
||||
msgstr "Ekspor"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2040
|
||||
msgid "Error: Capability name must contain latin characters and digits only!"
|
||||
msgstr "Salah: Kemampuan nama harus mengandung karakter latin dan angka saja!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2053
|
||||
#, php-format
|
||||
msgid "Capability %s is added successfully"
|
||||
msgstr "Kemampuan %s berhasil ditambahkan"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2055
|
||||
#, php-format
|
||||
msgid "Capability %s exists already"
|
||||
msgstr "Kemampuan %s telah ada"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2080
|
||||
#, php-format
|
||||
msgid "Error! You do not have permission to delete this capability: %s!"
|
||||
msgstr "Salah! Anda tidak memiliki izin untuk menghapus kemampuan ini: %s!"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2099
|
||||
#, php-format
|
||||
msgid "Capability %s is removed successfully"
|
||||
msgstr "Kemampuan %s berhasil dihapus"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2203
|
||||
msgid "Version:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2204
|
||||
msgid "Author's website"
|
||||
msgstr "Website pengarang"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2205
|
||||
msgid "Plugin webpage"
|
||||
msgstr "Halaman web Plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2206
|
||||
#, fuzzy
|
||||
msgid "Plugin download"
|
||||
msgstr "Halaman web Plugin"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2208
|
||||
msgid "FAQ"
|
||||
msgstr "FAQ"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2256
|
||||
msgid "None"
|
||||
msgstr "Nihil"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2283
|
||||
msgid "Delete All Unused Roles"
|
||||
msgstr "Hapus Peran Tidak Terpakai"
|
||||
|
||||
#: ../includes/class-ure-lib.php:2307
|
||||
msgid "— No role for this site —"
|
||||
msgstr "— Tidak ada peran untuk situs ini —"
|
||||
|
||||
#: ../includes/ure-user-edit.php:31
|
||||
msgid "Network Super Admin"
|
||||
msgstr "Jaringan Super Admin"
|
||||
|
||||
#: ../includes/ure-user-edit.php:34
|
||||
msgid "Change capabilities for user"
|
||||
msgstr "Ubah kemampuan untuk pengguna"
|
||||
|
||||
#: ../includes/ure-user-edit.php:71
|
||||
msgid "Primary Role:"
|
||||
msgstr "Peran Utama:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:81
|
||||
msgid "bbPress Role:"
|
||||
msgstr "Peran bbPress:"
|
||||
|
||||
#: ../includes/ure-user-edit.php:91
|
||||
msgid "Other Roles:"
|
||||
msgstr "Peran Lain:"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:16
|
||||
msgid ""
|
||||
"turn this option on in order to make the \"Administrator\" role available at "
|
||||
"the User Role Editor roles selection drop-down list. It is hidden by default "
|
||||
"for security reasons."
|
||||
msgstr ""
|
||||
"Aktifkan pilihan ini untuk membuat peran \"Administrator\" tersedia pada "
|
||||
"daftar seleksi pilihan peran User Role Editor. Akan tersembunyi secara "
|
||||
"default demi alasan keamanan."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:19
|
||||
msgid ""
|
||||
"automatically converts capability names from the technical form for internal "
|
||||
"use like \"edit_others_posts\" to more user friendly form, e.g. \"Edit "
|
||||
"others posts\"."
|
||||
msgstr ""
|
||||
"secara otomatis mengkonversi nama kemampuan dari bentuk teknis untuk "
|
||||
"penggunaan internal seperti \"edit_others_posts\" ke bentuk yang lebih user "
|
||||
"friendly, misalnya \"Edit posting orang lain\"."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:22
|
||||
msgid ""
|
||||
"Capabilities like \"level_0\", \"level_1\" are deprecated and are not used "
|
||||
"by WordPress. They are left at the user roles for the compatibility purpose "
|
||||
"with the old themes and plugins code. Turning on this option will show those "
|
||||
"deprecated capabilities."
|
||||
msgstr ""
|
||||
"Kemampuan seperti \"level_0 \", \"level_1\" yang usang dan tidak digunakan "
|
||||
"oleh WordPress. Mereka tersisa pada peran pengguna untuk tujuan "
|
||||
"kompatibilitas dengan tema lama dan kode plugin. Menyalakan opsi ini akan "
|
||||
"menunjukkan kemampuan mereka usang."
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:27
|
||||
msgid "Allow create, edit and delete users to not super-admininstrators"
|
||||
msgstr ""
|
||||
"Izinkan membuat, menyunting dan menghapus pengguna untuk yang bukan super-"
|
||||
"administrator"
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:28
|
||||
msgid ""
|
||||
"Super administrator only may create, edit and delete users under WordPress "
|
||||
"multi-site. Turn this option on in order to remove this limitation."
|
||||
msgstr ""
|
||||
"Super administrator hanya dapat membuat, mengedit dan menghapus pengguna di "
|
||||
"bawah WordPress multi-situs. Aktifkan pilihan ini dalam rangka menghapus "
|
||||
"keterbatasan ini."
|
||||
|
||||
#~ msgid "About this Plugin:"
|
||||
#~ msgstr "Tentang Plugin ini:"
|
||||
@@ -0,0 +1,783 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: User Role Editor 2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-11 11:20+0700\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
|
||||
"Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
|
||||
"Language: en_RU\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../includes/settings-template.php:17
|
||||
msgid "User Role Editor - Options"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:21
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:22
|
||||
msgid "Additional Modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:23
|
||||
msgid "Default Roles"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:27
|
||||
msgid "Multisite"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:31
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:42
|
||||
#: ../includes/class-ure-screen-help.php:15
|
||||
msgid "Show Administrator role at User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:50
|
||||
#: ../includes/class-ure-screen-help.php:18
|
||||
msgid "Show capabilities in the human readable form"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:58 ../includes/ure-role-edit.php:40
|
||||
#: ../includes/ure-user-edit.php:63 ../includes/class-ure-screen-help.php:21
|
||||
msgid "Show deprecated capabilities"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:69 ../includes/settings-template.php:101
|
||||
#: ../includes/settings-template.php:131 ../includes/settings-template.php:160
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:86
|
||||
msgid "Count users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:111
|
||||
msgid "Primary default role: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:118
|
||||
msgid "Other default roles for new registered user: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:124
|
||||
msgid ""
|
||||
"Note for multisite environment: take into account that other default roles "
|
||||
"should exist at the site, in order to be assigned to the new registered "
|
||||
"users."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/settings-template.php:147
|
||||
msgid "Allow non super administrators to create, edit, and delete users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:185
|
||||
msgid "Change role for users without role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:186
|
||||
msgid "No rights"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:187
|
||||
msgid "Provide new role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:271
|
||||
#: ../includes/class-user-role-editor.php:273
|
||||
msgid "You do not have permission to edit this user."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:414
|
||||
msgid "Capabilities"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:507
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:520
|
||||
#: ../includes/class-ure-lib.php:2207
|
||||
msgid "Changelog"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:542
|
||||
msgid "Overview"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:551
|
||||
#: ../includes/class-user-role-editor.php:579
|
||||
#: ../includes/class-user-role-editor.php:890
|
||||
#: ../includes/class-ure-lib.php:225
|
||||
msgid "User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:636
|
||||
#: ../includes/class-user-role-editor.php:654
|
||||
#: ../includes/class-user-role-editor.php:698
|
||||
msgid "User Role Editor options are updated"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:682
|
||||
msgid "Default Roles are updated"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:706
|
||||
msgid ""
|
||||
"You do not have sufficient permissions to manage options for User Role "
|
||||
"Editor."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:781
|
||||
msgid "Insufficient permissions to work with User Role Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:835
|
||||
msgid "Select All"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:836
|
||||
msgid "Unselect All"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:837
|
||||
msgid "Reverse"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:838
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:839
|
||||
msgid "Please confirm permissions update"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:840
|
||||
msgid "Add New Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:841
|
||||
msgid " Role name (ID) can not be empty!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:842
|
||||
msgid ""
|
||||
" Role name (ID) must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:843
|
||||
msgid ""
|
||||
" WordPress does not support numeric Role name (ID). Add latin characters to "
|
||||
"it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:844
|
||||
msgid "Add Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:845
|
||||
msgid "Delete Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:846
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:847
|
||||
msgid "Add Capability"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:848
|
||||
#: ../includes/class-user-role-editor.php:857
|
||||
msgid "Delete Capability"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:849
|
||||
msgid "Reset"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:850
|
||||
msgid "DANGER! Resetting will restore default settings from WordPress Core."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:851
|
||||
msgid ""
|
||||
"If any plugins have changed capabilities in any way upon installation (such "
|
||||
"as S2Member, WooCommerce, and many more), those capabilities will be DELETED!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:852
|
||||
msgid ""
|
||||
"For more information on how to undo changes and restore plugin capabilities "
|
||||
"go to"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:854
|
||||
msgid "Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:855
|
||||
msgid "Default Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:856
|
||||
msgid "Set New Default Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:858
|
||||
msgid ""
|
||||
"Warning! Be careful - removing critical capability could crash some plugin "
|
||||
"or other custom code"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:859
|
||||
msgid " Capability name (ID) can not be empty!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:860
|
||||
msgid ""
|
||||
" Capability name (ID) must contain latin characters, digits, hyphens or "
|
||||
"underscore only!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:893
|
||||
#: ../includes/class-user-role-editor.php:922
|
||||
msgid "Other Roles"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-user-role-editor.php:904
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:17
|
||||
msgid "Select Role and change its capabilities:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:30 ../includes/ure-user-edit.php:53
|
||||
msgid "Show capabilities in human readable form"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:44
|
||||
msgid "If checked, then apply action to ALL sites of this Network"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:56
|
||||
msgid "Apply to All Sites"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109
|
||||
msgid "Core capabilities:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:65 ../includes/ure-user-edit.php:111
|
||||
msgid "Quick filter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-role-edit.php:83 ../includes/ure-user-edit.php:130
|
||||
msgid "Custom capabilities:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:143
|
||||
msgid "Error: wrong request"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:175
|
||||
msgid "Role name (ID): "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:177
|
||||
msgid "Display Role Name: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:179
|
||||
msgid "Make copy of: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:186
|
||||
msgid "Select Role:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:201
|
||||
msgid "Delete:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:208
|
||||
msgid "Capability name (ID): "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Error: "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:322
|
||||
msgid "Role"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:323
|
||||
msgid "does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:366
|
||||
msgid "Role is updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:368
|
||||
msgid "Roles are updated for all network"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:374
|
||||
msgid "Error occured during role(s) update"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:381
|
||||
msgid "User capabilities are updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:386
|
||||
msgid "Error occured during user update"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:441
|
||||
msgid "User Roles are restored to WordPress default values. "
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1312
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1662
|
||||
msgid "Error is occur. Please check the log file."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1705
|
||||
msgid ""
|
||||
"Error: Role ID must contain latin characters, digits, hyphens or underscore "
|
||||
"only!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1709
|
||||
msgid ""
|
||||
"Error: WordPress does not support numeric Role name (ID). Add latin "
|
||||
"characters to it."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1724
|
||||
#, php-format
|
||||
msgid "Role %s exists already"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1739
|
||||
msgid "Error is encountered during new role create operation"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1741
|
||||
#, php-format
|
||||
msgid "Role %s is created successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1810
|
||||
msgid "Error encountered during role delete operation"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1812
|
||||
msgid "Unused roles are deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1814
|
||||
#, php-format
|
||||
msgid "Role %s is deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1839
|
||||
msgid "Error encountered during default role change operation"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1845
|
||||
#, php-format
|
||||
msgid "Default role for new users is set to %s successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1864
|
||||
msgid "Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1865
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1866
|
||||
msgid "Contributor"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1867
|
||||
msgid "Subscriber"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1869
|
||||
msgid "Switch themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1870
|
||||
msgid "Edit themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1871
|
||||
msgid "Activate plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1872
|
||||
msgid "Edit plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1873
|
||||
msgid "Edit users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1874
|
||||
msgid "Edit files"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1875
|
||||
msgid "Manage options"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1876
|
||||
msgid "Moderate comments"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1877
|
||||
msgid "Manage categories"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1878
|
||||
msgid "Manage links"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1879
|
||||
msgid "Upload files"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1880
|
||||
msgid "Import"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1881
|
||||
msgid "Unfiltered html"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1882
|
||||
msgid "Edit posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1883
|
||||
msgid "Edit others posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1884
|
||||
msgid "Edit published posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1885
|
||||
msgid "Publish posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1886
|
||||
msgid "Edit pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1887
|
||||
msgid "Read"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1888
|
||||
msgid "Level 10"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1889
|
||||
msgid "Level 9"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1890
|
||||
msgid "Level 8"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1891
|
||||
msgid "Level 7"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1892
|
||||
msgid "Level 6"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1893
|
||||
msgid "Level 5"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1894
|
||||
msgid "Level 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1895
|
||||
msgid "Level 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1896
|
||||
msgid "Level 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1897
|
||||
msgid "Level 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1898
|
||||
msgid "Level 0"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1899
|
||||
msgid "Edit others pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1900
|
||||
msgid "Edit published pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1901
|
||||
msgid "Publish pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1902
|
||||
msgid "Delete pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1903
|
||||
msgid "Delete others pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1904
|
||||
msgid "Delete published pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1905
|
||||
msgid "Delete posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1906
|
||||
msgid "Delete others posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1907
|
||||
msgid "Delete published posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1908
|
||||
msgid "Delete private posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1909
|
||||
msgid "Edit private posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1910
|
||||
msgid "Read private posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1911
|
||||
msgid "Delete private pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1912
|
||||
msgid "Edit private pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1913
|
||||
msgid "Read private pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1914
|
||||
msgid "Delete users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1915
|
||||
msgid "Create users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1916
|
||||
msgid "Unfiltered upload"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1917
|
||||
msgid "Edit dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1918
|
||||
msgid "Update plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1919
|
||||
msgid "Delete plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1920
|
||||
msgid "Install plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1921
|
||||
msgid "Update themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1922
|
||||
msgid "Install themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1923
|
||||
msgid "Update core"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1924
|
||||
msgid "List users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1925
|
||||
msgid "Remove users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1926
|
||||
msgid "Add users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1927
|
||||
msgid "Promote users"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1928
|
||||
msgid "Edit theme options"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1929
|
||||
msgid "Delete themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:1930
|
||||
msgid "Export"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2040
|
||||
msgid "Error: Capability name must contain latin characters and digits only!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2053
|
||||
#, php-format
|
||||
msgid "Capability %s is added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2055
|
||||
#, php-format
|
||||
msgid "Capability %s exists already"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2080
|
||||
#, php-format
|
||||
msgid "Error! You do not have permission to delete this capability: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2099
|
||||
#, php-format
|
||||
msgid "Capability %s is removed successfully"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2203
|
||||
msgid "Version:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2204
|
||||
msgid "Author's website"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2205
|
||||
msgid "Plugin webpage"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2206
|
||||
msgid "Plugin download"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2208
|
||||
msgid "FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2256
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2283
|
||||
msgid "Delete All Unused Roles"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-lib.php:2307
|
||||
msgid "— No role for this site —"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:31
|
||||
msgid "Network Super Admin"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:34
|
||||
msgid "Change capabilities for user"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:71
|
||||
msgid "Primary Role:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:81
|
||||
msgid "bbPress Role:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/ure-user-edit.php:91
|
||||
msgid "Other Roles:"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:16
|
||||
msgid ""
|
||||
"turn this option on in order to make the \"Administrator\" role available at "
|
||||
"the User Role Editor roles selection drop-down list. It is hidden by default "
|
||||
"for security reasons."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:19
|
||||
msgid ""
|
||||
"automatically converts capability names from the technical form for internal "
|
||||
"use like \"edit_others_posts\" to more user friendly form, e.g. \"Edit "
|
||||
"others posts\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:22
|
||||
msgid ""
|
||||
"Capabilities like \"level_0\", \"level_1\" are deprecated and are not used "
|
||||
"by WordPress. They are left at the user roles for the compatibility purpose "
|
||||
"with the old themes and plugins code. Turning on this option will show those "
|
||||
"deprecated capabilities."
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:27
|
||||
msgid "Allow create, edit and delete users to not super-admininstrators"
|
||||
msgstr ""
|
||||
|
||||
#: ../includes/class-ure-screen-help.php:28
|
||||
msgid ""
|
||||
"Super administrator only may create, edit and delete users under WordPress "
|
||||
"multi-site. Turn this option on in order to remove this limitation."
|
||||
msgstr ""
|
||||
@@ -0,0 +1,375 @@
|
||||
User Role Editor WordPress plugin
|
||||
|
||||
Copyright 2009-2013 by Vladimir Garagulya - vladimir@shinephp.com
|
||||
|
||||
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
|
||||
|
||||
This program is based on the work covered by the following copyright and
|
||||
permission notices:
|
||||
|
||||
WordPress - Web publishing software
|
||||
|
||||
Copyright 2003-2010 by the contributors
|
||||
|
||||
WordPress is released under the GPL
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
WRITTEN OFFER
|
||||
|
||||
The source code for any program binaries or compressed scripts that are
|
||||
included with WordPress can be freely obtained at the following URL:
|
||||
|
||||
http://wordpress.org/download/source/
|
||||
@@ -0,0 +1,178 @@
|
||||
=== User Role Editor ===
|
||||
Contributors: shinephp
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=vladimir%40shinephp%2ecom&lc=RU&item_name=ShinePHP%2ecom&item_number=User%20Role%20Editor%20WordPress%20plugin¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
||||
Tags: user, role, editor, security, access, permission, capability
|
||||
Requires at least: 3.5
|
||||
Tested up to: 3.9.1
|
||||
Stable tag: trunk
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any WordPress user role.
|
||||
|
||||
== Description ==
|
||||
|
||||
With User Role Editor WordPress plugin you can change user role (except Administrator) capabilities easy, with a few clicks.
|
||||
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.
|
||||
Add new roles and customize its capabilities according to your needs, from scratch of as a copy of other existing role.
|
||||
Unnecessary self-made role can be deleted if there are no users whom such role is assigned.
|
||||
Role assigned every new created user by default may be changed too.
|
||||
Capabilities could be assigned on per user basis. Multiple roles could be assigned to user simultaneously.
|
||||
You can add new capabilities and remove unnecessary capabilities which could be left from uninstalled plugins.
|
||||
Multi-site support is provided.
|
||||
|
||||
To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](http://shinephp.com)
|
||||
Русская версия этой статьи доступна по адресу [ru.shinephp.com](http://ru.shinephp.com/user-role-editor-wordpress-plugin-rus/)
|
||||
|
||||
Do you need more functionality with quality support in real time? Do you wish remove advertisements from User Role Editor pages?
|
||||
Buy [Pro version](htpp://role-editor.com).
|
||||
Pro version includes extra modules:
|
||||
<ul>
|
||||
<li>Block selected admin menu items for role.</li>
|
||||
<li>"Export/Import" module. You can export user roles to the local file and import them then to any WordPress site or other sites of the multi-site WordPress network.</li>
|
||||
<li>Roles and Users permissions management via Network Admin for multisite configuration. One click Synchronization to the whole network.</li>
|
||||
<li>Per posts/pages users access management to post/page editing functionality.</li>
|
||||
<li>Per plugin users access management for plugins activate/deactivate operations.</li>
|
||||
<li>Per form users access management for Gravity Forms plugin.</li>
|
||||
<li>Shortcode to show enclosed content to the users with selected roles only.</li>
|
||||
<li>Posts and pages view restrictions for selected roles.</li>
|
||||
</ul>
|
||||
Pro version is advertisement free. Premium support is included. It is provided by User Role Editor plugin developer Vladimir Garagulya. You will get an answer on your question not once a week, but in 24 hours or quicker.
|
||||
|
||||
== Installation ==
|
||||
|
||||
Installation procedure:
|
||||
|
||||
1. Deactivate plugin if you have the previous version installed.
|
||||
2. Extract "user-role-editor.zip" archive content to the "/wp-content/plugins/user-role-editor" directory.
|
||||
3. Activate "User Role Editor" plugin via 'Plugins' menu in WordPress admin menu.
|
||||
4. Go to the "Users"-"User Role Editor" menu item and change your WordPress standard roles capabilities according to your needs.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
- Does it work with WordPress in multi-site environment?
|
||||
Yes, it works with WordPress multi-site. By default plugin works for every blog from your multi-site network as for locally installed blog.
|
||||
To update selected role globally for the Network you should turn on the "Apply to All Sites" checkbox. You should have superadmin privileges to use User Role Editor under WordPress multi-site.
|
||||
Pro version allows to manage roles of the whole network from the Netwok Admin.
|
||||
|
||||
To read full FAQ section visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/#faq) at [shinephp.com](shinephp.com).
|
||||
|
||||
== Screenshots ==
|
||||
1. screenshot-1.png User Role Editor main form
|
||||
2. screenshot-2.png Add/Remove roles or capabilities
|
||||
3. screenshot-3.png User Capabilities link
|
||||
4. screenshot-4.png User Capabilities Editor
|
||||
5. screenshot-5.png Bulk change role for users without roles
|
||||
|
||||
To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](shinephp.com).
|
||||
|
||||
= Translations =
|
||||
* Catalan: [Efraim Bayarri](http://replicantsfactory.com/);
|
||||
* Hebrew: [atar4u](http://atar4u.com)
|
||||
* Korean: [Taek Yoon](http://www.ajinsys.com)
|
||||
* Persian: Morteza
|
||||
* Russian: [Vladimir Garagulya](http://role-editor.com)
|
||||
* Spanish: [Dario Ferrer](http://darioferrer.com/);
|
||||
* Turkish: [Muhammed YILDIRIM](http://ben.muhammed.im);
|
||||
|
||||
Information for translators: All translations (except Russian) are outdated and need update for new added text.
|
||||
|
||||
Dear plugin User!
|
||||
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.
|
||||
If you have better translation for some phrases, send it to me and it will be taken into consideration. You are welcome!
|
||||
Share with me new ideas about plugin further development and link to your site will appear here.
|
||||
|
||||
|
||||
== Changelog ==
|
||||
= 4.14.1 =
|
||||
* 11.06.2014
|
||||
* MySQL query optimizing to reduce memory consumption. Thanks to [SebastiaanO](http://wordpress.org/support/topic/allowed-memory-size-exhausted-fixed).
|
||||
* Extra WordPress nonce field was removed from the post at main role editor page to exclude nonce duplication.
|
||||
* Minor code enhancements.
|
||||
* Fixes for some missed translations.
|
||||
|
||||
= 4.14 =
|
||||
* 16.05.2014
|
||||
* Persian translation was added. Thanks to Morteza.
|
||||
|
||||
= 4.12 =
|
||||
* 22.04.2014
|
||||
* Bug was fixed. It had prevented bulk move users without role (--No role for this site--) to the selected role in case such users were shown more than at one WordPress Users page.
|
||||
* Korean translation was added. Thanks to [Taek Yoon](http://www.ajinsys.com).
|
||||
* Pro version update notes:
|
||||
* Use new "Admin Menu" button to block selected admin menu items for role. You need to activate this module at the "Additional Modules". This feature is useful when some of submenu items are restricted by the same user capability,
|
||||
e.g. "Settings" submenu, but you wish allow to user work just with part of it. You may use "Admin Menu" dialog as the reference for your work with roles and capabilities as "Admin Menu" shows
|
||||
what user capability restrict access to what admin menu item.
|
||||
* Posts/Pages edit restriction feature does not prohibit to add new post/page now. Now it should be managed via 'create_posts' or 'create_pages' user capabilities.
|
||||
* If you use Posts/Pages edit restriction by author IDs, there is no need to add user ID to allow him edit his own posts or page. Current user is added to the allowed authors list automatically.
|
||||
* New tab "Additional Modules" was added to the User Role Editor options page. As per name all options related to additional modules were moved there.
|
||||
|
||||
= 4.11 =
|
||||
* 06.04.2014
|
||||
* Single-site: It is possible to bulk move users without role (--No role for this site--) to the selected role or automatically created role "No rights" without any capabilities. Get more details at http://role-editor.com/no-role-for-this-site/
|
||||
* Plugin uses for dialogs jQuery UI CSS included into WordPress package.
|
||||
* Pro version: It is possible to restrict editing posts/pages by its authors user ID (targeted user should have edit_others_posts or edit_others_pages capability).
|
||||
* Pro version, multi-site: Superadmin can setup individual lists of themes available for activation to selected sites administrators.
|
||||
* Pro version, Gravity Forms access restriction module was tested and compatible with Gravity Forms version 1.8.5
|
||||
|
||||
= 4.10 =
|
||||
* 15.02.2014
|
||||
* Security enhancement: WordPress text translation functions were replaced with more secure esc_html__() and esc_html_e() variants.
|
||||
* Pro version: It is possible to restrict access to the post or page content view for selected roles. Activate the option at plugin "Settings" page and use new "Content View Restrictions" metabox at post/page editor to setup content view access restrictions.
|
||||
* Pro version: Gravity Forms access management module was updated for compatibility with Gravity Forms version 1.8.3. If you need compatibility with earlier Gravity Forms versions, e.g. 1.7.9, use User Role Editor version 4.9.
|
||||
|
||||
|
||||
= 4.9 =
|
||||
* 19.01.2014
|
||||
* New tab "Default Roles" was added to the User Role Editor settings page. It is possible to select multiple default roles to assign them automatically to the new registered user.
|
||||
* CSS and dialog windows layout various enhancements.
|
||||
* 'members_get_capabilities' filter was applied to provide better compatibility with themes and plugins which may use it to add its own user capabilities.
|
||||
* jQuery UI CSS was updated to version 1.10.4.
|
||||
* Pro version: Option was added to download jQuery UI CSS from the jQuery CDN.
|
||||
* Pro version: Bug was fixed: Plugins activation assess restriction section was not shown for selected user under multi-site environment.
|
||||
|
||||
|
||||
= 4.8 =
|
||||
* 10.12.2013
|
||||
* Role ID validation rule was added to prohibit numeric role ID - WordPress does not support them.
|
||||
* Plugin "Options" page was divided into sections (tabs): General, Multisite, About. Section with information about plugin author, his site, etc. was moved from User Role Editor main page to its "Options" page - "About" tab.
|
||||
* HTML markup was updated to provide compatibility with upcoming WordPress 3.8 new administrator backend theme "MP6".
|
||||
* Restore previous blog 'switch_to_blog($old_blog_id)' call was replaced to 'restore_current_blog()' where it is possible to provide better compatibility with WordPress API.
|
||||
After use 'switch_to_blog()' in cycle, URE clears '_wp_switched_stack' global variable directly instead of call 'restore_current_blog()' inside the cycle to work faster.
|
||||
* Pro version: It is possible to restrict access of single sites administrators to the selected user capabilities and Add/Delete role operations inside User Role Editor.
|
||||
* Pro version: Shortcode [user_role_editor roles="none"]text for not logged in users[/user_role_editor] is available. Recursive processing of other shortcodes inside enclosed text is available now.
|
||||
* Pro version: Gravity Forms available at "Export Entries", "Export Forms" pages is under URE access restriction now, if such one was set for the user.
|
||||
* Pro version: Gravity Forms import was set under "gravityforms_import" user capability control.
|
||||
* Pro version: Option was added to show/hide help links (question signs) near the capabilities from single site administrators.
|
||||
|
||||
= 4.7 =
|
||||
* 04.11.2013
|
||||
* "Delete Role" menu has "Delete All Unused Roles" menu item now.
|
||||
* More detailed warning was added before fulfill "Reset" roles command in order to reduce accident use of this critical operation.
|
||||
* Bug was fixed at Ure_Lib::reset_user_roles() method. Method did not work correctly for the rest sites of the network except the main blog.
|
||||
* Pro version: Post/Pages editing restriction could be setup for the user by one of two modes: 'Allow' or 'Prohibit'.
|
||||
* Pro version: Shortcode [user_role_editor roles="role1, role2, ..."]bla-bla[/user_role_editor] for posts and pages was added.
|
||||
You may restrict access to content inside this shortcode tags this way to the users only who have one of the roles noted at the "roles" attribute.
|
||||
* Pro version: If license key was installed it is shown as asterisks at the input field.
|
||||
* Pro version: In case site domain change you should input license key at the Settings page again.
|
||||
|
||||
= 4.6 =
|
||||
* 21.10.2013
|
||||
* Multi-site: 'unfiltered_html' capability marked as deprecated one. Read this post for more information (http://shinephp.com/is-unfiltered_html-capability-deprecated/).
|
||||
* Multi-site: 'manage_network%' capabilities were included into WordPress core capabilities list.
|
||||
* On screen help was added to the "User Role Editor Options" page - click "Help" at the top right corner to read it.
|
||||
* Bug fix: turning off capability at the Administrator role fully removed that capability from capabilities list.
|
||||
* Various internal code enhancements.
|
||||
* Information about GPLv2 license was added to show apparently - "User Role Editor" is licensed under GPLv2 or later.
|
||||
* Pro version only: Multi-site: Assign roles and capabilities to the users from one point at the Network Admin. Add user with his permissions together to all sites of your network with one click.
|
||||
* Pro version only: 'wp-content/uploads' folder is used now instead of plugin's own one to process file with importing roles data.
|
||||
* Pro version only: Bug fix: Nonexistent method was called to notify user about folder write permission error during roles import.
|
||||
|
||||
|
||||
Click [here](http://role-editor.com/changelog)</a> to look at [the full list of changes](http://role-editor.com/changelog) of User Role Editor plugin.
|
||||
|
||||
|
||||
== Additional Documentation ==
|
||||
|
||||
You can find more information about "User Role Editor" plugin at [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/)
|
||||
|
||||
I am ready to answer on your questions about plugin usage. Use [ShinePHP forum](http://shinephp.com/community/forum/user-role-editor/) or [plugin page comments](http://www.shinephp.com/user-role-editor-wordpress-plugin/) for it please.
|
||||
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* User Role Editor plugin uninstall script
|
||||
* Author: vladimir@shinephp.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('ABSPATH') || !defined('WP_UNINSTALL_PLUGIN')) {
|
||||
exit(); // silence is golden
|
||||
}
|
||||
|
||||
global $wpdb;
|
||||
|
||||
if (!is_multisite()) {
|
||||
$backup_option_name = $wpdb->prefix.'backup_user_roles';
|
||||
delete_option($backup_option_name);
|
||||
delete_option('ure_caps_readable');
|
||||
delete_option('ure_show_deprecated_caps');
|
||||
delete_option('ure_hide_pro_banner');
|
||||
delete_option('user_role_editor');
|
||||
} else {
|
||||
$old_blog = $wpdb->blogid;
|
||||
// Get all blog ids
|
||||
$blogIds = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
||||
foreach ($blogIds as $blog_id) {
|
||||
switch_to_blog($blog_id);
|
||||
$backup_option_name = $wpdb->prefix.'backup_user_roles';
|
||||
delete_option($backup_option_name);
|
||||
delete_option('ure_caps_readable');
|
||||
delete_option('ure_show_deprecated_caps');
|
||||
delete_option('ure_hide_pro_banner');
|
||||
delete_option('user_role_editor');
|
||||
}
|
||||
switch_to_blog($old_blog);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: User Role Editor
|
||||
Plugin URI: http://role-editor.com
|
||||
Description: Change/add/delete WordPress user roles and capabilities.
|
||||
Version: 4.14.1
|
||||
Author: Vladimir Garagulya
|
||||
Author URI: http://www.shinephp.com
|
||||
Text Domain: ure
|
||||
Domain Path: /lang/
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2010-2014 Vladimir Garagulya (email: vladimir@shinephp.com)
|
||||
*/
|
||||
|
||||
if (!function_exists("get_option")) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
die; // Silence is golden, direct call is prohibited
|
||||
}
|
||||
|
||||
if (defined('URE_PLUGIN_URL')) {
|
||||
wp_die('It seems that other version of User Role Editor is active. Please deactivate it before use this version');
|
||||
}
|
||||
|
||||
define('URE_VERSION', '4.14.1');
|
||||
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
define('URE_PLUGIN_FILE', basename(__FILE__));
|
||||
define('URE_PLUGIN_FULL_PATH', __FILE__);
|
||||
|
||||
if (!class_exists('Garvs_WP_Lib')) {
|
||||
require_once(URE_PLUGIN_DIR.'includes/class-garvs-wp-lib.php');
|
||||
}
|
||||
require_once(URE_PLUGIN_DIR.'includes/class-ure-lib.php');
|
||||
|
||||
// check PHP version
|
||||
$ure_required_php_version = '5.2.4';
|
||||
$exit_msg = sprintf( 'User Role Editor requires PHP %s or newer.', $ure_required_php_version ) .
|
||||
'<a href="http://wordpress.org/about/requirements/"> ' . 'Please update!' . '</a>';
|
||||
Ure_Lib::check_version( PHP_VERSION, $ure_required_php_version, $exit_msg, __FILE__ );
|
||||
|
||||
// check WP version
|
||||
$ure_required_wp_version = '3.5';
|
||||
$exit_msg = sprintf( 'User Role Editor requires WordPress %s or newer.', $ure_required_wp_version ) .
|
||||
'<a href="http://codex.wordpress.org/Upgrading_WordPress"> ' . 'Please update!' . '</a>';
|
||||
Ure_Lib::check_version(get_bloginfo('version'), $ure_required_wp_version, $exit_msg, __FILE__ );
|
||||
|
||||
require_once(URE_PLUGIN_DIR .'includes/define-constants.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/misc-support-stuff.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-ure-screen-help.php');
|
||||
require_once( URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
|
||||
|
||||
|
||||
$ure_lib = new Ure_Lib('user_role_editor');
|
||||
new User_Role_Editor($ure_lib);
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
class admin_page_class
|
||||
{
|
||||
static function generate_admin_page()
|
||||
{
|
||||
include('admin_page.php');
|
||||
}
|
||||
static function add_menu_item()
|
||||
{
|
||||
add_submenu_page(
|
||||
'options-general.php',
|
||||
'wp-api',
|
||||
'wp-api',
|
||||
'manage_options',
|
||||
'wp-api',
|
||||
'admin_page_class::generate_admin_page'
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,192 @@
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); $dir = network_site_url('/');?>
|
||||
<h2>wp-api administration</h2>
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width=100>Method</th>
|
||||
<th width=200>Description</th>
|
||||
<th>arguments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th width=100>Method</th>
|
||||
<th width=200>Description</th>
|
||||
<th>arguments</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<!-- posts -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_p">get_posts</a></code></td>
|
||||
|
||||
<td id="p">Call this method to get the recent posts/pages or specify the post/page id to get the specified post information.</td>
|
||||
|
||||
<td id="p2">
|
||||
argument: <b>dev</b> (optional)<br>
|
||||
value: <b>1</b> >> pretty output in browser<br>
|
||||
value: <b>0</b> >> default json format to use in your program<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_posts&dev=1" target="_blank"><?php echo $dir ?>?wpapi=get_posts&<b>dev=1</b></a>
|
||||
<hr>
|
||||
|
||||
argument: <b>id</b> (optional)<br>
|
||||
value: <b>post or page id</b> >> show information about the specified post<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_posts&dev=1&id=1" target="_blank"><?php echo $dir ?>?wpapi=get_posts&dev=1&<b>id=1</b></a>
|
||||
<hr>
|
||||
|
||||
argument: <b>count</b> (optional)<br>
|
||||
value: <b>number of items per page</b> >> specify the number of post items to be returned.<br><br>
|
||||
|
||||
argument: <b>page</b> (optional)<br>
|
||||
value: <b>page number</b> >> if <i>count</i> is set, use the <i>page</i> argument to move forward through the rest of the items.<br><br>
|
||||
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_posts&dev=1&count=2&page=1" target="_blank"><?php echo $dir ?>?wpapi=get_posts&dev=1&<b>count=2</b>&<b>page=1</b></a>
|
||||
<hr>
|
||||
|
||||
argument: <b>comment</b> (optional)<br>
|
||||
value: <b>1</b> >> Return comments if available<br>
|
||||
value: <b>0</b> >> Don't return comments<br><br>
|
||||
|
||||
argument: <b>content</b> (optional)<br>
|
||||
value: <b>1</b> >> Return the content<br>
|
||||
value: <b>0</b> >> Don't return the content<br><br>
|
||||
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_posts&dev=1&comment=1&content=1" target="_blank"><?php echo $dir ?>?wpapi=get_posts&dev=1&<b>comment=1</b>&<b>content=1</b></a>
|
||||
<hr>
|
||||
argument: <b>type</b> (optional)<br>
|
||||
value: <b>posts type</b> >> Put post and get only posts, put page and get only pages <br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_posts&dev=1&type=page" target="_blank"><?php echo $dir ?>?wpapi=get_posts&dev=1&<b>type=page</b></a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- tags -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_t">get_tags</a></code></td>
|
||||
|
||||
<td id="t">Call this method to retrieve all tag information</td>
|
||||
|
||||
<td id="t2">
|
||||
argument: <b>dev</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>count</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>page</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_tags&dev=1" target="_blank"><?php echo $dir ?>?wpapi=get_tags&dev=1</a>
|
||||
<hr>
|
||||
argument: <b>id</b> (optional)<br>
|
||||
value: <b>tag id</b> >> return information about the specified tag<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_tags&dev=1&id=1" target="_blank"><?php echo $dir ?>?wpapi=get_tags&dev=1&<b>id=1</b></a>
|
||||
<hr>
|
||||
argument: <b>cat</b> (optional)<br>
|
||||
value: <b>1</b> >> returns those tags with taxonomy of category<br>
|
||||
value: <b>0</b> >> does not return tags with taxonomy of category<br><br>
|
||||
|
||||
argument: <b>tag</b> (optional)<br>
|
||||
value: <b>1</b> >> returns normal tags<br>
|
||||
value: <b>0</b> >> does not return normal tags<br><br>
|
||||
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_tags&dev=1&cat=1&tag=1" target="_blank"><?php echo $dir ?>?wpapi=get_tags&dev=1&<b>cat=1</b>&<b>tag=1</b></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- author -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_a">get_author</a></code></td>
|
||||
|
||||
<td id="a">Call this method to retrieve information about authors registered in the wordpress blog</td>
|
||||
|
||||
<td id="a2">
|
||||
argument: <b>dev</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>count</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>page</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_author&dev=1" target="_blank"><?php echo $dir ?>?wpapi=get_author&dev=1</a>
|
||||
<hr>
|
||||
argument: <b>id</b> (optional)<br>
|
||||
value: <b>author id</b> >> return information about the specified author<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=get_author&dev=1&id=1" target="_blank"><?php echo $dir ?>?wpapi=get_author&dev=1&<b>id=1</b></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- gravatar -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_g">gravatar</a></code></td>
|
||||
|
||||
<td id="g">Call this method to connect to the gravatar api and retrieve the gravatar based on the email address you specify.</td>
|
||||
|
||||
|
||||
<td id="g2">
|
||||
argument: <b>dev</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=gravatar&dev=1" target="_blank"><?php echo $dir ?>?wpapi=gravatar&dev=1</a>
|
||||
<hr>
|
||||
argument: <b>email</b> (required)<br>
|
||||
value: <b>standard email address</b> >> the email address to found its gravatar<br><br>
|
||||
|
||||
argument: <b>size</b> (optional)<br>
|
||||
value: <b>size of the gravatar in pixel</b> >> size of the returned gravatar image, default value is 100 which means the returned gravatar image will be 100X100 pixel<br><br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=gravatar&dev=1&email=email@site.com&size=200" target="_blank"><?php echo $dir ?>?wpapi=gravatar&dev=1&<b>email=email@site.com</b>&<b>size=200</b></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- search -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_s">search</a></code></td>
|
||||
|
||||
<td id="s">Call this method and pass <i>keyword</i> argument to return the search results.</td>
|
||||
|
||||
|
||||
<td id="s2">
|
||||
argument: <b>dev</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>count</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>page</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>comment</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>content</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
argument: <b>type</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=search&dev=1&keyword=post&count=2&page=1&content=1&comment=1&type=post" target="_blank"><?php echo $dir ?>?wpapi=search&dev=1&keyword=post&<b>count=2</b>&<b>page=1</b>&<b>content=1</b>&<b>comment=1</b>&<b>type=post</b></a>
|
||||
<hr>
|
||||
argument: <b>keyword</b> (required)<br>
|
||||
value: <b>search string</b> >> the keyword to be searched.<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=search&dev=1&keyword=something" target="_blank"><?php echo $dir ?>?wpapi=search&dev=1&<b>keyword=something</b></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- comment -->
|
||||
<tr>
|
||||
|
||||
<td><code><a href="#" id="i_c">comment</a></code></td>
|
||||
|
||||
<td id="c">Call this method to submit a comment on a post.</td>
|
||||
|
||||
<td id="c2">
|
||||
argument: <b>dev</b> (optional) Read more about it in <i>get_posts</i> method<br>
|
||||
example: <a href="<?php echo $dir?>?wpapi=comment&dev=1" target="_blank"><?php echo $dir ?>?wpapi=comment&dev=1</a>
|
||||
<hr>
|
||||
argument: <b>name</b> (required)<br>
|
||||
value: <b>author name</b> >> name of the person who's leaving the comment<br><br>
|
||||
|
||||
argument: <b>email</b> (required)<br>
|
||||
value: <b>author email address</b> >> email address of the person who's leaving the comment<br><br>
|
||||
|
||||
argument: <b>content</b> (required)<br>
|
||||
value: <b>comment content</b> >> content of the comment<br><br>
|
||||
|
||||
argument: <b>post_id</b> (required)<br>
|
||||
value: <b>post id</b> >> id of the post which you are submitting your comment to<br><br>
|
||||
|
||||
example: <a href="<?php echo $dir?>?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1" target="_blank"><?php echo $dir ?>?wpapi=comment&dev=1&<b>name=Hadi</b>&<b>email=email@site.com</b>&<b>content=some content to comment</b>&<b>post_id=1</b></a>
|
||||
<hr>
|
||||
argument: <b>website</b> (optional)<br>
|
||||
value: <b>www.your-site.com</b> >> Optionally you can pass author's website<br><br>
|
||||
|
||||
argument: <b>parent</b> (optional)<br>
|
||||
value: <b>reply to id</b> >> <i>parent</i> is the id of the comment which this will be a reply to. default value is <i>0</i><br><br>
|
||||
|
||||
example: <a href="<?php echo $dir?>?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1&website=www.your-site.com&parent=0" target="_blank"><?php echo $dir ?>?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1&<b>website=www.your-site.com</b>&<b>parent=0</b></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/*
|
||||
*************************
|
||||
* Pretty print some JSON*
|
||||
*************************
|
||||
*/
|
||||
class Dev {
|
||||
function json_format($json)
|
||||
{
|
||||
$tab = " ";
|
||||
$new_json = "";
|
||||
$indent_level = 0;
|
||||
$in_string = false;
|
||||
|
||||
$json_obj = json_decode($json);
|
||||
|
||||
if($json_obj === false)
|
||||
return false;
|
||||
|
||||
$json = json_encode($json_obj);
|
||||
$len = strlen($json);
|
||||
|
||||
for($c = 0; $c < $len; $c++)
|
||||
{
|
||||
$char = $json[$c];
|
||||
switch($char)
|
||||
{
|
||||
case '{':
|
||||
case '[':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= $char . "\n" . str_repeat($tab, $indent_level+1);
|
||||
$indent_level++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case '}':
|
||||
case ']':
|
||||
if(!$in_string)
|
||||
{
|
||||
$indent_level--;
|
||||
$new_json .= "\n" . str_repeat($tab, $indent_level) . $char;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case ',':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= ",\n" . str_repeat($tab, $indent_level);
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case ':':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= ": ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case '"':
|
||||
if($c > 0 && $json[$c-1] != '\\')
|
||||
{
|
||||
$in_string = !$in_string;
|
||||
}
|
||||
default:
|
||||
$new_json .= $char;
|
||||
break;
|
||||
}
|
||||
}
|
||||
header('Content-type: text/plain');
|
||||
return $new_json;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,861 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* JSON (JavaScript Object Notation) is a lightweight data-interchange
|
||||
* format. It is easy for humans to read and write. It is easy for machines
|
||||
* to parse and generate. It is based on a subset of the JavaScript
|
||||
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
|
||||
* This feature can also be found in Python. JSON is a text format that is
|
||||
* completely language independent but uses conventions that are familiar
|
||||
* to programmers of the C-family of languages, including C, C++, C#, Java,
|
||||
* JavaScript, Perl, TCL, and many others. These properties make JSON an
|
||||
* ideal data-interchange language.
|
||||
*
|
||||
* This package provides a simple encoder and decoder for JSON notation. It
|
||||
* is intended for use with client-side Javascript applications that make
|
||||
* use of HTTPRequest to perform server communication functions - data can
|
||||
* be encoded into JSON notation for use in a client-side javascript, or
|
||||
* decoded from incoming Javascript requests. JSON format is native to
|
||||
* Javascript, and can be directly eval()'ed with no further parsing
|
||||
* overhead
|
||||
*
|
||||
* All strings should be in ASCII or UTF-8 format!
|
||||
*
|
||||
* LICENSE: Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met: Redistributions of source code must retain the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
* @category
|
||||
* @package Services_JSON
|
||||
* @author Michal Migurski <mike-json@teczno.com>
|
||||
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
|
||||
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
|
||||
* @copyright 2005 Michal Migurski
|
||||
* @version CVS: $Id: JSON.php 288200 2009-09-09 15:41:29Z alan_k $
|
||||
* @license http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
|
||||
*/
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_SLICE', 1);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_STR', 2);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_ARR', 3);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_OBJ', 4);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_CMT', 5);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_LOOSE_TYPE', 16);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
|
||||
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* Brief example of use:
|
||||
*
|
||||
* <code>
|
||||
* // create a new instance of Services_JSON
|
||||
* $json = new Services_JSON();
|
||||
*
|
||||
* // convert a complexe value to JSON notation, and send it to the browser
|
||||
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
|
||||
* $output = $json->encode($value);
|
||||
*
|
||||
* print($output);
|
||||
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
|
||||
*
|
||||
* // accept incoming POST data, assumed to be in JSON notation
|
||||
* $input = file_get_contents('php://input', 1000000);
|
||||
* $value = $json->decode($input);
|
||||
* </code>
|
||||
*/
|
||||
class Services_JSON
|
||||
{
|
||||
/**
|
||||
* constructs a new JSON instance
|
||||
*
|
||||
* @param int $use object behavior flags; combine with boolean-OR
|
||||
*
|
||||
* possible values:
|
||||
* - SERVICES_JSON_LOOSE_TYPE: loose typing.
|
||||
* "{...}" syntax creates associative arrays
|
||||
* instead of objects in decode().
|
||||
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
|
||||
* Values which can't be encoded (e.g. resources)
|
||||
* appear as NULL instead of throwing errors.
|
||||
* By default, a deeply-nested resource will
|
||||
* bubble up with an error, so all return values
|
||||
* from encode() should be checked with isError()
|
||||
*/
|
||||
function Services_JSON($use = 0)
|
||||
{
|
||||
$this->use = $use;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-16 char to one UTF-8 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf16 UTF-16 character
|
||||
* @return string UTF-8 character
|
||||
* @access private
|
||||
*/
|
||||
function utf162utf8($utf16)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding')) {
|
||||
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
||||
}
|
||||
|
||||
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
||||
|
||||
switch(true) {
|
||||
case ((0x7F & $bytes) == $bytes):
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x7F & $bytes);
|
||||
|
||||
case (0x07FF & $bytes) == $bytes:
|
||||
// return a 2-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xC0 | (($bytes >> 6) & 0x1F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
|
||||
case (0xFFFF & $bytes) == $bytes:
|
||||
// return a 3-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xE0 | (($bytes >> 12) & 0x0F))
|
||||
. chr(0x80 | (($bytes >> 6) & 0x3F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-8 char to one UTF-16 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf8 UTF-8 character
|
||||
* @return string UTF-16 character
|
||||
* @access private
|
||||
*/
|
||||
function utf82utf16($utf8)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding')) {
|
||||
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
|
||||
}
|
||||
|
||||
switch(strlen($utf8)) {
|
||||
case 1:
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return $utf8;
|
||||
|
||||
case 2:
|
||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
||||
| (0x3F & ord($utf8{1})));
|
||||
|
||||
case 3:
|
||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
||||
| (0x7F & ord($utf8{2})));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* encodes an arbitrary variable into JSON format (and sends JSON Header)
|
||||
*
|
||||
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
||||
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
||||
* if var is a strng, note that encode() always expects it
|
||||
* to be in ASCII or UTF-8 format!
|
||||
*
|
||||
* @return mixed JSON string representation of input var or an error if a problem occurs
|
||||
* @access public
|
||||
*/
|
||||
function encode($var)
|
||||
{
|
||||
header('Content-type: application/json');
|
||||
return $this->_encode($var);
|
||||
}
|
||||
/**
|
||||
* encodes an arbitrary variable into JSON format without JSON Header - warning - may allow CSS!!!!)
|
||||
*
|
||||
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
||||
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
||||
* if var is a strng, note that encode() always expects it
|
||||
* to be in ASCII or UTF-8 format!
|
||||
*
|
||||
* @return mixed JSON string representation of input var or an error if a problem occurs
|
||||
* @access public
|
||||
*/
|
||||
function encodeUnsafe($var)
|
||||
{
|
||||
return $this->_encode($var);
|
||||
}
|
||||
/**
|
||||
* PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format
|
||||
*
|
||||
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
||||
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
||||
* if var is a strng, note that encode() always expects it
|
||||
* to be in ASCII or UTF-8 format!
|
||||
*
|
||||
* @return mixed JSON string representation of input var or an error if a problem occurs
|
||||
* @access public
|
||||
*/
|
||||
function _encode($var)
|
||||
{
|
||||
|
||||
switch (gettype($var)) {
|
||||
case 'boolean':
|
||||
return $var ? 'true' : 'false';
|
||||
|
||||
case 'NULL':
|
||||
return 'null';
|
||||
|
||||
case 'integer':
|
||||
return (int) $var;
|
||||
|
||||
case 'double':
|
||||
case 'float':
|
||||
return (float) $var;
|
||||
|
||||
case 'string':
|
||||
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
|
||||
$ascii = '';
|
||||
$strlen_var = strlen($var);
|
||||
|
||||
/*
|
||||
* Iterate over every character in the string,
|
||||
* escaping with a slash or encoding to UTF-8 where necessary
|
||||
*/
|
||||
for ($c = 0; $c < $strlen_var; ++$c) {
|
||||
|
||||
$ord_var_c = ord($var{$c});
|
||||
|
||||
switch (true) {
|
||||
case $ord_var_c == 0x08:
|
||||
$ascii .= '\b';
|
||||
break;
|
||||
case $ord_var_c == 0x09:
|
||||
$ascii .= '\t';
|
||||
break;
|
||||
case $ord_var_c == 0x0A:
|
||||
$ascii .= '\n';
|
||||
break;
|
||||
case $ord_var_c == 0x0C:
|
||||
$ascii .= '\f';
|
||||
break;
|
||||
case $ord_var_c == 0x0D:
|
||||
$ascii .= '\r';
|
||||
break;
|
||||
|
||||
case $ord_var_c == 0x22:
|
||||
case $ord_var_c == 0x2F:
|
||||
case $ord_var_c == 0x5C:
|
||||
// double quote, slash, slosh
|
||||
$ascii .= '\\'.$var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
||||
// characters U-00000000 - U-0000007F (same as ASCII)
|
||||
$ascii .= $var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xE0) == 0xC0):
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
if ($c+1 >= $strlen_var) {
|
||||
$c += 1;
|
||||
$ascii .= '?';
|
||||
break;
|
||||
}
|
||||
|
||||
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
|
||||
$c += 1;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF0) == 0xE0):
|
||||
if ($c+2 >= $strlen_var) {
|
||||
$c += 2;
|
||||
$ascii .= '?';
|
||||
break;
|
||||
}
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
@ord($var{$c + 1}),
|
||||
@ord($var{$c + 2}));
|
||||
$c += 2;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF8) == 0xF0):
|
||||
if ($c+3 >= $strlen_var) {
|
||||
$c += 3;
|
||||
$ascii .= '?';
|
||||
break;
|
||||
}
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}));
|
||||
$c += 3;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFC) == 0xF8):
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
if ($c+4 >= $strlen_var) {
|
||||
$c += 4;
|
||||
$ascii .= '?';
|
||||
break;
|
||||
}
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}));
|
||||
$c += 4;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFE) == 0xFC):
|
||||
if ($c+5 >= $strlen_var) {
|
||||
$c += 5;
|
||||
$ascii .= '?';
|
||||
break;
|
||||
}
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}),
|
||||
ord($var{$c + 5}));
|
||||
$c += 5;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return '"'.$ascii.'"';
|
||||
|
||||
case 'array':
|
||||
/*
|
||||
* As per JSON spec if any array key is not an integer
|
||||
* we must treat the the whole array as an object. We
|
||||
* also try to catch a sparsely populated associative
|
||||
* array with numeric keys here because some JS engines
|
||||
* will create an array with empty indexes up to
|
||||
* max_index which can cause memory issues and because
|
||||
* the keys, which may be relevant, will be remapped
|
||||
* otherwise.
|
||||
*
|
||||
* As per the ECMA and JSON specification an object may
|
||||
* have any string as a property. Unfortunately due to
|
||||
* a hole in the ECMA specification if the key is a
|
||||
* ECMA reserved word or starts with a digit the
|
||||
* parameter is only accessible using ECMAScript's
|
||||
* bracket notation.
|
||||
*/
|
||||
|
||||
// treat as a JSON object
|
||||
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($var),
|
||||
array_values($var));
|
||||
|
||||
foreach($properties as $property) {
|
||||
if(Services_JSON::isError($property)) {
|
||||
return $property;
|
||||
}
|
||||
}
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
}
|
||||
|
||||
// treat it like a regular array
|
||||
$elements = array_map(array($this, '_encode'), $var);
|
||||
|
||||
foreach($elements as $element) {
|
||||
if(Services_JSON::isError($element)) {
|
||||
return $element;
|
||||
}
|
||||
}
|
||||
|
||||
return '[' . join(',', $elements) . ']';
|
||||
|
||||
case 'object':
|
||||
$vars = get_object_vars($var);
|
||||
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($vars),
|
||||
array_values($vars));
|
||||
|
||||
foreach($properties as $property) {
|
||||
if(Services_JSON::isError($property)) {
|
||||
return $property;
|
||||
}
|
||||
}
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
|
||||
default:
|
||||
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
|
||||
? 'null'
|
||||
: new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* array-walking function for use in generating JSON-formatted name-value pairs
|
||||
*
|
||||
* @param string $name name of key to use
|
||||
* @param mixed $value reference to an array element to be encoded
|
||||
*
|
||||
* @return string JSON-formatted name-value pair, like '"name":value'
|
||||
* @access private
|
||||
*/
|
||||
function name_value($name, $value)
|
||||
{
|
||||
$encoded_value = $this->_encode($value);
|
||||
|
||||
if(Services_JSON::isError($encoded_value)) {
|
||||
return $encoded_value;
|
||||
}
|
||||
|
||||
return $this->_encode(strval($name)) . ':' . $encoded_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* reduce a string by removing leading and trailing comments and whitespace
|
||||
*
|
||||
* @param $str string string value to strip of comments and whitespace
|
||||
*
|
||||
* @return string string value stripped of comments and whitespace
|
||||
* @access private
|
||||
*/
|
||||
function reduce_string($str)
|
||||
{
|
||||
$str = preg_replace(array(
|
||||
|
||||
// eliminate single line comments in '// ...' form
|
||||
'#^\s*//(.+)$#m',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at start of string
|
||||
'#^\s*/\*(.+)\*/#Us',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at end of string
|
||||
'#/\*(.+)\*/\s*$#Us'
|
||||
|
||||
), '', $str);
|
||||
|
||||
// eliminate extraneous space
|
||||
return trim($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* decodes a JSON string into appropriate variable
|
||||
*
|
||||
* @param string $str JSON-formatted string
|
||||
*
|
||||
* @return mixed number, boolean, string, array, or object
|
||||
* corresponding to given JSON input string.
|
||||
* See argument 1 to Services_JSON() above for object-output behavior.
|
||||
* Note that decode() always returns strings
|
||||
* in ASCII or UTF-8 format!
|
||||
* @access public
|
||||
*/
|
||||
function decode($str)
|
||||
{
|
||||
$str = $this->reduce_string($str);
|
||||
|
||||
switch (strtolower($str)) {
|
||||
case 'true':
|
||||
return true;
|
||||
|
||||
case 'false':
|
||||
return false;
|
||||
|
||||
case 'null':
|
||||
return null;
|
||||
|
||||
default:
|
||||
$m = array();
|
||||
|
||||
if (is_numeric($str)) {
|
||||
// Lookie-loo, it's a number
|
||||
|
||||
// This would work on its own, but I'm trying to be
|
||||
// good about returning integers where appropriate:
|
||||
// return (float)$str;
|
||||
|
||||
// Return float or int, as appropriate
|
||||
return ((float)$str == (integer)$str)
|
||||
? (integer)$str
|
||||
: (float)$str;
|
||||
|
||||
} elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
|
||||
// STRINGS RETURNED IN UTF-8 FORMAT
|
||||
$delim = substr($str, 0, 1);
|
||||
$chrs = substr($str, 1, -1);
|
||||
$utf8 = '';
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c < $strlen_chrs; ++$c) {
|
||||
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
$ord_chrs_c = ord($chrs{$c});
|
||||
|
||||
switch (true) {
|
||||
case $substr_chrs_c_2 == '\b':
|
||||
$utf8 .= chr(0x08);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\t':
|
||||
$utf8 .= chr(0x09);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\n':
|
||||
$utf8 .= chr(0x0A);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\f':
|
||||
$utf8 .= chr(0x0C);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\r':
|
||||
$utf8 .= chr(0x0D);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case $substr_chrs_c_2 == '\\"':
|
||||
case $substr_chrs_c_2 == '\\\'':
|
||||
case $substr_chrs_c_2 == '\\\\':
|
||||
case $substr_chrs_c_2 == '\\/':
|
||||
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
|
||||
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
|
||||
$utf8 .= $chrs{++$c};
|
||||
}
|
||||
break;
|
||||
|
||||
case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
|
||||
// single, escaped unicode character
|
||||
$utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
|
||||
. chr(hexdec(substr($chrs, ($c + 4), 2)));
|
||||
$utf8 .= $this->utf162utf8($utf16);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
|
||||
$utf8 .= $chrs{$c};
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xE0) == 0xC0:
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
//see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 2);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF0) == 0xE0:
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 3);
|
||||
$c += 2;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF8) == 0xF0:
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 4);
|
||||
$c += 3;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFC) == 0xF8:
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 5);
|
||||
$c += 4;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFE) == 0xFC:
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 6);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $utf8;
|
||||
|
||||
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
||||
// array, or object notation
|
||||
|
||||
if ($str{0} == '[') {
|
||||
$stk = array(SERVICES_JSON_IN_ARR);
|
||||
$arr = array();
|
||||
} else {
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = array();
|
||||
} else {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = new stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE,
|
||||
'where' => 0,
|
||||
'delim' => false));
|
||||
|
||||
$chrs = substr($str, 1, -1);
|
||||
$chrs = $this->reduce_string($chrs);
|
||||
|
||||
if ($chrs == '') {
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} else {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//print("\nparsing {$chrs}\n");
|
||||
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c <= $strlen_chrs; ++$c) {
|
||||
|
||||
$top = end($stk);
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
|
||||
if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
|
||||
// found a comma that is not inside a string, array, etc.,
|
||||
// OR we've reached the end of the character list
|
||||
$slice = substr($chrs, $top['where'], ($c - $top['where']));
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
|
||||
//print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
// we are in an array, so just push an element onto the stack
|
||||
array_push($arr, $this->decode($slice));
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
// we are in an object, so figure
|
||||
// out the property name and set an
|
||||
// element in an associative array,
|
||||
// for now
|
||||
$parts = array();
|
||||
|
||||
if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// "name":value pair
|
||||
$key = $this->decode($parts[1]);
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
} elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// name:value pair, where name is unquoted
|
||||
$key = $parts[1];
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
|
||||
// found a quote, and we are not inside a string
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
|
||||
//print("Found start of string at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == $top['delim']) &&
|
||||
($top['what'] == SERVICES_JSON_IN_STR) &&
|
||||
((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
|
||||
// found a quote, we're in a string, and it's not escaped
|
||||
// we know that it's not escaped becase there is _not_ an
|
||||
// odd number of backslashes at the end of the string so far
|
||||
array_pop($stk);
|
||||
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '[') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-bracket, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of array at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
|
||||
// found a right-bracket, and we're in an array
|
||||
array_pop($stk);
|
||||
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '{') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-brace, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of object at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
|
||||
// found a right-brace, and we're in an object
|
||||
array_pop($stk);
|
||||
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '/*') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a comment start, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
|
||||
$c++;
|
||||
//print("Found start of comment at {$c}\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
|
||||
// found a comment end, and we're in one now
|
||||
array_pop($stk);
|
||||
$c++;
|
||||
|
||||
for ($i = $top['where']; $i <= $c; ++$i)
|
||||
$chrs = substr_replace($chrs, ' ', $i, 1);
|
||||
|
||||
//print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this should just call PEAR::isError()
|
||||
*/
|
||||
function isError($data, $code = null)
|
||||
{
|
||||
if (class_exists('pear')) {
|
||||
return PEAR::isError($data, $code);
|
||||
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
|
||||
is_subclass_of($data, 'services_json_error'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (class_exists('PEAR_Error')) {
|
||||
|
||||
class Services_JSON_Error extends PEAR_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this class shall be descended from PEAR_Error
|
||||
*/
|
||||
class Services_JSON_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
$(document).ready(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
$('#i_p').click(function() {
|
||||
$('#p,#p1,#p2,#p3').show();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
});
|
||||
$('#i_t').click(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').show();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
});
|
||||
$('#i_a').click(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').show();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
});
|
||||
$('#i_g').click(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').show();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
});
|
||||
$('#i_s').click(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').show();
|
||||
$('#c,#c1,#c2,#c3').hide();
|
||||
});
|
||||
$('#i_c').click(function() {
|
||||
$('#p,#p1,#p2,#p3').hide();
|
||||
$('#t,#t1,#t2,#t3').hide();
|
||||
$('#a,#a1,#a2,#a3').hide();
|
||||
$('#g,#g1,#g2,#g3').hide();
|
||||
$('#s,#s1,#s2,#s3').hide();
|
||||
$('#c,#c1,#c2,#c3').show();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,281 @@
|
||||
<?php
|
||||
@include_once('JSON.php');
|
||||
@include_once ('DEV.php');
|
||||
class comment_api
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
add_filter('rewrite_rules_array','comment_api::insertRules');
|
||||
add_filter('query_vars','comment_api::insertQueryVars');
|
||||
add_action('parse_query','comment_api::insertParseQuery');
|
||||
}
|
||||
static function comment_send($dev,$name,$email,$website,$comment,$post_id,$parent)
|
||||
{
|
||||
global $wpdb;
|
||||
if(empty($name) or empty($email) or empty($comment) or empty($post_id))
|
||||
{
|
||||
$err_msg = "required arguments are 'name', 'email', 'content', 'post_id' and optional arguments are 'website', 'parent'";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$check = true;
|
||||
if((int) $name)
|
||||
{
|
||||
$err_msg = 'name argument can not be a number';
|
||||
$status = 'error';
|
||||
$check = false;
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))
|
||||
{
|
||||
$err_msg = 'please insert a valid email address';
|
||||
$status = 'error';
|
||||
$check = false;
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!(int) $post_id or is_float($post_id))
|
||||
{
|
||||
$err_msg = 'post id must be an integer number';
|
||||
$status = 'error';
|
||||
$check = false;
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!(int) $parent and !empty($parent))
|
||||
{
|
||||
$err_msg = 'parent argument must be an integer number';
|
||||
$status = 'error';
|
||||
$check = false;
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($parent == null or empty($parent))
|
||||
{
|
||||
$parent = 0;
|
||||
}
|
||||
if($check)
|
||||
{
|
||||
$sql = 'SELECT DISTINCT * FROM '.$wpdb->posts.' AS POSTS WHERE POSTS.post_status="publish"';
|
||||
$obj = $wpdb->get_results($sql);
|
||||
$check_comment_status = true;
|
||||
$is_post = false;
|
||||
foreach ($obj as $key => $value)
|
||||
{
|
||||
if($value->ID == $post_id)
|
||||
{
|
||||
$is_post = true;
|
||||
if($value->comment_status == 'closed') $check_comment_status = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$sql_c = 'SELECT * FROM '.$wpdb->comments;
|
||||
$obj_c = $wpdb->get_results($sql_c);
|
||||
$check_p = true;
|
||||
foreach ($obj_c as $value_c)
|
||||
{
|
||||
if($parent == $value_c->comment_ID and $post_id == $value_c->comment_post_ID)
|
||||
{
|
||||
$check_p = true;
|
||||
$parent = $value_c->comment_ID;
|
||||
break;
|
||||
}
|
||||
if($parent != $value_c->comment_ID)
|
||||
{
|
||||
$check_p = false;
|
||||
}
|
||||
}
|
||||
if($check_p == false)
|
||||
{
|
||||
$parent = 0;
|
||||
}
|
||||
if($is_post == false)
|
||||
{
|
||||
$err_msg = "post id not found";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
exit();
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
if($check_comment_status == false)
|
||||
{
|
||||
$check = false;
|
||||
$err_msg = "comments are closed for this post id";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
exit();
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
$time = current_time('mysql');
|
||||
$user_ip = $_SERVER['REMOTE_ADDR'];
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$comment_type = 'comment';
|
||||
$data = array(
|
||||
'comment_post_ID' => $post_id,
|
||||
'comment_author' => $name,
|
||||
'comment_author_email' => $email,
|
||||
'comment_author_url' => $website,
|
||||
'comment_author_IP' => $user_ip,
|
||||
'comment_content' => $comment,
|
||||
'comment_type' => $comment_type,
|
||||
'comment_parent' => $parent,
|
||||
'comment_date' => $time,
|
||||
'comment_approved' => 0,
|
||||
'comment_agent' => $user_agent
|
||||
);
|
||||
if(wp_insert_comment($data))
|
||||
{
|
||||
$err_msg = "the comment has been sent";
|
||||
$status = 'pending';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
static function insertRules($rules){
|
||||
$newrules = array();
|
||||
$newrules['redirect/url/(.+)$']='index.php?wpapi=comment&dev&name&email&website&content&post_id&parent';
|
||||
return $newrules+$rules;
|
||||
}
|
||||
static function insertQueryVars($vars){
|
||||
array_push($vars, 'wpapi','name','dev','email','website','content','post_id','parent');
|
||||
return $vars;
|
||||
}
|
||||
static function insertParseQuery($query)
|
||||
{
|
||||
if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'comment')
|
||||
{
|
||||
$dev = $_GET['dev'];
|
||||
$name = $_GET['name'];
|
||||
$email = $_GET['email'];
|
||||
$website = $_GET['website'];
|
||||
$comment = $_GET['content'];
|
||||
$post_id = $_GET['post_id'];
|
||||
$parent = $_GET['parent'];
|
||||
comment_api::comment_send($dev,$name,$email,$website,$comment,$post_id,$parent);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,560 @@
|
||||
<?php
|
||||
include_once('JSON.php');
|
||||
include_once('DEV.php');
|
||||
class get_author
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
add_filter('rewrite_rules_array','get_author::insertRules');
|
||||
add_filter('query_vars','get_author::insertQueryVars');
|
||||
add_action('parse_query','get_author::insertParseQuery');
|
||||
}
|
||||
static function author_info($dev)
|
||||
{
|
||||
global $wpdb;
|
||||
$sql = 'SELECT * FROM '.$wpdb->users;
|
||||
$obj = $wpdb->get_results($sql);
|
||||
$count_total = 0;
|
||||
foreach($obj as $num)
|
||||
{
|
||||
$count_total++;
|
||||
}
|
||||
$count = $count_total;
|
||||
$page = get_author::_numpage($count_total,$count);
|
||||
$check_err = true;
|
||||
$err_msg = '';
|
||||
$status = 'ok';
|
||||
if (!$obj)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'query can not connect to database';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(empty($obj))
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the table is empty';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($check_err)
|
||||
{
|
||||
foreach($obj as $key => $value)
|
||||
{
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'slug' => $value->user_nicename,
|
||||
'name' => $value->display_name,
|
||||
'first_name' => get_user_meta($value->ID, 'first_name', true),
|
||||
'last_name' => get_user_meta($value->ID, 'last_name', true),
|
||||
'nickname' => $value->user_nicename,
|
||||
'url' => $value->user_url,
|
||||
'description' => get_user_meta($value->ID, 'description', true),
|
||||
'gravatar' => get_author::get_gravatar($value->user_email)
|
||||
);
|
||||
$authors[] = $obj[$key];
|
||||
}
|
||||
if(empty($authors))
|
||||
{
|
||||
$authors = array();
|
||||
}
|
||||
@rsort($authors);
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'count' => $count,
|
||||
'count_total' => $count_total,
|
||||
'pages' => $page,
|
||||
'authors' => $authors
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
static function get_id_info($dev,$ID)
|
||||
{
|
||||
global $wpdb;
|
||||
$sql = 'SELECT * FROM '.$wpdb->users;
|
||||
$obj = $wpdb->get_results($sql);
|
||||
$check_err = true;
|
||||
$err_msg = '';
|
||||
$status = 'ok';
|
||||
if(!(int) $ID)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'id should be an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if (!$obj)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'query can not connect to database';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(empty($obj))
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the table is empty';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($check_err)
|
||||
{
|
||||
$check = '';
|
||||
foreach($obj as $key => $value)
|
||||
{
|
||||
if($ID == $value->ID)
|
||||
{
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'slug' => $value->user_nicename,
|
||||
'name' => $value->display_name,
|
||||
'first_name' => get_user_meta($value->ID, 'first_name', true),
|
||||
'last_name' => get_user_meta($value->ID, 'last_name', true),
|
||||
'nickname' => $value->user_nicename,
|
||||
'url' => $value->user_url,
|
||||
'description' => get_user_meta($value->ID, 'description', true),
|
||||
'gravatar' => get_author::get_gravatar($value->user_email)
|
||||
);
|
||||
$authors[] = $obj[$key];
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'authors' => $authors
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
$check = true;
|
||||
}
|
||||
if($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
$check = true;
|
||||
}
|
||||
}
|
||||
if($check == true)
|
||||
{
|
||||
exit();
|
||||
}
|
||||
if($ID !== $value->ID)
|
||||
{
|
||||
$check = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($check == false and (int) $ID)
|
||||
{
|
||||
$status = 'error';
|
||||
$err_msg = 'this id is not available';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
static function _numpage($co_tot,$co)
|
||||
{
|
||||
if($co > $co_tot)
|
||||
{
|
||||
$co_tot = $co;
|
||||
$page = $co_tot / $co;
|
||||
return $page;
|
||||
}
|
||||
else
|
||||
{
|
||||
$page = $co_tot / $co;
|
||||
if ($page > 0 and $page < 1)
|
||||
{
|
||||
$page = 2;
|
||||
return $page;
|
||||
}
|
||||
else if ($page > 1 and $page < 2)
|
||||
{
|
||||
$page = 2;
|
||||
return $page;
|
||||
}
|
||||
return ceil($page);
|
||||
}
|
||||
}
|
||||
static function get_count_page($dev,$co,$pa) {
|
||||
global $wpdb;
|
||||
$sql = 'SELECT * FROM '.$wpdb->users;
|
||||
$obj = $wpdb->get_results($sql);
|
||||
$count_total = 0;
|
||||
foreach($obj as $num)
|
||||
{
|
||||
$count_total++;
|
||||
}
|
||||
$check_err = true;
|
||||
$err_msg = '';
|
||||
$status = 'ok';
|
||||
if(!(int) $co)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the value of count should be an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!empty($pa) and !(int) $pa)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the value of page should be an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($co > $count_total)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'count should be lower than count_total';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if (!$obj)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'query can not connect to database';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(empty($obj))
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the table is empty';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($check_err)
|
||||
{
|
||||
$page = get_author::_numpage($count_total,$co);
|
||||
foreach($obj as $key => $value)
|
||||
{
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'slug' => $value->user_nicename,
|
||||
'name' => $value->display_name,
|
||||
'first_name' => get_user_meta($value->ID, 'first_name', true),
|
||||
'last_name' => get_user_meta($value->ID, 'last_name', true),
|
||||
'nickname' => $value->user_nicename,
|
||||
'url' => $value->user_url,
|
||||
'description' => get_user_meta($value->ID, 'description', true),
|
||||
'gravatar' => get_author::get_gravatar($value->user_email)
|
||||
);
|
||||
$authors[] = $obj[$key];
|
||||
}
|
||||
@rsort($authors);
|
||||
if(empty($pa) or $pa == 1 or $page == 1)
|
||||
{
|
||||
for($i=0;$i<$co;$i++)
|
||||
{
|
||||
$author[] = $authors[$i];
|
||||
}
|
||||
@rsort($author);
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'count' => $co,
|
||||
'count_total' => $count_total,
|
||||
'pages' => $page,
|
||||
'currPage' => 1,
|
||||
'authors' => $author
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!empty($pa) and $pa != 1 and $page != 1)
|
||||
{
|
||||
if($pa >= $page and $page != 1)
|
||||
{
|
||||
$pa = $page;
|
||||
$count = 0;
|
||||
$begin = $co*($pa-1);
|
||||
$end = $begin + ($co - 1);
|
||||
for($i=$begin;$i<=$end;$i++)
|
||||
{
|
||||
if($authors[$i] == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$count++;
|
||||
$co = $count;
|
||||
}
|
||||
}
|
||||
}
|
||||
$begin = $co*($pa-1);
|
||||
$end = $begin + ($co - 1);
|
||||
for($i=$begin;$i<=$end;$i++)
|
||||
{
|
||||
if($authors[$i] == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$author[] = $authors[$i];
|
||||
}
|
||||
}
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'count' => $co,
|
||||
'count_total' => $count_total,
|
||||
'pages' => $page,
|
||||
'currPage' => $pa,
|
||||
'authors' => $author
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static function get_gravatar( $email, $s = 100, $d = 'mm', $r = 'g', $img = false, $atts = array() )
|
||||
{
|
||||
$url = 'http://www.gravatar.com/avatar/';
|
||||
$url .= md5( strtolower( trim( $email ) ) );
|
||||
$url .= "?s=$s&d=$d&r=$r";
|
||||
if ( $img )
|
||||
{
|
||||
$url = '<img src="' . $url . '"';
|
||||
foreach ( $atts as $key => $val )
|
||||
$url .= ' ' . $key . '="' . $val . '"';
|
||||
$url .= ' />';
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
static function insertRules($rules){
|
||||
$newrules = array();
|
||||
$newrules['redirect/url/(.+)$']='index.php?wpapi=get_author&dev&id&count&page';
|
||||
return $newrules+$rules;
|
||||
}
|
||||
static function insertQueryVars($vars){
|
||||
array_push($vars, 'wpapi','dev','id','count','page');
|
||||
return $vars;
|
||||
}
|
||||
static function insertParseQuery($query)
|
||||
{
|
||||
if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'get_author')
|
||||
{
|
||||
$dev = $_GET['dev'];
|
||||
$id = $_GET['id'];
|
||||
$page = $_GET['page'];
|
||||
$count = $_GET['count'];
|
||||
if(!empty($query->query_vars['id']) and $query->query_vars['id'] == $id)
|
||||
{
|
||||
get_author::get_id_info($dev,$id);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
|
||||
}
|
||||
else if(!empty($query->query_vars['count']) and $query->query_vars['count'] == $count and $query->query_vars['page'] == $page)
|
||||
{
|
||||
get_author::get_count_page($dev,$count,$page);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
get_author::author_info($dev);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
@include_once('JSON.php');
|
||||
@include_once ('DEV.php');
|
||||
class get_gravatar
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
add_filter('rewrite_rules_array','get_gravatar::insertRules');
|
||||
add_filter('query_vars','get_gravatar::insertQueryVars');
|
||||
add_action('parse_query','get_gravatar::insertParseQuery');
|
||||
}
|
||||
static function get_gravatar($dev,$email,$s)
|
||||
{
|
||||
if(!(int) $s and !empty($s))
|
||||
{
|
||||
$err_msg = "the size must an be integer number";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
exit();
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
$gravatar = get_gravatar::_get_gravatar($email,$s);
|
||||
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))
|
||||
{
|
||||
$err_msg = "please insert a valid email address in 'email' ";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$status = 'ok';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'gravatar' => $gravatar
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
}
|
||||
static function _get_gravatar( $email, $s, $d = 'mm', $r = 'g', $img = false, $atts = array() )
|
||||
{
|
||||
$url = 'http://www.gravatar.com/avatar/';
|
||||
$url .= md5( strtolower( trim( $email ) ) );
|
||||
$url .= "?s=$s&d=$d&r=$r";
|
||||
if ( $img )
|
||||
{
|
||||
$url = '<img src="' . $url . '"';
|
||||
foreach ( $atts as $key => $val )
|
||||
$url .= ' ' . $key . '="' . $val . '"';
|
||||
$url .= ' />';
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
static function insertRules($rules){
|
||||
$newrules = array();
|
||||
$newrules['redirect/url/(.+)$']='index.php?wpapi=gravatar&dev&email&size';
|
||||
return $newrules+$rules;
|
||||
}
|
||||
static function insertQueryVars($vars){
|
||||
array_push($vars, 'wpapi','dev','email','size');
|
||||
return $vars;
|
||||
}
|
||||
static function insertParseQuery($query)
|
||||
{
|
||||
if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'gravatar')
|
||||
{
|
||||
$email = $_GET['email'];
|
||||
$dev = $_GET['dev'];
|
||||
$s = $_GET['size'];
|
||||
get_gravatar::get_gravatar($dev,$email,$s);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,746 @@
|
||||
<?php
|
||||
@include_once('JSON.php');
|
||||
@include_once ('DEV.php');
|
||||
class search_api
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
add_filter('rewrite_rules_array','search_api::insertRules');
|
||||
add_filter('query_vars','search_api::insertQueryVars');
|
||||
add_action('parse_query','search_api::insertParseQuery');
|
||||
}
|
||||
|
||||
static function get_result_search($dev,$s,$co,$pa,$con,$comm,$type)
|
||||
{
|
||||
global $wpdb;
|
||||
$status = 'ok';
|
||||
$check_err = true;
|
||||
$sql = 'SELECT DISTINCT * FROM '.$wpdb->posts.' AS POSTS WHERE POSTS.post_status="publish"';
|
||||
$obj = $wpdb->get_results($sql);
|
||||
/**
|
||||
* This file is an independent controller, used to query the WordPress database
|
||||
* and provide search results for Ajax requests.
|
||||
*
|
||||
* @return string Either return nothing (i.e. no results) or return some formatted results.
|
||||
*/
|
||||
if (!defined('WP_PLUGIN_URL'))
|
||||
{
|
||||
require_once( realpath('../../../').'/wp-config.php' );
|
||||
}
|
||||
$WP_Query_object = new WP_Query();
|
||||
$WP_Query_object->query(array('s' => $_GET['keyword']));
|
||||
if((int) $type)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'type can not an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
exit();
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
foreach($WP_Query_object->posts as $result)
|
||||
{
|
||||
if(empty($type))
|
||||
{
|
||||
foreach($obj as $key => $value)
|
||||
{
|
||||
$cat = get_the_category($value->ID);
|
||||
$tag = get_the_tags($value->ID);
|
||||
$author = get_posts::return_author($value->post_author);
|
||||
$com = get_posts::return_comment($value->ID);
|
||||
if($com == null)
|
||||
{
|
||||
$com = array();
|
||||
}
|
||||
if($tag == false)
|
||||
{
|
||||
$tag = array();
|
||||
}
|
||||
if($result->ID == $value->ID and (($comm == null and $con == null) or ($comm == 0 and $con == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and ($comm == 1 and $con == 1))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'content' => $value->post_content,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status,
|
||||
'comments' => $com
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and (($comm == 1 and $con == null) or ($comm == 1 and $con == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status,
|
||||
'comments' => $com
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and (($con == 1 and $comm == null) or ($con == 1 and $comm == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'content' => $value->post_content,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!empty($type) and !(int) $type)
|
||||
{
|
||||
foreach($obj as $key => $value)
|
||||
{
|
||||
if($result->ID == $value->ID and $value->post_type == $type)
|
||||
{
|
||||
$cat = get_the_category($value->ID);
|
||||
$tag = get_the_tags($value->ID);
|
||||
$author = get_posts::return_author($value->post_author);
|
||||
$com = get_posts::return_comment($value->ID);
|
||||
if($com == null)
|
||||
{
|
||||
$com = array();
|
||||
}
|
||||
if($tag == false)
|
||||
{
|
||||
$tag = array();
|
||||
}
|
||||
if($result->ID == $value->ID and (($comm == null and $con == null) or ($comm == 0 and $con == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and ($comm == 1 and $con == 1))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'content' => $value->post_content,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status,
|
||||
'comments' => $com
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and (($comm == 1 and $con == null) or ($comm == 1 and $con == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status,
|
||||
'comments' => $com
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
if($result->ID == $value->ID and (($con == 1 and $comm == null) or ($con == 1 and $comm == 0)))
|
||||
{
|
||||
$exp = explode("\n",$value->post_content);
|
||||
if(empty($value->post_excerpt))
|
||||
{
|
||||
if(count($exp) > 1)
|
||||
{
|
||||
@$value->post_excerpt = explode(" ",strrev(substr(strip_tags($value->post_content), 0, 175)),2);
|
||||
@$value->post_excerpt = strrev($value->post_excerpt[1]).' '.'… <a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@$value->post_excerpt = $value->post_content;
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = ' ';
|
||||
@$value->post_excerpt = str_replace($order, $replace, $value->post_excerpt);
|
||||
}
|
||||
}
|
||||
else @$value->post_excerpt = $value->post_excerpt.' '.'<a href="'.$value->guid.'"> Continue reading <span class="meta-nav">→</span></a>';
|
||||
$obj[$key] = array(
|
||||
'id' => $value->ID,
|
||||
'type' => $value->post_type,
|
||||
'slug' => $value->post_name,
|
||||
'url' => $value->guid,
|
||||
'status' => $value->post_status,
|
||||
'title' => $value->post_title,
|
||||
'title_plain' => $value->post_title,
|
||||
'content' => $value->post_content,
|
||||
'date' => $value->post_date,
|
||||
'modified' => $value->post_modified,
|
||||
'excerpt' => $value->post_excerpt,
|
||||
'parent' => $value->post_parent,
|
||||
'category' => $cat,
|
||||
'tag' => $tag,
|
||||
'author' => $author,
|
||||
'comment_count' => $value->comment_count,
|
||||
'comment_status' => $value->comment_status
|
||||
);
|
||||
$posts[] = $obj[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(empty($posts))
|
||||
{
|
||||
$posts = array();
|
||||
}
|
||||
@rsort($posts);
|
||||
$count_tot = count($posts);
|
||||
if (!$obj)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'query can not connect to database';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!(int) $co and !empty($co))
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the value of count should be an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!empty($pa) and !(int) $pa)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'the value of page should be an integer number';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($co > $count_tot and $count_tot != 0)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'count should be lower than count_total';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($count_tot == 0 and !empty($co) and (int) $co)
|
||||
{
|
||||
$check_err = false;
|
||||
$err_msg = 'no result found';
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if($co != null)
|
||||
{
|
||||
$page = search_api::_numpage($count_tot, $co);
|
||||
}
|
||||
if ($co == null)
|
||||
{
|
||||
$page = search_api::_numpage($count_tot, $count_tot);
|
||||
$co = $count_tot;
|
||||
}
|
||||
if($pa == null)
|
||||
{
|
||||
$curr_page = 1;
|
||||
}
|
||||
if($pa != null)
|
||||
{
|
||||
$curr_page = $pa;
|
||||
}
|
||||
if($check_err)
|
||||
{
|
||||
if(empty($pa) or $pa == 1 or $page == 1)
|
||||
{
|
||||
for($i=0;$i<$co;$i++)
|
||||
{
|
||||
$post[] = $posts[$i];
|
||||
}
|
||||
@rsort($post);
|
||||
if(empty($post))
|
||||
{
|
||||
$post = array();
|
||||
}
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'count' => $co,
|
||||
'count_total' => $count_tot,
|
||||
'pages' => $page,
|
||||
'currPage' => 1,
|
||||
'posts' => $post
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
if(!empty($pa) and $pa != 1 and $page != 1)
|
||||
{
|
||||
if($pa >= $page and $page != 1)
|
||||
{
|
||||
$pa = $page;
|
||||
$count = 0;
|
||||
$begin = $co*($pa-1);
|
||||
$end = $begin + ($co - 1);
|
||||
for($i=$begin;$i<=$end;$i++)
|
||||
{
|
||||
if($posts[$i] == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$count++;
|
||||
$co = $count;
|
||||
}
|
||||
}
|
||||
}
|
||||
$begin = $co*($pa-1);
|
||||
$end = $begin + ($co - 1);
|
||||
for($i=$begin;$i<=$end;$i++)
|
||||
{
|
||||
if($posts[$i] == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$post[] = $posts[$i];
|
||||
}
|
||||
}
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'count' => $co,
|
||||
'count_total' => $count_tot,
|
||||
'pages' => $page,
|
||||
'currPage' => $pa,
|
||||
'posts' => $post
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function search_info($dev)
|
||||
{
|
||||
$err_msg = "Include 'keyword' var in your request";
|
||||
$status = 'error';
|
||||
$info = array(
|
||||
'status' => $status,
|
||||
'msg' => $err_msg,
|
||||
);
|
||||
$json = new Services_JSON();
|
||||
$encode = $json->encode($info);
|
||||
if($dev == 1)
|
||||
{
|
||||
$dev = new Dev();
|
||||
$output = $dev-> json_format($encode);
|
||||
print($output);
|
||||
}
|
||||
if ($dev != 1)
|
||||
{
|
||||
print ($encode);
|
||||
}
|
||||
}
|
||||
static function _numpage($co_tot,$co)
|
||||
{
|
||||
if($co > $co_tot)
|
||||
{
|
||||
$co_tot = $co;
|
||||
$page = $co_tot / $co;
|
||||
return $page;
|
||||
}
|
||||
else
|
||||
{
|
||||
@$page = $co_tot / $co;
|
||||
if ($page > 0 and $page < 1)
|
||||
{
|
||||
$page = 2;
|
||||
return $page;
|
||||
}
|
||||
else if ($page > 1 and $page < 2)
|
||||
{
|
||||
$page = 2;
|
||||
return $page;
|
||||
}
|
||||
return ceil($page);
|
||||
}
|
||||
}
|
||||
static function insertRules($rules){
|
||||
$newrules = array();
|
||||
$newrules['redirect/url/(.+)$']='index.php?wpapi=search&dev&keyword&count&page&content&comment&type';
|
||||
return $newrules+$rules;
|
||||
}
|
||||
static function insertQueryVars($vars){
|
||||
array_push($vars, 'wpapi','keyword','dev','count','page','content','comment','type');
|
||||
return $vars;
|
||||
}
|
||||
static function insertParseQuery($query)
|
||||
{
|
||||
if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'search')
|
||||
{
|
||||
$dev = $_GET['dev'];
|
||||
$key = $_GET['keyword'];
|
||||
$count = $_GET['count'];
|
||||
$page = $_GET['page'];
|
||||
$con = $_GET['content'];
|
||||
$comm = $_GET['comment'];
|
||||
$type = $_GET['type'];
|
||||
if(!empty($query->query_vars['keyword']) and $query->query_vars['keyword'] == $key)
|
||||
{
|
||||
search_api::get_result_search($dev,$key,$count,$page,$con,$comm,$type);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
search_api::search_info($dev);
|
||||
header('Content-type: text/plain');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: wp-api
|
||||
Plugin URI: http://wordpress.org/extend/plugins/wp-api/
|
||||
Description: Wordpress api in JSON format
|
||||
Author: Peyman Aslani
|
||||
Version: 1.0.3
|
||||
Author URI: http://www.myappsnippet.com/
|
||||
*/
|
||||
//includes
|
||||
@include_once('admin/admin.php');
|
||||
@include_once ('includes/get_author.php');
|
||||
@include_once ('includes/get_tags.php');
|
||||
@include_once ('includes/get_posts.php');
|
||||
@include_once ('includes/search_api.php');
|
||||
@include_once ('includes/comment_api.php');
|
||||
@include_once ('includes/get_gravatar.php');
|
||||
//hooks
|
||||
add_action('admin_menu', 'admin_page_class::add_menu_item');
|
||||
new get_author();
|
||||
new get_tags();
|
||||
new get_posts();
|
||||
new search_api();
|
||||
new comment_api();
|
||||
new get_gravatar();
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
=== WP API ===
|
||||
Contributors: myflashlab
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=payments%40premierweb%2enet%2eau&lc=US&item_name=wp%2dapi&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
||||
Tags: mobile, air, app, json, cms, api
|
||||
Requires at least: 2.8
|
||||
Tested up to: 3.2.1
|
||||
Stable tag: 1.0.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Wordpress api in JSON format
|
||||
|
||||
== Description ==
|
||||
|
||||
wp-api translates your whole wordpress blog into a JSON formatted api. you can use many different methods to retrieve
|
||||
information about posts, pages, authors, tags and categories. You may also use the api methods to submit new comments.
|
||||
|
||||
We had to write this plugin from ground up because we were working on an adobe air mobile project that required us to
|
||||
show posts from a wordpress site! we're still upgrading the app and we need to upgrade this api even more also. so we
|
||||
decided to put it up on wordpress directory for everyone to use and have fun :)
|
||||
|
||||
to get detailed description on how to use the api, go to wp-api page from the 'settings' menu to see the methods and examples.
|
||||
|
||||
== Installation ==
|
||||
|
||||
1. Upload the `wp-api` folder to `/wp-content/plugins/` directory
|
||||
2. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
3. Go to `wp-api` page in the `Settings` menu
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= Are you going to upgrade this plugin to do more stuff? =
|
||||
|
||||
Yes, there are many features that we're hoping to add to the api. it's just a matter of time. please feel free to follow us on
|
||||
<a href='https://www.facebook.com/myflashlab'>facebook</a> for the latest news and updates to the plugin.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Sample JSON output by wp-api
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0.3 =
|
||||
|
||||
* fixed comment parents. you can chooes which parent to post your comment to.
|
||||
|
||||
= 1.0.2 =
|
||||
* set type argument for get_posts and search method
|
||||
* create Continue reading for post_excerpt
|
||||
* change nicename to nickname in all methods
|
||||
|
||||
= 1.0.1 =
|
||||
* removed the jQuery for better performance in the control panel
|
||||
|
||||
= 1.0 =
|
||||
* uploaded to wordpress directory
|
||||
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 1.0.3 =
|
||||
|
||||
* fixed comment parents. you can chooes which parent to post your comment to.
|
||||
|
||||
= 1.0.2 =
|
||||
* set type argument for get_posts and search method
|
||||
* create Continue reading for post_excerpt
|
||||
* change nicename to nickname in all methods
|
||||
|
||||
= 1.0.1 =
|
||||
* removed the jQuery for better performance in the control panel
|
||||
|
||||
= 1.0 =
|
||||
Fresh installation
|
||||
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,38 @@
|
||||
=== wpDirAuth Credits ===
|
||||
|
||||
wpDirAuth is made possible by the following contributors:
|
||||
|
||||
Paul Gilzow
|
||||
Current maintainer
|
||||
Columbia, MO, USA
|
||||
http://profiles.wordpress.org/users/gilzow/
|
||||
|
||||
Stephane Daury
|
||||
Original author
|
||||
Montreal, QC, Canada
|
||||
http://stephane.daury.org/
|
||||
|
||||
Todd Beverly
|
||||
wpDirAuth QA and patch contributor
|
||||
Rochester, NY, USA
|
||||
See http://wordpress.org/support/topic/129814
|
||||
|
||||
Richard Bullington-McGuire <rbulling@pkrinternet.com>
|
||||
wpDirAuth patch contributor
|
||||
wpLDAP SSL patch author
|
||||
Arlington, VA, USA
|
||||
Managing Partner, PKR Internet, LLC
|
||||
http://www.pkrinternet.com/
|
||||
|
||||
Richard Valk
|
||||
wpDirAuth QA contributor
|
||||
http://richard5.net
|
||||
|
||||
== wpLDAP Credits ==
|
||||
|
||||
wpDirAuth was started (2007) from a patched version of wpLDAP 1.02.
|
||||
|
||||
Ashay Suresh Manjure
|
||||
Original wpLDAP author
|
||||
Los Angeles, CA, USA
|
||||
http://ashay.org/
|
||||
@@ -0,0 +1,229 @@
|
||||
=== wpDirAuth ===
|
||||
Contributors: gilzow, stephdau, apokalyptik
|
||||
Tags: login, authentication, directory, ldap, ldaps
|
||||
Requires at least: 2.2
|
||||
Tested up to: 3.4.2
|
||||
Stable tag: 1.7.6
|
||||
|
||||
WordPress directory authentication plugin through LDAP and LDAPS (SSL).
|
||||
|
||||
== Description ==
|
||||
|
||||
See <http://wordpress.org/extend/plugins/wpdirauth/>
|
||||
|
||||
PLEASE NOTE
|
||||
Beta testers of the 1.7.X branch prior to version 1.7.5, you will need to
|
||||
deactivate wpdirauth before you updgrade to this latest version. Once you
|
||||
have installed and network activated the plugin, it will copy your options
|
||||
from their previous location to the sitemeta table. You will only need to
|
||||
do this once. This will also work for anyone who was using the 1.6.X
|
||||
branch or older and plans on using it in MULTISITE mode.
|
||||
|
||||
Version 1.7.5 brings full MULTISITE support.
|
||||
|
||||
wpDirAuth allows users of central directory (LDAP) servers to login to
|
||||
authorized WordPress instances without having to register. The plugin creates
|
||||
a new account for each directory user on first login so that they have full
|
||||
access to preferences and functions, as any WP user would.
|
||||
|
||||
Activating the plugin will not restrict you to using directory authentication
|
||||
and you will still be able to both create new WP-only users as well as turn on
|
||||
public registration in WordPress. You can also assign any privilege levels to
|
||||
your directory users, and the those users will be referred to their
|
||||
institutional password policy whenever they would normally able to update
|
||||
their WP passwords (on the profile screen, in user edit, etc).
|
||||
|
||||
= LDAP/LDAPS =
|
||||
|
||||
Authentication should work with most LDAP enabled directory services, such as
|
||||
OpenLDAP, Apache Directory, Microsoft Active Directory, Novell eDirectory,
|
||||
Sun Java System Directory Server, and more.
|
||||
|
||||
wpDirAuth supports LDAP and LDAPS (SSL) connectivity and can force SSL for
|
||||
WordPress authentication if it is available on the Web server. It also supports
|
||||
server connection pools, for pseudo load balancing and fault tolerance, or
|
||||
multiple source directory authentication.
|
||||
|
||||
Because the key used to locate a user's profile in the LDAP server is not
|
||||
always the same, depending on your LDAP server type and institutional choices,
|
||||
you can define your own through the wpDirAuth administration tool.
|
||||
|
||||
When logging in as a directory user, the WP "remember me" feature is downgraded
|
||||
from 6 months for regular WP users to only 1 hour, so that institutional
|
||||
passwords are not overly endangered when accessing WP from public terminals.
|
||||
|
||||
= Branding & Notifications =
|
||||
|
||||
You can define notifications addressed to your directory users in key WordPress
|
||||
areas, such as the login screen and the profile edit screen.
|
||||
|
||||
Since these admin-editable values support HTML (admin, coders, beware of xss!),
|
||||
you can point your directory users to central support information related to
|
||||
functions such as changing their institutional password, a WordPress usage
|
||||
related policy, etc.
|
||||
|
||||
There is also a simple and optional terms of services concept, only implemented
|
||||
for directory users, which will simply record a one-time acceptance date when
|
||||
agreed upon. Note that agreeing to the TOS has no effect on the user's level of
|
||||
access in the system, fact which could change in future version if there is a
|
||||
demand for it, or through direct code contribution to that effect.
|
||||
|
||||
|
||||
== Download ==
|
||||
|
||||
You can download the latest stable version of wpDirAuth from the WordPress
|
||||
Plugin Finder at the following locations:
|
||||
|
||||
* Direct download: <http://downloads.wordpress.org/plugin/wpdirauth.zip>
|
||||
* WPPF home: <http://wordpress.org/extend/plugins/wpdirauth/>
|
||||
|
||||
|
||||
== Installation ==
|
||||
|
||||
Installing should be a piece of cake and take fewer than ten minutes, provided
|
||||
you know your directory server(s) information, and that your blog is allowed to
|
||||
connect and bind to it/them.
|
||||
|
||||
Please refer to your friendly neighbourhood LDAP sysadmin for more information.
|
||||
|
||||
1. Upload the `wpDirAuth` directory to the `/wp-content/plugins/` directory.
|
||||
1. Login to your WordPress instance as an admin user.
|
||||
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
||||
1. Go to the `Directory Auth.` menu found in the WordPress `Options` section.
|
||||
1. Enter your directory server(s) information and set your preferences.
|
||||
|
||||
You should now be able to login as a directory user.
|
||||
|
||||
|
||||
== Using wpDirAuth ==
|
||||
|
||||
Once installed and activated, you will be able to administer your directory
|
||||
settings through the dedicated plugin configuration tool found under the
|
||||
`Directory Auth.` menu found in the WordPress `Options` admin section.
|
||||
|
||||
Directory Authenticated users can now be pre-added to your wordpress system
|
||||
and granted roles by going to the `Add Dir Auth User` menu found in the
|
||||
Wordpress `Users` admin section. Contextual help for this section is
|
||||
available for this section within Wordpress' built-in help menu.
|
||||
|
||||
See the inline help found in the tool for more information on the settings.
|
||||
|
||||
There is a secondary activation toggle, so you can install and activate the
|
||||
plugin, check out the options panel, but not immediately accept directory
|
||||
authentication, or even simply turn the feature on or off at any time.
|
||||
|
||||
|
||||
== Help and Support ==
|
||||
|
||||
Please post questions, request for help to the Wordpress plugins forum or
|
||||
email <wpdirauth@gilzow.com>. Please be sure to include 'wpdirauth' in the
|
||||
subject line.
|
||||
|
||||
== TO-DO's ==
|
||||
|
||||
|
||||
== Source and Development ==
|
||||
|
||||
wpDirAuth welcomes friendly contributors wanting to lend a hand, be it in
|
||||
the form of code through SVN patches, user support, platform portability
|
||||
testing, security consulting, localization help, etc.
|
||||
|
||||
The [current] goal is to keep the plugin self-contained (ie: no 3rd-party lib)
|
||||
for easier security maintenance, while keeping the code clean and extensible.
|
||||
|
||||
Focus is on security, features, security, and let's not forget, security.
|
||||
Unit tests will hopefully be developed and constant security audit performed.
|
||||
|
||||
Recurring quality patch contributions will lead to commit privileges to the
|
||||
project source repository.
|
||||
|
||||
Please post questions/requests for help to the wordpress forums and/or
|
||||
email <wpdirauth@gilzow.com>
|
||||
|
||||
The project source code is available on the WordPress Plugin Repository:
|
||||
|
||||
* Stable: <http://svn.wp-plugins.org/wpdirauth/trunk/>
|
||||
* Unstable: <http://svn.wp-plugins.org/wpdirauth/branches/dev/>
|
||||
* Historical: <http://svn.wp-plugins.org/wpdirauth/tags/>
|
||||
|
||||
The Sybversion repository can be browsed and tracked (RSS, etc) through the
|
||||
WP Plugin Repo source browser at:
|
||||
|
||||
* <http://dev.wp-plugins.org/browser/wpdirauth/>
|
||||
|
||||
The generated code documentation can be found at:
|
||||
|
||||
* <http://labs.tekartist.org/wordpress/wpdirauth/phpdocs/>
|
||||
|
||||
The WP Plugin Repo also offers a convenient ticketing system for bug and
|
||||
task tracking.
|
||||
|
||||
* Existing tickets: <http://dev.wp-plugins.org/query?status=new&status=assigned&status=reopened&group=priority&component=wpdirauth&order=priority>
|
||||
* Open a new ticket: <http://dev.wp-plugins.org/newticket>
|
||||
|
||||
|
||||
== License ==
|
||||
|
||||
[General Public License](http://www.gnu.org/licenses/gpl.html)
|
||||
|
||||
Copyrights are listed in chronological order, by contributions.
|
||||
|
||||
wpDirAuth: WordPress Directory Authentication, original author
|
||||
Copyright (c) 2007 Stephane Daury - http://stephane.daury.org/
|
||||
|
||||
wpDirAuth and wpLDAP Patch Contributions
|
||||
Copyright (c) 2007 PKR Internet, LLC - http://www.pkrinternet.com/
|
||||
|
||||
wpDirAuth Patch Contributions
|
||||
Copyright (c) 2007 Todd Beverly
|
||||
|
||||
wpLDAP: WordPress LDAP Authentication
|
||||
Copyright (c) 2007 Ashay Suresh Manjure - http://ashay.org/
|
||||
|
||||
wpDirAuth Patch Contribution and current maintainer
|
||||
Copyright (c) 2010, 2011, 2012 Paul Gilzow - http://gilzow.com/
|
||||
|
||||
wpDirAuth 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.
|
||||
|
||||
wpDirAuth 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
== Project History ==
|
||||
|
||||
Originally started from a patched version of wpLDAP (1.02+patch), wpDirAuth has
|
||||
since then been heavily overhauled and features have been modified and added.
|
||||
In other words, a classic case of `pimp my lib'` (hopefully for the better).
|
||||
|
||||
* Current: wpDirAuth: <http://tekartist.org/labs/wordpress/plugins/wpdirauth/>
|
||||
* Original: wpLDAP: <http://ashay.org/?page_id=133>
|
||||
* wpLDAP Patch: <http://www.pkrinternet.com/~rbulling/private/wpLDAP-1.02-ssl.patch>
|
||||
|
||||
== Changelog ==
|
||||
|
||||
PLEASE NOTE Beta testers of the 1.7.X branch prior to version 1.7.5, you will need to deactivate wpdirauth before you updgrade to this latest version. Once you have installed and network activated the plugin, it will copy your options from their previous location to the sitemeta table. You will only need to do this once. This will also work for anyone who was using the 1.6.X branch or older and plans on using it in MULTISITE mode.
|
||||
|
||||
= 1.7.6 =
|
||||
Corrected situation where a new authenticated user logging into a child site in a multisite network was added to the parent site, instead of the child site where they initiated the login. Also, somewhere along the way, I reintroduced a bug that when using authentication groups, the plugin would fail to redirect a successfully logged in user.
|
||||
|
||||
= 1.7.5 =
|
||||
* MULTISITE support, bug fixes, security enhancements
|
||||
|
||||
= 1.6.1 =
|
||||
* Corrected a bug that would prevent user profiles from successfully being found. Thanks go to jgiangrande for identifying the problem area.
|
||||
|
||||
= 1.6.0 =
|
||||
* Added `Add Dir Auth User` to Admin User menu. Now able to pre-add Directory Authenticated users and assign roles where previously users would have to log in first, and then have an admin change their role.
|
||||
|
||||
= 1.5.2 =
|
||||
* Added ability to limit logins to specific AD groups. Fixed a bug that produced an incorrect filter when using a single Authentication Group
|
||||
|
||||
= 1.5.1 =
|
||||
* Remove default password nag for wpdirauth accounts
|
||||