diff --git a/wp-content/plugins/user-role-editor/css/images/animated-overlay.gif b/wp-content/plugins/user-role-editor/css/images/animated-overlay.gif new file mode 100644 index 0000000..d441f75 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/animated-overlay.gif differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..6f671f5 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_75_ffffff_40x100.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..43eaad2 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..b98b72d Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_65_ffffff_1x400.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..4be07cc Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_dadada_1x400.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..6eb4835 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..7dcbd6b Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_95_fef1ec_1x400.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..37aae6a Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/wp-content/plugins/user-role-editor/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..4dadbc4 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-icons_222222_256x240.png b/wp-content/plugins/user-role-editor/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..c1cb117 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-icons_222222_256x240.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-icons_2e83ff_256x240.png b/wp-content/plugins/user-role-editor/css/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..84b601b Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-icons_2e83ff_256x240.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-icons_454545_256x240.png b/wp-content/plugins/user-role-editor/css/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..b6db1ac Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-icons_454545_256x240.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-icons_888888_256x240.png b/wp-content/plugins/user-role-editor/css/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..feea0e2 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-icons_888888_256x240.png differ diff --git a/wp-content/plugins/user-role-editor/css/images/ui-icons_cd0a0a_256x240.png b/wp-content/plugins/user-role-editor/css/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..ed5b6b0 Binary files /dev/null and b/wp-content/plugins/user-role-editor/css/images/ui-icons_cd0a0a_256x240.png differ diff --git a/wp-content/plugins/user-role-editor/css/index.php b/wp-content/plugins/user-role-editor/css/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/user-role-editor/css/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.css b/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.css new file mode 100644 index 0000000..b804060 --- /dev/null +++ b/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.css @@ -0,0 +1,1178 @@ +/*! 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 */ + +/* Layout helpers +----------------------------------*/ +.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; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.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; /* support: IE7 */ +} +.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; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.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; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.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; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +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 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("images/animated-overlay.gif"); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); + border-radius: 8px; +} diff --git a/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.min.css b/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.min.css new file mode 100644 index 0000000..78c2c17 --- /dev/null +++ b/wp-content/plugins/user-role-editor/css/jquery-ui-1.10.4.custom.min.css @@ -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 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/css/ure-admin.css b/wp-content/plugins/user-role-editor/css/ure-admin.css new file mode 100644 index 0000000..a8e541a --- /dev/null +++ b/wp-content/plugins/user-role-editor/css/ure-admin.css @@ -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; +} \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/images/admin-menu-editor-pro.jpg b/wp-content/plugins/user-role-editor/images/admin-menu-editor-pro.jpg new file mode 100644 index 0000000..da145b1 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/admin-menu-editor-pro.jpg differ diff --git a/wp-content/plugins/user-role-editor/images/changelog-icon.png b/wp-content/plugins/user-role-editor/images/changelog-icon.png new file mode 100644 index 0000000..6026d65 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/changelog-icon.png differ diff --git a/wp-content/plugins/user-role-editor/images/donate-icon.png b/wp-content/plugins/user-role-editor/images/donate-icon.png new file mode 100644 index 0000000..ae4f2e7 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/donate-icon.png differ diff --git a/wp-content/plugins/user-role-editor/images/faq-icon.png b/wp-content/plugins/user-role-editor/images/faq-icon.png new file mode 100644 index 0000000..b284bb2 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/faq-icon.png differ diff --git a/wp-content/plugins/user-role-editor/images/help.png b/wp-content/plugins/user-role-editor/images/help.png new file mode 100644 index 0000000..5c87017 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/help.png differ diff --git a/wp-content/plugins/user-role-editor/images/index.php b/wp-content/plugins/user-role-editor/images/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/user-role-editor/images/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/images/mwp250_2.png b/wp-content/plugins/user-role-editor/images/mwp250_2.png new file mode 100644 index 0000000..f11444d Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/mwp250_2.png differ diff --git a/wp-content/plugins/user-role-editor/images/user-role-editor-icon.png b/wp-content/plugins/user-role-editor/images/user-role-editor-icon.png new file mode 100644 index 0000000..1b67d84 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/user-role-editor-icon.png differ diff --git a/wp-content/plugins/user-role-editor/images/user-role-editor-page-icon.png b/wp-content/plugins/user-role-editor/images/user-role-editor-page-icon.png new file mode 100644 index 0000000..a8baad3 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/user-role-editor-page-icon.png differ diff --git a/wp-content/plugins/user-role-editor/images/user-role-editor-pro-728x90.jpg b/wp-content/plugins/user-role-editor/images/user-role-editor-pro-728x90.jpg new file mode 100644 index 0000000..e8754e9 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/user-role-editor-pro-728x90.jpg differ diff --git a/wp-content/plugins/user-role-editor/images/vladimir.png b/wp-content/plugins/user-role-editor/images/vladimir.png new file mode 100644 index 0000000..0ebfdf2 Binary files /dev/null and b/wp-content/plugins/user-role-editor/images/vladimir.png differ diff --git a/wp-content/plugins/user-role-editor/includes/class-advertisement.php b/wp-content/plugins/user-role-editor/includes/class-advertisement.php new file mode 100644 index 0000000..275c33d --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-advertisement.php @@ -0,0 +1,92 @@ +'', 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 = ' +
+ + Admin Menu Editor Pro + +
+ '; + + return $output; + } + // end of admin_menu_editor() + + + // content of Manage WP advertisement slot + private function manage_wp() { + + $output = ' +
+ + ManageWP + +
+ '; + + 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 \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/includes/class-ajax-processor.php b/wp-content/plugins/user-role-editor/includes/class-ajax-processor.php new file mode 100644 index 0000000..6990d84 --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-ajax-processor.php @@ -0,0 +1,107 @@ +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 diff --git a/wp-content/plugins/user-role-editor/includes/class-garvs-wp-lib.php b/wp-content/plugins/user-role-editor/includes/class-garvs-wp-lib.php new file mode 100644 index 0000000..8bda96e --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-garvs-wp-lib.php @@ -0,0 +1,224 @@ +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 '
'; + } else { + echo '
'; + } + echo $message . '
'; + } + + } + // 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 \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/includes/class-ure-lib.php b/wp-content/plugins/user-role-editor/includes/class-ure-lib.php new file mode 100644 index 0000000..b6a1511 --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-ure-lib.php @@ -0,0 +1,2431 @@ +integrate_with_gravity_forms = class_exists('GFForms'); + + + } + // end of __construct() + + + /** + * get options for User Role Editor plugin + * User Role Editor stores its options at the main blog/site only and applies them to the all network + * + */ + protected function init_options($options_id) { + + global $wpdb; + + $current_blog = $wpdb->blogid; + if ($this->multisite && $current_blog!=$this->main_blog_id) { + switch_to_blog($this->main_blog_id); // in order to get URE options from the main blog + } + + $this->options_id = $options_id; + $this->options = get_option($options_id); + + if ($this->multisite && $current_blog!=$this->main_blog_id) { + // return back to the current blog + restore_current_blog(); + } + + } + // end of init_options() + + + /** + * saves options array into WordPress database wp_options table + */ + public function flush_options() { + + global $wpdb; + + if ($this->multisite) { + $current_blog = $wpdb->blogid; + if ($current_blog!==$this->main_blog_id) { + switch_to_blog($this->main_blog_id); // in order to save URE options to the main blog + } + } + + update_option($this->options_id, $this->options); + + if ($this->multisite && $current_blog!==$this->main_blog_id) { + // return back to the current blog + restore_current_blog(); + } + + } + // end of flush_options() + + + public function get_main_blog_id() { + + return $this->main_blog_id; + + } + + + /** + * return key capability to have access to User Role Editor Plugin + * + * @return string + */ + public function get_key_capability() { + if (!$this->multisite) { + $key_capability = URE_KEY_CAPABILITY; + } else { + $enable_simple_admin_for_multisite = $this->get_option('enable_simple_admin_for_multisite', 0); + if ( (defined('URE_ENABLE_SIMPLE_ADMIN_FOR_MULTISITE') && URE_ENABLE_SIMPLE_ADMIN_FOR_MULTISITE == 1) || + $enable_simple_admin_for_multisite) { + $key_capability = URE_KEY_CAPABILITY; + } else { + $key_capability = 'manage_network_users'; + } + } + + return $key_capability; + } + // end of get_key_capability() + + + /** + * return front-end according to the context - role or user editor + */ + public function editor() { + + if (!$this->editor_init0()) { + $this->show_message(esc_html__('Error: wrong request', 'URE')); + return false; + } + $this->process_user_request(); + $this->editor_init1(); + $this->show_editor(); + + } + // end of editor() + + + protected function advertisement() { + + if (!class_exists('User_Role_Editor_Pro')) { + $this->advert = new ure_Advertisement(); + $this->advert->display(); + } + } + // end of advertisement() + + + protected function output_role_edit_dialogs() { +?> + + + +
+
+
+
+
+
+
+
role_to_copy_html; ?>
+
+
+ +
+
+
+
role_delete_html; ?>
+
+
+ + +
+
+ role_default_html; ?> +
+
+ + +
+
+
+
capability_remove_html; ?>
+
+
+ +
+
+
+
+
+
+ +show_message($this->notification); +?> +
+

+

+
+
+ advertisement(); +?> +
+ +
+
+
+ure_object == 'user') { + require_once(URE_PLUGIN_DIR . 'includes/ure-user-edit.php'); + } else { + $this->set_current_role(); + $this->role_edit_prepare_html(); + require_once(URE_PLUGIN_DIR . 'includes/ure-role-edit.php'); + } +?> + +
+
+advertise_pro_version(); + + if ($this->ure_object == 'role') { + $this->output_role_edit_dialogs(); + } +?> +
+
+
+ +
+ +hide_pro_banner) { + echo 'User Role Editor Pro: extended functionality, no advertisement - from $29.'; + } else { +?> + User Role Editor Pro +
+ + +
+ure_object == 'user') { + if (!isset($_REQUEST['user_id'])) { + return false; // user_id value is missed + } + $user_id = $_REQUEST['user_id']; + if (!is_numeric($user_id)) { + return false; + } + if (!$user_id) { + return false; + } + $this->user_to_edit = get_user_to_edit($user_id); + if (empty($this->user_to_edit)) { + return false; + } + } + + return true; + } + // end of check_user_to_edit() + + + protected function init_current_role_name() { + + if (!isset($this->roles[$_POST['user_role']])) { + $mess = esc_html__('Error: ', 'ure') . esc_html__('Role', 'ure') . ' ' . esc_html($_POST['user_role']) . ' ' . + esc_html__('does not exist', 'ure'); + $this->current_role = ''; + $this->current_role_name = ''; + } else { + $this->current_role = $_POST['user_role']; + $this->current_role_name = $this->roles[$this->current_role]['name']; + $mess = ''; + } + + return $mess; + + } + // end of init_current_role_name() + + + /** + * prepare capabilities from user input to save at the database + */ + protected function prepare_capabilities_to_save() { + $this->capabilities_to_save = array(); + foreach ($this->full_capabilities as $available_capability) { + $cap_id = str_replace(' ', URE_SPACE_REPLACER, $available_capability['inner']); + if (isset($_POST[$cap_id])) { + $this->capabilities_to_save[$available_capability['inner']] = true; + } + } + } + // end of prepare_capabilities_to_save() + + + /** + * save changes to the roles or user + * @param string $mess - notification message to the user + * @return string - notification message to the user + */ + protected function permissions_object_update($mess) { + + if ($this->ure_object == 'role') { // save role changes to database + if ($this->update_roles()) { + if ($mess) { + $mess .= '
'; + } + if (!$this->apply_to_all) { + $mess = esc_html__('Role is updated successfully', 'ure'); + } else { + $mess = esc_html__('Roles are updated for all network', 'ure'); + } + } else { + if ($mess) { + $mess .= '
'; + } + $mess = esc_html__('Error occured during role(s) update', 'ure'); + } + } else { + if ($this->update_user($this->user_to_edit)) { + if ($mess) { + $mess .= '
'; + } + $mess = esc_html__('User capabilities are updated successfully', 'ure'); + } else { + if ($mess) { + $mess .= '
'; + } + $mess = esc_html__('Error occured during user update', 'ure'); + } + } + return $mess; + } + // end of permissions_object_update() + + + /** + * Process user request + */ + protected function process_user_request() { + + $this->notification = ''; + if (isset($_POST['action'])) { + if (empty($_POST['ure_nonce']) || !wp_verify_nonce($_POST['ure_nonce'], 'user-role-editor')) { + echo '

Wrong nonce. Action prohibitied.

'; + exit; + } + + $action = $_POST['action']; + + if ($action == 'reset') { + $this->reset_user_roles(); + exit; + } else if ($action == 'add-new-role') { + // process new role create request + $this->notification = $this->add_new_role(); + } else if ($action == 'delete-role') { + $this->notification = $this->delete_role(); + } else if ($action == 'change-default-role') { + $this->notification = $this->change_default_role(); + } else if ($action == 'caps-readable') { + if ($this->caps_readable) { + $this->caps_readable = 0; + } else { + $this->caps_readable = 1; + } + set_site_transient( 'ure_caps_readable', $this->caps_readable, 600 ); + } else if ($action == 'show-deprecated-caps') { + if ($this->show_deprecated_caps) { + $this->show_deprecated_caps = 0; + } else { + $this->show_deprecated_caps = 1; + } + set_site_transient( 'ure_show_deprecated_caps', $this->show_deprecated_caps, 600 ); + } else if ($action == 'hide-pro-banner') { + $this->hide_pro_banner = 1; + $this->put_option('ure_hide_pro_banner', 1); + $this->flush_options(); + } else if ($action == 'add-new-capability') { + $this->notification = $this->add_new_capability(); + } else if ($action == 'delete-user-capability') { + $this->notification = $this->delete_capability(); + } else if ($action == 'roles_restore_note') { + $this->notification = esc_html__('User Roles are restored to WordPress default values. ', 'ure'); + } else if ($action == 'update') { + $this->roles = $this->get_user_roles(); + $this->init_full_capabilities(); + if (isset($_POST['user_role'])) { + $this->notification = $this->init_current_role_name(); + } + $this->prepare_capabilities_to_save(); + $this->notification = $this->permissions_object_update($this->notification); + } else { + do_action('ure_process_user_request'); + } // if ($action + } + + } + // end of process_user_request() + + + protected function set_apply_to_all() { + if (isset($_POST['ure_apply_to_all'])) { + $this->apply_to_all = 1; + } else { + $this->apply_to_all = 0; + } +} + // end of set_apply_to_all() + + + public function get_default_role() { + $this->wp_default_role = get_option('default_role'); + } + // end of get_default_role() + + + protected function editor_init0() { + $this->caps_readable = get_site_transient('ure_caps_readable'); + if (false === $this->caps_readable) { + $this->caps_readable = $this->get_option('ure_caps_readable'); + set_site_transient('ure_caps_readable', $this->caps_readable, 600); + } + $this->show_deprecated_caps = get_site_transient('ure_show_deprecated_caps'); + if (false === $this->show_deprecated_caps) { + $this->show_deprecated_caps = $this->get_option('ure_show_deprecated_caps'); + set_site_transient('ure_caps_readable', $this->caps_readable, 600); + } + + $this->hide_pro_banner = $this->get_option('ure_hide_pro_banner', 0); + $this->get_default_role(); + + // could be sent as by POST, as by GET + if (isset($_REQUEST['object'])) { + $this->ure_object = $_REQUEST['object']; + if (!$this->check_user_to_edit()) { + return false; + } + } else { + $this->ure_object = 'role'; + } + + $this->set_apply_to_all(); + + return true; + } + // end of editor_init0() + + + public function editor_init1() { + + if (!isset($this->roles) || !$this->roles) { + // get roles data from database + $this->roles = $this->get_user_roles(); + } + + $this->init_full_capabilities(); + + if (!class_exists('User_Role_Editor_Pro')) { + require_once(URE_PLUGIN_DIR . 'includes/class-advertisement.php'); + } + + } + // end of editor_init1() + + + /** + * return id of role last in the list of sorted roles + * + */ + protected function get_last_role_id() { + + // get the key of the last element in roles array + $keys = array_keys($this->roles); + $last_role_id = array_pop($keys); + + return $last_role_id; + } + // end of get_last_role_id() + + + /** + * Check if user has "Administrator" role assigned + * + * @global wpdb $wpdb + * @param int $user_id + * @return boolean returns true is user has Role "Administrator" + */ + public function has_administrator_role($user_id) { + global $wpdb; + + if (empty($user_id) || !is_numeric($user_id)) { + return false; + } + + $table_name = (!$this->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta; + $meta_key = $wpdb->prefix . 'capabilities'; + $query = "SELECT count(*) + FROM $table_name + WHERE user_id=$user_id AND meta_key='$meta_key' AND meta_value like '%administrator%'"; + $has_admin_role = $wpdb->get_var($query); + if ($has_admin_role > 0) { + $result = true; + } else { + $result = false; + } + // cache checking result for the future use + $this->lib->user_to_check[$user_id] = $result; + + return $result; + } + + // end of has_administrator_role() + + + /** + * Checks if user is allowed to user User Role Editor + * + * @global int $current_user + * @param int $user_id + * @return boolean true + */ + public function user_is_admin($user_id = false) { + global $current_user; + + $ure_key_capability = $this->get_key_capability(); + if (empty($user_id)) { + $user_id = $current_user->ID; + } + $result = user_can($user_id, $ure_key_capability); + + return $result; + } + // end of user_is_admin() + + + /** + * return array with WordPress user roles + * + * @global WP_Roles $wp_roles + * @global type $wp_user_roles + * @return array + */ + public function get_user_roles() { + + global $wp_roles; + + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + + if (function_exists('bbp_filter_blog_editable_roles')) { // bbPress plugin is active + $this->roles = bbp_filter_blog_editable_roles($wp_roles->roles); // exclude bbPress roles + $bbp_full_caps = bbp_get_caps_for_role(bbp_get_keymaster_role()); + // exclude capabilities automatically added by bbPress bbp_dynamic_role_caps() and not bbPress related: read, level_0, all s2Member levels, e.g. access_s2member_level_0, etc. + $built_in_wp_caps = $this->get_built_in_wp_caps(); + $bbp_only_caps = array(); + foreach ($bbp_full_caps as $bbp_cap => $val) { + if (isset($built_in_wp_caps[$bbp_cap]) || substr($bbp_cap, 0, 15) == 'access_s2member') { + continue; + } + $bbp_only_caps[$bbp_cap] = $val; + } + // remove bbPress dynamically created capabilities from WordPress persistent roles in order to not save them to database with any role update + $cap_removed = false; + foreach ($bbp_only_caps as $bbp_cap => $val) { + foreach ($this->roles as &$role) { + if (isset($role['capabilities'][$bbp_cap])) { + unset($role['capabilities'][$bbp_cap]); + $cap_removed = true; + } + } + } + /* + if ($cap_removed) { + // save changes to database + $option_name = $wpdb->prefix.'user_roles'; + update_option($option_name, $this->roles); + } + */ + } else { + $this->roles = $wp_roles->roles; + } + + if (is_array($this->roles) && count($this->roles) > 0) { + asort($this->roles); + } + + return $this->roles; + } + // end of get_user_roles() + +/* + // restores User Roles from the backup record + protected function restore_user_roles() + { + global $wpdb, $wp_roles; + + $error_message = 'Error! ' . __('Database operation error. Check log file.', 'ure'); + $option_name = $wpdb->prefix . 'user_roles'; + $backup_option_name = $wpdb->prefix . 'backup_user_roles'; + $query = "select option_value + from $wpdb->options + where option_name='$backup_option_name' + limit 0, 1"; + $option_value = $wpdb->get_var($query); + if ($wpdb->last_error) { + $this->log_event($wpdb->last_error, true); + return $error_message; + } + if ($option_value) { + $query = "update $wpdb->options + set option_value='$option_value' + where option_name='$option_name' + limit 1"; + $record = $wpdb->query($query); + if ($wpdb->last_error) { + $this->log_event($wpdb->last_error, true); + return $error_message; + } + $wp_roles = new WP_Roles(); + $reload_link = wp_get_referer(); + $reload_link = remove_query_arg('action', $reload_link); + $reload_link = add_query_arg('action', 'roles_restore_note', $reload_link); +?> + + prefix . 'backup_user_roles'; + $query = "select option_id + from $wpdb->options + where option_name='$backup_option_name' + limit 0, 1"; + $option_id = $wpdb->get_var($query); + if ($wpdb->last_error) { + $this->log_event($wpdb->last_error, true); + return false; + } + if (!$option_id) { + $roles_option_name = $wpdb->prefix.'user_roles'; + $query = "select option_value + from $wpdb->options + where option_name like '$roles_option_name' limit 0,1"; + $serialized_roles = $wpdb->get_var($query); + // create user roles record backup + $query = "insert into $wpdb->options + (option_name, option_value, autoload) + values ('$backup_option_name', '$serialized_roles', 'no')"; + $record = $wpdb->query($query); + if ($wpdb->last_error) { + $this->log_event($wpdb->last_error, true); + return false; + } + } + + return true; + } + // end of ure_make_roles_backup() + + + protected function role_contains_caps_not_allowed_for_simple_admin($role_id) { + + $result = false; + $role = $this->roles[$role_id]; + if (!is_array($role['capabilities'])) { + return false; + } + foreach (array_keys($role['capabilities']) as $cap) { + if ($this->block_cap_for_single_admin($cap)) { + $result = true; + break; + } + } + + return $result; + } + // end of role_contains_caps_not_allowed_for_simple_admin() + + /** + * return array with roles which we could delete, e.g self-created and not used with any blog user + * + * @global wpdb $wpdb - WP database object + * @return array + */ + protected function get_roles_can_delete() + { + global $wpdb; + + $table_name = (!$this->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta; + $meta_key = $wpdb->prefix . 'capabilities'; + $default_role = get_option('default_role'); + $standard_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber'); + $roles_can_delete = array(); + foreach ($this->roles as $key => $role) { + $can_delete = true; + // check if it is default role for new users + if ($key == $default_role) { + $can_delete = false; + continue; + } + // check if it is standard role + if (in_array($key, $standard_roles)) { + continue; + } + // check if role has capabilities prohibited for the single site administrator + if ($this->role_contains_caps_not_allowed_for_simple_admin($key)) { + continue; + } + + // check if user with such role exists + $query = "SELECT DISTINCT meta_value + FROM $table_name + WHERE meta_key='$meta_key' AND meta_value like '%$key%'"; + $roles_used = $wpdb->get_results($query); + if ($roles_used && count($roles_used > 0)) { + foreach ($roles_used as $role_used) { + $role_name = unserialize($role_used->meta_value); + foreach ($role_name as $key1 => $value1) { + if ($key == $key1) { + $can_delete = false; + break; + } + } + if (!$can_delete) { + break; + } + } + } + if ($can_delete) { + $roles_can_delete[$key] = $role['name'] . ' (' . $key . ')'; + } + } + + return $roles_can_delete; + } + // end of get_roles_can_delete() + + + /** + * return array of built-in WP capabilities (WP 3.1 wp-admin/includes/schema.php) + * + * @return array + */ + public function get_built_in_wp_caps() { + $caps = array(); + $caps['switch_themes'] = 1; + $caps['edit_themes'] = 1; + $caps['activate_plugins'] = 1; + $caps['edit_plugins'] = 1; + $caps['edit_users'] = 1; + $caps['edit_files'] = 1; + $caps['manage_options'] = 1; + $caps['moderate_comments'] = 1; + $caps['manage_categories'] = 1; + $caps['manage_links'] = 1; + $caps['upload_files'] = 1; + $caps['import'] = 1; + $caps['unfiltered_html'] = 1; + $caps['edit_posts'] = 1; + $caps['edit_others_posts'] = 1; + $caps['edit_published_posts'] = 1; + $caps['publish_posts'] = 1; + $caps['edit_pages'] = 1; + $caps['read'] = 1; + $caps['level_10'] = 1; + $caps['level_9'] = 1; + $caps['level_8'] = 1; + $caps['level_7'] = 1; + $caps['level_6'] = 1; + $caps['level_5'] = 1; + $caps['level_4'] = 1; + $caps['level_3'] = 1; + $caps['level_2'] = 1; + $caps['level_1'] = 1; + $caps['level_0'] = 1; + $caps['edit_others_pages'] = 1; + $caps['edit_published_pages'] = 1; + $caps['publish_pages'] = 1; + $caps['delete_pages'] = 1; + $caps['delete_others_pages'] = 1; + $caps['delete_published_pages'] = 1; + $caps['delete_posts'] = 1; + $caps['delete_others_posts'] = 1; + $caps['delete_published_posts'] = 1; + $caps['delete_private_posts'] = 1; + $caps['edit_private_posts'] = 1; + $caps['read_private_posts'] = 1; + $caps['delete_private_pages'] = 1; + $caps['edit_private_pages'] = 1; + $caps['read_private_pages'] = 1; + $caps['unfiltered_upload'] = 1; + $caps['edit_dashboard'] = 1; + $caps['update_plugins'] = 1; + $caps['delete_plugins'] = 1; + $caps['install_plugins'] = 1; + $caps['update_themes'] = 1; + $caps['install_themes'] = 1; + $caps['update_core'] = 1; + $caps['list_users'] = 1; + $caps['remove_users'] = 1; + $caps['add_users'] = 1; + $caps['promote_users'] = 1; + $caps['edit_theme_options'] = 1; + $caps['delete_themes'] = 1; + $caps['export'] = 1; + $caps['delete_users'] = 1; + $caps['create_users'] = 1; + if ($this->multisite) { + $caps['manage_network'] = 1; + $caps['manage_network_users'] = 1; + $caps['manage_network_themes'] = 1; + $caps['manage_network_plugins'] = 1; + $caps['manage_network_options'] = 1; + } + + return $caps; + } + // end of get_built_in_wp_caps() + + + /** + * return the array of unused user capabilities + * + * @global WP_Roles $wp_roles + * @global wpdb $wpdb + * @return array + */ + protected function get_caps_to_remove() + { + global $wp_roles; + + // build full capabilities list from all roles except Administrator + $full_caps_list = array(); + foreach ($wp_roles->roles as $role) { + // validate if capabilities is an array + if (isset($role['capabilities']) && is_array($role['capabilities'])) { + foreach ($role['capabilities'] as $capability => $value) { + if (!isset($full_caps_list[$capability])) { + $full_caps_list[$capability] = 1; + } + } + } + } + + $caps_to_exclude = $this->get_built_in_wp_caps(); + + $caps_to_remove = array(); + foreach ($full_caps_list as $capability => $value) { + if (!isset($caps_to_exclude[$capability])) { // do not touch built-in WP caps + // check roles + $cap_in_use = false; + foreach ($wp_roles->role_objects as $wp_role) { + if ($wp_role->name != 'administrator') { + if ($wp_role->has_cap($capability)) { + $cap_in_use = true; + break; + } + } + } + if (!$cap_in_use) { + $caps_to_remove[$capability] = 1; + } + } + } + + return $caps_to_remove; + } + // end of get_caps_to_remove() + + + /** + * Build HTML for select drop-down list from capabilities we can remove + * + * @return string + */ + protected function get_caps_to_remove_html() { + + $caps_to_remove = $this->get_caps_to_remove(); + if (!empty($caps_to_remove) && is_array($caps_to_remove) && count($caps_to_remove) > 0) { + $html = ''; + } else { + $html = ''; + } + + return $html; + } + // end of getCapsToRemoveHTML() + + + /** + * returns array of deprecated capabilities + * + * @return array + */ + protected function get_deprecated_caps() + { + + $dep_caps = array( + 'level_0' => 0, + 'level_1' => 0, + 'level_2' => 0, + 'level_3' => 0, + 'level_4' => 0, + 'level_5' => 0, + 'level_6' => 0, + 'level_7' => 0, + 'level_8' => 0, + 'level_9' => 0, + 'level_10' => 0, + 'edit_files' => 0); + if ($this->multisite) { + $dep_caps['unfiltered_html'] = 0; + } + + return $dep_caps; + } + // end of get_deprecated_caps() + + + /** + * Return true if $capability is included to the list of capabilities allowed for the single site administrator + * @param string $capability - capability ID + * @param boolean $ignore_super_admin - if + * @return boolean + */ + protected function block_cap_for_single_admin($capability, $ignore_super_admin=false) { + + if (!class_exists('User_Role_Editor_Pro')) { // this functionality is for the Pro version only. + return false; + } + + if (!$this->multisite) { // work for multisite only + return false; + } + if (!$ignore_super_admin && is_super_admin()) { // Do not block superadmin + return false; + } + $caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0); + if (!$caps_access_restrict_for_simple_admin) { + return false; + } + $allowed_caps = $this->get_option('caps_allowed_for_single_admin', array()); + if (in_array($capability, $allowed_caps)) { + $block_this_cap = false; + } else { + $block_this_cap = true; + } + + return $block_this_cap; + } + // end of block_cap_for_single_admin() + + + /** + * output HTML-code for capabilities list + * @param boolean $core - if true, then show WordPress core capabilities, else custom (plugins and themes created) + * @param boolean $for_role - if true, it is role capabilities list, else - user specific capabilities list + */ + protected function show_capabilities($core = true, $for_role = true) { + + if ($this->multisite && !is_super_admin()) { + $help_links_enabled = $this->get_option('enable_help_links_for_simple_admin_ms', 1); + } else { + $help_links_enabled = true; + } + + $onclick_for_admin = ''; + if (!( $this->multisite && is_super_admin() )) { // do not limit SuperAdmin for multi-site + if ($core && 'administrator' == $this->current_role) { + $onclick_for_admin = 'onclick="turn_it_back(this)"'; + } + } + + if ($core) { + $quant = count($this->get_built_in_wp_caps()); + $deprecated_caps = $this->get_deprecated_caps(); + } else { + $quant = count($this->full_capabilities) - count($this->get_built_in_wp_caps()); + $deprecated_caps = array(); + } + $quant_in_column = (int) $quant / 3; + $printed_quant = 0; + foreach ($this->full_capabilities as $capability) { + if ($core) { + if (!$capability['wp_core']) { // show WP built-in capabilities 1st + continue; + } + } else { + if ($capability['wp_core']) { // show plugins and themes added capabilities + continue; + } + } + if (!$this->show_deprecated_caps && isset($deprecated_caps[$capability['inner']])) { + $hidden_class = 'class="hidden"'; + } else { + $hidden_class = ''; + } + if (isset($deprecated_caps[$capability['inner']])) { + $label_style = 'style="color:#BBBBBB;"'; + } else { + $label_style = ''; + } + if ($this->multisite && $this->block_cap_for_single_admin($capability['inner'], true)) { + if (is_super_admin()) { + if (!is_network_admin()) { + $label_style = 'style="color: red;"'; + } + } else { + $hidden_class = 'class="hidden"'; + } + } + $checked = ''; + $disabled = ''; + if ($for_role) { + if (isset($this->roles[$this->current_role]['capabilities'][$capability['inner']]) && + !empty($this->roles[$this->current_role]['capabilities'][$capability['inner']])) { + $checked = 'checked="checked"'; + } + } else { + if ($this->user_can($capability['inner'])) { + $checked = 'checked="checked"'; + if (!isset($this->user_to_edit->caps[$capability['inner']])) { + $disabled = 'disabled="disabled"'; + } + } + } + $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']); + echo '
'; + if (empty($hidden_class)) { + if ($this->caps_readable) { + $cap_ind = 'human'; + $cap_ind_alt = 'inner'; + } else { + $cap_ind = 'inner'; + $cap_ind_alt = 'human'; + } + $help_link = $help_links_enabled ? $this->capability_help_link($capability['inner']) : ''; + echo ' ' . $help_link . '
'; + $printed_quant++; + if ($printed_quant >= $quant_in_column) { + $printed_quant = 0; + echo ' + '; + } + } else { // if (empty($hidden_class + echo '
'; + } // if (empty($hidden_class + } + } + // end of show_capabilities() + + + /** + * output HTML code to create URE toolbar + * + * @param string $this->current_role + * @param boolean $role_delete + * @param boolean $capability_remove + */ + protected function toolbar($role_delete = false, $capability_remove = false) { + $caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0); + if ($caps_access_restrict_for_simple_admin) { + $add_del_role_for_simple_admin = $this->get_option('add_del_role_for_simple_admin', 1); + } else { + $add_del_role_for_simple_admin = 1; + } + $super_admin = is_super_admin(); + +?> +
+ +current_role) { +?> + + +ure_object == 'role') { +?> +
+
+ + +
+multisite || $super_admin || $add_del_role_for_simple_admin) { // restrict single site admin +?> +
+ +multisite || $super_admin || !$caps_access_restrict_for_simple_admin) { // restrict single site admin +?> + +multisite || $super_admin || $add_del_role_for_simple_admin) { // restrict single site admin + if (!empty($role_delete)) { +?> + +multisite || $super_admin || !$caps_access_restrict_for_simple_admin) { // restrict single site admin + if ($capability_remove) { +?> + + +
+ +
+
+multisite || + (is_main_site( get_current_blog_id()) || (is_network_admin() && is_super_admin())) + ) { +?> + + +
+ + +
+
+ + + +
+ + +
+ ' . esc_html__('Help', 'ure') . ''; + } else { + $link = ''; + } + + return $link; + } + // end of capability_help_link() + + + /** + * Go through all users and if user has non-existing role lower him to Subscriber role + * + */ + protected function validate_user_roles() { + + global $wp_roles; + + $default_role = get_option('default_role'); + if (empty($default_role)) { + $default_role = 'subscriber'; + } + $users_query = new WP_User_Query(array('fields' => 'ID')); + $users = $users_query->get_results(); + foreach ($users as $user_id) { + $user = get_user_by('id', $user_id); + if (is_array($user->roles) && count($user->roles) > 0) { + foreach ($user->roles as $role) { + $user_role = $role; + break; + } + } else { + $user_role = is_array($user->roles) ? '' : $user->roles; + } + if (!empty($user_role) && !isset($wp_roles->roles[$user_role])) { // role doesn't exists + $user->set_role($default_role); // set the lowest level role for this user + $user_role = ''; + } + + if (empty($user_role)) { + // Cleanup users level capabilities from non-existed roles + $cap_removed = true; + while (count($user->caps) > 0 && $cap_removed) { + foreach ($user->caps as $capability => $value) { + if (!isset($this->full_capabilities[$capability])) { + $user->remove_cap($capability); + $cap_removed = true; + break; + } + $cap_removed = false; + } + } // while () + } + } // foreach() + } + // end of validate_user_roles() + + + protected function add_capability_to_full_caps_list($cap_id) { + if (!isset($this->full_capabilities[$cap_id])) { + $cap = array(); + $cap['inner'] = $cap_id; + $cap['human'] = esc_html__($this->convert_caps_to_readable($cap_id), 'ure'); + if (isset($this->built_in_wp_caps[$cap_id])) { + $cap['wp_core'] = true; + } else { + $cap['wp_core'] = false; + } + + $this->full_capabilities[$cap_id] = $cap; + } + } + // end of add_capability_to_full_caps_list() + + + protected function init_full_capabilities() { + $this->built_in_wp_caps = $this->get_built_in_wp_caps(); + $this->full_capabilities = array(); + foreach ($this->roles as $role) { + // validate if capabilities is an array + if (isset($role['capabilities']) && is_array($role['capabilities'])) { + foreach ($role['capabilities'] as $key => $value) { + $this->add_capability_to_full_caps_list($key); + } + } + } + // Get Gravity Forms plugin capabilities, if available + if ($this->integrate_with_gravity_forms) { + $gf_caps = GFCommon::all_caps(); + foreach ($gf_caps as $gf_cap) { + $this->add_capability_to_full_caps_list($gf_cap); + } + } + // provide compatibility with plugins and themes which use 'members_get_capabilities' filter from Members plugin to define their capabilities + $custom_caps = array(); + $custom_caps = apply_filters( 'members_get_capabilities', $custom_caps ); + foreach ($custom_caps as $cap) { + $this->add_capability_to_full_caps_list($cap); + } + + if ($this->ure_object=='user') { + foreach($this->user_to_edit->caps as $key=>$value) { + if (!isset($this->roles[$key])) { // it is the user capability, not role + $this->add_capability_to_full_caps_list($key); + } + } + } + + foreach ($this->built_in_wp_caps as $cap=>$val) { + if (!isset($this->full_capabilities[$cap])) { + $this->add_capability_to_full_caps_list($cap); + } + } + + unset($this->built_in_wp_caps); + asort($this->full_capabilities); + } + // end of init_full_capabilities() + + + /** + * return WordPress user roles to its initial state, just like after installation + * @global WP_Roles $wp_roles + */ + protected function wp_roles_reinit() { + global $wp_roles; + + $wp_roles->roles = array(); + $wp_roles->role_objects = array(); + $wp_roles->role_names = array(); + $wp_roles->use_db = true; + + require_once(ABSPATH . '/wp-admin/includes/schema.php'); + populate_roles(); + $wp_roles->reinit(); + + $this->roles = $this->get_user_roles(); + + } + // end of wp_roles_reinit() + + /** + * reset user roles to WordPress default roles + */ + protected function reset_user_roles() { + + $this->wp_roles_reinit(); + if ($this->is_full_network_synch() || $this->apply_to_all) { + $this->current_role = ''; + $this->direct_network_roles_update(); + } + //$this->validate_user_roles(); // if user has non-existing role lower him to Subscriber role + + $reload_link = wp_get_referer(); + $reload_link = remove_query_arg('action', $reload_link); + ?> + + roles) || !is_array($this->roles) || count($this->roles)==0) { // Nothing to save - something goes wrong - stop ... + return false; + } + + return true; + } + // end of last_check_before_update() + + + // Save Roles to database + protected function save_roles() { + global $wpdb; + + if (!$this->last_check_before_update()) { + return false; + } + if (!isset($this->roles[$this->current_role])) { + return false; + } + + $this->capabilities_to_save = $this->remove_caps_not_allowed_for_single_admin($this->capabilities_to_save); + $this->roles[$this->current_role]['capabilities'] = $this->capabilities_to_save; + $option_name = $wpdb->prefix . 'user_roles'; + + update_option($option_name, $this->roles); + + return true; + } + // end of save_roles() + + + /** + * Update roles for all network using direct database access - quicker in several times + * + * @global wpdb $wpdb + * @return boolean + */ + function direct_network_roles_update() { + global $wpdb; + + if (!$this->last_check_before_update()) { + return false; + } + if (!empty($this->current_role)) { + if (!isset($this->roles[$this->current_role])) { + $this->roles[$this->current_role]['name'] = $this->current_role_name; + } + $this->roles[$this->current_role]['capabilities'] = $this->capabilities_to_save; + } + + $serialized_roles = serialize($this->roles); + foreach ($this->blog_ids as $blog_id) { + $prefix = $wpdb->get_blog_prefix($blog_id); + $options_table_name = $prefix . 'options'; + $option_name = $prefix . 'user_roles'; + $query = "update $options_table_name + set option_value='$serialized_roles' + where option_name='$option_name' + limit 1"; + $wpdb->query($query); + if ($wpdb->last_error) { + $this->log_event($wpdb->last_error, true); + return false; + } + } + + return true; + } + // end of direct_network_roles_update() + + + protected function wp_api_network_roles_update() { + global $wpdb; + + $result = true; + $old_blog = $wpdb->blogid; + foreach ($this->blog_ids as $blog_id) { + switch_to_blog($blog_id); + $this->roles = $this->get_user_roles(); + if (!isset($this->roles[$this->current_role])) { // add new role to this blog + $this->roles[$this->current_role] = array('name' => $this->current_role_name, 'capabilities' => array('read' => 1)); + } + if (!$this->save_roles()) { + $result = false; + break; + } + } + switch_to_blog($old_blog); + // cleanup blog switching data + $GLOBALS['_wp_switched_stack'] = array(); + $GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] ); + $this->roles = $this->get_user_roles(); + + return $result; + } + // end of wp_api_network_roles_update() + + + /** + * Update role for all network using WordPress API + * + * @return boolean + */ + protected function multisite_update_roles() { + + if (defined('URE_DEBUG') && URE_DEBUG) { + $time_shot = microtime(); + } + + if ($this->is_full_network_synch()) { + $result = $this->direct_network_roles_update(); + } else { + $result = $this->wp_api_network_roles_update(); + } + + if (defined('URE_DEBUG') && URE_DEBUG) { + echo '
Roles updated for ' . ( microtime() - $time_shot ) . ' milliseconds
'; + } + + return $result; + } + // end of multisite_update_roles() + + + /** + * Process user request on update roles + * + * @global wpdb $wpdb + * @return boolean + */ + protected function update_roles() { + global $wpdb; + + if ($this->multisite && is_super_admin() && $this->apply_to_all) { // update Role for the all blogs/sites in the network (permitted to superadmin only) + if (!$this->multisite_update_roles()) { + return false; + } + } else { + if (!$this->save_roles()) { + return false; + } + } + + return true; + } + // end of update_roles() + + + /** + * Write message to the log file + * + * @global type $wp_version + * @param string $message + * @param boolean $show_message + */ + protected function log_event($message, $show_message = false) { + global $wp_version; + + $file_name = URE_PLUGIN_DIR . 'user-role-editor.log'; + $fh = fopen($file_name, 'a'); + $cr = "\n"; + $s = $cr . date("d-m-Y H:i:s") . $cr . + 'WordPress version: ' . $wp_version . ', PHP version: ' . phpversion() . ', MySQL version: ' . mysql_get_server_info() . $cr; + fwrite($fh, $s); + fwrite($fh, $message . $cr); + fclose($fh); + + if ($show_message) { + $this->show_message('Error! ' . esc_html__('Error is occur. Please check the log file.', 'ure')); + } + } + // end of log_event() + + + /** + * returns array without capabilities blocked for single site administrators + * @param array $capabilities + * @return array + */ + protected function remove_caps_not_allowed_for_single_admin($capabilities) { + + foreach(array_keys($capabilities) as $cap) { + if ($this->block_cap_for_single_admin($cap)) { + unset($capabilities[$cap]); + } + } + + return $capabilities; + } + // end of remove_caps_not_allowed_for_single_admin() + + + /** + * process new role create request + * + * @global WP_Roles $wp_roles + * + * @return string - message about operation result + * + */ + protected function add_new_role() { + + global $wp_roles; + + $mess = ''; + $this->current_role = ''; + if (isset($_POST['user_role_id']) && $_POST['user_role_id']) { + $user_role_id = utf8_decode($_POST['user_role_id']); + // sanitize user input for security + $valid_name = preg_match('/[A-Za-z0-9_\-]*/', $user_role_id, $match); + if (!$valid_name || ($valid_name && ($match[0] != $user_role_id))) { // some non-alphanumeric charactes found! + return esc_html__('Error: Role ID must contain latin characters, digits, hyphens or underscore only!', 'ure'); + } + $numeric_name = preg_match('/[0-9]*/', $user_role_id, $match); + if ($numeric_name && ($match[0] == $user_role_id)) { // numeric name discovered + return esc_html__('Error: WordPress does not support numeric Role name (ID). Add latin characters to it.', 'ure'); + } + + if ($user_role_id) { + $user_role_name = isset($_POST['user_role_name']) ? $_POST['user_role_name'] : false; + if (!empty($user_role_name)) { + $user_role_name = sanitize_text_field($user_role_name); + } else { + $user_role_name = $user_role_id; // as user role name is empty, use user role ID instead + } + + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + if (isset($wp_roles->roles[$user_role_id])) { + return sprintf('Error! ' . esc_html__('Role %s exists already', 'ure'), $user_role_id); + } + $user_role_id = strtolower($user_role_id); + $this->current_role = $user_role_id; + + $user_role_copy_from = isset($_POST['user_role_copy_from']) ? $_POST['user_role_copy_from'] : false; + if (!empty($user_role_copy_from) && $user_role_copy_from != 'none' && $wp_roles->is_role($user_role_copy_from)) { + $role = $wp_roles->get_role($user_role_copy_from); + $capabilities = $this->remove_caps_not_allowed_for_single_admin($role->capabilities); + } else { + $capabilities = array('read' => 1, 'level_0' => 1); + } + // add new role to the roles array + $result = add_role($user_role_id, $user_role_name, $capabilities); + if (!isset($result) || empty($result)) { + $mess = 'Error! ' . esc_html__('Error is encountered during new role create operation', 'ure'); + } else { + $mess = sprintf(esc_html__('Role %s is created successfully', 'ure'), $user_role_name); + } + } + } + return $mess; + } + // end of new_role_create() + + + /** + * Deletes user role from the WP database + */ + protected function delete_wp_roles($roles_to_del) { + global $wp_roles; + + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + $result = false; + foreach($roles_to_del as $role_id) { + if (!isset($wp_roles->roles[$role_id])) { + $result = false; + break; + } + if ($this->role_contains_caps_not_allowed_for_simple_admin($role_id)) { // do not delete + continue; + } + unset($wp_roles->role_objects[$role_id]); + unset($wp_roles->role_names[$role_id]); + unset($wp_roles->roles[$role_id]); + $result = true; + } // foreach() + if ($result) { + update_option($wp_roles->role_key, $wp_roles->roles); + } + + return $result; + } + // end of delete_wp_roles() + + + protected function delete_all_unused_roles() { + + $this->roles = $this->get_user_roles(); + $roles_to_del = array_keys($this->get_roles_can_delete()); + $result = $this->delete_wp_roles($roles_to_del); + $this->roles = null; // to force roles refresh + + return $result; + } + // end of delete_all_unused_roles() + + + /** + * process user request for user role deletion + * @global WP_Roles $wp_roles + * @return type + */ + protected function delete_role() { + + $mess = ''; + if (isset($_POST['user_role_id']) && $_POST['user_role_id']) { + $role = $_POST['user_role_id']; + if ($role==-1) { // delete all unused roles + $result = $this->delete_all_unused_roles(); + } else { + $result = $this->delete_wp_roles(array($role)); + } + if (empty($result)) { + $mess = 'Error! ' . esc_html__('Error encountered during role delete operation', 'ure'); + } elseif ($role==-1) { + $mess = sprintf(esc_html__('Unused roles are deleted successfully', 'ure'), $role); + } else { + $mess = sprintf(esc_html__('Role %s is deleted successfully', 'ure'), $role); + } + unset($_POST['user_role']); + } + + return $mess; + } + // end of ure_delete_role() + + + /** + * Change default WordPress role + * @global WP_Roles $wp_roles + * @return string + */ + protected function change_default_role() { + global $wp_roles; + + $mess = ''; + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + if (!empty($_POST['user_role_id'])) { + $user_role_id = $_POST['user_role_id']; + unset($_POST['user_role_id']); + $errorMessage = 'Error! ' . esc_html__('Error encountered during default role change operation', 'ure'); + if (isset($wp_roles->role_objects[$user_role_id]) && $user_role_id !== 'administrator') { + $result = update_option('default_role', $user_role_id); + if (empty($result)) { + $mess = $errorMessage; + } else { + $mess = sprintf(esc_html__('Default role for new users is set to %s successfully', 'ure'), $wp_roles->role_names[$user_role_id]); + } + } else { + $mess = $errorMessage; + } + } + + return $mess; + } + // end of change_default_role() + + + /** + * Not really used in the plugin - just storage for the translation strings + */ + protected function translation_data() { +// for the translation purpose + if (false) { +// Standard WordPress roles + __('Editor', 'ure'); + __('Author', 'ure'); + __('Contributor', 'ure'); + __('Subscriber', 'ure'); +// Standard WordPress capabilities + __('Switch themes', 'ure'); + __('Edit themes', 'ure'); + __('Activate plugins', 'ure'); + __('Edit plugins', 'ure'); + __('Edit users', 'ure'); + __('Edit files', 'ure'); + __('Manage options', 'ure'); + __('Moderate comments', 'ure'); + __('Manage categories', 'ure'); + __('Manage links', 'ure'); + __('Upload files', 'ure'); + __('Import', 'ure'); + __('Unfiltered html', 'ure'); + __('Edit posts', 'ure'); + __('Edit others posts', 'ure'); + __('Edit published posts', 'ure'); + __('Publish posts', 'ure'); + __('Edit pages', 'ure'); + __('Read', 'ure'); + __('Level 10', 'ure'); + __('Level 9', 'ure'); + __('Level 8', 'ure'); + __('Level 7', 'ure'); + __('Level 6', 'ure'); + __('Level 5', 'ure'); + __('Level 4', 'ure'); + __('Level 3', 'ure'); + __('Level 2', 'ure'); + __('Level 1', 'ure'); + __('Level 0', 'ure'); + __('Edit others pages', 'ure'); + __('Edit published pages', 'ure'); + __('Publish pages', 'ure'); + __('Delete pages', 'ure'); + __('Delete others pages', 'ure'); + __('Delete published pages', 'ure'); + __('Delete posts', 'ure'); + __('Delete others posts', 'ure'); + __('Delete published posts', 'ure'); + __('Delete private posts', 'ure'); + __('Edit private posts', 'ure'); + __('Read private posts', 'ure'); + __('Delete private pages', 'ure'); + __('Edit private pages', 'ure'); + __('Read private pages', 'ure'); + __('Delete users', 'ure'); + __('Create users', 'ure'); + __('Unfiltered upload', 'ure'); + __('Edit dashboard', 'ure'); + __('Update plugins', 'ure'); + __('Delete plugins', 'ure'); + __('Install plugins', 'ure'); + __('Update themes', 'ure'); + __('Install themes', 'ure'); + __('Update core', 'ure'); + __('List users', 'ure'); + __('Remove users', 'ure'); + __('Add users', 'ure'); + __('Promote users', 'ure'); + __('Edit theme options', 'ure'); + __('Delete themes', 'ure'); + __('Export', 'ure'); + } + } + // end of ure_TranslationData() + + + /** + * placeholder - realized at the Pro version + */ + protected function check_blog_user($user) { + + return true; + } + // end of check_blog_user() + + /** + * placeholder - realized at the Pro version + */ + protected function network_update_user($user) { + + return true; + } + // end of network_update_user() + + + /** + * Update user roles and capabilities + * + * @global WP_Roles $wp_roles + * @param WP_User $user + * @return boolean + */ + protected function update_user($user) { + global $wp_roles; + + if ($this->multisite) { + if (!$this->check_blog_user($user)) { + return false; + } + } + + $primary_role = $_POST['primary_role']; + if (empty($primary_role) || !isset($wp_roles->roles[$primary_role])) { + $primary_role = ''; + } + if (function_exists('bbp_filter_blog_editable_roles')) { // bbPress plugin is active + $bbp_user_role = bbp_get_user_role($user->ID); + } else { + $bbp_user_role = ''; + } + + // revoke all roles and capabilities from this user + $user->roles = array(); + $user->remove_all_caps(); + + // restore primary role + if (!empty($primary_role)) { + $user->add_role($primary_role); + } + + // restore bbPress user role if she had one + if (!empty($bbp_user_role)) { + $user->add_role($bbp_user_role); + } + + // add other roles to user + foreach ($_POST as $key => $value) { + $result = preg_match('/^wp_role_(.+)/', $key, $match); + if ($result === 1) { + $role = $match[1]; + if (isset($wp_roles->roles[$role])) { + $user->add_role($role); + } + } + } + + // add individual capabilities to user + if (count($this->capabilities_to_save) > 0) { + foreach ($this->capabilities_to_save as $key => $value) { + $user->add_cap($key); + } + } + $user->update_user_level_from_caps(); + + if ($this->apply_to_all) { // apply update to the all network + if (!$this->network_update_user($user)) { + return false; + } + } + + return true; + } + // end of update_user() + + + /** + * Add new capability + * + * @global WP_Roles $wp_roles + * @return string + */ + protected function add_new_capability() { + global $wp_roles; + + $mess = ''; + if (isset($_POST['capability_id']) && $_POST['capability_id']) { + $user_capability = $_POST['capability_id']; + // sanitize user input for security + $valid_name = preg_match('/[A-Za-z0-9_\-]*/', $user_capability, $match); + if (!$valid_name || ($valid_name && ($match[0] != $user_capability))) { // some non-alphanumeric charactes found! + return 'Error! ' . esc_html__('Error: Capability name must contain latin characters and digits only!', 'ure'); + ; + } + + if ($user_capability) { + $user_capability = strtolower($user_capability); + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + $wp_roles->use_db = true; + $administrator = $wp_roles->get_role('administrator'); + if (!$administrator->has_cap($user_capability)) { + $wp_roles->add_cap('administrator', $user_capability); + $mess = sprintf(esc_html__('Capability %s is added successfully', 'ure'), $user_capability); + } else { + $mess = sprintf('Error! ' . esc_html__('Capability %s exists already', 'ure'), $user_capability); + } + } + } + + return $mess; + } + // end of add_new_capability() + + + /** + * Delete capability + * + * @global wpdb $wpdb + * @global WP_Roles $wp_roles + * @return string - information message + */ + protected function delete_capability() { + global $wpdb, $wp_roles; + + $mess = ''; + if (!empty($_POST['user_capability_id'])) { + $capability_id = $_POST['user_capability_id']; + $caps_to_remove = $this->get_caps_to_remove(); + if (!is_array($caps_to_remove) || count($caps_to_remove) == 0 || !isset($caps_to_remove[$capability_id])) { + return sprintf(esc_html__('Error! You do not have permission to delete this capability: %s!', 'ure'), $capability_id); + } + + // process users + $usersId = $wpdb->get_col("SELECT $wpdb->users.ID FROM $wpdb->users"); + foreach ($usersId as $user_id) { + $user = get_user_to_edit($user_id); + if ($user->has_cap($capability_id)) { + $user->remove_cap($capability_id); + } + } + + // process roles + foreach ($wp_roles->role_objects as $wp_role) { + if ($wp_role->has_cap($capability_id)) { + $wp_role->remove_cap($capability_id); + } + } + + $mess = sprintf(esc_html__('Capability %s is removed successfully', 'ure'), $capability_id); + } + + return $mess; + } + // end of remove_capability() + + + /** + * Returns list of user roles, except 1st one, and bbPress assigned as they are shown by WordPress and bbPress theirselves. + * + * @param type $user WP_User from wp-includes/capabilities.php + * @return array + */ + public function other_user_roles($user) { + + global $wp_roles; + + if (!is_array($user->roles) || count($user->roles) <= 1) { + return ''; + } + + // get bbPress assigned user role + if (function_exists('bbp_filter_blog_editable_roles')) { + $bb_press_role = bbp_get_user_role($user->ID); + } else { + $bb_press_role = ''; + } + + $roles = array(); + foreach ($user->roles as $key => $value) { + if (!empty($bb_press_role) && $bb_press_role === $value) { + // exclude bbPress assigned role + continue; + } + $roles[] = $value; + } + array_shift($roles); // exclude primary role which is shown by WordPress itself + + return $roles; + } + // end of ure_other_user_roles() + + + /** + * Returns text presentation of user roles + * + * @param type $roles user roles list + * @return string + */ + public function roles_text($roles) { + global $wp_roles; + + if (is_array($roles) && count($roles) > 0) { + $role_names = array(); + foreach ($roles as $role) { + $role_names[] = $wp_roles->roles[$role]['name']; + } + $output = implode(', ', $role_names); + } else { + $output = ''; + } + + return $output; + } + // end of roles_text() + + + /** + * display opening part of the HTML box with title and CSS style + * + * @param string $title + * @param string $style + */ + protected function display_box_start($title, $style = '') { + ?> +
+

+
+ +
+
+ +

User Role Editor

+ +

+
+
+
+
+
+
+
+
+ + + + +
+
+current_role) || !$this->current_role) { + if (isset($_REQUEST['user_role']) && $_REQUEST['user_role'] && isset($this->roles[$_REQUEST['user_role']])) { + $this->current_role = $_REQUEST['user_role']; + } else { + $this->current_role = $this->get_last_role_id(); + } + $this->current_role_name = $this->roles[$this->current_role]['name']; + } + } + // end of set_current_role() + + + protected function show_admin_role_allowed() { + $show_admin_role = $this->get_option('show_admin_role', 0); + $show_admin_role = ((defined('URE_SHOW_ADMIN_ROLE') && URE_SHOW_ADMIN_ROLE==1) || $show_admin_role==1) && $this->user_is_admin(); + + return $show_admin_role; + } + // end of show_admin_role() + + + public function role_edit_prepare_html($select_width=200) { + $caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0); + $show_admin_role = $this->show_admin_role_allowed(); + if ($select_width>0) { + $select_style = 'style="width: '. $select_width .'px"'; + } else { + $select_style = ''; + } + $this->role_default_html = ' + '; + $this->role_select_html = ''; + $this->role_default_html .= ''; + $this->role_to_copy_html .= ''; + + $roles_can_delete = $this->get_roles_can_delete(); + if ($roles_can_delete && count($roles_can_delete) > 0) { + $this->role_delete_html = ''; + } else { + $this->role_delete_html = ''; + } + + $this->capability_remove_html = $this->get_caps_to_remove_html(); + } + // end of role_edit_prepare_html() + + + public function user_primary_role_dropdown_list($user_roles) { +?> + +user_to_edit->caps[$capability])) { + return true; + } + foreach ($this->user_to_edit->roles as $role) { + if ($role===$capability) { + return true; + } + if (!empty($this->roles[$role]['capabilities'][$capability])) { + return true; + } + } + + return false; + } + // end of user_can() + + + // returns true if current user has $capability assigned through the roles or directly + // returns true if current user has role with name equal $cap + public function user_has_capability($user, $cap) { + + global $wp_roles; + + if (!is_object($user) || empty($user->ID)) { + return false; + } + if (is_multisite() && is_super_admin($user->ID)) { + return true; + } + + if (isset($user->caps[$cap])) { + return true; + } + foreach ($user->roles as $role) { + if ($role === $cap) { + return true; + } + if (!empty($wp_roles->roles[$role]['capabilities'][$cap])) { + return true; + } + } + + return false; + } + // end of user_has_capability() + + + public function show_other_default_roles() { + $other_default_roles = $this->get_option('other_default_roles', array()); + foreach ($this->roles as $role_id => $role) { + if ( $role_id=='administrator' || $role_id==$this->wp_default_role ) { + continue; + } + if ( in_array($role_id, $other_default_roles) ) { + $checked = 'checked="checked"'; + } else { + $checked = ''; + } + echo '
'; + } + + } + // end of show_other_default_roles() + + + public function create_no_rights_role() { + global $wp_roles; + + $role_id = 'no_rights'; + $role_name = 'No rights'; + + if (!isset($wp_roles)) { + $wp_roles = new WP_Roles(); + } + if (isset($wp_roles->roles[$role_name])) { + return; + } + add_role($role_id, $role_name, array()); + + } + // end of create_no_rights_role() + + + public function get_users_without_role() { + + global $wpdb; + + $id = get_current_blog_id(); + $blog_prefix = $wpdb->get_blog_prefix($id); + $query = "select ID from {$wpdb->users} users + where not exists (select user_id from {$wpdb->usermeta} + where user_id=users.ID and meta_key='{$blog_prefix}capabilities') or + exists (select user_id from wp_usermeta + where user_id=users.ID and meta_key='{$blog_prefix}capabilities' and meta_value='a:0:{}') ;"; + $users = $wpdb->get_col($query); + + return $users; + + } + // end of get_users_without_role() + + + public function get_current_role() { + + return $this->current_role; + + } + // end of get_current_role() + +} +// end of URE_Lib class \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/includes/class-ure-screen-help.php b/wp-content/plugins/user-role-editor/includes/class-ure-screen-help.php new file mode 100644 index 0000000..5adb760 --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-ure-screen-help.php @@ -0,0 +1,56 @@ +User Role Editor Options page help +

+

+

'; + + 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 diff --git a/wp-content/plugins/user-role-editor/includes/class-user-role-editor.php b/wp-content/plugins/user-role-editor/includes/class-user-role-editor.php new file mode 100644 index 0000000..c58069f --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/class-user-role-editor.php @@ -0,0 +1,1001 @@ +lib = $library; + + // Who may use this plugin + $this->key_capability = $this->lib->get_key_capability(); + + if ($this->lib->multisite) { + // new blog may be registered not at admin back-end only but automatically after new user registration, e.g. + // Gravity Forms User Registration Addon does + add_action( 'wpmu_new_blog', array($this, 'duplicate_roles_for_new_blog'), 10, 2); + } + + if (!is_admin()) { + return; + } + + add_action('admin_init', array($this, 'plugin_init'), 1); + + // Add the translation function after the plugins loaded hook. + add_action('plugins_loaded', array($this, 'load_translation')); + + // add own submenu + add_action('admin_menu', array($this, 'plugin_menu')); + + if ($this->lib->multisite) { + // add own submenu + add_action('network_admin_menu', array($this, 'network_plugin_menu')); + } + + + // add a Settings link in the installed plugins page + add_filter('plugin_action_links', array($this, 'plugin_action_links'), 10, 2); + + add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2); + + } + // end of __construct() + + + /** + * Plugin initialization + * + */ + public function plugin_init() { + + global $current_user; + + if (!empty($current_user->ID)) { + $user_id = $current_user->ID; + } else { + $user_id = 0; + } + + // these filters and actions should prevent editing users with administrator role + // by other users with 'edit_users' capability + if (!$this->lib->user_is_admin($user_id)) { + // Exclude administrator role from edit list. + add_filter('editable_roles', array($this, 'exclude_admin_role' ) ); + // prohibit any actions with user who has Administrator role + add_filter('user_has_cap', array($this, 'not_edit_admin' ), 10, 3); + // exclude users with 'Administrator' role from users list + add_action('pre_user_query', array($this, 'exclude_administrators' ) ); + // do not show 'Administrator (s)' view above users list + add_filter('views_users', array($this, 'exclude_admins_view' ) ); + } + + add_action( 'admin_enqueue_scripts', array($this, 'admin_load_js' ) ); + add_action( 'user_row_actions', array($this, 'user_row'), 10, 2 ); + add_action( 'edit_user_profile', array($this, 'edit_user_profile'), 10, 2 ); + add_filter( 'manage_users_columns', array($this, 'user_role_column'), 10, 1 ); + add_filter( 'manage_users_custom_column', array($this, 'user_role_row'), 10, 3 ); + add_action( 'profile_update', array($this, 'user_profile_update'), 10 ); + add_filter( 'all_plugins', array($this, 'exclude_from_plugins_list' ) ); + + if ($this->lib->multisite) { + add_action( 'wpmu_activate_user', array($this, 'add_other_default_roles'), 10, 1 ); + + $allow_edit_users_to_not_super_admin = $this->lib->get_option('allow_edit_users_to_not_super_admin', 0); + if ($allow_edit_users_to_not_super_admin) { + add_filter( 'map_meta_cap', array($this, 'restore_users_edit_caps'), 1, 4 ); + remove_all_filters( 'enable_edit_any_user_configuration' ); + add_filter( 'enable_edit_any_user_configuration', '__return_true'); + add_filter( 'admin_head', array($this, 'edit_user_permission_check'), 1, 4 ); + } + } else { + add_action( 'user_register', array($this, 'add_other_default_roles'), 10, 1 ); + $count_users_without_role = $this->lib->get_option('count_users_without_role', 0); + if ($count_users_without_role) { + add_action( 'restrict_manage_users', array($this, 'move_users_from_no_role_button') ); + add_action( 'admin_init', array($this, 'add_css_to_users_page')); + add_action( 'admin_footer', array($this, 'add_js_to_users_page') ); + } + } + + add_action('wp_ajax_ure_ajax', array($this, 'ure_ajax')); + + } + // end of plugin_init() + + + public function move_users_from_no_role_button() { + + global $wpdb; + + if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) { + return; + } + + $id = get_current_blog_id(); + $blog_prefix = $wpdb->get_blog_prefix($id); + $query = "select count(ID) from {$wpdb->users} users + where not exists (select user_id from {$wpdb->usermeta} + where user_id=users.ID and meta_key='{$blog_prefix}capabilities') or + exists (select user_id from wp_usermeta + where user_id=users.ID and meta_key='{$blog_prefix}capabilities' and meta_value='a:0:{}') ;"; + $users_count = $wpdb->get_var($query); + if ($users_count>0) { +?> +    +
+
+ To:
+
+
+ wp_create_nonce('user-role-editor'), + 'move_from_no_role_title' => esc_html__('Change role for users without role', 'ure'), + 'no_rights_caption' => esc_html__('No rights', 'ure'), + 'provide_new_role_caption' => esc_html__('Provide new role', 'ure') + )); + + } + // end of add_js_to_users_page() + + + public function add_other_default_roles($user_id) { + + if (empty($user_id)) { + return; + } + $user = get_user_by('id', $user_id); + if (empty($user->ID)) { + return; + } + $other_default_roles = $this->lib->get_option('other_default_roles', array()); + if (count($other_default_roles)==0) { + return; + } + foreach($other_default_roles as $role) { + $user->add_role($role); + } + + } + // end of add_other_default_roles() + + + /** + * restore edit_users, delete_users, create_users capabilities for non-superadmin users under multisite + * (code is provided by http://wordpress.org/support/profile/sjobidoo) + * + * @param type $caps + * @param type $cap + * @param type $user_id + * @param type $args + * @return type + */ + public function restore_users_edit_caps($caps, $cap, $user_id, $args) { + + foreach ($caps as $key => $capability) { + + if ($capability != 'do_not_allow') + continue; + + switch ($cap) { + case 'edit_user': + case 'edit_users': + $caps[$key] = 'edit_users'; + break; + case 'delete_user': + case 'delete_users': + $caps[$key] = 'delete_users'; + break; + case 'create_users': + $caps[$key] = $cap; + break; + } + } + + return $caps; + } + // end of restore_user_edit_caps() + + + /** + * Checks that both the editing user and the user being edited are + * members of the blog and prevents the super admin being edited. + * (code is provided by http://wordpress.org/support/profile/sjobidoo) + * + */ + function edit_user_permission_check() { + global $current_user, $profileuser; + + if (is_super_admin()) { // Superadmin may do all + return; + } + + $screen = get_current_screen(); + + get_currentuserinfo(); + + if ($screen->base == 'user-edit' || $screen->base == 'user-edit-network') { // editing a user profile + if (!is_super_admin($current_user->ID) && is_super_admin($profileuser->ID)) { // trying to edit a superadmin while himself is less than a superadmin + wp_die(esc_html__('You do not have permission to edit this user.')); + } elseif (!( is_user_member_of_blog($profileuser->ID, get_current_blog_id()) && is_user_member_of_blog($current_user->ID, get_current_blog_id()) )) { // editing user and edited user aren't members of the same blog + wp_die(esc_html__('You do not have permission to edit this user.')); + } + } + } + // end of edit_user_permission_check() + + + /** + * exclude administrator role from the roles list + * + * @param string $roles + * @return array + */ + public function exclude_admin_role($roles) + { + + if (isset($roles['administrator'])) { + unset($roles['administrator']); + } + + return $roles; + } + // end of exclude_admin_role() + + + /** + * We have two vulnerable queries with user id at admin interface, which should be processed + * 1st: http://blogdomain.com/wp-admin/user-edit.php?user_id=ID&wp_http_referer=%2Fwp-admin%2Fusers.php + * 2nd: http://blogdomain.com/wp-admin/users.php?action=delete&user=ID&_wpnonce=ab34225a78 + * If put Administrator user ID into such request, user with lower capabilities (if he has 'edit_users') + * can edit, delete admin record + * This function removes 'edit_users' capability from current user capabilities + * if request has admin user ID in it + * + * @param array $allcaps + * @param type $caps + * @param string $name + * @return array + */ + public function not_edit_admin($allcaps, $caps, $name) + { + + $user_keys = array('user_id', 'user'); + foreach ($user_keys as $user_key) { + $access_deny = false; + $user_id = $this->lib->get_request_var($user_key, 'get'); + if (!empty($user_id)) { + if ($user_id == 1) { // built-in WordPress Admin + $access_deny = true; + } else { + if (!isset($this->lib->user_to_check[$user_id])) { + // check if user_id has Administrator role + $access_deny = $this->lib->has_administrator_role($user_id); + } else { + // user_id was checked already, get result from cash + $access_deny = $this->lib->user_to_check[$user_id]; + } + } + if ($access_deny) { + unset($allcaps['edit_users']); + } + break; + } + } + + return $allcaps; + } + // end of not_edit_admin() + + + /** + * add where criteria to exclude users with 'Administrator' role from users list + * + * @global wpdb $wpdb + * @param type $user_query + */ + public function exclude_administrators($user_query) + { + + global $wpdb; + + $result = false; + $links_to_block = array('profile.php', 'users.php'); + foreach ( $links_to_block as $key => $value ) { + $result = stripos($_SERVER['REQUEST_URI'], $value); + if ( $result !== false ) { + break; + } + } + + if ( $result===false ) { // block the user edit stuff only + return; + } + + // get user_id of users with 'Administrator' role + $tableName = (!$this->lib->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta; + $meta_key = $wpdb->prefix . 'capabilities'; + $admin_role_key = '%"administrator"%'; + $query = "select user_id + from $tableName + where meta_key='$meta_key' and meta_value like '$admin_role_key'"; + $ids_arr = $wpdb->get_col($query); + if (is_array($ids_arr) && count($ids_arr) > 0) { + $ids = implode(',', $ids_arr); + $user_query->query_where .= " AND ( $wpdb->users.ID NOT IN ( $ids ) )"; + } + } + // end of exclude_administrators() + + + /* + * Exclude view of users with Administrator role + * + */ + public function exclude_admins_view($views) { + + unset($views['administrator']); + + return $views; + } + // end of exclude_admins_view() + + + /** + * Add/hide edit actions for every user row at the users list + * + * @global type $pagenow + * @global type $current_user + * @param string $actions + * @param type $user + * @return string + */ + public function user_row($actions, $user) + { + + global $pagenow, $current_user; + + if ($pagenow == 'users.php') { + if ($current_user->has_cap($this->key_capability)) { + $actions['capabilities'] = 'ID}", "ure_user_{$user->ID}") . + '">' . esc_html__('Capabilities', 'ure') . ''; + } + } + + return $actions; + } + // end of user_row() + + + /** + * every time when new blog created - duplicate to it roles from the main blog (1) + * @global wpdb $wpdb + * @global WP_Roles $wp_roles + * @param int $blog_id + * @param int $user_id + * + */ + public function duplicate_roles_for_new_blog($blog_id) + { + + global $wpdb, $wp_roles; + + // get Id of 1st (main) blog + $main_blog_id = $this->lib->get_main_blog_id(); + if ( empty($main_blog_id) ) { + return; + } + $current_blog = $wpdb->blogid; + switch_to_blog( $main_blog_id ); + $main_roles = new WP_Roles(); // get roles from primary blog + $default_role = get_option('default_role'); // get default role from primary blog + switch_to_blog($blog_id); // switch to the new created blog + $main_roles->use_db = false; // do not touch DB + $main_roles->add_cap('administrator', 'dummy_123456'); // just to save current roles into new blog + $main_roles->role_key = $wp_roles->role_key; + $main_roles->use_db = true; // save roles into new blog DB + $main_roles->remove_cap('administrator', 'dummy_123456'); // remove unneeded dummy capability + update_option('default_role', $default_role); // set default role for new blog as it set for primary one + switch_to_blog($current_blog); // return to blog where we were at the begin + } + // end of duplicate_roles_for_new_blog() + + + /** + * Filter out URE plugin from not superadmin users + * @param type array $plugins plugins list + * @return type array $plugins updated plugins list + */ + public function exclude_from_plugins_list($plugins) { + global $current_user; + + $ure_key_capability = $this->lib->get_key_capability(); + // if multi-site, then allow plugin activation for network superadmins and, if that's specially defined, - for single site administrators too + if ($this->lib->user_has_capability($current_user, $ure_key_capability)) { + return $plugins; + } + + // exclude URE from plugins list + foreach ($plugins as $key => $value) { + if ($key == 'user-role-editor/' . URE_PLUGIN_FILE) { + unset($plugins[$key]); + break; + } + } + + return $plugins; + } + // end of exclude_from_plugins_list() + + + /** + * Load plugin translation files - linked to the 'plugins_loaded' action + * + */ + function load_translation() + { + + load_plugin_textdomain('ure', '', dirname( plugin_basename( URE_PLUGIN_FULL_PATH ) ) .'/lang'); + + } + // end of ure_load_translation() + + /** + * Modify plugin actions link + * + * @param array $links + * @param string $file + * @return array + */ + public function plugin_action_links($links, $file) + { + + if ($file == plugin_basename(dirname(URE_PLUGIN_FULL_PATH).'/'.URE_PLUGIN_FILE)) { + $settings_link = "" . esc_html__('Settings', 'ure') . ""; + array_unshift($links, $settings_link); + } + + return $links; + } + + // end of plugin_action_links() + + + public function plugin_row_meta($links, $file) { + + if ($file == plugin_basename(dirname(URE_PLUGIN_FULL_PATH) .'/'.URE_PLUGIN_FILE)) { + $links[] = '' . esc_html__('Changelog', 'ure') . ''; + } + + return $links; + } + + // end of plugin_row_meta + + + public function settings_screen_configure() { + $settings_page_hook = $this->settings_page_hook; + if (is_multisite()) { + $settings_page_hook .= '-network'; + } + $screen = get_current_screen(); + // Check if current screen is URE's settings page + if ($screen->id != $settings_page_hook) { + return; + } + $screen_help = new Ure_Screen_Help(); + $screen->add_help_tab( array( + 'id' => 'overview', + 'title' => esc_html__('Overview'), + 'content' => $screen_help->get_settings_help('overview') + )); + } + // end of settings_screen_configure() + + + public function plugin_menu() { + + $translated_title = esc_html__('User Role Editor', 'ure'); + if (function_exists('add_submenu_page')) { + $ure_page = add_submenu_page( + 'users.php', + $translated_title, + $translated_title, + $this->key_capability, + 'users-' . URE_PLUGIN_FILE, + array($this, 'edit_roles')); + add_action("admin_print_styles-$ure_page", array($this, 'admin_css_action')); + } + + if (!$this->lib->multisite) { + $this->settings_page_hook = add_options_page( + $translated_title, + $translated_title, + $this->key_capability, + 'settings-' . URE_PLUGIN_FILE, + array($this, 'settings')); + add_action( 'load-'.$this->settings_page_hook, array($this,'settings_screen_configure') ); + add_action("admin_print_styles-{$this->settings_page_hook}", array($this, 'admin_css_action')); + } + } + // end of plugin_menu() + + + public function network_plugin_menu() { + if (is_multisite()) { + $translated_title = esc_html__('User Role Editor', 'ure'); + $this->settings_page_hook = add_submenu_page( + 'settings.php', + $translated_title, + $translated_title, + $this->key_capability, + 'settings-' . URE_PLUGIN_FILE, + array(&$this, 'settings')); + add_action( 'load-'.$this->settings_page_hook, array($this,'settings_screen_configure') ); + add_action("admin_print_styles-{$this->settings_page_hook}", array($this, 'admin_css_action')); + } + + } + + // end of network_plugin_menu() + + + protected function get_settings_action() { + + $action = 'show'; + $update_buttons = array('ure_settings_update', 'ure_addons_settings_update', 'ure_settings_ms_update', 'ure_default_roles_update'); + foreach($update_buttons as $update_button) { + if (!isset($_POST[$update_button])) { + continue; + } + if (!wp_verify_nonce($_POST['_wpnonce'], 'user-role-editor')) { + wp_die('Security check failed'); + } + $action = $update_button; + break; + } + + return $action; + + } + // end of get_settings_action() + + /** + * Update General Options tab + */ + protected function update_general_options() { + if (defined('URE_SHOW_ADMIN_ROLE') && (URE_SHOW_ADMIN_ROLE == 1)) { + $show_admin_role = 1; + } else { + $show_admin_role = $this->lib->get_request_var('show_admin_role', 'checkbox'); + } + $this->lib->put_option('show_admin_role', $show_admin_role); + + $caps_readable = $this->lib->get_request_var('caps_readable', 'checkbox'); + $this->lib->put_option('ure_caps_readable', $caps_readable); + + $show_deprecated_caps = $this->lib->get_request_var('show_deprecated_caps', 'checkbox'); + $this->lib->put_option('ure_show_deprecated_caps', $show_deprecated_caps); + + do_action('ure_settings_update1'); + + $this->lib->flush_options(); + $this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure')); + + } + // end of update_general_options() + + + /** + * Update Additional Modules Options tab + */ + protected function update_addons_options() { + + if (!$this->lib->multisite) { + $count_users_without_role = $this->lib->get_request_var('count_users_without_role', 'checkbox'); + $this->lib->put_option('count_users_without_role', $count_users_without_role); + } + do_action('ure_settings_update2'); + + $this->lib->flush_options(); + $this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure')); + } + // end of update_addons_options() + + + protected function update_default_roles() { + global $wp_roles; + + // Primary default role + $primary_default_role = $this->lib->get_request_var('default_user_role', 'post'); + if (!empty($primary_default_role) && isset($wp_roles->role_objects[$primary_default_role]) && $primary_default_role !== 'administrator') { + update_option('default_role', $primary_default_role); + } + + // Other default roles + $other_default_roles = array(); + foreach($_POST as $key=>$value) { + $prefix = substr($key, 0, 8); + if ($prefix!=='wp_role_') { + continue; + } + $role_id = substr($key, 8); + if ($role_id!=='administrator' && isset($wp_roles->role_objects[$role_id])) { + $other_default_roles[] = $role_id; + } + } // foreach() + $this->lib->put_option('other_default_roles', $other_default_roles, true); + + $this->lib->show_message(esc_html__('Default Roles are updated', 'ure')); + } + // end of update_default_roles() + + + protected function update_multisite_options() { + if (!$this->lib->multisite) { + return; + } + + $allow_edit_users_to_not_super_admin = $this->lib->get_request_var('allow_edit_users_to_not_super_admin', 'checkbox'); + $this->lib->put_option('allow_edit_users_to_not_super_admin', $allow_edit_users_to_not_super_admin); + + do_action('ure_settings_ms_update'); + + $this->lib->flush_options(); + $this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure')); + + } + // end of update_multisite_options() + + + public function settings() { + if (!current_user_can($this->key_capability)) { + esc_html__( 'You do not have sufficient permissions to manage options for User Role Editor.', 'ure' ); + } + $action = $this->get_settings_action(); + switch ($action) { + case 'ure_settings_update': + $this->update_general_options(); + break; + case 'ure_addons_settings_update': + $this->update_addons_options(); + break; + case 'ure_settings_ms_update': + $this->update_multisite_options(); + break; + case 'ure_default_roles_update': + $this->update_default_roles(); + case 'show': + default: + ; + } // switch() + + if (defined('URE_SHOW_ADMIN_ROLE') && (URE_SHOW_ADMIN_ROLE == 1)) { + $show_admin_role = 1; + } else { + $show_admin_role = $this->lib->get_option('show_admin_role', 0); + } + $caps_readable = $this->lib->get_option('ure_caps_readable', 0); + $show_deprecated_caps = $this->lib->get_option('ure_show_deprecated_caps', 0); + + if ($this->lib->multisite) { + $allow_edit_users_to_not_super_admin = $this->lib->get_option('allow_edit_users_to_not_super_admin', 0); + } else { + $count_users_without_role = $this->lib->get_option('count_users_without_role', 0); + } + + $this->lib->get_default_role(); + $this->lib->editor_init1(); + $this->lib->role_edit_prepare_html(0); + + $ure_tab_idx = $this->lib->get_request_var('ure_tab_idx', 'int'); + + do_action('ure_settings_load'); + + if ($this->lib->multisite) { + $link = 'settings.php'; + } else { + $link = 'options-general.php'; + } + require_once(URE_PLUGIN_DIR . 'includes/settings-template.php'); + } + // end of settings() + + + public function admin_css_action() { + + wp_enqueue_style('wp-jquery-ui-dialog'); + if (stripos($_SERVER['REQUEST_URI'], 'settings-user-role-editor')!==false) { + wp_enqueue_style('ure-jquery-ui-tabs', URE_PLUGIN_URL . 'css/jquery-ui-1.10.4.custom.min.css', array(), false, 'screen'); + } + wp_enqueue_style('ure-admin-css', URE_PLUGIN_URL . 'css/ure-admin.css', array(), false, 'screen'); + } + // end of admin_css_action() + + + // call roles editor page + public function edit_roles() { + + global $current_user; + + if (!empty($current_user)) { + $user_id = $current_user->ID; + } else { + $user_id = false; + } + $ure_key_capability = $this->lib->get_key_capability(); + if (!$this->lib->user_has_capability($current_user, $ure_key_capability)) { + die(esc_html__('Insufficient permissions to work with User Role Editor', 'ure')); + } + + $this->lib->editor(); + } + // end of edit_roles() + + + // move old version option to the new storage 'user_role_editor' option, array, containing all URE options + private function convert_option($option_name) { + + $option_value = get_option($option_name, 0); + delete_option($option_name); + $this->lib->put_option( $option_name, $option_value ); + + } + +/** + * execute on plugin activation + */ +function setup() { + + $this->convert_option('ure_caps_readable'); + $this->convert_option('ure_show_deprecated_caps'); + $this->convert_option('ure_hide_pro_banner'); + $this->lib->flush_options(); + + $this->lib->make_roles_backup(); + + do_action('ure_activation'); +} +// end of setup() + + /** + * Load plugin javascript stuff + * + * @param string $hook_suffix + */ + public function admin_load_js($hook_suffix){ + + if (class_exists('User_Role_Editor_Pro')) { + $ure_hook_suffixes = array('settings_page_settings-user-role-editor-pro', 'users_page_users-user-role-editor-pro'); + } else { + $ure_hook_suffixes = array('settings_page_settings-user-role-editor', 'users_page_users-user-role-editor'); + } + if (in_array($hook_suffix, $ure_hook_suffixes)) { + wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core','jquery-ui-button', 'jquery') ); + wp_enqueue_script('jquery-ui-tabs', false, array('jquery-ui-core', 'jquery') ); + wp_register_script( 'ure-js', plugins_url( '/js/ure-js.js', URE_PLUGIN_FULL_PATH ) ); + wp_enqueue_script ( 'ure-js' ); + wp_localize_script( 'ure-js', 'ure_data', array( + 'wp_nonce' => wp_create_nonce('user-role-editor'), + 'page_url' => URE_WP_ADMIN_URL . URE_PARENT .'?page=users-'.URE_PLUGIN_FILE, + 'is_multisite' => is_multisite() ? 1 : 0, + 'select_all' => esc_html__('Select All', 'ure'), + 'unselect_all' => esc_html__('Unselect All', 'ure'), + 'reverse' => esc_html__('Reverse', 'ure'), + 'update' => esc_html__('Update', 'ure'), + 'confirm_submit' => esc_html__('Please confirm permissions update', 'ure'), + 'add_new_role_title' => esc_html__('Add New Role', 'ure'), + 'role_name_required' => esc_html__(' Role name (ID) can not be empty!', 'ure'), + 'role_name_valid_chars' => esc_html__(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), + 'numeric_role_name_prohibited' => esc_html__(' WordPress does not support numeric Role name (ID). Add latin characters to it.', 'ure'), + 'add_role' => esc_html__('Add Role', 'ure'), + 'delete_role' => esc_html__('Delete Role', 'ure'), + 'cancel' => esc_html__('Cancel', 'ure'), + 'add_capability' => esc_html__('Add Capability', 'ure'), + 'delete_capability' => esc_html__('Delete Capability', 'ure'), + 'reset' => esc_html__('Reset', 'ure'), + 'reset_warning' => esc_html__('DANGER! Resetting will restore default settings from WordPress Core.','ure')."\n\n". + esc_html__('If any plugins have changed capabilities in any way upon installation (such as S2Member, WooCommerce, and many more), those capabilities will be DELETED!', 'ure')."\n\n" . + esc_html__('For more information on how to undo changes and restore plugin capabilities go to', 'ure')."\n". + 'http://role-editor.com/how-to-restore-deleted-wordpress-user-roles/'."\n\n". + esc_html__('Continue?', 'ure'), + 'default_role' => esc_html__('Default Role', 'ure'), + 'set_new_default_role' => esc_html__('Set New Default Role', 'ure'), + 'delete_capability' => esc_html__('Delete Capability', 'ure'), + 'delete_capability_warning' => esc_html__('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'), + 'capability_name_required' => esc_html__(' Capability name (ID) can not be empty!', 'ure'), + 'capability_name_valid_chars' => esc_html__(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), + ) ); + // load additional JS stuff for Pro version, if exists + do_action('ure_load_js'); + } + +} +// end of admin_load_js() + + + protected function is_user_profile_extention_allowed() { + // Check if we are not at the network admin center + $result = stripos($_SERVER['REQUEST_URI'], 'network/user-edit.php') == false; + + return $result; + } + // end of is_user_profile_extention_allowed() + + + public function edit_user_profile($user) { + + global $current_user; + + if (!$this->is_user_profile_extention_allowed()) { + return; + } + if (!$this->lib->user_is_admin($current_user->ID)) { + return; + } +?> +

+ + + + + +
+ lib->other_user_roles($user); + if (is_array($roles) && count($roles) > 0) { + foreach ($roles as $role) { + echo ''; + } + } + $output = $this->lib->roles_text($roles); + echo $output . '  >> ID}", "ure_user_{$user->ID}") . '">' . + esc_html__('Edit', 'ure') . ''; + ?> +
+ lib->other_user_roles($user); + $retval = $this->lib->roles_text($roles); + } + + // Pass retval through + return $retval; + } + // end of user_role_row() + + + // save additional user roles when user profile is updated, as WordPress itself doesn't know about them + public function user_profile_update($user_id) { + + if (!current_user_can('edit_user', $user_id)) { + return; + } + $user = get_userdata($user_id); + + if (isset($_POST['ure_other_roles'])) { + $new_roles = array_intersect($user->roles, $_POST['ure_other_roles']); + $skip_roles = array(); + foreach ($new_roles as $role) { + $skip_roles['$role'] = 1; + } + unset($new_roles); + foreach ($_POST['ure_other_roles'] as $role) { + if (!isset($skip_roles[$role])) { + $user->add_role($role); + } + } + } + + } + // update_user_profile() + + + + public function ure_ajax() { + + require_once(URE_PLUGIN_DIR . 'includes/class-ajax-processor.php'); + $ajax_processor = new URE_Ajax_Processor($this->lib); + $ajax_processor->dispatch(); + + } + // end of ure_ajax() + + + // execute on plugin deactivation + function cleanup() + { + + } + // end of setup() + + +} +// end of User_Role_Editor diff --git a/wp-content/plugins/user-role-editor/includes/define-constants.php b/wp-content/plugins/user-role-editor/includes/define-constants.php new file mode 100644 index 0000000..2ee867f --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/define-constants.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/includes/misc-support-stuff.php b/wp-content/plugins/user-role-editor/includes/misc-support-stuff.php new file mode 100644 index 0000000..1da1760 --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/misc-support-stuff.php @@ -0,0 +1,31 @@ + diff --git a/wp-content/plugins/user-role-editor/includes/settings-template.php b/wp-content/plugins/user-role-editor/includes/settings-template.php new file mode 100644 index 0000000..7e2aa59 --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/settings-template.php @@ -0,0 +1,184 @@ + +
+ +

+
+

+ +
+ +
+
+
+ + + + + + + + + + + + + + +
+ + /> + +
+ /> + +
+ /> + +
+ + +

+ +

+ +
+
+
+ +
+
+ +lib->multisite) { +?> + + + + + + + +
+ /> + +
+ + +

+ + +

+
+ + +
+
+lib->multisite) { + esc_html_e('Primary default role: ', 'ure'); + echo $this->lib->role_default_html; +?> +
+ + +
+ lib->show_other_default_roles(); ?> +
+lib->multisite) { + echo '

'. 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') .'

'; + } +?> +
+ + +

+ +

+
+
+ +lib->multisite) { +?> +
+
+
+ + + + + + + +
+ /> + + +
+ + +

+ +

+
+
+
+ +
+ lib->about(); ?> +
+
+
+ diff --git a/wp-content/plugins/user-role-editor/includes/ure-role-edit.php b/wp-content/plugins/user-role-editor/includes/ure-role-edit.php new file mode 100644 index 0000000..868045b --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/ure-role-edit.php @@ -0,0 +1,102 @@ + + +
+
+

role_select_html; ?>

+
+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) { +?> + onclick="ure_turn_caps_readable(0);"/> +    +show_deprecated_caps) { + $checked = 'checked="checked"'; + } else { + $checked = ''; + } +?> + onclick="ure_turn_deprecated_caps(0);"/> + +apply_to_all) { + $checked = 'checked="checked"'; + $fontColor = 'color:#FF0000;'; + } else { + $checked = ''; + $fontColor = ''; + } +?> +
+ title="" onclick="ure_applyToAllOnClick(this)"/> + +
+ +

+
+ +
+   + +
+ + + + + + +
+show_capabilities( true, true ); ?> + +toolbar(!empty($this->role_delete_html), !empty($this->capability_remove_html));?> +
+full_capabilities ) - count( $this->get_built_in_wp_caps() ); + if ($quant>0) { + echo '
'; + esc_html_e('Custom capabilities:', 'ure'); +?> + + + + + +
+show_capabilities( false, true ); ?> +
+0) +?> + + +display_box_end(); +?> +
+
diff --git a/wp-content/plugins/user-role-editor/includes/ure-user-edit.php b/wp-content/plugins/user-role-editor/includes/ure-user-edit.php new file mode 100644 index 0000000..e94f3ef --- /dev/null +++ b/wp-content/plugins/user-role-editor/includes/ure-user-edit.php @@ -0,0 +1,150 @@ + + +
+user_to_edit->ID}", + "ure_user_{$this->user_to_edit->ID}") .'" >'; + $anchor_end = ''; + } else { + $anchor_start = ''; + $anchor_end = ''; + } + $user_info = ' '.$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.''; + if (is_multisite() && is_super_admin($this->user_to_edit->ID)) { + $user_info .= ' '. esc_html__('Network Super Admin', 'ure') .''; + } + + $this->display_box_start(esc_html__('Change capabilities for user', 'ure').$user_info, 'min-width:1100px;'); + +?> + + + + + + + + + +
  + 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 = ''; + } +?> + + onclick="ure_turn_caps_readable(user_to_edit->ID; ?>);" /> +     +show_deprecated_caps) { + $checked = 'checked="checked"'; + } else { + $checked = ''; + } +?> + onclick="ure_turn_deprecated_caps(user_to_edit->ID; ?>);"/> + + +
+
+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 +?> +
+user_to_edit->ID); + if (!empty($bbp_user_role)) { + echo $dynamic_roles[$bbp_user_role]['name']; + } +} +?> +
+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 '
'; + } + } + ?> +
+ +
+   + +
+ + + + + + +
+ show_capabilities( true, false ); ?> + + toolbar();?> +
+full_capabilities ) - count( $this->get_built_in_wp_caps() ); + if ($quant>0) { + echo '
'; +?> + + + + + +
+ show_capabilities( false, false ); ?> +
+0) +?> +
+ + +display_box_end(); +?> + +
\ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/index.php b/wp-content/plugins/user-role-editor/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/user-role-editor/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/js/index.php b/wp-content/plugins/user-role-editor/js/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/user-role-editor/js/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/js/ure-js.js b/wp-content/plugins/user-role-editor/js/ure-js.js new file mode 100644 index 0000000..d4c5311 --- /dev/null +++ b/wp-content/plugins/user-role-editor/js/ure-js.js @@ -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 = $("
") + .attr("method", "post") + .attr("action", url); + $.each(params, function(name, value) { + $("") + .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 = ''+ caption +''; + + 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 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(''); + } + + // 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; i0) { + jQuery('#user_'+ data.users[i]).prop('checked', true); + } else { + var html = ''; + el.append(html); + } + } + + // submit form + jQuery('#changeit').click(); +} diff --git a/wp-content/plugins/user-role-editor/lang/index.php b/wp-content/plugins/user-role-editor/lang/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/user-role-editor/lang/ure-ca.mo b/wp-content/plugins/user-role-editor/lang/ure-ca.mo new file mode 100644 index 0000000..5af0a9e Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-ca.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-ca.po b/wp-content/plugins/user-role-editor/lang/ure-ca.po new file mode 100644 index 0000000..3996615 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-ca.po @@ -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 \n" +"Language-Team: 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 "" diff --git a/wp-content/plugins/user-role-editor/lang/ure-es_ES.mo b/wp-content/plugins/user-role-editor/lang/ure-es_ES.mo new file mode 100644 index 0000000..0662e92 Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-es_ES.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-es_ES.po b/wp-content/plugins/user-role-editor/lang/ure-es_ES.po new file mode 100644 index 0000000..ec221bc --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-es_ES.po @@ -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 \n" +"Language-Team: 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" diff --git a/wp-content/plugins/user-role-editor/lang/ure-fa_IR.mo b/wp-content/plugins/user-role-editor/lang/ure-fa_IR.mo new file mode 100644 index 0000000..a6616e8 Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-fa_IR.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-fa_IR.po b/wp-content/plugins/user-role-editor/lang/ure-fa_IR.po new file mode 100644 index 0000000..eaf51a3 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-fa_IR.po @@ -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 \n" +"Language-Team: Morteza Gholami \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 "" +"در وردپرس چند سایتی تنها مدیران اصلی اجازه‌ی ایجاد، ویرایش و حذف کاربران را " +"دارند. این " diff --git a/wp-content/plugins/user-role-editor/lang/ure-he_IL.mo b/wp-content/plugins/user-role-editor/lang/ure-he_IL.mo new file mode 100644 index 0000000..7e8684f Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-he_IL.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-he_IL.po b/wp-content/plugins/user-role-editor/lang/ure-he_IL.po new file mode 100644 index 0000000..6feb9f2 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-he_IL.po @@ -0,0 +1,1375 @@ +# This file was generated by WPML +# WPML is a WordPress plugin that can turn any WordPress or WordPressMU site into a full featured multilingual content management system. +# http://wpml.org +msgid "" +msgstr "" +"Project-Id-Version: User Role Editor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-11 11:20+0700\n" +"PO-Revision-Date: \n" +"Last-Translator: Vladimir Garagulya \n" +"Language-Team: Ahrale, Atar4U.com \n" +"Language: Hebrew עברית he_IL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +# esc_html__('User Role Editor', 'ure'), +# esc_html__('User Role Editor', 'ure'), +# $this->key_capability, 'settings-'.URE_PLUGIN_FILE, array(&$this, 'settings')); +# wpml-name: c26ad3b67c7211a5872194d68cb5a8eb +#: ../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 "" + +# 'reset_warning' => __('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?', 'ure'), +# 'default_role' => __('Default Role', 'ure'), +# 'set_new_default_role' => __('Set New Default Role', 'ure'), +# wpml-name: db135301eaf77a955b2b016f9b9d6a99 +#: ../includes/settings-template.php:23 +#, fuzzy +msgid "Default Roles" +msgstr "תפקיד ברירת מחדל" + +#: ../includes/settings-template.php:27 +msgid "Multisite" +msgstr "" + +#: ../includes/settings-template.php:31 +msgid "About" +msgstr "" + +# +# +# +# +# +# wpml-name: a19a4f985d31bbbd3d3b6d5dbd368ef0 +#: ../includes/settings-template.php:50 +#: ../includes/class-ure-screen-help.php:18 +msgid "Show capabilities in the human readable form" +msgstr "" + +# onclick="ure_turn_deprecated_caps(user_to_edit->ID; ?>);"/> +# +# +# wpml-name: 130b09deaec4b13948be95555d546f25 +#: ../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 "הצג הרשאות לפי מספר" + +#

+# +#

+# wpml-name: c9cc8cce247e49bae79f15173ce97354 +#: ../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 "" + +# if (!is_array($caps_to_remove) || count($caps_to_remove) == 0 || !isset($caps_to_remove[$capability_id])) { +# return sprintf(__('Error! You do not have permission to delete this capability: %s!', 'ure'), $capability_id); +# } +# wpml-name: 0e132e68574d9609d956f9be409f7384 +#: ../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 "" + +# wp_nonce_url("users.php?page=users-".URE_PLUGIN_FILE."&object=user&user_id={$user->ID}", "ure_user_{$user->ID}") . +# '">' . __('Capabilities', 'ure') . ''; +# } +# wpml-name: 82ec2cd6fda87713f588da75c3b1d0ed +#: ../includes/class-user-role-editor.php:414 +msgid "Capabilities" +msgstr "יכולות" + +# if ($file == plugin_basename(dirname(URE_PLUGIN_FULL_PATH).'/'.URE_PLUGIN_FILE)) { +# $settings_link = "" . __('Settings', 'ure') . ""; +# array_unshift($links, $settings_link); +# wpml-name: f4f70727dc34561dfde1a3c529b6205c +#: ../includes/class-user-role-editor.php:507 +msgid "Settings" +msgstr "הגדרות" + +# if ($file == plugin_basename(dirname(URE_PLUGIN_FULL_PATH) .'/'.URE_PLUGIN_FILE)) { +# $links[] = '' . __('Changelog', 'ure') . ''; +# } +# wpml-name: c49182dc0c7a70b9cd2e10853d9ec6c7 +#: ../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 "" + +# esc_html__('User Role Editor', 'ure'), +# esc_html__('User Role Editor', 'ure'), +# $this->key_capability, 'settings-'.URE_PLUGIN_FILE, array(&$this, 'settings')); +# wpml-name: c26ad3b67c7211a5872194d68cb5a8eb +#: ../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" + +# $this->lib->flush_options(); +# $this->lib->show_message(__('User Role Editor options are updated', 'ure')); +# } else { // get options from the options storage +# wpml-name: aef323fbbd25d577170fff17c15cf857 +#: ../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 "אפשרויות עורך תפקיד משתמש עודכנו" + +# 'reset_warning' => __('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?', 'ure'), +# 'default_role' => __('Default Role', 'ure'), +# 'set_new_default_role' => __('Set New Default Role', 'ure'), +# wpml-name: db135301eaf77a955b2b016f9b9d6a99 +#: ../includes/class-user-role-editor.php:682 +#, fuzzy +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 "" + +# 'is_multisite' => is_multisite() ? 1 : 0, +# 'select_all' => __('Select All', 'ure'), +# 'unselect_all' => __('Unselect All', 'ure'), +# wpml-name: 45e96c0a422ce8a1a6ec1bd5eb9625c6 +#: ../includes/class-user-role-editor.php:835 +msgid "Select All" +msgstr "בחירת הכל" + +# 'select_all' => __('Select All', 'ure'), +# 'unselect_all' => __('Unselect All', 'ure'), +# 'reverse' => __('Reverse', 'ure'), +# wpml-name: 016269c0d83a19a19a2ee0a4294740b4 +#: ../includes/class-user-role-editor.php:836 +msgid "Unselect All" +msgstr "לא לבחור שום דבר" + +# 'unselect_all' => __('Unselect All', 'ure'), +# 'reverse' => __('Reverse', 'ure'), +# 'update' => __('Update', 'ure'), +# wpml-name: 67f115c1fddc4ce1aeb1c754001585bc +#: ../includes/class-user-role-editor.php:837 +msgid "Reverse" +msgstr "להפוך" + +# 'reverse' => __('Reverse', 'ure'), +# 'update' => __('Update', 'ure'), +# 'confirm_submit' => __('Please confirm permissions update', 'ure'), +# wpml-name: 06933067aafd48425d67bcb01bba5cb6 +#: ../includes/class-user-role-editor.php:838 +msgid "Update" +msgstr "עדכן" + +# 'update' => __('Update', 'ure'), +# 'confirm_submit' => __('Please confirm permissions update', 'ure'), +# 'add_new_role_title' => __('Add New Role', 'ure'), +# wpml-name: 85251872440cc94c6080a90451e018c4 +#: ../includes/class-user-role-editor.php:839 +msgid "Please confirm permissions update" +msgstr "נא לאשר את עדכון ההרשאות" + +# 'confirm_submit' => __('Please confirm permissions update', 'ure'), +# 'add_new_role_title' => __('Add New Role', 'ure'), +# 'role_name_required' => __(' Role name (ID) can not be empty!', 'ure'), +# wpml-name: cf46e7fb1093a47a76f35fc61ab5d432 +#: ../includes/class-user-role-editor.php:840 +msgid "Add New Role" +msgstr "הוסף סוג משתמש חדש" + +# 'add_new_role_title' => __('Add New Role', 'ure'), +# 'role_name_required' => __(' Role name (ID) can not be empty!', 'ure'), +# 'role_name_valid_chars' => __(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# wpml-name: 1400ecabfd5a7c9527f71723da18dad0 +#: ../includes/class-user-role-editor.php:841 +msgid " Role name (ID) can not be empty!" +msgstr " שם התפקיד (מזהה) אינו יכול להישאר ריק!" + +# 'role_name_required' => __(' Role name (ID) can not be empty!', 'ure'), +# 'role_name_valid_chars' => __(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# 'add_role' => __('Add Role', 'ure'), +# wpml-name: 7b94f04285f5efc287652bd40338e730 +#: ../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 "" + +# 'role_name_valid_chars' => __(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# 'add_role' => __('Add Role', 'ure'), +# 'delete_role' => __('Delete Role', 'ure'), +# wpml-name: 1453b39dcc15a372640d960c6db7db25 +#: ../includes/class-user-role-editor.php:844 +msgid "Add Role" +msgstr "הוספת תפקיד" + +# 'add_role' => __('Add Role', 'ure'), +# 'delete_role' => __('Delete Role', 'ure'), +# 'cancel' => __('Cancel', 'ure'), +# wpml-name: 4e2626418b461869a386850b0f3b437f +#: ../includes/class-user-role-editor.php:845 +msgid "Delete Role" +msgstr "מחיקת סוג משתמש" + +# 'delete_role' => __('Delete Role', 'ure'), +# 'cancel' => __('Cancel', 'ure'), +# 'add_capability' => __('Add Capability', 'ure'), +# wpml-name: ea4788705e6873b424c65e91c2846b19 +#: ../includes/class-user-role-editor.php:846 +msgid "Cancel" +msgstr "ביטול" + +# 'cancel' => __('Cancel', 'ure'), +# 'add_capability' => __('Add Capability', 'ure'), +# 'delete_capability' => __('Delete Capability', 'ure'), +# wpml-name: 39cc0b416ba0d26679547346b8c5cf8d +#: ../includes/class-user-role-editor.php:847 +msgid "Add Capability" +msgstr "הוספת יכולת" + +# 'set_new_default_role' => __('Set New Default Role', 'ure'), +# 'delete_capability' => __('Delete Capability', 'ure'), +# 'delete_capability_warning' => __('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'), +# wpml-name: 06844dd4ec4b29fa8a354aaacbd4861a +#: ../includes/class-user-role-editor.php:848 +#: ../includes/class-user-role-editor.php:857 +msgid "Delete Capability" +msgstr "מחיקת יכולת" + +# 'delete_capability' => __('Delete Capability', 'ure'), +# 'reset' => __('Reset', 'ure'), +# 'reset_warning' => __('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?', 'ure'), +# wpml-name: 526d688f37a86d3c3f27d0c5016eb71d +#: ../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 "" + +# __('Author', 'ure'); +# __('Contributor', 'ure'); +# __('Subscriber', 'ure'); +# wpml-name: 23d21ad4dea7aadf907e5e601b1905e6 +#: ../includes/class-user-role-editor.php:854 +msgid "Continue?" +msgstr "" + +# 'reset_warning' => __('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?', 'ure'), +# 'default_role' => __('Default Role', 'ure'), +# 'set_new_default_role' => __('Set New Default Role', 'ure'), +# wpml-name: db135301eaf77a955b2b016f9b9d6a99 +#: ../includes/class-user-role-editor.php:855 +msgid "Default Role" +msgstr "תפקיד ברירת מחדל" + +# 'default_role' => __('Default Role', 'ure'), +# 'set_new_default_role' => __('Set New Default Role', 'ure'), +# 'delete_capability' => __('Delete Capability', 'ure'), +# wpml-name: f28d52a1096a73cff427d1216dc578ad +#: ../includes/class-user-role-editor.php:856 +msgid "Set New Default Role" +msgstr "הגדר תפקיד ברירת מחדל חדש" + +# 'delete_capability' => __('Delete Capability', 'ure'), +# 'delete_capability_warning' => __('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'), +# 'capability_name_required' => __(' Capability name (ID) can not be empty!', 'ure'), +# wpml-name: b8827a096ab461b8e26931adf82c8d85 +#: ../includes/class-user-role-editor.php:858 +msgid "" +"Warning! Be careful - removing critical capability could crash some plugin " +"or other custom code" +msgstr "" +"זהירות! הסרה של אפשרויות קריטיות עשוי לגרום לתוספים מסוים או קוד נסמך שלא " +"לעבוד כשורה" + +# 'delete_capability_warning' => __('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'), +# 'capability_name_required' => __(' Capability name (ID) can not be empty!', 'ure'), +# 'capability_name_valid_chars' => __(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# wpml-name: ba38256d66e3ae37b7b16052a0f94729 +#: ../includes/class-user-role-editor.php:859 +msgid " Capability name (ID) can not be empty!" +msgstr " שם היכולת (מזהה) לא יכול להיות ריק!" + +# 'capability_name_required' => __(' Capability name (ID) can not be empty!', 'ure'), +# 'capability_name_valid_chars' => __(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# ) ); +# wpml-name: 6d4c115be3e7b4f1fd70112642c9a72d +#: ../includes/class-user-role-editor.php:860 +msgid "" +" Capability name (ID) must contain latin characters, digits, hyphens or " +"underscore only!" +msgstr "" +" שם היכולת (מזהה) חייב להכיל אותיות לטיניות, ספרות, מקפים או קו תחתון בלבד!" + +# +# +# +# wpml-name: a5f40dc2b5f2552187d0326e77e267eb +#: ../includes/class-user-role-editor.php:893 +#: ../includes/class-user-role-editor.php:922 +msgid "Other Roles" +msgstr "תפקידים אחרים" + +# $output = $this->lib->roles_text($roles); +# echo $output . '  >> ID}", "ure_user_{$user->ID}") . '">' . __('Edit', 'ure') . ''; +# ?> +# wpml-name: 7dce122004969d56ae2e0245cb754d35 +#: ../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 "" + +# +# +# +# wpml-name: a1fbf81a928fffd1bb4665b5af8952ab +#: ../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 "" + +# wp_nonce_url("users.php?page=users-".URE_PLUGIN_FILE."&object=user&user_id={$user->ID}", "ure_user_{$user->ID}") . +# '">' . __('Capabilities', 'ure') . ''; +# } +# wpml-name: 82ec2cd6fda87713f588da75c3b1d0ed +#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109 +#, fuzzy +msgid "Core capabilities:" +msgstr "יכולות" + +#: ../includes/ure-role-edit.php:65 ../includes/ure-user-edit.php:111 +msgid "Quick filter:" +msgstr "" + +# wp_nonce_url("users.php?page=users-".URE_PLUGIN_FILE."&object=user&user_id={$user->ID}", "ure_user_{$user->ID}") . +# '">' . __('Capabilities', 'ure') . ''; +# } +# wpml-name: 82ec2cd6fda87713f588da75c3b1d0ed +#: ../includes/ure-role-edit.php:83 ../includes/ure-user-edit.php:130 +#, fuzzy +msgid "Custom capabilities:" +msgstr "יכולות" + +# if (!$this->editor_init0()) { +# $this->show_message(__('Error: wrong request', 'URE')); +# return false; +# wpml-name: a4b9ac7e09dc5996d763f6bae29fd31a +#: ../includes/class-ure-lib.php:143 +msgid "Error: wrong request" +msgstr "שגיאה: בקשה מוטעית" + +# 'add_new_role_title' => __('Add New Role', 'ure'), +# 'role_name_required' => __(' Role name (ID) can not be empty!', 'ure'), +# 'role_name_valid_chars' => __(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# wpml-name: 1400ecabfd5a7c9527f71723da18dad0 +#: ../includes/class-ure-lib.php:175 +#, fuzzy +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 "" + +# 'add_role' => __('Add Role', 'ure'), +# 'delete_role' => __('Delete Role', 'ure'), +# 'cancel' => __('Cancel', 'ure'), +# wpml-name: 4e2626418b461869a386850b0f3b437f +#: ../includes/class-ure-lib.php:186 +#, fuzzy +msgid "Select Role:" +msgstr "מחיקת סוג משתמש" + +# 'add_role' => __('Add Role', 'ure'), +# 'delete_role' => __('Delete Role', 'ure'), +# 'cancel' => __('Cancel', 'ure'), +# wpml-name: 4e2626418b461869a386850b0f3b437f +#: ../includes/class-ure-lib.php:201 +#, fuzzy +msgid "Delete:" +msgstr "מחיקת סוג משתמש" + +# 'delete_capability_warning' => __('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'), +# 'capability_name_required' => __(' Capability name (ID) can not be empty!', 'ure'), +# 'capability_name_valid_chars' => __(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'), +# wpml-name: ba38256d66e3ae37b7b16052a0f94729 +#: ../includes/class-ure-lib.php:208 +#, fuzzy +msgid "Capability name (ID): " +msgstr " שם היכולת (מזהה) לא יכול להיות ריק!" + +# if (!isset($this->roles[$_POST['user_role']])) { +# $mess = __('Error: ', 'ure') . __('Role', 'ure') . ' ' . esc_html($_POST['user_role']) . ' ' . __('does not exist', 'ure'); +# $this->current_role = ''; +# wpml-name: f97d2eb0a66987899d02bb180936afa3 +#: ../includes/class-ure-lib.php:322 +msgid "Error: " +msgstr "שגיאה:" + +# if (!isset($this->roles[$_POST['user_role']])) { +# $mess = __('Error: ', 'ure') . __('Role', 'ure') . ' ' . esc_html($_POST['user_role']) . ' ' . __('does not exist', 'ure'); +# $this->current_role = ''; +# wpml-name: bbbabdbe1b262f75d99d62880b953be1 +#: ../includes/class-ure-lib.php:322 +msgid "Role" +msgstr "סוג משתמש:" + +# if (!isset($this->roles[$_POST['user_role']])) { +# $mess = __('Error: ', 'ure') . __('Role', 'ure') . ' ' . esc_html($_POST['user_role']) . ' ' . __('does not exist', 'ure'); +# $this->current_role = ''; +# wpml-name: 9416a531e05cf18f1c26b97263e3c96b +#: ../includes/class-ure-lib.php:323 +msgid "does not exist" +msgstr "לא נמצא" + +# if (!$this->apply_to_all) { +# $mess = __('Role is updated successfully', 'ure'); +# } else { +# wpml-name: 9fd866f99b55510d60384b7efeb22018 +#: ../includes/class-ure-lib.php:366 +msgid "Role is updated successfully" +msgstr "התפקיד עודכן בהצלחה" + +# } else { +# $mess = __('Roles are updated for all network', 'ure'); +# } +# wpml-name: f89c187756348dad944b0fcca790fde6 +#: ../includes/class-ure-lib.php:368 +msgid "Roles are updated for all network" +msgstr "התפקידים עודכנו עבור כל הרשת" + +# } +# $mess = __('Error occured during role(s) update', 'ure'); +# } +# wpml-name: 9f528ca4741155f636c4331b19f2b170 +#: ../includes/class-ure-lib.php:374 +msgid "Error occured during role(s) update" +msgstr "קרתה שגיאה בעת עדכון תפקידי המשתמש" + +# } +# $mess = __('User capabilities are updated successfully', 'ure'); +# } else { +# wpml-name: ee37618edaa53156b3a18d543ec60412 +#: ../includes/class-ure-lib.php:381 +msgid "User capabilities are updated successfully" +msgstr "יכולות המשתמש עודכנו בהצלחה" + +# } +# $mess = __('Error occured during user update', 'ure'); +# } +# wpml-name: f7283da5501e7e1cb13255d323859feb +#: ../includes/class-ure-lib.php:386 +msgid "Error occured during user update" +msgstr "קרתה שגיאה בזמן עדכון המשתמש" + +# } else if ($action == 'roles_restore_note') { +# $this->notification = __('User Roles are restored to WordPress default values. ', 'ure'); +# } else if ($action == 'update') { +# wpml-name: 7182950b4f92d446844be24cfea6276a +#: ../includes/class-ure-lib.php:441 +msgid "User Roles are restored to WordPress default values. " +msgstr "תפקידי משתמש שוחזרו לערכי ברירת המחדל של וורדפרס." + +# if (!empty($url)) { +# $link = '' . __('Help', 'ure') . ''; +# } else { +# wpml-name: 6a26f548831e6a8c26bfbbd9f6ec61e0 +#: ../includes/class-ure-lib.php:1312 +msgid "Help" +msgstr "עזרה" + +# if ($show_message) { +# $this->show_message('Error! ' . __('Error is occur. Please check the log file.', 'ure')); +# } +# wpml-name: 766a60ac9e13c76c28bdf714ddecaa25 +#: ../includes/class-ure-lib.php:1662 +msgid "Error is occur. Please check the log file." +msgstr "ארעה שגיאה, אנא בדוק את קובץ היומן." + +# if (!$valid_name || ($valid_name && ($match[0] != $user_role_id))) { // some non-alphanumeric charactes found! +# return __('Error: Role ID must contain latin characters, digits, hyphens or underscore only!', 'ure'); +# } +# wpml-name: f9182094e24a9e2fbb7317b1724a69c9 +#: ../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 "" + +# if (isset($wp_roles->roles[$user_role_id])) { +# return sprintf('Error! ' . __('Role %s exists already', 'ure'), $user_role_id); +# } +# wpml-name: 61b6d86154b5437be56e6565f2820391 +#: ../includes/class-ure-lib.php:1724 +#, php-format +msgid "Role %s exists already" +msgstr "סוג המשתמש %s כבר קיים" + +# if (!isset($result) || empty($result)) { +# $mess = 'Error! ' . __('Error is encountered during new role create operation', 'ure'); +# } else { +# wpml-name: e0618b1a4160611a46b1b95acab0821c +#: ../includes/class-ure-lib.php:1739 +msgid "Error is encountered during new role create operation" +msgstr "ארעה שגיאה בעת יצירת סוג המשתמש החדש" + +# } else { +# $mess = sprintf(__('Role %s is created successfully', 'ure'), $user_role_name); +# } +# wpml-name: 1613afddcbdf86bd48660e5443be00ff +#: ../includes/class-ure-lib.php:1741 +#, php-format +msgid "Role %s is created successfully" +msgstr "סוג המשתמש %s נוצר בהצלחה" + +# if (empty($result)) { +# $mess = 'Error! ' . __('Error encountered during role delete operation', 'ure'); +# } else { +# wpml-name: 5ca27dda122445e597586a22e18088e6 +#: ../includes/class-ure-lib.php:1810 +msgid "Error encountered during role delete operation" +msgstr "ארעה שגיאה במהלך נסיון המחיקה של סוג המשתמש" + +# } else { +# $mess = sprintf(__('Role %s is deleted successfully', 'ure'), $role); +# } +# wpml-name: 53552ec95bc8303219e8c39375763370 +#: ../includes/class-ure-lib.php:1812 +msgid "Unused roles are deleted successfully" +msgstr "" + +# } else { +# $mess = sprintf(__('Role %s is deleted successfully', 'ure'), $role); +# } +# wpml-name: 53552ec95bc8303219e8c39375763370 +#: ../includes/class-ure-lib.php:1814 +#, php-format +msgid "Role %s is deleted successfully" +msgstr "סוג המשתמש %s נמחק בהצלחה" + +# unset($_POST['user_role_id']); +# $errorMessage = 'Error! ' . __('Error encountered during default role change operation', 'ure'); +# if (isset($wp_roles->role_objects[$user_role_id]) && $user_role_id !== 'administrator') { +# wpml-name: b64bfe4842bc0638b79a24687976394e +#: ../includes/class-ure-lib.php:1839 +msgid "Error encountered during default role change operation" +msgstr "ארעה שגיאה בעת הנסיון לשנות את סוג משתמש ברירת מחדל" + +# } else { +# $mess = sprintf(__('Default role for new users is set to %s successfully', 'ure'), $wp_roles->role_names[$user_role_id]); +# } +# wpml-name: 94978d82edc73eba0f44bc7bceb299f4 +#: ../includes/class-ure-lib.php:1845 +#, php-format +msgid "Default role for new users is set to %s successfully" +msgstr "סוג המשתמש %s נקבע כברירת מחדל" + +# // Standard WordPress roles +# __('Editor', 'ure'); +# __('Author', 'ure'); +# wpml-name: 344a7f427fb765610ef96eb7bce95257 +#: ../includes/class-ure-lib.php:1864 +msgid "Editor" +msgstr "עורך" + +# __('Editor', 'ure'); +# __('Author', 'ure'); +# __('Contributor', 'ure'); +# wpml-name: a517747c3d12f99244ae598910d979c5 +#: ../includes/class-ure-lib.php:1865 +msgid "Author" +msgstr "כותב" + +# __('Author', 'ure'); +# __('Contributor', 'ure'); +# __('Subscriber', 'ure'); +# wpml-name: 23d21ad4dea7aadf907e5e601b1905e6 +#: ../includes/class-ure-lib.php:1866 +msgid "Contributor" +msgstr "תורם" + +# __('Contributor', 'ure'); +# __('Subscriber', 'ure'); +# // Standard WordPress capabilities +# wpml-name: 992c4a5b4628d8ebf671cf460254ee81 +#: ../includes/class-ure-lib.php:1867 +msgid "Subscriber" +msgstr "מנוי" + +# // Standard WordPress capabilities +# __('Switch themes', 'ure'); +# __('Edit themes', 'ure'); +# wpml-name: 87d980c0c79638536655ce7fa0a4b85d +#: ../includes/class-ure-lib.php:1869 +msgid "Switch themes" +msgstr "החלפת תבניות" + +# __('Switch themes', 'ure'); +# __('Edit themes', 'ure'); +# __('Activate plugins', 'ure'); +# wpml-name: 8395d1904c778ee1b2762e07a6a03878 +#: ../includes/class-ure-lib.php:1870 +msgid "Edit themes" +msgstr "עריכת תבניות" + +# __('Edit themes', 'ure'); +# __('Activate plugins', 'ure'); +# __('Edit plugins', 'ure'); +# wpml-name: c38bc47406355ef06ad3e10a98505536 +#: ../includes/class-ure-lib.php:1871 +msgid "Activate plugins" +msgstr "הפעלת תוספים" + +# __('Activate plugins', 'ure'); +# __('Edit plugins', 'ure'); +# __('Edit users', 'ure'); +# wpml-name: a6e42eb142c87e881a0d0c92acf4ef9f +#: ../includes/class-ure-lib.php:1872 +msgid "Edit plugins" +msgstr "עריכת תוספים" + +# __('Edit plugins', 'ure'); +# __('Edit users', 'ure'); +# __('Edit files', 'ure'); +# wpml-name: 70118d8574d7c13da8c0a7c2acc0f659 +#: ../includes/class-ure-lib.php:1873 +msgid "Edit users" +msgstr "עריכת משתמשים" + +# __('Edit users', 'ure'); +# __('Edit files', 'ure'); +# __('Manage options', 'ure'); +# wpml-name: 91c6e7a54b91cdc161f71958c597ed11 +#: ../includes/class-ure-lib.php:1874 +msgid "Edit files" +msgstr "עריכת קבצים" + +# __('Edit files', 'ure'); +# __('Manage options', 'ure'); +# __('Moderate comments', 'ure'); +# wpml-name: 9f285ad90d3e9f5122241f2e8abd3836 +#: ../includes/class-ure-lib.php:1875 +msgid "Manage options" +msgstr "ניהול אפשרויות אתר" + +# __('Manage options', 'ure'); +# __('Moderate comments', 'ure'); +# __('Manage categories', 'ure'); +# wpml-name: abb293cb5d17f4acca429ea13d74c593 +#: ../includes/class-ure-lib.php:1876 +msgid "Moderate comments" +msgstr "ניהול תגובות" + +# __('Moderate comments', 'ure'); +# __('Manage categories', 'ure'); +# __('Manage links', 'ure'); +# wpml-name: 74c12b9adae95b65772e8c9c9c8e5af3 +#: ../includes/class-ure-lib.php:1877 +msgid "Manage categories" +msgstr "ניהול קטגוריות" + +# __('Manage categories', 'ure'); +# __('Manage links', 'ure'); +# __('Upload files', 'ure'); +# wpml-name: fa1a08e2a749c9f330c9a8e60cac9cc3 +#: ../includes/class-ure-lib.php:1878 +msgid "Manage links" +msgstr "ניהול קישורים" + +# __('Manage links', 'ure'); +# __('Upload files', 'ure'); +# __('Import', 'ure'); +# wpml-name: c7de86f69db264c3950d8ae46ed2e33f +#: ../includes/class-ure-lib.php:1879 +msgid "Upload files" +msgstr "העלאת קבצים" + +# __('Upload files', 'ure'); +# __('Import', 'ure'); +# __('Unfiltered html', 'ure'); +# wpml-name: 72d6d7a1885885bb55a565fd1070581a +#: ../includes/class-ure-lib.php:1880 +msgid "Import" +msgstr "יבוא" + +# __('Import', 'ure'); +# __('Unfiltered html', 'ure'); +# __('Edit posts', 'ure'); +# wpml-name: fdd95e5640d6d73230b7544ac261457a +#: ../includes/class-ure-lib.php:1881 +msgid "Unfiltered html" +msgstr "עריכת HTML" + +# __('Unfiltered html', 'ure'); +# __('Edit posts', 'ure'); +# __('Edit others posts', 'ure'); +# wpml-name: 9cd92b1d45220e13e5e257f185f3fec3 +#: ../includes/class-ure-lib.php:1882 +msgid "Edit posts" +msgstr "עריכת פוסטים" + +# __('Edit posts', 'ure'); +# __('Edit others posts', 'ure'); +# __('Edit published posts', 'ure'); +# wpml-name: 5fbf3fd2d5fd1e393df2c639fa16dbc9 +#: ../includes/class-ure-lib.php:1883 +msgid "Edit others posts" +msgstr "עריכת פוסטים של אחרים" + +# __('Edit others posts', 'ure'); +# __('Edit published posts', 'ure'); +# __('Publish posts', 'ure'); +# wpml-name: d42efc04e7900de59ed3667c971e9e9d +#: ../includes/class-ure-lib.php:1884 +msgid "Edit published posts" +msgstr "עריכת פוסטים שפורסמו" + +# __('Edit published posts', 'ure'); +# __('Publish posts', 'ure'); +# __('Edit pages', 'ure'); +# wpml-name: 64a4f8f7a855c54e1ca7c910439f5e90 +#: ../includes/class-ure-lib.php:1885 +msgid "Publish posts" +msgstr "פוסטים שפורסמו" + +# __('Publish posts', 'ure'); +# __('Edit pages', 'ure'); +# __('Read', 'ure'); +# wpml-name: e7a51430fa0fbb32587c083ffae4b525 +#: ../includes/class-ure-lib.php:1886 +msgid "Edit pages" +msgstr "עריכת עמודים" + +# __('Edit pages', 'ure'); +# __('Read', 'ure'); +# __('Level 10', 'ure'); +# wpml-name: 7a1a5f3e79fdc91edf2f5ead9d66abb4 +#: ../includes/class-ure-lib.php:1887 +msgid "Read" +msgstr "קורא" + +# __('Read', 'ure'); +# __('Level 10', 'ure'); +# __('Level 9', 'ure'); +# wpml-name: b3ef2f43e2782f8d95a4c22d577cb1bc +#: ../includes/class-ure-lib.php:1888 +msgid "Level 10" +msgstr "דרגה 10" + +# __('Level 10', 'ure'); +# __('Level 9', 'ure'); +# __('Level 8', 'ure'); +# wpml-name: d48252bc9cffec4bed5028a7c71d8196 +#: ../includes/class-ure-lib.php:1889 +msgid "Level 9" +msgstr "דרגה 9" + +# __('Level 9', 'ure'); +# __('Level 8', 'ure'); +# __('Level 7', 'ure'); +# wpml-name: 625fef0c34a92b3685266a47f16c85dd +#: ../includes/class-ure-lib.php:1890 +msgid "Level 8" +msgstr "דרגה 8" + +# __('Level 8', 'ure'); +# __('Level 7', 'ure'); +# __('Level 6', 'ure'); +# wpml-name: a9acd6f427950dc61cac50b4e9ee6bc4 +#: ../includes/class-ure-lib.php:1891 +msgid "Level 7" +msgstr "דרגה 7" + +# __('Level 7', 'ure'); +# __('Level 6', 'ure'); +# __('Level 5', 'ure'); +# wpml-name: b30ce92fb9295725ef29254ba5ae17e1 +#: ../includes/class-ure-lib.php:1892 +msgid "Level 6" +msgstr "דרגה 6" + +# __('Level 6', 'ure'); +# __('Level 5', 'ure'); +# __('Level 4', 'ure'); +# wpml-name: 05988e43e8f2eb5efdddc2b467c4b2f3 +#: ../includes/class-ure-lib.php:1893 +msgid "Level 5" +msgstr "דרגה 5" + +# __('Level 5', 'ure'); +# __('Level 4', 'ure'); +# __('Level 3', 'ure'); +# wpml-name: 309531bbe9a9d3228cd0687ec6e66bed +#: ../includes/class-ure-lib.php:1894 +msgid "Level 4" +msgstr "דרגה 4" + +# __('Level 4', 'ure'); +# __('Level 3', 'ure'); +# __('Level 2', 'ure'); +# wpml-name: 8f60a63315c55e659b1a2dd5064ceae8 +#: ../includes/class-ure-lib.php:1895 +msgid "Level 3" +msgstr "דרגה 3" + +# __('Level 3', 'ure'); +# __('Level 2', 'ure'); +# __('Level 1', 'ure'); +# wpml-name: 228e9da47384bacde793a2b78d488bb0 +#: ../includes/class-ure-lib.php:1896 +msgid "Level 2" +msgstr "דרגה 2" + +# __('Level 2', 'ure'); +# __('Level 1', 'ure'); +# __('Level 0', 'ure'); +# wpml-name: 5afaf1679ad0887adebaddb40e0bd3f7 +#: ../includes/class-ure-lib.php:1897 +msgid "Level 1" +msgstr "דרגה 1" + +# __('Level 1', 'ure'); +# __('Level 0', 'ure'); +# __('Edit others pages', 'ure'); +# wpml-name: 057e95a59e032dbed970592dd1245092 +#: ../includes/class-ure-lib.php:1898 +msgid "Level 0" +msgstr "דרגה 0" + +# __('Level 0', 'ure'); +# __('Edit others pages', 'ure'); +# __('Edit published pages', 'ure'); +# wpml-name: b10af907824940fe6a5aa0a77c62be6f +#: ../includes/class-ure-lib.php:1899 +msgid "Edit others pages" +msgstr "עריכת דפים של אחרים" + +# __('Edit others pages', 'ure'); +# __('Edit published pages', 'ure'); +# __('Publish pages', 'ure'); +# wpml-name: c5bfc24b0b891c9465134b83b2c6c259 +#: ../includes/class-ure-lib.php:1900 +msgid "Edit published pages" +msgstr "עריכת דפים שפורסמו" + +# __('Edit published pages', 'ure'); +# __('Publish pages', 'ure'); +# __('Delete pages', 'ure'); +# wpml-name: 70d789f104acf7aa83b1c5ab230f8e7c +#: ../includes/class-ure-lib.php:1901 +msgid "Publish pages" +msgstr "פרסום דפים" + +# __('Publish pages', 'ure'); +# __('Delete pages', 'ure'); +# __('Delete others pages', 'ure'); +# wpml-name: b665a2b3cb33c08decc52b8a3f3d1742 +#: ../includes/class-ure-lib.php:1902 +msgid "Delete pages" +msgstr "מחיקת דפים" + +# __('Delete pages', 'ure'); +# __('Delete others pages', 'ure'); +# __('Delete published pages', 'ure'); +# wpml-name: 23eaa8e106fde2a76d80bc907f55ab7e +#: ../includes/class-ure-lib.php:1903 +msgid "Delete others pages" +msgstr "מחיקת דפים של אחרים" + +# __('Delete others pages', 'ure'); +# __('Delete published pages', 'ure'); +# __('Delete posts', 'ure'); +# wpml-name: 75c6bfee9157bbc48bfc4d50baab89e0 +#: ../includes/class-ure-lib.php:1904 +msgid "Delete published pages" +msgstr "מחיקת דפים שפורסמו" + +# __('Delete published pages', 'ure'); +# __('Delete posts', 'ure'); +# __('Delete others posts', 'ure'); +# wpml-name: 3dce6f688c85f06c63224b5c3be13919 +#: ../includes/class-ure-lib.php:1905 +msgid "Delete posts" +msgstr "מחיקת פוסטים" + +# __('Delete posts', 'ure'); +# __('Delete others posts', 'ure'); +# __('Delete published posts', 'ure'); +# wpml-name: c0496287732814df690c8966027a58d6 +#: ../includes/class-ure-lib.php:1906 +msgid "Delete others posts" +msgstr "מחיקת פוסטים של אחרים" + +# __('Delete others posts', 'ure'); +# __('Delete published posts', 'ure'); +# __('Delete private posts', 'ure'); +# wpml-name: b0a2d2039494d73f81f4e476bfda24da +#: ../includes/class-ure-lib.php:1907 +msgid "Delete published posts" +msgstr "מחיקת פוסטים שפורסמו" + +# __('Delete published posts', 'ure'); +# __('Delete private posts', 'ure'); +# __('Edit private posts', 'ure'); +# wpml-name: dcd02c374764e49b36f0f959cc2917bb +#: ../includes/class-ure-lib.php:1908 +msgid "Delete private posts" +msgstr "מחיקת פוסטים פרטיים" + +# __('Delete private posts', 'ure'); +# __('Edit private posts', 'ure'); +# __('Read private posts', 'ure'); +# wpml-name: da9ee842794f7caf9fa32271073d5f7a +#: ../includes/class-ure-lib.php:1909 +msgid "Edit private posts" +msgstr "עריכת פוסטים פרטיים" + +# __('Edit private posts', 'ure'); +# __('Read private posts', 'ure'); +# __('Delete private pages', 'ure'); +# wpml-name: eab0355307288f6480f8c53a0d953d79 +#: ../includes/class-ure-lib.php:1910 +msgid "Read private posts" +msgstr "קריאת פוסטים פרטיים" + +# __('Read private posts', 'ure'); +# __('Delete private pages', 'ure'); +# __('Edit private pages', 'ure'); +# wpml-name: 2136c12e2beeadfe0da80a36ef967eca +#: ../includes/class-ure-lib.php:1911 +msgid "Delete private pages" +msgstr "מחיקת עמודים פרטיים" + +# __('Delete private pages', 'ure'); +# __('Edit private pages', 'ure'); +# __('Read private pages', 'ure'); +# wpml-name: 4f3859ba470cb61f22a600a93c4ce11f +#: ../includes/class-ure-lib.php:1912 +msgid "Edit private pages" +msgstr "מחיקת עמודים פרטיים" + +# __('Edit private pages', 'ure'); +# __('Read private pages', 'ure'); +# __('Delete users', 'ure'); +# wpml-name: 5faa3f2e9585e107dc5f23748a825882 +#: ../includes/class-ure-lib.php:1913 +msgid "Read private pages" +msgstr "קריאת עמודים פרטיים" + +# __('Read private pages', 'ure'); +# __('Delete users', 'ure'); +# __('Create users', 'ure'); +# wpml-name: 61c484c7f1638a9dd4237cb666b91c1f +#: ../includes/class-ure-lib.php:1914 +msgid "Delete users" +msgstr "מחיקת משתמשים" + +# __('Delete users', 'ure'); +# __('Create users', 'ure'); +# __('Unfiltered upload', 'ure'); +# wpml-name: 6cf6d76fc00f8dd12af98a37d11f623e +#: ../includes/class-ure-lib.php:1915 +msgid "Create users" +msgstr "יצירת משתמשים" + +# __('Create users', 'ure'); +# __('Unfiltered upload', 'ure'); +# __('Edit dashboard', 'ure'); +# wpml-name: 7110d42a34cbb3316d6d0c658fa34c86 +#: ../includes/class-ure-lib.php:1916 +msgid "Unfiltered upload" +msgstr "העלאת קבצים חופשית" + +# __('Unfiltered upload', 'ure'); +# __('Edit dashboard', 'ure'); +# __('Update plugins', 'ure'); +# wpml-name: b5577d27ebfdd60a3bda83ae726d574b +#: ../includes/class-ure-lib.php:1917 +msgid "Edit dashboard" +msgstr "שינוי לוח הבקרה" + +# __('Edit dashboard', 'ure'); +# __('Update plugins', 'ure'); +# __('Delete plugins', 'ure'); +# wpml-name: 23c5b17dc24e40fa47ca6588932d32f7 +#: ../includes/class-ure-lib.php:1918 +msgid "Update plugins" +msgstr "עדכון תוספים" + +# __('Update plugins', 'ure'); +# __('Delete plugins', 'ure'); +# __('Install plugins', 'ure'); +# wpml-name: f2a839940dae3934317d8d6a6f647ebd +#: ../includes/class-ure-lib.php:1919 +msgid "Delete plugins" +msgstr "מחיקת תוספים" + +# __('Delete plugins', 'ure'); +# __('Install plugins', 'ure'); +# __('Update themes', 'ure'); +# wpml-name: 9d06472988c53bfc768bc7b6a788b697 +#: ../includes/class-ure-lib.php:1920 +msgid "Install plugins" +msgstr "התקנת תוספים" + +# __('Install plugins', 'ure'); +# __('Update themes', 'ure'); +# __('Install themes', 'ure'); +# wpml-name: 504ea4a27260ac1e8822c5877ffe526b +#: ../includes/class-ure-lib.php:1921 +msgid "Update themes" +msgstr "עדכון תבניות" + +# __('Update themes', 'ure'); +# __('Install themes', 'ure'); +# __('Update core', 'ure'); +# wpml-name: a7d67fb17876569a4590902d3566a6fd +#: ../includes/class-ure-lib.php:1922 +msgid "Install themes" +msgstr "התקנת תבניות חדשות" + +# __('Install themes', 'ure'); +# __('Update core', 'ure'); +# __('List users', 'ure'); +# wpml-name: e56e5b87db548cd42be7a8a0f916205d +#: ../includes/class-ure-lib.php:1923 +msgid "Update core" +msgstr "עדכון וורדפרס" + +# __('Update core', 'ure'); +# __('List users', 'ure'); +# __('Remove users', 'ure'); +# wpml-name: f923f903857a5387d3db70494e074632 +#: ../includes/class-ure-lib.php:1924 +msgid "List users" +msgstr "בצפייה במשתמשים" + +# __('List users', 'ure'); +# __('Remove users', 'ure'); +# __('Add users', 'ure'); +# wpml-name: 8c7e9f2dfcd0125922dfbce36a1a4c2a +#: ../includes/class-ure-lib.php:1925 +msgid "Remove users" +msgstr "הסרת משתמשים" + +# __('Remove users', 'ure'); +# __('Add users', 'ure'); +# __('Promote users', 'ure'); +# wpml-name: 3bf6330f5f4c7c3dfddc9670cfaf4a22 +#: ../includes/class-ure-lib.php:1926 +msgid "Add users" +msgstr "הוספת משתמשים" + +# __('Add users', 'ure'); +# __('Promote users', 'ure'); +# __('Edit theme options', 'ure'); +# wpml-name: 12f4ba95cdfd04b791820b9c20887913 +#: ../includes/class-ure-lib.php:1927 +msgid "Promote users" +msgstr "שינוי משתמשים" + +# __('Promote users', 'ure'); +# __('Edit theme options', 'ure'); +# __('Delete themes', 'ure'); +# wpml-name: 8841974497684dad4d55beaf2b6c52ef +#: ../includes/class-ure-lib.php:1928 +msgid "Edit theme options" +msgstr "עריכת אפשרויות התבנית" + +# __('Edit theme options', 'ure'); +# __('Delete themes', 'ure'); +# __('Export', 'ure'); +# wpml-name: 335e9dea5f21dc3f591f3aceefdeed54 +#: ../includes/class-ure-lib.php:1929 +msgid "Delete themes" +msgstr "מחיקת תבניות" + +# __('Delete themes', 'ure'); +# __('Export', 'ure'); +# } +# wpml-name: 0095a9fa74d1713e43e370a7d7846224 +#: ../includes/class-ure-lib.php:1930 +msgid "Export" +msgstr "ייצוא תוכן" + +# if (!$valid_name || ($valid_name && ($match[0] != $user_capability))) { // some non-alphanumeric charactes found! +# return 'Error! ' . __('Error: Capability name must contain latin characters and digits only!', 'ure'); +# ; +# wpml-name: 03766b9586d3012af6fc788e85d39530 +#: ../includes/class-ure-lib.php:2040 +msgid "Error: Capability name must contain latin characters and digits only!" +msgstr "שגיאה! שם יכולת חייב להכיל אותיות באנגלית וספרות בלבד" + +# $wp_roles->add_cap('administrator', $user_capability); +# $mess = sprintf(__('Capability %s is added successfully', 'ure'), $user_capability); +# } else { +# wpml-name: 6dcaae98207ba2673da987515b02fe31 +#: ../includes/class-ure-lib.php:2053 +#, php-format +msgid "Capability %s is added successfully" +msgstr "היכולת %s נוספה בהצלחה" + +# } else { +# $mess = sprintf('Error! ' . __('Capability %s exists already', 'ure'), $user_capability); +# } +# wpml-name: d5c1ec0556aadfa88cadffb62266b83d +#: ../includes/class-ure-lib.php:2055 +#, php-format +msgid "Capability %s exists already" +msgstr "כבר קיימת יכולת בשם %s" + +# if (!is_array($caps_to_remove) || count($caps_to_remove) == 0 || !isset($caps_to_remove[$capability_id])) { +# return sprintf(__('Error! You do not have permission to delete this capability: %s!', 'ure'), $capability_id); +# } +# wpml-name: 0e132e68574d9609d956f9be409f7384 +#: ../includes/class-ure-lib.php:2080 +#, php-format +msgid "Error! You do not have permission to delete this capability: %s!" +msgstr "שגיאה! אין לך הרשאה למחוק את היכולת %s" + +# +# $mess = sprintf(__('Capability %s is removed successfully', 'ure'), $capability_id); +# } +# wpml-name: d819128cbb44d0e2fe4eb8b8b6397871 +#: ../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 "" + +# ?> +# +# +# wpml-name: b63bc6c033363c8ee66beaf4ea4d5bc3 +#: ../includes/class-ure-lib.php:2204 +msgid "Author's website" +msgstr "אתר היוצר" + +# +# +# +# wpml-name: f919d1248270e1eca5cc6a39253264f7 +#: ../includes/class-ure-lib.php:2205 +msgid "Plugin webpage" +msgstr "דף התוסף" + +# +# +# +# wpml-name: f919d1248270e1eca5cc6a39253264f7 +#: ../includes/class-ure-lib.php:2206 +#, fuzzy +msgid "Plugin download" +msgstr "דף התוסף" + +# +# +# role_to_copy_html = ''; +# wpml-name: 6adf97f83acf6453d4a6a4b1070f3754 +#: ../includes/class-ure-lib.php:2256 +msgid "None" +msgstr "תרום" + +# +# +# +# wpml-name: 7aa3fd37413ab803143d28fcc65287cf +#: ../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 "" + +# if (is_multisite() && is_super_admin($this->user_to_edit->ID)) { +# $user_info .= ' '. esc_html__('Network Super Admin', 'ure') .''; +# } +# wpml-name: 5213962fd38769a637909d6bc2a37197 +#: ../includes/ure-user-edit.php:31 +msgid "Network Super Admin" +msgstr "מנהל-על של רשת" + +# +# $this->display_box_start(__('Change capabilities for user', 'ure').$user_info, 'min-width:830px;'); +# +# wpml-name: 3c4a4bfb7afa015a22eee9e5b9b098e2 +#: ../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 "" + +# +# +# +# wpml-name: a5f40dc2b5f2552187d0326e77e267eb +#: ../includes/ure-user-edit.php:91 +#, fuzzy +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 "" + +# +# +# +# wpml-name: 4bc50461b16d09d4cea688ef6c286c6f +#: ../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 "" diff --git a/wp-content/plugins/user-role-editor/lang/ure-id_ID.mo b/wp-content/plugins/user-role-editor/lang/ure-id_ID.mo new file mode 100644 index 0000000..c2850d3 Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-id_ID.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-id_ID.po b/wp-content/plugins/user-role-editor/lang/ure-id_ID.po new file mode 100644 index 0000000..9347e6e --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-id_ID.po @@ -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 \n" +"Language-Team: http://al-badar.net \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:" diff --git a/wp-content/plugins/user-role-editor/lang/ure-ru_RU.mo b/wp-content/plugins/user-role-editor/lang/ure-ru_RU.mo new file mode 100644 index 0000000..1da1f6a Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-ru_RU.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-ru_RU.po b/wp-content/plugins/user-role-editor/lang/ure-ru_RU.po new file mode 100644 index 0000000..3577205 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-ru_RU.po @@ -0,0 +1,1529 @@ +msgid "" +msgstr "" +"Project-Id-Version: User Role Editor v.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 \n" +"Language-Team: ShinePHP.com \n" +"Language: ru_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\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 "" +"Заметка для WordPress с несколькими сайтами: учтите, что для присвоения " +"вновь зарегистрированному пользователю дополнительных ролей по-умолчанию эти " +"роли должны существовать на этом сайте." + +#: ../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 "Не достаточно прав для работы с User Role Editor" + +#: ../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 "Идентификатор роли (ID) не может быть пустым!" + +#: ../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 "" +"WordPress не поддерживает цифровые идентификаторы ролей. Начните имя роли с " +"латинских символов." + +#: ../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 "" +"ВНИМАНИЕ! Очистка восстановит роли по состоянию на момент установки " +"WordPress." + +#: ../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 "" +"Если плагины изменяли пользовательские права после установки WordPress " +"(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 "Идентификатор возможности (ID) не может быть пустым!" + +#: ../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 "Идентификатор роли (ID):" + +#: ../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 "Идентификатор (ID):" + +#: ../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 "" +"Ошибка: идентификатор роли (ID) должен содержать только латинские буквы, " +"цифры, знак подчеркивания и дефис." + +#: ../includes/class-ure-lib.php:1709 +msgid "" +"Error: WordPress does not support numeric Role name (ID). Add latin " +"characters to it." +msgstr "" +"Ошибка: WordPress не поддерживает цифровые идентификаторы ролей. Начните имя " +"роли с латинских символов." + +#: ../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 "html без фильтра" + +#: ../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 "Уровень 10" + +#: ../includes/class-ure-lib.php:1889 +msgid "Level 9" +msgstr "Уровень 9" + +#: ../includes/class-ure-lib.php:1890 +msgid "Level 8" +msgstr "Уровень 9" + +#: ../includes/class-ure-lib.php:1891 +msgid "Level 7" +msgstr "Уровень 7" + +#: ../includes/class-ure-lib.php:1892 +msgid "Level 6" +msgstr "Уровень 6" + +#: ../includes/class-ure-lib.php:1893 +msgid "Level 5" +msgstr "Уровень 5" + +#: ../includes/class-ure-lib.php:1894 +msgid "Level 4" +msgstr "Уровень 4" + +#: ../includes/class-ure-lib.php:1895 +msgid "Level 3" +msgstr "Уровень 3" + +#: ../includes/class-ure-lib.php:1896 +msgid "Level 2" +msgstr "Уровень 2" + +#: ../includes/class-ure-lib.php:1897 +msgid "Level 1" +msgstr "Уровень 1" + +#: ../includes/class-ure-lib.php:1898 +msgid "Level 0" +msgstr "Уровень 0" + +#: ../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 "Роль bbPress:" + +#: ../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_other_posts\") в более читабельную " +"(\"Edit other 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 "" +"Права пользователей типа \"level_0\", \"level_1\" и т.п. устарели и больше " +"не используются WordPress. Они оставлены в ролях пользователей только для " +"обеспечения совместимости со старыми темами и плагинами. Включение данной " +"опции покажет все устаревшие права пользователей." + +#: ../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 "" +"Только супер-администратор может создавать, изменять и удалять пользователей " +"в многосайтовой сети WordPress. Включите эту опцию, чтобы отменить это " +"ограничение" + +#~ msgid "About this Plugin:" +#~ msgstr "Об этом плагине" + +#~ 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 "" +#~ "Вернуть роли в начальное состояние. Будьте осторожны, все изменения в " +#~ "ролях, сделанные темой и плагинами, будут потеряны, необходимо будет " +#~ "активировать заново некоторые плагины, например S2Member, WooCommerce. " +#~ "Продолжить?" + +#~ msgid "Only" +#~ msgstr "Только" + +#~ msgid "is allowed to use" +#~ msgstr "разрешено использовать" + +#~ msgid "User" +#~ msgstr "Пользователь" + +#~ msgid "Import Roles" +#~ msgstr "Импорт Ролей" + +#~ msgid "Select file with roles data" +#~ msgstr "Выберите файл, с данными роли" + +#~ msgid "Select file with roles: " +#~ msgstr "Выбери файл с ролями:" + +#~ msgid "File upload error. Try again later" +#~ msgstr "Ошибка загрузки файла. Попробуйте ещё раз позже" + +#~ msgid "Roles are imported successfully" +#~ msgstr "Роли импортированы успешно" + +#~ msgid "Roles import is failed" +#~ msgstr "При импорте ролей произошла ошибка" + +#, fuzzy +#~ msgid "User Role Editor requires PHP %s or newer." +#~ msgstr "Редактор ролей пользователей требует PHP 5.0 или выше." + +#~ msgid "Please update!" +#~ msgstr "Пожалуйста, обновите!" + +#, fuzzy +#~ msgid "User Role Editor requires WordPress %s or newer." +#~ msgstr "Редактор ролей пользователей требует WordPress 3.0 или выше." + +#~ msgid "Backup record is created for the current role capabilities" +#~ msgstr "" +#~ "Для текущего распределения возможностей по ролям создана резервная копия" + +#~ msgid "Database operation error. Check log file." +#~ msgstr "Ошибка работы с базой данных. Проверьте лог-файл." + +#~ msgid "" +#~ "No backup data. It is created automatically before the first role data " +#~ "update." +#~ msgstr "" +#~ "Нет резервной копии. Она создается автоматически перед первым изменением " +#~ "ролей." + +#~ msgid " Name must contain latin characters and digits only!" +#~ msgstr " Наименование должно содержать только латинские буквы и цифры." + +#~ msgid "Change Default Role" +#~ msgstr "Установить как роль по-умолчанию" + +#~ msgid "" +#~ "Restore Roles from backup copy. Be careful, backup was created when you " +#~ "started URE 1st time. All changes you made after that will be lost" +#~ msgstr "" +#~ "Восстановление ролей из резервной копии. Будьте внимательны, копия " +#~ "создана во время первого запуска этого плагина. Все внесенные после этого " +#~ "изменения будут потеряны" + +#~ msgid "Role \"%s\" update: please confirm to continue" +#~ msgstr "Изменение роли \"%s\": пожалуйста, подтвердите продолжение " + +#~ msgid "Save Changes" +#~ msgstr "Сохранить изменения" + +#~ msgid "Cancel not saved changes" +#~ msgstr "Отказ от сохранения изменений" + +#~ msgid "Select All Capabilities" +#~ msgstr "Выбрать все разрешения" + +#~ msgid "Unselect All Capabilities" +#~ msgstr "Исключить все возможности" + +#~ msgid "Turn checked capabilities off and vise versa" +#~ msgstr "Включить исключенные возможности и наоборот" + +#~ msgid "Restore Roles from backup copy" +#~ msgstr "Восстановить Роли из резервной копии" + +#~ msgid "Name: " +#~ msgstr "Имя:" + +#~ msgid "Add" +#~ msgstr "Добавить" + +#~ msgid "Add New User Role" +#~ msgstr "Добавить новую Роль пользователя" + +#~ msgid "Change" +#~ msgstr "Изменить" + +#~ msgid "Remove" +#~ msgstr "Удалить" + +#~ msgid "Remove User Capability" +#~ msgstr "Удалить возможность пользователя" + +#~ msgid "User \"%s\" update: please confirm to continue" +#~ msgstr "" +#~ "Изменение пользователя \"%s\": пожалуйста, подтвердите для продолжения" + +#~ msgid "Role:" +#~ msgstr "Роль:" + +#~ msgid "Add capabilities to this user:" +#~ msgstr "Добавить возможности этому пользователю:" + +#~ msgid "Greetings" +#~ msgstr "Благодарности" + +#~ msgid "Greetings:" +#~ msgstr "Приветствия" + +#~ msgid "It's me, the author" +#~ msgstr "Это я, автор" + +#~ msgid "For the help with Belorussian translation" +#~ msgstr "за помощь с белорусским переводом" + +#~ msgid "For the help with Brasilian translation" +#~ msgstr "за помощь с бразильским переводом" + +#~ msgid "For the help with Brasilian Portuguese translation" +#~ msgstr "за помощь с бразильским переводом" + +#~ msgid "For the help with Chinese translation" +#~ msgstr "за помощь с китайским переводом" + +#~ msgid "For the help with Dutch translation" +#~ msgstr "за помощь с датским переводом" + +#~ msgid "For the help with Finnish translation" +#~ msgstr "за помощь с финским переводом" + +#~ msgid "For the help with French translation" +#~ msgstr "за помощь с французским переводом" + +#~ msgid "For the help with German translation" +#~ msgstr "за помощь с немецким переводом" + +#~ msgid "For the help with Hebrew translation" +#~ msgstr "за помощь с переводом на иврит" + +#~ msgid "For the help with Hindi translation" +#~ msgstr "за помощь с индийским (Хинди) переводом" + +#~ msgid "For the help with Hungarian translation" +#~ msgstr "за помощь с венгерским переводом" + +#~ msgid "For the help with Italian translation" +#~ msgstr "за помощь с итальянским переводом" + +#~ msgid "For the help with Japanese translation" +#~ msgstr "за помощь с японским переводом" + +#~ msgid "For the help with Lithuanian translation" +#~ msgstr "за помощь с литовским переводом" + +#~ msgid "For the help with Persian translation" +#~ msgstr "за помощь с переводом на иранский" + +#~ msgid "For the help with Polish translation" +#~ msgstr "за помощь с польским переводом" + +#~ msgid "For the help with Spanish translation" +#~ msgstr "за помощь с испанским переводом" + +#~ msgid "For the updated Swedish translation" +#~ msgstr "за помощь со шведским переводом" + +#~ msgid "For the help with Swedish translation" +#~ msgstr "за помощь со шведским переводом" + +#~ msgid "For the help with Turkish translation" +#~ msgstr "за помощь с турецким переводом" + +#~ msgid "For the code to hide administrator role" +#~ msgstr "За код, скрывающий роль администратора" + +#~ msgid "For the code enhancement suggestion" +#~ msgstr "За предложения по улучшению кода" + +#~ msgid "" +#~ "Do you wish to see your name with link to your site here? You are " +#~ "welcome! Your help with translation and new ideas are very appreciated." +#~ msgstr "" +#~ "Желаете увидеть свое имя и ссылку на Ваш сайт здесь? Добро пожаловать! " +#~ "Ваша помощь с переводом и новые идеи приветствуются." + +#~ msgid "Donate" +#~ msgstr "Поддержать" + +#~ msgid "Roles list reading error is encountered" +#~ msgstr "Ошибка чтения списка ролей!" + +#~ msgid "More plugins from" +#~ msgstr "Ещё плагины от" + +#~ msgid "No items found." +#~ msgstr "Ничего не найдено." + +#~ msgid "Recent Posts:" +#~ msgstr "Последние статьи:" + +#~ msgid "Return to default WordPress user role capabilities" +#~ msgstr "Вернуться к исходному состоянию ролей WordPress" + +#~ msgid "Role Name must be just a single word without special characters!" +#~ msgstr "Наименование роли - одно слово без специальных символов! " + +#~ msgid "action" +#~ msgstr "операции" + +#~ msgid "Please confirm to continue role \"" +#~ msgstr "Пожалуйста подтвердите продолжение для роли" + +#~ msgid "Silence Is Golden Guard Plugin" +#~ msgstr "Silence Is Golden Guard плагин" + +#~ msgid "file open error" +#~ msgstr "ошибка открытия файла" + +#~ msgid "file read error" +#~ msgstr "ошибка чтения файла" + +#~ msgid "file close error" +#~ msgstr "ошибка при закрытии файла" + +#~ msgid "file backup copy error" +#~ msgstr "ошибка при создании резервной копии файла" + +#~ msgid "file permissions change error" +#~ msgstr "ошибка при изменении прав на файл" + +#~ msgid "file write error" +#~ msgstr "ошибка записи в файл" + +#~ msgid "is modified" +#~ msgstr "изменен" + +#~ msgid "file create error" +#~ msgstr "ошибка создания файла" + +#~ msgid "permissions change error" +#~ msgstr "ошибка при изменении прав" + +#~ msgid "file is created" +#~ msgstr "файл создан" + +#~ msgid "\"Silence is Golden\" Scan is finished: " +#~ msgstr "\"Silence is Golden\" сканирование завершено: " + +#~ msgid "Does not create index.php file in the checked folders" +#~ msgstr "Не создавать index.php файл в отмеченных каталогах" + +#~ msgid "Exclude Folders for index.php" +#~ msgstr "Исключить Каталоги для index.php" + +#~ msgid "Modify Apache .htaccess" +#~ msgstr "Изменить Apache .htaccess" + +#~ msgid "" +#~ "Modify Apache .htaccess file in the site root folder. Add \"Options -" +#~ "Indexes\" line to prevent directory listing by Apache Web server.\n" +#~ " If it is turned on (+Indexes) or absent, then if a " +#~ "URL which maps to a directory is requested, and there is no " +#~ "DirectoryIndex (e.g., index.html or index.php) file in that directory, " +#~ "then Web server will return a formatted listing of the directory." +#~ msgstr "" +#~ "Изменить файл Apache .htaccess в корневом каталоге сайта. Добавить строку " +#~ "\"Options -Indexes\", чтобы исключить листинг содержимого катлогов Web " +#~ "сервером Apache.\n" +#~ "Если опция включена (+Indexes) или отсутствует, тогда, если " +#~ "запроашивается адрес URL, соответствующий каталогу, и в этом каталоге " +#~ "отстутсвует файл типа DirectoryIndex (т.е. index.html или index.php), " +#~ "тогда Web сервер вернёт отформатированный листин этого каталога." + +#~ msgid "Check folders state automatically with specified period" +#~ msgstr "Проверять состояние каталогов автоматически с заданным периодом" + +#~ msgid "Auto Monitor" +#~ msgstr "Авто Мониторинг" + +#~ msgid "Scan Now" +#~ msgstr "Сканировать Сейчас" + +#~ msgid "Scan and Fix directories listing related problems Now" +#~ msgstr "" +#~ "Сканировать и Исправлять проблемы, связанные с листингом содержимого " +#~ "каталогов" + +#~ msgid "" +#~ "Every time a new visitor clicks the \"Thank you\" button, one point is " +#~ "added to the total \"thanks\" counter for this post." +#~ msgstr "" +#~ "Каждый раз, когда новый посетитель щелкает по кнопке \"Спасибо\", единица " +#~ "добавляется к счетчику благодарностей для данной статьи." + +#~ msgid "Thank You Counter Button Plugin" +#~ msgstr "Установки для плагина: Кнопка подсчета благодарностей" + +#~ msgid "Statistics" +#~ msgstr "Статистика" + +#~ msgid "You left “Thanks” already for this post" +#~ msgstr "Вы уже оставили благодарность за эту статью" + +#~ msgid "Click to left “Thanks” for this post" +#~ msgstr "Щелкните мышью, чтобы оставить благодарность за эту статью" + +#~ msgid "View statistics details for \"%s\"" +#~ msgstr "Просмотр детализированной статистики для \"%s\"" + +#~ msgid "Hide these shortcuts" +#~ msgstr "Скрыть ссылки доступа к установкам и статистике плагина" + +#~ msgid "Do you really want to hide these shortcuts?" +#~ msgstr "Вы действительно хотите скрыть эти ссылки?" + +#~ msgid "Thank You" +#~ msgstr "Спасибо" + +#~ msgid "operation is prohibited" +#~ msgstr "операция запрещена" + +#~ msgid "Default Settings are restored" +#~ msgstr "Установки по-умолчанию восстановлены" + +#~ msgid "All Thanks Counters are cleared" +#~ msgstr "Все счётчики благодраностей обнулены" + +#~ msgid "Additional documentation" +#~ msgstr "Дополнительная документация" + +#~ msgid "" +#~ "for the help with Spanish translation, ideas and new versions testing" +#~ msgstr "за помощь с испанским переводом, идеи и тестирование новых версий" + +#~ msgid "for the excelent JQuery color picker" +#~ msgstr "за отличный JQuery-плагин для работы с цветовой палитрой" + +#~ msgid "" +#~ "for the help with French translation, ideas, source code contributions " +#~ "and new versions testing" +#~ msgstr "" +#~ "за помощь с французским переводом, идеи, вклад в разработку и " +#~ "тестирование новых версий" + +#~ msgid "for setting page layout idea and html markup examples" +#~ msgstr "за идею по компоновке экрана с опциями и примеры HTML разметки" + +#~ msgid "for the form input slider code" +#~ msgstr "за код слайдера для текстового поля input HTML формы" + +#~ msgid "for the cute online button image generator" +#~ msgstr "за прекрасный онлайновый генератор изображений кнопок" + +#~ msgid "" +#~ "All settings for TYCB plugin will be return to the default values, " +#~ "Continue?" +#~ msgstr "" +#~ "Всем установкам для TYCB плагина будут возвращены значения по-умолчанию, " +#~ "Продолжить?" + +#~ msgid "" +#~ "All thanks counters for all posts will be set to 0,\\n all thanks click " +#~ "history will be cleared, Continue?" +#~ msgstr "" +#~ "Все счетчики благодарностей для всех статей будут обнулены,\\n вся " +#~ "история кликов по кнопкам благодарности будет обнулена, Продолжить?" + +#~ msgid "Display" +#~ msgstr "Отображение" + +#~ msgid "Display button at Pages" +#~ msgstr "Отображать на Страницах" + +#~ msgid "Display button at Home page, Categories/Tags archive pages" +#~ msgstr "Отображать на Домашней странице, архивах категорий/тэгов" + +#~ msgid "Do not show button for selected categories" +#~ msgstr "Не отображать кнопку для отмеченных категорий" + +#~ msgid "Position in the Post text" +#~ msgstr "Расположение в статье" + +#~ msgid "Before" +#~ msgstr "До" + +#~ msgid "At first page of multipaged posts only" +#~ msgstr "Только на первой странице многостраничных статей " + +#~ msgid "After" +#~ msgstr "После" + +#~ msgid "At last page of multipaged posts only" +#~ msgstr "Только на последней странице многостраничных статей" + +#~ msgid "Shortcode [thankyou]" +#~ msgstr "Аббревиатура [thankyou]" + +#~ msgid "Manual" +#~ msgstr "Вручную" + +#~ msgid "Button Caption" +#~ msgstr "Надпись на кнопке" + +#~ msgid "Button Styling" +#~ msgstr "Стиль для Кнопки" + +#~ msgid "Add style to the div:" +#~ msgstr "Cтиль для div" + +#~ msgid "e.g.," +#~ msgstr ", например, " + +#~ msgid "to the Caption font:" +#~ msgstr "для шрифта:" + +#~ msgid "font color: " +#~ msgstr "цвет шрифта:" + +#~ msgid "Size" +#~ msgstr "Размер" + +#~ msgid "Normal" +#~ msgstr "Нормальный" + +#~ msgid "Compact" +#~ msgstr "Компактный размер" + +#~ msgid "Form and Color" +#~ msgstr "Форма и Цвет" + +#~ msgid "Custom button image URL" +#~ msgstr "URL изображения собственной кнопки" + +#~ msgid "Width, px" +#~ msgstr "Ширина, px" + +#~ msgid "Height, px" +#~ msgstr "Высота, px" + +#~ msgid "Misc" +#~ msgstr "Разное" + +#~ msgid "Check IP-address" +#~ msgstr "Контролировать IP-адрес" + +#~ msgid "Only one Thanks for post for one IP-address limit" +#~ msgstr "Только одно Спасибо на статью с одного IP-адреса" + +#~ msgid "Time limit:" +#~ msgstr "Ограничение по времени:" + +#~ msgid "Forever" +#~ msgstr "Навсегда" + +#~ msgid "Only for this period" +#~ msgstr "Только на данный промежуток" + +#~ msgid "seconds" +#~ msgstr "секунд" + +#~ msgid "Display settings shortcuts" +#~ msgstr "Вывод служебных ссылок" + +#~ msgid "Add shortcuts next to the buttons for settings quick access" +#~ msgstr "" +#~ "Отобразить служебные ссылки справа от кнопок для быстрого доступа к " +#~ "разделу настроек" + +#~ msgid "Return to Defaults" +#~ msgstr "Вернуть значения по-умолчанию" + +#~ msgid "Restore the default values for all settings" +#~ msgstr "Восстановить значения по-умолчанию для всех установок" + +#~ msgid "Reset Counters" +#~ msgstr "Обнулить Счетчики" + +#~ msgid "Reset all thanks counters for the all posts" +#~ msgstr "Сбросить все счетчики благодарностей для всех статей" + +#~ msgid "Button DIV Style Preview" +#~ msgstr "Стиль для раздела Кнопки" + +#~ msgid "Post Title" +#~ msgstr "Заголовок статьи" + +#~ msgid "Back to main statistics" +#~ msgstr "Вернуться к основной статистике" + +#~ msgid "Not available" +#~ msgstr "Не доступен" + +#~ msgid "Details for “%s”" +#~ msgstr "Подробности для “%s”" + +#~ msgid "Post Id" +#~ msgstr "Id статьи" + +#~ msgid "Thanks Quant" +#~ msgstr "Количество благодарностей" + +#~ msgid "View Post" +#~ msgstr "Просмотр статьи" + +#~ msgid "View \"%s\"" +#~ msgstr "Просмотр \"%s\"" + +#~ msgid "Reset this post counter" +#~ msgstr "Обнулить счетчик для этой статьи" + +#~ msgid "" +#~ "You are about to reset this post '%s' thanks counter. Click 'Cancel' to " +#~ "do nothing, 'OK' to reset it." +#~ msgstr "" +#~ "Вы собираетесь обнулить счетчик этой статьи '%s'.\n" +#~ " Используйте 'Отмена' чтобы отказаться, 'OK' чтобы произвести обнуление." + +#~ msgid "Reset Counter" +#~ msgstr "Обнулить Счетчик" + +#~ msgid "Displaying %s–%s of %s" +#~ msgstr "Вывод %s–%s из %s" + +#~ msgid "IP address" +#~ msgstr "IP-адрес" + +#~ msgid "Last Thank Date" +#~ msgstr "Дата последней благодарности" + +#~ msgid "Look up IP country" +#~ msgstr "Найти страну по IP адресу" + +#~ msgid "Show all post dates" +#~ msgstr "Показать статьи за все даты" + +#~ msgid "Show Posts without Thanks" +#~ msgstr "Показать статьи без благодарностей" + +#~ msgid "Rows per page: " +#~ msgstr "Строк на страницу:" + +#~ msgid "Refresh" +#~ msgstr "Обновить" + +#~ msgid "descending" +#~ msgstr "убывающем" + +#~ msgid "Ascending order" +#~ msgstr "Возрастающий порядок" + +#~ msgid "ascending" +#~ msgstr "возрастающем" + +#~ msgid "Descending order" +#~ msgstr "Убывающий порядок" + +#~ msgid "Click to sort in %s order" +#~ msgstr "Щелкни для сортировки в %s порядке" + +#~ msgid "View details" +#~ msgstr "Просмотр деталей" + +#~ msgid "" +#~ "You are about to reset this post '%s' thanks counter.\n" +#~ " Click 'Cancel' to do nothing, 'OK' to reset it." +#~ msgstr "" +#~ "Вы собираетесь обнулить счетчик этой статьи '%s'.\n" +#~ " Используйте 'Отмена' чтобы отказаться, 'OK' чтобы произвести обнуление." + +#~ msgid "No posts with thanks found" +#~ msgstr "Статьи c благодарностями не найдены" + +#~ msgid "the latest or the most thanked post titles with total thanks quant" +#~ msgstr "" +#~ "Отблагдаренные пооследними статьи с общим количеством благодарностей или " +#~ "статьи с наибольшим количеством благодарностей" + +#~ msgid "Thanks Stat" +#~ msgstr "Статистика благодарностей" + +#~ msgid "Total quant of thanks: " +#~ msgstr "Общее количество благодарностей:" + +#~ msgid "Title:" +#~ msgstr "Заголовок статьи" + +#~ msgid "Number of posts to show:" +#~ msgstr "Количество статей для показа:" + +#~ msgid "What posts to show:" +#~ msgstr "Какие статьи показывать:" + +#~ msgid "Latest thanked" +#~ msgstr "Последние благодарности" + +#~ msgid "Most thanked" +#~ msgstr "Максимум благодарностей" + +#~ msgid "Total quant of thanks" +#~ msgstr "Общее количество благодарностей:" + +#~ msgid "Display total quant of thanks" +#~ msgstr "Показать общее количество благодарностей" + +#~ msgid "Check Full Statistics" +#~ msgstr "Просмотр полной статистики" + +#~ msgid "Plugin author home page" +#~ msgstr "Сайт автора плагина" + +#~ msgid "No thanks yet" +#~ msgstr "Пока благодарностей нет" + +#~ msgid "Posts number to show:" +#~ msgstr "Количество статей для показа:" + +#~ msgid "Display Full Statistics link" +#~ msgstr "Просмотр полной статистики" + +#~ msgid "Display plugin author link" +#~ msgstr "Показать ссылку на сайт автора плагина" + +#~ msgid "Latest Thanks" +#~ msgstr "Последние благодарности" + +#~ msgid "Most Thanked" +#~ msgstr "Максимум благодарностей" + +#~ msgid "Unknown Post!" +#~ msgstr "Неизвестная статья!" + +#~ msgid "Submit" +#~ msgstr "Отправить" + +#~ msgid "Show total quant of thanks" +#~ msgstr "Показать общее количество благодарностей" + +#~ msgid "" +#~ "This plugin installs the Thank You Counter Button for each of your blog " +#~ "post.\n" +#~ " It can have custom style in your blog posts." +#~ msgstr "" +#~ "Этот плагин добавляет кнопку подсчета благодарностей к каждой статье " +#~ "Вашего блога.\n" +#~ " Стиль и расположение кнопки могут быть адаптированы к " +#~ "стилю вашего блога." + +#~ msgid "" +#~ "To exclude Thank You button from particular post use shortcode " +#~ "[nothankyou] there" +#~ msgstr "" +#~ "Чтобы не показывать кнопку Спасибо для конкректной статьи, вставьте в ее " +#~ "текст код [notthankyou]" + +#~ msgid "(at most 15)" +#~ msgstr "(до 15)" + +#~ msgid "Before and After" +#~ msgstr "До и После" + +#~ msgid "Filter" +#~ msgstr "Фильтр" + +#~ msgid "Position" +#~ msgstr "Расположение" + +#~ msgid "Add style to the Thank You button's div, e.g.," +#~ msgstr "Добавить стиль в раздел div кнопки Спасибо" + +#~ msgid "Color" +#~ msgstr "Цвет" + +#~ msgid "Blue" +#~ msgstr "Синий" + +#~ msgid "Green" +#~ msgstr "Зеленый" + +#~ msgid "Grey" +#~ msgstr "Серый" + +#~ msgid "Black" +#~ msgstr "Черный" diff --git a/wp-content/plugins/user-role-editor/lang/ure-tr_TR.mo b/wp-content/plugins/user-role-editor/lang/ure-tr_TR.mo new file mode 100644 index 0000000..ab9dbf1 Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure-tr_TR.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure-tr_TR.po b/wp-content/plugins/user-role-editor/lang/ure-tr_TR.po new file mode 100644 index 0000000..5c4c0a3 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure-tr_TR.po @@ -0,0 +1,1352 @@ +msgid "" +msgstr "" +"Project-Id-Version: user-role-editor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-11 11:20+0700\n" +"PO-Revision-Date: \n" +"Last-Translator: Vladimir Garagulya \n" +"Language-Team: \n" +"Language: tr_TR\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 "Kullanıcı Rol Editörü" + +#: ../includes/settings-template.php:21 +#, fuzzy +msgid "General" +msgstr "Seçenekleri yönetmek" + +#: ../includes/settings-template.php:22 +msgid "Additional Modules" +msgstr "" + +#: ../includes/settings-template.php:23 +#, fuzzy +msgid "Default Roles" +msgstr "Öntanımlı Rol" + +#: ../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 "Yetkileri insan tarafından okunabilir biçimde göster" + +#: ../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 "Önerilmeyen yetenekleri göster" + +#: ../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 +#, fuzzy +msgid "Count users without role" +msgstr "Varsayılan Rolü Değiştir" + +#: ../includes/settings-template.php:111 +#, fuzzy +msgid "Primary default role: " +msgstr "Birincil rol:" + +#: ../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 +#, fuzzy +msgid "Change role for users without role" +msgstr "Varsayılan Rolü Değiştir" + +#: ../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 "Kabiliyetler" + +#: ../includes/class-user-role-editor.php:507 +msgid "Settings" +msgstr "Ayarlar" + +#: ../includes/class-user-role-editor.php:520 +#: ../includes/class-ure-lib.php:2207 +msgid "Changelog" +msgstr "Changelog" + +#: ../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 "Kullanıcı Rol Editörü" + +#: ../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 +#, fuzzy +msgid "Default Roles are updated" +msgstr "Yeni Kullanıcılar için Varsayılan Rol" + +#: ../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 "Tümünü Seç" + +#: ../includes/class-user-role-editor.php:836 +msgid "Unselect All" +msgstr "Seçimi Kaldır" + +#: ../includes/class-user-role-editor.php:837 +msgid "Reverse" +msgstr "Seçimi Tersine Çevir" + +#: ../includes/class-user-role-editor.php:838 +msgid "Update" +msgstr "Güncelle" + +#: ../includes/class-user-role-editor.php:839 +msgid "Please confirm permissions update" +msgstr "İzinleri güncelleştirmek için lütfen onaylayın" + +#: ../includes/class-user-role-editor.php:840 +msgid "Add New Role" +msgstr "Yeni Rol Ekle" + +#: ../includes/class-user-role-editor.php:841 +msgid " Role name (ID) can not be empty!" +msgstr "Ad (ID) boş bırakılamaz!" + +#: ../includes/class-user-role-editor.php:842 +msgid "" +" Role name (ID) must contain latin characters, digits, hyphens or underscore " +"only!" +msgstr "" +"Rol adı (ID) yalnızca latin karakterleri, sayılar, tire veya altçizgiden " +"oluşabilir." + +#: ../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 "Rol Ekle" + +#: ../includes/class-user-role-editor.php:845 +msgid "Delete Role" +msgstr "Rolü Sil" + +#: ../includes/class-user-role-editor.php:846 +msgid "Cancel" +msgstr "İptal" + +#: ../includes/class-user-role-editor.php:847 +msgid "Add Capability" +msgstr "Kabiliyet Ekle" + +#: ../includes/class-user-role-editor.php:848 +#: ../includes/class-user-role-editor.php:857 +msgid "Delete Capability" +msgstr "Kabiliyeti kaldır" + +#: ../includes/class-user-role-editor.php:849 +msgid "Reset" +msgstr "Geri al" + +#: ../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 "Öntanımlı Rol" + +#: ../includes/class-user-role-editor.php:856 +msgid "Set New Default Role" +msgstr "Yeni Öntanımlı Rol Seç" + +#: ../includes/class-user-role-editor.php:858 +msgid "" +"Warning! Be careful - removing critical capability could crash some plugin " +"or other custom code" +msgstr "" +"Uyarı! Dikkatli olun - önemli kabiliyetleri kaldırmak bazı eklentileri veya " +"başka özel kodların bozulmasına sebep olabilir" + +#: ../includes/class-user-role-editor.php:859 +msgid " Capability name (ID) can not be empty!" +msgstr "Ad (ID) boş bırakılamaz!" + +#: ../includes/class-user-role-editor.php:860 +msgid "" +" Capability name (ID) must contain latin characters, digits, hyphens or " +"underscore only!" +msgstr "" +"Kabiliyet adı (ID) yalnızca latin karakterleri, sayılar, tire veya " +"altçizgiden oluşabilir." + +#: ../includes/class-user-role-editor.php:893 +#: ../includes/class-user-role-editor.php:922 +msgid "Other Roles" +msgstr "Diğer Roller" + +#: ../includes/class-user-role-editor.php:904 +msgid "Edit" +msgstr "Düzenle" + +#: ../includes/ure-role-edit.php:17 +#, fuzzy +msgid "Select Role and change its capabilities:" +msgstr "Rolü seçin ve rolün yetki listesini değiştirin" + +#: ../includes/ure-role-edit.php:30 ../includes/ure-user-edit.php:53 +msgid "Show capabilities in human readable form" +msgstr "Yetkileri insan tarafından okunabilir biçimde göster" + +#: ../includes/ure-role-edit.php:44 +msgid "If checked, then apply action to ALL sites of this Network" +msgstr "Eğer seçilirse, bu ağdaki tüm siteler için uygulanır" + +#: ../includes/ure-role-edit.php:56 +msgid "Apply to All Sites" +msgstr "Tüm sitelere uygula" + +#: ../includes/ure-role-edit.php:63 ../includes/ure-user-edit.php:109 +msgid "Core capabilities:" +msgstr "Çekirdek Kabiliyetleri:" + +#: ../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 "Özel Kabiliyetler:" + +#: ../includes/class-ure-lib.php:143 +msgid "Error: wrong request" +msgstr "" + +#: ../includes/class-ure-lib.php:175 +msgid "Role name (ID): " +msgstr "Rol adı (ID):" + +#: ../includes/class-ure-lib.php:177 +msgid "Display Role Name: " +msgstr "Görünecek Rol Adı:" + +#: ../includes/class-ure-lib.php:179 +msgid "Make copy of: " +msgstr "Bundan kopyala:" + +#: ../includes/class-ure-lib.php:186 +msgid "Select Role:" +msgstr "Rolü Seçin:" + +#: ../includes/class-ure-lib.php:201 +msgid "Delete:" +msgstr "Sil:" + +#: ../includes/class-ure-lib.php:208 +msgid "Capability name (ID): " +msgstr "Yetenek adı (ID): " + +#: ../includes/class-ure-lib.php:322 +msgid "Error: " +msgstr "Hata:" + +#: ../includes/class-ure-lib.php:322 +msgid "Role" +msgstr "Rol:" + +#: ../includes/class-ure-lib.php:323 +msgid "does not exist" +msgstr "bulunmuyor" + +#: ../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 "Rol yetkileri WordPress öntanımlılarına geri yüklendi." + +#: ../includes/class-ure-lib.php:1312 +msgid "Help" +msgstr "Yardım" + +#: ../includes/class-ure-lib.php:1662 +msgid "Error is occur. Please check the log file." +msgstr "Bir hata oluştu. Lütfen günlük dosyasını kontrol edin." + +#: ../includes/class-ure-lib.php:1705 +msgid "" +"Error: Role ID must contain latin characters, digits, hyphens or underscore " +"only!" +msgstr "" +"Hata: Rol ID yalnızca latin karakterleri, sayılar, tire veya altçizgiden " +"oluşabilir." + +#: ../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 rolü zaten mevcut" + +#: ../includes/class-ure-lib.php:1739 +msgid "Error is encountered during new role create operation" +msgstr "Yeni rol oluşturma işlemi sırasında hata" + +#: ../includes/class-ure-lib.php:1741 +#, php-format +msgid "Role %s is created successfully" +msgstr "%s rolü başarıyla oluşturuldu" + +#: ../includes/class-ure-lib.php:1810 +msgid "Error encountered during role delete operation" +msgstr "Rol silme işlemi sırasında hata" + +#: ../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 rolü başarıyla silindi" + +#: ../includes/class-ure-lib.php:1839 +msgid "Error encountered during default role change operation" +msgstr "Varsayılan rolü değiştirme işlemi sırasında hata" + +#: ../includes/class-ure-lib.php:1845 +#, php-format +msgid "Default role for new users is set to %s successfully" +msgstr "Yeni kullanıcılar için varsayılan rol %s olarak başarıyla değiştirildi" + +#: ../includes/class-ure-lib.php:1864 +msgid "Editor" +msgstr "Editör" + +#: ../includes/class-ure-lib.php:1865 +msgid "Author" +msgstr "Yazar" + +#: ../includes/class-ure-lib.php:1866 +msgid "Contributor" +msgstr "İçerik Sağlayıcı" + +#: ../includes/class-ure-lib.php:1867 +msgid "Subscriber" +msgstr "Üye" + +#: ../includes/class-ure-lib.php:1869 +msgid "Switch themes" +msgstr "Temaları değiştir" + +#: ../includes/class-ure-lib.php:1870 +msgid "Edit themes" +msgstr "Temaları düzenle" + +#: ../includes/class-ure-lib.php:1871 +msgid "Activate plugins" +msgstr "Eklentileri aktive et" + +#: ../includes/class-ure-lib.php:1872 +msgid "Edit plugins" +msgstr "Eklentileri düzenlemek" + +#: ../includes/class-ure-lib.php:1873 +msgid "Edit users" +msgstr "Kullanıcıları düzenlemek" + +#: ../includes/class-ure-lib.php:1874 +msgid "Edit files" +msgstr "Dosyaları düzenlemek" + +#: ../includes/class-ure-lib.php:1875 +msgid "Manage options" +msgstr "Seçenekleri yönetmek" + +#: ../includes/class-ure-lib.php:1876 +msgid "Moderate comments" +msgstr "Yorumları yönetmek" + +#: ../includes/class-ure-lib.php:1877 +msgid "Manage categories" +msgstr "Kategorileri yönetmek" + +#: ../includes/class-ure-lib.php:1878 +msgid "Manage links" +msgstr "Linkleri yönetmek" + +#: ../includes/class-ure-lib.php:1879 +msgid "Upload files" +msgstr "Dosya yüklemek" + +#: ../includes/class-ure-lib.php:1880 +msgid "Import" +msgstr "İçeri aktarmak" + +#: ../includes/class-ure-lib.php:1881 +msgid "Unfiltered html" +msgstr "Filtrelenmemiş HTML" + +#: ../includes/class-ure-lib.php:1882 +msgid "Edit posts" +msgstr "Yazıları düzenlemek" + +#: ../includes/class-ure-lib.php:1883 +msgid "Edit others posts" +msgstr "Başkalarının yazılarını düzenlemek" + +#: ../includes/class-ure-lib.php:1884 +msgid "Edit published posts" +msgstr "Yayınlanmış yazıları düzenlemek" + +#: ../includes/class-ure-lib.php:1885 +msgid "Publish posts" +msgstr "Yazıları yayınlamak" + +#: ../includes/class-ure-lib.php:1886 +msgid "Edit pages" +msgstr "Sayfaları düzenlemek" + +#: ../includes/class-ure-lib.php:1887 +msgid "Read" +msgstr "Okumak" + +#: ../includes/class-ure-lib.php:1888 +msgid "Level 10" +msgstr "Seviye 10" + +#: ../includes/class-ure-lib.php:1889 +msgid "Level 9" +msgstr "Seviye 9" + +#: ../includes/class-ure-lib.php:1890 +msgid "Level 8" +msgstr "Seviye 8" + +#: ../includes/class-ure-lib.php:1891 +msgid "Level 7" +msgstr "Seviye 7" + +#: ../includes/class-ure-lib.php:1892 +msgid "Level 6" +msgstr "Seviye 6" + +#: ../includes/class-ure-lib.php:1893 +msgid "Level 5" +msgstr "Seviye 5" + +#: ../includes/class-ure-lib.php:1894 +msgid "Level 4" +msgstr "Seviye 4" + +#: ../includes/class-ure-lib.php:1895 +msgid "Level 3" +msgstr "Seviye 3" + +#: ../includes/class-ure-lib.php:1896 +msgid "Level 2" +msgstr "Seviye 2" + +#: ../includes/class-ure-lib.php:1897 +msgid "Level 1" +msgstr "Seviye 1" + +#: ../includes/class-ure-lib.php:1898 +msgid "Level 0" +msgstr "Seviye 0" + +#: ../includes/class-ure-lib.php:1899 +msgid "Edit others pages" +msgstr "Başkalarının sayfalarını düzenlemek" + +#: ../includes/class-ure-lib.php:1900 +msgid "Edit published pages" +msgstr "Yayınlanmış sayfaları düzenlemek" + +#: ../includes/class-ure-lib.php:1901 +msgid "Publish pages" +msgstr "Sayfaları yayınlamak" + +#: ../includes/class-ure-lib.php:1902 +msgid "Delete pages" +msgstr "Sayfaları silmek" + +#: ../includes/class-ure-lib.php:1903 +msgid "Delete others pages" +msgstr "Başkalarının sayfalarını silmek" + +#: ../includes/class-ure-lib.php:1904 +msgid "Delete published pages" +msgstr "Yayınlanmış sayfaları silmek" + +#: ../includes/class-ure-lib.php:1905 +msgid "Delete posts" +msgstr "Yazıları silmek" + +#: ../includes/class-ure-lib.php:1906 +msgid "Delete others posts" +msgstr "Başkalarının yazılarını silmek" + +#: ../includes/class-ure-lib.php:1907 +msgid "Delete published posts" +msgstr "Yayınlanmış yazıları silmek" + +#: ../includes/class-ure-lib.php:1908 +msgid "Delete private posts" +msgstr "Özel yazıları silmek" + +#: ../includes/class-ure-lib.php:1909 +msgid "Edit private posts" +msgstr "Özel yazıları düzenlemek" + +#: ../includes/class-ure-lib.php:1910 +msgid "Read private posts" +msgstr "Özel yazıları okumak" + +#: ../includes/class-ure-lib.php:1911 +msgid "Delete private pages" +msgstr "Özel sayfaları silmek" + +#: ../includes/class-ure-lib.php:1912 +msgid "Edit private pages" +msgstr "Özel sayfaları düzenlemek" + +#: ../includes/class-ure-lib.php:1913 +msgid "Read private pages" +msgstr "Özel yazıları okumak" + +#: ../includes/class-ure-lib.php:1914 +msgid "Delete users" +msgstr "Kullanıcı silmek" + +#: ../includes/class-ure-lib.php:1915 +msgid "Create users" +msgstr "Kullanıcı oluşturmak" + +#: ../includes/class-ure-lib.php:1916 +msgid "Unfiltered upload" +msgstr "Filtrelenmemiş dosya yüklemek" + +#: ../includes/class-ure-lib.php:1917 +msgid "Edit dashboard" +msgstr "Paneli düzenlemek" + +#: ../includes/class-ure-lib.php:1918 +msgid "Update plugins" +msgstr "Eklentileri güncellemek" + +#: ../includes/class-ure-lib.php:1919 +msgid "Delete plugins" +msgstr "Eklenti silmek" + +#: ../includes/class-ure-lib.php:1920 +msgid "Install plugins" +msgstr "Eklenti yüklemek" + +#: ../includes/class-ure-lib.php:1921 +msgid "Update themes" +msgstr "Temaları güncellemek" + +#: ../includes/class-ure-lib.php:1922 +msgid "Install themes" +msgstr "Tema yüklemek" + +#: ../includes/class-ure-lib.php:1923 +msgid "Update core" +msgstr "Güncelle" + +#: ../includes/class-ure-lib.php:1924 +msgid "List users" +msgstr "Kullanıcıları listelemek" + +#: ../includes/class-ure-lib.php:1925 +msgid "Remove users" +msgstr "Kullanıcı silmek" + +#: ../includes/class-ure-lib.php:1926 +msgid "Add users" +msgstr "Kullanıcıları eklemek" + +#: ../includes/class-ure-lib.php:1927 +msgid "Promote users" +msgstr "Kullanıcı yükseltmek" + +#: ../includes/class-ure-lib.php:1928 +msgid "Edit theme options" +msgstr "Tema ayarlarını düzenlemek" + +#: ../includes/class-ure-lib.php:1929 +msgid "Delete themes" +msgstr "Temaları silmek" + +#: ../includes/class-ure-lib.php:1930 +msgid "Export" +msgstr "Dışa aktarmak" + +#: ../includes/class-ure-lib.php:2040 +msgid "Error: Capability name must contain latin characters and digits only!" +msgstr "" +"Hata: Kabiliyet adı yalnızca latin karakterleri ve sayılardan oluşabilir." + +#: ../includes/class-ure-lib.php:2053 +#, php-format +msgid "Capability %s is added successfully" +msgstr "%s kabiliyeti başarıyla eklendi" + +#: ../includes/class-ure-lib.php:2055 +#, php-format +msgid "Capability %s exists already" +msgstr "%s kabiliyeti zaten mevcut" + +#: ../includes/class-ure-lib.php:2080 +#, php-format +msgid "Error! You do not have permission to delete this capability: %s!" +msgstr "Hata! Bu kabiliyeti değiştirmek için yetkiniz yok: %s!" + +#: ../includes/class-ure-lib.php:2099 +#, php-format +msgid "Capability %s is removed successfully" +msgstr "%s kabiliyeti başarıyla oluşturuldu" + +#: ../includes/class-ure-lib.php:2203 +msgid "Version:" +msgstr "" + +#: ../includes/class-ure-lib.php:2204 +msgid "Author's website" +msgstr "Hazırlayanın websitesi" + +#: ../includes/class-ure-lib.php:2205 +msgid "Plugin webpage" +msgstr "Eklentinin websitesi" + +#: ../includes/class-ure-lib.php:2206 +#, fuzzy +msgid "Plugin download" +msgstr "Başkalarının sayfalarını silmek" + +#: ../includes/class-ure-lib.php:2208 +msgid "FAQ" +msgstr "SSS" + +#: ../includes/class-ure-lib.php:2256 +msgid "None" +msgstr "Hiçbiri" + +#: ../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 "Kullanıcının kabiliyetlerini değiştir: " + +#: ../includes/ure-user-edit.php:71 +msgid "Primary Role:" +msgstr "Birincil rol:" + +#: ../includes/ure-user-edit.php:81 +msgid "bbPress Role:" +msgstr "bbPress rolü: " + +#: ../includes/ure-user-edit.php:91 +msgid "Other Roles:" +msgstr "Diğer Roller:" + +#: ../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 "Bu eklenti hakkında:" + +#~ 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 "" +#~ "Rolleri Wordpress öntanımlılarına ayarla. Dikkatli olun, sizin " +#~ "tarafınızdan veya eklenti tarafından yapılan tüm değişiklikler " +#~ "kaybolacak. Bazı eklentiler, örneğin S2Member, WooCommerce için yeniden " +#~ "etkinleştirme gerekebilir. Devam etmek istiyor musunuz?" + +#~ msgid "User Role Editor requires PHP %s or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi PHP %s veya daha yüksek bir sürüme ihtiyaç " +#~ "duymaktadır." + +#~ msgid "Please update!" +#~ msgstr "Lütfen güncelleyin!" + +#~ msgid "Only" +#~ msgstr "Sadece" + +#~ msgid "is allowed to use" +#~ msgstr "kullanmak için yetkilidir" + +#~ msgid "User Role Editor requires WordPress %s or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress %s sürümüne ihtiyaç " +#~ "duymaktadır." + +#~ msgid "Backup record is created for the current role capabilities" +#~ msgstr "Güncel rol yeterlilikleri için yedek kayıt oluşturuldu" + +#~ msgid "User" +#~ msgstr "Kullanıcı" + +#~ msgid "Database operation error. Check log file." +#~ msgstr "Veritabanı operasyonu hatası. Günlük dosyasını kontrol edin." + +#~ msgid "" +#~ "No backup data. It is created automatically before the first role data " +#~ "update." +#~ msgstr "" +#~ "Henüz yedekleme yapılmamış. İlk yedekleme, ilk rol verisi güncellemesi " +#~ "öncesi otomatik olarak yapılacaktır." + +#~ msgid " Name must contain latin characters and digits only!" +#~ msgstr "Ad, yalnızca latin karakterleri ve sayılardan oluşabilir!" + +#~ msgid "Change Default Role" +#~ msgstr "Varsayılan Rolü Değiştir" + +#~ msgid "" +#~ "Restore Roles from backup copy. Be careful, backup was created when you " +#~ "started URE 1st time. All changes you made after that will be lost" +#~ msgstr "" +#~ "Yedek kopyasında rolleri geri al. Dikkatli olun, Kullanıcı Rol Editörü`nü " +#~ "ilk defa çalıştırdığınızda yedek alındı. Ondan sonra yaptığınız " +#~ "değişklikler yok olacak" + +#~ msgid "Role \"%s\" update: please confirm to continue" +#~ msgstr "\"%s\" rolü güncellendi: Devam etmek için lütfen onaylayın" + +#~ msgid "Save Changes" +#~ msgstr "Değişiklikleri Kaydet" + +#~ msgid "Cancel not saved changes" +#~ msgstr "Kaydedilmemiş değişiklikleri iptal et" + +#~ msgid "Restore Roles from backup copy" +#~ msgstr "Rolleri yedekten geri yükle" + +#~ msgid "Name: " +#~ msgstr "İsim:" + +#~ msgid "Add" +#~ msgstr "Ekle" + +#~ msgid "Add New User Role" +#~ msgstr "Yeni Kullanıcı Rolü Ekle" + +#~ msgid "Change" +#~ msgstr "Değiştir" + +#~ msgid "Remove" +#~ msgstr "Kaldır" + +#~ msgid "Remove User Capability" +#~ msgstr "Kullanıcının kabiliyetini kaldır" + +#~ msgid "User \"%s\" update: please confirm to continue" +#~ msgstr "\"%s\" güncellendi: Devam etmek için lütfen onaylayın" + +#~ msgid "Role:" +#~ msgstr "Rol:" + +#~ msgid "Add capabilities to this user:" +#~ msgstr "Bu kullanıcıya kabiliyetler ekle:" + +#~ msgid "Greetings:" +#~ msgstr "Teşekkürlerimle:" + +#~ msgid "It's me, the author" +#~ msgstr "Ben, hazırlayan" + +#~ msgid "For the help with Belorussian translation" +#~ msgstr "Beyaz Rusça tercümesi için" + +#~ msgid "For the help with Brasilian translation" +#~ msgstr "Brasilian tercümesi için" + +#~ msgid "For the help with Brasilian Portuguese translation" +#~ msgstr "Brasilian tercümesi için" + +#~ msgid "For the help with Chinese translation" +#~ msgstr "Chinese tercümesi için" + +#~ msgid "For the help with Dutch translation" +#~ msgstr "Dutch tercümesi için" + +#~ msgid "For the help with Finnish translation" +#~ msgstr "Finnish tercümesi için" + +#~ msgid "For the help with French translation" +#~ msgstr "Fransızca tercümesi için" + +#~ msgid "For the help with German translation" +#~ msgstr "Almanca tercümesi için" + +#, fuzzy +#~ msgid "For the help with Hindi translation" +#~ msgstr "Hindi tercümesi için" + +#~ msgid "For the help with Hungarian translation" +#~ msgstr "Macarca tercümesi için" + +#~ msgid "For the help with Italian translation" +#~ msgstr "İtalyanca tercümesi için" + +#~ msgid "For the help with Japanese translation" +#~ msgstr "Japonca tercümesi için" + +#~ msgid "For the help with Persian translation" +#~ msgstr "Farsça tercümeye yardımları için" + +#~ msgid "For the help with Polish translation" +#~ msgstr "Lehçe tercümesi için" + +#~ msgid "For the help with Spanish translation" +#~ msgstr "İspanyolca tercümesi için" + +#~ msgid "For the help with Swedish translation" +#~ msgstr "Swedish tercümesi için" + +#~ msgid "For the help with Turkish translation" +#~ msgstr "Türkçe tercümeye yardımları için" + +#~ msgid "For the code to hide administrator role" +#~ msgstr "Yönetici rolünü saklayan kod katkısı için" + +#~ msgid "For the code enhancement suggestion" +#~ msgstr "Kod geliştirme önerisi için" + +#~ msgid "" +#~ "Do you wish to see your name with link to your site here? You are " +#~ "welcome! Your help with translation and new ideas are very appreciated." +#~ msgstr "" +#~ "İsminizi websitenize bir link ile birlikte burada görmek ister misiniz? " +#~ "Bu elbette mümkün! Tercüme yardımlarınız ve yeni fikirlerinize her zaman " +#~ "açığım." + +#~ msgid "Donate" +#~ msgstr "Bağış Yapın" + +#, fuzzy +#~ msgid "for the help with Arabic translation" +#~ msgstr "Fransızca tercümesi için" + +#, fuzzy +#~ msgid "for the help with French translation" +#~ msgstr "Fransızca tercümesi için" + +#, fuzzy +#~ msgid "for the help with German translation" +#~ msgstr "Almanca tercümesi için" + +#, fuzzy +#~ msgid "for the help with Spanish translation" +#~ msgstr "İspanyolca tercümesi için" + +#, fuzzy +#~ msgid "Delete readme.txt" +#~ msgstr "Temaları silmek" + +#, fuzzy +#~ msgid "Delete screenshot files" +#~ msgstr "Kullanıcı Rolünü Sil" + +#, fuzzy +#~ msgid "Silence is Golden Guard requires WordPress 3.0 or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress 3.0 sürümüne ihtiyaç " +#~ "duymaktadır." + +#, fuzzy +#~ msgid "is deleted" +#~ msgstr "Sil" + +#, fuzzy +#~ msgid "Active lockouts" +#~ msgstr "Eklentileri aktive et" + +#, fuzzy +#~ msgid "allowed retries" +#~ msgstr "kullanmak için yetkilidir" + +#, fuzzy +#~ msgid "Change Options" +#~ msgstr "Seçenekleri yönetmek" + +#, fuzzy +#~ msgid "Plugin author home page" +#~ msgstr "Eklentinin websitesi" + +#, fuzzy +#~ msgid "Thank You Counter Button requires WordPress 3.0 or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress 3.0 sürümüne ihtiyaç " +#~ "duymaktadır." + +#, fuzzy +#~ msgid "for the help with Belarusian translation" +#~ msgstr "Beyaz Rusça tercümesi için" + +#, fuzzy +#~ msgid "for the help with Chinese translation" +#~ msgstr "Chinese tercümesi için" + +#, fuzzy +#~ msgid "for the help with Dutch translation" +#~ msgstr "Dutch tercümesi için" + +#, fuzzy +#~ msgid "for the help with Hungarian translation" +#~ msgstr "Macarca tercümesi için" + +#, fuzzy +#~ msgid "for the help with Iranian translation" +#~ msgstr "İtalyanca tercümesi için" + +#, fuzzy +#~ msgid "for the help with Italian translation" +#~ msgstr "İtalyanca tercümesi için" + +#, fuzzy +#~ msgid "" +#~ "for the help with Spanish translation, ideas and new versions testing" +#~ msgstr "İspanyolca tercümesi için" + +#, fuzzy +#~ msgid "Reset Counters" +#~ msgstr "Kullanıcı silmek" + +#, fuzzy +#~ msgid "Edit \"%s\"" +#~ msgstr "Kullanıcıları düzenlemek" + +#, fuzzy +#~ msgid "Edit Post" +#~ msgstr "Yazıları düzenlemek" + +#, fuzzy +#~ msgid "View all categories" +#~ msgstr "Kategorileri yönetmek" + +#, fuzzy +#~ msgid "Switch Off" +#~ msgstr "Temaları değiştir" + +#, fuzzy +#~ msgid "will take some time. Please confirm to continue" +#~ msgstr "\"%s\" rolü güncellendi: Devam etmek için lütfen onaylayın" + +#, fuzzy +#~ msgid "For the help with Czech translation" +#~ msgstr "Fransızca tercümesi için" + +#, fuzzy +#~ msgid "For the help with Indonesian translation" +#~ msgstr "Farsça tercümeye yardımları için" + +#, fuzzy +#~ msgid "For the help with bug fix and contribution to source code" +#~ msgstr "Macarca tercümesi için" + +#, fuzzy +#~ msgid "Plugin Name" +#~ msgstr "Eklentinin websitesi" + +#, fuzzy +#~ msgid "Plugin State" +#~ msgstr "Eklentinin websitesi" + +#, fuzzy +#~ msgid "Delete Tables" +#~ msgstr "Sayfaları silmek" + +#, fuzzy +#~ msgid "Delete Extra Columns" +#~ msgstr "Eklenti silmek" + +#, fuzzy +#~ msgid " requires WordPress 3.0 or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress 3.0 sürümüne ihtiyaç " +#~ "duymaktadır." + +#, fuzzy +#~ msgid "For the help with Slovenian translation" +#~ msgstr "İtalyanca tercümesi için" + +#, fuzzy +#~ msgid "Plugins Language Switcher requires WordPress 3.0 or newer." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress 3.0 sürümüne ihtiyaç " +#~ "duymaktadır." + +#, fuzzy +#~ msgid "Downloaded" +#~ msgstr "Bağış Yapın" + +#, fuzzy +#~ msgid "Added" +#~ msgstr "Ekle" + +#, fuzzy +#~ msgid "Categories" +#~ msgstr "Kategorileri yönetmek" + +#, fuzzy +#~ msgid "Add New" +#~ msgstr "Yeni Rol Ekle" + +#, fuzzy +#~ msgid "You do not have permission to upload files/downloads." +#~ msgstr "Hata! Bu kabiliyeti değiştirmek için yetkiniz yok: %s!" + +#, fuzzy +#~ msgid "Uploads" +#~ msgstr "Dosya yüklemek" + +#, fuzzy +#~ msgid "remove" +#~ msgstr "Kaldır" + +#, fuzzy +#~ msgid "Add New Download" +#~ msgstr "Yeni Rol Ekle" + +#, fuzzy +#~ msgid "Starting hits" +#~ msgstr "Ayarlar" + +#, fuzzy +#~ msgid "Select a file..." +#~ msgstr "Rolü Seçin:" + +#, fuzzy +#~ msgid "Upload File" +#~ msgstr "Dosya yüklemek" + +#, fuzzy +#~ msgid "+ Add New Category" +#~ msgstr "Yeni Kabiliyet Ekle" + +#, fuzzy +#~ msgid "Upload thumbnail" +#~ msgstr "Dosya yüklemek" + +#, fuzzy +#~ msgid "Default" +#~ msgstr "Sil" + +#, fuzzy +#~ msgid "Insert" +#~ msgstr "Kullanıcı" + +#, fuzzy +#~ msgid "Date posted" +#~ msgstr "Yazıları silmek" + +#, fuzzy +#~ msgid "Read More" +#~ msgstr "Okumak" + +#, fuzzy +#~ msgid "Date" +#~ msgstr "Bağış Yapın" + +#, fuzzy +#~ msgid "Download added Successfully" +#~ msgstr "başarıyla güncellendi" + +#, fuzzy +#~ msgid "Select a download" +#~ msgstr "Rolü Seçin:" + +#, fuzzy +#~ msgid "Formats updated" +#~ msgstr "Lütfen güncelleyin!" + +#, fuzzy +#~ msgid "Format deleted Successfully" +#~ msgstr "%s rolü başarıyla silindi" + +#, fuzzy +#~ msgid "Image link:" +#~ msgstr "Linkleri yönetmek" + +#, fuzzy +#~ msgid "Download Categories" +#~ msgstr "Kategorileri yönetmek" + +#, fuzzy +#~ msgid "Category updated" +#~ msgstr "Lütfen güncelleyin!" + +#, fuzzy +#~ msgid "Category deleted Successfully" +#~ msgstr "%s rolü başarıyla silindi" + +#, fuzzy +#~ msgid "No categories exist" +#~ msgstr "Kategorileri yönetmek" + +#, fuzzy +#~ msgid "Edit category" +#~ msgstr "Editör" + +#, fuzzy +#~ msgid "No Change" +#~ msgstr "Değiştir" + +#, fuzzy +#~ msgid "Download edited Successfully" +#~ msgstr "başarıyla güncellendi" + +#, fuzzy +#~ msgid "Upload New File" +#~ msgstr "Dosya yüklemek" + +#, fuzzy +#~ msgid "Edit File URL" +#~ msgstr "Dosyaları düzenlemek" + +#, fuzzy +#~ msgid "Download deleted Successfully" +#~ msgstr "%s rolü başarıyla silindi" + +#, fuzzy +#~ msgid "Selected Downloads deleted Successfully" +#~ msgstr "%s rolü başarıyla silindi" + +#, fuzzy +#~ msgid "Downloads edited successfully" +#~ msgstr "başarıyla güncellendi" + +#, fuzzy +#~ msgid "Reset Stats" +#~ msgstr "Geri al" + +#, fuzzy +#~ msgid "Downloads added Successfully" +#~ msgstr "başarıyla güncellendi" + +#, fuzzy +#~ msgid "Uncategorized" +#~ msgstr "Kategorileri yönetmek" + +#, fuzzy +#~ msgid "Akismet %s requires WordPress 3.0 or higher." +#~ msgstr "" +#~ "User Role Editor eklentisi en az WordPress 3.0 sürümüne ihtiyaç " +#~ "duymaktadır." + +#, fuzzy +#~ msgid "Comment History" +#~ msgstr "İçerik Sağlayıcı" + +#, fuzzy +#~ msgid "Update options »" +#~ msgstr "Eklentileri güncellemek" + +#, fuzzy +#~ msgid "History" +#~ msgstr "Editör" + +#, fuzzy +#~ msgid "Delete all" +#~ msgstr "Rolü Sil" + +#, fuzzy +#~ msgid "Default post error message:" +#~ msgstr "Yeni Kullanıcılar için Varsayılan Rol" + +#, fuzzy +#~ msgid "Roles" +#~ msgstr "Rol:" + +#, fuzzy +#~ msgid "Has Users" +#~ msgstr "Kullanıcıları listelemek" + +#, fuzzy +#~ msgid "No Users" +#~ msgstr "Kullanıcı" + +#, fuzzy +#~ msgid "Users" +#~ msgstr "Kullanıcı" + +#, fuzzy +#~ msgid "View Users" +#~ msgstr "Kullanıcıları düzenlemek" + +#, fuzzy +#~ msgid "Edit Role" +#~ msgstr "Dosyaları düzenlemek" + +#, fuzzy +#~ msgid "Role updated." +#~ msgstr "Lütfen güncelleyin!" + +#, fuzzy +#~ msgid "Sorry, but you do not have permission to view this content." +#~ msgstr "Hata! Bu kabiliyeti değiştirmek için yetkiniz yok: %s!" + +#, fuzzy +#~ msgid "Settings Updated." +#~ msgstr "Ayarlar" + +#, fuzzy +#~ msgid "Update Settings" +#~ msgstr "Ayarlar" + +#~ msgid "Roles list reading error is encountered" +#~ msgstr "Rol listesi okunurken hata" diff --git a/wp-content/plugins/user-role-editor/lang/ure.mo b/wp-content/plugins/user-role-editor/lang/ure.mo new file mode 100644 index 0000000..2ff086a Binary files /dev/null and b/wp-content/plugins/user-role-editor/lang/ure.mo differ diff --git a/wp-content/plugins/user-role-editor/lang/ure.pot b/wp-content/plugins/user-role-editor/lang/ure.pot new file mode 100644 index 0000000..7b10109 --- /dev/null +++ b/wp-content/plugins/user-role-editor/lang/ure.pot @@ -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 \n" +"Language-Team: 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 "" diff --git a/wp-content/plugins/user-role-editor/license.txt b/wp-content/plugins/user-role-editor/license.txt new file mode 100644 index 0000000..89b5db6 --- /dev/null +++ b/wp-content/plugins/user-role-editor/license.txt @@ -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. + + + Copyright (C) + + 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. + + , 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/ diff --git a/wp-content/plugins/user-role-editor/readme.txt b/wp-content/plugins/user-role-editor/readme.txt new file mode 100644 index 0000000..a3af062 --- /dev/null +++ b/wp-content/plugins/user-role-editor/readme.txt @@ -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: +
    +
  • Block selected admin menu items for role.
  • +
  • "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.
  • +
  • Roles and Users permissions management via Network Admin for multisite configuration. One click Synchronization to the whole network.
  • +
  • Per posts/pages users access management to post/page editing functionality.
  • +
  • Per plugin users access management for plugins activate/deactivate operations.
  • +
  • Per form users access management for Gravity Forms plugin.
  • +
  • Shortcode to show enclosed content to the users with selected roles only.
  • +
  • Posts and pages view restrictions for selected roles.
  • +
+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) 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. diff --git a/wp-content/plugins/user-role-editor/screenshot-1.png b/wp-content/plugins/user-role-editor/screenshot-1.png new file mode 100644 index 0000000..e2a9a21 Binary files /dev/null and b/wp-content/plugins/user-role-editor/screenshot-1.png differ diff --git a/wp-content/plugins/user-role-editor/screenshot-2.png b/wp-content/plugins/user-role-editor/screenshot-2.png new file mode 100644 index 0000000..0a091cb Binary files /dev/null and b/wp-content/plugins/user-role-editor/screenshot-2.png differ diff --git a/wp-content/plugins/user-role-editor/screenshot-3.png b/wp-content/plugins/user-role-editor/screenshot-3.png new file mode 100644 index 0000000..0b93f41 Binary files /dev/null and b/wp-content/plugins/user-role-editor/screenshot-3.png differ diff --git a/wp-content/plugins/user-role-editor/screenshot-4.png b/wp-content/plugins/user-role-editor/screenshot-4.png new file mode 100644 index 0000000..d572b11 Binary files /dev/null and b/wp-content/plugins/user-role-editor/screenshot-4.png differ diff --git a/wp-content/plugins/user-role-editor/screenshot-5.png b/wp-content/plugins/user-role-editor/screenshot-5.png new file mode 100644 index 0000000..548d2ab Binary files /dev/null and b/wp-content/plugins/user-role-editor/screenshot-5.png differ diff --git a/wp-content/plugins/user-role-editor/uninstall.php b/wp-content/plugins/user-role-editor/uninstall.php new file mode 100644 index 0000000..650666b --- /dev/null +++ b/wp-content/plugins/user-role-editor/uninstall.php @@ -0,0 +1,38 @@ +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); +} + +?> diff --git a/wp-content/plugins/user-role-editor/user-role-editor.php b/wp-content/plugins/user-role-editor/user-role-editor.php new file mode 100644 index 0000000..232983d --- /dev/null +++ b/wp-content/plugins/user-role-editor/user-role-editor.php @@ -0,0 +1,56 @@ + ' . 'Please update!' . ''; +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 ) . + ' ' . 'Please update!' . ''; +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); diff --git a/wp-content/plugins/wp-api/admin/admin.php b/wp-content/plugins/wp-api/admin/admin.php new file mode 100644 index 0000000..4c70e85 --- /dev/null +++ b/wp-content/plugins/wp-api/admin/admin.php @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-api/admin/admin_page.php b/wp-content/plugins/wp-api/admin/admin_page.php new file mode 100644 index 0000000..ceb368b --- /dev/null +++ b/wp-content/plugins/wp-api/admin/admin_page.php @@ -0,0 +1,192 @@ +
+ +

wp-api administration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodDescriptionarguments
MethodDescriptionarguments
get_postsCall this method to get the recent posts/pages or specify the post/page id to get the specified post information. + argument: dev (optional)
+ value: 1 >> pretty output in browser
+ value: 0 >> default json format to use in your program
+ example: ?wpapi=get_posts&dev=1 +
+ + argument: id (optional)
+ value: post or page id >> show information about the specified post
+ example: ?wpapi=get_posts&dev=1&id=1 +
+ + argument: count (optional)
+ value: number of items per page >> specify the number of post items to be returned.

+ + argument: page (optional)
+ value: page number >> if count is set, use the page argument to move forward through the rest of the items.

+ + example: ?wpapi=get_posts&dev=1&count=2&page=1 +
+ + argument: comment (optional)
+ value: 1 >> Return comments if available
+ value: 0 >> Don't return comments

+ + argument: content (optional)
+ value: 1 >> Return the content
+ value: 0 >> Don't return the content

+ + example: ?wpapi=get_posts&dev=1&comment=1&content=1 +
+ argument: type (optional)
+ value: posts type >> Put post and get only posts, put page and get only pages
+ example: ?wpapi=get_posts&dev=1&type=page +
get_tagsCall this method to retrieve all tag information + argument: dev (optional) Read more about it in get_posts method
+ argument: count (optional) Read more about it in get_posts method
+ argument: page (optional) Read more about it in get_posts method
+ example: ?wpapi=get_tags&dev=1 +
+ argument: id (optional)
+ value: tag id >> return information about the specified tag
+ example: ?wpapi=get_tags&dev=1&id=1 +
+ argument: cat (optional)
+ value: 1 >> returns those tags with taxonomy of category
+ value: 0 >> does not return tags with taxonomy of category

+ + argument: tag (optional)
+ value: 1 >> returns normal tags
+ value: 0 >> does not return normal tags

+ + example: ?wpapi=get_tags&dev=1&cat=1&tag=1 +
get_authorCall this method to retrieve information about authors registered in the wordpress blog + argument: dev (optional) Read more about it in get_posts method
+ argument: count (optional) Read more about it in get_posts method
+ argument: page (optional) Read more about it in get_posts method
+ example: ?wpapi=get_author&dev=1 +
+ argument: id (optional)
+ value: author id >> return information about the specified author
+ example: ?wpapi=get_author&dev=1&id=1 +
gravatarCall this method to connect to the gravatar api and retrieve the gravatar based on the email address you specify. + argument: dev (optional) Read more about it in get_posts method
+ example: ?wpapi=gravatar&dev=1 +
+ argument: email (required)
+ value: standard email address >> the email address to found its gravatar

+ + argument: size (optional)
+ value: size of the gravatar in pixel >> size of the returned gravatar image, default value is 100 which means the returned gravatar image will be 100X100 pixel

+ example: ?wpapi=gravatar&dev=1&email=email@site.com&size=200 +
searchCall this method and pass keyword argument to return the search results. + argument: dev (optional) Read more about it in get_posts method
+ argument: count (optional) Read more about it in get_posts method
+ argument: page (optional) Read more about it in get_posts method
+ argument: comment (optional) Read more about it in get_posts method
+ argument: content (optional) Read more about it in get_posts method
+ argument: type (optional) Read more about it in get_posts method
+ example: ?wpapi=search&dev=1&keyword=post&count=2&page=1&content=1&comment=1&type=post +
+ argument: keyword (required)
+ value: search string >> the keyword to be searched.
+ example: ?wpapi=search&dev=1&keyword=something +
commentCall this method to submit a comment on a post. + argument: dev (optional) Read more about it in get_posts method
+ example: ?wpapi=comment&dev=1 +
+ argument: name (required)
+ value: author name >> name of the person who's leaving the comment

+ + argument: email (required)
+ value: author email address >> email address of the person who's leaving the comment

+ + argument: content (required)
+ value: comment content >> content of the comment

+ + argument: post_id (required)
+ value: post id >> id of the post which you are submitting your comment to

+ + example: ?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1 +
+ argument: website (optional)
+ value: www.your-site.com >> Optionally you can pass author's website

+ + argument: parent (optional)
+ value: reply to id >> parent is the id of the comment which this will be a reply to. default value is 0

+ + example: ?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 +
+
diff --git a/wp-content/plugins/wp-api/includes/DEV.php b/wp-content/plugins/wp-api/includes/DEV.php new file mode 100644 index 0000000..025f9bc --- /dev/null +++ b/wp-content/plugins/wp-api/includes/DEV.php @@ -0,0 +1,86 @@ + 0 && $json[$c-1] != '\\') + { + $in_string = !$in_string; + } + default: + $new_json .= $char; + break; + } + } + header('Content-type: text/plain'); + return $new_json; + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/JSON.php b/wp-content/plugins/wp-api/includes/JSON.php new file mode 100644 index 0000000..ac3c835 --- /dev/null +++ b/wp-content/plugins/wp-api/includes/JSON.php @@ -0,0 +1,861 @@ + + * @author Matt Knapp + * @author Brett Stimmerman + * @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: + * + * + * // 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); + * + */ +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) + { + + } + } + +} + diff --git a/wp-content/plugins/wp-api/includes/admin_jquery.js b/wp-content/plugins/wp-api/includes/admin_jquery.js new file mode 100644 index 0000000..2c406e0 --- /dev/null +++ b/wp-content/plugins/wp-api/includes/admin_jquery.js @@ -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(); + }); +}); \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/comment_api.php b/wp-content/plugins/wp-api/includes/comment_api.php new file mode 100644 index 0000000..a4e6f96 --- /dev/null +++ b/wp-content/plugins/wp-api/includes/comment_api.php @@ -0,0 +1,281 @@ + $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(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/get_author.php b/wp-content/plugins/wp-api/includes/get_author.php new file mode 100644 index 0000000..9969238 --- /dev/null +++ b/wp-content/plugins/wp-api/includes/get_author.php @@ -0,0 +1,560 @@ +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 = ' $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(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/get_gravatar.php b/wp-content/plugins/wp-api/includes/get_gravatar.php new file mode 100644 index 0000000..259c62d --- /dev/null +++ b/wp-content/plugins/wp-api/includes/get_gravatar.php @@ -0,0 +1,116 @@ + $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 = ' $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(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/get_posts.php b/wp-content/plugins/wp-api/includes/get_posts.php new file mode 100644 index 0000000..0e9200b --- /dev/null +++ b/wp-content/plugins/wp-api/includes/get_posts.php @@ -0,0 +1,1370 @@ +posts.' AS POSTS WHERE POSTS.post_status="publish"'; + $obj = $wpdb->get_results($sql); + $count_total = 0; + foreach($obj as $num) + { + $count_total++; + } + $count = $count_total; + $page = get_posts::_numpage($count_total,$count); + $check_err = true; + $err_msg = ''; + $status = 'ok'; + if (!$obj) + { + $check_err = false; + $err_msg = 'the 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((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); + } + if ($dev != 1) + { + print ($encode); + } + } + if($check_err) + { + 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); + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + if($tag == false) + { + $tag = array(); + } + if(($comm == null and $con == null) or ($comm == 0 and $con == 0)) + { + $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 + ); + } + if($con == 1 or ($con == 1 and $comm == 0)) + { + $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 + ); + } + if($comm == 1 or ($comm == 1 and $con == 0)) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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 + ); + } + if($comm == 1 and $con == 1) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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]; + } + } + else if(!empty($type) and !(int) $type) + { + $check_type = ''; + $count_total_type = 0; + $count_type; + foreach($obj as $key => $value) + { + if($value->post_type == $type) + { + $count_total_type++; + $check_type = true; + $cat = get_the_category($value->ID); + $tag = get_the_tags($value->ID); + $author = get_posts::return_author($value->post_author); + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + if($tag == false) + { + $tag = array(); + } + if(($comm == null and $con == null) or ($comm == 0 and $con == 0)) + { + $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 + ); + } + if($con == 1 or ($con == 1 and $comm == 0)) + { + $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 + ); + } + if($comm == 1 or ($comm == 1 and $con == 0)) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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 + ); + } + if($comm == 1 and $con == 1) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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]; + } + else if($value->post_type != $type and $check_type != true) + { + $check_type = false; + } + } + if($check_type == false) + { + $check_err = false; + $err_msg = 'this type 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(); + } + } + $count_type = $count_total_type; + $page_type = $count_total_type / $count_type; + if(empty($posts)) + { + $posts = array(); + } + @rsort($posts); + $info = array( + 'status' => $status, + 'count' => $count_type, + 'count_total' => $count_total_type, + 'pages' => $page_type, + 'posts' => $posts + ); + $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(empty($posts)) + { + $posts = array(); + } + @rsort($posts); + $info = array( + 'status' => $status, + 'count' => $count, + 'count_total' => $count_total, + 'pages' => $page, + 'posts' => $posts + ); + $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 return_comment($id) + { + global $wpdb; + $sqlc = 'SELECT DISTINCT * FROM '.$wpdb->comments.' AS COMM + WHERE COMM.comment_post_id="'.$id.'" AND COMM.comment_approved = 1'; + $obj = $wpdb->get_results($sqlc); + foreach ($obj as $key => $comment) + { + $obj[$key] = array( + 'id' => $comment->comment_ID, + 'author' => $comment->comment_author, + 'author_url' => $comment->comment_author_url, + 'parent' => $comment->comment_parent, + 'date' => $comment->comment_date, + 'content' => $comment->comment_content, + 'gravatar' => get_posts::get_gravatar($comment->comment_author_email) + ); + $comments[] = $obj[$key]; + } + return $comments; + } + static function return_author($id) + { + global $wpdb; + $sql = 'SELECT * FROM '.$wpdb->users; + $obj = $wpdb->get_results($sql); + 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_posts::get_gravatar($value->user_email) + ); + $authors[] = $obj[$key]; + return $authors; + } + } + + } + static function get_id_info($dev,$ID,$comm,$con) + { + global $wpdb; + $sql = 'SELECT DISTINCT * FROM '.$wpdb->posts.' AS POSTS WHERE POSTS.post_status="publish"'; + $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 = 'the 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) + { + $cat = get_the_category($value->ID); + $tag = get_the_tags($value->ID); + $author = get_posts::return_author($value->post_author); + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + if($tag == false) + { + $tag = array(); + } + if(($comm == null and $con == null) or ($comm == 0 and $con == 0)) + { + $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 + ); + } + if($comm == 1 or ($comm == 1 and $con == 0)) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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 + ); + } + if($con == 1 or ($con == 1 and $comm == 0)) + { + $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 + ); + } + if($comm == 1 and $con == 1) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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]; + $info = array( + 'status' => $status, + 'posts' => $posts + ); + $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 get_count_page($dev,$co,$pa,$comm,$con,$type) { + global $wpdb; + $sql = 'SELECT DISTINCT * FROM '.$wpdb->posts.' AS POSTS WHERE POSTS.post_status="publish"'; + $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 can not 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 = 'the 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((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); + } + if ($dev != 1) + { + print ($encode); + } + } + if($check_err) + { + if(empty($type)) + { + $page = get_posts::_numpage($count_total,$co); + 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); + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + if($tag == false) + { + $tag = array(); + } + if(($comm == null and $con == null) or ($comm == 0 and $con == 0)) + { + $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 + ); + } + if($con == 1 or ($con == 1 and $comm == 0)) + { + $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 + ); + } + if($comm == 1 or ($comm == 1 and $con == 0)) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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 + ); + } + if($comm == 1 and $con == 1) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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]; + } + } + else if(!empty($type) and !(int) $type) + { + $check_type = ''; + $count_total = 0; + foreach($obj as $key => $value) + { + if($value->post_type == $type) + { + $count_total++; + $check_type = true; + $cat = get_the_category($value->ID); + $tag = get_the_tags($value->ID); + $author = get_posts::return_author($value->post_author); + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + if($tag == false) + { + $tag = array(); + } + if(($comm == null and $con == null) or ($comm == 0 and $con == 0)) + { + $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 + ); + } + if($con == 1 or ($con == 1 and $comm == 0)) + { + $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 + ); + } + if($comm == 1 or ($comm == 1 and $con == 0)) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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 + ); + } + if($comm == 1 and $con == 1) + { + $com = get_posts::return_comment($value->ID); + if($com == null) + { + $com = array(); + } + $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]; + } + else if($value->post_type != $type and $check_type != true) + { + $check_type = false; + } + } + if($check_type == false) + { + $check_err = false; + $err_msg = 'this type 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(); + } + } + } + $page = get_posts::_numpage($count_total,$co); + if(empty($posts)) + { + $posts = array(); + } + @rsort($posts); + if(empty($pa) or $pa == 1 or $page == 1) + { + for($i=0;$i<$co;$i++) + { + $post[] = $posts[$i]; + } + @rsort($post); + $info = array( + 'status' => $status, + 'count' => $co, + 'count_total' => $count_total, + '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_total, + '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 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 = ' $val ) + $url .= ' ' . $key . '="' . $val . '"'; + $url .= ' />'; + } + return $url; + } + 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=get_posts&dev&id&count&page&comment&content&type'; + return $newrules+$rules; + } + static function insertQueryVars($vars){ + array_push($vars, 'wpapi','dev','id','count','page','comment','content','type'); + return $vars; + } + static function insertParseQuery($query) + { + if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'get_posts') + { + $dev = $_GET['dev']; + $id = $_GET['id']; + $page = $_GET['page']; + $count = $_GET['count']; + $comm = $_GET['comment']; + $con = $_GET['content']; + $type = $_GET['type']; + if(!empty($query->query_vars['id']) and $query->query_vars['id'] == $id) + { + get_posts::get_id_info($dev,$id,$comm,$con); + 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_posts::get_count_page($dev,$count,$page,$comm,$con,$type); + header('Content-type: text/plain'); + exit(); + } + get_posts::posts_info($dev,$comm,$con,$type); + header('Content-type: text/plain'); + exit(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/get_tags.php b/wp-content/plugins/wp-api/includes/get_tags.php new file mode 100644 index 0000000..5a3c9dc --- /dev/null +++ b/wp-content/plugins/wp-api/includes/get_tags.php @@ -0,0 +1,1049 @@ +terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $status = ''; + $check_err = true; + $err_msg = ''; + $count_total = 0; + foreach($obj as $num) + { + $count_total++; + } + $count = $count_total; + $pages = get_tags::_numpage($count_total, $count); + if (!$obj) + { + $check_err = false; + $err_msg = 'the 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(($t == 0 and $c == 0) and ($t != null and $c != null)) + { + return get_tags::get_not_tag_cat($dev,$t,$c); + exit(); + } + if($check_err) + { + $status = 'ok'; + foreach ($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count + ); + $tags[] = $obj[$key]; + } + } + } + if(empty($tags)) + { + $tags = array(); + } + @rsort($tags); + $info = array( + 'status' => $status, + 'count' => $count, + 'count_total' => $count_total, + 'pages' => $pages, + 'tags' => $tags + ); + $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->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $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 = false; + foreach($obj as $key => $tag) + { + if($ID == $tag->term_id) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count + ); + $tags[] = $obj[$key]; + $check = true; + } + } + } + } + if($check == true) + { + $info = array( + 'status' => $status, + 'tags' => $tags + ); + $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(); + } + } + else if($check == false) + { + $status = 'error'; + $err_msg = '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 = 1; + 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->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $check_err = true; + $err_msg = ''; + $status = 'ok'; + foreach($obj as $num) + { + $count_total++; + } + $check_err = true; + $err_msg = ''; + $status = 'ok'; + if(!(int) $co) + { + $check_err = false; + $err_msg = '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 = '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_tags::_numpage($count_total,$co); + foreach($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count + ); + $tags[] = $obj[$key]; + } + } + } + @rsort($tags); + if(empty($pa) or $pa == 1 or $page == 1) + { + for($i=0;$i<$co;$i++) + { + $tages[] = $tags[$i]; + } + @rsort($tages); + $info = array( + 'status' => $status, + 'count' => $co, + 'count_total' => $count_total, + 'pages' => $page, + 'currPage' => 1, + 'tags' => $tages + ); + $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($tags[$i] == null) + { + break; + } + else + { + $count++; + $co = $count; + } + } + } + $begin = $co*($pa-1); + $end = $begin + ($co - 1); + for($i=$begin;$i<=$end;$i++) + { + if($tags[$i] == null) + { + break; + } + else + { + $tages[] = $tags[$i]; + } + } + $info = array( + 'status' => $status, + 'count' => $co, + 'count_total' => $count_total, + 'pages' => $page, + 'currPage' => $pa, + 'tags' => $tages + ); + $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_tag($dev,$t) + { + global $wpdb; + $sql = "SELECT * FROM ".$wpdb->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $status = ''; + $check_err = true; + $err_msg = ''; + $count_total = 0; + foreach($obj_tax as $num) + { + if($num->taxonomy == 'post_tag') + { + $count_total++; + } + } + if (!$obj or !$obj_tax) + { + $check_err = false; + $err_msg = 'the 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) or empty($obj_tax)) + { + $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 and $t == 1) + { + $status = 'ok'; + foreach ($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + if($tag_tax->taxonomy == 'post_tag') + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count + ); + $tags[] = $obj[$key]; + } + } + } + } + if(empty($tags)) + { + $tags = array(); + } + @rsort($tags); + $info = array( + 'status' => $status, + 'count_total' => $count_total, + 'tags' => $tags + ); + $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_cat($dev,$c) + { + global $wpdb; + $sql = "SELECT * FROM ".$wpdb->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $status = ''; + $check_err = true; + $err_msg = ''; + $count_total = 0; + foreach($obj_tax as $num) + { + if($num->taxonomy == 'category' or $num->taxonomy == 'link_category') + { + $count_total++; + } + } + if (!$obj or !$obj_tax) + { + $check_err = false; + $err_msg = 'the 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) or empty($obj_tax)) + { + $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 and $c == 1) + { + $status = 'ok'; + foreach ($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + if($tag_tax->taxonomy == 'category' or $tag_tax->taxonomy == 'link_category') + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count, + 'parent_id' => $tag_tax->parent + ); + $tags[] = $obj[$key]; + } + } + } + } + if(empty($tags)) + { + $tags = array(); + } + @rsort($tags); + $info = array( + 'status' => $status, + 'count_total' => $count_total, + 'categories' => $tags + ); + $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_tag_cat($dev,$t,$c) + { + global $wpdb; + $sql = "SELECT * FROM ".$wpdb->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $status = ''; + $check_err = true; + $err_msg = ''; + $count_total_tag = 0; + foreach($obj_tax as $num) + { + if($num->taxonomy == 'post_tag') + { + $count_total_tag++; + } + } + $count_total_cat = 0; + foreach($obj_tax as $num) + { + if($num->taxonomy == 'category' or $num->taxonomy == 'link_category') + { + $count_total_cat++; + } + } + if (!$obj or !$obj_tax) + { + $check_err = false; + $err_msg = 'the 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) or empty($obj_tax)) + { + $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) + { + $status = 'ok'; + foreach ($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + if($tag_tax->taxonomy == 'post_tag') + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count + ); + $tags[] = $obj[$key]; + } + if($tag_tax->taxonomy == 'category' or $tag_tax->taxonomy == 'link_category') + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count, + 'parent_id' => $tag_tax->parent + ); + $categories[] = $obj[$key]; + } + } + } + } + if(empty($tags)) + { + $tags = array(); + } + if(empty($categories)) + { + $categories = array(); + } + @rsort($tags); + @rsort($categories); + $info = array( + 'status' => $status, + 'count_total_tag' => $count_total_tag, + 'count_total_category' => $count_total_cat, + 'tags' => $tags, + 'categories' => $categories + ); + $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_not_tag_cat($dev,$t,$c) + { + global $wpdb; + $sql = "SELECT * FROM ".$wpdb->terms; + $sql_tax = "SELECT * FROM ".$wpdb->term_taxonomy; + $obj = $wpdb->get_results($sql); + $obj_tax = $wpdb->get_results($sql_tax); + $status = ''; + $check_err = true; + $err_msg = ''; + $count_total_not_tag = 0; + foreach($obj_tax as $num) + { + if($num->taxonomy != 'post_tag' and $num->taxonomy != 'category' and $num->taxonomy != 'link_category') + { + $count_total_not_tag++; + } + } + if (!$obj or !$obj_tax) + { + $check_err = false; + $err_msg = 'the 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) or empty($obj_tax)) + { + $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 and ($t == 0 and $c == 0)) + { + $status = 'ok'; + foreach ($obj as $key => $tag) + { + foreach ($obj_tax as $key_tax => $tag_tax) + { + if ($tag->term_id == $tag_tax->term_id) + { + if($tag_tax->taxonomy != 'post_tag' and $tag_tax->taxonomy != 'category' and $tag_tax->taxonomy != 'link_category') + { + $obj[$key] = array( + 'id' => $tag->term_id, + 'slug' => $tag->slug, + 'title' => $tag->name, + 'taxonomy' => $tag_tax->taxonomy, + 'description' => $tag_tax->description, + 'post_count' => $tag_tax->count, + 'parent_id' => $tag_tax->parent + ); + $tags[] = $obj[$key]; + } + } + } + } + if(empty($tags)) + { + $tags = array(); + } + @rsort($tags); + $info = array( + 'status' => $status, + 'count_total' => $count_total_not_tag, + 'tags' => $tags + ); + $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=get_tags&dev&id&count&page&tag&cat'; + return $newrules+$rules; + } + static function insertQueryVars($vars){ + array_push($vars, 'wpapi','dev','id','count','page','tag','cat'); + return $vars; + } + static function insertParseQuery($query) + { + if(!empty($query->query_vars['wpapi']) and $query->query_vars['wpapi'] == 'get_tags') + { + $dev = $_GET['dev']; + $id = $_GET['id']; + $page = $_GET['page']; + $count = $_GET['count']; + $tag = $_GET['tag']; + $cat = $_GET['cat']; + if(!empty($query->query_vars['id']) and $query->query_vars['id'] == $id) + { + get_tags::get_id_info($dev,$id); + header('Content-type: text/plain'); + exit(); + + } + if(!empty($query->query_vars['count']) and $query->query_vars['count'] == $count and $query->query_vars['page'] == $page) + { + get_tags::get_count_page($dev,$count,$page); + header('Content-type: text/plain'); + exit(); + } + get_tags::tag_info($dev,$tag,$cat); + header('Content-type: text/plain'); + exit(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/includes/search_api.php b/wp-content/plugins/wp-api/includes/search_api.php new file mode 100644 index 0000000..9f190ca --- /dev/null +++ b/wp-content/plugins/wp-api/includes/search_api.php @@ -0,0 +1,746 @@ +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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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]).' '.'… Continue reading →'; + $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.' '.' Continue reading →'; + $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(); + } + } +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-api/index.php b/wp-content/plugins/wp-api/index.php new file mode 100644 index 0000000..655f393 --- /dev/null +++ b/wp-content/plugins/wp-api/index.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-api/readme.txt b/wp-content/plugins/wp-api/readme.txt new file mode 100644 index 0000000..b312849 --- /dev/null +++ b/wp-content/plugins/wp-api/readme.txt @@ -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 +facebook 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 \ No newline at end of file diff --git a/wp-content/plugins/wp-api/screenshot-1.png b/wp-content/plugins/wp-api/screenshot-1.png new file mode 100644 index 0000000..cd1ba7d Binary files /dev/null and b/wp-content/plugins/wp-api/screenshot-1.png differ diff --git a/wp-content/plugins/wpdirauth/COPYING b/wp-content/plugins/wpdirauth/COPYING new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/wp-content/plugins/wpdirauth/COPYING @@ -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. + + + Copyright (C) + + 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. + + , 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. diff --git a/wp-content/plugins/wpdirauth/credits.txt b/wp-content/plugins/wpdirauth/credits.txt new file mode 100644 index 0000000..47d6916 --- /dev/null +++ b/wp-content/plugins/wpdirauth/credits.txt @@ -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 + 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/ \ No newline at end of file diff --git a/wp-content/plugins/wpdirauth/readme.txt b/wp-content/plugins/wpdirauth/readme.txt new file mode 100644 index 0000000..95d8b13 --- /dev/null +++ b/wp-content/plugins/wpdirauth/readme.txt @@ -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 + +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: +* WPPF home: + + +== 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 . 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 + +The project source code is available on the WordPress Plugin Repository: + +* Stable: +* Unstable: +* Historical: + +The Sybversion repository can be browsed and tracked (RSS, etc) through the +WP Plugin Repo source browser at: + +* + +The generated code documentation can be found at: + +* + +The WP Plugin Repo also offers a convenient ticketing system for bug and +task tracking. + +* Existing tickets: +* Open a new ticket: + + +== 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 . + + +== 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: +* Original: wpLDAP: +* wpLDAP 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 \ No newline at end of file diff --git a/wp-content/plugins/wpdirauth/wpDirAuth.php b/wp-content/plugins/wpdirauth/wpDirAuth.php new file mode 100644 index 0000000..3f04ffe --- /dev/null +++ b/wp-content/plugins/wpdirauth/wpDirAuth.php @@ -0,0 +1,2182 @@ + + * + * 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/. + * + * @todo Always stay on top of security and user input validation while + * staying backwards compatible enough until PHP4 support is dropped in + * WP (serious patches welcomed, please see code). Note that we do + * heavily rely on WP's admin ACL scheme, by necessity. + */ + +/* +PLUGIN META INFO FOR WORDPRESS LISTINGS +Plugin Name: wpDirAuth +Plugin URI: http://wpdirauth.gilzow.com/ +Description: WordPress Directory Authentication (LDAP/LDAPS). + Works with most LDAP enabled directory services, such as OpenLDAP, + Apache Directory, Microsoft Active Directory, Novell eDirectory, + Sun Java System Directory Server, etc. + Originally revived and upgraded from a patched version of wpLDAP. +Version: 1.7.6 +Author: Paul Gilzow +Author URI: http://gilzow.com/ +*/ + +/** + * wpDirAuth version. + */ +define('WPDIRAUTH_VERSION', '1.7.6'); + +/** + * wpDirAuth signature. + */ +define('WPDIRAUTH_SIGNATURE', 'wpDirAuth '.WPDIRAUTH_VERSION); + +/** + * Default LDAP field to search against when locating the user's profile. + */ +define('WPDIRAUTH_DEFAULT_FILTER', 'samAccountName'); + +/** + * Default login screen message. + */ +define('WPDIRAUTH_DEFAULT_LOGINSCREENMSG', '%s members can login directly using their institutional password.'); + +/** + * Default password change message. + */ +define('WPDIRAUTH_DEFAULT_CHANGEPASSMSG', 'To change a %s password, please refer to the official institutional password policy.'); + +/** + * Allowed HTML (messages) + */ +define('WPDIRAUTH_ALLOWED_TAGS', '

    1. '); + +define('WPDIRAUTH_ERROR_TITLE',__('Directory Authentication Error: ')); + +define('WPDIRAUTH_LDAP_RETURN_KEYS',serialize(array('sn', 'givenname', 'mail'))); + +define('WPDIRAUTH_EMAIL_NEWUSER_NOTIFY','You have been added to the site %s as %s %s. You may login to the site using your institution\'s %s (%s) and password at the following address: %s'); + +/** + *My fail-safe method for determing if we are running in multisite mode + */ +define('WPDIRAUTH_MULTISITE',(defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && function_exists('switch_to_blog')) ? TRUE : FALSE); + +/** + *List of option keys we store in wp_sitemeta/wp_options + */ +define('WPDIRAUTH_OPTIONS', serialize(array( + 'dirAuthEnable', + 'dirAuthRequiresSsl', + 'dirAuthTOS', + 'dirAuthUseGroups', + 'dirAuthEnableSsl', + 'dirAuthControllers', + 'dirAuthBaseDn', + 'dirAuthPreBindUser', + 'dirAuthAccountSuffix', + 'dirAuthFilter', + 'dirAuthInstitution', + 'dirAuthGroups', + 'dirAuthMarketingSSOID', + 'dirAuthLoginScreenMsg', + 'dirAuthChangePassMsg' +))); + + +if (function_exists('wp_authenticate') || function_exists('wp_setcookie') || !function_exists('ldap_connect')) { +/** + * SAFE MODE + */ + + /** + * SAFE MODE: wpDirAuth plugin configuration panel. + * Processes and outputs the wpDirAuth configuration form, with a conflict message. + * + * @return void + */ + function wpDirAuth_safeConflictMessage() + { + $wpDARef = WPDIRAUTH_SIGNATURE; + + if (!function_exists('ldap_connect')) { + $message = <<<________EOS +

      Sorry, but your PHP install does not seem to have access to the LDAP features.

      +

      +
      wpDirAuth is now running in safe mode.' +

      +

      + Quote from the PHP manual LDAP section: +

      + LDAP support in PHP is not enabled by default. You will need to use the + --with-ldap[=DIR] configuration option when compiling PHP to enable LDAP + support. DIR is the LDAP base install directory. To enable SASL support, + be sure --with-ldap-sasl[=DIR] is used, and that sasl.h exists on the system. +
      +

      +________EOS; + } + else { + $message = <<<________EOS +

      Sorry, but another plugin seems to be conflicting with wpDirAuth.

      +

      +
      wpDirAuth is now running in safe mode as to not impair the other plugin's operations.' +

      +

      + The wp_authenticate and wp_setcookie WordPress + pluggable functions + have already been redefined, and wpDirAuth cannot provide directory authentication + without having access to these functions. +

      +

      + Please disable any WP plugins that deal with authentication in order to use wpDirAuth. + Unfortunately, we cannot provide you with more info as to which plugin is in conflict. +

      +________EOS; + } + + echo <<<________EOS +
      +

      Directory Authentication Options: Plugin Conflict

      + $message +

      $wpDARef

      +
      +________EOS; + } + + + /** + * SAFE MODE: Adds the `Directory Auth.` menu entry in the Wordpress Admin section. + * Also activates the wpDirAuth config panel, with a conflict message, as a callback function. + * + * @uses wpDirAuth_safeConflictMessage + */ + function wpDirAuth_safeAddMenu() + { + if (function_exists('add_options_page')) { + add_options_page( + 'Directory Authentication Options: Plugin Conflict', + '!! Directory Auth. !!', + 9, + basename(__FILE__), + 'wpDirAuth_safeConflictMessage' + ); + } + } + + + /** + * SAFE MODE: Add custom WordPress actions. + * + * @uses wpDirAuth_safeAddMenu + */ + if (function_exists('add_action')) { + add_action('admin_menu', 'wpDirAuth_safeAddMenu'); + } +} +else { +/** + * STANDARD MODE + */ + + /** + * Cookie marker. + * Generates a random string to be used as salt for the password + * hash cookie checks in wp_setcookie and wp_authenticate + * + * @return string 55 chars-long salty goodness (md5 + uniqid) + */ + function wpDirAuth_makeCookieMarker() + { + $cookieMarker = md5( + $_SERVER['SERVER_SIGNATURE'] + .$_SERVER['HTTP_USER_AGENT'] + .$_SERVER['REMOTE_ADDR'] + ).uniqid(microtime(),true); + update_site_option("dirAuthCookieMarker",$cookieMarker); + return $cookieMarker; + } + + + /** + * LDAP bind test + * Tries two different documented method of php-based ldap binding. + * Note: passing params by reference, no need for copies (unlike in + * wpDirAuth_auth where it is desirable). + * + * @param object &$connection LDAP connection + * @param string &$username LDAP username + * @param string &$password LDAP password + * @param string $baseDn + * @return boolean Binding status + * */ + function wpDirAuth_bindTest(&$connection, &$username, &$password,$baseDn) + { + $password = strtr($password, array("\'"=>"'")); + if ( ($isBound = @ldap_bind($connection, $username, $password)) === false ) { + // @see http://weblogs.valsania.it/andreav/2008/07/24/wpdirauth-14-patch/ + $isBound = @ldap_bind($connection,"uid=$username,$baseDn", $password); + } + return $isBound; + } + + /** + * put your comment there... + * + * @param string $dc name of domain controller to connect to + * @param integer $enableSsl ssl config option + * @return resource + */ + function wpDirAuth_establishConnection($dc,$enableSsl){ + /** + * Only setup protocol value if ldaps is required to help with older AD + * @see http://groups.google.com/group/wpdirauth-support/browse_thread/thread/7b744c7ad66a4829 + */ + $protocol = ($enableSsl) ? 'ldaps://' : ''; + + /** + * Scan for and use alternate server port, but only if ssl is disabled. + * @see Parameters constraint at http://ca.php.net/ldap_connect + */ + + if (strstr($dc, ':')) list($dc, $port) = explode(':', $dc); + + switch($enableSsl){ + case 1: + $connection = ldap_connect($protocol.$dc); + break; + case 2: + case 0: + default: + if(isset($port)){ + $connection = ldap_connect($dc,$port); + } else { + $connection = ldap_connect($dc); + } + break; + + } + + /** + * Copes with W2K3/AD issue. + * @see http://bugs.php.net/bug.php?id=30670 + */ + if (@ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, 3)) { + @ldap_set_option($connection, LDAP_OPT_REFERRALS, 0); + } + + //they want to start TLS + if($enableSsl == 2){ + if(!ldap_start_tls($connection)){ + return new WP_Error('tls_failed_to_start',__('wpDirAuth error: tls failed to start')); + } + } + + return $connection; + } + + /** + * put your comment there... + * + * @param array $controllers list of domain controllers to connect to + * @return mixed array of shuffled controllers or WP_Error + */ + function wpDirAuth_shuffleControllers($controllers){ + if (count($controllers) > 1) { + // shuffle the domain controllers for pseudo load balancing and fault tolerance. + shuffle($controllers); + } elseif (count($controllers) == 0) { + return new WP_Error('no_controllers',__(' wpDirAuth config error: no domain controllers specified.')); + } + + return $controllers; + } + + /** + * Custom LDAP authentication module. + * The returned keys are in the same format used by WP for + * the wp_insert_user and wp_update_user functions. + * + * @param string $username LDAP username + * @param string $password LDAP password + * @return WP_Error object OR array Directory email, last_name and first_name + * + * @uses WPDIRAUTH_DEFAULT_FILTER + * @uses WPDIRAUTH_ERROR_TITLE + * @uses wpDirAuth_bindTest + * @uses wpDirAuth_retrieveUserDetails + * @uses wpDirAuth_shuffleControllers + * @uses wpDirAuth_establishConnection + */ + function wpDirAuth_auth($username, $password) + { + global $error, $pwd; + + $errorTitle = WPDIRAUTH_ERROR_TITLE; + + $controllers = explode(',', get_site_option('dirAuthControllers')); + $baseDn = get_site_option('dirAuthBaseDn'); + $preBindUser = get_site_option('dirAuthPreBindUser'); + $preBindPassword = get_site_option('dirAuthPreBindPassword'); + $accountSuffix = get_site_option('dirAuthAccountSuffix'); + $filter = get_site_option('dirAuthFilter'); + $enableSsl = get_site_option('dirAuthEnableSsl'); + $boolUseGroups = get_site_option('dirAuthUseGroups'); + + if($boolUseGroups == 1){ + $strAuthGroups = get_site_option('dirAuthGroups'); + } + + $returnKeys = unserialize(WPDIRAUTH_LDAP_RETURN_KEYS); + + $isBound = $isPreBound = $isLoggedIn = false; + + if ($accountSuffix) $username .= $accountSuffix; + + if (!$filter) $filter = WPDIRAUTH_DEFAULT_FILTER; + + $filterQuery = "($filter=$username)"; + + $controllers = wpDirAuth_shuffleControllers($controllers); + + if(is_wp_error($controllers)){ + return $controllers; + } + + // Connection pool loop - Haha, PooL LooP + foreach ($controllers as $dc) { + + $connection = wpDirAuth_establishConnection($dc,$enableSsl); + + if(is_wp_error($connection)){ + return $connection; + } + + if ($preBindUser && $preBindPassword) { + /** + * Use case 1: Servers requiring pre-binding with admin defined + * credentials to search for the user's full DN before attempting + * to login. + * @see http://dev.wp-plugins.org/ticket/681 + */ + if ( $isPreBound = wpDirAuth_bindTest($connection, $preBindUser, $preBindPassword,$baseDn) === true ) { + if ( ($results = @ldap_search($connection, $baseDn, $filterQuery, $returnKeys)) !== false ) { + if ( ($userDn = @ldap_get_dn($connection, ldap_first_entry($connection, $results))) !== false ) { + if ( ($isBound = wpDirAuth_bindTest($connection, $userDn, $password,$baseDn)) === true ) { + $isLoggedIn = true; // valid server, valid login, move on + break; // valid server, valid login, move on + } + } + } + } + } + elseif ( ($isBound = wpDirAuth_bindTest($connection, $username, $password,$baseDn)) === true ) { + /** + * Use case 2: Servers that will not let you bind anonymously + * but will let the end user bind directly. + * @see http://groups.google.com/group/wpdirauth-support/browse_thread/thread/8fd16c05266fc832 + */ + $isLoggedIn = true; + break; // valid server, valid login, move on + } + elseif ( ($isBound = @ldap_bind($connection)) === true ) { + /** + * Use case 3: Servers that might require a full user DN to + * actually login and therefore let you bind anonymously first . + * Try ldap_search + ldap_get_dn before attempting a login. + * @see http://wordpress.org/support/topic/129814?replies=34#post-603644 + */ + if ( ($results = @ldap_search($connection, $baseDn, $filterQuery, $returnKeys)) !== false ) { + if ( ($userDn = @ldap_get_dn($connection, ldap_first_entry($connection, $results))) !== false ) { + $isInDirectory = true; // account exists in directory + if ( ($isBound = wpDirAuth_bindTest($connection, $userDn, $password,$baseDn)) === true ) { + $isLoggedIn = true; // valid server, valid login, move on + break; // valid server, valid login, move on + } + } + } + } + } + + if ( ($preBindUser && $preBindPassword) && ( ! $isPreBound ) ) { + return new WP_Error ('no_directory_or_prebinding', $errorTitle + . __(' wpDirAuth config error: No directory server available for authentication, OR pre-binding credentials denied.')); + } + elseif ( ( $isInDirectory ) && ( ! $isBound ) ) { + return new WP_Error ('could_not_bind_as_user', $errorTitle + . __(' Incorrect password.')); + } + elseif ( ! $isBound && ! $isPreBound ) { + return new WP_Error ('no_directory_available', $errorTitle + . __(' wpDirAuth config error: No directory server available for authentication.')); + } + elseif ( ! $isLoggedIn) { + /** + * @desc wp-hack was echo'ing out $username verbatim which allowed a XSS vulnerability. Encoded $username before echoing' + */ + return new WP_Error ('could_not_authenticate', $errorTitle + . __(' Could not authenticate user. Please check your credentials.') + . " [" . htmlentities($username,ENT_QUOTES,'UTF-8') . "]"); + + + } + else { + if($boolUseGroups == 1){ + //the user is authenticated, but we want to make sure they are a member of the groups given + /** + * We need to get the DN's for each Authentication Group CN that was given to us. + */ + $aryAuthGroupsDN = array(); + $aryAuthGroups = explode(',',$strAuthGroups); + $aryAttribs = array('distinguishedname'); + foreach($aryAuthGroups as $strAuthGroup){ + $strAuthGroup = 'cn='.$strAuthGroup; + $rscLDAPSearch = ldap_search($connection,$baseDn,$strAuthGroup,$aryAttribs); + $arySearchResults = ldap_get_entries($connection,$rscLDAPSearch); + if(isset($arySearchResults[0]['dn'])){ + $aryAuthGroupsDN[] = $arySearchResults[0]['dn']; + } + } + + if(count($aryAuthGroupsDN) == 0){ + return new WP_Error('no_auth_groups_found',$errorTitle.__('No Authentication Groups found based on given group CN')); + } + + + $strFilterQuery = '(&'.$filterQuery.'(|'; + foreach($aryAuthGroupsDN as $strAuthGroupDN){ + $strFilterQuery .= '(memberOf='.$strAuthGroupDN.')'; + } + $strFilterQuery .= '))'; + if(($rscLDAPSearchGroupMember = ldap_search($connection,$baseDn,$strFilterQuery)) !== false){ + $arySearchResultsMember = ldap_get_entries($connection,$rscLDAPSearchGroupMember); + if($arySearchResultsMember['count'] !== 1){ + return new WP_Error('not_member_of_auth_group',$errorTitle + . __('User authenticated but is not a member of an Authentication Group(s)')); + } + } + + } + + + /** + * Search for profile, if still needed. + * @see $results in preceding loop: Use case 3 + */ + if (!$results){ + return wpDirAuth_retrieveUserDetails($connection,$baseDn,$filterQuery); + } else { + return wpDirAuth_retrieveUserDetails($connection,$baseDn,$filterQuery,$results); + } + } + } + + + /** + * Runs stripslashes, html_entity_decode, then strip_tags with + * allowed html if requested. + * + * No input sashimi for us (hopefully). + * + * @param string $value Value to `sanitize` + * @param boolean $allowed Set to true for WPDIRAUTH_ALLOWED_TAGS + * @return string Cleaner value. + * + * @uses WPDIRAUTH_ALLOWED_TAGS + */ + function wpDirAuth_sanitize($value, $allowed = false) + { + $allowed = ($allowed) ? WPDIRAUTH_ALLOWED_TAGS : ''; + return strip_tags(html_entity_decode(stripslashes($value)), $allowed); + } + + + /** + * wpDirAuth plugin configuration panel. + * Processes and outputs the wpDirAuth configuration form. + * + * @return void + * + * @uses WPDIRAUTH_DEFAULT_FILTER + * @uses WPDIRAUTH_DEFAULT_LOGINSCREENMSG + * @uses WPDIRAUTH_DEFAULT_CHANGEPASSMSG + * @uses WPDIRAUTH_ALLOWED_TAGS + * @uses wpDirAuth_makeCookieMarker + * @uses wpDirAuth_sanitize + */ + function wpDirAuth_optionsPanel() + { + global $userdata; + + $wpDARef = WPDIRAUTH_SIGNATURE; + $allowedHTML = htmlentities(WPDIRAUTH_ALLOWED_TAGS); + + $curUserIsDirUser = get_usermeta($userdata->ID, 'wpDirAuthFlag'); + + if ($curUserIsDirUser) { + echo <<<____________EOS +
      +

      Directory Authentication Options

      +

      + Because any changes made to directory authentication + options can adversly affect your session when logged in + as a directory user, you must be logged in as a + WordPress-only administrator user to update these settings. +

      +

      + If such a user no longer exists in the database, please + create a new one + using the appropriate WordPress admin tool. +

      +

      $wpDARef

      +
      +____________EOS; + return; + } + + if ($_POST) { + $enableSsl = 0; //default + $boolUseGroups = 0; //default + // Booleans + $enable = intval($_POST['dirAuthEnable']) == 1 ? 1 : 0; + $requireSsl = intval($_POST['dirAuthRequireSsl']) == 1 ? 1 : 0; + $TOS = intval($_POST['dirAuthTOS']) == 1 ? 1 : 0; + + //integers + if(intval($_POST['dirAuthEnableSsl']) == 1 || intval($_POST['dirAuthEnableSsl']) == 2){ + $enableSsl = intval($_POST['dirAuthEnableSsl']); + } + + + // Strings, no HTML + $controllers = wpDirAuth_sanitize($_POST['dirAuthControllers']); + $baseDn = wpDirAuth_sanitize($_POST['dirAuthBaseDn']); + $preBindUser = wpDirAuth_sanitize($_POST['dirAuthPreBindUser']); + $preBindPassword = wpDirAuth_sanitize($_POST['dirAuthPreBindPassword']); + $preBindPassCheck = wpDirAuth_sanitize($_POST['dirAuthPreBindPassCheck']); + $accountSuffix = wpDirAuth_sanitize($_POST['dirAuthAccountSuffix']); + $filter = wpDirAuth_sanitize($_POST['dirAuthFilter']); + $institution = wpDirAuth_sanitize($_POST['dirAuthInstitution']); + $strAuthGroups = wpDirAuth_sanitize($_POST['dirAuthGroups']); + $strMarketingSSOID= wpDirAuth_sanitize(($_POST['dirAuthMarketingSSOID'])); + + if($strAuthGroups != ''){ + $boolUseGroups = 1; + } + + // Have to be allowed to contain some HTML + $loginScreenMsg = wpDirAuth_sanitize($_POST['dirAuthLoginScreenMsg'], true); + $changePassMsg = wpDirAuth_sanitize($_POST['dirAuthChangePassMsg'], true); + + update_site_option('dirAuthEnable', $enable); + update_site_option('dirAuthEnableSsl', $enableSsl); + update_site_option('dirAuthRequireSsl', $requireSsl); + update_site_option('dirAuthControllers', $controllers); + update_site_option('dirAuthBaseDn', $baseDn); + update_site_option('dirAuthPreBindUser', $preBindUser); + update_site_option('dirAuthAccountSuffix', $accountSuffix); + update_site_option('dirAuthFilter', $filter); + update_site_option('dirAuthInstitution', $institution); + update_site_option('dirAuthLoginScreenMsg', $loginScreenMsg); + update_site_option('dirAuthChangePassMsg', $changePassMsg); + update_site_option('dirAuthTOS', $TOS); + update_site_option('dirAuthUseGroups', $boolUseGroups); + update_site_option('dirAuthGroups', $strAuthGroups); + update_site_option('dirAuthMarketingSSOID', $strMarketingSSOID); + + + // Only store/override the value if a new one is being sent a bind user is set. + if ( $preBindUser && $preBindPassword && ($preBindPassCheck == $preBindPassword) ) + update_site_option('dirAuthPreBindPassword', $preBindPassword); + + // Clear the stored password if the Bind DN is null + elseif ( ! $preBindUser) + update_site_option('dirAuthPreBindPassword', ''); + + if (get_site_option('dirAuthEnable') && !get_site_option('dirAuthCookieMarker')) + wpDirAuth_makeCookieMarker(); + + echo '

      Your new settings were saved successfully.

      '; + + // Be sure to clear $preBindPassword, not to be displayed onscreen or in source + unset($preBindPassword); + } + else { + // Booleans + $enable = intval(get_site_option('dirAuthEnable')) == 1 ? 1 : 0; + $requireSsl = intval(get_site_option('dirAuthRequireSsl')) == 1 ? 1 : 0; + $TOS = intval(get_site_option('dirAuthTOS')) == 1 ? 1 : 0; + $boolUseGroups = intval(get_site_option('dirAuthUseGroups')) == 1 ? 1 : 0; + + //integers + $enableSsl = intval(get_site_option('dirAuthEnableSsl',0)); + + // Strings, no HTML + $controllers = wpDirAuth_sanitize(get_site_option('dirAuthControllers')); + $baseDn = wpDirAuth_sanitize(get_site_option('dirAuthBaseDn')); + $preBindUser = wpDirAuth_sanitize(get_site_option('dirAuthPreBindUser')); + $accountSuffix = wpDirAuth_sanitize(get_site_option('dirAuthAccountSuffix')); + $filter = wpDirAuth_sanitize(get_site_option('dirAuthFilter')); + $institution = wpDirAuth_sanitize(get_site_option('dirAuthInstitution')); + $strAuthGroups = wpDirAuth_sanitize((get_site_option('dirAuthGroups'))); + $strMarketingSSOID = wpDirAuth_sanitize((get_site_option('dirAuthMarketingSSOID'))); + + // Have to be allowed to contain some HTML + $loginScreenMsg = wpDirAuth_sanitize(get_site_option('dirAuthLoginScreenMsg'), true); + $changePassMsg = wpDirAuth_sanitize(get_site_option('dirAuthChangePassMsg'), true); + } + + $controllers = htmlspecialchars($controllers); + $baseDn = htmlspecialchars($baseDn); + $preBindUser = htmlspecialchars($preBindUser); + $accountSuffix = htmlspecialchars($accountSuffix); + $filter = htmlspecialchars($filter); + $institution = htmlspecialchars($institution); + $loginScreenMsg = htmlspecialchars($loginScreenMsg); + $changePassMsg = htmlspecialchars($changePassMsg); + $strAuthGroups = htmlspecialchars($strAuthGroups); + + if ($enable) { + $tEnable = "checked"; + } + else { + $fEnable = "checked"; + } + + $defaultFilter = WPDIRAUTH_DEFAULT_FILTER; + if (!$filter) { + $filter = $defaultFilter; + } + + if (!$institution) { + $institution = '[YOUR INSTITUTION]'; + } + + if (!$loginScreenMsg) { + $loginScreenMsg = sprintf(WPDIRAUTH_DEFAULT_LOGINSCREENMSG, $institution); + } + + if (!$changePassMsg) { + $changePassMsg = sprintf(WPDIRAUTH_DEFAULT_CHANGEPASSMSG, $institution); + } + + /* + if ($enableSsl) { + $tSsl = "checked"; + } + else { + $fSsl = "checked"; + } + */ + $strNoSSL =''; + $strSSL = ''; + $strTLS = ''; + $strOptionSelected = 'selected="selected"'; + switch($enableSsl){ + case 1: + $strSSL = $strOptionSelected; + break; + case 2: + $strTLS = $strOptionSelected; + break; + case 0: + default: + $strNoSSL = $strOptionSelected; + break; + + } + + if ($requireSsl) { + $tWpSsl = "checked"; + } + else { + $fWpSsl = "checked"; + } + + if ($TOS) { + $tTOS = "checked"; + } + else { + $fTOS = "checked"; + } + + $wpDAV = WPDIRAUTH_VERSION; + + echo <<<________EOS +
      +

      Directory Authentication Options

      + +

      +
      + WordPress Settings +
        +
      • + +
        + Yes   + No +
        + Note 1: Users created in WordPress are not affected by your directory authentication settings. +
        + Note 2: You will still be able to login with standard WP users if the LDAP server(s) go offline. +
      • +
      • + +
        + Yes   + No +
        + Force the WordPress login screen to require encryption (SSL, https:// URL)? +
      • +
      +
      +
      + Directory Settings +
        +
      • + +
        + + +
        + Use encryption (TLS, SSL, ldaps:// URL) when WordPress connects to the directory server(s)? +
      • +
      • + +
        +
        + The DNS name or IP address of the directory server(s).
        + NOTE: Separate multiple entries by a comma and/or alternate ports with a colon (eg: my.server1.org, my.server2.edu:387). + Unfortunately, alternate ports will be ignored when using LDAP/SSL, because of the way PHP handles the protocol. + +
      • +
      • + +
        + + (Defaults to $defaultFilter) +
        + What LDAP field should we search the username against to locate the user's profile after successful login? +
      • +
      • + +
        +
        + Suffix to be automatically appended to the username if desired. e.g. @domain.com
        + NOTE: Changing this value will cause your existing directory users to have new accounts created the next time they login. +
      • +
      • + +
        +
        + The base DN for carrying out LDAP searches. +
      • +
      • + +
        +
        + Enter a valid user account/DN to pre-bind with if your LDAP server does not allow anonymous profile searches, or requires a user with specific privileges to search. +
      • +
      • + +
        +
        + Enter a password for the above Bind DN if a value is needed.
        + Note 1: this value will be stored in clear text in your WordPress database.
        + Note 2: Simply clear the Bind DN value if you wish to delete the stored password altogether. +
      • +
      • + +
        +
        + Confirm the above Bind Password if you are setting a new value. +
      • +
      • +
        +
        + Enter each group CN that the user must be a member of in order to authenticate.
        + NOTE: Separate multiple CNs by a comma. +
      • +
      +
      +
      + Branding Settings +
        +
      • + +
        + +
        + Name of your institution/company. Displayed on the login screen. +
      • + +
      • + +
        + +
        + How your institution/company refers to the single-sign-on ID you use. +
      • +
      • + +
        + +
        + Displayed on the login screen, underneath the username/password fields.
        + Note: Some HTML allowed: $allowedHTML +
      • +
      • + +
        + +
        + Displayed wherever user passwords can be changed, for directory users only.
        + Note: Some HTML allowed: $allowedHTML + +
      • +
      • + +
        + Yes   + No +
        + Ask directory users to agree to terms of services that you link to in the message above?
        + Note: Checkbox disappears once checked, date of agreement is stored and users are no longer prompted. +
      • +
      +
      +

      + +

      Powered by $wpDARef.

      +
      +________EOS; + } + + + /** + * Adds the `Directory Auth.` menu entry in the Wordpress Admin section, and the `Add Directory Authenticated User` to the Users menu + * Also activates the wpDirAuth config panel as a callback function. + * + * @uses wpDirAuth_optionsPanel + * @uses wpDirAuth_add_user_panel + */ + function wpDirAuth_addMenu() + { + if (function_exists('add_options_page')) { + add_options_page( + 'Directory Authentication Options', + 'Directory Auth.', + 9, + basename(__FILE__), + 'wpDirAuth_optionsPanel' + ); + } + } + + + /** + * Extending WP's login_form. + * Enforces the admin defined SSL login preferences and adds a directory + * login related message to the standard WP login screen. + * + * @uses WPDIRAUTH_DEFAULT_LOGINSCREENMSG + */ + function wpDirAuth_loginFormExtra() + { + if (get_site_option('dirAuthEnable')) { + + if (isset($_SERVER['SCRIPT_URI']) && preg_match('|^http|',$_SERVER['SCRIPT_URI'])) { + $selfURL = $_SERVER['SCRIPT_URI']; + } + else { + /** + * $_SERVER['SCRIPT_URI'] seems to be unavilable in some PHP + * installs, and $_SERVER['REQUEST_URI'] and $_SERVER['PHP_SELF'] + * have been known to sometimes have the same issue. + * Thanks to Todd Beverly for helping out with this one. :) + * @see http://wordpress.org/support/topic/129814?replies=27#post-605423 + */ + $selfURL = sprintf( + 'http%s://%s%s', + (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : ''), + $_SERVER['HTTP_HOST'], + (isset($_SERVER['REQUEST_URI']) + ? $_SERVER['REQUEST_URI'] + : $_SERVER["SCRIPT_NAME"].'?'.$_SERVER['QUERY_STRING']) + ); + } + + //_log('contents of selfurl: '.$selfURL); + + + if (get_site_option('dirAuthRequireSsl') && (!preg_match('|^https|',$selfURL))) { + $sslURL = str_replace('http://','https://',$selfURL); + + $refreshJS = '" />'; + $refreshMeta = ''; + $refreshMsg = 'Please access the encrypted version of this page.'; + + if (headers_sent()) { + echo $refreshJS.$refreshMeta.'

      '.$refreshMsg.'

'; + } + else { + @ob_end_clean(); + if (!@header('Location:'.$sslURL)) { + echo ''.$refreshJS.$refreshMeta.'' + . ''.$refreshMsg.''; + } + } + + exit; + } + + $dirAuthInstitution = stripslashes(get_site_option('dirAuthInstitution')); + if (!$dirAuthInstitution) $dirAuthInstitution = __('Directory'); + + $loginScreenMsg = stripslashes(get_site_option('dirAuthLoginScreenMsg')); + if (!$loginScreenMsg) $loginScreenMsg = __(sprintf( + WPDIRAUTH_DEFAULT_LOGINSCREENMSG, + get_site_option('dirAuthInstitution') + )); + + echo ' + +

'.$loginScreenMsg.'

+ '; + } + } + + + /** + * Extending WP's show_password_fields. + * Displays the directory password change message in profile.php and user.php. + * + * @return boolean Return format as expected by WP's show_password_fields() + * + * @uses WPDIRAUTH_DEFAULT_CHANGEPASSMSG + */ + function wpDirAuth_hidePassFields() + { + global $profileuser, $userdata; + + $editUserIsDirUser = get_usermeta($profileuser->ID, 'wpDirAuthFlag'); + + if (!$editUserIsDirUser) { + return true; + } + else { + // Editing directory user profile, show password msg + $message = stripslashes(get_site_option('dirAuthChangePassMsg')); + if (!$message) { + $message = __(sprintf( + WPDIRAUTH_DEFAULT_CHANGEPASSMSG, + stripslashes(get_site_option('dirAuthInstitution')) + )); + } + + if (get_site_option('dirAuthTOS')) { + // TOS option is ON + if (($TOSDate = get_usermeta($profileuser->ID, 'wpDirAuthTOS')) === '') { + if ($userdata->ID == $profileuser->ID) { + // Only show TOS acceptance checkbox to the owner of the profile. + $message .= '

' + . ' ' + . __('Accept terms of services.') + . '

'; + } + else { + // Show generic message to other admins. + $message .= '

' + . __('User has not yet agreed to the terms of services.') + . '

'; + } + } + else { + // Show TOS acceptance date + $message .= '

' + . __('Terms of services accepted on') + . ' '.$TOSDate + . '

'; + } + } + + echo '

' + . __('Directory Password Update') + . '

' + . $message + . '

'; + + return false; + } + } + + + /** + * Extending WP's profile_update. + * Saves the TOS acceptance if sent. + * + * @param integer $userID Sent by WP profile_update action + * @return boolean Return format as expected by WP's profile_update() + */ + function wpDirAuth_profileUpdate($userID){ + if (intval($_POST['wpDirAuthTOS']) === 1) { + update_usermeta($userID, 'wpDirAuthTOS', date('Y-m-d H:i:s')); + } + return true; + } + + + /** + * WP's wp_authenticate overwrite. + * Processes the directory login and creates a new user on first access. + * + * @param string $username Login form username. + * @param string $password Login form password + * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object. + * + * @uses wpDirAuth_makeCookieMarker + * @uses wpDirAuth_auth + * + * @see http://codex.wordpress.org/Pluggable_Functions + */ + function wp_authenticate($username, $password) + { + //echo 'authenticating';exit; + $boolRestoreBlog = false; + if(defined('WPDIRAUTH_MULTISITE') && WPDIRAUTH_MULTISITE){ + //echo 'I should switch blogs!';exit; + global $blog_id; + $intOriginalBlog = $blog_id; + switch_to_blog(1); //switch to the parent blog + $boolRestoreBlog = true; + } + /** + * @desc wp-hack for some reason, this function is being called even when a user just goes to the login page. added the next 3 lines so that + * if the user arrives via $_GET, then we simply tell them to login + */ + if($_SERVER['REQUEST_METHOD'] != 'POST'){ + if($boolRestoreBlog) restore_current_blog(); + return new WP_Error('incorrect_method',__('Please Login')); + } + + if (!$username) { + if($boolRestoreBlog) restore_current_blog(); + return new WP_Error('empty_username', __('Login Error: + The username field is empty.')); + } + + if (!$password) { + if($boolRestoreBlog) restore_current_blog(); + return new WP_Error('empty_password', __('Login Error: + The password field is empty.')); + } + + $enable = get_site_option('dirAuthEnable'); + $cookieMarker = get_site_option('dirAuthCookieMarker'); + + if (!$cookieMarker) { + $cookieMarker = wpDirAuth_makeCookieMarker(); + } + + /** + * Get the login object. We will use it for first user insertion or when the + * directory auth option is not activated. + */ + $login = get_userdatabylogin($username); + $loginUserIsDirUser = ($login) ? get_usermeta($login->ID, 'wpDirAuthFlag') : 0; + + if (!$enable && $loginUserIsDirUser) { + /* + * Existing directory user, but directory access has now been disabled. + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('login_disabled',__('Directory Login Error: + Sorry, but the site administrators have disabled + directory access in this WordPress install.')); + } + elseif ($enable) { + /** + * Directory auth == true + */ + + if (!$login) { + /** + * No existing account record found, try dir auth + */ + $userData = wpDirAuth_auth($username,$password); + + if ( !is_wp_error($userData) ) { + /** + * Passed directory signin, so create a new WP user + */ + require_once(ABSPATH . WPINC . '/registration.php'); + + $userLogin = sanitize_user($username); + $userEmail = apply_filters('user_registration_email', $userData['email']); + + if (username_exists($userLogin)) { + /* + * Username exists. + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('username_exists',__('Directory Login Error: + Could not create a new WP user account + because the directory username ' . htmlentities($userLogin,ENT_QUOTES,'UTF-8') . ' is already + registered on this site.')); + } + elseif (email_exists($userEmail)) { + /* + * Email exists. + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('email_exists',__('Directory Login Error: + Could not create a new WP account because + the email ' . htmlentities($userEmail,ENT_QUOTES,'UTF-8') . ' is + already registered with this site.')); + } + else { + if(defined('WPDIRAUTH_MULTISITE') && WPDIRAUTH_MULTISITE && isset($boolRestoreBlog) && $boolRestoreBlog){ + restore_current_blog(); + } + + if ($userID = wp_create_user($userLogin, $password, $userEmail)) { + $userData['ID'] = $userID; + $tmpAr = split('@',$userData['email']); + $userData['nickname'] = str_replace('.','_',$tmpAr[0]); + $userData['display_name'] = $userData['first_name'].' '.$userData['last_name']; + unset($userData['email']); + + wp_update_user($userData); + update_usermeta($userID, 'wpDirAuthFlag', 1); + wpDirAuth_remove_password_nag($userID); + //if($boolRestoreBlog) restore_current_blog(); + return new WP_User($userID); + } + else { + /* + * Unknown error. + */ + //if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('creation_unknown_error',__('Directory Login Error: + Could not create a new user account. + Unknown error. [user: ' . htmlentities($userLogin,ENT_QUOTES,'UTF-8') . ', email: ' . htmlentities($userEmail,ENT_QUOTES,'UTF-8') . ']')); + } + } + } + else { + /* + * Did not pass dir auth, and no login present in WP + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return $userData; + } + } + else { + /* + * Dealing with an existing WP account + */ + if (!$loginUserIsDirUser) { + /* + * WP-only user + */ + if ( wp_check_password($password, $login->user_pass, $login->ID) ) { + /* + * WP user, password okay. + */ + if($boolRestoreBlog) restore_current_blog(); + return new WP_User($login->ID); + } + else { + /* + * WP user, wrong pass + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('incorrect_password',__('WordPress Login Error: + Incorrect password.')); + } + } + else { + /** + * Directory user, try ldap binding + */ + $userData = wpDirAuth_auth($username,$password); + + if ( !is_wp_error($userData) ) { + /* + * Directory user, password okay. + */ + wpDirAuth_remove_password_nag($login->ID); + if($boolRestoreBlog) restore_current_blog(); + return new WP_User($login->ID); + } + else { + /* + * Directory user, wrong pass + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return $userData; + } + } + } + } + else { + /** + * Directory auth == false + */ + if (!$login || ($login->user_login != $username) ) { + /** + * No existing account record found + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('failed_login',__('WordPress Login Error: + Could not authenticate user. + Please check your credentials.')); + } + else { + /* + * Found an existing WP account. + */ + if ( wp_check_password($password, $login->user_pass, $login->ID) ) { + /* + * WP user, password okay. + */ + if($boolRestoreBlog) restore_current_blog(); + return new WP_User($login->ID); + } + else { + /* + * WP user, wrong pass + */ + if($boolRestoreBlog) restore_current_blog(); + do_action( 'wp_login_failed', $username ); + return new WP_Error('incorrect_password',__('WordPress Login Error: + Incorrect password.')); + } + } + } + } + + + /** + * WordPress wp_setcookie overwrite. + * Sets the WP session cookies. + * + * @param string $username Login form username. + * @param string $password Login form password + * @param boolean $already_md5 Has the pswd been double-hashed already? + * @param string $home + * @param string $siteurl + * @param boolean $remember + * @return void + * + * @uses wpDirAuth_makeCookieMarker + * + * @see http://codex.wordpress.org/Pluggable_Functions + */ + function wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '', $remember = false) + { + global $wpdb; + + /** + * Try to locate the user's record and define if it is an existing directory user + */ + $login = get_userdatabylogin($username); + //$login = $wpdb->get_row('SELECT ID FROM $wpdb->users WHERE user_login = '$username''); + $loginUserIsDirUser = ($login) ? get_usermeta($login->ID, 'wpDirAuthFlag') : 0; + + /** + * Get wpsDirAuth options + */ + $enable = get_site_option('dirAuthEnable'); + $cookieMarker = get_site_option('dirAuthCookieMarker'); + + if (!$cookieMarker) { + $cookieMarker = wpDirAuth_makeCookieMarker(); + } + + /** + * Set the password hash cookie + */ + if (($enable) && ($loginUserIsDirUser)) { + $password = md5($username).md5($cookieMarker); + } + else { + if (!$already_md5) { + $password = md5( md5($password) ); // Double hash the password in the cookie. + } + } + + /** + * Updated WP remember me option for directory users to only be + * remembered for 1 hour so that institutional passwords are not + * overly endangered when accessing the blog from a public terminal. + */ + if ( $remember ){ + $duration = ($loginUserIsDirUser) ? strtotime('1 hour') : strtotime('6 months'); + $expire = time() + $duration; + } + else { + $expire = 0; + } + + /** + * The rest of the logic is from the original WP wp_setcookie + * function, from /wp-inlcudes/pluggable.php version 2.2.2 + */ + if ( empty($home) ) + $cookiepath = COOKIEPATH; + else + $cookiepath = preg_replace('|https?://[^/]+|i', '', $home . '/' ); + + if ( empty($siteurl) ) { + $sitecookiepath = SITECOOKIEPATH; + $cookiehash = COOKIEHASH; + } else { + $sitecookiepath = preg_replace('|https?://[^/]+|i', '', $siteurl . '/' ); + $cookiehash = md5($siteurl); + } + + setcookie(USER_COOKIE, $username, $expire, $cookiepath, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, $password, $expire, $cookiepath, COOKIE_DOMAIN); + + if ( $cookiepath != $sitecookiepath ) { + setcookie(USER_COOKIE, $username, $expire, $sitecookiepath, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, $password, $expire, $sitecookiepath, COOKIE_DOMAIN); + } + + } + + /** + * Prints data on a variable into a comments block in the source code of a page. Used for debugging purposes only. + * + * @param mixed $mxdVar + * @param string $strMsg + */ + function wpDirAuthPrintDebug($mxdVar,$strMsg){ + echo PHP_EOL,'',PHP_EOL; + } + + /** + * Removes the "you're using a default password"" nag for dirauth accounts + * + * @param integer $userID + * @return void + */ + function wpDirAuth_remove_password_nag($userID){ + if(get_user_option('default_password_nag',$userID)){ + update_user_option($userID, 'default_password_nag', false, true); + } + } + + /** + * Retrieves values given in WPDIRAUTH_LDAP_RETURN_KEYS from a valid, bound LDAP connection + * + * @param resource $rscConnection verified LDAP connection resource + * @param string $strBaseDn + * @param string $strFilterQuery + * @param mixed $rscReult if LDAP search was already performed. default null + * @return mixed WP_Error object if there was an error encountered, otherwise an array of user details + * + * @TODO right now it's actually coded such that what is returned is always the same, even if you change the keys in WPDIRAUTH_LDAP_RETURN_KEYS. Rewrite it so + * it will dynamically retrieve the values. idea is that WPDIRAUTH_LDAP_RETURN_KEYS would become an associative array of key names to return => LDAP keys to retrieve. + * WPDIRAUTH_LDAP_RETURN_KEYS = serialize(array( + * 'first_name' =>'givenname', + * 'last_name' =>'sn', + * 'email' =>'mail' + * )); + * of course, we'll need to somehow require at least the email key since we need that one in order to add the user. + */ + function wpDirAuth_retrieveUserDetails($rscConnection,$strBaseDn,$strFilterQuery,$rscResult=NULL){ + //now that we have a valid connection and are bound, we need to find the user. + + if(is_null($rscResult)){ + $rscResult = ldap_search($rscConnection,$strBaseDn,$strFilterQuery,unserialize(WPDIRAUTH_LDAP_RETURN_KEYS)); + } + + /** + * At this point, we will no longer use $strFilterQuery EXCEPT in the output of an error message. To ensure we dont introduce an injection point, we will encode any + * html entities that might be present. + */ + $strFilterQuery = htmlentities($strFilterQuery,ENT_QUOTES,'UTF-8'); + + if(!$rscResult){ + return new WP_Error ('noprofile_search', __('Directory authentication initially succeeded, but no valid profile was found (search procedure).') + ." [$strFilter]"); + } else { + $aryUserDetails = @ldap_get_entries($rscConnection, $rscResult); + + $intCount = intval($aryUserDetails['count']); + if ($intCount < 1) { + return new WP_Error ('noprofile_getentries', __('Directory authentication initially succeeded, but no valid profile was found ("get entries" procedure).') + ." [$strFilterQuery]"); + } elseif ($intCount > 1) { + return new WP_Error ('not_unique', __('Directory authentication initially succeeded, but the username you sent is not a unique profile identifier.') + . " [$strFilterQuery]"); + } else { + $strEmail = isset($aryUserDetails[0]['mail'][0]) ? $aryUserDetails[0]['mail'][0] : ''; + + $strLastName = isset($aryUserDetails[0]['sn'][0]) ? $aryUserDetails[0]['sn'][0] : ''; + + $strFirstName = isset($aryUserDetails[0]['givenname'][0]) ? $aryUserDetails[0]['givenname'][0] : ''; + + return array( + 'email' => $strEmail, + 'last_name' => $strLastName, + 'first_name' => $strFirstName + ); + } + } + } + + /** + * Handles connecting to LDAP and performing a search for the given SSOID + * + * @param string $strSSOID + * @return mixed WP_Error object on failure, array of user details on success + * @TODO this function shares a LOT with wpDirAuth_auth. see if you cant combine them some more + */ + function wpDirAuth_ConnectAndLookupUser($strSSOID){ + $boolFound = false; + + $strBaseDn = get_site_option('dirAuthBaseDn'); + $strPreBindUser = get_site_option('dirAuthPreBindUser',''); + $strPreBindPassword = get_site_option('dirAuthPreBindPassword',''); + $strAccountSuffix = get_site_option('dirAuthAccountSuffix'); + $strFilter = get_site_option('dirAuthFilter'); + $intEnableSSL = get_site_option('dirAuthEnableSsl'); + + if ($strAccountSuffix) $strSSOID .= $strAccountSuffix; + + if (!$strFilter || empty($strFilter)) $strFilter = WPDIRAUTH_DEFAULT_FILTER; + + $strFilterQuery = "($strFilter=$strSSOID)"; + + $aryControllers = wpDirAuth_shuffleControllers(explode(',', get_site_option('dirAuthControllers'))); + + if(is_wp_error($aryControllers)){ + return $aryControllers; //there werent any controllers to connect to + } + + /** + * @todo if we get a successful connection, cant we break out of the loop before we go through binding and a search? Or is it possible that one DC in the + * list might not allow anonymous searching and/or the pre-bind user/pass isnt valid on one of them and we need to try the next in the list? + */ + foreach($aryControllers as $strDC){ + $rscConnection = wpDirAuth_establishConnection($strDC,$intEnableSSL); + if(is_wp_error($rscConnection)){ + return $rscConnection; //tls failed to start on the DC + } + + if(!wpDirAuth_bindTest($rscConnection,$strPreBindUser,$strPreBindPassword,$strBaseDn)){ + return new WP_Error('login_failed',__('Error Connecting to LDAP Server

' + . 'There was an error connecting to your LDAP server ('. htmlentities($strDC,ENT_QUOTES,'UTF-8').'). Please see the LDAP error message below for troubleshooting:

' + . ldap_error($rscConnection))); + } + + //successfully bound, now we need to get the user details + return wpDirAuth_retrieveUserDetails($rscConnection,$strBaseDn,$strFilterQuery); + } + } + + /** + * Checks to make sure the user doesnt already exist and that the email associated with a SSOID isnt already in use in the blog, and if not, adds the user. + * + * @param string $strSSOID Single Sign On ID + * @param string $strRole Role chosen to give the new user + * @return mixed array of user details on success or WP_Error object on failure + */ + function wpDirAuth_add_new_user($strSSOID,$strRole,$intBlogID = 0){ + /** + * We need to see if the user name already exists. if not, then we need to see if the email address is already in use, if not, then we need to try and look + * up the user. then if we actually found something, then we'll add them into wordpress + */ + $strSSOID = sanitize_user($strSSOID); + $intBlogID = is_int($intBlogID) ? $intBlogID : (int) $intBlogID; //just to make sure + + if(username_exists($strSSOID)){ + echo '

user already exists

'; + return new WP_Error('username_exists',__('

Could not create a new Wordpress account because the directory username ' + . htmlentities($strSSOID,ENT_QUOTES,'UTF-8') . ' is already registered on this site.

')); + } + + //we'll have to go ahead and look them up in LDAP in order to check their email address + $aryUserDetails = wpDirAuth_ConnectAndLookupUser($strSSOID); + if(is_wp_error($aryUserDetails)){ + return $aryUserDetails; + } + $strUserEmail = apply_filters('user_registration_email', $aryUserDetails['email']); + + if(email_exists($strUserEmail)){ + echo '

Email address already exists

'; + return new WP_Error('email_exists',__('Could not create a new WP account because the email ' + . htmlentities($strUserEmail,ENT_QUOTES,'UTF-8') . ' is already registered with this site.')); + } + + $aryUserDetails['user_pass'] = mt_rand();//we're going to store a random password in WP since directory users will never use it to log in anyway' + $aryUserDetails['user_login'] = $strSSOID; + $aryUserDetails['user_email'] = $aryUserDetails['email'] = $strUserEmail; + /** + * @TODO ask Stephen why he's replacing .'s with _'s in the user name of the email address. Does nickname not allow spaces? + */ + $tmpAr = split('@',$aryUserDetails['email']); + $aryUserDetails['nickname'] = str_replace('.','_',$tmpAr[0]); + $aryUserDetails['display_name'] = $aryUserDetails['first_name'].' '.$aryUserDetails['last_name']; + $aryUserDetails['role'] = $strRole; + + /** + * Switch to the blog we want to insert the user into + */ + if(defined('MULTISITE') && MULTISITE && function_exists('switch_to_blog')) switch_to_blog($intBlogID); + $intUserID = wp_insert_user($aryUserDetails); + + if(!is_int($intUserID)){ + return new WP_Error('createuser_failed',__('For an unknow reason, WP failed to create a new user.' + .' Failure occurred at line ' . __LINE__ . ' in the function ' . __FUNCTION__ . ' in the file ' . basename(__FILE__) . '.')); + } + + $aryUserDetails['ID'] = $intUserID; + update_usermeta($intUserID, 'wpDirAuthFlag', 1); + wpDirAuth_remove_password_nag($intUserID); + + //for situations where an admin is adding a user from a site edit screen + /** + if($intBlogID != 0){ + add_user_to_blog($intBlogID,$intUserID,$strRole); + } */ + + if(defined('MULTISITE') && MULTISITE && function_exists('switch_to_blog')) restore_current_blog(); + return $aryUserDetails; + } + + /** + * Loops through the WP_Error object and prints out the error messages it contains + * + * @param object $objError + * @return void + */ + function wpDirAuth_print_error_messages($objError){ + echo PHP_EOL,'
',WPDIRAUTH_ERROR_TITLE,'
    ',PHP_EOL; + foreach($objError->get_error_messages() as $strErrMsg){ + echo '
  • ',$strErrMsg,'
  • ',PHP_EOL; + } + echo '
',PHP_EOL; + } + + /** + * Constructs the message to be displayed when a new user has been added successfully + * + * @param string $strSSOID User's Single Sign On ID + * @param integer $strUserID user's wordpress user ID + * @param array Data on the sites and roles that the user has been added to + * @return string + * @uses wpDirAuth_determine_A_or_An + * + */ + function wpDirAuth_construct_success_msg($strSSOID,$strUserID,$arySitesData,$strExtraMsg=''){ + //$arySitesData = array('blogname','role','siteurl'); + $strMsg = '
+

Just created user %s as %s. %s +

'; + + $strSiteMessage = '%s for site %s'; + $arySiteMsgParts = array(); + foreach($arySitesData as $arySiteData){ + $arySiteMsgParts[] = sprintf($strSiteMessage,$arySiteData['role'],$arySiteData['siteurl'],$arySiteData['blogname']); + } + + return sprintf($strMsg,$strUserID,$strSSOID,implode($arySiteMsgParts,', '),$strExtraMsg); + } + + /** + * Just determines if the word $strWord should be prefaced with 'a' or 'an'. + * Yea, i know it's picky, but I work with editors who complain about this type of stuff all the time =P + * + * @param string $strWord + * @return string + */ + function wpDirAuth_determine_A_or_An($strWord){ + $strAorAn = 'a'; + if(in_array(substr($strWord,0,1),array('a','e','i','o','u'))){ + $strAorAn .= 'n'; + } + + return $strAorAn; + } + + /** + * Adds contextual help to the Add Dir Auth page under the Users menu + * + */ + function wpDirAuth_add_user_contextual_help(){ + $strMarketingSSOID = get_site_option('dirAuthMarketingSSOID','Username'); + add_contextual_help('users_page_'.basename(__FILE__,'.php'), + '

' . __('To add a directory authenticated user from your institution to your site, fill in the form on this screen. If you’re not sure which role to assign, you can use the link below to review the different roles and their capabilities. Here is a basic overview of roles:') . '

' . + '
    ' . + '
  • ' . __('Administrators have access to all the administration features.') . '
  • ' . + '
  • ' . __('Editors can publish posts, manage posts as well as manage other people’s posts, etc.') . '
  • ' . + '
  • ' . __('Authors can publish and manage their own posts.') . '
  • ' . + '
  • ' . __('Contributors can write and manage their posts but not publish posts or upload media files.') . '
  • ' . + '
  • ' . __('Subscribers can read comments/comment/receive newsletters, etc.') . '
  • ' . + '
' . + '

' . __('The user\'s insitutional single-sign-on ID (e.g. ' . $strMarketingSSOID .') will become the user\'s Wordpress username.') . '

' . + '

' . __('New users will receive an email letting them know they’ve been added as a user for your site.') . '

' . + '

' . __('Remember to click the Add User button at the bottom of this screen when you are finished.') . '

' . + '

' . __('For more information:') . '

' . + '

' . __('Support Forums') . '

' + ); + } + + /** + * Processes and outputs the Add Dir Auth user form. + * @return void + */ + function wpDirAuth_add_user_panel(){ + _log('WPDIRAUTH - function ' . __FUNCTION__ . ' activated. '); + /** + * Still needed? + */ + global $id; + /** + * get_current_screen()->id = site-users-network will let us know if we are on the sites,edit,user tab + */ + $strScreenID = get_current_screen()->id; + /** + * Are we running in a wordpress network and in the network area? + */ + $boolIsNetworkAdminScreen = (is_network_admin() && $strScreenID != 'site-users-network') ? true : false; + /** + * How do we refer to their SSOID? + */ + $strMarketingSSOID = get_site_option('dirAuthMarketingSSOID','Username'); + + $strReferer = wpDirAuth_get_referer(); + + /** + * defaults + */ + $strWpDirAuthSSOID = ''; + $strWpDirAuthRole = ''; + $boolConfirmationEmail = true; + $objErrors = new WP_Error; + $strSuccess = ''; + if($boolIsNetworkAdminScreen){ + $arySitesData = wpDirAuth_retrieve_multisite_blog_data(); + } + + if($_POST){ + if(wp_verify_nonce($_POST['_wpnonce_add-da-user'],'add-da-user')){ + /** + * We gots a problem.... if they've checked all the boxes and chosen roles but forgot to enter the pawprint (it happens, you did + * it yourself!) then we cant rebuild the list of which sites were checked/not checked later because we're jumping out before + * we get to the point where we build that data. + */ + if(isset($_POST['ssoid']) && $_POST['ssoid'] == ''){ + $objErrors->add('blank_ssoid',__('

'.$strMarketingSSOID.' can not be left blank.

')); + } else { + $strWpDirAuthSSOID = wpDirAuth_sanitize($_POST['ssoid']); + + if($boolIsNetworkAdminScreen && $strReferer != 'site-users.php'){ + $arySitesAndRoles = array(); + $aryValidSiteIDs = array_keys($arySitesData); + $aryValidRoles = array_keys(get_editable_roles()); + _log('contents of the post in function ' . __FUNCTION__.' at line ' . __LINE__ . ':'.PHP_EOL.var_export($_POST,true)); + //we SHOULD have at least one site set. + for($i=0;$i0 && $intCountPostSite<3){ + if($intCountPostSite == 1 && is_string(current($_POST[$strPostSite]))){ + /** + * If the array has only one element, then this site wasnt selected as one we want to add the user to. but we + * need, for simplicity sake, to make the array contain two elements before we do input validation + */ + $_POST[$strPostSite] = array('',current($_POST[$strPostSite])); + /** + * Since we know that the array has two elements, we'll test to make sure the siteid is valid' + */ + } elseif(!is_numeric($_POST[$strPostSite][0]) || !in_array($_POST[$strPostSite][0],$aryValidSiteIDs)) { + $_POST[$strPostSite][0] = ''; + } + + /** + * + */ + if(!in_array($_POST[$strPostSite][1],$aryValidRoles)){ + $_POST[$strPostSite][1] = ''; + } + + /** + * If we now have non-empty values for both elements, we'll add them to our array to be used for inserting the user into sites + */ + if($_POST[$strPostSite][0] != '' && $_POST[$strPostSite][1] != ''){ + $arySitesAndRoles[$i] = array('blog_id'=>$_POST[$strPostSite][0],'role'=>$_POST[$strPostSite][1]); + } + + } + } + + } + + $strWpDirAuthRole = (isset($_POST['role']) && in_array($_POST['role'],array_keys(get_editable_roles()))) ? $_POST['role'] : get_site_option('default_role'); + $intBlogID = (isset($_POST['id']) && is_numeric($_POST['id'])) ? intval($_POST['id']) : ''; + if(isset($_POST['noconfirmation']) && $_POST['noconfirmation'] == 1) $boolConfirmationEmail = false; + + if(!isset($arySitesAndRoles) || !$boolIsNetworkAdminScreen){ + $aryUserData = wpDirAuth_add_new_user($strWpDirAuthSSOID,$strWpDirAuthRole,$intBlogID); + _log('adding a standard user (' . $strWpDirAuthSSOID .')from either inside a site, or from the edit section of a site'); + _log('user data from newly added user is : ' . PHP_EOL . var_export($aryUserData,true) . PHP_EOL); + } elseif(count($arySitesAndRoles)<1) { + $aryUserData = new WP_Error('no_site_role_selected','

You will need to select at least one site to add this user to.

'); + } else { + $aryUserData = wpDirAuth_add_new_user_to_multi_sites($strWpDirAuthSSOID,$arySitesAndRoles); + _log('adding a user (' . $strWpDirAuthSSOID .')from the network Add Dir Auth user section'); + } + + if(is_wp_error($aryUserData)){ + //foreach($objErrors->) + + //$mxdErrors = $aryUserData; + $objErrors->add($aryUserData->get_error_code(),$aryUserData->get_error_message(),$aryUserData->get_error_data()); + } else { + $arySitesAddedTo = array(); + if(isset($arySitesAndRoles) && count($arySitesAndRoles)!=0){ + foreach($arySitesAndRoles as $arySiteData){ + $arySitesAddedTo[] = array( + 'blogname'=>$arySitesData[$arySiteData['blog_id']], + 'aoran' =>wpDirAuth_determine_A_or_An($arySiteData['role']), + 'role' =>$arySiteData['role'], + 'siteurl' =>get_site_url($arySiteData['blog_id'],'','https') + + ); + } + } else { + $arySitesAddedTo[] = array( + 'blogname' =>get_site_option('blogname'), + 'aoran' =>wpDirAuth_determine_A_or_An($strWpDirAuthRole), + 'role' =>$strWpDirAuthRole, + 'siteurl' =>site_url() + ); + } + + /** + * ok, the admin has just successfully added a user to a site from the sites->edit->users tab. Since we cant seem to + * redirect them back to the screen automatically, let's give them a link to go back.' + */ + if($strReferer == 'site-users.php' && $boolIsNetworkAdminScreen){ + $strReturnToURL = wp_get_referer(); + $strExtraMessage = 'Return to the User tab of the '. $arySitesData[$intBlogID] . ' site.'; + } else { + $strExtraMessage = ''; + } + + $strSuccess = wpDirAuth_construct_success_msg($strWpDirAuthSSOID,$aryUserData['ID'],$arySitesAddedTo,$strExtraMessage); + _log('for user ' . $strWpDirAuthSSOID . ', added them to ' . var_export($arySitesAddedTo,true).'.'); + + if($boolConfirmationEmail){ + foreach($arySitesAddedTo as $arySiteAddedToData){ + $strMsg = sprintf(WPDIRAUTH_EMAIL_NEWUSER_NOTIFY,$arySiteAddedToData['blogname'],$arySiteAddedToData['aoran'],$arySiteAddedToData['role'],$strMarketingSSOID,$strWpDirAuthSSOID,$arySiteAddedToData['siteurl'].'/wp-login.php'); + wp_mail($aryUserData['email'],'['.$arySiteAddedToData['blogname'].'] You\'ve been added!',$strMsg); + } + } + + //reset back to defaults + $strWpDirAuthSSOID = ''; + $strWpDirAuthRole = ''; + $boolConfirmationEmail = true; + } + } + } else { + $objErrors->add('invalid-nonce',__('Invalid nonce value')); + } + } + + + + +?> +

Add New Directory Authentication User

+errors) != 0) { + wpDirAuth_print_error_messages($objErrors); + } elseif($strSuccess != ''){ + echo $strSuccess; + } +?>

+

Directory Auth settings page.') ?>

+ +
> + ',PHP_EOL; + } + ?> + + + + + + + + + + + + + $strSiteName){ + $boolChecked = false; + + if(isset($arySitesAndRoles[$i])){ + $aryFormSiteData = $arySitesAndRoles[$i]; + } elseif(isset($_POST['site'.$i])) { + $aryFormSiteData = $_POST['site'.$i]; + } else { + $aryFormSiteData = array(); + } + + _log('aryFormSiteData at line ' . __LINE__ . ': ' . var_export($aryFormSiteData,true)); + + /** + * We are working on the assumption that there are either ALWAYS two elements in aryformSiteData or the array is empty. + * If the first element in the array isnt empty, then the current site needs to be checked + */ + if(reset($aryFormSiteData) != ''){ + $boolChecked = true; + } + + /** + * If the last element (eg second, role) isnt empty, then we want to select it from the list + */ + $strRoleSelected = (end($aryFormSiteData) != '') ? current($aryFormSiteData) : ''; + + echo ' + + + '; + ++$i; + } + + ?> + + + + + + + + + + +
+ + + +
+   '.$strSiteName.' + + +
+
+ + 'createusersub' ) ); ?> + +
+ +get_results($wpdb->prepare('SELECT blog_id FROM '. $wpdb->prefix . 'blogs ORDER BY blog_id')); + _log('result of arySites: '.PHP_EOL.var_export($arySites,true).PHP_EOL); + foreach($arySites as $objSiteData){ + $intSiteKey = $objSiteData->blog_id; + $strTableName = $wpdb->prefix; + $strTableName .= ($intSiteKey != 1) ? $intSiteKey . '_' : ''; + $strTableName .= 'options'; + /** + * Wonder if I should do wpdb->get_var here instead? + */ + $arySiteData = $wpdb->get_results($wpdb->prepare("SELECT option_value from $strTableName WHERE option_name = 'blogname'"),ARRAY_A); + $aryBlogData[$intSiteKey] = (isset($arySiteData[0]['option_value']) && $arySiteData[0]['option_value'] != '') ? $arySiteData[0]['option_value'] : 'Unable to Retrive Blog Name'; + } + _log('aryBlogData:'.PHP_EOL.var_export($aryBlogData,true).PHP_EOL); + return $aryBlogData; + } + + /** + * put your comment there... + * + * @param string $strSSOID + * @param array $aryBlogIDsRoles should be a nested array with the sub-array containing the keys 'blog_id' and 'role' + * @return mixed WP_Error or user details upon success. + */ + function wpDirAuth_add_new_user_to_multi_sites($strSSOID,$aryBlogIDsRoles){ + $mxdFirstElement = reset($aryBlogIDsRoles);//reset back to the beginning + if(count($aryBlogIDsRoles)<1 || !$mxdFirstElement){ + return new WP_Error('blog_id_role_missing',__('

Could not create a new Wordpress account because data on blog id and role is ' + . 'missing. Function: ' . __FUNCTION__.', line ' . __LINE__.'.

')); + } else { + + $aryFirstSite = current($aryBlogIDsRoles); + $aryUserData = wpDirAuth_add_new_user($strSSOID,$aryFirstSite['role'],$aryFirstSite['blog_id']); + if(is_wp_error($aryUserData)){ + return $aryUserData; + } else { + //we already added for the first site + unset($aryBlogIDsRoles[key($aryBlogIDsRoles)]); + foreach($aryBlogIDsRoles as $arySiteDetails){ + add_user_to_blog($arySiteDetails['blog_id'],$aryUserData['ID'],$arySiteDetails['role']); + } + } + + return $aryUserData; + } + } + + function wpDirAuth_get_referer(){ + $strReferer = basename(wp_get_referer()); + if(strpos($strReferer,'?') !== FALSE){ + $aryRefererParts = explode('?',$strReferer); + $strReferer = $aryRefererParts[0]; + } + + return $strReferer; + } +} + +register_activation_hook(__FILE__, 'wpDirAuth_activation'); + +function wpDirAuth_activation($network_wide){ + if($network_wide){ + /** + * Prior to v1.7.5, wpDirAuth options were stored in wp_options when + * network activated instead of wp_sitemeta. To ensure that users dont + * lose their settings when upgrading to 1.7.5 or newer, we'll check + * to see if there are wpDirAuth options in wp_options when network + * activating. If so, we'll copy them over to wp_sitemeta and then + * delete them from wp_options + */ + $mxdWpDirAuthEnable = get_option('dirAuthEnable'); + if(is_integer($mxdWpDirAuthEnable) && $mxdWpDirAuthEnable !== FALSE){ + foreach(unserialize(WPDIRAUTH_OPTIONS) as $strOption){ + update_site_option($strOption, get_site_option($strOption)); + delete_option($strOption); + } + } + } +} + +if(!function_exists('_log')){ + /** + * For logging debug messages into the debug log. + * + * @param mixed $message + */ + function _log( $message, $boolBackTraced = false ) { + _wpdirauth_log($message,null,$boolBackTraced); + } +} + +if(!function_exists('_wpdirauth_log')){ + /** + * For logging debug messages into the debug log. + * + * @param mixed $mxdVariable variable we need to debug + * @param $strPrependMessage message to include + * @param boolean $boolBackTraced + * @param array $aryDetails details for doing a mini backtrace instead of the full thing + * + */ + function _wpdirauth_log( $mxdVariable, $strPrependMessage = null, $boolBackTraced = false, $aryDetails = array() ) { + $boolBackTrace = false; + if( WP_DEBUG === true ){ + $strMessage = 'WPDIRAUTH: '; + + if(count($aryDetails) > 0){ + if(isset($aryDetails['line'])){ + $strMessage .= 'At line number ' . $aryDetails['line'] . ' '; + } + + if(isset($aryDetails['func'])){ + $strMessage .= 'inside of function ' . $aryDetails['func'] . ' '; + } + + if(isset($aryDetails['file'])){ + $strMessage .= 'in file ' . $aryDetails['file'] .' '; + } + + $strMessage .= PHP_EOL; + } + + if(!is_null($strPrependMessage)) $strMessage .= $strPrependMessage.' '; + + if( is_array( $mxdVariable ) || is_object( $mxdVariable ) ){ + $strMessage .= PHP_EOL . var_export($mxdVariable,true); + } else { + $strMessage .= $mxdVariable; + } + + if($boolBackTrace && $boolBackTraced){ + $aryBackTrace = debug_backtrace(); + + $strMessage .= PHP_EOL.'Contents of backtrace:'.PHP_EOL.var_export($aryBackTrace,true).PHP_EOL; + } + + error_log($strMessage); + } + } +} + +?> \ No newline at end of file