diff --git a/Readme.mkd b/Readme.mkd index 29a20b9..64fb479 100644 --- a/Readme.mkd +++ b/Readme.mkd @@ -1 +1,57 @@ -# Rinse and Repeat. \ No newline at end of file +# WordPress Skeleton + + +**Wordpress Version**: 2.9.3 (WordPress 3.0 Beta version available in [`3.0`]() branch) + +## Installation + +> git clone +> git submodule init +> git submodule update + +This will pull the latest of all git-powered plugins/themes + +## Enhanced Configurations + +* WordPress installed in `/blog/`, but will serve site from `/` +* Robust `wp-config.php` + - built to support dev + production environments w/ debugging + - Default FTP connection info for installing/updating/deleting components + - +* Ready to go `.htaccess` +* Ready to go `robots.txt` + +## Available Themes + +* [KennethReitz's Wordpress Theme Skeleton](http://github.com/kennethreitz/wordpress-theme-skeleton) +* [Jumpchart's Content Wireframing Theme](http://www.jumpchart.com/tour/wordpress/) + +## Available Plugins + +* After the Deadline (Spelling and grammar checking) +* Akismet (Comment spam destroyer) +* Collabpress (Project tracking within backend) +* CoreyLib (Universal API parser + cache) +* Disable Updates (I got sick of client sites breaking on updates) +* Disqus Commenting System (Socialize your site) +* Front End Editor (Beautiful plugin for editing a page/post's content on the spot) +* Google Sitemap Generator (Google wants the latest) +* Markdown 1.3 (I don't like typing HTML all the time) +* More Fields (No more ugly custom fields + custom post/page types) +* PageMash (Content-heavy sites can be cumbersome) +* PushPress (Support for PubSubHubbub) +* Redirection (They are called permalinks for a reason) +* Role Manager (Turns WordPress into a real CMS) +* Shopp (The total ecommerce package) +* Tantan S3 (Amazon S3 for WordPress uploads) +* Twitter Tools (AutoPost to Twitter when a post goes live. Soon to be replaced with Salsa ) +* Clippy Syntax Highlighter (GeSHi + Clippy from GitHub for one-click copying of code) +* WP-Dummy Content (Fills your WordPress installation w/ dummy content) +* WP-Minify (Fantastic Auto minification plugin w/ cacheing) +* WP-Super Cache (Very robust plugin for cacheing Posts and/or Pages) +* WP-Touch (One click iPhone support) + + + + +# Rinse and Repeat :) \ No newline at end of file diff --git a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd b/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd deleted file mode 100644 index babe724..0000000 --- a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd +++ /dev/null @@ -1,17 +0,0 @@ -# Asynchronous Google Analytics Plugin for WordPress - -## What is this? -As you know, Google Analytics is the web's premier analytics tracking and analysis tool. -Until recently, it has been a (very small) bear to load to page, since it would block content downloads until it was finished loading. To fix this, Google recently announced it's new Asynchronous JavaScript loading capabilities. This will heavily increase your site's loading speed. - -## When happend? -As soon as they did this, the world freaked out, and everyone started talking about it. However, no one decided to make a WordPress plugin to do all the 'hard work' for you. - -## I wanna' play! -So, Kenneth Reitz (http://kennethreitz.com) decided to capitalize on this by, naturally, building a plugin for the masses to utilize this amazing new offering and giving it away for free. - -**Enjoy.** - -Oh, To install, copy *this folder* to: - - wp-content/plugins/ . \ No newline at end of file diff --git a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php b/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php deleted file mode 100644 index d613fc3..0000000 --- a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php +++ /dev/null @@ -1,78 +0,0 @@ -Kenneth Reitz. - Author: Kenneth Reitz - Author URI: http://kennethreitz.com - Version: 0.3 - */ - -add_action('admin_menu', 'asyncga_admin_menu'); - -function asyncga_snippet() { ?> -

'; - _e('Options saved.', 'google_analytics_id' ); - echo '

'; - } - - echo '
'; - echo "

" . __( 'Asynchronous Google Analytics Settings', 'google_analytics_id' ) . "

"; -?> -

Given the opportunity, this will… surprise you.

- -
- -

It's time, my son.

-

To take advantage of Google Analytics' ultra-fast Asynchronous JavaScript Loader,
enter your Tracking ID below, and everything will suddenly fit together.

- - -

- -

- -

Note: If you don't know what your Tracking ID is, then you don't deserve to benefit from this.

- -

- -

- -
-
- - - - \ No newline at end of file diff --git a/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf b/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf deleted file mode 100644 index e46886c..0000000 Binary files a/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf and /dev/null differ diff --git a/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php b/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php deleted file mode 100644 index 3838493..0000000 --- a/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php +++ /dev/null @@ -1,35 +0,0 @@ -Kenneth Reitz. - Author: Kenneth Reitz - Author URI: http://kennethreitz.com - Version: 0.3 - */ - - - -function clippy($text='copy-me') { ?> - - - - - - - - - - - \ No newline at end of file diff --git a/blog/wp-content/plugins/coreylib-wordpress-plugin b/blog/wp-content/plugins/coreylib-wordpress-plugin new file mode 160000 index 0000000..3a486c7 --- /dev/null +++ b/blog/wp-content/plugins/coreylib-wordpress-plugin @@ -0,0 +1 @@ +Subproject commit 3a486c738a9c9480e55210fc3da4290a1efbd006 diff --git a/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php b/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php deleted file mode 100755 index 6868306..0000000 --- a/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php +++ /dev/null @@ -1,89 +0,0 @@ - $className) { - $themeAdvancedStylesString[] = $displayName.'='.$className; - } - - $themeAdvancedStylesString = implode(';', $themeAdvancedStylesString); - } - - // Update the editor init configuration with our custom styles - $initArray['theme_advanced_styles'] = $themeAdvancedStylesString; - - return $initArray; -} - -/** - * Imports any custom stylesheets into the editor - * - * @param string $css - * @return string - */ -function ccs_custom_style($css) { - // Hook! - $configuration = apply_filters('customclassselector_configuration', array('stylesheet_url' => $css)); - - return $configuration['stylesheet_url']; -} - -/** - * Adds the 'styleselect' control to the top row of editor buttons. - * - * @param array $buttons - * @return array - */ -function ccs_styleselect_button($buttons){ - array_push($buttons, 'separator', 'styleselect'); - return $buttons; -} - -?> diff --git a/blog/wp-content/plugins/custom-class-selector/functions-sample.php b/blog/wp-content/plugins/custom-class-selector/functions-sample.php deleted file mode 100755 index 95ef940..0000000 --- a/blog/wp-content/plugins/custom-class-selector/functions-sample.php +++ /dev/null @@ -1,19 +0,0 @@ - 'classname' - $configuration['custom_styles'] = array( - 'Bold and Blue' => 'boldblue', - 'Italic and Red' => 'italicred' - ); - - return $configuration; -} -add_filter('customclassselector_configuration', 'CCSConfiguration'); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/custom-class-selector/readme.txt b/blog/wp-content/plugins/custom-class-selector/readme.txt deleted file mode 100755 index 4fa22f4..0000000 --- a/blog/wp-content/plugins/custom-class-selector/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -=== Custom Class Selector === -Contributors: forgueam, tammyhart -Tags: css, custom, editor, formatting, html, style, theme, tinymce -Requires at least: 2.8 -Tested up to: 2.8.5 -Stable tag: 0.1 - -Allows users to style their post content using custom classes made available by the active theme. - -== Description == - -The Custom Class Selector plugin allows users to style their post content using -custom classes made available by the active theme. Theme developers can make -custom style classes available within the visual editor by adding a simple -function to the functions.php file included with their theme. - -== Installation == - -This plugin follows the [standard WordPress installation method][]: - -1. Upload the `custom-class-selector` folder to the `/wp-content/plugins/` directory -1. Activate the plugin through the 'Plugins' menu in WordPress -1. Custom style classes can be selected from the 'Styles' menu in the visual editor - -[standard WordPress installation method]: http://codex.wordpress.org/Managing_Plugins#Installing_Plugins - -== Frequently Asked Questions == - -= How can I use the custom classes? = - -When editing a post or page using the visual editor, you may select custom classes -from within the "Styles" menu on the editor toolbar. - -= Theme Developers: How do I define custom classes for my theme? = - -Please reference the functions-sample.php file included with this plugin. This -file contains an example of the code that needs to be added to the functions.php -file within your theme directory. Copy the code and make sure to change the -configuration values accordingly. - -= How do I get help if I have a problem? = - -Please direct support questions to the "Plugins and Hacks" section of the -[WordPress.org Support Forum][]. Just make sure and include the tag -'custom-class-selector'. - -[WordPress.org Support Forum]: http://wordpress.org/support/ - -== Changelog == - -= version 0.1 (Nov 05, 2009) = - - In the beginning ... \ No newline at end of file diff --git a/blog/wp-content/plugins/disable-updates-wordpress-plugin b/blog/wp-content/plugins/disable-updates-wordpress-plugin new file mode 160000 index 0000000..fb56931 --- /dev/null +++ b/blog/wp-content/plugins/disable-updates-wordpress-plugin @@ -0,0 +1 @@ +Subproject commit fb56931720b64b5297daf133a3ca8eef1d52c309 diff --git a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/README b/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/README deleted file mode 100644 index e69de29..0000000 diff --git a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php b/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php deleted file mode 100644 index f0e1204..0000000 --- a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php +++ /dev/null @@ -1,17 +0,0 @@ -Google Chrome Frame if available. And it's all thanks to Kenneth Reitz! - Author: Kenneth Reitz - Author URI: http://kennethreitz.com - Version: 1.0 - */ - -add_action('admin_menu', 'gopenid_admin_menu'); - -function chromeframe_snippet() { ?> - -Kenneth Reitz! - Author: Kenneth Reitz - Author URI: http://kennethreitz.com - Version: 0.3 - */ - -add_action('admin_menu', 'gopenid_admin_menu'); - -function gopenid_snippet() { ?> - - -    

'; - _e('Options saved.', 'google_id' ); - echo '

'; - } - - echo '
'; - echo "

" . __( 'My Google OpenID Settings', 'google_id' ) . "

"; -?> -

Given the opportunity, this will… surprise you.

- -
- -

It's time, my son.

-

To take advantage of Google Profile's fantastic OpenID on your blog,
enter your Google Profile ID (last part of the URL) below, and everything will feel just right.

- - -

- -

- -

Note: If you don't know what your Google Profile ID is, then you don't need this anyway.

- -

- -

- -
-
- - - - Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis - This software is released under the MIT License -*/ -var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write(" - \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/podcasting-player.php b/blog/wp-content/plugins/podcasting/podcasting-player.php deleted file mode 100755 index 4c36072..0000000 --- a/blog/wp-content/plugins/podcasting/podcasting-player.php +++ /dev/null @@ -1,269 +0,0 @@ -_playerAdded[$post->ID] = true; - - # Extract the information from the shortcode - extract( shortcode_atts( array( - 'format' => 'mp3', - 'width' => get_option('pod_player_width'), - 'height' => get_option('pod_player_height'), - 'flashvars' => '' - ), $atts ) ); - - # Increase the id count - $this->_id++; - - # Display the correct player - if ( 'mp3' == $format && get_option('pod_player_use_video') == 'no' ) - return $this->audioPlayer($content, $width, $height, $flashvars); - elseif ( 'video' == $format || get_option('pod_player_use_video') == 'yes' ) - return $this->videoPlayer($content, $width, $height, $flashvars); - } - - /** - * The audio player - * @return the HTML for the audio player - **/ - function audioPlayer($content, $width, $height, $flashvars) - { - $podcasting_player_url = plugins_url('/podcasting/player/player.swf'); - - # Grab the player's surrounding text - $podcasting_text_above = stripslashes(get_option('pod_player_text_above')); - $podcasting_text_before = stripslashes(get_option('pod_player_text_before')); - $podcasting_text_below = stripslashes(get_option('pod_player_text_below')); - $podcasting_text_link = get_option('pod_player_text_link'); - - # Text above the player - if ( $podcasting_text_above != '' ) { - if ( 'above' == $podcasting_text_link ) - $podcasting_text_above = "

$podcasting_text_above

"; - else - $podcasting_text_above = "

$podcasting_text_above

"; - } - - # Text immeaditely before the player - if ( $podcasting_text_before != '' ) { - if ( 'before' == $podcasting_text_link ) - $podcasting_text_before = "$podcasting_text_before "; - else - $podcasting_text_before .= ' '; - } - - # Text below the player - if ( $podcasting_text_below != '' ) { - if ( 'below' == $podcasting_text_link ) - $podcasting_text_below = "

$podcasting_text_below

"; - else - $podcasting_text_below = "

$podcasting_text_below

"; - } - - # Add the flashvars if any - if ( $flashvars != '' ) - $flashvars = ', ' . $flashvars; - - # Check if is a feed - if ( is_feed() ) { - return $podcasting_text_above . $podcasting_text_before . '' . $content . '' . $podcasting_text_below; - } else { - return $podcasting_text_above . $podcasting_text_before . '  - - ' . $podcasting_text_below; - } - } - - /** - * The video player - */ - function videoPlayer($content, $width, $height, $flashvars) { - $podcasting_player_url = plugins_url('/podcasting/player/mediaplayer.swf'); - - # Check to make sure the width and height have values - $width = ( $width == '' ) ? '400' : $width; - $height = ( $height == '' ) ? '300' : $height; - - # Add the flashvars, if any - $global_flashvars = stripslashes(get_option('pod_video_flashvars')); - $global_flashvars = ( $global_flashvars != '' ) ? ', ' . $global_flashvars : ''; - $flashvars = ( $flashvars != '' ) ? ', ' . $flashvars : ''; - - # Grab the player's surrounding text - $podcasting_text_above = stripslashes(get_option('pod_player_text_above')); - $podcasting_text_before = stripslashes(get_option('pod_player_text_before')); - $podcasting_text_below = stripslashes(get_option('pod_player_text_below')); - $podcasting_text_link = get_option('pod_player_text_link'); - - # Above the player - if ( $podcasting_text_above != '' ) { - if ( 'above' == $podcasting_text_link ) - $podcasting_text_above = "

$podcasting_text_above

"; - else - $podcasting_text_above = "

$podcasting_text_above

"; - } - - # Text right before the player - if ( $podcasting_text_before != '' ) { - if ( 'before' == $podcasting_text_link ) - $podcasting_text_before = "$podcasting_text_before "; - else - $podcasting_text_before .= ' '; - } - - # Text below the player - if ( $podcasting_text_below != '' ) { - if ( 'below' == $podcasting_text_link ) - $podcasting_text_below = "

$podcasting_text_below

"; - else - $podcasting_text_below = "

$podcasting_text_below

"; - } - - # Check if is a feed - if ( is_feed() ) { - return $podcasting_text_above . '' . $content . '' . $podcasting_text_below; - } else { - return $podcasting_text_above . ' ' . $podcasting_text_below . ' - '; - } - } - - /** - * Adds the player's javascript to the page - */ - function addPlayerScripts() { - wp_enqueue_script('swfobject', plugins_url('/podcasting/player/swfobject.js'), false, '2.1'); - wp_enqueue_script('audio-player', plugins_url('/podcasting/player/audio-player-noswfobject.js'), false, '2.0'); - } - - /** - * Add the Javascript needed to control the various players - */ - function addPlayerJavascript() { - # Grab the audio player's global flashvars - $global_flashvars = stripslashes(get_option('pod_player_flashvars')); - - # Add the global flashvars, if any - if ( get_option('pod_player_flashvars') != '' ) - $global_flashvars = ', ' . $global_flashvars; - - # Adjust the audio player's width - $pod_player_width = stripslashes(get_option('pod_audio_width')); - if ( $pod_player_width == '' ) - $pod_player_width = 290; - - # Initialize the audio player - ?> - - - _playerAdded[$post->ID] || get_option('pod_player_location') == '' ) - return $content; - - # If there is a post id, grab the enclosures - if ($post->ID) - $enclosures = $wpdb->get_results("SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE post_id = {$post->ID} AND meta_key = 'enclosure' ORDER BY meta_id", ARRAY_A); - - # Stop if no enclosures - if ( $enclosures == '' ) - return $content; - - # For each enclosure - foreach ($enclosures as $enclosure) { - # Parse out the enclosure information - $enclosure_value = explode("\n", $enclosure['meta_value']); - $enclosure_itunes = unserialize($enclosure_value[3]); - - # Check if the enclosure is an audio format - $podcast_player = ( 'mp3' == substr(trim($enclosure_value[0]), -3) ) ? true : false; - - # Check if the enclosure is a video format - $podcast_video_player_formats = array('m4v', 'mp4', 'mov', 'flv'); - $podcast_video_player = ( in_array(substr(trim($enclosure_value[0]), -3), $podcast_video_player_formats) ) ? true : false; - - # Place the player in correct spot on the page - if ( $podcast_player ) - if ( get_option('pod_player_location') == 'top' ) - $content = $this->shortcode(array('format'=>'mp3'), trim($enclosure_value[0])) . $content; - else - $content .= $this->shortcode(array('format'=>'mp3'), trim($enclosure_value[0])); - elseif ( $podcast_video_player ) - if ( get_option('pod_player_location') == 'top' ) - $content = $this->shortcode(array('format'=>'video'), trim($enclosure_value[0])) . $content; - else - $content .= $this->shortcode(array('format'=>'video'), trim($enclosure_value[0])); - } - - return $content; - } - - /** - * Checks for the excerpt - **/ - function checkExcerpt($content) - { - global $podcasting_excerpt_check; - $podcasting_excerpt_check = true; - return $content; - } - -} - -# Start the player -$podcasting_player = new PodcastingPlayer(); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/podcasting-settings.php b/blog/wp-content/plugins/podcasting/podcasting-settings.php deleted file mode 100755 index 0fbe1e6..0000000 --- a/blog/wp-content/plugins/podcasting/podcasting-settings.php +++ /dev/null @@ -1,604 +0,0 @@ - $_POST['pod_format_new_slug']) : ''; - $format = wp_insert_term($_POST['pod_format_new_name'], 'podcast_format', $args); - $format = get_term($format['term_id'], 'podcast_format'); - - $pod_explicits = unserialize(get_option('pod_formats')); - $pod_explicits[$format->slug] = $_POST['pod_format_new_explicit']; - update_option('pod_formats', serialize($pod_explicits)); - } - - // Update formats - if ( isset($_POST['term_ids']) ) { - foreach ( $term_ids as $term_id ) { - $term_id = (int) $term_id; - $format = get_term($term_id, 'podcast_format'); - - if ( isset($_POST["delete_pod_format_$term_id"]) ) - wp_delete_term($term_id, 'podcast_format'); - - // Update taxonomy - $args = array( 'name' => $_POST["pod_format_name_$term_id"], 'slug' => $_POST["pod_format_slug_$term_id"] ); - wp_update_term($term_id, 'podcast_format', $args); - - // Update explicit - $pod_explicits[$_POST["pod_format_slug_$term_id"]] = $_POST["pod_format_explicit_$term_id"]; - update_option('pod_formats', serialize($pod_explicits)); - } - } - - // Give an updated message - echo "

Podcasting settings saved.

"; - } - - // Clear used variables - unset($term_ids); - } - - // iTunes category options - $pod_itunes_cats = array( - 'Arts', 'Arts||Design', 'Arts||Fashion & Beauty', 'Arts||Food', 'Arts||Literature', 'Arts||Performing Arts', 'Arts||Visual Arts', - 'Business', 'Business||Business News', 'Business||Careers', 'Business||Investing', 'Business||Management & Marketing', 'Business||Shopping', - 'Comedy', - 'Education', 'Education||Education Technology', 'Education||Higher Education', 'Education||K-12', 'Education||Language Courses', 'Education||Training', - 'Games & Hobbies', 'Games & Hobbies||Automotive', 'Games & Hobbies||Aviation', 'Games & Hobbies||Hobbies', 'Games & Hobbies||Other Games', 'Games & Hobbies||Video Games', - 'Government & Organizations', 'Government & Organizations||Local', 'Government & Organizations||National', 'Government & Organizations||Non-Profit', 'Government & Organizations||Regional', - 'Health', 'Health||Alternative Health', 'Health||Fitness & Nutrition', 'Health||Self-Help', 'Health||Sexuality', - 'Kids & Family', - 'Music', - 'News & Politics', - 'Religion & Spirituality', 'Religion & Spirituality||Buddhism', 'Religion & Spirituality||Christianity', 'Religion & Spirituality||Hinduism', 'Religion & Spirituality||Islam', 'Religion & Spirituality||Judaism', 'Religion & Spirituality||Other', 'Religion & Spirituality||Spirituality', - 'Science & Medicine', 'Science & Medicine||Medicine', 'Science & Medicine||Natural Sciences', 'Science & Medicine||Social Sciences', - 'Society & Culture', 'Society & Culture||History', 'Society & Culture||Personal Journals', 'Society & Culture||Philosophy', 'Society & Culture||Places & Travel', - 'Sports & Recreation', 'Sports & Recreation||Amateur', 'Sports & Recreation||College & High School', 'Sports & Recreation||Outdoor', 'Sports & Recreation||Professional', - 'Technology', 'Technology||Gadgets', 'Technology||Tech News', 'Technology||Podcasting', 'Technology||Software How-To', - 'TV & Film' - ); - - $pod_formats = get_terms('podcast_format', 'get=all'); - ?> - -
- -

Podcasting Settings

- -
- - - - -
- -
- nonceField(); ?> -

- Podcasting is brought to you for free by Spiral Web Consulting. Spiral Web Consulting is a small web development firm specializing in PHP development. Visit our website to learn more, and don't hesitate to ask us to develop your next big WordPress plugin idea. -

- - - - - - - - - - - - - -
- - -

- using_permalinks()) - echo get_option('home') . '/feed/podcast/'; - else - echo get_option('home') . '/?feed=podcast'; ?> -

-
- - - -
If your podcast's title is different than your blog's title, change the title here. -
- - - -
If your podcast's tagline is different than your blog's tagline, change the tagline here. -
- -

iTunes Specifics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
A detailed description of your podcast. iTunes allows up to 4,000 characters and the tagline will be used if no summary is entered. -
- - - -
The default author of your podcast. -
- - - -
An image which represents your podcast. iTunes uses this image on your podcast directory page and a smaller version in searches. iTunes prefers square .jpg images that are at least 300 x 300 pixels, but any jpg or png will work. -
- - - -
-
- - - -
Up to 12 comma-separated words which iTunes uses for search placement. -
- - - -
Notifies readers your podcast contains explicit material. Select clean if your podcast removed any explicit content. Note: iTunes requires all explicit podcast to mark them-self as one. Failure to do so can result in removal from the iTunes podcast directory. -
- - - -
Your podcast's owner's name. The owner name will not be publicly displayed and is used only by iTunes in the event they need to contact your podcast. -
- - - -
Your podcast's owner's e-mail address. The owner e-mail address will not be publicly displayed and is used only by iTunes in the event they need to contact your podcast. -
- - - -
The language of your feed. This value needs changing for international users looking to set this information in iTunes. -
- -

General Player Options

- - - - - - - - - - - - - - - - - - - - - -
- - - -
Automatically insert the audio player or video player. Any players manually inserted will override this setting, so players can still be manually placed on a per-post basis. -
- - - -
Text that will appear above the player. -
- - - -
That that will appear on the line of the player, immediately before it. This text will not display for video players. -
- - - -
Text that will appear below the player. -
- - - -
Select the block of text that will link to the podcast file. -
- -

Audio Player Options

- - - - - - - - - - - - - -
- - - -
The default width in pixels of the audio player. -
- - - -
Optional WordPress Audio Player flashvars that will apply on a global basis. Enter the flashvars like so: autostart: 'yes', bg: 'e5e5e5'. Additional flashvars can be appended on a per file basis by adding a flashvars="x" parameter to the [podcast] tag. -
- - - -
Selecting this option will use the video player instead of the audio player for audio files. -
- -

Video Player Options

- - - - - - - - - - - - - -
- - - -
The default width in pixels of the video player. This can be changed on a per video basis by adding a width="x" parameter to the [podcast] tag. -
- - - -
The default height in pixels of the video player. This can be changed on a per video basis by adding a height="y" parameter to the [podcast] tag. -
- - - -
Optional JW FLV Player flashvars that will apply on a global basis. Enter the flashvars like so: autostart: 'true', bufferlength: 4. Additional flashvars can be appended on a per video basis by adding a flashvars="x" parameter to the [podcast] tag. -
- -

Advanced Options

- - - - - - - - - -
- - - -
Enabling this option will prevent WordPress from automatically enclosing file URLs in the content of your posts. This is helpful if you're trying to keep certain files from appearing in your Podcasting feed. -
- - - -
WARNING: Enabling this option will disable the 404 check and file size check that occurs when adding a new podcast episode. When enabled, any new file added through Podcasting will report itself as being 1MB in size. This may cause issues with some Podcatchers that rely on accurate enclosure information. Only enable this option if you're experiencing constant HTTP connection errors (resulting in 404s) and are absolutely sure the file exists on the server. Use this option at your own risk. -
- -

- - -

- - 1 ) { ?> -
-

Formats

- slug ) { - if ( $term_count > 0 ) $term_ids .= ','; $term_count++; - $term_ids .= $pod_format->term_id; ?> - - - - - - - - - - - - - -
Format Feed - slug"; - else - echo get_option('home') . "/?feed=podcast&format=$pod_format->slug"; ?>" readonly="readonly" /> -
Format Name - Format SlugExplicit - -
- - - - -
- -

Add a New Format

- - - - - - - - - - - - - -
- - - -
The display name of your new new format. -
- - - -
If you leave this field blank, a slug will automatically be generated for you. -
- - - -
The explicit setting for this format. If you leave this field blank, your global podcast explicit setting will be used. -
- -

- -

-
- - - "; - } - -} - -# Start the Podcasting settings interface -$podcasting_settings = new PodcastingSettings(); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/podcasting.php b/blog/wp-content/plugins/podcasting/podcasting.php deleted file mode 100755 index 1ec6407..0000000 --- a/blog/wp-content/plugins/podcasting/podcasting.php +++ /dev/null @@ -1,221 +0,0 @@ -'; -} - -add_action('plugin_action_links_' . plugin_basename(__FILE__), 'pod_filter_plugin_actions'); - -// Add settings option -function pod_filter_plugin_actions($links) { - $new_links = array(); - - $new_links[] = 'Settings'; - - return array_merge($new_links, $links); -} - -add_filter('plugin_row_meta', 'pod_filter_plugin_links', 10, 2); - -// Add FAQ and support information -function pod_filter_plugin_links($links, $file) -{ - if ( $file == plugin_basename(__FILE__) ) - { - $links[] = 'FAQ'; - $links[] = 'Support'; - $links[] = 'Donate'; - } - - return $links; -} - -/** - * Take a potentially invalid URL and corrects it - * @param p_url - the url - * @return a valid URL - */ -function podcasting_urlencode($p_url) { - $ta = parse_url($p_url); - if (!empty($ta[scheme])) { $ta[scheme].='://'; } - if (!empty($ta[pass]) and !empty($ta[user])) { - $ta[user].=':'; - $ta[pass]=rawurlencode($ta[pass]).'@'; - } elseif (!empty($ta[user])) { - $ta[user].='@'; - } - if (!empty($ta[port]) and !empty($ta[host])) { - $ta[host]=''.$ta[host].':'; - } elseif (!empty($ta[host])) { - $ta[host]=$ta[host]; - } - if (!empty($ta[path])) { - $tu=''; - $tok=strtok($ta[path], "\\/"); - while (strlen($tok)) { - $tu.=rawurlencode($tok).'/'; - $tok=strtok("\\/"); - } - $ta[path]='/'.trim($tu, '/'); - } - if (!empty($ta[query])) { $ta[query]='?'.$ta[query]; } - if (!empty($ta[fragment])) { $ta[fragment]='#'.$ta[fragment]; } - - return implode('', array($ta[scheme], $ta[user], $ta[pass], $ta[host], $ta[port], $ta[path], $ta[query], $ta[fragment])); -} - -/** - * A mime_content_type function if the default mime_content_type function does not exist - * - * @return The mime content type - * @author php.net username: svogal - **/ -if (!function_exists('mime_content_type')) { - function mime_content_type($filename) { - $mime_types = array( - 'txt' => 'text/plain', - 'htm' => 'text/html', - 'html' => 'text/html', - 'php' => 'text/html', - 'css' => 'text/css', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'xml' => 'application/xml', - 'swf' => 'application/x-shockwave-flash', - 'flv' => 'video/x-flv', - - // images - 'png' => 'image/png', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'gif' => 'image/gif', - 'bmp' => 'image/bmp', - 'ico' => 'image/vnd.microsoft.icon', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - - // archives - 'zip' => 'application/zip', - 'rar' => 'application/x-rar-compressed', - 'exe' => 'application/x-msdownload', - 'msi' => 'application/x-msdownload', - 'cab' => 'application/vnd.ms-cab-compressed', - - // audio/video - 'mp3' => 'audio/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - - // adobe - 'pdf' => 'application/pdf', - 'psd' => 'image/vnd.adobe.photoshop', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - - // ms office - 'doc' => 'application/msword', - 'rtf' => 'application/rtf', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - - // open office - 'odt' => 'application/vnd.oasis.opendocument.text', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - ); - - $ext = strtolower(array_pop(explode('.',$filename))); - if (array_key_exists($ext, $mime_types)) { - return $mime_types[$ext]; - } - elseif (function_exists('finfo_open')) { - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = finfo_file($finfo, $filename); - finfo_close($finfo); - return $mimetype; - } - else { - return 'application/octet-stream'; - } - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/podpress-importer.php b/blog/wp-content/plugins/podcasting/podpress-importer.php deleted file mode 100755 index 74933d0..0000000 --- a/blog/wp-content/plugins/podcasting/podpress-importer.php +++ /dev/null @@ -1,171 +0,0 @@ -'; - echo '

'.__('Import podPress to Podcasting').'

'; - } - - /** - * Display the footer - */ - function footer() { - echo ''; - } - - /** - * Start the importing process - */ - function greet() { - $this->header(); -?> -
-

- -
- - -

- -

-
-

-
-footer(); - } - - /** - * Step one of the import process (displays importer output) - */ - function import() { - $this->header(); - - $podcasts = $this->retreive_podPress_podcasts(); - $this->import_podcasts($podcasts); - - $this->footer(); - } - - /** - * Grab the podPress podcasts - */ - function retreive_podPress_podcasts() { - global $wpdb; - - $podcasts = array(); - - $podpress_data = $wpdb->get_results("SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'podPressMedia'", ARRAY_A); - - if ( $podpress_data != '' ) { - foreach ( $podpress_data AS $data ) { - $itunes_info = $wpdb->get_results("SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'podPressPostSpecific' AND post_id = $data[post_id]", ARRAY_A); - - if ( $data['meta_value'] != '' ) { - $podcast = array(); - $podcast = unserialize(trim($data['meta_value'])); - $podcast = ( !is_array($podcast) ) ? unserialize($podcast) : $podcast; - $podcast[0]['post_id'] = $data['post_id']; - $podcast[0]['itunes'] = unserialize($itunes_info[0]['meta_value']); - $podcast[0]['itunes'] = ( !is_array($podcast[0]['itunes']) ) ? unserialize($podcast[0]['itunes']) : $podcast; - - $podcasts[] = $podcast; - } - } - } - - return $podcasts; - } - - /** - * Actually import the podPress podcasts into Podcasting - */ - function import_podcasts($podcasts) { - global $wpdb, $podcasting_metabox; - $i = 0; - - $podPress_options = get_option('podPress_config'); - - foreach ( $podcasts AS $podcast ) { - $no_enclose = false; - $enclosed = get_post_meta($podcast[0]['post_id'], 'enclosure'); - if ( $enclosed != '' ) { - foreach ( $enclosed AS $enclose ) { - $enclose = explode("\n", $enclose); - if ( ( $enclose[0] == $podcast[0]['URI'] ) && ( $enclose[3] != '' ) ) - $no_enclose = true; - } - } - - if ( !$no_enclose ) { - - // Basic podcasting info - $content = ( substr($podcast[0]['URI'], 0, 4) == 'http' ) ? $podcast[0]['URI'] : $podPress_options['mediaWebPath'] . $podcast[0]['URI']; - $headers = $podcasting_metabox->getHttpHeaders($content); - $length = (int) $headers['content-length']; - $type = addslashes( $headers['content-type'] ); - - // iTunes - $itunes = serialize(array( - 'format' => 'default-format', - 'keywords' => ( substr($podcast[0]['itunes']['itunes:keywords'], 0, 1) != '#' ) ? $podcast[0]['itunes']['itunes:keywords'] : '', - 'author' => ( substr($podcast[0]['itunes']['itunes:author'], 0, 1) != '#' ) ? $podcast[0]['itunes']['itunes:author'] : '', - 'length' => $podcast[0]['duration'], - 'explicit' => strtolower($podcast[0]['itunes']['itunes:explicit']) - )); - - if ( $headers['response'] != '404' && is_array($headers) ) { - add_post_meta($podcast[0]['post_id'], 'enclosure', "$content\n$length\n$type\n$itunes\n"); - - $pod_enclosure_id2 = $wpdb->get_var("SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = {$podcast[0][post_id]} AND meta_key = 'enclosure' ORDER BY meta_id DESC"); // Find the enclosure we just added - wp_set_object_terms($pod_enclosure_id2, 'default-format', 'podcast_format', false); - - $i++; - } - - } - } - - echo '

Successfully imported ' . $i . ' podcasts.

'; - } - - /** - * The switcher function for WordPress importers - */ - function dispatch() { - if (empty ($_GET['step'])) - $step = 0; - else - $step = (int) $_GET['step']; - - switch ($step) { - case 0 : - $this->greet(); - break; - case 1 : - check_admin_referer('import-podpress'); - $this->import(); - break; - } - } - - function podPressImport() { - // Nothing. - } -} - -# Start the podPress importer -$podPress_import = new podPressImport(); - -# Add the podPress importer to the array of importers -$wp_importers['podpress'] = array('PodPress', 'Import podPress podcasts into Podcasting.', array ($podPress_import, 'dispatch')); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/readme.txt b/blog/wp-content/plugins/podcasting/readme.txt deleted file mode 100755 index d83c35e..0000000 --- a/blog/wp-content/plugins/podcasting/readme.txt +++ /dev/null @@ -1,225 +0,0 @@ -=== Podcasting === -Contributors: cavemonkey50, jesse_altman, spiralwebconsulting -Donate link: http://plugins.spiralwebconsulting.com/podcasting.html#donate -Tags: podcast, itunes, podcasting, rss, feed, enclosure -Requires at least: 2.7 -Tested up to: 2.8.4 -Stable tag: 2.3 - -*Podcasting is no longer supported. [Read this post](http://ronaldheft.com/2009/12/podcastings-plugin-development-comes-to-a-close/) for more information.* - -Podcasting enhances WordPress' existing podcast support by adding multiple iTunes-compatible feeds, media players, and an easy to use interface. - -== Description == - -Podcasting brings complete podcasting support to WordPress. Podcasting will take a file from somewhere on the web (either your site or another site) and it will add it to an iTunes-based feed. Podcasting also includes a player allowing visitors to your site to view the file on the web. - -*Podcasting is brought to you for free by [Spiral Web Consulting](http://spiralwebconsulting.com/). Spiral Web Consulting is a small web development firm specializing in PHP development. Visit our website to learn more, and don't hesitate to ask us to develop your next big WordPress plugin idea.* - -= Features = - -- Adds a dedicated Podcasting feed with full iTunes support -- Includes the ability to have multiple podcasting feeds based on file format or other factors -- Includes both an audio and video player for in-post listening/watching -- Fully integrates with any existing enclosures already stored in WordPress -- Offers a migration tool for users of podPress - -For more information, visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html). - -== Installation == - -Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewtopic.php?f=8&t=22) for installation information. - -== Frequently Asked Questions == - -Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewforum.php?f=8) for the latest FAQ information. - -== Screenshots == - -1. An example of the Podcasting enclosure box before a podcast is added. -2. The Podcasting enclosure box with an example podcast added. -3. The audio player before an episode begins playing. -4. The audio player in the middle of an episode. -5. The video player before an episode is playing. - -Please visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html#screenshots) for more screenshots. - -== Changelog == - -= 2.3 = -* Now displays the surrounding player text in feeds with a download link. -* Adds support for the Send to Editor button to work with text editors other than tinyMCE. -* Removes a foreach warning message that could appear at the top of a blog page if PHP error reporting is enabled and no formats are specified. - -= 2.2.5 = -* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags. - -= 2.2.4 = -* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags. -* Corrects auto detect url for format feeds. - -= 2.2.3 = -* Fixes a bug that was breaking the save button on the settings page in IE. - -= 2.2.2 = -* Adds missing WordPress menu call that prevented users from loading the settings page under WordPress 2.8.1. -* Adds a new advanced option to disable the 404 check. Only use this option if you know what you're doing. -* Moves the disable auto-enclose option to a new Advanced Options subheading on the settings page. - -= 2.2.1 = -* Adds support for WordPress' new changelog readme.txt standard. Version information is now available from within the plugin updater. -* Enhances the links on the plugin page. Adds a settings, FAQ, and support link. - -= 2.2 = -* Fixes the disappearing / missing enclosure bug introduced with WordPress 2.8's new "enclosure prune" method. -* Adds a second-line of defense fix to WordPress 2.8's "enclosure prune" method that will prevent enclosures from becoming garbled serialized text. -* Adds logic to disable the add podcast button for 3 seconds to prevent duplicate enclosures. -* Adds an additional error message for non-standard http responses. -* Improves 404 detection for HTML error pages. - -= 2.1.2 = -* Adds error messages to the admin AJAX calls. -* Adds comment with version number to header output. - -= 2.1.1 = -* Fixes a UTF8 feed title encoding problem. -* Supports WordPress 2.8. - -= 2.1 = -* Adds local detection of mime types and file size. No longer requires an external connection to successfully enclose a file. -* Removes stray player code that appears on some WordPress theme pages using the_excerpt. -* Upgrades the JW FLV Media Player to version 4.4. -* Adds player support (via JW FLV Media Player) for m4a files. - -= 2.0.4 = -* Fixes encoding issues with certain file URLs. This should eliminate the cURL issue for most people. - -= 2.0.3 = -* Corrects an incorrect function call in the podPress importer left over from converting to a class-based plugin. - -= 2.02 = -* Corrects issue where a manually inserted player would not prevent the automatic player from being added. - -= 2.01 = -* Fixes a blank page issue when automatically including the podcast player on posts. - -= 2.0 = -* Podcasting is now supported by Spiral Web Consulting. -* Corrects feed URL issues when a category with the name "podcast" existed. Note: Due to this change, the URL for format feeds has changed slightly. -* Fixes a bug that prevented new enclosures from being added. -* Converts Podcasting to a class-based plugin. This will make adding new features easier. -* Drastically improves new/edit enclosure interface to conform with WordPress 2.7 design standards. -* Adds an option to disable WordPress' automatic enclosing of file URLs. -* Allows HTML to be entered in the text fields surrounding players. -* Adds an option to use the video player for audio files. -* Adds support for handling 404 error situations more gracefully. - -= 2.0b20 = -* Corrects broken format feeds. -* Adds several better methods for enclosing a feed (mainly fixing redirects not working). -* Fixes all known feed validation issues as well as a few that would prevent iTunes clients from reading the feed. - -= 2.0b19 = -* Fixes an error that could occur if cURL is missing from PHP. - -= 2.0b18 = -* Corrects encoding issues with video file download links. - -= 2.0b17 = -* Resolves an issue where enclosures could disappear from the main feed when Podcasting is activated. -* Resolves an issue where a local enclosure was not working for some users do to a missing magic_mime on their server. - -= 2.0b16 = -* Corrects a PHP warning that could occur prevent an enclosure from occurring. - -= 2.0b15 = -* Corrects a bug in remote file retrieval present since beta 13. - -= 2.0b14 = -* Applies the fixes in beta 13 to the podPress importer. -* Fixes a rare PHP error related to the local enclosure attempt. -* Corrects a potential XHTML error with certain themes. - -= 2.0b13 = -* Greatly improves enclosure retrieval. If the file can’t be accessed via the internet, a local attempt will be made. Anyone experiencing the missing enclosures bug should upgrade to this version. -* Adds a notification if there are issues connecting to the file. -* Corrects some plugin conflicts. -* Fixes issues with foreign characters in the blog title. - -= 2.0b12 = -* Corrects an XML warning and error in the podcast feed related to the iTunes image. -* Removes a warning that could display during a podPress import. - -= 2.0b11 = -* Adds support for importing via WPMU. -* Fixes a bug where the podPress importer would not handle relative URLs correctly. - -= 2.0b10 = -* Improves file type detection for the Send to Editor button. -* Corrects an XML warning in the podcast feed related to the iTunes image. -* Improves robustness of script additions, possibly fixing some IE scripting errors. -* Fixes some errors where importing from podPress would fail. - -= 2.0b9 = -* Now alerts the user if the file they enter does not exist (404). This should help weed out the mysterious disappearing enclosures. -* Fixes a conflict with some of WordPress 2.7’s admin jQuery (namely the show button in the media gallery). -* Corrects an XML warning in the podcast feed related to the iTunes image. - -= 2.0b8 = -* Corrects an error message related to the new automatic player addition. - -= 2.0b7 = -* Supports WordPress 2.7 and now requires WordPress 2.6. -* Includes an importer for migrating from podPress. -* Adds a video player (JW FLV Player) and updates the audio player (WordPress Audio Player 2.0). -* Adds an option to automatically include players above or below the content of a post. -* Adds options to configure player variables on a global or per player basis. -* Adds options for placing text above, before, and below a player, while specifying a field as a “download link”. -* Adds a more robust method for enclosing files. This new method adds relative URL support, support for enclosing any type of file, and should alleviate the problems most users were having. If a server issue is detected, a warning is displayed with more information on how to correct the problem. -* Adds an option to configure the language of RSS feeds. -* Adds a standard RSS image tag to the feed when itunes:artwork is used. -* Fixes countless potential feed validation issues. - -= 1.65 = -* Corrects saved draft issue brought on by WordPress 2.6. -= 1.64 = -* Adds missing image showing the audio player’s colors. -* Fixes a bug where changing a format’s slug would forget the format’s explicit setting. - -= 1.63 = -* Corrects typo preventing 1.62’s fix from working. - -= 1.62 = -* Resolves an issue where an episode would not be saved once navigating away from the page. - -= 1.61 = -* Resolves an issue where certain URL characters such as spaces would cause a failure creating an enclosure. -* Resolves validation issues with the RSS feed. - -= 1.6 = -* Adds options to configure the audio player’s colors. - -= 1.52 = -* The player is no longer replaced with the text “Download Podcast” in feeds to prevent that text from showing up in iTunes descriptions when the player is inserted first in a post. - -= 1.51 = -* Fixes the Send to Editor button when the visual editor is disabled. - -= 1.5 = -* Fixes compatibility issues with WordPress 2.5. -* Updates to the user interface to reflect the changes in 2.5. -* Episode addition interface is now fully AJAX. Add and delete episodes without having to refresh the page. -* Converts [podcast] tag to new shortcode API. -* Fixes Send to Editor button not working on the visual editor. -* Note: Version 1.5 requires WordPress 2.5. - -= 1.02 = -* Fixes a critical Javascript error affecting Internet Explorer and possibly other browsers. -* It is recommended to install this update as soon as possible. - -= 1.01 = -* Fixes a conflict with the Feedburner Feedsmith plugin. -* Resolves AJAX errors when managing formats. - -= 1.0 = -* Initial release. \ No newline at end of file diff --git a/blog/wp-content/plugins/podcasting/screenshot-1.png b/blog/wp-content/plugins/podcasting/screenshot-1.png deleted file mode 100755 index f862293..0000000 Binary files a/blog/wp-content/plugins/podcasting/screenshot-1.png and /dev/null differ diff --git a/blog/wp-content/plugins/podcasting/screenshot-2.png b/blog/wp-content/plugins/podcasting/screenshot-2.png deleted file mode 100755 index 223ee33..0000000 Binary files a/blog/wp-content/plugins/podcasting/screenshot-2.png and /dev/null differ diff --git a/blog/wp-content/plugins/podcasting/screenshot-3.png b/blog/wp-content/plugins/podcasting/screenshot-3.png deleted file mode 100755 index af8bf14..0000000 Binary files a/blog/wp-content/plugins/podcasting/screenshot-3.png and /dev/null differ diff --git a/blog/wp-content/plugins/podcasting/screenshot-4.png b/blog/wp-content/plugins/podcasting/screenshot-4.png deleted file mode 100755 index 36da497..0000000 Binary files a/blog/wp-content/plugins/podcasting/screenshot-4.png and /dev/null differ diff --git a/blog/wp-content/plugins/podcasting/screenshot-5.png b/blog/wp-content/plugins/podcasting/screenshot-5.png deleted file mode 100755 index abe5ae3..0000000 Binary files a/blog/wp-content/plugins/podcasting/screenshot-5.png and /dev/null differ diff --git a/blog/wp-content/plugins/post-plugin-library/admin-subpages.php b/blog/wp-content/plugins/post-plugin-library/admin-subpages.php deleted file mode 100644 index c79aa8c..0000000 --- a/blog/wp-content/plugins/post-plugin-library/admin-subpages.php +++ /dev/null @@ -1,121 +0,0 @@ -__construct($parent_page); - } - - function __construct($parent_page='') { - if ($parent_page === '') { - $parent_page = $_SERVER['QUERY_STRING']; - $p1 = strpos($parent_page, 'page='); - $p2 = strpos($parent_page, '&'); - if ($p2 === false) { - $parent_page = substr($parent_page, $p1+5); - } else { - $parent_page = substr($parent_page, $p1+5, $p2-$p1-5); - } - } - $this->parent_page = $parent_page; - } - - function __destruct() { - } - - function add_subpage($title, $slug, $view) { - $this->pages[] = array('title' => $title, 'slug' => $slug, 'view' => $view); - } - - function add_subpages($pages) { - foreach ($pages as $page) { - $this->pages[] = array('title' => $page[0], 'slug' => $page[1], 'view' => $page[2]); - } - } - - function page_from_slug($slug) { - if (!isset($slug)) { - return $this->pages[0]; - } - foreach ($this->pages as $page) { - if ($page['slug'] === $slug) { - return $page; - } - } - die('non-existent slug'); - } - - function display_menu() { - echo "\n\n"; - } - - function display_view() { - $this->current_page['view'](); - } - - function display() { - $this->display_menu(); - $this->display_view(); - } - -} - -/* ?> - - \ No newline at end of file diff --git a/blog/wp-content/plugins/post-plugin-library/admin_common_functions.php b/blog/wp-content/plugins/post-plugin-library/admin_common_functions.php deleted file mode 100644 index 123cab1..0000000 --- a/blog/wp-content/plugins/post-plugin-library/admin_common_functions.php +++ /dev/null @@ -1,1093 +0,0 @@ - 0) ? $value : 0; -} - -function ppl_display_available_tags($plugin_name) { - ?> -

- - - - -
-

Report a Bug

-
-

-
- - - - - - - - - -
-
-

' . __('The plugin and all its settings have been completely removed', 'post_plugin_library') . '

'; - exit; - } - } - ?> -
-

Remove this Plugin

-
-

-
-

- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (a,b matches posts with either tag, a+b only matches posts with both tags)', 'post_plugin_library') ?> - size="40" /> - - - - - - - - - - - - - - - - - get_results("SELECT ID, user_login FROM $wpdb->users ORDER BY user_login"); - if ($users) { - $excluded = explode(',', $excluded_authors); - $included = explode(',', $included_authors); - echo "\n\t"; - foreach ($users as $user) { - if (false === in_array($user->ID, $excluded)) { - $ex_ischecked = ''; - } else { - $ex_ischecked = 'checked'; - } - if (false === in_array($user->ID, $included)) { - $in_ischecked = ''; - } else { - $in_ischecked = 'checked'; - } - echo "\n\t"; - } - } - ?> -
AuthorExcludeInclude
$user->user_loginID\" $ex_ischecked />ID\" $in_ischecked />
- - - - - - - - get_results("SELECT * FROM $wpdb->categories WHERE category_count <> 0 ORDER BY cat_name"); - $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name"); - } - if ($categories) { - echo "\n\t"; - $excluded = explode(',', $excluded_cats); - $included = explode(',', $included_cats); - $level = 0; - $cats_added = array(); - $last_parent = 0; - $cat_parent = 0; - foreach ($categories as $category) { - $category->cat_name = wp_specialchars($category->cat_name); - if (false === in_array($category->cat_ID, $excluded)) { - $ex_ischecked = ''; - } else { - $ex_ischecked = 'checked'; - } - if (false === in_array($category->cat_ID, $included)) { - $in_ischecked = ''; - } else { - $in_ischecked = 'checked'; - } - $last_parent = $cat_parent; - $cat_parent = $category->category_parent; - if ($cat_parent == 0) { - $level = 0; - } elseif ($last_parent != $cat_parent) { - if (in_array($cat_parent, $cats_added)) { - $level = $level - 1; - } else { - $level = $level + 1; - } - $cats_added[] = $cat_parent; - } - $pad = str_repeat(' ', 3*$level); - echo "\n\t"; - } - } - ?> -
CategoryExcludeInclude
$pad$category->cat_namecat_ID\" $ex_ischecked />cat_ID\" $in_ischecked />
- - - - - - - - - -
- - - - - - - - - - -
- - - - old -
- - - - - - - - - - - -
- Published - - - Private - - - Draft - - - Future - -
- - - - - - - - - - - - - -
Field NameField Value
- -
- - - - - - - - - - - - - -
ActivatePriorityParametersCondition
- -
- - - - - - - - - - - - -
ActivatePriorityParameters
- -
- - - - - - - - - - - - - -
ParametersCondition
- -
- - - - - - - - - - - - (via special tags)', 'post_plugin_library') ?> - - - - - - -
Activate
- -
- - - - - leave blank for default order', 'post_plugin_library') ?> - - - - - - - - - - - - - - - -
Output TagOrderCase
first - - - -
then - - - -
- - - get_col( " - SELECT meta_key - FROM $wpdb->postmeta - WHERE meta_key NOT LIKE '\_%' - GROUP BY meta_key - ORDER BY meta_id DESC - LIMIT $limit" ); - $metaselect = ""; - } - - ?> - - - - - - - - - - -
FieldOrderCase
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
% % % ( adds up to 100% )
- - - - - - - - - - - - - - - - - - - - - - (overrides the sort criteria above) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' . $plugin_data['Name'] . ''; - } else { - $plugin_data['Title'] = $name; - } - } - } - return $plugin_data; -} - -function ppl_admin_footer($plugin_file, $donate_key='') { - $plugin_data = ppl_get_plugin_data($plugin_file); - $output = array(); - $output[] = $plugin_data['Title'] . ' plugin'; - $output[] = 'Version ' . $plugin_data['Version']; - $output[] = 'by ' . $plugin_data['Author']; - if ($donate_key) { - $donate_url = 'http://rmarsh.com/donate/' . $donate_key . '/'; - // random shades of red, orange and yellow to attract attention -- subtly I hope - $colour = '#ff' . dechex(mt_rand(0, 255)) . '00'; - $output[] = 'All donations welcomed!'; - } - echo implode(' | ', $output) . '
'; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/post-plugin-library/common_functions.php b/blog/wp-content/plugins/post-plugin-library/common_functions.php deleted file mode 100644 index 8fdb007..0000000 --- a/blog/wp-content/plugins/post-plugin-library/common_functions.php +++ /dev/null @@ -1,648 +0,0 @@ -{...}'. - $result = array(); - if($args){ - // the default separator is '&' but you may wish to include the character in a title, say, - // so you can specify an alternative separator by making the first character of $args - // '&' and the second character your new separator... - if (substr($args, 0, 1) === '&') { - $s = substr($args, 1, 1); - $args = substr($args, 2); - } else { - $s = '&'; - } - // separate the arguments into key=value pairs - $arguments = explode($s, $args); - foreach($arguments as $arg){ - if($arg){ - // find the position of the first '=' - $i = strpos($arg, '='); - // if not a valid format ('key=value) we ignore it - if ($i){ - $key = substr($arg, 0, $i); - $val = substr($arg, $i+1); - $result[$key]=$val; - } - } - } - } - return $result; -} - -function ppl_set_options($option_key, $arg, $default_output_template) { - $options = get_option($option_key); - // deal with compound options - if (isset($arg['custom-key'])) {$arg['custom']['key'] = $arg['custom-key']; unset($arg['custom-key']);} - if (isset($arg['custom-op'])) {$arg['custom']['op'] = $arg['custom-op']; unset($arg['custom-op']);} - if (isset($arg['custom-value'])) {$arg['custom']['value'] = $arg['custom-value']; unset($arg['custom-value']);} - if (isset($arg['age-direction'])) {$arg['age']['direction'] = $arg['age-direction']; unset($arg['age-direction']);} - if (isset($arg['age-length'])) {$arg['age']['length'] = $arg['age-length']; unset($arg['age-length']);} - if (isset($arg['age-duration'])) {$arg['age']['duration'] = $arg['age-duration']; unset($arg['age-duration']);} - if (isset($arg['sort-by1'])) {$arg['sort']['by1'] = $arg['sort-by1']; unset($arg['sort-by1']);} - if (isset($arg['sort-order1'])) {$arg['sort']['order1'] = $arg['sort-order1']; unset($arg['sort-order1']);} - if (isset($arg['sort-case1'])) {$arg['sort']['case1'] = $arg['sort-case1']; unset($arg['sort-case1']);} - if (isset($arg['sort-by2'])) {$arg['sort']['by2'] = $arg['sort-by2']; unset($arg['sort-by2']);} - if (isset($arg['sort-order2'])) {$arg['sort']['order2'] = $arg['sort-order2']; unset($arg['sort-order2']);} - if (isset($arg['sort-case2'])) {$arg['sort']['case2'] = $arg['sort-case2']; unset($arg['sort-case2']);} - if (isset($arg['status-publish'])) {$arg['status']['publish'] = $arg['status-publish']; unset($arg['status-publish']);} - if (isset($arg['status-private'])) {$arg['status']['private'] = $arg['status-private']; unset($arg['status-private']);} - if (isset($arg['status-draft'])) {$arg['status']['draft'] = $arg['status-draft']; unset($arg['status-draft']);} - if (isset($arg['status-future'])) {$arg['status']['future'] = $arg['status-future']; unset($arg['status-future']);} - // then fill in the defaults - if (!isset($arg['limit'])) $arg['limit'] = stripslashes($options['limit']); - if (!isset($arg['skip'])) $arg['skip'] = stripslashes($options['skip']); - if (!isset($arg['divider'])) $arg['divider'] = stripslashes($options['divider']); - if (!isset($arg['omit_current_post'])) $arg['omit_current_post'] = $options['omit_current_post']; - if (!isset($arg['just_current_post'])) $arg['just_current_post'] = $options['just_current_post']; - if (!isset($arg['show_private'])) $arg['show_private'] = $options['show_private']; - if (!isset($arg['show_pages'])) $arg['show_pages'] = $options['show_pages']; - if (!isset($arg['show_attachments'])) $arg['show_attachments'] = $options['show_attachments']; - if (!isset($arg['none_text'])) $arg['none_text'] = stripslashes($options['none_text']); - if (!isset($arg['no_text'])) $arg['no_text'] = $options['no_text']; - if (!isset($arg['tag_str'])) $arg['tag_str'] = stripslashes($options['tag_str']); - if (!isset($arg['excluded_cats'])) $arg['excluded_cats'] = stripslashes($options['excluded_cats']); - if (!isset($arg['included_cats'])) $arg['included_cats'] = stripslashes($options['included_cats']); - if (!isset($arg['excluded_authors'])) $arg['excluded_authors'] = stripslashes($options['excluded_authors']); - if (!isset($arg['included_authors'])) $arg['included_authors'] = stripslashes($options['included_authors']); - if (!isset($arg['excluded_posts'])) $arg['excluded_posts'] = stripslashes($options['excluded_posts']); - if (!isset($arg['included_posts'])) $arg['included_posts'] = stripslashes($options['included_posts']); - if (!isset($arg['stripcodes'])) $arg['stripcodes'] = $options['stripcodes']; - if (!isset($arg['prefix'])) $arg['prefix'] = stripslashes($options['prefix']); - if (!isset($arg['suffix'])) $arg['suffix'] = stripslashes($options['suffix']); - if (!isset($arg['output_template'])) $arg['output_template'] = stripslashes($options['output_template']); - // an empty output_template makes no sense so we fall back to the default - if ($arg['output_template'] == '') $arg['output_template'] = $default_output_template; - if (!isset($arg['match_cat'])) $arg['match_cat'] = $options['match_cat']; - if (!isset($arg['match_tags'])) $arg['match_tags'] = $options['match_tags']; - if (!isset($arg['match_author'])) $arg['match_author'] = $options['match_author']; - if (!isset($arg['age'])) $arg['age'] = $options['age']; - if (!isset($arg['custom'])) $arg['custom'] = $options['custom']; - if (!isset($arg['sort'])) $arg['sort'] = $options['sort']; - if (!isset($arg['status'])) $arg['status'] = $options['status']; - - // just for recent_posts - if (!isset($arg['date_modified'])) $arg['date_modified'] = $options['date_modified']; - - // just for recent_comments - if (!isset($arg['group_by'])) $arg['group_by'] = $options['group_by']; - if (!isset($arg['group_template'])) $arg['group_template'] = stripslashes($options['group_template']); - if (!isset($arg['show_type'])) $arg['show_type'] = $options['show_type']; - if (!isset($arg['no_author_comments'])) $arg['no_author_comments'] = $options['no_author_comments']; - if (!isset($arg['no_user_comments'])) $arg['no_user_comments'] = $options['no_user_comments']; - if (!isset($arg['unique'])) $arg['unique'] = $options['unique']; - - // just for similar_posts[feed] - if (!isset($arg['combine'])) $arg['combine'] = $options['crossmatch']; - if (!isset($arg['weight_content'])) $arg['weight_content'] = $options['weight_content']; - if (!isset($arg['weight_title'])) $arg['weight_title'] = $options['weight_title']; - if (!isset($arg['weight_tags'])) $arg['weight_tags'] = $options['weight_tags']; - if (!isset($arg['num_terms'])) $arg['num_terms'] = stripslashes($options['num_terms']); - if (!isset($arg['term_extraction'])) $arg['term_extraction'] = $options['term_extraction']; - if (!isset($arg['hand_links'])) $arg['hand_links'] = $options['hand_links']; - - // just for other_posts - if (!isset($arg['orderby'])) $arg['orderby'] = stripslashes($options['orderby']); - if (!isset($arg['orderby_order'])) $arg['orderby_order'] = $options['orderby_order']; - if (!isset($arg['orderby_case'])) $arg['orderby_case'] = $options['orderby_case']; - - // the last options cannot be set via arguments - $arg['stripcodes'] = $options['stripcodes']; - $arg['utf8'] = $options['utf8']; - $arg['cjk'] = $options['cjk']; - $arg['use_stemmer'] = $options['use_stemmer']; - $arg['batch'] = $options['batch']; - $arg['content_filter'] = $options['content_filter']; - $arg['widget_parameters'] = stripslashes($options['widget_parameters']); - $arg['widget_condition'] = stripslashes($options['widget_condition']); - $arg['feed_on'] = $options['feed_on']; - $arg['feed_priority'] = $options['feed_priority']; - $arg['feed_parameters'] = stripslashes($options['feed_parameters']); - $arg['append_on'] = $options['append_on']; - $arg['append_priority'] = $options['append_priority']; - $arg['append_parameters'] = stripslashes($options['append_parameters']); - $arg['append_condition'] = stripslashes($options['append_condition']); - $arg['exclude_users'] = $options['exclude_users']; - $arg['count_home'] = $options['count_home']; - $arg['count_feed'] = $options['count_feed']; - $arg['count_single'] = $options['count_single']; - $arg['count_archive'] = $options['count_archive']; - $arg['count_category'] = $options['count_category']; - $arg['count_page'] = $options['count_page']; - $arg['count_search'] = $options['count_search']; - - return $arg; -} - -function ppl_prepare_template($template) { - // Now we process the output_template to find the embedded tags which are to be replaced - // with values taken from the database. - // A tag is of the form, {tag:ext}, where the tag part will be evaluated and replaced - // and the optional ext part provides extra data pertinent to that tag - preg_match_all('/{((?:[^{}]|{[^{}]*})*)}/', $template, $matches); - $translations = array(); - foreach ($matches[1] as $match) { - list($tag, $ext) = explode(':', $match, 2); - $action = output_tag_action($tag); - if (function_exists($action)) { - // store the action that instantiates the tag - $translations['acts'][] = $action; - // add the tag in a form ready to use in translation later - $translations['fulltags'][] = '{'.$match.'}'; - // the extra data if any - $translations['exts'][] = $ext; - } - } - return $translations; -} - -function ppl_expand_template($result, $template, $translations, $option_key) { - global $wpdb, $wp_version; - $replacements = array(); - $numtags = count($translations['fulltags']); - for ($i = 0; $i < $numtags; $i++) { - $fulltag = $translations['fulltags'][$i]; - $act = $translations['acts'][$i]; - $ext = $translations['exts'][$i]; - $replacements[$fulltag] = $act($option_key, $result, $ext); - } - // Replace every valid tag with its value - $tmp = strtr($template, $replacements)."\n"; - return $tmp; -} - - -function ppl_sort_items($sort, $results, $option_key, $group_template, $items) { - $translations1 = ppl_prepare_template($sort['by1']); - foreach ($results as $result) { - $key1 = ppl_expand_template($result, $sort['by1'], $translations1, $option_key); - if ($sort['case1'] !== 'false') $key1 = strtolower($key1); - $keys1[] = $key1; - } - if ($sort['by2'] !== '') { - $translations2 = ppl_prepare_template($sort['by2']); - foreach ($results as $result) { - $key2 = ppl_expand_template($result, $sort['by2'], $translations2, $option_key); - if ($sort['case2'] !== 'false') $key2 = strtolower($key2); - $keys2[] = $key2; - } - } - if (!empty($keys2)) { - array_multisort($keys1, intval($sort['order1']), $keys2, intval($sort['order2']), $results, $items); - } else { - array_multisort($keys1, intval($sort['order1']), $results, $items); - } - // merge the group titles into the items - if ($group_template) { - $group_translations = ppl_prepare_template($group_template); - $prev_key = ''; - $insertions = 0; - foreach ($keys1 as $n => $key) { - if ($prev_key !== $key) { - array_splice($items, $n+$insertions, 0, ppl_expand_template($results[$n], $group_template, $group_translations, $option_key)); - $insertions++; - } - $prev_key = $key; - } - } - return $items; -} - -// the $post global can be overwritten by the use of $wp_query so we go back to the source -// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example -function ppl_current_post_id($manual_current_ID = -1) { - $the_ID = -1; - if ($manual_current_ID > 0) { - $the_ID = $manual_current_ID; - } else if (isset($GLOBALS['wp_the_query'])) { - $the_ID = $GLOBALS['wp_the_query']->post->ID; - if (!$the_ID) $the_ID = $GLOBALS['wp_the_query']->posts[0]->ID; - } else { - $the_ID = $GLOBALS['post']->ID; - } - return $the_ID; -} - - -/* - - Functions to fill in the WHERE part of the workhorse SQL - -*/ - -function where_match_author() { - $current_author = $GLOBALS['wp_the_query']->post->post_author; - return "post_author = $current_author"; -} - -function where_match_tags($match_tags) { - global $wpdb, $wp_version; - $args = array('fields' => 'ids'); - $tag_ids = wp_get_object_terms(ppl_current_post_id(), 'post_tag', $args); - if ( is_array($tag_ids) && count($tag_ids) > 0 ) { - if ($match_tags === 'any') { - $ids = get_objects_in_term($tag_ids, 'post_tag'); - } else { - $ids = array(); - foreach ($tag_ids as $tag_id){ - if (count($ids) > 0) { - $ids = array_intersect($ids, get_objects_in_term($tag_id, 'post_tag')); - } else { - $ids = get_objects_in_term($tag_id, 'post_tag'); - } - } - } - if ( is_array($ids) && count($ids) > 0 ) { - $ids = array_unique($ids); - $out_posts = "'" . implode("', '", $ids) . "'"; - $sql = "$wpdb->posts.ID IN ($out_posts)"; - } else { - $sql = "1 = 2"; - } - } else { - $sql = "1 = 2"; - } - return $sql; -} - -function where_show_pages($show_pages, $show_attachments='false') { - if (function_exists('get_post_type')) { - $typelist = array(); - if ($show_attachments === 'true') {$typelist[] = "'attachment'";}; - if ($show_pages === 'true') {$typelist[] = "'page'"; $typelist[] = "'post'";} - else if ($show_pages === 'false') {$typelist[] = "'post'";} - else if ($show_pages === 'but') {$typelist[] = "'page'";}; - if (count($typelist)===1) { - $sql = "post_type=$typelist[0]"; - } else { - $sql = "post_type IN (" . implode(',',$typelist) . ")"; - } - } else { - if ($show_pages === 'true') $sql = "post_status IN ('publish', 'static')"; - else if ($show_pages === 'false') $sql = "post_status = 'publish'"; - else if ($show_pages === 'but') $sql = "post_status = 'static'"; - } - return $sql; -} - -function where_show_status($status, $include_inherit='false') { - $set = array(); - $status = (array) $status; - // a quick way of allowing for attachments having status=inherit - if ($include_inherit === 'true') $status['inherit'] = 'true'; - foreach ($status as $name => $state) { - if ($state === 'true') $set[] = "'$name'"; - } - if ($set) { - $result = implode(',', $set); - return "post_status IN ($result)"; - } else { - return "1 = 2"; - } -} - -// a replacement, for WP < 2.3, ONLY category children -if (!function_exists('get_term_children')) { - function get_term_children($term, $taxonomy) { - if ($taxonomies !== 'category') return array(); - return get_categories('child_of='.$term); - } -} - - -// a replacement, for WP < 2.3, ONLY to get posts with given category IDs -if (!function_exists('get_objects_in_term')) { - function get_objects_in_term($terms, $taxonomies) { - global $wpdb; - if ($taxonomies !== 'category') return array(); - $terms = "'" . implode("', '", $terms) . "'"; - $object_ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE category_id IN ($terms)"); - if (!$object_ids) return array(); - return $object_ids; - } -} - -function where_match_category() { - global $wpdb, $wp_version; - $cat_ids = ''; - foreach(get_the_category() as $cat) { - if ($cat->cat_ID) $cat_ids .= $cat->cat_ID . ','; - } - $cat_ids = rtrim($cat_ids, ','); - $catarray = explode(',', $cat_ids); - foreach ( $catarray as $cat ) { - $catarray = array_merge($catarray, get_term_children($cat, 'category')); - } - $catarray = array_unique($catarray); - $ids = get_objects_in_term($catarray, 'category'); - $ids = array_unique($ids); - if ( is_array($ids) && count($ids) > 0 ) { - $out_posts = "'" . implode("', '", $ids) . "'"; - $sql = "$wpdb->posts.ID IN ($out_posts)"; - } else { - $sql = "1 = 2"; - } - return $sql; -} - -function where_included_cats($included_cats) { - global $wpdb, $wp_version; - $catarray = explode(',', $included_cats); - foreach ( $catarray as $cat ) { - $catarray = array_merge($catarray, get_term_children($cat, 'category')); - } - $catarray = array_unique($catarray); - $ids = get_objects_in_term($catarray, 'category'); - if ( is_array($ids) && count($ids) > 0 ) { - $ids = array_unique($ids); - $in_posts = "'" . implode("', '", $ids) . "'"; - $sql = "ID IN ($in_posts)"; - } else { - $sql = "1 = 2"; - } - return $sql; -} - -function where_excluded_cats($excluded_cats) { - global $wpdb, $wp_version; - $catarray = explode(',', $excluded_cats); - foreach ( $catarray as $cat ) { - $catarray = array_merge($catarray, get_term_children($cat, 'category')); - } - $catarray = array_unique($catarray); - $ids = get_objects_in_term($catarray, 'category'); - if ( is_array($ids) && count($ids) > 0 ) { - $out_posts = "'" . implode("', '", $ids) . "'"; - $sql = "$wpdb->posts.ID NOT IN ($out_posts)"; - } else { - $sql = "1 = 1"; - } - return $sql; -} - -function where_excluded_authors($excluded_authors){ - return "post_author NOT IN ( $excluded_authors )"; -} - -function where_included_authors($included_authors){ - return "post_author IN ( $included_authors )"; -} - -function where_excluded_posts($excluded_posts) { - return "ID NOT IN ( $excluded_posts )"; -} - -function where_included_posts($included_posts) { - return "ID IN ( $included_posts )"; -} - -function where_tag_str($tag_str) { - global $wpdb; - if ( strpos($tag_str, ',') !== false ) { - $intags = explode(',', $tag_str); - foreach ( (array) $intags as $tag ) { - $tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db'); - } - $tag_type = 'any'; - } else if ( strpos($tag_str, '+') !== false ) { - $intags = explode('+', $tag_str); - foreach ( (array) $intags as $tag ) { - $tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db'); - } - $tag_type = 'all'; - } else { - $tags[] = sanitize_term_field('name', $tag_str, 0, 'post_tag', 'db'); - $tag_type = 'any'; - } - $ids = array(); - if ($tag_type == 'any') { - foreach ($tags as $tag){ - if (is_term($tag, 'post_tag')) { - $t = get_term_by('name', $tag, 'post_tag'); - $ids = array_merge($ids, get_objects_in_term($t->term_id, 'post_tag')); - } - } - } else { - foreach ($tags as $tag){ - if (is_term($tag, 'post_tag')) { - $t = get_term_by('name', $tag, 'post_tag'); - if (count($ids) > 0) { - $ids = array_intersect($ids, get_objects_in_term($t->term_id, 'post_tag')); - } else { - $ids = get_objects_in_term($t->term_id, 'post_tag'); - } - } - } - } - if ( is_array($ids) && count($ids) > 0 ) { - $ids = array_unique($ids); - $out_posts = "'" . implode("', '", $ids) . "'"; - $sql .= "$wpdb->posts.ID IN ($out_posts)"; - } else $sql .= "1 = 2"; - return $sql; -} - -// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example -function where_omit_post($manual_current_ID = -1) { - $postid = ppl_current_post_id($manual_current_ID); - if ($postid <= 1) $postid = -1; - return "ID != $postid"; -} - -function where_just_post() { - $postid = ppl_current_post_id(); - if ($postid <= 1) $postid = -1; - return "ID = $postid"; -} - -function where_hide_pass() { - return "post_password =''"; -} - -function where_hide_future() { - // from wp 2.1 future posts are taken care of by post status - $time_difference = get_option('gmt_offset'); - $now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600))); - $sql = "post_date <= '$now'"; - return $sql; -} - -function where_fulltext_match($weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms) { - $wsql = array(); - if ($weight_title) $wsql[] = "MATCH (`title`) AGAINST ( \"$titleterms\" )"; - if ($weight_content) $wsql[] = "MATCH (`content`) AGAINST ( \"$contentterms\" )"; - if ($weight_tags) $wsql[] = "MATCH (`tags`) AGAINST ( \"$tagterms\" )"; - return '(' . implode(' OR ', $wsql) . ') ' ; -} - -function where_author_comments() { - $author_email = get_the_author_email(); - return "'$author_email' != comment_author_email"; -} - -function where_user_comments() { - return "user_id = 0"; -} - -function score_fulltext_match($table_name, $weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms, $forced_ids='') { - global $wpdb; - $wsql = array(); - if ($weight_title) $wsql[] = "(".number_format($weight_title, 4, '.', '')." * (MATCH (`title`) AGAINST ( \"$titleterms\" )))"; - if ($weight_content) $wsql[] = "(".number_format($weight_content, 4, '.', '')." * (MATCH (`content`) AGAINST ( \"$contentterms\" )))"; - if ($weight_tags) $wsql[] = "(".number_format($weight_tags, 4, '.', '')." * (MATCH (`tags`) AGAINST ( \"$tagterms\" )))"; - if ($forced_ids) { - // apply a delta function to boost the score for certain IDs - $fIDs = explode(',', $forced_ids); - foreach($fIDs as $fID) { - $wsql[] = "100 * (1 - SIGN(ID ^ $fID))"; // the previous delta was $wsql[] = "100*EXP(-10*POW((ID-$fID),2))"; - - } - } - return '(' . implode(' + ', $wsql) . " ) as score FROM `$table_name` LEFT JOIN `$wpdb->posts` ON `pID` = `ID` "; -} - -function where_comment_type($comment_type) { - if ($comment_type === 'comments') $sql = "comment_type = ''"; - elseif ($comment_type === 'trackbacks') $sql = "comment_type != ''"; - return $sql; -} - -function where_check_age($direction, $length, $duration) { - global $wp_version; - if ('none' === $direction) return ''; - $age = "DATE_SUB(CURDATE(), INTERVAL $length $duration)"; - // we only filter out posts based on age, not pages - if ('before' === $direction) { - if (function_exists('get_post_type')) { - return "(post_date <= $age OR post_type='page')"; - } else { - return "(post_date <= $age OR post_status='static')"; - } - } else { - if (function_exists('get_post_type')) { - return "(post_date >= $age OR post_type='page')"; - } else { - return "(post_date >= $age OR post_status='static')"; - } - } -} - -function where_check_custom($key, $op, $value) { - if ($op === 'EXISTS') { - return "meta_key = '$key'"; - } else { - return "(meta_key = '$key' && meta_value $op '$value')"; - } -} - -/* - - End of SQL functions - -*/ - -function ppl_microtime() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); -} - -/* - - Some routines to handle appending output - -*/ - -// array of what to append to posts -global $ppl_filter_data; -$ppl_filter_data = array(); - -// each plugin calls this on startup to have content scanned for its own tag -function ppl_register_post_filter($type, $key, $class, $condition='') { - global $ppl_filter_data; - $options = get_option($key); - $priority = $options[$type . '_priority']; - $parameters = stripslashes($options[$type . '_parameters']); - $ppl_filter_data [] = array('type' => $type, 'priority' => $priority, 'class' => $class, 'parameters' => $parameters, 'key' => $key, 'condition' => stripslashes($condition)); - // we want them in decreasing priority - sort($ppl_filter_data); -} - -function ppl_post_filter($content) { - global $ppl_filter_data; - foreach ($ppl_filter_data as $data) { - if (('append' === $data['type'] && !is_feed() && eval($data['condition'])) || ('feed' === $data['type'] && is_feed()) ) - $content .= call_user_func_array(array($data['class'], 'execute'), array($data['parameters'], '
  • {link}
  • ', $data['key'])); - } - return $content; -} - -function ppl_post_filter_init() { - global $ppl_filter_data; - if (!$ppl_filter_data) return; - add_filter('the_content', 'ppl_post_filter', 5); -} - -// watch out that the registration functions are called earlier -add_action ('init', 'ppl_post_filter_init'); - -/* - - Now some routines to handle content filtering - -*/ - -// the '|'-separated list of valid content filter tags -global $ppl_filter_tags; - -// each plugin calls this on startup to have content scanned for its own tag -function ppl_register_content_filter($tag) { - global $ppl_filter_tags; - if (!$ppl_filter_tags) { - $ppl_filter_tags = $tag; - } else { - $tags = explode('|', $ppl_filter_tags); - $tags[] = $tag; - $tags = array_unique($tags); - $ppl_filter_tags = implode('|', $tags); - } -} - - -function ppl_do_replace($matches) { - return call_user_func(array($matches[1], 'execute'), $matches[2]); -} - -function ppl_content_filter($content) { - global $ppl_filter_tags; - // replaces every instance of "", for example, with the output of the plugin - // the filter tag can be followed by text which will be used as a parameter string to change the behaviour of the plugin - return preg_replace_callback("//", "ppl_do_replace", $content); -} - -function ppl_content_filter_init() { - global $ppl_filter_tags; - if (!$ppl_filter_tags) return; - add_filter( 'the_content', 'ppl_content_filter', 5 ); - add_filter( 'the_content_rss', 'ppl_content_filter', 5 ); - add_filter( 'the_excerpt', 'ppl_content_filter', 5 ); - add_filter( 'the_excerpt_rss', 'ppl_content_filter', 5 ); - add_filter( 'widget_text', 'ppl_content_filter', 5 ); -} - -// watch out that the registration functions are called earlier -add_action ('init', 'ppl_content_filter_init'); -add_action ('init', 'ppl_post_filter_init'); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/post-plugin-library/output_tags.php b/blog/wp-content/plugins/post-plugin-library/output_tags.php deleted file mode 100644 index f9665a2..0000000 --- a/blog/wp-content/plugins/post-plugin-library/output_tags.php +++ /dev/null @@ -1,1072 +0,0 @@ -ID; -} - -function otf_title ($option_key, $result, $ext) { - $value = oth_truncate_text($result->post_title, $ext); - return apply_filters('the_title', $value); -} - -function otf_url($option_key, $result, $ext) { - $value = apply_filters('the_permalink', get_permalink($result->ID)); - return oth_truncate_text($value, $ext); -} - -function otf_author($option_key, $result, $ext) { - if ($ext) { - $s = explode(':', $ext); - if (count($s) == 1) { - $type = $s[0]; - } - } - switch ($type) { - case 'display': - $author = get_author_name($result->post_author); - break; - case 'full': - $auth = get_userdata($result->post_author); - $author = $auth->first_name.' '.$auth->last_name; - break; - case 'reverse': - $auth = get_userdata($result->post_author); - $author = $auth->last_name.', '.$auth->first_name; - break; - case 'first': - $auth = get_userdata($result->post_author); - $author = $auth->first_name; - break; - case 'last': - $auth = get_userdata($result->post_author); - $author = $auth->last_name; - break; - default: - $author = get_author_name($result->post_author); - } - return $author; -} - -function otf_authorurl($option_key, $result, $ext) { - return get_author_posts_url($result->post_author); -} - -function otf_date($option_key, $result, $ext) { - if ($ext === 'raw') return $result->post_date; - else return oth_format_date($result->post_date, $ext); -} - -function otf_dateedited($option_key, $result, $ext) { - if ($ext === 'raw') return $result->post_modified; - else return oth_format_date($result->post_modified, $ext); -} - -function otf_time($option_key, $result, $ext) { - return oth_format_time($result->post_date, $ext); -} - -function otf_timeedited($option_key, $result, $ext) { - return oth_format_time($result->post_modified, $ext); -} - -function otf_excerpt($option_key, $result, $ext) { - if (!$ext) { - $len = 55; - $type = 'a'; - } else { - $s = explode(':', $ext); - if (count($s) == 1) { - $s[] = 'a'; - } - $len = $s[0]; - $type = $s[1]; - if ($type === 'b') { - if (count($s) > 2) { - $more = $s[2]; - } else { - $more = ' …'; - } - if (count($s) > 3) { - if ($s[3] === 'link') { - $url = otf_url($option_key, $result, ''); - $more = ''.$more.''; - } - } - if (count($s) > 4) { - $numsent = $s[4]; - } - } - } - switch ($type) { - case 'a': - $value = trim($result->post_excerpt); - if ($value == '') $value = $result->post_content; - $value = oth_trim_excerpt($value, $ext); - break; - case 'b': - $value = trim($result->post_excerpt); - if ($value === '') { - $value = $result->post_content; - $value = convert_smilies($value); - $value = oth_trim_extract($value, $len, $more, $numsent); - $value = apply_filters('get_the_content', $value); - remove_filter('the_content', 'ppl_content_filter', 5); - remove_filter('the_content', 'ppl_post_filter', 5); - $value = apply_filters('the_content', $value); - add_filter('the_content', 'ppl_content_filter', 5); - add_filter('the_content', 'ppl_post_filter', 5); - - } else { - $value = convert_smilies($value); - $value = apply_filters('get_the_excerpt', $value); - remove_filter('the_excerpt', 'ppl_content_filter', 5); - $value = apply_filters('the_excerpt', $value); - add_filter('the_excerpt', 'ppl_content_filter', 5); - } - break; - default: - $value = trim($result->post_excerpt); - if ($value == '') $value = $result->post_content; - $value = oth_trim_excerpt($value, $len); - break; - } - return $value; -} - -function otf_snippet($option_key, $result, $ext) { - $len = 100; - $type = 'char'; - $more = ''; - $link = 'nolink'; - if ($ext) { - $s = explode(':', $ext); - if ($s[0]) $len = $s[0]; - if ($s[1]) $type = $s[1]; - if ($s[2]) $more = $s[2]; - if ($s[3]) $link = $s[3]; - } - if ($link === 'link') { - $url = otf_url($option_key, $result, ''); - $more = ''.$more.''; - } - return oth_format_snippet($result->post_content, $option_key, $type, $len, $more); -} - -function otf_snippetword($option_key, $result, $ext) { - $len = 100; - $more = ''; - $link = 'nolink'; - if ($ext) { - $s = explode(':', $ext); - if ($s[0]) $len = $s[0]; - if ($s[1]) $more = $s[1]; - if ($s[2]) $link = $s[2]; - } - if ($link === 'link') { - $url = otf_url($option_key, $result, ''); - $more = ''.$more.''; - } - return oth_format_snippet($result->post_content, $option_key, 'word', $len, $more); -} - -function otf_fullpost($option_key, $result, $ext) { - remove_filter( 'the_content', 'ppl_content_filter', 5 ); - remove_filter( 'the_content', 'ppl_post_filter', 5 ); - $value = apply_filters('the_content', $result->post_content); - add_filter( 'the_content', 'ppl_content_filter', 5 ); - add_filter( 'the_content', 'ppl_post_filter', 5 ); - return str_replace(']]>', ']]>', $value); -} - -function otf_commentcount($option_key, $result, $ext) { - $value = $result->comment_count; - if ($ext) { - $s = explode(':', $ext); - if (count($s) == 3) { - if ($value == 0) $value = $s[0]; - elseif ($value == 1) $value .= ' ' . $s[1]; - else $value .= ' ' . $s[2]; - } - } - return $value; -} - -function otf_commentexcerpt($option_key, $result, $ext) { - if (!$ext) { - $len = 55; - $type = 'a'; - } else { - $s = explode(':', $ext); - if (count($s) == 1) { - $s[] = 'a'; - } - $len = $s[0]; - $type = $s[1]; - if ($type === 'b') { - if (count($s) > 2) { - $more = $s[2]; - } else { - $more = ' …'; - } - if (count($s) > 3) { - if ($s[3] === 'link') { - $url = otf_commenturl($option_key, $result, ''); - $more = ''.$more.''; - } - } - } - } - switch ($type) { - case 'a': - $value = oth_trim_comment_excerpt($result->comment_content, $ext); - break; - case 'b': - $value = $result->comment_content; - $value = convert_smilies($value); - - $text = str_replace(']]>', ']]>', $value); - if ($len <= count(preg_split('/[\s]+/', strip_tags($text), -1))) { - // remove html entities for now - $text = str_replace("\x06", "", $text); - preg_match_all("/&([a-z\d]{2,7}|#\d{2,5});/i", $text, $ents); - $text = preg_replace("/&([a-z\d]{2,7}|#\d{2,5});/i", "\x06", $text); - // now we start counting - $parts = preg_split('/([\s]+)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE); - $in_tag = false; - $num_words = 0; - $text = ''; - foreach($parts as $part) { - if(0 < preg_match('/<[^>]*$/s', $part)) { - $in_tag = true; - } else if(0 < preg_match('/>[^<]*$/s', $part)) { - $in_tag = false; - } - if(!$in_tag && '' != trim($part) && substr($part, -1, 1) != '>') { - $num_words++; - } - $text .= $part; - if($num_words >= $len && !$in_tag) break; - } - // put back the missing html entities - foreach ($ents[0] as $ent) $text = preg_replace("/\x06/", $ent, $text, 1); - $text = balanceTags($text, true); - $value = $text . $more; - } - $value = apply_filters('get_comment_text', $value); - break; - default: - $value = oth_trim_comment_excerpt($result->comment_content, $ext); - break; - } - return $value; -} - -function otf_commentsnippet($option_key, $result, $ext) { - $len = 100; - $type = 'char'; - $more = ''; - $link = 'nolink'; - if ($ext) { - $s = explode(':', $ext); - if ($s[0]) $len = $s[0]; - if ($s[1]) $type = $s[1]; - if ($s[2]) $more = $s[2]; - if ($s[3]) $link = $s[3]; - } - if ($link === 'link') { - $url = otf_commenturl($option_key, $result, ''); - $more = ''.$more.''; - } - return oth_format_snippet($result->comment_content, $option_key, $type, $len, $more); -} - -function otf_commentsnippetword($option_key, $result, $ext) { - $len = 100; - $more = ''; - $link = 'nolink'; - if ($ext) { - $s = explode(':', $ext); - if ($s[0]) $len = $s[0]; - if ($s[1]) $more = $s[1]; - if ($s[2]) $link = $s[2]; - } - if ($link === 'link') { - $url = otf_commenturl($option_key, $result, ''); - $more = ''.$more.''; - } - return oth_format_snippet($result->comment_content, $option_key, 'word', $len, $more); -} - -function otf_commentdate($option_key, $result, $ext) { - if ($ext === 'raw') return $result->comment_date; - return oth_format_date($result->comment_date, $ext); -} - -function otf_commenttime($option_key, $result, $ext) { - return oth_format_time($result->comment_date, $ext); -} - -function otf_commentdategmt($option_key, $result, $ext) { - if ($ext === 'raw') return $result->comment_date_gmt; - return oth_format_date($result->comment_date_gmt, $ext); -} - -function otf_commenttimegmt($option_key, $result, $ext) { - return oth_format_time($result->comment_date_gmt, $ext); -} - -function otf_commenter($option_key, $result, $ext) { - $value = $result->comment_author; - $value = apply_filters('get_comment_author', $value); - $value = apply_filters('comment_author', $value); - return oth_truncate_text($value, $ext); -} - -function otf_commenterurl($option_key, $result, $ext) { - $value = $result->comment_author_url; - $value = apply_filters('get_comment_author_url', $value); - return oth_truncate_text($value, $ext); -} - -function otf_commenterlink($option_key, $result, $ext) { - $url = otf_commenterurl($option_key, $result, ''); - $author = otf_commenter($option_key, $result, $ext); - if (empty($url) || $url == 'http://') $value = $author; - else $value = "$author"; - return $value; -} - -function otf_commenterip($option_key, $result, $ext) { - return $result->comment_author_IP; -} - -function otf_commenturl($option_key, $result, $ext) { - $value = apply_filters('the_permalink', get_permalink($result->ID)) . '#comment-' . $result->comment_ID; - return oth_truncate_text($value, $ext); -} - -function otf_commentlink($option_key, $result, $ext) { - $ttl = otf_commenter($option_key, $result, ''); - $ttl = '' . $ttl . ''; - if (!$ext) $ext = ' commented on '; - $ttl .= $ext; - $ttl .= ''.otf_title($option_key, $result, '').''; - $pml = otf_commenturl($option_key, $result, ''); - $pdt = oth_format_date($result->comment_date_gmt, ''); - $pdt .= __(' at ', 'post_plugin_library'); - $pdt .= oth_format_time($result->comment_date_gmt, ''); - return "$ttl"; -} - -function otf_commentlink2($option_key, $result, $ext) { - $commenturl = otf_commenturl($option_key, $result, ''); - $commentdate = otf_commentdate($option_key, $result, ''); - $commenttime = otf_commenttime($option_key, $result, ''); - $title = otf_title($option_key, $result, ''); - $commenter = otf_commenter($option_key, $result, ''); - $commentexcerpt = otf_commentexcerpt($option_key, $result, '10'); - return "$commenter - $commentexcerpt…"; -} - -function otf_commentpopupurl($option_key, $result, $ext) { - global $wpcommentspopupfile, $wpcommentsjavascript; - $output = ''; - if ( $wpcommentsjavascript ) { - if ( empty( $wpcommentspopupfile ) ) - $home = get_option('home'); - else - $home = get_option('siteurl'); - $output .= $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $result->ID; - $output .= '#comment-' . $result->comment_ID; - $output .= '" onclick="wpopen(this.href); return false'; - } - return $output; -} - -function otf_catlinks($option_key, $result, $ext) { - return otf_categorylinks($option_key, $result, $ext); -} - -function otf_categorylinks($option_key, $result, $ext) { - $cats = get_the_category($result->ID); - $value = ''; $n = 0; - foreach ($cats as $cat) { - if ($n > 0) $value .= $ext; - $catname = apply_filters('single_cat_title', $cat->cat_name); - $value .= ''.$catname.''; - ++$n; - } - return $value; -} - -function otf_catnames($option_key, $result, $ext) { - return otf_categorynames($option_key, $result, $ext); -} - -function otf_categorynames($option_key, $result, $ext) { - $cats = get_the_category($result->ID); - $value = ''; $n = 0; - foreach ($cats as $cat) { - if ($n > 0) $value .= $ext; - $value .= apply_filters('single_cat_title', $cat->cat_name); - ++$n; - } - return $value; -} - -function otf_custom($option_key, $result, $ext) { - $custom = get_post_custom($result->ID); - return $custom[$ext][0]; -} - -function otf_tags($option_key, $result, $ext) { - $tags = (array) get_the_tags($result->ID); - $tag_list = array(); - foreach ( $tags as $tag ) { - $tag_list[] = $tag->name; - } - if (!$ext) $ext = ', '; - $tag_list = join( $ext, $tag_list ); - return $tag_list; -} - -function otf_taglinks($option_key, $result, $ext) { - $tags = (array) get_the_tags($result->ID); - $tag_list = ''; - $tag_links = array(); - foreach ( $tags as $tag ) { - $link = get_tag_link($tag->term_id); - if ( is_wp_error( $link ) ) - return $link; - $tag_links[] = ''; - } - if (!$ext) $ext = ' '; - $tag_links = join( $ext, $tag_links ); - $tag_links = apply_filters( 'the_tags', $tag_links ); - $tag_list .= $tag_links; - return $tag_list; -} - -function otf_totalposts($option_key, $result, $ext) { - global $wpdb; - $value = ''; - if (function_exists('get_post_type')) { - $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); - } else { - $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); - } - return $value; -} - -function otf_totalpages($option_key, $result, $ext) { - global $wpdb; - $value = ''; - if (function_exists('get_post_type')) { - $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish'"); - } else { - $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'static'"); - } - return $value; -} - -function otf_link($option_key, $result, $ext) { - $ttl = otf_title($option_key, $result, $ext); - $pml = otf_url($option_key, $result, null); - $pdt = otf_date($option_key, $result, null); - return "$ttl"; -} - -function otf_score($option_key, $result, $ext) { - return sprintf("%.0f", $result->score); -} - -// tries to get the number of post views from a few popular plugins if the are installed -function otf_postviews($option_key, $result, $ext) { - global $wpdb; - // alex king's popularity contest - if (class_exists('ak_popularity_contest')) $count = $akpc->get_post_total($result->ID); - // my own post view count - else if (function_exists('popular_posts_views')) $count = popular_posts_views($result->ID); - // lester chan's postviews - else if (function_exists('the_views')) { - $count = get_post_custom($result->ID); - $count = intval($count['views'][0]); - } - // mark ghosh's top10 - else if (function_exists('show_post_count')) {$id = $result->ID; $count = $wpdb->get_var("select cntaccess from mostAccessed WHERE postnumber = $id");} - // Ivan Djurdjevac's CountPosts - else if (function_exists('HitThisPost')) {$id = $result->ID; $count = $wpdb->get_var("SELECT post_hits FROM $wpdb->posts WHERE ID=$id");} - if (!$count) $count = 0; - return $count; -} - -function oth_get_actual_size($imgtag) { - // first try extracting the width and height attributes - if (preg_match('/\s+width\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches)) { - $current_width = $matches[1]; - if (preg_match('/\s+height\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches)) { - $current_height = $matches[1]; - } - } - // then try using the GD library - if (!(($current_width) && ($current_height))) { - // extract the image src url - preg_match('/\s+src\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches); - $error_level = error_reporting(0); - if (function_exists('getimagesize') && $imagesize = getimagesize($matches[1])) { - $current_width = $imagesize['0']; - $current_height = $imagesize['1']; - } else { - // if all else fails... - $current_width = $current_height = 0; - } - error_reporting($error_level); - } - return array($current_width, $current_height); -} - -function oth_image_size_full($w, $h, $imgtag){ - return array(1, 1); -} - -function oth_image_size_scale($w, $h, $imgtag){ - $maxsize = max($w, $h); - list($current_width, $current_height) = oth_get_actual_size($imgtag); - $width_ratio = $height_ratio = 1.0; - if ($current_width > $maxsize) - $width_ratio = $maxsize / $current_width; - if ($current_height > $maxsize) - $height_ratio = $maxsize / $current_height; - // the smaller ratio is the one we need to fit it to the constraining box - $ratio = min( $width_ratio, $height_ratio ); - $w = intval($current_width * $ratio); - $h = intval($current_height * $ratio); - return array($w, $h); -} - -function oth_image_size_blank($w, $h, $imgtag){ - return array(0, 0); -} - -function oth_image_size_exact($w, $h, $imgtag){ - return array($w, $h); -} - -function oth_image_size_fixedw($w, $h, $imgtag){ - list($current_width, $current_height) = oth_get_actual_size($imgtag); - $h = intval($w * ($current_height / $current_width)); - return array($w, $h); -} - -function oth_image_size_fixedh($w, $h, $imgtag){ - list($current_width, $current_height) = oth_get_actual_size($imgtag); - $w = intval($h * ($current_width / $current_height)); - return array($w, $h); -} - -function oth_test($x) { - if (empty($x)) return 'a'; - if (is_numeric($x)) return 'b'; - return 'c'; -} - -function oth_process($w, $h) { - static $table = array( 'a' => array('a' => 'full', 'b' => 'scale', 'c' => 'blank'), - 'b' => array('a' => 'scale', 'b' => 'exact', 'c' => 'fixedw'), - 'c' => array('a' => 'blank', 'b' => 'fixedh', 'c' => 'blank')); - return 'oth_image_size_' . $table[oth_test($w)][oth_test($h)]; -} - -function otf_image($option_key, $result, $ext) { - // extract any image tags - $content = $result->post_content; - if ($ext) { - $s = explode(':', $ext); - if ($s[3] === 'post') { - $content = apply_filters('the_content', $content); - } - } - if ($s[4] === 'link') { - $pattern = '/.+?a>/i'; - $pattern2 = '#(|>)#is'; - } else { - $pattern = '//i'; - $pattern2 = '#(|>)#is'; - } - if (!preg_match_all($pattern, $content, $matches)) { - // no tags in content - if (($s[5]) && ($s[6])) { - // a default tag has been given - return $s[5].':'.$s[6]; - } else { - return ''; - } - } - $i = $s[0]; - if (!$i) $i = 0; - $imgtag = $matches[0][$i]; - $process = oth_process($s[1],$s[2]); - list($w, $h) = $process(intval($s[1]), intval($s[2]), $imgtag); - if ($w === 0) return ''; - if ($w === 1) return $imgtag; - // remove height or width if present - $imgtag = preg_replace('/(width|height)\s*=\s*[\'|\"](.*?)[\'|\"]/is', '', $imgtag); - // insert the new size - $imgtag = preg_replace($pattern2, "$1 height=\"$h\" width=\"$w\" $2", $imgtag); - return $imgtag; -} - -function otf_imagesrc($option_key, $result, $ext) { - // extract any image tags - $content = $result->post_content; - if ($ext) { - $s = explode(':', $ext); - if ($s[1] === 'post') { - $content = apply_filters('the_content', $content); - } - if ($s[2]) $suffix = $s[2]; - } - $pattern = '//i'; - if (!preg_match_all($pattern, $content, $matches)) return ''; - $i = $s[0]; - if (!$i) $i = 0; - $imgsrc = $matches[1][$i]; - if ($suffix) { - if ($suffix === '?m') $suffix = '-' . get_option('medium_size_w') . 'x' . get_option('medium_size_h'); - if ($suffix === '?t') $suffix = '-' . get_option('thumbnail_size_w') . 'x' . get_option('thumbnail_size_h'); - $pathinfo = pathinfo($imgsrc); - $extension = $pathinfo['extension']; - $imgsrc = str_replace(".$extension", "$suffix.$extension", $imgsrc); - } - return $imgsrc; -} - -function otf_imagealt($option_key, $result, $ext) { - // extract any image tags - $content = $result->post_content; - if ($ext) { - $s = explode(':', $ext); - if ($s[1] === 'post') { - $content = apply_filters('the_content', $content); - } - if ($s[2]) $suffix = $s[2]; - } - $pattern = '//i'; - if (!preg_match_all($pattern, $content, $matches)) return ''; - $i = $s[0]; - if (!$i) $i = 0; - return $matches[1][$i]; -} - -function otf_gravatar($option_key, $result, $ext) { - $size = 96; - $rating = ''; - $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=$size"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') - if ($ext) { - $s = explode(':', $ext); - if (isset($s[0])) $size = $s[0]; - if (isset($s[1])) $rating = $s[1]; - if (isset($s[3])) { - $default = 'http:'.$s[3]; - } else { - if (isset($s[2])) $default = $s[2]; - } - } - $email = ''; - if (isset($result->comment_author_email)) { - $email = $result->comment_author_email; - } else { - $user = get_userdata($result->post_author); - if ($user) $email = $user->user_email; - } - if (!empty($email)) { - $out = 'http://www.gravatar.com/avatar/'; - $out .= md5(strtolower($email)); - $out .= '?s='.$size; - $out .= '&d=' . urlencode( $default ); - if ('' !== $rating) - $out .= "&r={$rating}"; - $avatar = ""; - } else { - $avatar = ""; - } - return apply_filters('get_avatar', $avatar, $email, $size, $default); -} - -// returns the principal category id of a post -- if a cats are hierarchical chooses the most specific -- if multiple cats chooses the first (numerically smallest) -function otf_categoryid($option_key, $result, $ext) { - $cats = get_the_category($result->ID); - foreach ($cats as $cat) { - $parents[] = $cat->category_parent; - } - foreach ($cats as $cat) { - if (!in_array($cat->cat_ID, $parents)) $categories[] = $cat->cat_ID; - } - return $categories[0]; -} - -// fails if parentheses are out of order or nested -function oth_splitapart($subject) { - $bits = explode(':', $subject); - $inside = false; - $newbits = array(); - $acc = ''; - foreach ($bits as $bit) { - if (false !== strpos($bit, '{')) { - $inside = true; - $acc = ''; - } - if (false !== strpos($bit, '}')) { - $inside = false; - if ($acc !== '') { - $acc .= ':' . $bit; - } else { - $acc = $bit; - } - } - if ($inside) { - if ($acc !== '') { - $acc .= ':' . $bit; - } else { - $acc = $bit; - } - } else { - if ($acc !== '') { - $newbits[] = $acc; - $acc = ''; - } else { - $newbits[] = $bit; - } - } - } - return $newbits; -} - -function otf_if($option_key, $result, $ext) { - global $post; - $ID = ppl_current_post_id(); - $condition = 'true'; - $true = ''; - $false = ''; - if ($ext) { - $s = oth_splitapart($ext); - if (isset($s[0])) $condition = $s[0]; - if (isset($s[1])) $true = $s[1]; - if (isset($s[2])) $false = $s[2]; - } - if (strpos($condition, '{')!==false) { - $condition = ppl_expand_template($result, $condition, ppl_prepare_template($condition), $option_key); - } - if (eval("return ($condition);")) $tag = $true; else $tag = $false; - // if the replacement tag contains pseudotags expand them - if (strpos($tag, '}')!==false) { - $tag = ppl_expand_template($result, $tag, ppl_prepare_template($tag), $option_key); - } - return $tag; -} - -function otf_php($option_key, $result, $ext) { - global $post; - $ID = ppl_current_post_id(); - $value = ''; - if ($ext) { - if (strpos($ext, '{')!==false) { - $ext = ppl_expand_template($result, $ext, ppl_prepare_template($ext), $option_key); - } - ob_start(); - eval($ext); - $value = ob_get_contents(); - ob_end_clean(); - } - return $value; -} - - -// ****************************** Helper Functions ********************************************* - -function oth_truncate_text($text, $ext) { - if (!$ext) { - return $text; - } - $s = explode(':', $ext); - if (count($s) > 2) { - return $text; - } - if (count($s) == 1) { - $s[] = 'wrap'; - } - $length = $s[0]; - $type = $s[1]; - switch ($type) { - case 'wrap': - $length += strlen('
    '); - if (!function_exists('mb_detect_encoding')) { - return wordwrap($text, $length, '
    ', true); - } else { - $e = mb_detect_encoding($text); - $formatted = ''; - $position = -1; - $prev_position = 0; - $last_line = -1; - while($position = mb_strpos($text, " ", ++$position, $e)) { - if($position > $last_line + $length + 1) { - $formatted.= mb_substr($text, $last_line + 1, $prev_position - $last_line - 1, $e).'
    '; - $last_line = $prev_position; - } - $prev_position = $position; - } - $formatted.= mb_substr($text, $last_line + 1, mb_strlen( $text ), $e); - return $formatted; - } - case 'chop': - if (!function_exists('mb_detect_encoding')) { - return substr($text, 0, $length); - } else { - $e = mb_detect_encoding($text); - return mb_substr($text, 0, $length, $e); - } - case 'trim': - if (strlen($text) > $length) { - } else { - return $text; - } - if (!function_exists('mb_detect_encoding')) { - $textlen = strlen($text); - if ($textlen > $length) { - $text = substr($text, 0, $length-2); - return rtrim($text,".").'…'; - } else { - return $text; - } - } else { - $e = mb_detect_encoding($text); - $textlen = mb_strlen($text, $e); - if ($textlen > $length) { - $text = mb_substr($text, 0, $length-2, $e); - return rtrim($text,".").'…'; - } else { - return $text; - } - } - case 'snip': - if (!function_exists('mb_detect_encoding')) { - $textlen = strlen($text); - if ($textlen > $length) { - $b = floor(($length - 2)/2); - $l = $textlen - $b - 1; - return substr($text, 0, $b).'…'.substr($text, $l); - } else { - return $text; - } - } else { - $e = mb_detect_encoding($text); - $textlen = mb_strlen($text, $e); - if ($textlen > $length) { - $b = floor(($length - 2)/2); - $l = $textlen - $b - 1; - return mb_substr($text, 0, $b, $e).'…'.mb_substr($text, $l, 1000, $e); - } else { - return $text; - } - } - default: - return wordwrap($t, $length, '
    ', true); - } -} - -function oth_trim_extract($text, $len, $more, $numsent) { - $text = str_replace(']]>', ']]>', $text); - if(strpos($text, '')) { - $parts = explode('', $text, 2); - $text = $parts[0]; - } else { - if ($len > count(preg_split('/[\s]+/', strip_tags($text), -1))) return $text; - // remove html entities for now - $text = str_replace("\x06", "", $text); - preg_match_all("/&([a-z\d]{2,7}|#\d{2,5});/i", $text, $ents); - $text = preg_replace("/&([a-z\d]{2,7}|#\d{2,5});/i", "\x06", $text); - // now we start counting - $parts = preg_split('/([\s]+)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE); - $in_tag = false; - $num_words = 0; - $sentences = array(); - $words = ''; - foreach($parts as $part) { - if(0 < preg_match('/<[^>]*$/s', $part)) { - $in_tag = true; - } else if(0 < preg_match('/>[^<]*$/s', $part)) { - $in_tag = false; - } - if(!$in_tag && '' != trim($part) && substr($part, -1, 1) != '>') { - $num_words++; - } - if(!$in_tag && '' != trim($part) && false !== strpos('.?!', substr($part, -1, 1))) { - $sentences [] = $words . $part; - $words = ''; - } else { - $words .= $part; - } - if($num_words >= $len && !$in_tag) break; - } - if (!isset($numsent)) { - $text = implode('', $sentences) . $words; - } else { - $numsent = abs($numsent); - if ($numsent == 0) { - $text = implode('', $sentences); - } else { - $text = implode('', array_slice($sentences, 0, $numsent)); - } - } - // put back the missing html entities - foreach ($ents[0] as $ent) $text = preg_replace("/\x06/", $ent, $text, 1); - } - $text = balanceTags($text, true); - $text = $text . $more; - return $text; -} - -function oth_format_snippet($content, $option_key, $trim, $len, $more) { - $content = strip_tags($content); - $p = get_option($option_key); - if ($p['stripcodes']) $content = oth_strip_special_tags($content, $p['stripcodes']); - // strip extra whitespace - $content = preg_replace('/\s+/u', ' ', $content); - $content = stripslashes($content); - if (function_exists('mb_detect_encoding')) $enc = mb_detect_encoding($content); - // grab a maximum number of characters - if ($enc) { - mb_internal_encoding($enc); - if (mb_strlen($content) >= $len) { - $snippet = mb_substr($content, 0, $len); - if ($trim == 'word' && mb_strlen($snippet) == $len) { - // trim back to the last full word--NB if our snippet ends on a word - // boundary we still have to trim back to the non-word character - // (the final 's' in the pattern makes sure we match newlines) - preg_match('/^(.*)\W/su', $snippet, $matches); - //if we can't get a single full word we use the full snippet - // (we use $matches[1] because we don't want the white-space) - if ($matches[1]) $snippet = $matches[1]; - } - $snippet .= $more; - } else { - $snippet = $content; - } - } else { - if (strlen($content) >= $len) { - $snippet = substr($content, 0, $len); - if ($trim == 'word' && strlen($snippet) == $len) { - // trim back to the last full word--NB if our snippet ends on a word - // boundary we still have to trim back to the non-word character - // (the final 's' in the pattern makes sure we match newlines) - preg_match('/^(.*)\W/s', $snippet, $matches); - //if we can't get a single full word we use the full snippet - // (we use $matches[1] because we don't want the white-space) - if ($matches[1]) $snippet = $matches[1]; - } - $snippet .= $more; - } else { - $snippet = $content; - } - } - return $snippet; -} - -function oth_strip_special_tags($text, $stripcodes) { - $numtags = count($stripcodes); - for ($i = 0; $i < $numtags; $i++) { - if (!$stripcodes[$i]['start'] || !$stripcodes[$i]['end']) return $text; - $pattern = '/('. oth_regescape($stripcodes[$i]['start']) . '(.*?)' . oth_regescape($stripcodes[$i]['end']) . ')/i'; - $text = preg_replace($pattern, '', $text); - } - return $text; -} - -function oth_trim_excerpt($content, $len) { - // taken from the wp_trim_excerpt filter - remove_filter( 'the_content', 'ppl_content_filter', 5 ); - remove_filter( 'the_content', 'ppl_post_filter', 5 ); - $text = apply_filters('the_content', $content); - add_filter( 'the_content', 'ppl_content_filter', 5 ); - add_filter( 'the_content', 'ppl_post_filter', 5 ); - $text = str_replace(']]>', ']]>', $text); - $text = strip_tags($text); - if (!$len) $len = 55; - $excerpt_length = $len; - $words = explode(' ', $text, $excerpt_length + 1); - if (count($words) > $excerpt_length) { - array_pop($words); - $text = implode(' ', $words); - } - $text = convert_smilies($text); - return $text; -} - -function oth_trim_comment_excerpt($content, $len) { - // adapted from the wp_trim_excerpt filter - $text = $content; - $text = apply_filters('get_comment_text', $text); - $text = str_replace(']]>', ']]>', $text); - $text = strip_tags($text); - if (!$len) $len = 55; - $excerpt_length = $len; - $words = explode(' ', $text, $excerpt_length + 1); - if (count($words) > $excerpt_length) { - array_pop($words); - $text = implode(' ', $words); - } - $text = convert_smilies($text); - return $text; -} - -function oth_format_date($date, $fmt) { - if (!$fmt) $fmt = get_option('date_format'); - $d = mysql2date($fmt, $date); - $d = apply_filters('get_the_time', $d, $fmt); - return apply_filters('the_time', $d, $fmt); -} - -function oth_format_time($time, $fmt) { - if (!$fmt) $fmt = get_option('time_format'); - $d = mysql2date($fmt, $time); - $d = apply_filters('get_the_time', $d, $fmt); - return apply_filters('the_time', $d, $fmt); -} - -function oth_regescape($s) { - $s = str_replace('\\', '\\\\', $s); - $s = str_replace('/', '\\/', $s); - $s = str_replace('[', '\\[', $s); - $s = str_replace(']', '\\]', $s); - return $s; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php b/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php deleted file mode 100644 index b59528f..0000000 --- a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php +++ /dev/null @@ -1,45 +0,0 @@ -Similar Posts, Recent Posts, Random Posts, and Recent Comments plugins. Make sure you have the latest version of this plugin. -Author: Rob Marsh, SJ -Version: 2.6.2.1 -Author URI: http://rmarsh.com/ -*/ - -/* -Copyright 2008 Rob Marsh, SJ (http://rmarsh.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -define ('POST_PLUGIN_LIBRARY', true); - -if ( ! defined( 'WP_CONTENT_URL' ) ) - define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); -if ( ! defined( 'WP_CONTENT_DIR' ) ) - define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); -if ( ! defined( 'WP_PLUGIN_URL' ) ) - define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); -if ( ! defined( 'WP_PLUGIN_DIR' ) ) - define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); - -if (!defined('CF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/common_functions.php'); -if (!defined('ACF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin_common_functions.php'); -if (!defined('OT_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/output_tags.php'); -if (!defined('ADMIN_SUBPAGES_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin-subpages.php'); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot b/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot deleted file mode 100644 index 4ef4a7f..0000000 --- a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot +++ /dev/null @@ -1,278 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Rob Marsh, SJ -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://wordpress.org/tag/post-plugin-library\n" -"POT-Creation-Date: 2008-09-13 11:26+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: admin_common_functions.php:120 -msgid "Available Tags" -msgstr "" - -#: admin_common_functions.php:200 -msgid "" -"This option takes you to my site where you can inform me of any issues \r\n" -"\tyou are having with this plugin. It also passes along useful debugging " -"information such as \r\n" -"\twhich versions of WordPress, PHP, and MySQL you are using, as well as the " -"current \r\n" -"\tplugin settings." -msgstr "" - -#: admin_common_functions.php:204 -msgid "File Report" -msgstr "" - -#: admin_common_functions.php:235 -msgid "The plugin and all its settings have been completely removed" -msgstr "" - -#: admin_common_functions.php:243 -msgid "" -"Deactivating a plugin from the Plugins page usually leaves all the plugin's" -"\r\n" -"\tsettings intact. Often this is the desired behaviour as you can then " -"choose to reactivate the plugin \r\n" -"\tand all your settings will still be in place. If, however, you want to " -"remove this plugin \r\n" -"\tcompletely, along with all its settings and tables, you can do so by " -"pressing the button below." -msgstr "" - -#: admin_common_functions.php:249 -msgid "Remove Plugin" -msgstr "" - -#: admin_common_functions.php:282 -msgid "Number of posts to show:" -msgstr "" - -#: admin_common_functions.php:291 -msgid "Number of posts to skip:" -msgstr "" - -#: admin_common_functions.php:300 -msgid "Omit the current post?" -msgstr "" - -#: admin_common_functions.php:314 -msgid "Show just the current post?" -msgstr "" - -#: admin_common_functions.php:328 -msgid "Show password-protected posts?" -msgstr "" - -#: admin_common_functions.php:342 -msgid "Show static pages?" -msgstr "" - -#: admin_common_functions.php:357 -msgid "Show attachments?" -msgstr "" - -#: admin_common_functions.php:371 -msgid "Match the current post's author?" -msgstr "" - -#: admin_common_functions.php:385 -msgid "Match the current post's category?" -msgstr "" - -#: admin_common_functions.php:400 -msgid "Match the current post's tags?" -msgstr "" - -#: admin_common_functions.php:415 -msgid "Default display if no matches:" -msgstr "" - -#: admin_common_functions.php:424 -msgid "Show nothing if no matches?" -msgstr "" - -#: admin_common_functions.php:438 -msgid "Text and codes before the list:" -msgstr "" - -#: admin_common_functions.php:447 -msgid "Text and codes after the list:" -msgstr "" - -#: admin_common_functions.php:456 -msgid "Output template:" -msgstr "" - -#: admin_common_functions.php:465 -msgid "Text and codes between items:" -msgstr "" - -#: admin_common_functions.php:475 -msgid "" -"Match posts with tags:
    (a,b matches posts with either tag, a+b only " -"matches posts with both tags)" -msgstr "" - -#: admin_common_functions.php:484 -msgid "Posts to exclude:" -msgstr "" - -#: admin_common_functions.php:485 admin_common_functions.php:494 -msgid "comma-separated IDs" -msgstr "" - -#: admin_common_functions.php:493 -msgid "Posts to include:" -msgstr "" - -#: admin_common_functions.php:503 -msgid "Authors to exclude/include:" -msgstr "" - -#: admin_common_functions.php:537 -msgid "Categories to exclude/include:" -msgstr "" - -#: admin_common_functions.php:593 -msgid "Other plugins' tags to remove from snippet:" -msgstr "" - -#: admin_common_functions.php:596 -msgid "opening" -msgstr "" - -#: admin_common_functions.php:596 -msgid "closing" -msgstr "" - -#: admin_common_functions.php:607 -msgid "Ignore posts :" -msgstr "" - -#: admin_common_functions.php:635 -msgid "Display posts that are:" -msgstr "" - -#: admin_common_functions.php:675 -msgid "Match posts by custom field:" -msgstr "" - -#: admin_common_functions.php:706 -msgid "Output after post:" -msgstr "" - -#: admin_common_functions.php:729 -msgid "Output in RSS feeds:" -msgstr "" - -#: admin_common_functions.php:751 -msgid "Output in widget:" -msgstr "" - -#: admin_common_functions.php:774 -msgid "" -"Add Similar Posts to feeds? (DEPRECATED! This setting will be removed in the " -"next major release - use the placement settings instead)" -msgstr "" - -#: admin_common_functions.php:788 -msgid "Output in content:
    (via special tags)" -msgstr "" - -#: admin_common_functions.php:810 -msgid "Sort Output By:
    leave blank for default order" -msgstr "" - -#: admin_common_functions.php:878 -msgid "Select output by custom field:" -msgstr "" - -#: admin_common_functions.php:911 -msgid "Maximum number of words to use for match:" -msgstr "" - -#: admin_common_functions.php:920 -msgid "Extract terms to match by:" -msgstr "" - -#: admin_common_functions.php:934 -msgid "Relative importance of:" -msgstr "" - -#: admin_common_functions.php:949 -msgid "Look for manual links in custom field?" -msgstr "" - -#: admin_common_functions.php:965 -msgid "Type of comment to show:" -msgstr "" - -#: admin_common_functions.php:980 -msgid "Type of grouping:" -msgstr "" - -#: admin_common_functions.php:996 -msgid "Group title template:" -msgstr "" - -#: admin_common_functions.php:1005 -msgid "Omit comments by the post author?" -msgstr "" - -#: admin_common_functions.php:1019 -msgid "Omit comments by registered users?" -msgstr "" - -#: admin_common_functions.php:1033 -msgid "Order by date of last edit rather than date of creation?" -msgstr "" - -#: admin_common_functions.php:1055 -msgid "Visit plugin homepage" -msgstr "" - -#: output_tags.php:384 -msgid " at " -msgstr "" - -#: output_tags.php:424 -#, php-format -msgid "View all posts in %s" -msgstr "" - -#. Plugin Name of an extension -msgid "Post-Plugin Library" -msgstr "" - -#. Plugin URI of an extension -msgid "http://rmarsh.com/plugins/post-plugin-library/" -msgstr "" - -#. Description of an extension -msgid "" -"Does nothing by itself but supplies common code for the Similar Posts, Recent Posts, Random Posts, and Recent Comments " -"plugins. Make sure you have the latest version of this plugin." -msgstr "" - -#. Author of an extension -msgid "Rob Marsh, SJ" -msgstr "" - -#. Author URI of an extension -msgid "http://rmarsh.com/" -msgstr "" diff --git a/blog/wp-content/plugins/post-plugin-library/readme.txt b/blog/wp-content/plugins/post-plugin-library/readme.txt deleted file mode 100644 index 90ac836..0000000 --- a/blog/wp-content/plugins/post-plugin-library/readme.txt +++ /dev/null @@ -1,129 +0,0 @@ -=== Post-Plugin Library === -Contributors: RobMarsh -Tags: posts, comments, random, recent, similar, related, popular, post-plugins -Requires at least: 1.5 -Tested up to: 2.6.2 -Stable tag: 2.6.2.1 - -The shared code library for Similar posts, Recent Posts, Random Posts, Popular Posts and Recent Comments. - -== Description == - -The Post-Plugin Library does nothing by itself but **must** be installed to provide shared code for the [Similar Posts](http://wordpress.org/extend/plugins/similar-posts/), [Recent Posts](http://wordpress.org/extend/plugins/recent-posts-plugin/), [Random Posts](http://wordpress.org/extend/plugins/random-posts-plugin/), [Popular Posts](http://wordpress.org/extend/plugins/popular-posts-plugin/), and [Recent Comments](http://wordpress.org/extend/plugins/recent-comments-plugin/) plugins. - -== Installation == - -1. IMPORTANT! If you are upgrading from a previous version first deactivate the plugin, then delete the plugin folder from your server. - -1. Upload the plugin folder to your /wp-content/plugins/ folder. - -1. Go to the **Plugins** page and activate the plugin. - -[My web site](http://rmarsh.com/) has [full instructions](http://rmarsh.com/plugins/) and [information on customisation](http://rmarsh.com/plugins/post-options/). - -== Version History == - -* 2.6.2.1 - * support for recent comments to only show one comment per post - * fix for donate link -* 2.6.2.0 - * new {imagealt} output tag -- rather like {imagesrc} - * {excerpt} can now trim to whole sentences - * content filter can now take parameter string - * widget can now take parameter string - * output can be appended to posts & feeds -* 2.6.1.0 - * the current post can be marked manually - * widgets now honour the option to show no output if list is empty - * {commenterlink} now respects the appropriate filter -* 2.6.0.0 - * version bump to indicate compatibility with WP 2.6 - * fix to really include attachments - * new parameter for {imagesrc} to append a suffix to the image name, e.g. to get the thumbnail for attachments -* 2.5.0.11 - * new option to include attachments - * {php} tag now accepts nested tags - * new output tag {authorurl} -- permalink to archive of author's posts - * fix for numeric locale issue in Similar Posts -* 2.5.10 - * new option to select algorithm for term extraction in Similar Posts - * new manual links option in Similar Posts - * fix for faulty non-English tag indexing in Similar Posts - * fix for page selection in old versions of WP - * made omit current post try harder to find current post ID -* 2.5.0.9 - * new option to order Recent Posts by date of last edit rather than date of creation - * new option to match the current post's author - * extended options for snippet and excerpt output tags -* 2.5.0.7 - * new option to show by status, i.e., published/private/draft/future - * {categorynames} and {categorylinks} apply 'single_cat_name' filter - * fixes bug in WP pre-2.2 causing installation code to fail -* 2.5.0.6 - * bug fix for new option for Recent Comments -* 2.5.0.5 - * new option for Recent Comments: just_current_post - * {snippet} and {commentsnippet} now handle '...' - * {commentexcerpt} now same parameters as (excerpt} -* 2.5.0.4 - * {commentpopupurl} targets the correct comment -* 2.5.0.3 - * bug fix for showing pages when not selected -* 2.5.0.2 - * {image} tag has even more options - * new {commentpopupurl} tag -* 2.5.0.1 - * made compatible with WP MU -* 2.5.0 - * {image} has new post, link, and default parameters - * new {imagesrc} tag - * fix to empty category bug -* 2.5b28 - * more work on {image} scaling - * improvements to Similar Posts matching - * experiment with Chinese/Korean/Japanese matching -* 2.5b27 - * made {image} scaling more robust -* 2.5b26 - * reverted thumnail serving (speed) - * fix current post after extra query -* 2.5b25 - * option to sort output, group templates - * removed 'trim_before' option added more logical 'divider' - * {date:raw}, {commentdate:raw}, etc. - * fix for {image} resizing when and not - * {image} now serves real thumbnails -* 2.5b24 - * fix for recursive replacement by content filter - * fix to {gravatar} to allow for 'identicon' etc. - * fix to {commenter} to allow trimming - * fix a warning in safe mode -* 2.5b23 - * new option to filter on custom fields - * proper nesting of braces in {if} ; also allowed in condition - * improved bug report feature - * better way to omit user comments -* 2.5b22 - * show_pages option now possible to show only pages - * update for {postviews} - * fix {commenterlink} giving no output -* 2.5b21 - * fix bug in {snippet} stripping -* 2.5b20 - * fix default behaviour of {gravatar} -* 2.5b18 - * new tag {if:condition:true:false} -* 2.5b17 - * enhanced {php} -* 2.5b16 - * fix submenus to work with Lighter Admin Drop Menu -* 2.5b15 - * fix bugs, add 'included posts' setting -* 2.5b14 - * enhanced bug reporter -* 2.5b13 - * added {gravatar}, extended {author} -* 2.5b11 - * fixed problem with bug reporter -* 2.5b9 - * clarifying installation instructions \ No newline at end of file diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js b/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js deleted file mode 100644 index 5dc6f30..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js +++ /dev/null @@ -1,169 +0,0 @@ -wpEditorInit = function() { - // Activate tinyMCE if it's the user's default editor - if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) { - document.getElementById('editorcontainer').style.padding = '0px'; - tinyMCE.execCommand("mceAddControl", false, "content"); - } else { - var H; - if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) - document.getElementById('content').style.height = H.ch - 30 + 'px'; - } -}; - -switchEditors = { - - saveCallback : function(el, content, body) { - - document.getElementById(el).style.color = '#fff'; - if ( tinyMCE.activeEditor.isHidden() ) - content = document.getElementById(el).value; - else - content = this.pre_wpautop(content); - - return content; - }, - - pre_wpautop : function(content) { - // We have a TON of cleanup to do. Line breaks are already stripped. - - // Protect pre|script tags - content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, ''); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, ''); - }); - - // Pretty it up for the source editor - var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p'; - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>'); - - content = content.replace(new RegExp(']*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>'); - content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*

    ', 'mg'), '\n<$1>'); - - // Fix some block element newline issues - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n'); - content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption'); - - var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; - content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp(']*)>', 'g'), '\t'); - - if ( content.indexOf(']*)>\\s*', 'mg'), ""); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), ''); - } - - // Unmark special paragraph closing tags - content = content.replace(new RegExp('', 'g'), '

    \n'); - content = content.replace(new RegExp('\\s*(

    ]+>.*

    )', 'mg'), '\n$1'); - content = content.replace(new RegExp('

    \\s*

    ', 'mg'), "

     

    \n"); - - // put back the line breaks in pre|script - content = content.replace(//g, '\n'); - - // Hope. - return content; - }, - - go : function(id) { - var ed = tinyMCE.get(id); - var qt = document.getElementById('quicktags'); - var H = document.getElementById('edButtonHTML'); - var P = document.getElementById('edButtonPreview'); - var ta = document.getElementById(id); - var ec = document.getElementById('editorcontainer'); - - if ( ! ed || ed.isHidden() ) { - ta.style.color = '#fff'; - - this.edToggle(P, H); - edCloseAllTags(); // :-( - - qt.style.display = 'none'; - ec.style.padding = '0px'; - ta.style.padding = '0px'; - - ta.value = this.wpautop(ta.value); - - if ( ed ) ed.show(); - else tinyMCE.execCommand("mceAddControl", false, id); - - this.wpSetDefaultEditor('tinymce'); - } else { - this.edToggle(H, P); - ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px'; - - ed.hide(); - qt.style.display = 'block'; - - if ( tinymce.isIE6 ) { - ta.style.width = '98%'; - ec.style.padding = '0px'; - ta.style.padding = '6px'; - } else { - ta.style.width = '100%'; - ec.style.padding = '6px'; - } - - ta.style.color = ''; - this.wpSetDefaultEditor('html'); - } - }, - - edToggle : function(A, B) { - A.className = 'active'; - B.className = ''; - - B.onclick = A.onclick; - A.onclick = null; - }, - - wpSetDefaultEditor : function(editor) { - try { - editor = escape( editor.toString() ); - } catch(err) { - editor = 'tinymce'; - } - - var userID = document.getElementById('user-id'); - var date = new Date(); - date.setTime(date.getTime()+(10*365*24*60*60*1000)); - document.cookie = "wordpress_editor_" + userID.value + "=" + editor + "; expires=" + date.toGMTString(); - }, - - wpautop : function(pee) { - // filtered when switching html to visual - var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script'; - var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script'; - pee = pee + "\n\n"; - pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); - pee = pee.replace(new RegExp('()', 'gi'), "$1\n\n"); - pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); - pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); - pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "

    $1

    \n"); - pee = pee.replace(new RegExp(']*)?>[\\s\\n]*

    ', 'mg'), " 

    \n"); - pee = pee.replace(new RegExp('

    \\s*(]*>)\\s*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp("

    (", 'gi'), "$1"); - pee = pee.replace(new RegExp("

    ]*>()", 'gi'), "$1"); - pee = pee.replace(new RegExp("()

    ", 'gi'), "$1"); - pee = pee.replace(new RegExp('

    \\s*]*)>', 'gi'), "

    "); - pee = pee.replace(new RegExp('\\s*

    ', 'gi'), '

    '); - pee = pee.replace(new RegExp('

    [\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('

    [\\s\\n]*(]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('
    (\\s*)', 'gi'), '$1'); - pee = pee.replace(new RegExp('(?:

    |
    )*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:

    |
    )*', 'gi'), '[caption$1[/caption]'); - - // Fix the pre|script tags - pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, '\n'); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n'); - }); - return pee; - } -} diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/js/270/ps_editor.js b/blog/wp-content/plugins/ps-disable-auto-formatting/js/270/ps_editor.js deleted file mode 100644 index c93bef2..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/js/270/ps_editor.js +++ /dev/null @@ -1,163 +0,0 @@ - -switchEditors = { - - mode : '', - - I : function(e) { - return document.getElementById(e); - }, - - edInit : function() { - var h = tinymce.util.Cookie.getHash("TinyMCE_content_size"), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'); - - // Activate TinyMCE if it's the user's default editor - if ( getUserSetting( 'editor' ) == 'html' ) { - if ( h ) - try { this.I('content').style.height = h.ch - 30 + 'px'; } catch(e){}; - } else { - try { - this.I("quicktags").style.display = "none"; - } catch(e){}; - tinyMCE.execCommand("mceAddControl", false, "content"); - } - }, - - saveCallback : function(el, content, body) { - - if ( tinyMCE.activeEditor.isHidden() ) - content = this.I(el).value; - else - content = this.pre_wpautop(content); - - return content; - }, - - pre_wpautop : function(content) { - // filtered when switching visual to html - - // We have a TON of cleanup to do. Line breaks are already stripped. - - // Protect pre|script tags - content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, ''); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, ''); - }); - - // Pretty it up for the source editor - var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p'; - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>'); - - content = content.replace(new RegExp(']*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>'); - content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*

    ', 'mg'), '\n<$1>'); - - // Fix some block element newline issues - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n'); - content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption'); - - var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; - content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp(']*)>', 'g'), '\t'); - - if ( content.indexOf(']*)>\\s*', 'mg'), ""); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), ''); - } - - // Unmark special paragraph closing tags - content = content.replace(new RegExp('', 'g'), '

    \n'); - content = content.replace(new RegExp('\\s*(

    ]+>.*

    )', 'mg'), '\n$1'); - content = content.replace(new RegExp('

    \\s*

    ', 'mg'), "

     

    \n"); - - // put back the line breaks in pre|script - content = content.replace(//g, '\n'); - // Hope. - return content; - }, - - go : function(id, mode) { - id = id || 'content'; - mode = mode || this.mode || ''; - - var ed = tinyMCE.get(id) || false; - var qt = this.I('quicktags'); - var H = this.I('edButtonHTML'); - var P = this.I('edButtonPreview'); - var ta = this.I(id); - - if ( 'tinymce' == mode ) { - - if ( ed && ! ed.isHidden() ) - return false; - - this.mode = 'html'; - ta.style.color = '#fff'; - - P.className = 'active'; - H.className = ''; - edCloseAllTags(); // :-( - - qt.style.display = 'none'; - - ta.value = this.wpautop(ta.value); - - if ( ed ) ed.show(); - else tinyMCE.execCommand("mceAddControl", false, id); - - setUserSetting( 'editor', 'tinymce' ); - } else { - if ( ! ed || ed.isHidden() ) - return false; - - this.mode = 'tinymce'; - H.className = 'active'; - P.className = ''; - - ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px'; - - ed.hide(); - qt.style.display = 'block'; - - ta.style.color = ''; - setUserSetting( 'editor', 'html' ); - } - return false; - }, - - wpautop : function(pee) { - // filtered when switching html to visual - var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script'; - var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script'; - pee = pee + "\n\n"; - pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); - pee = pee.replace(new RegExp('()', 'gi'), "$1\n\n"); - pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); - pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); - pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "

    $1

    \n"); - pee = pee.replace(new RegExp(']*)?>[\\s\\n]*

    ', 'mg'), " 

    \n"); - pee = pee.replace(new RegExp('

    \\s*(]*>)\\s*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp("

    (", 'gi'), "$1"); - pee = pee.replace(new RegExp("

    ]*>()", 'gi'), "$1"); - pee = pee.replace(new RegExp("()

    ", 'gi'), "$1"); - pee = pee.replace(new RegExp('

    \\s*]*)>', 'gi'), "

    "); - pee = pee.replace(new RegExp('\\s*

    ', 'gi'), '

    '); - pee = pee.replace(new RegExp('

    [\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('

    [\\s\\n]*(]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('
    (\\s*)', 'gi'), '$1'); - pee = pee.replace(new RegExp('(?:

    |
    )*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:

    |
    )*', 'gi'), '[caption$1[/caption]'); - - // Fix the pre|script tags - pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, '\n'); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n'); - }); - - return pee; - } -} diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/js/280/ps_editor.js b/blog/wp-content/plugins/ps-disable-auto-formatting/js/280/ps_editor.js deleted file mode 100644 index 4837f02..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/js/280/ps_editor.js +++ /dev/null @@ -1,158 +0,0 @@ - -jQuery(document).ready(function($){ - var h = wpCookies.getHash('TinyMCE_content_size'); - - if ( getUserSetting( 'editor' ) == 'html' ) { - if ( h ) - $('#content').css('height', h.ch - 15 + 'px'); - } else { - $('#content').css('color', 'white'); - $('#quicktags').hide(); - } -}); - -var switchEditors = { - - mode : '', - - I : function(e) { - return document.getElementById(e); - }, - - edInit : function() { - }, - - saveCallback : function(el, content, body) { - - if ( tinyMCE.activeEditor.isHidden() ) - content = this.I(el).value; - else - content = this.pre_wpautop(content); - - return content; - }, - - pre_wpautop : function(content) { - var blocklist1, blocklist2; - - // Protect pre|script tags - content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, ''); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, ''); - }); - - // Pretty it up for the source editor - var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p'; - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>'); - - content = content.replace(new RegExp(']*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>'); - content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*

    ', 'mg'), '\n<$1>'); - - // Fix some block element newline issues - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n'); - content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption'); - - var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; - content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); - content = content.replace(new RegExp(']*)>', 'g'), '\t'); - - if ( content.indexOf(']*)>\\s*', 'mg'), ""); - content = content.replace(new RegExp('\\s*\\s*', 'mg'), ''); - } - - // Unmark special paragraph closing tags - content = content.replace(new RegExp('', 'g'), '

    \n'); - content = content.replace(new RegExp('\\s*(

    ]+>.*

    )', 'mg'), '\n$1'); - content = content.replace(new RegExp('

    \\s*

    ', 'mg'), "

     

    \n"); - - // put back the line breaks in pre|script - content = content.replace(//g, '\n'); - // Hope. - return content; - }, - - go : function(id, mode) { - id = id || 'content'; - mode = mode || this.mode || ''; - - var ed, qt = this.I('quicktags'), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'), ta = this.I(id); - - try { ed = tinyMCE.get(id); } - catch(e) { ed = false; } - - if ( 'tinymce' == mode ) { - if ( ed && ! ed.isHidden() ) - return false; - - setUserSetting( 'editor', 'tinymce' ); - this.mode = 'html'; - - P.className = 'active'; - H.className = ''; - edCloseAllTags(); // :-( - qt.style.display = 'none'; - - ta.value = this.wpautop(ta.value); - - if ( ed ) { - ed.show(); - } else { - try{tinyMCE.execCommand("mceAddControl", false, id);} - catch(e){} - } - } else { - setUserSetting( 'editor', 'html' ); - ta.style.color = '#000'; - this.mode = 'tinymce'; - H.className = 'active'; - P.className = ''; - - if ( ed && !ed.isHidden() ) { - ta.style.height = ed.getContentAreaContainer().offsetHeight + 24 + 'px'; - ed.hide(); - } - - qt.style.display = 'block'; - } - return false; - }, - - wpautop : function(pee) { - // filtered when switching html to visual - var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script'; - var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script'; - pee = pee + "\n\n"; - pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); - pee = pee.replace(new RegExp('()', 'gi'), "$1\n\n"); - pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); - pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); - pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "

    $1

    \n"); - pee = pee.replace(new RegExp(']*)?>[\\s\\n]*

    ', 'mg'), " 

    \n"); - pee = pee.replace(new RegExp('

    \\s*(]*>)\\s*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp("

    (", 'gi'), "$1"); - pee = pee.replace(new RegExp("

    ]*>()", 'gi'), "$1"); - pee = pee.replace(new RegExp("()

    ", 'gi'), "$1"); - pee = pee.replace(new RegExp('

    \\s*]*)>', 'gi'), "

    "); - pee = pee.replace(new RegExp('\\s*

    ', 'gi'), '

    '); - pee = pee.replace(new RegExp('

    [\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('

    [\\s\\n]*(]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)[\\s\\n]*

    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); - pee = pee.replace(new RegExp('
    (\\s*)', 'gi'), '$1'); - pee = pee.replace(new RegExp('(?:

    |
    )*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:

    |
    )*', 'gi'), '[caption$1[/caption]'); - - // Fix the pre|script tags - pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { - a = a.replace(/
    [\r\n]*/g, '\n'); - return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n'); - }); - - return pee; - } -}; diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.mo b/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.mo deleted file mode 100644 index dc5d051..0000000 Binary files a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.mo and /dev/null differ diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.po b/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.po deleted file mode 100644 index a487d60..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting-ja.po +++ /dev/null @@ -1,109 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: PS Disable Auto Formatting\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-13 11:37+0900\n" -"PO-Revision-Date: 2009-01-21 17:38+0900\n" -"Last-Translator: hitoshi omagari\n" -"Language-Team: Prime Strategy Co.,Ltd. \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Japanese\n" -"X-Poedit-Country: JAPAN\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: ps_disable_auto_formatting\n" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:15 -msgid "content formatting" -msgstr "記事内容の自動整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:16 -msgid "comment formatting" -msgstr "コメントの自動整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:17 -msgid "excerpt formatting" -msgstr "抜粋の自動整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:18 -msgid "term description formatting" -msgstr "説明(カテゴリー、リンクなど)の自動整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:155 -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:229 -msgid "Auto Formatting" -msgstr "自動整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:195 -msgid "Could not update post in the database" -msgstr "データベースのアップデートに失敗いたしました。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:198 -msgid "Database is not found." -msgstr "データベースが見つかりません。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:208 -msgid "No formatting post or page exists." -msgstr "整形する記事が存在しません。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:211 -msgid "Require checked allow batch formatting." -msgstr "一括整形処理の許可が必要です。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:232 -msgid "The settings has changed successfully." -msgstr "設定が変更されました。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:236 -#, php-format -msgid "Batch fomatting process has completed. total %d posts formatted." -msgstr "一括整形処理が完了いたしました。整形処理が行われた記事は、全部で%dです。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:244 -msgid "The settings has not been changed. There were no changes or failed to update the data base." -msgstr "設定は変更されていません。変更された項目が存在しないか、データベースのアップデート失敗です。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:255 -msgid "disable" -msgstr "停止" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:264 -msgid "Batch formatting for past posts" -msgstr "過去記事の一括整形" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:265 -msgid "" -"

    To make it display the same as the format before run this plug-in,\n" -"automatic operation process to the specified period of the posts.
    \n" -"Even if some unexpected errors occur, the data is restorable because\n" -"rivision on the processed post is made.
    \n" -"This process is safe even if you do two or more times, perhaps. We cannot assure though.
    \n" -"* It is strongly recommended to take the backup your database before processing.

    " -msgstr "

    プラグインを利用する場合にも段落・改行が以前通り表示されるよう、最新の編集が指定日以前の投稿・ページ全てに対し、自動段落整形の一括処理を行います。
    整形処理を行った投稿・ページについては、リビジョンを作成しますので、万が一不具合が発生した投稿・ページにおいても復元が可能です。
    複数回整形処理を行ってもおそらく問題にはならないと思いますが、極力避けてください。
    ※ 処理を行う前に極力データベースのバックアップを行っておいてください。

    " - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:273 -msgid "Formatting before" -msgstr "整形処理時限" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:276 -msgid "* Formatting posts and pages are modified before this time." -msgstr "※ 最新の更新時刻が指定時刻以前である記事に対して整形処理が行われます。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:281 -msgid "Batch formatting" -msgstr "一括整形処理" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:283 -msgid "Allow batch formatting" -msgstr "一括整形処理を許可" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:287 -msgid "If you have any problems or find a bug in this plugin, please report to us." -msgstr "本プラグインのご利用に際して問題があったり、バグを発見された場合には、ご連絡いただければ幸いです。" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:295 -msgid "Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher." -msgstr "ご利用中のWordPress (バージョン %s)では、PS Natural Paragraph Formatting プラグインはご利用になれません。2.5以上のバージョンにアップグレードしてください。" - diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting.pot b/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting.pot deleted file mode 100644 index 5f06274..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/language/ps_disable_auto_formatting.pot +++ /dev/null @@ -1,110 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: PS Disable Auto Formatting 0.9.2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-21 17:35+0900\n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: \n" -"X-Poedit-Country: \n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: \n" -"X-Poedit-SearchPath-0: ps_disable_auto_formatting\n" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:15 -msgid "content formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:16 -msgid "comment formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:17 -msgid "excerpt formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:18 -msgid "term description formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:155 -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:229 -msgid "Auto Formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:195 -msgid "Could not update post in the database" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:198 -msgid "Database is not found." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:208 -msgid "No formatting post or page exists." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:211 -msgid "Require checked allow batch formatting." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:232 -msgid "The settings has changed successfully." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:236 -#, php-format -msgid "Batch fomatting process has completed. total %d posts formatted." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:244 -msgid "The settings has not been changed. There were no changes or failed to update the data base." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:255 -msgid "disable" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:264 -msgid "Batch formatting for past posts" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:265 -msgid "" -"

    To make it display the same as the format before run this plug-in,\n" -"automatic operation process to the specified period of the posts.
    \n" -"Even if some unexpected errors occur, the data is restorable because\n" -"rivision on the processed post is made.
    \n" -"This process is safe even if you do two or more times, perhaps. We cannot assure though.
    \n" -"* It is strongly recommended to take the backup your database before processing.

    " -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:273 -msgid "Formatting before" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:276 -msgid "* Formatting posts and pages are modified before this time." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:281 -msgid "Batch formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:283 -msgid "Allow batch formatting" -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:287 -msgid "If you have any problems or find a bug in this plugin, please report to us." -msgstr "" - -#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:295 -msgid "Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher." -msgstr "" - diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/ps_disable_auto_formatting.php b/blog/wp-content/plugins/ps-disable-auto-formatting/ps_disable_auto_formatting.php deleted file mode 100644 index 66eb634..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/ps_disable_auto_formatting.php +++ /dev/null @@ -1,308 +0,0 @@ - 'the_content', - 'comment formatting' => 'comment_text', - 'excerpt formatting' => 'the_excerpt', - 'term description formatting' => 'term_description', -); - -var $mce_version = '20080121'; - -function __construct() { - global $wp_version; - - if ( version_compare( $wp_version, '2.5', '>=' ) ) { - add_action( 'init', array( &$this, 'disable_auto_formatting_init' ) ); - add_action( 'admin_menu', array( &$this, 'add_disable_formatting_setting_page') ); - add_filter( 'print_scripts_array', array( &$this, 'rewrite_default_script' ) ); - add_filter( 'wp_insert_post_data', array( &$this, 'formatting_quickpress_post' ) ); - add_action( 'media_buttons', array( &$this, 'check_edit_mode_and_add_ichedit_pre' ), 9 ); - add_action( 'media_buttons', array( &$this, 'delete_filtering_wp_richedit_pre' ) ); - } else { - add_action('admin_notices', array( &$this, 'version_too_old' ) ); - } -} - - -function ps_disable_auto_formatting() { - $this->__construct(); -} - - -function disable_auto_formatting_init() { - $locale = get_locale(); - $lang_file = dirname( __file__ ) . '/language/ps_disable_auto_formatting-' . $locale . '.mo'; - - if ( file_exists( $lang_file ) ) { - load_textdomain( 'ps_disable_auto_formatting', $lang_file ); - } - - $this->option_settings = get_option( 'ps_disable_auto_formatting' ); - - if ( $this->option_settings === false ) { - $this->set_default_settings(); - $this->option_settings = get_option( 'ps_disable_auto_formatting' ); - } elseif ( ! $this->option_settings ) { - $this->option_settings = array(); - } - $this->delete_default_filters(); -} - - -function delete_default_filters() { - global $wp_filter; - - foreach ( $this->option_settings as $hook ) { - if ( $hook == 'comment_text' ) { - $priority = 30; - } else { - $priority = 10; - } - remove_filter( $hook, 'wpautop', $priority ); - if ( $hook == 'the_content' ) { - foreach ( array_keys( $wp_filter['the_content'][10] ) as $hook_name ) { - if ( strpos( $hook_name, 'tam_contact_form_sevenwpautop_substitute' ) !== false ) { - remove_filter( 'the_content', $hook_name ); - } - } - } - } -} - - -function set_default_settings() { - $default = array( 'the_content' ); - update_option( 'ps_disable_auto_formatting', $default ); -} - - -function rewrite_default_script( $todo ) { - global $wp_version, $wp_scripts; - - if ( version_compare( $wp_version, '2.8', '>=' ) ) { - $scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/280/ps_editor.js'; - } elseif ( version_compare( $wp_version, '2.7', '>=' ) ) { - $scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/270/ps_editor.js'; - } else { - $scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/250/ps_editor.js'; - if ( version_compare( $wp_version, '2.6', '>=' ) ) { - $wp_scripts->registered['editor_functions']->src = $scripyt_src; - } else { - $wp_scripts->scripts['editor_functions']->src = $scripyt_src; - } - } - $wp_scripts->add( 'ps_editor', $scripyt_src, false, $this->mce_version ); - $key = array_search( 'editor', $todo ); - if ( $key !== false ) { - if ( version_compare( $wp_version, '2.7', '>=' ) ) { - $todo[$key] = 'ps_editor'; - } else { - unset( $todo[$key] ); - } - } - return $todo; -} - - -function formatting_quickpress_post( $data ) { - global $action; - - if ( in_array( $action, array( 'post-quickpress-publish', 'post-quickpress-save' ) ) ) { - if ( empty( $_POST['quickpress_post_ID'] ) ) { - $data['post_content'] = wpautop( $data['post_content'] ); - } - } - return $data; -} - - -function delete_filtering_wp_richedit_pre() { - remove_filter( 'the_editor_content', 'wp_richedit_pre' ); -} - - -function check_edit_mode_and_add_ichedit_pre() { - global $wp_filter; - if ( isset( $wp_filter['the_editor_content'][10]['wp_richedit_pre'] ) ) { - add_filter( 'the_editor_content', array( &$this, 'ps_richedit_pre' ) ); - } -} - - -function ps_richedit_pre( $text ) { - if ( empty($text) ) return apply_filters('richedit_pre', ''); - - $output = convert_chars($text); - $output = htmlspecialchars($output, ENT_NOQUOTES); - - return apply_filters('richedit_pre', $output); -} - - -function add_disable_formatting_setting_page() { - if ( function_exists( 'add_options_page' ) ) { - add_options_page( 'PS Disable Auto Formatting', - __( 'Auto Formatting', 'ps_disable_auto_formatting' ), - 8, - basename( __FILE__ ), - array( &$this, 'output_disable_formatting_setting_page') ); - } -} - - -function output_disable_formatting_setting_page() { - global $wpdb, $wp_error; - if( $_POST['_wpnonce'] ) { - check_admin_referer(); - - if ( $_POST['batch_formatting'] ) { - if ( $_POST['allow_batch_formatting'] ) { - $time_limit = sprintf( '%04d-%02d-%02d %02d:%02d:00', $_POST['aa'], $_POST['mm'], $_POST['jj'], $_POST['hh'], $_POST['mn'] ); - $sql = " -SELECT `ID` -FROM $wpdb->posts -WHERE `post_status` IN ( 'publish', 'draft', 'pending' ) -AND `post_type` IN ( 'post', 'page' ) -AND `post_modified` < '$time_limit' -"; - $formatting_posts = $wpdb->get_results( $sql, ARRAY_A ); - $formatted_posts = array(); - - if ( $formatting_posts ) { - foreach ( $formatting_posts as $row ) { - $data = array(); - $post = get_post( $row['ID'] ); - $data['post_content'] = wpautop( $post->post_content ); - if ( $post->post_content_filtered ) { - $data['post_content_filtered'] = wpautop( $post->post_content_filtered ); - } - $data['post_modified_gmt'] = current_time( 'mysql', 1 ); - $data['post_modified'] = current_time( 'mysql' ); - - do_action( 'pre_post_update', $post->ID ); - if ( false === $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post->ID ) ) ) { - if ( $wp_error ) { - $error_mes = new WP_Error('db_update_error', __('Could not update post in the database'), $wpdb->last_error); - break; - } else { - $error_mes = __( 'Database is not found.', 'ps_disable_auto_formatting' ); - break; - } - } - $formatted_posts[] = $row['ID']; - } - if ( ! $error_mes ) { - $batch_ret = true; - } - } else { - $error_mes = __( 'No formatting post or page exists.', 'ps_disable_auto_formatting' ); - } - } else { - $error_mes = __( 'Require checked allow batch formatting.', 'ps_disable_auto_formatting' ); - } - } else { - foreach ( $_POST['ps_disable_auto_formatting'] as $key => $func ) { - if ( ! in_array( $func, $this->setting_items) ) { - unset( $_POST['ps_disable_auto_formatting'][$key] ); - } - } - $ret = update_option( 'ps_disable_auto_formatting', $_POST['ps_disable_auto_formatting'] ); - if ( $ret ) { - $this->option_settings = get_option( 'ps_disable_auto_formatting' ); - } - } - } - - ?> -
    - -

    - -
    -

    -
    - -
    -

    -
    - -
    -

    -
    - -
    -

    -
    - -
    - - -setting_items as $id => $func ) { ?> - - - - - -
    - option_settings ) ) { echo ' checked="checked"'; } ?> /> - -
    -

    - -

    - -

    - To make it display the same as the format before run this plug-in, -automatic operation process to the specified period of the posts.
    -Even if some unexpected errors occur, the data is restorable because -rivision on the processed post is made.
    -This process is safe even if you do two or more times, perhaps. We cannot assure though.
    -* It is strongly recommended to take the backup your database before processing.

    ' ,'ps_disable_auto_formatting' ); ?> - - - - - -
    -
    - -
    -
    - -     - -
    - -
    -

    report to us.' , 'ps_disable_auto_formatting' ); ?>

    -
    -

    ' . sprintf( __( 'Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher.', 'ps_disable_auto_formatting' ), $wp_version ) . '

    '; - $active_plugins = get_option('active_plugins'); - $search_plugin = str_replace( str_replace( '\\', '/', ABSPATH . PLUGINDIR . '/' ), '', str_replace( '\\', '/', __file__ ) ); - $key = array_search( $search_plugin, $active_plugins ); - if ( $key !== false ) { - unset( $active_plugins[$key] ); - } - update_option( 'active_plugins', $active_plugins ); -} - -} // class end - -$ps_disable_auto_formatting =& new ps_disable_auto_formatting(); diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/readme.txt b/blog/wp-content/plugins/ps-disable-auto-formatting/readme.txt deleted file mode 100644 index b46d316..0000000 --- a/blog/wp-content/plugins/ps-disable-auto-formatting/readme.txt +++ /dev/null @@ -1,105 +0,0 @@ -=== PS Disable Auto Formatting === -Contributors: jim912 -Tags: auto formatting, formatting, format, paragraph, linebreak, wpautop -Requires at least: 2.5 -Tested up to: 2.8.3 -Stable tag: trunk - -Stops the automatic forming and the HTML tag removal in the html mode of WordPress, and generates a natural paragraph and changing line. - -== Description == -If you are annoying by the habit of the WordPress automatic formatting, try this plugin. - -PS Disable Auto Formatting stops automatic formatting of WordPress (wpautop), and modifies the html source generated by the visual editor. - -This plugin stops automatic formatting of WordPress (wpautop), and modifies the html source generated by the visual editor. - -When editing it in the HTML mode, it stops unintended removal of br tag and p tag , either addition of p tag. -And when editing in the visual mode, it achieves to generate natural changing line and paragraph that you will intend. - - -= Functions = -* Disable the auto formating in the each areas of post, comment, excerpt, terms description. -* Stops the auto removal of p and br tag when editing html mode. -* Batch formatting to all articles that you have already posted. - -== Installation == - -1. Unzip the downloaded package and upload into your WordPress plugins directory. -If you use WordPress 2.7 or later, you can install from admin page. -2. Go to plugins list and activate "PS Disable Auto Formatting". -3. After install, a managing page of automatic forming is added to config list. -The default setting stops only the automatic formating of the post. -Change and submit the settings of each areas if necessary. - -= Batch formatting for past posts = - -Batch formatting is a function for the past posts posted before use this plugin. -You do not have to use it if there are no post. - -When you activate this plugin, there will be no changing line and paragraph in the past posts because auto formatting of WordPress has stopped. - -To solve this problem, this function does the batch processing to the article within -the specified range. - -(Before use this function, reserve the [backup of the data base](http://codex.wordpress.org/Backing_Up_Your_Database "backup of the data base") is recommended.) - - -== Frequently Asked Questions == -= When is this plugin effective? = - -For example, it will be effective in case use HTML mode every time, and when copy from existing HTML files. -It also comes to be able to post consecutive changing line. - - -= I do not understand whether which area to be stop batch formatting. = -Try to stop the area where the visual editor is used. - -= Can the setting change and the batch formatting function be done at the same time? = -No. -When "change setting" button is pushed, the setting is changed. -When "Batch formatting" button is pushed, the batch plastic operation is done. The setting is not changed. - -= It displays as "It is necessary to permit the batch formatting" and cannot do the batch formatting. = -To prevent the operational error, the batch processing is not done if there is no permission. -Please check "Permit batch formatting" check box. - -== Changelog == -* **1.0.3** - * fix : missed writing specifications of plugin(version & discription) -* **1.0.2** - * compatible with WordPress version 2.8 - (bugfix : post area is whiteouted when switching visual to html mode in version 2.8) -* **0.9.2** - * bugfix : disappearing nothing included paragraph and linebreak element when load a post to edit - * bugfix : wrong javascript path in case of WordPress is set as sub directory. - * bugfix : in version 2.6 or 2.5, javascript isn't replaced. -* **0.9.1** - * bugfix : disappearing paragraph element with swithing mode in some browsers - * compatible with quickpress -* **0.9.0** - * Public release - -== Screenshots == -1. Administration interface of PS Disable Auto Formatting - -== Notice == -Please back up the data base as much as possible before doing the batch formatting. - -Though we have tested as much as possible, there is a possibility that processing stops on the way. - -Even if some trouble occurs in the article data by some rare accident, we can not assume the responsibility. - -If you have any problems or find a bug in this plugin, please [report to us](http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment "contact form"). - -== Links == -"[PS Auto Sitemap](http://wordpress.org/extend/plugins/ps-auto-sitemap/ "WordPress sitemap plugin")" is a plugin automatically generates a site map page from your WordPress site. -It is easy to install for beginners and easy to customize for experts. -It can change the settings of the display of the lists from administration page, several neat CSS skins for the site map tree are prepared. - -"[CMS service with WordPress](http://www.web-strategy.jp/ "CMS service with WordPress")" provides you service that uses WordPress as a CMS. - -== Special Thanks == -Translation:[dacelo](http://www.dacelo.info/blog/ "Translation") - -Naming Advise:[Samuel Bollinge](http://blog.comeuphither.com/ "Naming Advise") \ No newline at end of file diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/screenshot-1.png b/blog/wp-content/plugins/ps-disable-auto-formatting/screenshot-1.png deleted file mode 100644 index 66a2737..0000000 Binary files a/blog/wp-content/plugins/ps-disable-auto-formatting/screenshot-1.png and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/inc/class.dd32.php b/blog/wp-content/plugins/revision-control/inc/class.dd32.php deleted file mode 100644 index 8dde394..0000000 --- a/blog/wp-content/plugins/revision-control/inc/class.dd32.php +++ /dev/null @@ -1,117 +0,0 @@ -= $GLOBALS['dd32_version'] && !class_exists('DD32') ) { -class DD32 { - var $version = 3; - function DD32() { - - } - - //$folder = Full path to folder - function find_files( $folder, $args = array() ) { - - $folder = untrailingslashit($folder); - - $defaults = array( 'pattern' => '', 'levels' => 100, 'relative' => '' ); - $r = wp_parse_args($args, $defaults); - - extract($r, EXTR_SKIP); - - //Now for recursive calls, clear relative, we'll handle it, and decrease the levels. - unset($r['relative']); - --$r['levels']; - - if ( ! $levels ) - return array(); - - if ( ! is_readable($folder) ) - return false; - - $files = array(); - if ( $dir = @opendir( $folder ) ) { - while ( ( $file = readdir($dir) ) !== false ) { - if ( in_array($file, array('.', '..') ) ) - continue; - if ( is_dir( $folder . '/' . $file ) ) { - $files2 = DD32::find_files( $folder . '/' . $file, $r ); - if( $files2 ) - $files = array_merge($files, $files2 ); - else if ( empty($pattern) || preg_match('|^' . str_replace('\*', '\w+', preg_quote($pattern)) . '$|i', $file) ) - $files[] = $folder . '/' . $file . '/'; - } else { - if ( empty($pattern) || preg_match('|^' . str_replace('\*', '\w+', preg_quote($pattern)) . '$|i', $file) ) - $files[] = $folder . '/' . $file; - } - } - } - @closedir( $dir ); - - if ( ! empty($relative) ) { - $relative = trailingslashit($relative); - foreach ( $files as $key => $file ) - $files[$key] = preg_replace('!^' . preg_quote($relative) . '!', '', $file); - } - - return $files; - } - - function add_configure($plugin, $title, $url, $args = array() ) { - $defaults = array( 'class' => '', 'title' => $title ); - $r = wp_parse_args($args, $defaults); - $link = "$title"; - add_action("plugin_action_links_$plugin", create_function('$links', 'return array_merge( array("' . $link . '"), $links);')); - } - - //Function adds a list of changes after the plugin in the plugins table. - function add_changelog($plugin, $url) { - add_action("after_plugin_row_$plugin", create_function('$data', 'DD32::add_changelog_rows("' . $plugin .'", "' . $url . '", $data);'), 10, 2); - } - function add_changelog_rows($plugin, $url, $plugin_data) { - - if ( false === get_option('dd32_changelogs', false) ) - add_option('dd32_changelogs', array(), '', 'no'); //Add a no-auto-load option. - - $update = get_option('update_plugins'); - if ( ! isset($update->response[$plugin]) ) - return; - - $changelogs = get_option('dd32_changelogs', array()); - if ( ! isset($changelogs[$url]) || !isset($changelogs[$url]['time']) || $changelogs[$url]['time'] < time()-24*60*60 ) { - $log = wp_remote_get($url); - if ( $log['response']['code'] != 200 ) - return; - if ( ! preg_match('!== Changelog ==\s+(.*?)\s+(==|$)!is', $log['body'], $mat) ) - return; - $mat = preg_split('!^=!im', $mat[1]); - $changes = array(); - foreach ( (array)$mat as $version ) { - if ( preg_match('!^\s+([\w.]+)\s*=!i', $version, $mat_version) ) - $change_version = $mat_version[1]; - else - $change_version = 'unknown'; - - if ( preg_match_all('!^\s*[*](.*)$!im', $version, $mat_changes) ) - foreach ( (array)$mat_changes[1] as $change ) - $changes[ $change_version ][] = trim($change); - } - - $changelogs[ $url ] = array('time' => time(), 'changes' => $changes); - update_option('dd32_changelogs', $changelogs); - } else { - $changes = $changelogs[ $url ]['changes']; - } - - foreach ( (array) $changes as $version => $changelog_item ) { - if ( version_compare($version, $plugin_data['Version'], '<=') && 'unknown' != $version ) - continue; - echo ' - -   - ' . $version . ' -
    1. ' . implode('
    2. ', $changelog_item) .'
    - - '; - } - } - -}} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.mo deleted file mode 100644 index 3195d34..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.po b/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.po deleted file mode 100644 index 5ac2187..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-cs_CZ.po +++ /dev/null @@ -1,85 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-11 16:38+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Czech\n" -"X-Poedit-Country: CZECH REPUBLIC\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Verze" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Správa verzí" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Předchozí verze" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Zapnuto" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(přednastavené)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Vypnuto" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Povol %d" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Opravdu smazat tuto verzi?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(smazat)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Nastavení uloženo" - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Chyba: V konfiguračním souboru wp-config.php je nastaveno WP_POST_REVISIONS, pro správný běh tohoto pluginu je nutné tuto volbu odstranit." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Přednastavený stav verzí pro příspěvky" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Přednastavený stav verzí pro stránky" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Uložit změny" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.mo deleted file mode 100644 index 118ac8d..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.po b/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.po deleted file mode 100644 index fdd6c99..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-de_DE.po +++ /dev/null @@ -1,83 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision-Control\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-11 16:37+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revisionen" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Revisionskontrolle" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Revisionen" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Aktiviert" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr " (Standard)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Deaktiviert" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Begrenze auf %d Revisionen" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Sind Sie sich sicher, dass Sie diese Revision löschen möchen?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(löschen)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Einstellungen gespeichert." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Fehler: Sie haben WP_POST_REVISIONS in Ihrer wp-config.php-Datei definiert; um dieses Plugin nutzen zu können, müssen Sie es entfernen." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Standard-Revisionsstatus für Artikel" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Standard-Revisionsstatus für Seiten" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Änderungen speichern" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.mo deleted file mode 100644 index 6e84c8b..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.po b/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.po deleted file mode 100644 index 6d6702a..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-es_ES.po +++ /dev/null @@ -1,207 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-01 19:22+1000\n" -"PO-Revision-Date: 2008-10-01 19:22+1000\n" -"Last-Translator: Dion Hulse \n" -"Language-Team: SteAgl \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-Language: Italian\n" -"X-Poedit-Country: ITALY\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revisiones" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Control de Revisiones" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Revisiones de Entrada" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Activado" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr " (por defecto)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Desactivado" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Limitar a %d Revisiones" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "¿Estás seguro de querer eliminar esta Revisión?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(borrar)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Preferencias guardadas." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Error: Has definido WP_POST_REVISIONS en tu fichero wp-config.php, para usar este plugin debes eliminar la definición del fichero." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Estado por defecto de las revisiones en las entradas" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Estado por defecto de las revisiones en las páginas" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Guardar Cambios" - -#~ msgid "Revisions:" -#~ msgstr "Revisioni:" -#~ msgid "Limit to" -#~ msgstr "Limitate a" -#~ msgid "

    Add From Server

    Sorry, This plugin requires WordPress 2.5+" -#~ msgstr "" -#~ "

    Aggiungi da server

    Questo plugin richiede almeno WordPress 2.5+" -#~ msgid "Add From Server" -#~ msgstr "Aggiungi da server" -#~ msgid "Import" -#~ msgstr "Importa" -#~ msgid "Filename" -#~ msgstr "Nome file" -#~ msgid "Parent Folder" -#~ msgstr "Cartella madre" -#~ msgid "Toggle All" -#~ msgstr "Cambia tutti" -#~ msgid "" -#~ "Note: Will not take effect if selected file is within an upload folder at " -#~ "present" -#~ msgstr "" -#~ "Nota: Non avrà effetto se i file selezionati sono al momento nelal " -#~ "cartella di upload" -#~ msgid "Do not add selected files to current post Gallery" -#~ msgstr "" -#~ "Non aggiungere i file selezionati alla Galleria dell'articolo corrente" -#~ msgid "Import selected files" -#~ msgstr "Importa i file selezionati" -#~ msgid "%s has been added to Media library" -#~ msgstr "%s è statp aggiunto alla Libreria media" -#~ msgid "The uploaded file could not be moved to %s." -#~ msgstr "I file caricati non possono venir spostati in %s." -#~ msgid "" -#~ "Once you have selected files to be imported, Head over to the Media Library tab to add them to your post." -#~ msgstr "" -#~ "Una volta selezionati i file da importare, andare sulla linguetta Libreria media per aggiungerli al proprio articolo." -#~ msgid "Current Directory" -#~ msgstr "Directory corrente" -#~ msgid "Security hash missing." -#~ msgstr "Has di sicurezza mancante." -#~ msgid "You don't have enough access rights." -#~ msgstr "Non disponi dei permessi di accesso." -#~ msgid "

    Set Up Your FeedBurner Feed

    " -#~ msgstr "

    Imposta il tuo feed FeedBurner

    " -#~ msgid "" -#~ "

    This plugin makes it easy to redirect 100% of traffic for your feeds " -#~ "to a FeedBurner feed you have created. FeedBurner can then track all of " -#~ "your feed subscriber traffic and usage and apply a variety of features " -#~ "you choose to improve and enhance your original WordPress feed.

    " -#~ msgstr "" -#~ "

    Questo plugin rende semplicissimo reindirizzare il 100% del traffico " -#~ "dei vostri feed ad un feed FeedBurner da voi creato. FeedBurner può " -#~ "tenere traccia di tutto il traffico e l'utilizzo effettuato dagli " -#~ "abbonati al feed ed applicare una serie di funzioni a vostra scelta per " -#~ "migliorare e incrementare il feed originale WordPress.

    " -#~ msgid "To get started," -#~ msgstr "Per iniziare," -#~ msgid "create a FeedBurner feed for " -#~ msgstr "crea un feed Feedburner per " -#~ msgid "This feed will handle all traffic for your posts." -#~ msgstr "Questo feed gestirà tutto il traffico per gli articoli." -#~ msgid "" -#~ "Once you have created your FeedBurner feed, enter its address into the " -#~ "field below" -#~ msgstr "" -#~ "Una volta creato il feed su FeedBurner, inserire il suo indirizzo nel " -#~ "campo seguente" -#~ msgid "" -#~ "Optional: If you also want to handle your WordPress comments feed using " -#~ "FeedBurner" -#~ msgstr "" -#~ "Opzionale: Se si desidera gestire anche il feed dei commenti di WordPress " -#~ "utilizzando FeedBurner" -#~ msgid "" -#~ "create a FeedBurner comments feed and then enter its address below:" -#~ msgstr "" -#~ "crea un feed dei commenti su FeedBurner e quindi inserisci " -#~ "l'indirizzo qui sotto:" -#~ msgid "Save" -#~ msgstr "Salva" -#~ msgid "Sorry, you are not allowed to access this page." -#~ msgstr "Non ti è permesso accedere a questa pagina." -#~ msgid "ShareThis Options" -#~ msgstr "Opzioni ShareThis" -#~ msgid "" -#~ "Where do I go to get the ShareThis Code?

    You can configure your " -#~ "ShareThis widget using our customizing tool (and be sure to register to " -#~ "get tracking) located here: sharethis.com/publisher?type=wpplugin" -#~ msgstr "" -#~ "Dove andare per ottenere il Codice ShareThis?

    Puoi configurare il " -#~ "tuo widget ShareThis tramite il nostro strumento di personalizzazione (e " -#~ "assicurati di registrarti per avere accesso al tracking) che si trova " -#~ "qui: sharethis." -#~ "com/publisher?type=wpplugin" -#~ msgid "Paste your widget code in here:" -#~ msgstr "Incolla qui il tuo codice del widget:" -#~ msgid "Automatically add ShareThis to your posts?*" -#~ msgstr "Aggiungi automaticamente ShareThis ai tuoi articoli?*" -#~ msgid "Automatically add ShareThis to your pages?*" -#~ msgstr "Aggiungi automaticamente ShareThis alle tue pagine?*" -#~ msgid "Yes" -#~ msgstr "Si" -#~ msgid "No" -#~ msgstr "No" -#~ msgid "" -#~ "* Note, if you turn this off, you will want to add the ShareThis " -#~ "template tag to your theme." -#~ msgstr "" -#~ "* Nota, se disabiliti questa opzione, dovrai aggiungere il marcatore dei tempate di ShareThis al tuo tema." -#~ msgid "Update ShareThis Options" -#~ msgstr "Aggiorna opzioni ShareThis" -#~ msgid "ShareThis" -#~ msgstr "ShareThis" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.mo deleted file mode 100644 index 4906176..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.po b/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.po deleted file mode 100644 index 286928b..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-fr_FR.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: 1.7\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-17 22:16+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: PozHonks\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: FRANCE\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: _e;__\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Révisions" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Contrôle des Révisions" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Historique de l'article" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Activé" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr " (par défaut)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Désactivé" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Limité à %d versions" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Êtes-vous sûr de vouloir effacer cette version ?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(effacer)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Paramètres enregistrés." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Erreur: Vous avez défini WP_POST_REVISIONS dans votre fichier wp-config.php. Afin d'utiliser cette extensions, vous devez retirer ce code." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Réglage Général de l'Historique des Articles" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Réglage Général de l'Historique des Pages" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Enregistrer les modifications" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.mo deleted file mode 100644 index 7cbaeba..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.po b/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.po deleted file mode 100644 index 9b3989e..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-he_IL.po +++ /dev/null @@ -1,83 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-04 11:38+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "גרסאות" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "ניהול גרסאות" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "גרסאות פוסטים" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "מאופשר" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(ברירת מחדל)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "כבוי" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "הגבל ל- %d גרסאות" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "האם ברצונך למחוק גרסאות אלו?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(מחיקה)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "הגדרות נשמרו." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "שגיאה: הגדרת WP_POST_REVISIONS בקובץ wp-config.php שלך, על מנת להשתמש בתוסף זה יש להסיר הגדרה זו.." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "מצב ברירת המחדל לגרסאות עבור פוסטים" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "מצב ברירת המחדל לגרסאות עבור עמודים" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "שמור שינויים" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.mo deleted file mode 100644 index 6d3b3ed..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.po b/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.po deleted file mode 100644 index 4c5703d..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-it_IT.po +++ /dev/null @@ -1,207 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-07-27 18:02+1000\n" -"PO-Revision-Date: 2008-07-27 12:23+0100\n" -"Last-Translator: \n" -"Language-Team: SteAgl \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-Language: Italian\n" -"X-Poedit-Country: ITALY\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:283 -msgid "Revisions" -msgstr "Revisioni" - -#: revision-control.php:41 -#: revision-control.php:326 -msgid "Revision Control" -msgstr "Controllo revisioni" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Revisioni articolo" - -#: revision-control.php:153 -#: revision-control.php:336 -#: revision-control.php:357 -msgid "Enabled" -msgstr "Abilitate" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:163 -msgid " (default)" -msgstr " (predefinito)" - -#: revision-control.php:156 -#: revision-control.php:339 -#: revision-control.php:360 -msgid "Disabled" -msgstr "Disabilitate" - -#: revision-control.php:163 -#: revision-control.php:346 -#: revision-control.php:366 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Limite di %d revisioni" - -#: revision-control.php:252 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Si è sicuri di volre cancellare questa revisione?" - -#: revision-control.php:252 -msgid "(delete)" -msgstr "(cancella)" - -#: revision-control.php:318 -msgid "Settings saved." -msgstr "Le impostazioni sono state salvate." - -#: revision-control.php:323 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Errore: Nel file wp-config.php la variabile WP_POST_REVISIONS è definita. Per poter usare questo plugin occorrerà rimuoverla." - -#: revision-control.php:332 -msgid "Default Revision Status for Posts" -msgstr "Stato predefinito revisioni per gli articoli" - -#: revision-control.php:353 -msgid "Default Revision Status for Pages" -msgstr "Stato predefinito revisioni per le pagine" - -#: revision-control.php:374 -msgid "Save Changes" -msgstr "Salva le modifiche" - -#~ msgid "Revisions:" -#~ msgstr "Revisioni:" -#~ msgid "Limit to" -#~ msgstr "Limitate a" -#~ msgid "

    Add From Server

    Sorry, This plugin requires WordPress 2.5+" -#~ msgstr "" -#~ "

    Aggiungi da server

    Questo plugin richiede almeno WordPress 2.5+" -#~ msgid "Add From Server" -#~ msgstr "Aggiungi da server" -#~ msgid "Import" -#~ msgstr "Importa" -#~ msgid "Filename" -#~ msgstr "Nome file" -#~ msgid "Parent Folder" -#~ msgstr "Cartella madre" -#~ msgid "Toggle All" -#~ msgstr "Cambia tutti" -#~ msgid "" -#~ "Note: Will not take effect if selected file is within an upload folder at " -#~ "present" -#~ msgstr "" -#~ "Nota: Non avrà effetto se i file selezionati sono al momento nelal " -#~ "cartella di upload" -#~ msgid "Do not add selected files to current post Gallery" -#~ msgstr "" -#~ "Non aggiungere i file selezionati alla Galleria dell'articolo corrente" -#~ msgid "Import selected files" -#~ msgstr "Importa i file selezionati" -#~ msgid "%s has been added to Media library" -#~ msgstr "%s è statp aggiunto alla Libreria media" -#~ msgid "The uploaded file could not be moved to %s." -#~ msgstr "I file caricati non possono venir spostati in %s." -#~ msgid "" -#~ "Once you have selected files to be imported, Head over to the Media Library tab to add them to your post." -#~ msgstr "" -#~ "Una volta selezionati i file da importare, andare sulla linguetta Libreria media per aggiungerli al proprio articolo." -#~ msgid "Current Directory" -#~ msgstr "Directory corrente" -#~ msgid "Security hash missing." -#~ msgstr "Has di sicurezza mancante." -#~ msgid "You don't have enough access rights." -#~ msgstr "Non disponi dei permessi di accesso." -#~ msgid "

    Set Up Your FeedBurner Feed

    " -#~ msgstr "

    Imposta il tuo feed FeedBurner

    " -#~ msgid "" -#~ "

    This plugin makes it easy to redirect 100% of traffic for your feeds " -#~ "to a FeedBurner feed you have created. FeedBurner can then track all of " -#~ "your feed subscriber traffic and usage and apply a variety of features " -#~ "you choose to improve and enhance your original WordPress feed.

    " -#~ msgstr "" -#~ "

    Questo plugin rende semplicissimo reindirizzare il 100% del traffico " -#~ "dei vostri feed ad un feed FeedBurner da voi creato. FeedBurner può " -#~ "tenere traccia di tutto il traffico e l'utilizzo effettuato dagli " -#~ "abbonati al feed ed applicare una serie di funzioni a vostra scelta per " -#~ "migliorare e incrementare il feed originale WordPress.

    " -#~ msgid "To get started," -#~ msgstr "Per iniziare," -#~ msgid "create a FeedBurner feed for " -#~ msgstr "crea un feed Feedburner per " -#~ msgid "This feed will handle all traffic for your posts." -#~ msgstr "Questo feed gestirà tutto il traffico per gli articoli." -#~ msgid "" -#~ "Once you have created your FeedBurner feed, enter its address into the " -#~ "field below" -#~ msgstr "" -#~ "Una volta creato il feed su FeedBurner, inserire il suo indirizzo nel " -#~ "campo seguente" -#~ msgid "" -#~ "Optional: If you also want to handle your WordPress comments feed using " -#~ "FeedBurner" -#~ msgstr "" -#~ "Opzionale: Se si desidera gestire anche il feed dei commenti di WordPress " -#~ "utilizzando FeedBurner" -#~ msgid "" -#~ "create a FeedBurner comments feed and then enter its address below:" -#~ msgstr "" -#~ "crea un feed dei commenti su FeedBurner e quindi inserisci " -#~ "l'indirizzo qui sotto:" -#~ msgid "Save" -#~ msgstr "Salva" -#~ msgid "Sorry, you are not allowed to access this page." -#~ msgstr "Non ti è permesso accedere a questa pagina." -#~ msgid "ShareThis Options" -#~ msgstr "Opzioni ShareThis" -#~ msgid "" -#~ "Where do I go to get the ShareThis Code?

    You can configure your " -#~ "ShareThis widget using our customizing tool (and be sure to register to " -#~ "get tracking) located here: sharethis.com/publisher?type=wpplugin" -#~ msgstr "" -#~ "Dove andare per ottenere il Codice ShareThis?

    Puoi configurare il " -#~ "tuo widget ShareThis tramite il nostro strumento di personalizzazione (e " -#~ "assicurati di registrarti per avere accesso al tracking) che si trova " -#~ "qui: sharethis." -#~ "com/publisher?type=wpplugin" -#~ msgid "Paste your widget code in here:" -#~ msgstr "Incolla qui il tuo codice del widget:" -#~ msgid "Automatically add ShareThis to your posts?*" -#~ msgstr "Aggiungi automaticamente ShareThis ai tuoi articoli?*" -#~ msgid "Automatically add ShareThis to your pages?*" -#~ msgstr "Aggiungi automaticamente ShareThis alle tue pagine?*" -#~ msgid "Yes" -#~ msgstr "Si" -#~ msgid "No" -#~ msgstr "No" -#~ msgid "" -#~ "* Note, if you turn this off, you will want to add the ShareThis " -#~ "template tag to your theme." -#~ msgstr "" -#~ "* Nota, se disabiliti questa opzione, dovrai aggiungere il marcatore dei tempate di ShareThis al tuo tema." -#~ msgid "Update ShareThis Options" -#~ msgstr "Aggiorna opzioni ShareThis" -#~ msgid "ShareThis" -#~ msgstr "ShareThis" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-ja.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-ja.mo deleted file mode 100644 index 112a765..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-ja.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-ja.po b/blog/wp-content/plugins/revision-control/langs/revision-control-ja.po deleted file mode 100644 index a3aa3c3..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-ja.po +++ /dev/null @@ -1,92 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: revison contorol ja\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-07-31 13:06+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: tekapo \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Japanese\n" -"X-Poedit-Country: JAPAN\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "リビジョン" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "リビジョンコントロール" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "投稿リビジョン" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "使用する" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -#, fuzzy -msgid " (default)" -msgstr "(削除)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "使用しない" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, fuzzy, php-format -msgid "Limit to %d Revisions" -msgstr "%d リビジョン" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "このリビジョンを削除しますか ?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(削除)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "設定を保存しました。" - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "エラー: wp-config.php ファイル内で WP_POST_REVISIONS が設定されています。このプラグインを利用するにはこの設定を削除してください。" - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "投稿のリビジョン設定" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "ページのリビジョン設定" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "変更を保存" - -#~ msgid "Revisions:" -#~ msgstr "リビジョン:" -#~ msgid "Limit to" -#~ msgstr "次のリビジョンまで保持:" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-lv.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-lv.mo deleted file mode 100644 index 6464a9c..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-lv.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-lv.po b/blog/wp-content/plugins/revision-control/langs/revision-control-lv.po deleted file mode 100644 index b570a03..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-lv.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision Control\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-03 22:24+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: Australia\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revīzijas" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Revīziju kontrole" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Raksta revīzija" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Aktivizēta" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(pamata)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Deaktivizēta" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Saīsināt līdz %d revīzijām" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Vai esi pārliecināts, ka vēlies šo revīziju dzēst?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(dzēst)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Uzstādījumi saglabāti." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Kļūda: Esi definējis WP_POST_REVISIONS savā wp-config.php failā, Lai lietotu šo spraudni, tas ir jāizņem." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Pamata revīzijas statuss rakstiem" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Pamata revīzijas statuss lapām" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Saglabāt izmaiņas" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.mo deleted file mode 100644 index 6464a9c..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.po b/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.po deleted file mode 100644 index b570a03..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-lv_LV.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision Control\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-03 22:24+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: Australia\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revīzijas" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Revīziju kontrole" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Raksta revīzija" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Aktivizēta" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(pamata)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Deaktivizēta" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Saīsināt līdz %d revīzijām" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Vai esi pārliecināts, ka vēlies šo revīziju dzēst?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(dzēst)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Uzstādījumi saglabāti." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Kļūda: Esi definējis WP_POST_REVISIONS savā wp-config.php failā, Lai lietotu šo spraudni, tas ir jāizņem." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Pamata revīzijas statuss rakstiem" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Pamata revīzijas statuss lapām" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Saglabāt izmaiņas" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.mo deleted file mode 100644 index 2735a22..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.po b/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.po deleted file mode 100644 index f014931..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-nl_NL.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision Control\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-12 12:00+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: Australia\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revisies" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Revisie Beheer" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Bericht Revisies" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Geactiveerd" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(standaard)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Uitgeschakelt" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Beperk tot %d revisies" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Weet je zeker dat je deze revisie wilt verwijderen?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(verwijderen)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Instellingen opgeslagen." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Fout: WP_POST_REVISIONS is gedefinieerd in wp-config.php, je dient deze waarde te verwijderen als je gebruik wilt maken van deze plugin." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Standaard Revisie Status voor Berichten" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Standaard Revisie Status voor Paginas" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Wijzigingen Opslaan" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.mo deleted file mode 100644 index 42ef876..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.po b/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.po deleted file mode 100644 index d61c820..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-ru_RU.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision Control (Russian)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-15 18:23+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: Lecactus \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Russian\n" -"X-Poedit-Country: RUSSIAN FEDERATION\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Ревизии" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Управление ревизиями" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Ревизии записи" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Включено" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(по умолчанию)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Отключено" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "Ограничить до %d ревизий" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Вы уверены что хотите удалить эту ревизию?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(удалить)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Настройки сохранены." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Ошибка: Вы определили WP_POST_REVISIONS в вашем файле wp-config.php. Чтобы использовать этот плагин, вы должны удалить/закомментировать эту строку." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Статус ревизий по умолчанию для записей" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Статус ревизий по умолчанию для страниц" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Сохранить изменения" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.mo deleted file mode 100644 index ae709e1..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.po b/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.po deleted file mode 100644 index 1f5d88b..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-tr_TR.po +++ /dev/null @@ -1,85 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-17 14:48+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: Semih Aksu (Seemsiyah) \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Turkish\n" -"X-Poedit-Country: TURKEY\n" -"X-Poedit-KeywordsList: _e;__\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "Revizyonlar" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "Revizyon Ayarları" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "Yazı Revizyonları" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "Aktif" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "(varsayılan)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "Devre dışı" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "%d Revizyonla Sınırla" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "Bu Revizyonu silmek istediğinize emin misiniz ?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(sil)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "Ayarlar kaydedildi." - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "Hata: wp-config.php dosyanızda, WP_POST_REVISIONS kodunu bulunduruyorsunuz. Bu eklentiyi kullanmak için gerekli alanı silmek zorundasınız." - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "Yazılar için Varsayılan Revizyon Durumu" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "Sayfalar için Varsayılan Revizyon Durumu" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "Değişiklikleri Kaydet" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.mo b/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.mo deleted file mode 100644 index 4d600e4..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.po b/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.po deleted file mode 100644 index c040ebb..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control-zh-tw.po +++ /dev/null @@ -1,92 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: revison contorol zh-tw\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-07-31 13:06+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: actercompany.com \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Chinese Traditional\n" -"X-Poedit-Country: Taiwan\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "修訂" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "版本控制" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "修改後" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "使能夠" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -#, fuzzy -msgid " (default)" -msgstr "(刪除)" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "使用しない" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, fuzzy, php-format -msgid "Limit to %d Revisions" -msgstr "%d 修訂" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "您是否確定刪除此修訂版本嗎?" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "(刪除)" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "設置已保存。" - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "錯誤: 您所定義的 WP_POST_REVISIONS 在您的 wp-config.php 檔案,在以使用這個外掛程式,您需要將它移除。" - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "默認情況下修訂狀態的職位" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "默認情況下修訂地位的頁面" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "保存更改" - -#~ msgid "Revisions:" -#~ msgstr "修訂:" -#~ msgid "Limit to" -#~ msgstr "限制" - diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control.mo b/blog/wp-content/plugins/revision-control/langs/revision-control.mo deleted file mode 100644 index 7e27ea9..0000000 Binary files a/blog/wp-content/plugins/revision-control/langs/revision-control.mo and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/langs/revision-control.pot b/blog/wp-content/plugins/revision-control/langs/revision-control.pot deleted file mode 100644 index b0dba8a..0000000 --- a/blog/wp-content/plugins/revision-control/langs/revision-control.pot +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Revision Control\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-07-27 18:26+1000\n" -"PO-Revision-Date: \n" -"Last-Translator: Dion Hulse \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: Australia\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: revision-control.php:38 -#: revision-control.php:151 -#: revision-control.php:294 -msgid "Revisions" -msgstr "" - -#: revision-control.php:41 -#: revision-control.php:337 -msgid "Revision Control" -msgstr "" - -#: revision-control.php:142 -msgid "Post Revisions" -msgstr "" - -#: revision-control.php:153 -#: revision-control.php:347 -#: revision-control.php:368 -msgid "Enabled" -msgstr "" - -#: revision-control.php:154 -#: revision-control.php:157 -#: revision-control.php:165 -msgid " (default)" -msgstr "" - -#: revision-control.php:156 -#: revision-control.php:350 -#: revision-control.php:371 -msgid "Disabled" -msgstr "" - -#: revision-control.php:164 -#: revision-control.php:357 -#: revision-control.php:377 -#, php-format -msgid "Limit to %d Revisions" -msgstr "" - -#: revision-control.php:262 -msgid "Are you sure you wish to delete this Revision?" -msgstr "" - -#: revision-control.php:262 -msgid "(delete)" -msgstr "" - -#: revision-control.php:329 -msgid "Settings saved." -msgstr "" - -#: revision-control.php:334 -msgid "Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it." -msgstr "" - -#: revision-control.php:343 -msgid "Default Revision Status for Posts" -msgstr "" - -#: revision-control.php:364 -msgid "Default Revision Status for Pages" -msgstr "" - -#: revision-control.php:385 -msgid "Save Changes" -msgstr "" - diff --git a/blog/wp-content/plugins/revision-control/langs/translations.txt b/blog/wp-content/plugins/revision-control/langs/translations.txt deleted file mode 100644 index 9cbd0fa..0000000 --- a/blog/wp-content/plugins/revision-control/langs/translations.txt +++ /dev/null @@ -1,8 +0,0 @@ -Translations of this plugin are welcome & any valid translations submitted will be included in future releases. - -Please submit any translations in .mo/.po format to wordpress@dd32.id.au - -Thanks :) -Dion - -Thanks to Stefano for the Italian Translation (& the help for how to use poedit:)) \ No newline at end of file diff --git a/blog/wp-content/plugins/revision-control/readme.txt b/blog/wp-content/plugins/revision-control/readme.txt deleted file mode 100644 index 322805f..0000000 --- a/blog/wp-content/plugins/revision-control/readme.txt +++ /dev/null @@ -1,70 +0,0 @@ -=== Revision Control === -Contributors: dd32 -Tags: 2.7, 2.6, revisions, post, admin -Requires at least: 2.7 -Tested up to: 2.8 -Stable tag: 1.9.7 - -Revision Control allows finer control over the Post Revision system included with WordPress 2.6 - -== Description == - -Revision Control is a plugin for WordPress 2.6+ which gives the user more control over the Post/Page Revisions. - -The plugin allows the user to set a blog-global setting (Settings -> Revisions) for pages/posts to enable/disable/limit the number of revisions which are saved for the page/post. The user may change this setting on a per-page/post basis from the Revisions Meta box. - -The plugin also allows the deletion of specific revisions via the Revisions post metabox. - - -== Changelog == - -= 1.0 = - * Initial Release - -= 1.1, 1.2, 1.3 = - * Italian & Japanese Translations - * Allows Deletion of a Single revision via the Revisions post box - * The global setting has been divded into Posts and Pages, The setting should now stick past a page load - * The per-post setting should now correctly work again (After a bug introduced in 1.2) - -= 1.5 = - * Skipped 1.4 - * Sticking option values should finally be fixed. - * Thanks to Translators, Apologies to Translators for releasing 1.5 with changes before getting updated lang files - -= 1.6 = - * oops, Forgot something from 1.5: If you set the page/posts's option to the *same* as the default, Then the per-page option is now forgotten. - -= 1.7 = - * Fix a bug with Firefox stealing the focus on the Revision limit drop-down, Thanks Viper007Bond - * Added HeBrew translation, Thanks Elad! - * No features added. - -= 1.8 = - * German Translation from Tux - * Czech Translation from Pavel - * Dutch Translation from Steven - * Russian Translation from Кактус - * French Translation from David - * Bug fix: Limit revisions dropdown sticks to 2 revisions on admin panel. - * No features added. - -= 1.9 = - * Spanish Translation from Alejandro - * Turkish Translation from Semih - * Latvian Translation from Rolands - * Fix 'Disabled' per-object checkbox - * Introduce DD32's common data class, Adds Update version changelog functionality - * WP 2.7 compatibility, This is mainly a maintanence release until version 2.0 is fully finalised. - -= 1.9.1 = - * Small bugfixes - -= 1.9.7 = - * 1.9.2, 1.9.3, 1.9.5 all seem screwy, Something was wrong with my SVN client, it was commiting from a previous revision and not my current revision... - * 2.8.1 compatibility - -== Screenshots == - -1. The Global Settings -2. The per-post Settings \ No newline at end of file diff --git a/blog/wp-content/plugins/revision-control/revision-control.php b/blog/wp-content/plugins/revision-control/revision-control.php deleted file mode 100644 index 684c9ef..0000000 --- a/blog/wp-content/plugins/revision-control/revision-control.php +++ /dev/null @@ -1,416 +0,0 @@ - $defaults, 'page' => $defaults); - update_option('revision-control', $defaults); - } - - $current_post = rc_get_page_id(); - - //Post or Page: - if ( ! $type = rc_get_page_type($current_post) ) - return; - - $revision_status = isset($defaults[ $type ]) ? $defaults[ $type ] : true; - - define('RC_REVISION_DEFAULT', $revision_status); - - if ( $current_post ) { - //Handle per-post/page settings. - $post_revision_status = get_post_meta($current_post, '_revision-control', true); - if ('' !== trim($post_revision_status) ) { - $revision_status = $post_revision_status; - - //Eugh.. maybe_serialize() bug #7383 means integers/booleans are stored as string! - if ( is_string($revision_status) ) { - $revision_status = (int)$revision_status; - if ( 1 == $revision_status ) - $revision_status = true; - } - } - } - - @define('WP_POST_REVISIONS', $revision_status); -} - -/** - * Determines if this is a Page or a Post, Or other. - */ -function rc_get_page_type( $id = 0 ) { - global $pagenow; - - if ( isset($_POST['post_type']) ) - return $_POST['post_type']; - else if ( 'page.php' == $pagenow || 'page-new.php' == $pagenow) - return 'page'; - else if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow) - return 'post'; - else if ( $id && $post = get_post($id) ) - return $post->post_type; - - return false; -} - -/** - * Determines the post/page's ID based on the 'post' and 'post_ID' POST/GET fields. - */ -function rc_get_page_id() { - foreach ( array( 'post_ID', 'post' ) as $field ) - if ( isset( $_REQUEST[ $field ] ) ) - return absint($_REQUEST[ $field ]); - - if ( isset($_REQUEST['revision']) ) - if ( $post = get_post( $id = absint($_REQUEST['revision']) ) ) - return absint($post->post_parent); - - return false; -} - -/** - * Custom Revisions box - * Should use the API, But remove_meta_box followed by add_meta_box doesnt appear to add the new box - */ -function rc_meta_box_manip($page, $context) { - global $wp_meta_boxes; - $type = version_compare($GLOBALS['wp_version'], '2.6.999', '>') ? 'normal' : 'advanced'; - - if ( 'dashboard' == $page ) - return; - - if ( $type != $context ) - return; - - if ( isset($wp_meta_boxes[ $page ][ $type ][ 'core' ][ 'revisionsdiv' ]) ) - $wp_meta_boxes[ $page ][ $type ][ 'core' ][ 'revisionsdiv' ]['callback'] = 'rc_revisions_meta_box'; - else - add_meta_box('revisionsdiv', __('Post Revisions'), 'rc_revisions_meta_box', $page, $type, 'core'); -} - -/** - * The new Revision Meta box - */ -function rc_revisions_meta_box( $post ) { - rc_list_post_revisions(); - ?> - : - />   - />    - 1 ) echo ' checked="checked"' ?>/> - - 'ASC' ) ); - - //Number to delete, based on option. - $delete = count($revisions) - $number_to_delete; - - if ( $delete < 1 ) - return; - - $revisions = array_slice( $revisions, 0, $delete ); - - foreach ( (array)$revisions as $revision ) - if ( false === strpos( $revision->post_name, 'autosave' ) ) - wp_delete_post_revision( $revision->ID ); - } -} - -/** - * Copy of wp_list_post_revisions() w/ non-list support stripped out. - * - */ -function rc_list_post_revisions( $post_id = 0 ) { - if ( !$post = get_post( $post_id ) ) - return; - - if ( !$revisions = wp_get_post_revisions( $post->ID ) ) - return; - - $titlef = _c( '%1$s by %2$s|post revision 1:datetime, 2:name' ); - - echo "
      \n"; - foreach ( $revisions as $revision ) { - if ( !current_user_can( 'read_post', $revision->ID ) ) - continue; - - $date = wp_post_revision_title( $revision ); - $name = get_author_name( $revision->post_author ); - - $title = sprintf( $titlef, $date, $name ); - - if ( current_user_can( 'edit_post', $revision->ID ) && ! wp_is_post_autosave( $revision ) ) { - $url = wp_nonce_url('admin-post.php?action=delete-revision&revision=' . $revision->ID, 'delete_revision-' . $revision->ID); - $title .= sprintf(' %s', js_escape(__('Are you sure you wish to delete this Revision?', 'revision-control')), __('(delete)', 'revision-control')); - } - echo "\t
    • $title
    • \n"; - } - echo "
    "; - -} - -/** - * Deletes a Revision - */ -add_action('admin_post_delete-revision', 'rc_delete_revision'); -function rc_delete_revision() { - $revision = absint($_REQUEST['revision']); - if ( $revision ) { - check_admin_referer('delete_revision-' . $revision); - if ( current_user_can('delete_post', $revision) ) - wp_delete_post_revision( $revision ); - } - wp_safe_redirect(wp_get_referer()); -} - -/** - * Add the Plugin action link. - */ -add_filter('plugin_action_links', 'rc_plugins_filter', 10, 2); -function rc_plugins_filter($links, $plugin) { - static $this_plugin; - if( ! $this_plugin ) - $this_plugin = plugin_basename(__FILE__); - - if( $plugin == $this_plugin ) { - $links = array_merge( array('' . __('Revisions', 'revision-control') . ''), $links); - remove_filter('plugin_action_links', 'rc_plugins_filter'); //Nice citizens, We dont *really* need to check anymore. - } - - return $links; -} - -/** - * The admin page, Handles saving the setting too. - * checked() / selected() cannot save us, need a === instead of == - */ -function rc_admin() { - $defaults = get_option('revision-control'); - - if ( 'POST' == strtoupper($_SERVER['REQUEST_METHOD']) ) { - check_admin_referer('update-options'); - - foreach ( array('post', 'page') as $field ) { - if ( ! isset($_POST['revision-control-' . $field]) ) - continue; - - switch ( $_POST['revision-control-' . $field] ) { - case 'true': - $defaults[ $field ] = true; - break; - case 'false': - $defaults[ $field ] = 0; - break; - case 'number': - $defaults[ $field ] = (int)$_POST['revision-control-' . $field . '-number']; - break; - } - } - if ( $defaults !== get_option('revision-control') ) { - update_option('revision-control', $defaults); - echo '

    ' . __('Settings saved.', 'revision-control') . '

    '; - } - } - ?> - -

    Error: You have defined WP_POST_REVISIONS in your wp-config.php file, In order to use this plugin you will need to remove it.', 'revision-control') ?>

    - -
    - -

    -
    - - - - - - - - - - - -
    - /> -
    - /> -
    - 1 ) echo ' checked="checked"' ?>/> - -
    - /> -
    - /> -
    - 1 ) echo ' checked="checked"' ?>/> - -
    -

    - -

    -
    -
    - basename = plugin_basename(__FILE__); - $this->folder = dirname($this->basename); - - //Set the version of the DD32 library this plugin requires. - $GLOBALS['dd32_version'] = isset($GLOBALS['dd32_version']) ? max($GLOBALS['dd32_version'], $this->dd32_requires) : $this->dd32_requires; - add_action('init', array(&$this, 'load_dd32'), 20); - - //Register general hooks. - add_action('admin_init', array(&$this, 'admin_init')); - } - - function load_dd32() { - //Load common library - include 'inc/class.dd32.php'; - } - - function admin_init() { - DD32::add_changelog($this->basename, 'http://svn.wp-plugins.org/revision-control/trunk/readme.txt'); - } -} -add_action('init', create_function('', '$GLOBALS["revision-control"] = new revision_control();'), 5); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/revision-control/screenshot-1.png b/blog/wp-content/plugins/revision-control/screenshot-1.png deleted file mode 100644 index a12ba2e..0000000 Binary files a/blog/wp-content/plugins/revision-control/screenshot-1.png and /dev/null differ diff --git a/blog/wp-content/plugins/revision-control/screenshot-2.png b/blog/wp-content/plugins/revision-control/screenshot-2.png deleted file mode 100644 index f6f07e2..0000000 Binary files a/blog/wp-content/plugins/revision-control/screenshot-2.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/RoleScoper_UsageGuide.htm b/blog/wp-content/plugins/role-scoper/RoleScoper_UsageGuide.htm deleted file mode 100644 index 85f139f..0000000 --- a/blog/wp-content/plugins/role-scoper/RoleScoper_UsageGuide.htm +++ /dev/null @@ -1,854 +0,0 @@ - - -Role Scoper Usage Guide - - - - -
    -

    Role Scoper -plugin for WordPress

    -

    Usage Guide

    -

    by Kevin Behrens

    -

    http://agapetry.net/

    -

    http://agapetry.net/forum/

    -

    original -document: 10 -July 2008

    -

    revision: 3 November 2008

    - -

    This -document -contains Topical commentary to orient an experienced WordPress blog -administrator to the new permission controls offered by Role Scoper. -Those -uninterested in this discussion may skip to step-by-step instructions -in the -How-to Guide. This document is a work in progress which will be -expanded and -updated periodically.

    -

    For -a general -overview of Role Scoper’s motives and screen shots which may provide a -helpful -accompaniment, see the following online document: http://agapetry.net/news/introducing-role-scoper/

    -

    Contents

    -

    Section -1: Glossary -and Commentary

    -

    Section -2: How-to -Guide

    -

    Section -3: Customizations -and Extensions

    -

    -

    Installation

    -
      -
    1. Upload / extract the zip to your web server such that the -directory wp-content/plugins/role-scoper/ contains -role-scoper.php, etc. 
      -
      -If your site has -CPanel, just copy the -zip -into wp-content/plugins and extract.  Otherwise, extract the -zip on -your local computer and use FTP to create the new server directory and -upload all files.
    2. -
    3. Log into WordPress (yoursite/wp-admin/) as an Administrator
    4. -
    5. Click on Plugins; activate Role Scoper
    6. -
    -Once the plugin is activated, this Usage Guide should prove -helpful.  Your steps from here depend on what you're trying to -accomplish.  If this document and the Role Scoper interface -don't -point the way, you can always place a request for help in the support forum.
    - -

    Section -1: -Glossary and Commentary

    -

    Description

    -

    Role -Scoper is -a comprehensive drop-in replacement for capability enforcement and -administration in WordPress. Assign reading, editing or administration -roles to -users or groups on a page-specific, category-specific or other -content-specific -basis.

    -

    Menu -Access

    -

    After -activating Role Scoper, you will find two new utility links on the -right next -to “Settings”: Roles and Groups. Most of Role Scoper’s settings are -accessed -through the “Roles” or “Groups” links.

    -“Groups” -pertains to the definition of User Groups, and to role assignments for -those -groups (see “User Groups” below. The role assignment portion of the -“Groups” -tab is therefore a mirror of corresponding role assignment links on the -“Roles” -tab which pertain to individual users. -

    Those -wishing -only to assign or restrict access to an individual post or page may go -straight -to the WordPress post/page editor interface and look for the new -“Readers”, -“Contributors” and “Editors” tabs.

    - -

    Scope: -Blog, Section or Object

    -

    By -default, -Wordpress roles specify capabilities that a user has blog-wide. Pages -and Posts -can be marked private. If a user’s role includes the read_private_pages -capability, all private pages are readable to them. -Otherwise none -are. The same is true for editing or publishing capabilities - a user -can edit all -posts made by other users, or none of them.

    -

    Role -Scoper -allows you to assign roles in any of three scopes: blog-wide (Blog -scope), -category-wide (Section scope) or for a specific post/page (Object -scope). To reduce confusions, the -generic names “section” and "object" are not generally used in the User -Interface or in this documentation.  However, a -section can consist of some custom taxonomy other than “category”, and -may or may not use the WP term_taxonomy schema.  Likewise, Role -Scoper can be configured to control permissions for "objects" other -than posts and pages.  In the future, other -plugins may use Role Scoper API to define sections -such as -forums, calendars or galleries.

    -

    When -some read -or edit operation is requested, Role Scoper filters the request and -grants -permission if the user has a qualifying role in any scope:

    -

    Blog -scope or -Section -scope or Object -scope.

    - -

    Category Role Assignment

    -

    Category -roles, as an instance of “Section Roles”, are assigned on the WP Admin --> -Roles -> Category page.  Users and/or Groups may -receive a Category Role assignment.  -Each Category has -a separate set of role checkboxes. Note that whether assigning or -removing role -assignments, you must check all the users/groups and all the roles -being -modified. The -dropdown list next to the “Update” button determine what effect the -update has.

    -

    When -assigning Category Roles, you can choose whether to assign to the selected -categories -only, to the selected and all subcategories (present or future), or to -subcategories only.

    - - - -

    Post / Page Role Assignment

    -

    Post -Roles and -Page Roles are instances of “Object Roles”. They may be assigned via -new tabs -on the WP post / page edit interface - “Readers”, “Editors”, etc. When -selecting users or groups for page role assignment, note that the -normal -checkboxes assign the role to current page, whereas the braced {[]} -checkbox -assigns the role to all subpages (present or future).

    - -

    Category Restrictions (previously -known as "Exclusive Section -Roles")

    -

    A -role -assignment grants a user or group capabilities -which they may not -already have. When you assign several users the Post Editor role in -“Category -A”, you are allowing them to edit “Category A” posts on the basis -of Category Role. Some may already qualify based on their general -(blog-wide) WordPress role, -others may not.

    -

    However, -one -user’s role assignment does not reduce access -for any other users. -To deny some users access to “Category A” even though their General Role -qualifies, you must specify a Category Restriction. -There is a -separate setting for each Role in each Category. For Category A, if the -Post -Reader role is restricted, then users with a general Wordpress role of Post -Reader (which includes anonymous users) cannot read Category A posts -unless they -have a Category Role or Post Role assignment. Users with a different general role -which also contains the required capabilities will not be excluded.

    -

    Another -way of -describing Restrictions is that they allow you to selectively -remove -one or more qualifying clauses from the {General Role OR Category -Role OR Post/Page -Role} formula.

    -
    Some -“Category Restriction” details to note:
    -
      -
    • If a -post is in “Category A” and “Category B”, a -user will not be excluded unless both categories have the necessary role restrictions.
    • -
    • With -any role assignment, a user is considered -to possess the assigned role and all roles it -“contains”. The Author -role contains the Contributor role if Author also has all of -Contributor’s -capabilities. The contained role is a subset of the containing role.
    • -
    • For a -user to be excluded, restrictions must be set for their General Role and all the roles it contains. For -example, if -a user’s Author role has been marked Restricted for “Category -A”, they -are not excluded from reading posts unless the roles “contained” in -Author (Post -Contributor and Post Reader) are also restricted. The actual role requirement in that case is Post Reader.
    • -
    • Blogs -which have used Role Manager to customize -WP roles should be aware of the following: If Role Scoper is configured -to use -“RS” role types, Category and Post/Page Restrictions are -applied on -the basis of which “RS” roles a user’s WP role contains. This statement will only -be -decipherable in conjunction with the documentation on “role types”. It -should -be a non-issue for WP installations which have removed any caps from -the -default WP role definitions.
    • -
    -

    Restricted Post / Page Roles

    -

    As -stated -above, categories can be configured such that a user’s General Role is -ignored - -and a qualifying Category Role or Post/Page role assignment is required. -Likewise, -individual posts and pages can be configured such that General Role and Category Roles are ignored. These Post/Page Restrictions can be -used to -narrow read or edit access.

    -

    Limiting -read -access to a fixed set of users is a three-step operation in the -WordPress post -edit interface.

    -
      -
    1. select those users -in the “Readers” tab
    2. -
    3. check the -“Restrict” checkbox
    4. -
    5. save the post
    6. -
    - -

    User -Groups

    -

    Any General Role, Category Role or Post/Page role assignment can be applied to -individual -users or to a group of users. If your user base -includes subsets of user -who commonly get the same role assignments, consider defining those -users as -members of a Group.

    -

    WP -Role Metagroups

    -

    In -addition to -custom-defined user groups, you may find it convenient to assign some Category -Role or Post/Page Role to all users who have a certain WordPress-defined Role. You -will find -these metagroups (labeled as [WP Editor], [WP Author], etc.) alongside -the -custom-defined groups in role assignment interfaces.

    -

    “Private” versus -“Restricted”

    -

    Wordpress -defines “private” posts and pages as those which require a -corresponding -read_private capability, usually possessed only by Administrators, -Editors, and -by the content author. Most significantly, the content is hidden from -anonymous -users.

    -

    For -the -purpose of limiting read access, Role Scoper Restrictions can -be used -as an equivalent. If a post’s categories, or the post itself, Restrict -the Post Reader role, the post is effectively private regardless -of the -WP -private status. Likewise, Category Role or Post/Page Role assignments -can -enable -access to a “private” post or page as long as the assigned role -includes the -corresponding read_private capability.

    -

    Despite -the -potential equivalence stated above, setting sensitive posts or pages to -WP -“private” is still the recommended approach. This will ensure that if -Role -Scoper is accidentally disabled, content is not revealed -inappropriately. In -the future, Role Scoper may automatically set posts/pages to private -when a -corresponding Role Scoper setting is made. Due to technical -difficulties, you -must currently achieve that extra safeguard manually.

    -

    Role -Type

    -

    In -Wordpress -jargon, Roles contain Capabilities. Wordpress comes with a default set -of Roles -- Administrator, Editor, Author, Contributor and Subscriber. Those -default role -definitions are sensible and sufficient for most WP installations. The -adventuresome can use the Role Manager plugin to add or remove -capabilities -from any role, perhaps to account for new capabilities defined by some -other -plugin. The intent is that for any user, there is one role definition -which -comprehensively describes every capability the user has, for any object -type -which exists within the blog. Every user has one general role.

    -

    By -default, -Role Scoper takes a different approach - the “RS” role type. Each -object type -has a different set of role definitions. So, for posts, there are “Post -Reader, -Private Post Reader, Post Author, Post Editor” role definitions. -Likewise for -pages and, potentially, for other plugin-defined object types which -choose to -support RS role definitions.

    -

    The -upshot of -this is that instead of defining a modified “Author” role which also -includes -the “edit_pages” capability, you just assign the “Page Author” role -where -desired. Instead of just assigning one comprehensive WP-defined role, -you can -select a pertinent RS-defined role separately for each object type.

    -

    If -for any -reason you must apply WP-defined roles as Category Roles or Post/Page -Roles, simply -go to WP Admin > Roles > Roles and change the Role Type -dropdown to “WP”. -

    -

    Limiting -the Page Parent Selection

    -

    Another -happy -side effect of “RS” role types is the ease with which plugins can -enable users -to assign newly-defined capabilities. Role Scoper introduces the -“create_child_pages” capability. This capability enables a user to -select the -corresponding page as “Page Parent”. Otherwise a page is unavailable as -parent -unless the user can edit it. The new RS-defined “Page Associate” -contains -“create_child_pages”, making it one step up from Page Reader. This -useful role -distinction would have been difficult to provide if each blog -administrator was -required to manually merge the capability into existing WP roles.

    -

    Note -that Role -Scoper will not allow a page to be published with a “Main Page” parent -unless -the user has the blog-wide edit_published_ pages capability. Although -WordPress -doesn't provide a means to remove “Main Page” from the dropdown, -attempts by -unqualified users to publish a new page with “Main Page” parent will -result in -“draft” status. Attempts to modify an existing page from non-Main to -Main -(or from Main to non-Main) Page -Parent will revert the -page back to the previous stored Page Parent.

    - -

    Section -2: -How-to Guide

    -

    (note: -this section is a -work in progress which does not yet fully address Editing -Roles)

    -

    Defining a custom User Group (not -required for direct user role assignment)

    -
      -
    1. Go -to WP Admin --> Groups
    2. -
    3. Click -the “Add New” -scroll link
    4. -
    5. Enter -a group name -and description
    6. -
    7. Select -checkboxes -for Group Members
    8. -
    9. Optionally, -select -Group Administrators -(WP admin can always manage group)
    10. -
    11. Click -the Create -button
    12. -
    -

    Groups -created in this manner will be available for role assignment in the -following -procedures.

    -

    Role -Scoper can be configured to hide or reveal posts regardless of any -WP-defined -“private” status. The procedures below are sufficient to set post -visibility. -However, there are three reasons you might still choose to set the WP -“private” -status:

    -
      -
    • Setting -the WP “private” status will enable more flexibility in controlling -read access -per category
    • -
    • A -post that has the WP “private” status will continue to be hidden if -Role Scoper -is accidentally uninstalled.
    • -
    • Setting -the WP “private” status will make the posts easier to administer, -taking -advantage of “Manage Posts” filtering provided by the WP core
    • -
    -

    The -following procedures apply regardless of whether you check the “keep -this post -private” box:

    -

    Restricting -Read Access to an Individual Post/Page

    -
      -
    1. Enter -the WordPress -Write Post / Edit -Post interface
    2. -
    3. Scroll -down to the -“Readers” tab (under -“Advanced Options”) and expand it
    4. -
    5. Check -the -“Restrict” checkbox at the -bottom of the tab
    6. -
    7. Save -the post
    8. -
    -

    The -post will now be hidden from WP Subscribers who are not selected in -this -“Readers” tab.  If the post must also be hidden from WP -Contributors, set -the “Restrict” checkbox in the “Contributors” tab.  To hide -it from WP -Authors and Editors, set the “Restrict” checkbox in the “Editors” -tab.  -In Role Scoper lingo, the post now Restricts the -checked -roles.

    -

    Granting Read Access to an Individual Post/Page

    -
      -
    1. Decide -whether you -want to manage -permissions user-by-user, for Wordpress role “groups”, and/or for -custom-defined User Groups.  If custom user -groups are -desired, define -those first (see above).
    2. -
    3. Enter -the WordPress -Write Post / Edit -Post interface
    4. -
    5. Scroll -down to the -“Readers” tab (under -“Advanced Options”) and expand it
    6. -
    7. Select -the checkbox -of any User and/or -Group who should have read access
    8. -
    9. Save -the Post
    10. -
    -

    If -it's convenient to manage each hidden post/page with the above -procedures, -that's all you need to know.  If access control by category is -desirable, -read on.

    -

    Restricting -Read Access by Post Category

    -
      -
    1. Go -to WP Admin --> Restrictions -> Category
    2. -
    3. Scroll -down to your -category of interest, -perhaps using the scroll link at top
    4. -
    5. Select -the “Private -Post Reader” checkbox -to restrict read access to private posts by anonymous users and WP -Subscribers
    6. -
    7. Optionally, -select -the “Post Reader” -checkbox to restrict read access to non-private posts by anonymous -users and WP -Subscribers (if the WP -Subscriber role has not been modified to include -read_private_posts)
    8. -
    9. Scroll -to the top
    10. -
    11. Note -that the -adjacent dropdown indicates -that the Update action will cause blog-wide assignment of the selected -roles to -be ignored for posts in the selected category.
    12. -
    13. Click -the Update -button
    14. -
    -

    Granting -Read Access by Post Category

    -
      -
    1. Go -to WP Admin --> Roles -> Category -
    2. -
    3. Scroll -down to your -category of interest, -perhaps using the scroll link at top
    4. -
    5. Select -the roles you -would like to assign
    6. -
    7. Scroll -to the top
    8. -
    9. Select users and/or -groups to assign selected roles
    10. -
    11. Note -that the -adjacent dropdown indicates -that the Update action will cause the selected roles to be assigned -for -posts in the selected section. 
    12. -
    13. If -you want the same -role to also be -assigned for all current and future subcategories, change the dropdown -to -“assign for selected and sub-categories”.
    14. -
    15. Click -the Update -button
    16. -
    -

    Note -that if a Post Restriction is not set for Readers, read -access to it will be granted if:

    -
      -
    • the -user has a qualifying Category Role in any post category
    • -
    -
    - -OR -
    -
      -
    • any -of -the post's categories -do not ignore the user's qualifying blog-wide general role (or another qualifying -role it -contains)
    • -
    -

    So -you cannot hide a post just by assigning it to an -additional “hidden” -category.  If individual posts don't restrict the Readers role, -they will be readable if any of their categories -are readable to the -user.   If your categorization and post restriction -goals demand the -“readable cat + hidden cat = hidden post” formula, you'll be frustrated -with -this plugin.  But here are some suggestions for making the -Role Scoper -model work with your existing categories:

    -
      -
    • As -mentioned above, different role requirements and assignments can be -made for -“private” and “non-private” posts in the same category.
    • -
    • Depending -on how your theme displays categories, you could move some “Category A” -posts -into a new subcategory ( Category A / Category A*), and remove them -from -“Category A”.  Then set Category Restrictions and Category Role assignments for Category A*.
    • -
    -

    -

    Restrict -Posting -/ Editing by Category

    -

    There -are two pieces: -granting access and restricting access, and two basic ways to achieve -the -desired access and restrictions:

    -
      -
    • Start -with user(s) who have too little access and elevate them
    • -
    • Start -with user(s) who have too much access and restrict them
    • -
    -

    You can also use some -combination -of the two.  Where -possible simplify your life by setting your users as WordPress -subscribers, -then following the first Role Scoper configuration procedure -below.  This also provides the -greatest security, -since those users will default to zero editing ability if Role Scoper -is -accidentally deactivated or otherwise disabled.

    -

    Enabling -a -Subscriber to Post in specific Categor(ies)

    -
      -
    1. Set -UserA to WordPress role of Subscriber
    2. -
    3. Assign -a Category Role of Post Author to UserA for the desired category (WP -Admin > -Roles > Category)
    4. -
    -

    If some users need to -retain a -higher WordPress role -but still be limited in posting categories, you will also need to -define that -extra restriction as follows:

    -

    -

    Restricting -Posting Categor(ies) for Contributor/Author/Editor

    -
      -
    1. Go -to the Category Restrictions admin -page 
      -(WP Admin > Restrictions > Category)
    2. - -
    3. In the "DEFAULTS" table, check -the boxes for “Post -Contributor” and “Post Author”.  Also “Post Editor” if you -want to -restrict WP editors.
    4. Confirm -the dropdowns next to -Update button say “Restrict selected roles" and "for selected categories"
    5. -
    6. Click -Update
    7. - -
    -

    Now Contributor and -Authors (and -editors, if you restricted -that role) will not be able to post or edit in any category -unless you assign them a Category Role for it, as explained for UserA -above.  Note that the "DEFAULTS" setting applies the restriction -to all existing and future categories (unless one is manually -unrestricted).  To restrict fewer categories, select desired -restrictions for each category instead.

    -
    -

    Enabling a User to Edit Specific Page(s), -and Nothing Else:

    -
      -
    1. Give them a WordPress role of Subscriber
    2. -
    3. Manage > Pages > Edit their page
    4. -
    5. Expand the "Editors" tab under "Advanced Options"
    6. -
    7. Check the non-braced checkbox to the left of your user's -name (if subpages will be created, also check the braced checkbox {[]}, which -assigns the role for all current or future subpages)
    8. -
    9. Save the Page
    10. -
    -

    Note that if you also assign this user a Role Scoper General Role -of -Page Author, they will be able to create subpages off their member -page, but not off any other pages:

    -
      -
    1. Go to WP Admin > Roles > General
    2. -
    3.  Select your user name(s)
    4. -
    5.  Select the Page Author role
    6. -
    7.  Click Update
    8. -
    -

    OR, if you want all subscribers -to have this ability:

    -
      -
    1. Go to WP Admin > Roles > General
    2. -
    3. Select [WP Subscriber]
    4. -
    5. Select the Page Author role
    6. -
    7. Click Update
    8. -
    -

    - -

    Section -3: -Customizations and Extensions

    -

    (note: -this section will -be expanded in future revisions)

    -

    Hidden -Content Teaser

    -

    By -default, -Role Scoper hides content for which users lack a sufficient role -assignment. -You can also apply a teaser by activating that option in the Role -Scoper -options page at WP Admin > Roles > Roles.

    -

    Other -Role Scoper Options

    -

    Other -options -on the Roles > Options page pertain -primarily to customizations -of the Role Scoper for future plugin-defined data sources. Most users -can -safely leave the default settings. The settings available there do -contains -descriptive captions.

    -

    Template -Functions

    -

    To -support -customized markup of restricted and/or currently hidden posts, Role -Scoper -provides the following template functions for use in themes:

    -

     is_restricted_rs( -);

    -

     is_teaser_rs( -);
    -
    -note: -If -calling these functions outside the WP loop, you should pass post ID as -the -first function argument. Otherwise just call as stated above.

    -

    Plugin -API

    -

    Other -plugins -may define their own data sources, taxonomies (WP term_taxonomy or -custom -tables), capabilities and roles. See defaults_rs.php and -role-scoper_main.php -for example hook usage. Details will be provided in later versions of -this -document.

    -

    A -current -version of this document is available online at

    -

    http://agapetry.net/downloads/RoleScoper_UsageGuide.htm

    -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/about.php b/blog/wp-content/plugins/role-scoper/admin/about.php deleted file mode 100644 index 9309a9c..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/about.php +++ /dev/null @@ -1,78 +0,0 @@ -
  • -
    -'); - -echo(' -
    -

    -aga (αγαπη): -'); -_e('unselfish, benevolent love, born of the Spirit.', 'scoper'); -echo ('

    '); -_e('Agapé discerns needs and meets them unselfishly and effectively.', 'scoper'); -echo ('

    '); - -printf(__('This WordPress plugin is part of my agapé try, a lifelong effort to love God and love people by rightly using the time and abilities He has leant me. As a husband, father, engineer, farmer and/or software developer, I have found this stewardship effort to be often fraught with contradiction. A wise and sustainable balancing of roles has seemed to elude me. Yet I want to keep trying, trusting that if God blesses and multiplies the effort, it will become agapetry, a creative arrangement motivated by benevolent love. A fleeting childlike sketch of the beautiful %1$s chain-breaking agapé%2$s which %3$s Jesus Christ unleashed%4$s so %5$s freely%6$s and aptly on an enslaving, enslaved world.', 'scoper'), '', '', '', '', '', ''); -echo '

    '; -printf(__('Although Role Scoper\'s development was a maniacal hermit-like effort, it was only possible because of the clean and flexible %1$s WordPress code base%2$s. My PHP programming skills grew immensely by the good examples set forth there and in plugins such as %3$s NextGen Gallery%4$s. I\'m not done learning, and look forward to some real-time cooperation with these and other developers now that my all-consuming quest has reached a stable plateau.', 'scoper'), "", '', "", ''); -echo '

    '; -printf( 'A Spanish translation is available in this installation thanks to %1$sRafo© Computación & Web%2$s. ', "", ''); -printf(__('Thanks to %1$sAlberto Ramicciotti%2$s for the Italian translation. I do try to be translator-friendly, but any untranslated captions are due to my flurry of recent additions and changes, and will no doubt be updated soon. Now there must be someone else who wants Role Scoper in their language...', 'scoper'), "", ''); -echo '

    '; -printf(__( 'Role Scoper is open source software released under the %1$s General Public License (GPL)%2$s. Due to limitations, obligations and non-technical aspirations common to most human beings, I will probably never again pursue uncommissioned plugin development on the scale Role Scoper has required. However, I do plan to provide some free support, correct bugs which emerge and revise the plugin for future WordPress versions. If it adds value to your website or saves you time and money, you can express appreciation in several ways:', 'scoper'), '', ''); -echo '

    • '; -printf(__('%1$s Submit technical feedback%2$s, including improvement requests.', 'scoper'), '', ''); -echo '
    • '; -printf(__('%1$s Submit a case study%2$s, explaining how Role Scoper helps you do something excellent and praiseworthy.', 'scoper'), '', ''); -echo '
    • '; -printf(__('%1$s Localize Role Scoper%2$s to your own language %3$s using poEdit%4$s ', 'scoper'), '', '', '', ''); -echo '
    • '; -$paypal_button = ''; -printf(__('If the plugin has seriously broadened your CMS horizons, %s', 'scoper'), $paypal_button); -echo '
    • '; -printf(__('If you are an established web developer, %1$s grant me your professional opinion%2$s on how this work stacks up. Might the skills, work ethic and values I express here fit into a development team near you?', 'scoper'), '', ''); -echo '
    • '; - -// TODO: update translations once poEdit update is available to fix _x and _n handling -if ( defined('WPLANG') && WPLANG ) - printf(__('Hire or refer my services to design, redesign or enhance your site - quality care at reasonable rates.', 'scoper'), '', ''); -else - printf(__('Hire or refer my services to develop or enhance your site - quality care at reasonable rates.', 'scoper'), '', ''); - -echo '
    '; - -//if ( $status = awp_remote_fopen( 'http://localhost/aglocal/downloads/status.htm', 5) ) -if ( $status = awp_remote_fopen( 'http://agapetry.net/downloads/status.htm', 5) ) - echo $status; - -echo '
    '; //rc-about-dialog - -if ( ! agp_is_ie6() ) - echo '
     
    '; - -echo '
     
    '; - -echo '
    '; //wrap -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/about/about.css b/blog/wp-content/plugins/role-scoper/admin/about/about.css deleted file mode 100644 index 9cd5712..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/about/about.css +++ /dev/null @@ -1,109 +0,0 @@ -#wpbody-content, #wrap { - background-color: #7E7B68; - background: url(img/field6b.jpg); - background-repeat: repeat; - padding-top:0; -} - -#wrap { - height: 100%; - margin: 0; -} - -/* for WP < 2.7 */ -#wpcontent, #wpwrap { - padding-bottom: 0; -} - -#screen-meta-links { - display: none; -} - -#masthead-main { - background: url(img/agapetry-header_finalG.jpg); - background-repeat: no-repeat; - width: 525px; -} - -.masthead { - width: 100%; - margin: 0; - padding: 0; - height: 149px; - color: white; - background-color: #7E7B68; - background: url(img/agapetry-header-repeatE.jpg); - background-repeat: repeat-x; -} - -.masthead li { - list-style: none; - margin: 0; - height: 149px; -} - -.masthead li a { - display: block; - width: 525px; - height: 149px; - text-decoration: none; -} - -a.agp-toplink, a.agp-toplink:hover { - text-decoration: none; -} - -#wpbody-content a img {border:0;} - -.donate { - opacity: 0.75; - margin: 0 0 0 0.5em; -} - -.donate:hover { - opacity: 1.0; -} - -/* Links */ -#wrap a {color:#87c0fc; font-weight:700; text-decoration:none;} -#wrap a:hover {color:#fcd987; font-weight:700; text-decoration:underline;} - -/* Headers */ -#wrap h2 {font-size:1.8em;} -#wrap h3 {font-size:1.5em;} - -#wrap p { - line-height: 1.5em; - margin-bottom: 1.3em; -} - -#agp-thanks li { - line-height: 1.5em; -} - -.small {font-size:0.8em;} - -.madein { - background: url(img/madein_mich_logo_40.png) no-repeat; - width: 110px; - height: 132px; - margin: 1.5em 0 0 2em; -} - -.madein a { - display: block; - width: 110px; - height: 132px; -} - -.rc-about-dialog { - min-width: 8em; - max-width: 760px; - color: #fff; - background-color: #1A4C1A; - opacity:.85; - -moz-opacity:.85; - margin: 0 0.5em 0 0.5em; - padding: 0.05em 0.5em 0.2em 0.5em; - border: 1px solid #aaa; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog-align.css b/blog/wp-content/plugins/role-scoper/admin/about/dialog-align.css deleted file mode 100644 index 3a2ffdb..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/about/dialog-align.css +++ /dev/null @@ -1,74 +0,0 @@ -/* default alignment for rounded corner boxes (dialog.css) */ - -.rc-topper .rc-t, -.rc-topper .rc-t-left { - background:transparent url(dialog2-green-top5d.png) no-repeat top right; - opacity:.85; - -moz-opacity:.85; -} - -.rc-bottomer .rc-b, -.rc-bottomer .rc-b-left { - background:transparent url(dialog2-green-bottom5d.png) no-repeat top right; - opacity:.85; - -moz-opacity:.85; -} - -.rc-topper .rc-t, -.rc-bottomer .rc-b { - border-right: 1px solid transparent; /* otherwise td runs beyond table bounds. same effect as nbsp, but without messing height */ -} - -.rc-topper, -.rc-bottomer { - border: none; -} - -.rc-topper tr, -.rc-bottomer tr { - padding: 0; - margin: 0; -} - -.rc-topper tr td, -.rc-bottomer tr td{ - padding: 0; - margin: 0; -} - -.rc-topper .rc-t, -.rc-bottomer .rc-b { - background-position:bottom right; -} - -.rc-topper .rc-t-left, -.rc-bottomer .rc-b-left { - width:20px; /* bottom corner width */ - background-position:bottom left; -} - - -/* the rest was non-IE specific when we attempted to round IE corners */ -.rc-topper .rc-t, -.rc-topper .rc-t-left, -.rc-topper .rc-b, -.rc-topper .rc-b-left { - height:12px; /* height of bottom cap/shade */ -} - -.rc-topper { - margin: 0; -} - -.rc-topper, -.rc-bottomer { - width: 100% -} - -#wrap { - margin-top: -25px; -} - -#leftside { - margin-top: 5px; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog-alignIE.css b/blog/wp-content/plugins/role-scoper/admin/about/dialog-alignIE.css deleted file mode 100644 index 1ef0a6d..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/about/dialog-alignIE.css +++ /dev/null @@ -1,22 +0,0 @@ -/* IE 5.5 / 6 alignment: gave up on rounded corners */ - -.rc-dialog .rc-content { - _background-image: url(dialog2-green-mid5d.gif); - filter: alpha(opacity=80); - padding-top: 0.35em; - margin: 0 8px 10px -4px; - border: 1px solid #aaa; -} - -#wrap { - margin-top: -20px; -} - -#leftside { - margin-top: 0px; -} - -#contentwide { - margin-top: 0 15px 0 15px; - padding 0 5px 0 5px; -} diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog.css b/blog/wp-content/plugins/role-scoper/admin/about/dialog.css deleted file mode 100644 index c4e7f9c..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/about/dialog.css +++ /dev/null @@ -1,37 +0,0 @@ -/* - -- Even more rounded corners with CSS: Base stylesheet -- - by Scott Schiller - http://www.schillmania.com/content/projects/even-more-rounded-corners/ - - (extensive modifications by Kevin Behrens - original used a single large png) -*/ - -.rc-dialog { - margin: 0 0.1em 0.5em 0.1em; - min-width: 8em; - max-width: 760px; - color: #fff; -} - -.rc-dialog .rc-content { - background:transparent url(dialog2-green-mid5d.png) repeat-y top right; - opacity: .92; - -moz-opacity: .92; - margin: -1px 0 -1px 0; - height: 100%; - border-bottom: 1px solid transparent; /* Opera fix (otherwise background is not painted through entire height) */ -} - -.rc-dialog .rc-content { - padding: 0 1em 0 0.5em; -} - -.rc-dialog h1, -.rc-dialog p { - margin: 0; - padding: 0.5em 0 0.5em 0; -} - -.rc-dialog h1 { - padding-bottom: 0; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.gif b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.gif deleted file mode 100644 index c9c803f..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.gif and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.png b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.png deleted file mode 100644 index 3ede037..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-bottom5d.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.gif b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.gif deleted file mode 100644 index edd8648..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.gif and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.png b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.png deleted file mode 100644 index 0b9b099..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-mid5d.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.gif b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.gif deleted file mode 100644 index e383428..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.gif and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.png b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.png deleted file mode 100644 index 888eb75..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-green-top5d.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-greenB2-800x1600.png b/blog/wp-content/plugins/role-scoper/admin/about/dialog2-greenB2-800x1600.png deleted file mode 100644 index 0af227f..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/dialog2-greenB2-800x1600.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header-repeatE.jpg b/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header-repeatE.jpg deleted file mode 100644 index 78617e5..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header-repeatE.jpg and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header_finalG.jpg b/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header_finalG.jpg deleted file mode 100644 index 581d307..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/img/agapetry-header_finalG.jpg and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/img/field6b.jpg b/blog/wp-content/plugins/role-scoper/admin/about/img/field6b.jpg deleted file mode 100644 index 0670486..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/img/field6b.jpg and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/about/img/madein_mich_logo_40.png b/blog/wp-content/plugins/role-scoper/admin/about/img/madein_mich_logo_40.png deleted file mode 100644 index c97983e..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/about/img/madein_mich_logo_40.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/admin-bulk_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin-bulk_rs.php deleted file mode 100644 index 6cc9550..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin-bulk_rs.php +++ /dev/null @@ -1,1106 +0,0 @@ -users_who_can('', COLS_ID_DISPLAYNAME_RS); - } - - if ( in_array(ROLE_BASIS_GROUPS, $role_bases) ) { - $agents[ROLE_BASIS_GROUPS] = ScoperAdminLib::get_all_groups(UNFILTERED_RS); - if ( ! $agents[ROLE_BASIS_GROUPS] ) - unset( $agents[ROLE_BASIS_GROUPS] ); - } - - return $agents; -} - -function agent_names($agents) { - $agent_names = array(); - foreach ( array_keys($agents) as $role_basis ) - foreach( $agents[$role_basis] as $agent ) - $agent_names[$role_basis][$agent->ID] = str_replace(' ', ' ', $agent->display_name); - - return $agent_names; -} - -function agent_list_prefixes() { - $agent_list_prefix = array(); - $agent_list_prefix[ROLE_BASIS_USER] = ''; - $agent_list_prefix[ROLE_BASIS_GROUPS] = __('Groups') . ': '; - - return $agent_list_prefix; -} - -function agent_captions_plural($role_bases) { - if ( count($role_bases) > 1 ) - return __('Users or Groups', 'scoper'); - elseif ( in_array(ROLE_BASIS_USER, $role_bases) ) - return __awp('Users'); - elseif ( in_array(ROLE_BASIS_GROUPS, $role_bases) ) - return __('Groups', 'scoper'); -} - -function agent_captions($role_bases) { - if ( count($role_bases) > 1 ) - return __('User / Group', 'scoper'); - elseif ( in_array(ROLE_BASIS_USER, $role_bases) ) - return __('User', 'scoper'); - elseif ( in_array(ROLE_BASIS_GROUPS, $role_bases) ) - return __('Group', 'scoper'); -} - -function get_role_codes() { - global $scoper; - - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE); - - $role_codes = array(); //generate temporary numeric id for each defined role, to reduce html bulk - $i = 0; - foreach( array_keys($role_defs) as $role_handle) { - $role_codes[$role_handle] = $i; - $i++; - } - return $role_codes; -} - -function display_inputs($mode, $assignment_modes, $args = '') { - $defaults = array( 'role_bases' => '', 'agents' => '', 'agent_caption_plural' => '', 'max_scopes' => array(), 'scope' => '', 'src_or_tx_name' => '' ); - $args = array_merge($defaults, (array) $args); - extract($args); - - global $scoper; - - echo "
    "; - - echo '
    • 1. '; - - if ( ROLE_ASSIGNMENT_RS == $mode ) { - $msg = __('Select Assignment Mode', 'scoper'); - echo "$msg

    • "; - - if ( OBJECT_SCOPE_RS == $scope ) { - $src = $scoper->data_sources->get($src_or_tx_name); - $date_col_defined = ! empty( $src->cols->date ); - } elseif ( TERM_SCOPE_RS == $scope ) { - $tx = $scoper->taxonomies->get($src_or_tx_name); - $date_col_defined = ! empty( $tx->object_source->cols->date ); - } else - $date_col_defined = true; - - $duration_limits_enabled = $date_col_defined && scoper_get_option('role_duration_limits'); - $content_date_limits_enabled = ( OBJECT_SCOPE_RS != $scope ) && $date_col_defined && scoper_get_option('role_content_date_limits'); - - $num = ( $duration_limits_enabled || $content_date_limits_enabled ) ? 5 : 4; - } else { - $msg = __('Select Restriction Mode', 'scoper'); - echo "$msg"; - $num = 3; - - $duration_limits_enabled = $content_date_limits_enabled = false; - } - - echo "
    • $num. "; - _e('Review and Submit', 'scoper'); - echo '

    • '; - echo '
    '; - ?> - -
      - - '; - echo ''; - } - ?> - -
    • - "; - $retain_value = ( isset($_POST[$for_name]) ) ? $_POST[$for_name] : 0; - - foreach($assignment_modes as $status_id => $caption) { - $selected = ( $status_id === $retain_value ) ? 'selected="selected"' : ''; - echo ""; - } - echo ''; - ?> -
    • - -
    • -
    • - -
    • -
    -

    -

    2. '; - //printf( _ x('Select %s to Modify', 'Users or Groups', 'scoper'), $agent_caption_plural ); - printf( __('Select %s to Modify', 'scoper'), $agent_caption_plural ); - echo '

    '; - - $args = array( 'suppress_extra_prefix' => true, 'filter_threshold' => 20, 'default_hide_threshold' => 20, 'check_for_incomplete_submission' => true ); - require_once('agents_checklist_rs.php'); - ScoperAgentsChecklist::all_agents_checklist($role_bases, $agents, $args); - - echo '

    '; - echo '
    '; - } - //=================== end users/groups and assignment mode selection display ==================== - - if ( $duration_limits_enabled || $content_date_limits_enabled ) { - echo '

    3. '; - _e('Set Role Duration and/or Content Date Limits (optional)', 'scoper'); - echo '

    '; - - include_once( 'admin_lib-bulk_rs.php' ); - ScoperAdminBulkLib::display_date_limit_inputs( $duration_limits_enabled, $content_date_limits_enabled ); - } - - if ( ROLE_ASSIGNMENT_RS == $mode ) { - $num = ( $duration_limits_enabled || $content_date_limits_enabled ) ? 4 : 3; - echo "

    $num. "; - $msg = __('Select Roles to Assign / Remove', 'scoper'); - echo "$msg

    "; - } else { - $num = 2; - echo "

    $num. "; - $msg = __('Select Roles to Modify', 'scoper'); - echo "$msg

    "; - } -} - -function role_submission($scope, $mode, $role_bases, $src_or_tx_name, $role_codes, $agent_caption_plural, $nonce_id) { - global $scoper; - $role_assigner = init_role_assigner(); - - $err = 0; - $role_count = 0; - check_admin_referer( $nonce_id ); - - $set_roles = array(); - $selected_roles = $_POST['roles']; - - if ( OBJECT_SCOPE_RS == $scope ) { - $src = $scoper->data_sources->get($src_or_tx_name); - $date_col_defined = ! empty( $src->cols->date ); - } elseif ( TERM_SCOPE_RS == $scope ) { - $tx = $scoper->taxonomies->get($src_or_tx_name); - $date_col_defined = ! empty( $tx->object_source->cols->date ); - } else - $date_col_defined = true; - - switch ($mode) { - case ROLE_ASSIGNMENT_RS: - $assign_for = $_POST['assign_for']; - - $selected_agents = array(); - foreach ( $role_bases as $role_basis ) { - if ( ! empty($_POST[$role_basis]) ) - $selected_agents[$role_basis] = $_POST[$role_basis]; - else { - $csv_id = "{$role_basis}_csv"; - if ( ! empty( $_POST[$csv_id] ) ) - $selected_agents[$role_basis] = ScoperAdminLib::agent_ids_from_csv( $csv_id, $role_basis ); - else - $role_bases = array_diff($role_bases, array($role_basis) ); - } - } - - $agents_msg = array(); - $valid_role_selection = ! empty($selected_roles); - - $duration_limits_enabled = $date_col_defined && scoper_get_option('role_duration_limits'); - $content_date_limits_enabled = $date_col_defined && scoper_get_option('role_content_date_limits'); - break; - - case ROLE_RESTRICTION_RS: - $role_bases = array('n/a'); - $default_restrictions = isset($_POST['default_restrictions']) ? $_POST['default_restrictions'] : array(); - $max_scope = $_POST['max_scope']; - $require_for = $_POST['require_for']; - $selected_agents = array('n/a' => array(0) ); - $valid_role_selection = ! empty($selected_roles) || ! empty($default_restrictions); - $modcount = 0; - - $duration_limits_enabled = $content_date_limits_enabled = false; - break; - } - - if ( ! $selected_agents ) { - $_POST['scoper_error'] = 1; - echo '

    '; - printf( __('Error: no %s were selected!', 'scoper'), $agent_caption_plural); - echo '

    '; - $err = 1; - } elseif ( ! $valid_role_selection ) { - $_POST['scoper_error'] = 1; - echo '

    '; - _e('Error: no roles were selected!', 'scoper'); - echo '

    '; - $err = 2; - } else { - if ( ROLE_ASSIGNMENT_RS == $mode ) { - if ( ! empty($_POST['set_role_duration']) || ! empty($_POST['set_content_date_limits']) ) - $date_entries_gmt = ScoperAdminBulkLib::process_role_date_entries(); - } - - foreach ( $role_bases as $role_basis ) { - foreach($selected_agents[$role_basis] as $agent_id) { - // must set default restrictions first - if ( ! empty($default_restrictions) ) { - $def_roles = array(); - foreach($default_restrictions as $role) { - $keys = explode('-', $role); //keys[0]=role_code, 1=term_id or obj_id - - if ( count($keys) < 2 ) - continue; - - if ( ! $role_handle = array_search($keys[0], $role_codes) ) - continue; - - $def_roles[ $keys[1] ][ $role_handle ] = array( 'max_scope' => $max_scope, 'for_item' => false, 'for_children' => true ); - $modcount++; - } - - $role_assigner->restrict_roles($scope, $src_or_tx_name, 0, $def_roles[0], array('force_flush' => true) ); - } - - if ( ! empty($selected_roles) ) { - foreach($selected_roles as $role) { - $keys = explode('-', $role); //keys[0]=role_code, 1=term_id or obj_id, 2=group_id or user_id - - if ( count($keys) < 2 ) - continue; - - if ( ! $role_handle = array_search($keys[0], $role_codes) ) - continue; - - switch ($mode) { - case ROLE_ASSIGNMENT_RS: - $set_roles[ $role_basis ][ $keys[1] ][ $role_handle ][ $agent_id ] = ( $keys[1] || ! $assign_for ) ? $assign_for : ASSIGN_FOR_CHILDREN_RS; // always assign default category assignments as for_children - break; - - case ROLE_RESTRICTION_RS: - $for_item = (ASSIGN_FOR_ENTITY_RS == $require_for) || (ASSIGN_FOR_BOTH_RS == $require_for); - $for_children = (ASSIGN_FOR_CHILDREN_RS == $require_for) || (ASSIGN_FOR_BOTH_RS == $require_for); - $set_roles[ $keys[1] ][ $role_handle ] = array( 'max_scope' => $max_scope, 'for_item' => $for_item, 'for_children' => $for_children ); - $modcount++; - break; - } - } - } - - if ( ROLE_ASSIGNMENT_RS == $mode ) { - $args = array( 'force_flush' => true, 'set_role_duration' => $set_role_duration, 'set_content_date_limits' => $set_content_date_limits ); - - if ( $duration_limits_enabled && ! empty($_POST['set_role_duration']) ) { - $is_limited = ( $date_entries_gmt->start_date_gmt || ( $date_entries_gmt->end_date_gmt != SCOPER_MAX_DATE_STRING ) || ! empty( $_POST['start_date_gmt_keep-timestamp'] ) || ! empty( $_POST['end_date_gmt_keep-timestamp'] ) ); - $args[ 'set_role_duration' ] = (object) array( 'date_limited' => $is_limited, 'start_date_gmt' => $date_entries_gmt->start_date_gmt, 'end_date_gmt' => $date_entries_gmt->end_date_gmt ); - } - - if( $content_date_limits_enabled && ! empty($_POST['set_content_date_limits']) ) { - $is_limited = ( $date_entries_gmt->content_min_date_gmt || ( $date_entries_gmt->content_max_date_gmt != SCOPER_MAX_DATE_STRING ) || ! empty( $_POST['content_min_date_gmt_keep-timestamp'] ) || ! empty( $_POST['content_max_date_gmt_keep-timestamp'] ) ); - $args[ 'set_content_date_limits' ] = (object) array( 'content_date_limited' => $is_limited, 'content_min_date_gmt' => $date_entries_gmt->content_min_date_gmt, 'content_max_date_gmt' => $date_entries_gmt->content_max_date_gmt ); - } - - if ( isset($set_roles[$role_basis]) ) - foreach ( $set_roles[$role_basis] as $id => $item_roles ) - $role_assigner->assign_roles($scope, $src_or_tx_name, $id, $item_roles, $role_basis, $args ); - } else { - foreach ( $set_roles as $id => $item_roles ) - $role_assigner->restrict_roles($scope, $src_or_tx_name, $id, $item_roles, array('force_flush' => true) ); - } - } // end foreach selected agents - - if ( ! empty($selected_agents[$role_basis]) ) { - if ( ROLE_BASIS_USER == $role_basis ) - $agents_msg []= sprintf(_n("%d user", "%d users", count($selected_agents[$role_basis]), 'scoper'), count($selected_agents[$role_basis]) ); - else - $agents_msg []= sprintf(_n("%d group", "%d groups", count($selected_agents[$role_basis]), 'scoper'), count($selected_agents[$role_basis]) ); - } - } // end foreach role basis - - echo '

    '; - - switch ($mode) { - case ROLE_ASSIGNMENT_RS: - $roles_msg = sprintf(_n("%d role selection", "%d role selections", count($selected_roles), 'scoper'), count($selected_roles) ); - $agents_msg = implode( ", ", $agents_msg ); - //printf( _ x('Role Assignments Updated: %1$s for %2$s', 'n role selections for x users, y groups', 'scoper'), $roles_msg, $agents_msg ); - printf( __('Role Assignments Updated: %1$s for %2$s', 'scoper'), $roles_msg, $agents_msg ); - break; - - case ROLE_RESTRICTION_RS: - printf(_n("Role Restrictions Updated: %d setting", "Role Restrictions Updated: %d settings", $modcount, 'scoper'), $modcount ); - break; - } - - echo '

    '; - - // allow the DB server a little time to refresh before querying what we just put in - global $wpdb; - $junk = scoper_get_col("SELECT assignment_id FROM $wpdb->user2role2object_rs LIMIT 10"); - } //endif no input error - - return $err; -} - -function get_objects_info($object_ids, &$object_names, &$object_status, &$unlisted_objects, $src, $otype, $ignore_hierarchy) { - global $wpdb; - - // buffer titles in case they are translated - if ( 'page' == $otype->val ) - $titles = ScoperAdminUI::get_page_titles(); - - $col_id = $src->cols->id; - $col_name = $src->cols->name; - - $cols = "$col_name, $col_id"; - if ( isset($src->cols->parent) && ! $ignore_hierarchy ) { - $col_parent = $src->cols->parent; - $cols .= ", $col_parent"; - } else - $col_parent = ''; - - $col_status = ( ! empty($src->cols->status) ) ? $src->cols->status : ''; - if ( $col_status ) - $cols .= ", $col_status"; - - $unroled_count = 0; - $unroled_limit = ( ! empty($otype->admin_max_unroled_objects) ) ? $otype->admin_max_unroled_objects : 999999; - - if ( ! empty($src->cols->type) && ! empty($otype->val) ) - $otype_clause = "AND {$src->cols->type} = '$otype->val'"; - else - $otype_clause = ''; - - $obj = ''; - - if ( $results = scoper_get_results("SELECT $cols FROM $src->table WHERE 1=1 $otype_clause ORDER BY $col_id DESC") ) { - - foreach ( $results as $row ) { - if ( isset($titles[$row->$col_id]) ) - $object_names[$row->$col_id] = $titles[$row->$col_id]; - elseif ( 'post' == $src->name ) - $object_names[$row->$col_id] = apply_filters( 'the_title', $row->$col_name, $row->$col_id ); - else - $object_names[$row->$col_id] = $row->$col_name; - - if ( $col_status ) - $object_status[$row->$col_id] = $row->$col_status; - - unset($obj); - - if ( $col_parent ) // temporarily key by name for alpha sort of additional items prior to hierarchy sort - $obj = (object) array($col_id => $row->$col_id, $col_name => $row->$col_name, $col_parent => $row->$col_parent); - else - $obj = (object) array($col_id => $row->$col_id, $col_name => $row->$col_name); - - // List only a limited number of unroled objects - if ( ($unroled_limit >= 0) && ! isset($object_ids[$row->$col_id]) ) { - if ( $unroled_count >= $unroled_limit ) { - - $unlisted_objects[$row->$col_id] = $obj; - continue; - } - $unroled_count++; - - } - - $listed_objects[$row->$col_id] = $obj; - } - } - - // restore buffered page titles in case they were filtered previously - if ( 'page' == $otype->val ) { - scoper_restore_property_array( $listed_objects, $titles, 'ID', 'post_title' ); - scoper_restore_property_array( $unlisted_objects, $titles, 'ID', 'post_title' ); - } - - return $listed_objects; -} - -function filter_objects_listing($mode, &$role_settings, $src, $object_type) { - global $wpdb; - - $filter_args = array(); - - // only list role assignments which the logged-in user can administer - if ( isset($src->reqd_caps[OP_ADMIN_RS]) ) { - $filter_args['required_operation'] = OP_ADMIN_RS; - } else { - $reqd_caps = array(); - foreach (array_keys($src->statuses) as $status_name) { - $admin_caps = $scoper->cap_defs->get_matching($src->name, $object_type, OP_ADMIN_RS, $status_name); - $delete_caps = $scoper->cap_defs->get_matching($src->name, $object_type, OP_DELETE_RS, $status_name); - $reqd_caps[$object_type][$status_name] = array_merge(array_keys($admin_caps), array_keys($delete_caps)); - } - $filter_args['force_reqd_caps'] = $reqd_caps; - } - - $qry = "SELECT $src->table.{$src->cols->id} FROM $src->table WHERE 1=1"; - - $filter_args['require_full_object_role'] = true; - $qry_flt = apply_filters('objects_request_rs', $qry, $src->name, $object_type, $filter_args); - - if ( $cu_admin_results = scoper_get_col( $qry_flt ) ) - $cu_admin_results = array_fill_keys( $cu_admin_results, true ); - - if ( ROLE_ASSIGNMENT_RS == $mode ) { - foreach ( array_keys($role_settings) as $role_basis ) - foreach ( array_keys($role_settings[$role_basis]) as $obj_id ) - if ( ! isset($cu_admin_results[$obj_id]) ) - unset($role_settings[$role_basis][$obj_id]); - } else { - $setting_types = array('restrictions', 'unrestrictions'); - foreach ($setting_types as $setting_type) - if ( isset($role_settings[$setting_type]) ) - foreach ( array_keys($role_settings[$setting_type]) as $role_handle ) - foreach ( array_keys($role_settings[$setting_type][$role_handle]) as $obj_id ) - if ( ! isset($cu_admin_results[$obj_id]) ) - unset($role_settings[$setting_type][$role_handle][$obj_id]); - } - - return $cu_admin_results; -} - -function item_tree_jslinks($mode, $args='') { - $defaults = array ( 'role_bases' => '', 'default_hide_empty' => false, 'hide_roles' => false, 'scope' => '', 'src' => '', 'otype' => '' ); - $args = array_merge($defaults, (array) $args); - extract($args); - - if ( (ROLE_ASSIGNMENT_RS == $mode) && empty($role_bases) ) - $role_bases = array(ROLE_BASIS_USER, ROLE_BASIS_GROUPS); - - $tr_display = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) ? 'block' : 'table-row'; - - /* // this is problematic because some roles are mutually exclusive for assignment - echo ""; - _e('select all roles', 'scoper'); - echo " | "; - */ - - echo ""; - _e('unselect all roles', 'scoper'); - echo ' | '; - - if ( $role_bases && in_array(ROLE_BASIS_USER, $role_bases) ) { - echo ""; - _e('hide users', 'scoper'); - echo ''; - - echo " | '; - } - - if ( $role_bases && in_array(ROLE_BASIS_GROUPS, $role_bases) ) { - echo ""; - _e('hide groups', 'scoper'); - echo ''; - - echo " | '; - } - - if ( $hide_roles ) { - echo ""; - _e('hide roles', 'scoper'); - echo ''; - - echo " | '; - } - - - // Hide Empty - $hide_tr_sfx = ( $default_hide_empty ) ? '-hide' : ''; - $hide_li_sfx = ( $default_hide_empty ) ? '-hide' : ''; - - $js_call = " - agp_set_display('rs-show_empty','inline',this.id); - agp_display_marked_elements('li','no-rol-li{$hide_li_sfx}','none'); - agp_setcss('.no-rol{$hide_tr_sfx}','display','none'); - agp_set_display('max_unroled_notice','none'); - "; - - if ( $role_bases ) - $js_call .= " - agp_setcss('.user-csv','display','inline'); - agp_setcss('.groups-csv','display','inline'); - agp_set_display('max_unroled_notice','none',''); - "; - - $unroled_limit = ( ! empty($otype->max_unroled_objects) ) ? $otype->max_unroled_objects : 999999; - - $style = ( $default_hide_empty ) ? ' style="display:none;"' : ''; - $title = __('hide unmodified items', 'scoper'); - echo ""; - if ( ROLE_RESTRICTION_RS == $mode ) - _e('hide defaulted', 'scoper'); - else - _e('hide unassigned', 'scoper'); - echo ''; - - $js_call = " - agp_set_display('rs-hide_empty','inline',this.id); - agp_display_marked_elements('li','no-rol-li{$hide_li_sfx}','block'); - agp_setcss('.no-rol{$hide_tr_sfx}','display','$tr_display'); - agp_set_display('max_unroled_notice','block'); - "; - $style = ( $default_hide_empty ) ? '' : ' style="display:none;"'; - - $display_name_plural = ( ! empty($src->display_name) ) ? strtolower($src->display_name_plural) : __('items', 'scoper'); - - if ( ROLE_RESTRICTION_RS == $mode ) - $title = sprintf(__('include the newest %s with default restrictions', 'scoper'), $display_name_plural); - else - $title = sprintf(__('include the newest %s with no role assignments', 'scoper'), $display_name_plural); - - echo ""; - if ( ROLE_RESTRICTION_RS == $mode ) - _e('show defaulted', 'scoper'); - else - _e('show unassigned', 'scoper'); - - - // Collapse All - if ( empty($otype->ignore_object_hierarchy) ) { - echo ' | '; - - $js_call = " - agp_set_display('rs-expand_all','inline',this.id); - agp_display_marked_elements('li','role-li','none'); - agp_set_marked_elem_property('a','term-tgl','innerHTML','+'); - agp_display_marked_elements('span','rs-termjump','none'); - "; - echo ""; - _e('collapse all', 'scoper'); - echo ''; - } - - $js_call = " - agp_set_display('rs-collapse_all','inline',this.id); - agp_display_marked_elements('li','role-li','block'); - agp_set_marked_elem_property('a','term-tgl','innerHTML','-'); - agp_display_marked_elements('span','rs-termjump','inline'); - "; - echo "'; - - if ( ! empty($otype->admin_max_unroled_objects) ) { - $display_style = ( $default_hide_empty ) ? 'style="display:none;"' : ''; - echo "

    "; - if ( ROLE_RESTRICTION_RS == $mode ) - printf(__('Note: %1$s with default restrictions will not be listed here unless they are among the %2$s newest.', 'scoper'), $display_name_plural, $otype->admin_max_unroled_objects); - else - printf(__('Note: %1$s with no role assignments will not be listed here unless they are among the %2$s newest.', 'scoper'), $display_name_plural, $otype->admin_max_unroled_objects); - echo '
    '; - } -} - -function item_tree($scope, $mode, $src, $otype_or_tx, $all_items, $assigned_roles, $strict_items, $role_defs_by_otype, $role_codes, $args = '') { - - $defaults = array ( 'admin_items' => '', 'editable_roles' => '', - 'ul_class' => 'rs-termlist', 'ie_link_style' => '', 'object_names' => '', - 'table_captions' => '', 'err' => '', 'object_status' => '', - 'agent_caption_plural' => '', 'agent_list_prefix' => '', 'agent_names' => '', - 'default_hide_empty' => false, 'role_bases' => array(ROLE_BASIS_USER, ROLE_BASIS_GROUPS), - 'single_item' => false ); - $args = array_merge($defaults, (array) $args); - extract($args); - - $col_id = $src->cols->id; - $col_name = $src->cols->name; - $col_parent = ( isset($src->cols->parent) ) ? $src->cols->parent : ''; - - $display_name = $otype_or_tx->display_name; - - if ( TERM_SCOPE_RS == $scope ) { - $src_or_tx_name = $otype_or_tx->name; - $edit_url_base = ( ! empty($otype_or_tx->edit_url) ) ? $otype_or_tx->edit_url : ''; - } else { - $src_or_tx_name = $src->name; - $edit_url_base = ( ! empty($src->edit_url) ) ? $src->edit_url : ''; - } - - if ( $default_hide_empty ) { - $hide_tr_sfx = '-hide'; - $hide_li_sfx = '-hide'; - } else { - $hide_tr_sfx = ''; - $hide_li_sfx = ''; - } - - $nextlink = ''; - $prevlink = ''; - - if ( empty($admin_items) ) - $admin_items = array(); - - if ( empty($agent_caption_plural) ) - $agent_caption_plural = __('Users or Groups', 'scoper'); - - if ( empty($agent_list_prefix) ) { - $agent_list_prefix = array(); - $agent_list_prefix[ROLE_BASIS_USER] = ''; - $agent_list_prefix[ROLE_BASIS_GROUPS] = __('Groups') . ': '; - } - - static $prevtext, $nexttext, $is_administrator, $role_header, $agents_header; - if ( empty($prevtext) ) { - // buffer prev/next caption for display with each term - //$prevtext = _ x('prev', '|abbreviated link to previous item', 'scoper'); - //$nexttext = _ x('next', '|abbreviated link to next item', 'scoper'); - $prevtext = __('prev', 'scoper'); - $nexttext = __('next', 'scoper'); - - $is_administrator = is_administrator_rs($src, 'user'); - - $role_header = __awp('Role'); - - switch ( $mode ) { - case ROLE_ASSIGNMENT_RS: - //$agents_header = sprintf( _ x('Current %s', 'users or groups', 'scoper'), $agent_caption_plural); - $agents_header = sprintf( __('Current %s', 'scoper'), $agent_caption_plural); - - break; - case ROLE_RESTRICTION_RS: - $agents_header = __('Current Restrictions', 'scoper'); - - break; - default: - return; - } - } - - global $scoper; - - // disregard roles that don't apply to this scope - foreach ( $role_defs_by_otype as $object_type => $role_defs ) - foreach ( $role_defs as $role_handle => $role ) - if ( ! isset($role->valid_scopes[$scope]) ) - unset( $role_defs_by_otype[$object_type][$role_handle] ); - - // for object scope, assign "private post reader" role, but label it as "post reader" to limit confusion - $role_display_name = array(); - foreach ( $role_defs_by_otype as $role_defs ) - foreach ( array_keys($role_defs) as $role_handle ) - $role_display_name[$role_handle] = $scoper->role_defs->get_display_name( $role_handle, $scope . '_ui' ); - - // display a separate role assignment list for each individual term / object - $last_id = -1; - $last_name = ''; - $last_parent_id = -1; - $parent_id = 0; - $parents = array(); - $depth = 0; - - $_top_link = "" . __('top', 'scoper') . ''; - $tr_display = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) ? 'block' : 'table-row'; - $show_all_caption = __('show all', 'scoper'); - - echo "
      "; - - if ( empty($all_items) ) - $all_items = array(); - - if ( ! $single_item ) { - if ( ('rs' == SCOPER_ROLE_TYPE) || (OBJECT_SCOPE_RS != $scope) || (ROLE_ASSIGNMENT_RS != $scope) ) { // can't distinguish between post & page default roles with WP role type - if ( ROLE_ASSIGNMENT_RS == $mode ) - $root_caption = sprintf(__('DEFAULTS for new %s', 'scoper'), $otype_or_tx->display_name_plural); - else - $root_caption = sprintf(__('DEFAULTS for all %s', 'scoper'), $otype_or_tx->display_name_plural); - - if ( TERM_SCOPE_RS == $scope ) { - $root_item = (object) array( $col_id => 0, $col_name => $root_caption, $col_parent => 0 ); - array_unshift( $all_items, $root_item); - } else { - //$all_items = array( $root_caption => (object) array($col_id => 0) ) + $all_items; - $obj = (object) array($col_id => 0); - $all_items = array( $root_caption => $obj ) + $all_items; - - $object_names[0] = $root_caption; - - $status_names = ( 'post' == $src->name ) ? get_post_statuses() : array(); - } - } - } - - $title_roles = __('edit roles', 'scoper'); - //$title_item = sprintf(_ x('edit %s', 'post/page/category/etc.', 'scoper'), strtolower($display_name) ); - $title_item = sprintf(__('edit %s', 'scoper'), strtolower($display_name) ); - //$title_term = sprintf(_ x('edit %s', 'category/link category/etc', 'scoper'), strtolower($display_name) ); - - foreach($all_items as $key => $item) { - $id = $item->$col_id; - - if ( ! empty($object_names[$id]) ) - $name = attribute_escape(str_replace(' ', ' ', $object_names[$id]) ); - else - $name = str_replace(' ', ' ', $item->$col_name); - - if ( $col_parent && isset($item->$col_parent) ) { - $parent_id = $item->$col_parent; - - if ( $parent_id != $last_parent_id ) { - if ( ($parent_id == $last_id) && $last_id ) { - $parents[$last_name] = $last_id; - echo "
        "; - $depth++; - } elseif ($depth) { - do { - //echo "term $name: depth $depth, current parents: " . print_r($parents); - array_pop($parents); - echo '
      '; - $depth--; - } while ( $parents && ( end($parents) != $parent_id ) && $depth); - } - - $last_parent_id = $parent_id; - } - } - - if ( $is_administrator || isset($admin_items[$last_id]) ) - if ( ! $last_id ) // always close li for defaults - echo ''; - elseif ( (-1 != $last_id) && ($parent_id != $last_id) ) - echo ''; - - if ( OBJECT_SCOPE_RS == $scope ) { - if ( isset($object_status) && ! empty($object_status[$id]) && ('publish' != $object_status[$id] ) && ('private' != $object_status[$id] ) ) - $status_text = isset( $status_names[ $object_status[$id] ] ) ? "{$status_names[ $object_status[$id] ]}, " : "{$object_status[$id]}, "; - else - $status_text = ''; - - $link_span_open = ( $status_text ) ? "" : ''; - $link_span_close = ( $status_text ) ? "" : ''; - - // link from object name to our "Edit Object Role Assignment" interface - $rs_edit_url = "admin.php?page=rs-object_role_edit&src_name=$src_or_tx_name&object_type={$otype_or_tx->name}&object_id=$id&object_name=" . urlencode($name); - $name_text = "$link_span_open$name$link_span_close"; - - // link from object ID to the object type's default editor, if defined - if ( $id && $edit_url_base ) { - $content_edit_url = sprintf($edit_url_base, $id); - $id_text = "$id"; - } else - $id_text = $id; - - $id_text = ( $id ) ? " ($status_text" . sprintf(__('id %s', 'scoper'), $id_text) . ')' : ''; - - } elseif ( $id && (TERM_SCOPE_RS == $scope) && $edit_url_base ) { - $content_edit_url = sprintf($edit_url_base, $id); - $name_text = "$name"; - $id_text = ''; - } else { - $name_text = $name; - $id_text = ''; - } - - //display scroll links for this term - if (TERM_SCOPE_RS == $scope) - $prevlink = ( $last_id && ! $single_item && $id ) ? "" . $prevtext . "" : ''; - - if ( ! $is_administrator && ( ! isset($admin_items[$id]) ) ) - continue; - - $last_id = $id; - $last_name = $name; - $next_id = ( $id && isset($all_items[$key + 1]) ) ? $all_items[$key + 1]->$col_id : 0; - - if (TERM_SCOPE_RS == $scope) { - if ( $next_id ) - $nextlink = "" . $nexttext . ""; - elseif ( $id ) - $nextlink = "$nexttext"; - else - $nextlink = ''; - } - - if ( $parents ) { - //$color_class = ( TERM_SCOPE_RS == $scope ) ? 'rs-lgray' : 'rs-gray'; - //$item_path = "" . implode(' / ', array_keys($parents)) . ' / ' . ''; - $item_path = implode(' / ', array_keys($parents)) . ' / ' ; - $margin = ''; - $top_pad = '1.5em'; - } else { - $item_path = ''; - $margin = 'margin-top:2em;'; - $top_pad = '0.2em'; - } - - $js_call = "agp_toggle_display('roles-$id','block','tgl-$id', '-', '+');" - . "agp_toggle_display('jump-$id','block');"; - - $role_class = ''; - - if ( $id ) { // never hide defaults block - if ( ROLE_ASSIGNMENT_RS == $mode ) { - $role_class = ''; - if ( ! isset($assigned_roles[ROLE_BASIS_USER][$id]) && ! isset($assigned_roles[ROLE_BASIS_GROUPS][$id]) ) - $role_class = " no-rol-li{$hide_li_sfx}"; - elseif ( ! isset($assigned_roles[ROLE_BASIS_USER][$id]) ) - $role_class = " no-user-li"; - elseif ( ! isset($assigned_roles[ROLE_BASIS_GROUPS][$id]) ) - $role_class = " no-groups-li"; - - } elseif ( ROLE_RESTRICTION_RS == $mode ) { - $role_class = " no-rol-li{$hide_li_sfx}"; - $setting_types = array('restrictions', 'unrestrictions'); - foreach ( $setting_types as $setting_type ) { - if ( isset($strict_items[$setting_type]) ) { - foreach ( array_keys($strict_items[$setting_type]) as $role_handle ) { // key is role_handle - if ( isset($strict_items[$setting_type][$role_handle][$id]) ) { - $role_class = ''; - break; - } - } - } - } - } - } - - $class = ($role_class) ? "class='" . trim($role_class) . "' " : ''; - - echo "\r\n\r\n
    • "; - - if ( ! $single_item ) { - $top_link = ( $id ) ? $_top_link : ''; - - echo "" - . "{$prevlink}{$nextlink}" - . $top_link . '' - . "display_name} $id: $name\">" - . "- " . $item_path . '' . $name_text . '' . $id_text . ': '; - } - - echo "
    • "; -?> - - - - - - - - - - $role_defs ) { - $vals = array(); - $ids = array(); - - if ( ! $single_item ) { - foreach ( array_keys($role_defs) as $role_handle ) { - // retain previous selections in case of error ( user forgets to select groups/users ) - $vals[$role_handle] = "{$role_codes[$role_handle]}-{$id}"; - - // pre-generate all checkbox ids in this op_type, to pass to javascript - $ids[$role_handle] = 'rs-' . $vals[$role_handle]; - } - } - - foreach ( array_keys($role_defs) as $role_handle ) { - // Does current user have this role? - if ( ( ! $single_item && ( $is_administrator || ! is_array($editable_roles) || ! empty($editable_roles[0][$role_handle]) || ! empty($editable_roles[$id][$role_handle]) ) ) ) { - $form_id = ( $id || (ROLE_ASSIGNMENT_RS == $mode) ) ? 'roles' : 'default_restrictions'; - - $checked = ( $err && isset($_POST[$form_id]) && in_array($vals[$role_handle], $_POST[$form_id]) ) ? 'checked="checked"' : ''; - - if ( ROLE_ASSIGNMENT_RS == $mode ) { - //$skip_if_id = 'assign_for'; // reduced html bulk by making 3rd & 4th args of agp_uncheck default to these values - //$skip_if_val = REMOVE_ASSIGNMENT_RS; - $js_call = "agp_uncheck('" . implode(',', $ids) . "',this.id);"; - $onclick = "onclick=\"$js_call\""; - } else - $onclick = ''; - - $checkbox = ""; - $label = ""; - } else { - $checkbox = ''; - $label = str_replace(' ', ' ', $role_display_name[$role_handle]); - } - - $classes = array(); - - - if ( $default_strict = isset($strict_items['unrestrictions'][$role_handle]) && is_array($strict_items['unrestrictions'][$role_handle]) ) - $setting = 'unrestrictions'; - else - $setting = 'restrictions'; - - if ( isset($strict_items[$setting][$role_handle][$id]) ) { - if ( $single_item ) { - $require_for = $strict_items[$setting][$role_handle][$id]; - $open_brace = $close_brace = ''; - } else { - $require_for = $strict_items[$setting][$role_handle][$id]['assign_for']; - $open_brace = ( $strict_items[$setting][$role_handle][$id]['inherited_from'] ) ? '{' : ''; - $close_brace = ( $open_brace ) ? '}' : ''; - } - } else { - $require_for = false; - $open_brace = $close_brace = ''; - } - - - switch ( $mode ) { - case ROLE_ASSIGNMENT_RS: - $open_brace = $close_brace = ''; - - $assignment_list = array(); - foreach ( $role_bases as $role_basis ) { - if ( isset($assigned_roles[$role_basis][$id][$role_handle]) ) { - $checkbox_id = ( $single_item ) ? '' : $role_basis; - - $assignment_names = array_intersect_key($agent_names[$role_basis], $assigned_roles[$role_basis][$id][$role_handle]); - $assignment_list[$role_basis] = "" . $agent_list_prefix[$role_basis] . '' - . ScoperAdminUI::role_assignment_list($assigned_roles[$role_basis][$id][$role_handle], $assignment_names, $checkbox_id, $role_basis) - . ''; - } - } - - $setting_display = implode( '  ', $assignment_list); - - // don't hide rows for default roles - if ( $id ) { - if ( ! isset($assigned_roles[ROLE_BASIS_USER][$id][$role_handle]) && ! isset($assigned_roles[ROLE_BASIS_GROUPS][$id][$role_handle]) ) - $classes []= "no-rol{$hide_tr_sfx}"; - elseif ( ! isset($assigned_roles[ROLE_BASIS_USER][$id][$role_handle]) ) - $classes []= "no-user"; - elseif ( ! isset($assigned_roles[ROLE_BASIS_GROUPS][$id][$role_handle]) ) - $classes []= "no-groups"; - } - - break; - case ROLE_RESTRICTION_RS: - if ( ! $id ) - $setting_display = $table_captions[$setting]['default']; - elseif ( $require_for ) - $setting_display = $table_captions[$setting][$require_for]; - else { - $setting_display = '(' . $table_captions[$setting][false] . ')'; - - // don't hide rows for default restrictions - if ( $id ) - $classes []= " no-rol{$hide_tr_sfx}"; - } - } // end switch $mode - - switch ( $require_for ) { - case ASSIGN_FOR_BOTH_RS: - $open_brace = '' . $open_brace; - $close_brace .= ''; - break; - case ASSIGN_FOR_CHILDREN_RS: - $open_brace = '' . $open_brace; - $close_brace .= ''; - } // end switch - - if ( ( empty($default_strict) && $require_for && ($require_for != ASSIGN_FOR_CHILDREN_RS) ) || ( ! empty($default_strict) && ! $require_for) ) - $classes []= 'rs-backylw'; - - $class = ($classes) ? " class='" . implode(' ', $classes) . "'" : ''; - - echo "\r\n" - . "" - . "" - . "" - . "" - . ""; - } // end foreach role - - } // end foreach object_type - - echo '
      +";?>
      $checkbox$label{$open_brace}$setting_display{$close_brace}
      '; - } // end foreach term - - while($depth) { - echo '
    '; - $depth--; - } - - echo ''; - echo '
      '; - - // now display "select all" checkboxes for all terms in this taxonomy - if ( empty( $single_item ) ) { - if ( defined('SCOPER_EXTRA_SUBMIT_BUTTON') ) { - echo '
    • '; - } -?> -
    • - - - - - - - -$col_id; - - $all_items_ser = implode('-', $all_items_arr); - - //display "check for every term" shortcuts for each individual role - global $scoper; - $style = ' class="rs-backwhite"'; - foreach ( $role_defs_by_otype as $object_type => $roles ) { - foreach ( array_keys($roles) as $role_handle ) { - $style = ( ' class="alternate"' == $style ) ? ' class="rs-backwhite"' : ' class="alternate"'; - - // $check_shorcut was displayed in first " - . "" - . "" - . ""; - } // end foreach role - } // end foreach roledef - - echo '
      display_name_plural))?>
      - $id = "rs-Z-{$role_codes[$role_handle]}"; - $caption = ' ' . sprintf( __('(all %s)', 'scoper'), strtolower($otype_or_tx->display_name_plural) ) . ''; - $js_call = "scoper_checkroles('$id', '$all_items_ser', '{$role_codes[$role_handle]}');"; - echo "\n\t

    '; - } // endif not single item - -} // end function item_tree - -} // end class ScoperAdminBulk - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php deleted file mode 100644 index 0b68e5b..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php +++ /dev/null @@ -1,54 +0,0 @@ -pending) ) { - echo "\n\t".''; - - $num = number_format_i18n( $num_posts->pending ); - $text = _n( 'Pending Post', 'Pending Posts', intval($num_posts->pending), 'scoper' ); - - $num = "$num"; - $text = "$text"; - - echo '' . $num . ''; - echo '' . $text . ''; - echo ''; - echo ''; - echo "\n\t"; - } - } - - if ( $num_pages = wp_count_posts( 'page' ) ) { - if ( ! empty($num_pages->pending) ) { - echo "\n\t".''; - - $num = number_format_i18n( $num_pages->pending ); - $text = _n( 'Pending Page', 'Pending Pages', intval($num_pages->pending), 'scoper' ); - - $num = "$num"; - $text = "$text"; - - echo '' . $num . ''; - echo '' . $text . ''; - echo ''; - echo ''; - echo "\n\t"; - } - } -} - -/* -function scoper_add_dashboard_widgets() { - if ( awp_ver( '2.7' ) ) - wp_add_dashboard_widget( 'scoper_dashboard_stuff', __('Role Scoper', 'scoper'), 'scoper_dashboard_stuff' ); -} - -function scoper_dashboard_stuff() { - -} -*/ - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin-init_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin-init_rs.php deleted file mode 100644 index 781161f..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin-init_rs.php +++ /dev/null @@ -1,56 +0,0 @@ -handle_submission( 'update', $sitewide, $customize_defaults ); - - } elseif ( isset($_POST['rs_defaults']) ) { - $sitewide = isset($_POST['rs_options_doing_sitewide']); - $customize_defaults = isset($_POST['rs_options_customize_defaults']); - $handler->handle_submission( 'default', $sitewide, $customize_defaults ); - - } elseif ( isset($_POST['rs_flush_cache']) ) - $handler->handle_submission( 'flush' ); - } -} - - -function scoper_use_posted_init_options() { - if ( ! isset( $_POST['role_type'] ) || ! strpos( urldecode($_SERVER['REQUEST_URI']), 'admin.php?page=rs-' ) || defined('SCOPER_ROLE_TYPE') ) - return; - - if ( isset( $_POST['rs_defaults'] ) ) { - $arr = scoper_default_options(); - - // arr['role_type'] is numeric input index on update, string value on defaults. - $posted_role_type = $arr['role_type']; - } else { - $arr = $_POST; - - global $scoper_role_types; - $posted_role_type = $scoper_role_types[ $arr['role_type'] ]; - } - - define ( 'SCOPER_ROLE_TYPE', $posted_role_type); - define ( 'SCOPER_CUSTOM_USER_BLOGCAPS', ! empty( $arr['custom_user_blogcaps'] ) ); - - define ( 'DEFINE_GROUPS_RS', ! empty($arr['define_usergroups']) ); - define ( 'GROUP_ROLES_RS', ! empty($arr['define_usergroups']) && ! empty($arr['enable_group_roles']) ); - define ( 'USER_ROLES_RS', ! empty($arr['enable_user_roles']) ); - - if ( empty ($arr['persistent_cache']) && ! defined('DISABLE_PERSISTENT_CACHE') ) - define ( 'DISABLE_PERSISTENT_CACHE', true ); - - wpp_cache_init( IS_MU_RS && scoper_establish_group_scope() ); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin-legacy_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin-legacy_rs.php deleted file mode 100644 index 184b781..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin-legacy_rs.php +++ /dev/null @@ -1,28 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin_lib-bulk_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin_lib-bulk_rs.php deleted file mode 100644 index 9da6896..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin_lib-bulk_rs.php +++ /dev/null @@ -1,412 +0,0 @@ - $item ) - if ( $item->$col_parent == $find_parent_id ) { - if ( $id_key ) - $ordered_results[$item->$col_id]= $object_array[$key]; - else - $ordered_results[]= $object_array[$key]; - - unset($object_array[$key]); - $last_parent_id[] = $find_parent_id; - $find_parent_id = $item->$col_id; - - $found_match = true; - break; - } - - if ( ! $found_match ) { - if ( ! count($last_parent_id) ) - break; - else - $find_parent_id = array_pop($last_parent_id); - } - } while ( true ); - - return $ordered_results; - } - - function display_date_limit_inputs( $role_duration = true, $content_date_limits = true ) { - echo ' -
    -
    -
    - '; - - if ( $role_duration || $content_date_limits && scoper_get_option( 'display_hints' ) ) - if ( scoper_get_option('display_hints') ) { - echo '
    '; - if ( $role_duration ) { - _e("Role Duration specifies the time period in which a role is active.", 'scoper'); - echo ' '; - } - - if ( $content_date_limits ) - _e("Content Date Limits narrow the content which the role applies to.", 'scoper'); - - echo '
    '; - echo '
    '; - } - - if ( $role_duration ) { - echo '
    '; - - if ( ! empty($_POST['set_role_duration']) ) { - $checked = "checked='checked'"; - $hide_class = ''; - } else { - $checked = ''; - $hide_class = " hide-if-js"; - } - - $js_call = "agp_display_if('role_duration_inputs', 'set_role_duration')"; - echo "
    '; - - echo "
      "; - - // TODO: make these horizontal li - - echo '
    • '; - _e('Grant Role on:', 'scoper'); - ScoperAdminBulkLib::display_touch_time( '', '', 'start_date_gmt_' ); - echo '
    • '; - - echo '
    • '; - _e('Expire Role on:', 'scoper'); - ScoperAdminBulkLib::display_touch_time( '', '', 'end_date_gmt_' ); - echo '
    • '; - - echo '
    '; - - echo '
    '; - } - - if ( $content_date_limits ) { - echo '
    '; - - if ( ! empty($_POST['set_content_date_limits']) ) { - $checked = "checked='checked'"; - $hide_class = ''; - } else { - $checked = ''; - $hide_class = " hide-if-js"; - } - - $js_call = "agp_display_if('role_date_limit_inputs', 'set_content_date_limits')"; - echo "'; - - echo "
      "; - - echo '
    • '; - _e('Min Content Date:', 'scoper'); - ScoperAdminBulkLib::display_touch_time( '', '', 'content_min_date_gmt_' ); - echo '
    • '; - - echo '
    • '; - _e('Max Content Date:', 'scoper'); - ScoperAdminBulkLib::display_touch_time( '', '', 'content_max_date_gmt_' ); - echo '
    • '; - - echo '
    '; - - echo '
    '; - } - - if ( $role_duration || $content_date_limits && scoper_get_option( 'display_hints' ) ) - if ( scoper_get_option('display_hints') ) { - echo '
    '; - _e('This controls what limits to apply to the User / Group roles you select for creation or modification. Currently stored limits are indicated by a dotted border around the User or Group name. For details, hover over the name or view the User or Group Profile.', 'scoper' ); - echo '
    '; - } - - echo ' -
    -
    -
    - '; - } - - function display_touch_time( $stamp, $date, $id_prefix = '', $class = 'curtime', $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0, $suppress_hidden_inputs = true, $suppress_current_inputs = true, $use_js = false, $empty_month_option = true ) { // todo: move to $args array, default suppress to false - if ( $use_js ) { - echo ''; - printf($stamp, $date); - echo ''; - - echo ' '; - echo __awp('Edit'); - echo ''; - - $class = 'hide_if_js '; - } else - $class = ''; - - echo '
    '; - - ScoperAdminBulkLib::touch_time( $edit, $for_post, $tab_index, $multi, $id_prefix, $suppress_hidden_inputs, $suppress_current_inputs, $use_js, $empty_month_option ); - - echo '
    '; - } - - // from WP 2.8.4 core, add id_prefix argument - function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0, $id_prefix = '', $suppress_hidden_inputs = false, $suppress_current_inputs = false, $use_js = true, $empty_month_option = false ) { - global $wp_locale, $post, $comment; - - if ( $for_post ) { - if ( empty($post) ) { - $edit = true; - $current_post_date = 0; - } else { - $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true; - $current_post_date = $post->post_date; - } - } else { - $edit = true; - $current_comment_date = ( empty($comment) ) ? 0 : $comment->comment_date; - } - - $tab_index_attribute = ''; - if ( (int) $tab_index > 0 ) - $tab_index_attribute = " tabindex='$tab_index'"; - - // echo '
    '; - - if ( ! empty($_POST) ) { - $jj = ( ! empty( $_POST[$id_prefix . 'jj'] ) ) ? $_POST[$id_prefix . 'jj'] : ''; - $mm = ( ! empty( $_POST[$id_prefix . 'mm'] ) ) ? $_POST[$id_prefix . 'mm'] : ''; - $aa = ( ! empty( $_POST[$id_prefix . 'aa'] ) ) ? $_POST[$id_prefix . 'aa'] : ''; - $hh = ( ! empty( $_POST[$id_prefix . 'hh'] ) ) ? $_POST[$id_prefix . 'hh'] : ''; - $mn = ( ! empty( $_POST[$id_prefix . 'mn'] ) ) ? $_POST[$id_prefix . 'mn'] : ''; - $ss = ( ! empty( $_POST[$id_prefix . 'ss'] ) ) ? $_POST[$id_prefix . 'ss'] : ''; - - } else { - $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); - - $post_date = ($for_post) ? $current_post_date : $current_comment_date; - - $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj ); - $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj ); - $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj ); - $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj ); - $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj ); - $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj ); - } - - if ( ! $suppress_current_inputs ) { - $cur_jj = gmdate( 'd', $time_adj ); - $cur_mm = gmdate( 'm', $time_adj ); - $cur_aa = gmdate( 'Y', $time_adj ); - $cur_hh = gmdate( 'H', $time_adj ); - $cur_mn = gmdate( 'i', $time_adj ); - } - - - $month = "'; - - $day = ''; - $year = ''; - $hour = ''; - $minute = ''; - /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */ - printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); - - echo ''; - - if ( $multi ) return; - - echo "\n\n"; - foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { - if ( ! $suppress_hidden_inputs ) - echo '' . "\n"; - - if ( ! $suppress_current_inputs ) { - $cur_timeunit = 'cur_' . $timeunit; - echo '' . "\n"; - } - } - - ?> -

    - - - - - - - -   /> -

    - 2035 ) - $aa = 2035; - - if ( ( $aa > 99 ) && ( $aa < 1902 ) ) - $aa = '1902'; - - $aa = ($aa <= 0 ) ? date('Y') : $aa; - $mm = ($mm <= 0 ) ? date('n') : $mm; - $jj = ($jj > 31 ) ? 31 : $jj; - $jj = ($jj <= 0 ) ? date('j') : $jj; - $hh = ($hh > 23 ) ? $hh -24 : $hh; - $mn = ($mn > 59 ) ? $mn -60 : $mn; - $ss = ($ss > 59 ) ? $ss -60 : $ss; - - $return[$key] = get_gmt_from_date( sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ) ); - - if ( ! $return[$key] ) - $return[$key] = '0'; - } - - return (object) $return; - } - - - function date_limits_js() { - $ajax_url = site_url( 'wp-admin/admin-ajax.php' ); -?> - -' + - $( '#' + pfx + 'mm option[value=' + $('#' + pfx + 'mm').val() + ']' ).text() + ' ' + - $('#' + pfx + 'jj').val() + ', ' + - $('#' + pfx + 'aa').val() + ' @ ' + - $('#' + pfx + 'hh').val() + ':' + - $('#' + pfx + 'mn').val() + ' ' - ); - } else - $('#' + pfx + 'timestamp').html(''); - } - function editDateLimit_rs( pfx ) { - if ($('#' + pfx + 'timestampdiv').is(":hidden")) { - $('#' + pfx + 'timestampdiv').slideDown("normal"); - $('.' + pfx + 'edit-timestamp').hide(); - } - } - function setDateLimit_rs( pfx ) { - $('#' + pfx + 'timestampdiv').slideUp("normal"); - $('.' + pfx + 'edit-timestamp').show(); - - updateDateLimit_rs( pfx ); - } - $('.rs_role_edit-timestamp').click(function () { - id = this.id; - pos = id.indexOf( 'edit-timestamp' ); - pfx = id.substr( 0, pos ); - - editDateLimit_rs( pfx ); - return false; - }); - $('.rs_role_cancel-timestamp').click(function() { - id = this.id; - pos = id.indexOf( 'cancel-timestamp' ); - pfx = id.substr( 0, pos ); - - $('#' + pfx + 'timestampdiv').slideUp("normal"); - clearDateEdit_rs( pfx ); - $('.' + pfx + 'edit-timestamp').show(); - updateDateLimit_rs( pfx ); - - return false; - }); - $('.rs_role_save-timestamp').click(function () { - id = this.id; - pos = id.indexOf( 'save-timestamp' ); - pfx = id.substr( 0, pos ); - - setDateLimit_rs( pfx ); - return false; - }); -*/ - - } // end function date_limits_js - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin_lib-mu_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin_lib-mu_rs.php deleted file mode 100644 index 9b27711..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin_lib-mu_rs.php +++ /dev/null @@ -1,49 +0,0 @@ -get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A ); - - foreach ( (array) $blogs as $details ) { - $blog_list[ $details['blog_id'] ] = $details; - $blog_list[ $details['blog_id'] ]['postcount'] = $wpdb->get_var( "SELECT COUNT(ID) FROM " . $wpdb->base_prefix . $details['blog_id'] . "_posts WHERE post_status='publish' AND post_type='post'" ); - } - unset( $blogs ); - $blogs = $blog_list; - - if( false == is_array( $blogs ) ) - return array(); - - if( $num == 'all' ) - return array_slice( $blogs, $start, count( $blogs ) ); - else - return array_slice( $blogs, $start, $num ); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin_lib_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin_lib_rs.php deleted file mode 100644 index d452b33..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin_lib_rs.php +++ /dev/null @@ -1,478 +0,0 @@ -user2role2object_rs WHERE scope = 'blog' AND role_type = '$role_type' AND role_name = '$role_name'"); - else { - $query = "SELECT r.user_id as ID, u.display_name FROM $wpdb->user2role2object_rs AS r " - . " INNER JOIN $wpdb->users AS u ON r.user_id = u.ID" - . " WHERE r.scope = 'blog' AND r.role_type = '$role_type' AND r.role_name = '$role_name'"; - - $results = scoper_get_results($query); - } - - return $results; - } - - function get_group_members($group_id, $cols = COLS_ALL_RS, $maybe_metagroup = false) { - global $wpdb; - - if ( ! is_array($group_id) ) { - $cache_flag = 'group_members'; - $cache_id = $group_id; - $cache = wpp_cache_get($cache_id, $cache_flag); - $ckey = md5( serialize($cols) . $maybe_metagroup ); - - if ( isset($cache[$ckey]) ) - return $cache[$ckey]; - } - - $group_in = "'" . implode("', '", (array) $group_id) . "'"; - - if ( COL_ID_RS == $cols ) { - $query = "SELECT gu.$wpdb->user2group_uid_col - FROM $wpdb->user2group_rs gu - WHERE gu.$wpdb->user2group_gid_col IN ($group_in)"; - - if ( ! $results = scoper_get_col( $query ) ) - $results = array(); - - } else { - $qcols = ( COLS_ID_DISPLAYNAME_RS == $cols ) ? "u.ID, u.display_name" : "u.*"; - - $query = "SELECT $qcols FROM $wpdb->users AS u" - . " INNER JOIN $wpdb->user2group_rs AS gu ON gu.$wpdb->user2group_uid_col = u.ID " - . " AND gu.{$wpdb->user2group_gid_col} IN ($group_in) ORDER BY u.display_name"; - - $results = scoper_get_results( $query ); - } - - if ( ! $results && $maybe_metagroup ) { - $meta_id = scoper_get_var("SELECT group_meta_id FROM $wpdb->groups_rs WHERE $wpdb->groups_id_col IN ($group_in)"); - if ( 0 === strpos($meta_id, 'wp_role_') ) { - $role_name = substr($meta_id, 8); - $results = ScoperAdminLib::get_blogrole_users($role_name, 'wp', $cols); - } - } - - if ( ! is_array($group_id) ) { - $cache[ $ckey ] = $results; - wpp_cache_set($cache_id, $cache, $cache_flag); - } - - return $results; - } - - - /** - * Creates a new Group - * - * @param string $name - Name of the group - * @param string $description - Group description (optional) - * @return boolean True on successful creation - **/ - function create_group ($name, $description = ''){ - require_once( 'groups-support.php' ); - return UserGroups_tp::CreateGroup($name, $description); - } - - - /** - * Gets a group with a given identifier - * - * @param int $id - Group Identifier - * @return Object An object with the group details - **/ - function get_group($group_id) { - global $wpdb; - - $query = "SELECT $wpdb->groups_id_col AS ID, $wpdb->groups_name_col AS display_name, $wpdb->groups_descript_col as descript, $wpdb->groups_meta_id_col as meta_id" - . " FROM $wpdb->groups_rs WHERE $wpdb->groups_id_col='$group_id'"; - - $results = scoper_get_results( $query ); - if(isset($results) && isset($results[0])) - return $results[0]; - } - - - /** - * Gets a group with a given name - * - * @param string $name - Group Name - * @return Object An object with the group details - **/ - function get_group_by_name($name) { - global $wpdb; - - $query = "SELECT $wpdb->groups_id_col AS ID, $wpdb->groups_name_col AS display_name, $wpdb->groups_descript_col as descript " - . " FROM $wpdb->groups_rs WHERE $wpdb->groups_name_col='$name'"; - - $result = scoper_get_row( $query ); - return $result; - } - - - // (adapted from WP-Group-Restriction plugin) - // returns all groups, or all groups the current user can manage - function get_all_groups( $filtering = UNFILTERED_RS, $cols = COLS_ALL_RS, $include_norole_groups = false ) { - if ( $filtering && is_user_administrator_rs() ) - $filtering = 0; - - if ( $filtering ) { - $cache_flag = 'usergroups'; - - global $current_user; - $cache = $current_user->cache_get($cache_flag); - - } else { - $cache_flag = 'all_usergroups'; - $cache_id = 'all'; - $cache = wpp_cache_get($cache_id, $cache_flag); - } - - $ckey = md5( serialize($cols) ); - - if ( ! isset($cache[$ckey]) ) { - global $wpdb, $current_user; - - if ( $filtering && ! is_user_administrator_rs() ) { - $duration_clause = scoper_get_duration_clause(); - - $join = "INNER JOIN $wpdb->user2role2object_rs AS uro" - . " ON uro.obj_or_term_id = {$wpdb->groups_rs}.{$wpdb->groups_id_col}" - . " AND uro.src_or_tx_name = 'group' AND uro.scope = 'object' $duration_clause"; - - $where = "WHERE uro.user_id = $current_user->ID"; - } else { - $join = ''; - $where = ''; - } - - if ( COL_ID_RS == $cols ) - $query = "SELECT DISTINCT $wpdb->groups_id_col FROM $wpdb->groups_rs $join $where"; - else - $query = "SELECT DISTINCT $wpdb->groups_id_col AS ID, $wpdb->groups_name_col AS display_name, $wpdb->groups_descript_col as descript, $wpdb->groups_meta_id_col as meta_id" - . " FROM $wpdb->groups_rs $join $where ORDER BY $wpdb->groups_name_col"; - - if ( COL_ID_RS == $cols ) - $cache[$ckey] = scoper_get_col($query); - else - $cache[$ckey] = scoper_get_results($query); - } - - if ( $filtering ) - $current_user->cache_set($cache, $cache_flag); - else - wpp_cache_set($cache_id, $cache, $cache_flag); - - - // strip out anon metagroup if we're not using it (have to do this after cache storage / retrieval) - if ( ! defined( 'SCOPER_ANON_METAGROUP' ) ) { - foreach ( array_keys($cache[$ckey]) as $key ) { - if ( 'wp_anon' == $cache[$ckey][$key]->meta_id ) { - unset( $cache[$ckey][$key] ); - break; - } - } - } - - // strip out groups that don't use roles, unless arg asked for them - if ( ! $include_norole_groups ) { - foreach ( array_keys($cache[$ckey]) as $key ) { - if ( strpos( $cache[$ckey][$key]->meta_id, '_nr_' ) ) { - unset( $cache[$ckey][$key] ); - } - } - } - - if ( ! $cache[$ckey] ) - $cache[$ckey] = array(); - - return $cache[$ckey]; - } - - function get_metagroup_name( $meta_id, $default_name = '' ) { - global $wp_roles; - - if ( 0 === strpos( $meta_id, 'wp_role_' ) ) { - $role_name = substr($meta_id, strlen('wp_role_') ); - $role_display_name = isset( $wp_roles->role_names[$role_name] ) ? __($wp_roles->role_names[$role_name]) : $role_name; - - //return sprintf( _ x('[WP %s]', 'Readers/Contributors/Editors, etc.', 'scoper'), $role_display_name ); - return sprintf( __('[WP %s]', 'scoper'), $role_display_name ); - - } elseif ( 'wp_anon' == $meta_id ) { - return __('[Anonymous]', 'scoper'); - } else { - return $default_name; - } - } - - function get_metagroup_descript( $meta_id, $default_descript = '' ) { - if ( 0 === strpos( $meta_id, 'wp_role_' ) ) { - $role_display_name = ScoperAdminLib::get_metagroup_name( $meta_id ); - $role_display_name = str_replace('[WP ', '', $role_display_name); - $role_display_name = str_replace(']', '', $role_display_name); - return sprintf( __( 'All users with the WordPress role of %s', 'scoper'), $role_display_name ); - - } elseif ( 'wp_anon' == $meta_id ) { - return __('Anonymous users (not logged in)', 'scoper'); - } else { - return $default_descript; - } - } - - function flush_user_cache( $user_ids ) { - if ( ! is_array($user_ids) ) - $user_ids = array($user_ids); - - scoper_flush_results_cache( ROLE_BASIS_USER, $user_ids ); - scoper_flush_roles_cache( OBJECT_SCOPE_RS, ROLE_BASIS_USER, $user_ids); - scoper_flush_roles_cache( TERM_SCOPE_RS, ROLE_BASIS_USER, $user_ids); - scoper_flush_roles_cache( BLOG_SCOPE_RS, ROLE_BASIS_USER, $user_ids); - } - - function flush_groups_cache_for_user( $user_ids ) { - if ( ! is_array($user_ids) ) - $user_ids = array($user_ids); - - wpp_cache_flush_group( 'group_members' ); - //wpp_cache_flush_group( 'group_membership_for_user' ); - - foreach ( $user_ids as $user_id ) { - //rs_errlog( "calling wpp_cache_delete from user $user_id group_memb" ); - wpp_cache_delete($user_id, 'group_membership_user'); - } - - scoper_flush_results_cache( ROLE_BASIS_USER_AND_GROUPS, $user_ids ); - scoper_flush_roles_cache( OBJECT_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $user_ids); - scoper_flush_roles_cache( TERM_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $user_ids); - scoper_flush_roles_cache( BLOG_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $user_ids); - } - - /** - * Adds a user to a group (adapted from WP-Group-Restriction plugin) - * @param int $groupID - Group Identifier - * @param int $userID - Identifier of the User to add - **/ - function add_group_user($group_id, $user_ids){ - global $wpdb; - - if ( ! is_array($user_ids) ) - $user_ids = array($user_ids); - - foreach( $user_ids as $user_id ) { - if ( $already_member = $wpdb->get_col( "SELECT $wpdb->user2group_uid_col FROM $wpdb->user2group_rs WHERE $wpdb->user2group_gid_col = '$group_id' AND $wpdb->user2group_uid_col = '$user_id'" ) ) - continue; - - //rs_errlog( "adding user to group $group_id" ); - - $insert = "INSERT INTO $wpdb->user2group_rs ($wpdb->user2group_gid_col, $wpdb->user2group_uid_col)" - . " VALUES ('$group_id','$user_id');"; - - scoper_query( $insert ); - - do_action('add_group_user_rs', $group_id, $user_id); - } - - ScoperAdminLib::flush_groups_cache_for_user( $user_ids ); - } - - /** - * Removes a User from a group (adapted from WP-Group-Restriction plugin) - * - * @param int $group_id - Group Identifier - * @param int $user_id - Identifier of the User to remove - **/ - function remove_group_user($group_id, $user_ids) { - global $wpdb; - - if ( ! is_array($user_ids) ) - $user_ids = array($user_ids); - - $id_in = "'" . implode("', '", $user_ids) . "'"; - $delete = "DELETE FROM $wpdb->user2group_rs WHERE $wpdb->user2group_gid_col='$group_id' AND $wpdb->user2group_uid_col IN ($id_in)"; - scoper_query( $delete ); - - foreach( $user_ids as $user_id ) - do_action('delete_group_user_rs', $group_id, $user_id); - - ScoperAdminLib::flush_groups_cache_for_user( $user_ids ); - } - - /** - * Removes a User from all groups (adapted from WP-Group-Restriction plugin) - * - * @param int $user - User Identifier - **/ - function delete_user_from_groups($user_id){ - global $wpdb; - - // possible todo: pre-query user groups so we can do_action delete_group_user_rs - - $delete = "DELETE FROM $wpdb->user2group_rs WHERE $wpdb->user2group_uid_col='$user_id';"; - scoper_query( $delete ); - - ScoperAdminLib::flush_groups_cache_for_user( $user_id ); - } - - function delete_users( $user_ids, $blog_id_arg = 0 ) { - global $wpdb; - - if ( ! $user_ids ) - return; - - if ( $user_ids && ( ! is_array($user_ids) ) ) - $user_ids = array($user_ids); - - $user_clause = "user_id IN ('" . implode("', '", $user_ids) . "')"; - - $table_name = ( $blog_id_arg ) ? $wpdb->base_prefix . $blog_id_arg . '_' . 'user2role2object_rs' : $wpdb->user2role2object_rs; - - scoper_query("DELETE FROM $table_name WHERE $user_clause"); - - foreach ( $user_ids as $user_id ) { - ScoperAdminLib::delete_user_from_groups($user_id); - ScoperAdminLib::flush_user_cache( $user_id ); - } - } - - function clear_roles( $scope, $src_or_tx_name, $obj_or_term_id, $args = '' ) { - $defaults = array ( 'inherited_only' => false, 'clear_propagated' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb; - - if ( ! $obj_or_term_id ) - return; - - $inherited_clause = ( $inherited_only ) ? "AND inherited_from > 0" : ''; - - $qry = "SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = '$scope' AND src_or_tx_name = '$src_or_tx_name' $inherited_clause AND obj_or_term_id = '$obj_or_term_id'"; - $assignment_ids = scoper_get_col( $qry ); - - if ( $assignment_ids ) { - $qry = "DELETE FROM $wpdb->user2role2object_rs WHERE assignment_id IN ('" . implode( "', '", $assignment_ids) . "')"; - - if ( $clear_propagated ) - $qry .= " OR inherited_from IN ('" . implode( "', '", $assignment_ids) . "') "; - - scoper_query( $qry ); - } - } - - function clear_restrictions ( $scope, $src_or_tx_name, $obj_or_term_id, $args = '' ) { - $defaults = array ( 'inherited_only' => false, 'clear_propagated' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb; - - $inherited_clause = ( $inherited_only ) ? "AND inherited_from > 0" : ''; - - $qry = "SELECT requirement_id FROM $wpdb->role_scope_rs WHERE topic = '$scope' AND src_or_tx_name = '$src_or_tx_name' $inherited_clause AND obj_or_term_id = '$obj_or_term_id'"; - $req_ids = scoper_get_col( $qry ); - - if ( $req_ids ) { - $qry = "DELETE FROM $wpdb->role_scope_rs WHERE requirement_id IN ('" . implode( "', '", $req_ids) . "')"; - - if ( $clear_propagated ) - $qry .= " OR inherited_from IN ('" . implode( "', '", $req_ids) . "') "; - - scoper_query( $qry ); - } - } - - function any_custom_caps_assigned() { - global $wpdb; - - $got_any = scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = 'blog' AND role_type = 'wp_cap' LIMIT 1"); - return ( $got_any ); - } - - // this function is currently RoleManager-specific - function rename_role($role_name_old, $role_type = 'rs') { - $role_name_new = $_POST['role-name']; - if ( ! $role_name_old ) - return; - - global $wpdb; - scoper_query("UPDATE $wpdb->user2role2object_rs SET role_name = '$role_name_new' WHERE role_type = '$role_type' AND role_name = '$role_name_old'"); - - ScoperAdminLib::schedule_role_sync(); // sync_wp_roles() will also flush cache on role rename - } - - function sync_wproles( $user_ids = '', $role_name = '', $blog_id_arg = '' ) { - require_once('update_rs.php'); - scoper_sync_wproles( $user_ids, $role_name, $blog_id_arg ); - } // end sync_wproles function - - // simplifies attaching this function to hook which pass irrelevant argument - function sync_all_wproles() { - ScoperAdminLib::sync_wproles(); - } // end sync_wproles function - - function schedule_role_sync() { - // Role Manager / Capability Manager don't actually create the role until after the option update we're hooking on, so defer our maintenance operation - add_action( 'shutdown', array('ScoperAdminLib', 'sync_all_wproles') ); - } - - function agent_ids_from_csv( $csv_id, $role_basis ) { - static $groups_by_name; - - if ( ( ROLE_BASIS_GROUPS == $role_basis ) && ( ! empty($_POST[$csv_id]) ) ) { - if ( ! isset($groups_by_name) ) { - $all_groups = ScoperAdminLib::get_all_groups(); - $groups_by_name = array(); - foreach ( $all_groups as $group ) - $groups_by_name[$group->display_name] = $group->ID; - } - } - - $agent_ids = array(); - - if ( ! empty($_POST[$csv_id]) ) { - $agent_names = explode(",", $_POST[$csv_id]); - - // role assignments for item - foreach ( $agent_names as $agent_name ) { - if ( empty($agent_name) ) continue; else $agent_name = trim($agent_name); - - if ( ROLE_BASIS_GROUPS == $role_basis ) { - if ( isset($groups_by_name[$agent_name]) ) - $agent_ids [] = $groups_by_name[$agent_name]; - elseif ( intval($agent_name) && in_array( $agent_name, $groups_by_name ) ) - $agent_ids [] = $agent_name; - } else { - require_once( 'user_lib_rs.php' ); - - if ( $user = awp_get_user_by_name( $agent_name ) ) - $agent_ids [] = $user->ID; - elseif ( intval($agent_name) && awp_get_user_by_id( $agent_name ) ) - $agent_ids [] = $agent_name; - } - } - } - - return $agent_ids; - } -} // end ScoperAdmin class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin_rs.php deleted file mode 100644 index 360b7c1..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin_rs.php +++ /dev/null @@ -1,751 +0,0 @@ -= 2.8 - include_once( 'ozh_helper_rs.php' ); - } - } - - if ( ( strpos($_SERVER['SCRIPT_NAME'], 'p-admin/categories.php') || ( isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'p-admin/categories.php') ) ) && awp_is_plugin_active('subscribe2') ) - require_once('subscribe2_helper_rs.php'); - - if ( defined( 'FLUTTER_NAME' ) ) - require_once('flutter_helper_rs.php'); - } - - // adds an Options link next to Deactivate, Edit in Plugins listing - function flt_plugin_action_links($links, $file) { - if ( $file == SCOPER_BASENAME ) { - if ( awp_ver('2.8') ) - $links[] = "" . __awp('Support Forum') . ""; - - $page = ( IS_MU_RS ) ? 'rs-site_options' : 'rs-options'; - $links[] = "" . __awp('Options') . ""; - } - - return $links; - } - - function admin_head_base() { - if ( isset( $_POST['rs_defaults'] ) ) { - // User asked to restore default options, so restore htaccess rule for attachment filtering (if it's not disabled) - scoper_flush_site_rules(); - scoper_expire_file_rules(); - } - } - - function admin_head() { - global $scoper; - - echo ''."\n"; - - if ( false !== strpos(urldecode($_SERVER['REQUEST_URI']), 'page=rs-options') ) { - if ( scoper_get_option('version_update_notice') ) { - require_once('misc/version_notice_rs.php'); - scoper_new_version_notice(); - } - - } elseif ( false !== strpos(urldecode($_SERVER['REQUEST_URI']), 'admin.php?page=rs-about') ) { - echo ''."\n"; - } - - // dynamically set checkbox titles for user/group object role selection - if ( isset($_GET['src_name']) && isset($_GET['object_type']) ) { - $src_name = $_GET['src_name']; - $object_type = $_GET['object_type']; - $src = $scoper->data_sources->get($src_name); - $otype_def = $scoper->data_sources->member_property($src_name, 'object_types', $object_type); - } else { - $context = $this->get_context(); - if ( ! empty($context->source) && ! empty($context->object_type_def) ) { - $src = $context->source; - $otype_def = $context->object_type_def; - } - } - - if ( ! empty($src) && ! empty($src->cols->parent) && ! empty($otype_def->ignore_object_hierarchy) ) { - $obj_title = sprintf( __('assign role for this %s', 'scoper'), strtolower($otype_def->display_name) ); - $child_title = sprintf( __('assign role for sub-%s', 'scoper'), strtolower($otype_def->display_name_plural) ); - - $js_params = "var role_for_object_title = '$obj_title';" - . "var role_for_children_title = '$child_title';"; - - // TODO: replace some of this JS with equivalent JQuery - echo "\n" . ''; - echo "\n" . ""; - } - - add_filter( 'contextual_help_list', array(&$this, 'flt_contextual_help_list'), 10, 2 ); - - if( false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'admin.php?page=rs-' ) - && false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'roles' ) ) { - - // add Ajax goodies we need for role duration/content date limit editing Bulk Role Admin - wp_print_scripts( array( 'page' ) ); - - require_once( 'admin_lib-bulk_rs.php' ); - ScoperAdminBulkLib::date_limits_js(); - } - - // TODO: replace some of this JS with equivalent JQuery - echo "\n" . ""; - echo "\n" . ""; - } - - function flt_contextual_help_list ($help, $screen) { - $link_section = ''; - - // WP < 3.0 passes ID as string - if ( is_object($screen) ) - $screen = $screen->id; - - if ( strpos( $screen, 'rs-' ) ) { - $match = array(); - if ( ! preg_match( "/admin_page_rs-[^@]*-*/", $screen, $match ) ) - if ( ! preg_match( "/_page_rs-[^@]*-*/", $screen, $match ) ) - preg_match( "/rs-[^@]*-*/", $screen, $match ); - - if ( $match ) - if ( $pos = strpos( $match[0], 'rs-' ) ) { - $link_section = substr( $match[0], $pos + strlen('rs-') ); - $link_section = str_replace( '_t', '', $link_section ); - } - - } elseif ( ('post' == $screen) || ('page' == $screen) ) { - $link_section = $screen; - } - - if ( $link_section ) { - $link_section = str_replace( '.php', '', $link_section); - $link_section = str_replace( '/', '~', $link_section); - - if ( ! isset($help[$screen]) ) - $help[$screen] = ''; - - $help[$screen] .= ' ' . sprintf(__('%1$s Role Scoper Documentation%2$s', 'scoper'), "", '') - . ', ' . sprintf(__('%1$s Role Scoper Support Forum%2$s', 'scoper'), "", ''); - } - - return $help; - } - - function build_menu() { - if ( ! defined('USER_ROLES_RS') && isset( $_POST['role_type'] ) ) - scoper_use_posted_init_options(); - - $uri = $_SERVER['SCRIPT_NAME']; - $path = SCOPER_ABSPATH; - - global $scoper, $current_user; - - $is_option_administrator = is_option_administrator_rs(); - $is_user_administrator = is_user_administrator_rs(); - $is_content_administrator = is_content_administrator_rs(); - - /* - // optional hack to prevent roles / restrictions menu for non-Administrators - // - // This is now handled as a Role Scoper Option. - // In Roles > Options > Features > Content Maintenance, set "Roles and Restrictions can be set" to "Administrators only" - // - // To prevent Role Scoper from filtering the backend at all, go to Roles > Options > Realm > Access Types and deselect "editing and administering content" - // - // end optional hack - */ - - $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only'); - - if ( ! $is_content_administrator && ( 'admin_content' == $require_blogwide_editor ) ) - if ( ! $is_option_administrator ) - return; - - if ( ! $is_user_administrator && ( 'admin' == $require_blogwide_editor ) ) - if ( ! $is_option_administrator ) - return; - - $can_admin_objects = array(); - $can_admin_terms = array(); - - // which object types does this user have any administration over? - foreach ( $scoper->data_sources->get_all() as $src_name => $src ) { - if ( ! empty($src->no_object_roles) || ! empty($src->taxonomy_only) || ('group' == $src_name) ) - continue; - - $object_types = ( isset($src->object_types) ) ? $src->object_types : array( $src_name => true ); - - foreach ( array_keys($object_types) as $object_type ) { - if ( is_administrator_rs($src, 'user') || $this->user_can_admin_object($src_name, $object_type, 0, true) ) - if ( scoper_get_otype_option('use_object_roles', "$src_name:$object_type") ) - $can_admin_objects[$src_name][$object_type] = true; - } - } - - // which taxonomies does this user have any administration over? - foreach ( $scoper->taxonomies->get_all() as $taxonomy => $tx ) { - if ( is_administrator_rs($tx->source, 'user') || $this->user_can_admin_terms($taxonomy) ) - if ( scoper_get_otype_option('use_term_roles', $tx->object_source->name) ) { - $can_admin_terms[$taxonomy] = true; - } - } - - /* - global $_wp_menu_nopriv; - if ( ! empty($can_admin_objects['post']['post']) || ! empty($can_admin_terms['category']) ) - if ( isset($_wp_menu_nopriv['edit.php']) ) - unset($_wp_menu_nopriv['edit.php']); - - if ( ! empty($can_admin_objects['post']['page']) ) - if ( isset($_wp_menu_nopriv['edit-pages.php']) ) - unset($_wp_menu_nopriv['edit-pages.php']); - - dump($_wp_menu_nopriv); - */ - - $can_manage_groups = DEFINE_GROUPS_RS && ( $is_user_administrator || current_user_can('manage_groups') ); - - // Users Tab - if ( DEFINE_GROUPS_RS && $can_manage_groups ) { - $cap_req = ( $can_manage_groups ) ? 'read' : 'manage_groups'; - - if ( IS_MU_RS && scoper_get_site_option( 'mu_sitewide_groups' ) ) { - add_submenu_page( 'wpmu-admin.php', __('Role Groups', 'scoper'), __('Role Groups', 'scoper'), $cap_req, 'rs-groups' ); - - $func = "include_once('$path' . '/admin/groups.php');"; - add_action('wpmu-admin_page_rs-groups' , create_function( '', $func ) ); - } else { - add_submenu_page( 'users.php', __('Role Groups', 'scoper'), __('Role Groups', 'scoper'), $cap_req, 'rs-groups' ); - - $func = "include_once('$path' . '/admin/groups.php');"; - add_action( 'users_page_rs-groups' , create_function( '', $func ) ); - add_action( 'profile_page_rs-groups' , create_function( '', $func ) ); - } - - // satisfy WordPress' demand that all admin links be properly defined in menu - if ( false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'page=rs-default_groups' ) ) { - add_submenu_page('users.php', __('User Groups', 'scoper'), __('Default Groups', 'scoper'), $cap_req, 'rs-default_groups'); - - $func = "include_once('$path' . '/admin/default_groups.php');"; - add_action( 'users_page_rs-default_groups' , create_function( '', $func ) ); - } - - if ( false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'page=rs-group_members' ) ) { - add_submenu_page('users.php', __('User Groups', 'scoper'), __('Group Members', 'scoper'), $cap_req, 'rs-group_members'); - - $func = "include_once('$path' . '/admin/group_members.php');"; - add_action( 'users_page_rs-group_members' , create_function( '', $func ) ); - } - } - - // the rest of this function pertains to Roles and Restrictions menus - if ( ! $is_user_administrator && ! $can_admin_terms && ! $is_user_administrator && ! $can_admin_objects ) - return; - - $general_roles = ('rs' == SCOPER_ROLE_TYPE) && $is_user_administrator; // && scoper_get_option('rs_blog_roles'); // rs_blog_roles option has never been active in any RS release; leave commented here in case need arises - - // determine the official WP-registered URL for roles and restrictions menus - $object_submenus_first = false; - - if ( ! empty($can_admin_terms['category']) ) { - $roles_menu = 'rs-category-roles_t'; - $restrictions_menu = 'rs-category-restrictions_t'; - - } elseif ( ! empty($can_admin_objects['post']['post']) ) { - $roles_menu = 'rs-post-roles'; - $restrictions_menu = 'rs-post-restrictions'; - $object_submenus_first = true; - - } elseif ( ! empty($can_admin_objects['post']['page']) ) { - $roles_menu = 'rs-page-roles'; - $restrictions_menu = 'rs-page-restrictions'; - $object_submenus_first = true; - - } elseif ( $can_admin_terms ) { - $taxonomy = key($can_admin_terms); - $roles_menu = "rs-$taxonomy-roles_t"; - $restrictions_menu = "rs-$taxonomy-restrictions_t"; - - } elseif ( $can_admin_objects ) { - $src_name = key($can_admin_objects); - $object_type = key($can_admin_objects[$src_name]); - - if ( ( $src_name != $object_type ) && ( 'post' != $src_name ) ) { - $roles_menu = "rs-{$object_type}-roles_{$src_name}"; - $restrictions_menu = "rs-{$object_type}-restrictions_{$src_name}"; - } else { - $roles_menu = "rs-$object_type-roles"; - $restrictions_menu = "rs-$object_type-restrictions"; - } - - $object_submenus_first = true; - } else { - // shouldn't ever need this - $roles_menu = 'rs-roles-post'; - $restrictions_menu = 'rs-restrictions-post'; - $object_submenus_first = true; - } - - if ( $general_roles ) - $roles_menu = 'rs-general_roles'; - - - if ( $is_user_administrator ) { - $roles_menu = 'rs-options'; // user administrators always have RS Options as top level roles submenu - - if ( empty( $restrictions_menu ) ) - $restrictions_menu = 'rs-category-restrictions_t'; // If RS Realms are customized, the can_admin_terms / can_admin_objects result can override this default, even for user administrators - } - - - // For convenience in WP 2.5 - 2.6, set the primary menu link (i.e. default submenu) based on current URI - // When viewing Category Roles, make Restriction menu default-link to Category Restrictions submenu (and likewise for other terms/objects) - // (ozh plugin breaks this, and it is not needed in 2.7+ due to core JS dropdown) - if ( ! awp_ver('2.7-dev') && ! awp_is_plugin_active('wp_ozh_adminmenu.php') ) { - require_once( 'admin-legacy_rs.php' ); - scoper_set_legacy_menu_links( $roles_menu, $restrictions_menu, $uri, $can_admin_terms, $can_admin_objects ); - } - - // Register the menus with WP using URI and links determined above - global $menu; - $tweak_menu = false; // don't mess with menu order unless we know we can get away with it in current WP version - - // Manually set menu indexes for positioning below Users menu, - // but not if Flutter (a.k.a. Fresh Page) plugin is active. It re-indexes menu items - if ( ! defined( 'SCOPER_DISABLE_MENU_TWEAK' ) ) { - if ( awp_ver('2.8-dev') ) { - if ( ! awp_ver('3.0') ) { // review and increment this with each WP version until there's a clean way to force menu proximity to 'Users' - if ( isset( $menu[70] ) && $menu[70][2] == 'users.php' ) { - $tweak_menu = true; - $restrictions_menu_key = 71; - $roles_menu_key = 72; - } - } - } elseif ( awp_ver('2.7-dev') && empty($menu[51]) && empty($menu[52]) ) { - if ( isset( $menu[50] ) && $menu[50][2] == 'users.php' ) { - $tweak_menu = true; - $restrictions_menu_key = 51; - $roles_menu_key = 52; - } - } elseif ( empty($menu[37]) && empty($menu[38]) && empty($menu[39]) ) { - $tweak_menu = true; - $restrictions_menu_key = 38; - $roles_menu_key = 39; - - $menu[37] = $menu[40]; //move Users menu so we can put Roles, Restrictions after it - unset($menu[40]); - } - } - - $roles_cap = 'read'; // we apply other checks within this function to confirm the menu is valid for current user - $restrictions_caption = __('Restrictions', 'scoper'); - $roles_caption = __('Roles', 'scoper'); - - if ( $tweak_menu ) { - $roles_hook_page = 'admin_page_'; - $restrictions_hook_page = 'admin_page_'; - - // note: as of WP 2.7-near-beta, custom content dir for menu icon is not supported - $menu[$restrictions_menu_key] = array( '0' => $restrictions_caption, 'read', $restrictions_menu, __('Role Restrictions', 'scoper'), 'menu-top' ); - $menu[$restrictions_menu_key][6] = SCOPER_URLPATH . '/admin/images/menu/restrictions.png'; - - $menu[$roles_menu_key] = array( '0' => $roles_caption, $roles_cap, $roles_menu, __('Role Scoper Options', 'scoper'), 'menu-top' ); - $menu[$roles_menu_key][6] = SCOPER_URLPATH . '/admin/images/menu/roles.png'; - - global $_registered_pages; - $_registered_pages["admin_page_$roles_menu"] = true; - $_registered_pages["admin_page_$restrictions_menu"] = true; - } else { - add_menu_page($restrictions_caption, __('Restrictions', 'scoper'), 'read', $restrictions_menu, '', SCOPER_URLPATH . '/admin/images/menu/restrictions.png' ); - add_menu_page($roles_caption, __('Roles', 'scoper'), $roles_cap, $roles_menu, '', SCOPER_URLPATH . '/admin/images/menu/roles.png'); - - $roles_hook_page_base = sanitize_title( __('Roles', 'scoper') ) . '_page_'; // the page hook names use translated menu title - $roles_hook_page = $roles_hook_page_base; - $restrictions_hook_page_base = sanitize_title( __('Restrictions', 'scoper') ) . '_page_'; - } - - - if ( $is_option_administrator ) { - $func = "include_once('$path' . '/admin/options.php');scoper_options( false );"; - $hook_page = ( $tweak_menu ) ? $roles_hook_page : 'toplevel_page_'; - add_action($hook_page . 'rs-options' , create_function( '', $func ) ); - } - - - if ( $general_roles ) { - add_submenu_page($roles_menu, __('General Roles', 'scoper'), __('General', 'scoper'), 'read', 'rs-general_roles'); - - $func = "include_once('$path' . '/admin/general_roles.php');"; - add_action($roles_hook_page . 'rs-general_roles', create_function( '', $func ) ); - } - - $first_pass = true; - - $submenu_types = ( $object_submenus_first ) ? array( 'object', 'term' ) : array( 'term', 'object' ); - foreach ( $submenu_types as $scope ) { - if ( 'term' == $scope ) { - // Term Roles and Restrictions (will only display objects user can edit) - if ( $can_admin_terms ) { - // Will only allow assignment to terms for which current user has admin cap - // Term Roles page also prevents assignment or removal of roles current user doesn't have - foreach ( $scoper->taxonomies->get_all() as $taxonomy => $tx ) { - - if ( empty($can_admin_terms[$taxonomy]) ) - continue; - - if ( $require_blogwide_editor ) { - global $current_user; - if ( empty( $current_user->allcaps['edit_others_posts'] ) && empty( $current_user->allcaps['edit_others_pages'] ) && empty( $current_user->allcaps['manage_categories'] ) ) - continue; - } - - $show_roles_menu = true; - - // deal with WP hook naming quirk for non-tweaked plugin menus - if ( ! $tweak_menu ) { - if ( $first_pass ) { - $roles_hook_page = ( $is_user_administrator || $general_roles ) ? $roles_hook_page_base : 'toplevel_page_'; // otherwise Options / General are the toplevel submenu - $restrictions_hook_page = 'toplevel_page_'; - } else { - $roles_hook_page = $roles_hook_page_base; - $restrictions_hook_page = $restrictions_hook_page_base; - } - - $first_pass = false; - } - - add_submenu_page($roles_menu, sprintf(__('%s Roles', 'scoper'), $tx->display_name), $tx->display_name_plural, 'read', "rs-$taxonomy-roles_t"); - - $func = "include_once('$path' . '/admin/section_roles.php');scoper_admin_section_roles('$taxonomy');"; - add_action($roles_hook_page . "rs-$taxonomy-roles_t", create_function( '', $func ) ); - - if ( ! awp_ver('2.6') ) - add_action("_page_" . "rs-$taxonomy-roles_t", create_function( '', $func ) ); - - - if ( ! empty($tx->requires_term) ) { - $show_restrictions_menu = true; - - add_submenu_page($restrictions_menu, sprintf(__('%s restrictions', 'scoper'), $tx->display_name), $tx->display_name_plural, 'read', "rs-$taxonomy-restrictions_t"); - - $func = "include_once('$path' . '/admin/section_restrictions.php');scoper_admin_section_restrictions('$taxonomy');"; - add_action($restrictions_hook_page . "rs-$taxonomy-restrictions_t", create_function( '', $func ) ); - - if ( ! awp_ver('2.6') ) - add_action("_page_" . "rs-$taxonomy-restrictions_t", create_function( '', $func ) ); - } - } // end foreach taxonomy - } // endif can admin terms - - } else { - // Object Roles (will only display objects user can edit) - if ( $can_admin_objects ) { - foreach ( $scoper->data_sources->get_all() as $src_name => $src ) { - if ( ! empty($src->no_object_roles) || ! empty($src->taxonomy_only) || ('group' == $src_name) ) - continue; - - $object_types = ( isset($src->object_types) ) ? $src->object_types : array( $src_name => true ); - - foreach ( array_keys($object_types) as $object_type ) { - if ( empty($can_admin_objects[$src_name][$object_type]) ) - continue; - - if ( $require_blogwide_editor ) { - $required_cap = ( 'page' == $object_type ) ? 'edit_others_pages' : 'edit_others_posts'; - - global $current_user; - if ( empty( $current_user->allcaps[$required_cap] ) ) - continue; - } - - $show_roles_menu = true; - $show_restrictions_menu = true; - - // deal with WP hook naming quirk for non-tweaked plugin menus - if ( ! $tweak_menu ) { - if ( $first_pass ) { - $roles_hook_page = ( $is_user_administrator || $general_roles ) ? $roles_hook_page_base : 'toplevel_page_'; // otherwise Options / General are the toplevel submenu - $restrictions_hook_page = 'toplevel_page_'; - } else { - $roles_hook_page = $roles_hook_page_base; - $restrictions_hook_page = $restrictions_hook_page_base; - } - - $first_pass = false; - } - - if ( ( $src_name != $object_type ) && ( 'post' != $src_name ) ) { - $roles_page = "rs-{$object_type}-roles_{$src_name}"; - $restrictions_page = "rs-{$object_type}-restrictions_{$src_name}"; - } else { - $roles_page = "rs-$object_type-roles"; - $restrictions_page = "rs-$object_type-restrictions"; - } - - $src_otype = ( isset($src->object_types) ) ? "{$src_name}:{$object_type}" : $src_name; - $display_name = $this->interpret_src_otype($src_otype, false); - $display_name_plural = $this->interpret_src_otype($src_otype, true); - - add_submenu_page($roles_menu, sprintf(__('%s Roles', 'scoper'), $display_name), $display_name_plural, 'read', $roles_page); - - $func = "include_once('$path' . '/admin/object_roles.php');scoper_admin_object_roles('$src_name', '$object_type');"; - add_action($roles_hook_page . $roles_page, create_function( '', $func ) ); - - if ( ! awp_ver('2.6') ) - add_action("_page_" . $roles_page, create_function( '', $func ) ); - - - add_submenu_page($restrictions_menu, sprintf(__('%s Restrictions', 'scoper'), $display_name), $display_name_plural, 'read', $restrictions_page); - - $func = "include_once('$path' . '/admin/object_restrictions.php');scoper_admin_object_restrictions('$src_name', '$object_type');"; - add_action($restrictions_hook_page . $restrictions_page, create_function( '', $func ) ); - - if ( ! awp_ver('2.6') ) - add_action("_page_" . $restrictions_page, create_function( '', $func ) ); - } // end foreach obj type - } // end foreach data source - } // endif can admin objects - } // endif drawing object scope submenus - } // end foreach submenu scope - - if ( $is_user_administrator ) { - add_submenu_page($roles_menu, __('About Role Scoper', 'scoper'), __('About', 'scoper'), 'read', 'rs-about'); - - $func = "include_once('$path' . '/admin/about.php');"; - add_action( $roles_hook_page . 'rs-about' , create_function( '', $func ) ); - } - - - global $submenu; - - // Change Role Scoper Options submenu title from default "Roles" to "Options" - if ( $is_option_administrator ) { - if ( isset($submenu[$roles_menu][0][2]) && ( $roles_menu == $submenu[$roles_menu][0][2] ) ) - $submenu[$roles_menu][0][0] = __awp('Options'); - - // satisfy WordPress' demand that all admin links be properly defined in menu - if ( false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'rs-attachments_utility' ) ) { - add_submenu_page($roles_menu, __('Attachment Utility', 'scoper'), __('Attachment Utility', 'scoper'), 'read', 'rs-attachments_utility'); - - $func = "include_once('$path' . '/admin/attachments_utility.php');"; - add_action( 'admin_page_rs-attachments_utility' , create_function( '', $func ) ); - } - } elseif ( empty($show_restrictions_menu) || empty($show_roles_menu) ) { - // Remove Roles or Restrictions menu if it has no submenu - if ( $tweak_menu ) { - if ( empty($show_restrictions_menu) && isset($menu[$restrictions_menu_key]) ) - unset($menu[$restrictions_menu_key]); - - if ( empty($show_roles_menu) && isset($menu[$roles_menu_key]) ) - unset($menu[$roles_menu_key]); - - } else { - global $menu; - foreach ( array_keys($menu) as $key ) { - if ( isset( $menu[$key][0]) ) - if ( empty($show_roles_menu) && ( $roles_caption == $menu[$key][0] ) ) - unset($menu[$key]); - elseif ( empty($show_restrictions_menu) && ( $restrictions_caption == $menu[$key][0] ) ) - unset($menu[$key]); - } - } - } - - - // workaround for WP 2.7's universal inclusion of "Add New" in Posts, Pages menu - if ( awp_ver('2.7') ) { - if ( isset($submenu['edit-pages.php']) ) { - foreach ( $submenu['edit-pages.php'] as $key => $arr ) { - if ( isset($arr['2']) && ( 'page-new.php' == $arr['2'] ) ) { - $scoper->cap_interceptor->skip_id_generation = true; - $scoper->cap_interceptor->skip_any_object_check = true; - - if ( ! current_user_can('edit_pages') ) - unset( $submenu['edit-pages.php'][$key]); - - $scoper->cap_interceptor->skip_id_generation = false; - $scoper->cap_interceptor->skip_any_object_check = false; - } - } - } - - if ( isset($submenu['edit.php']) ) { - foreach ( $submenu['edit.php'] as $key => $arr ) { - if ( isset($arr['2']) && ( 'post-new.php' == $arr['2'] ) ) { - $scoper->cap_interceptor->skip_id_generation = true; - $scoper->cap_interceptor->skip_any_object_check = true; - - if ( ! current_user_can('edit_posts') ) - unset( $submenu['edit.php'][$key]); - - $scoper->cap_interceptor->skip_id_generation = false; - $scoper->cap_interceptor->skip_any_object_check = false; - } - } - } - } - - - // WP MU site options - if ( $is_option_administrator && IS_MU_RS ) - scoper_mu_site_menu(); - - - // satisfy WordPress' demand that all admin links be properly defined in menu - if ( false !== strpos( urldecode($_SERVER['REQUEST_URI']), 'page=object_role_edit' ) ) { - add_submenu_page($roles_menu, __('Object Role Edit', 'scoper'), __('Object Role Edit', 'scoper'), 'read', 'rs-object_role_edit'); - - $func = "include_once('$path' . '/admin/object_role_edit.php');"; - add_action( 'admin_page_rs-object_role_edit' , create_function( '', $func ) ); - } - } - - - function interpret_src_otype($src_otype, $use_plural_display_name = true) { - global $scoper; - - if ( ! $arr_src_otype = explode(':', $src_otype) ) - return $display_name; - - $display_name_prop = ( $use_plural_display_name ) ? 'display_name_plural' : 'display_name'; - - if ( isset( $arr_src_otype[1]) ) - $display_name = $scoper->data_sources->member_property($arr_src_otype[0], 'object_types', $arr_src_otype[1], $display_name_prop); - else - $display_name = $scoper->data_sources->member_property($arr_src_otype[0], $display_name_prop); - - if ( ! $display_name ) // in case of data sources definition error, cryptic fallback better than nullstring - $display_name = $src_otype; - - return $display_name; - } - - function user_can_admin_role($role_handle, $item_id, $src_name = '', $object_type = '', $user = '' ) { - if ( is_user_administrator_rs() ) - return true; - - require_once( 'permission_lib_rs.php' ); - return user_can_admin_role_rs($role_handle, $item_id, $src_name, $object_type, $user ); - } - - function user_can_admin_object($src_name, $object_type, $object_id = false, $any_obj_role_check = false, $user = '' ) { - if ( is_content_administrator_rs() ) - return true; - - require_once( 'permission_lib_rs.php' ); - return user_can_admin_object_rs($src_name, $object_type, $object_id, $any_obj_role_check, $user ); - } - - function user_can_admin_terms($taxonomy = '', $term_id = '', $user = '') { - if ( is_user_administrator_rs() ) - return true; - - require_once( 'permission_lib_rs.php' ); - return user_can_admin_terms_rs($taxonomy, $term_id, $user); - } - - - function user_can_edit_blogwide( $src_name = '', $object_type = '', $args = '' ) { - if ( is_administrator_rs($src_name) ) - return true; - - require_once( 'permission_lib_rs.php' ); - return user_can_edit_blogwide_rs($src_name, $object_type, $args); - } - - // primary use is to account for different contexts of users query - function get_context($src_name = '', $reqd_caps_only = false) { - global $scoper; - - $full_uri = urldecode($_SERVER['REQUEST_URI']); - $matched = array(); - - foreach ( $scoper->data_sources->get_all_keys() as $_src_name ) { - if ( $src_name) - $_src_name = $src_name; // if a src_name arg was passed in, short-circuit the loop - - if ( $arr = $scoper->data_sources->member_property($_src_name, 'users_where_reqd_caps', CURRENT_ACCESS_NAME_RS) ) { - - foreach ( $arr as $uri_sub => $reqd_caps ) { // if no uri substrings match, use default (nullstring key), but only if data source was passed in - if ( ( $uri_sub && strpos($full_uri, $uri_sub) ) - || ( $src_name && ! $uri_sub && ! $matched ) ) { - $matched['reqd_caps'] = $reqd_caps; - - if ( ! $reqd_caps_only ) - $matched['source'] = $scoper->data_sources->get($_src_name); - - if ( $uri_sub) break; - } - } - } - - if ( $matched || $src_name) // if a src_name arg was passed in, short-circuit the loop - break; - } // data sources loop - - if ( $matched && ! $reqd_caps_only ) { - if ( isset($matched['source']->object_types) ) { - // if this data source has more than one object type defined, - // use the reqd_caps to determine object type for this context - if ( count($matched['source']->object_types) > 1 ) { - $src_otypes = $scoper->cap_defs->object_types_from_caps($matched['reqd_caps']); - if ( isset($src_otypes[$_src_name]) && (count($src_otypes[$_src_name]) == 1) ) { - reset($src_otypes[$_src_name]); - $matched['object_type_def'] = $matched['source']->object_types[ key($src_otypes[$_src_name]) ]; - } - } else - $matched['object_type_def'] = reset( $matched['source']->object_types ); - } - } - - return (object) $matched; - } - -} // end class ScoperAdmin -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/admin_ui_lib_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin_ui_lib_rs.php deleted file mode 100644 index 5543dc6..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/admin_ui_lib_rs.php +++ /dev/null @@ -1,734 +0,0 @@ - $agent_name ) - // $sorted_roles[$agent_id] = $roles[$agent_id]; - foreach( $roles as $agent_id => $val ) { - if ( $limitation_type = $val['date_limited'] + ( 2 * $val['content_date_limited'] ) ) - $date_limits[ $agent_id ] = $val; - - if ( is_array($val) && ! empty($val['inherited_from']) ) - $role_propagated[$agent_id] = true; - - if ( is_array($val) && ( 'both' == $val['assign_for'] ) ) - $agent_grouping[$limitation_type][ASSIGN_FOR_BOTH_RS] [$agent_id]= $agent_names[$agent_id]; - - elseif ( is_array($val) && ( 'children' == $val['assign_for'] ) ) - $agent_grouping[$limitation_type][ASSIGN_FOR_CHILDREN_RS] [$agent_id]= $agent_names[$agent_id]; - - else - $agent_grouping[$limitation_type][ASSIGN_FOR_ENTITY_RS] [$agent_id]= $agent_names[$agent_id]; - } - - - // display for_entity assignments first, then for_both, then for_children - $assign_for_order = array( 'entity', 'both', 'children'); - - $use_agents_csv = scoper_get_option("{$role_basis}_role_assignment_csv"); - - foreach ( array_keys($agent_grouping) as $limitation_type ) { - - foreach ( $assign_for_order as $assign_for ) { - if ( ! isset($agent_grouping[$limitation_type][$assign_for]) ) - continue; - - // sort each assign_for grouping alphabetically - uasort($agent_grouping[$limitation_type][$assign_for], 'strnatcasecmp'); - - foreach ( $agent_grouping[$limitation_type][$assign_for] as $agent_id => $agent_name ) { - // surround rolename with bars to indicated it was inherited - $pfx = ( isset($role_propagated[$agent_id]) ) ? '{' : ''; - $sfx = ''; - - if ( $checkbox_base_id ) { - if ( $use_agents_csv ) - $js_call = "agp_append('{$role_basis}_csv', ', $agent_name');"; - else - $js_call = "agp_check_it('{$checkbox_base_id}{$agent_id}');"; - - $link_end = " href='javascript:void(0)' onclick=\"$js_call\">"; - $sfx = ''; - } - - // surround rolename with braces to indicated it was inherited - if ( $pfx ) - $sfx .= '}'; - - $limit_class = ''; - $limit_style = ''; - $link_class = 'rs-link_plain'; - $title_text = ''; - - if ( $limitation_type ) { - ScoperAdminUI::set_agent_formatting( $date_limits[$agent_id], $title_text, $limit_class, $link_class, $limit_style ); - $title = "title='$title_text'"; - } else - $title = "title='select'"; - - switch ( $assign_for ) { - case ASSIGN_FOR_BOTH_RS: - //roles which are assigned for entity and children will be bolded in list - $link = ( $link_end ) ? "" . $link . $agent_names[$agent_id] . $sfx . ''; - - break; - case ASSIGN_FOR_ENTITY_RS: - $link = ( $link_end ) ? "'; - } // end foreach assign_for - - $agent_list[$limitation_type] = implode(', ', $agent_list[$limitation_type]); - } - - if ( $agent_list ) - return implode(', ', $agent_list); - } - - - function set_agent_formatting( $date_limits, &$title, &$limit_class, &$link_class, &$limit_style, $title_wrap = true ) { - - static $current_gmt, $default_gmt_time, $gmt_seconds, $datef_no_time, $datef_time; - static $starts_caption, $started_caption, $expired_caption, $expires_caption, $content_range_caption, $content_min_caption, $content_max_caption; - - if ( ! isset( $current_gmt ) ) { - $current_gmt = agp_time_gmt(); - $gmt_offset = get_option( 'gmt_offset' ); - $gmt_seconds = $gmt_offset * 3600; - - $default_gmt_hour = - intval( $gmt_offset ); - if ( $default_gmt_hour < 0 ) - $default_gmt_hour = 24 + $default_gmt_hour; - - $default_gmt_time = "{$default_gmt_hour}:00"; // comparison string to determine whether date limit entry has a non-default time value - if ( $gmt_offset < 10 ) - $default_gmt_time = '0' . $default_gmt_time; - - $datef_no_time = __awp( 'M j, Y' ); - $datef_time = __awp( 'M j, Y G:i' ); - - $starts_caption = __( 'TO START on %s', 'scoper' ); - $started_caption = __( 'started on %s', 'scoper' ); - $expired_caption = __( 'EXPIRED on %s', 'scoper' ); - $expires_caption = __( 'expire on %s', 'scoper' ); - - $content_range_caption = __( '(for content %1$s to %2$s)', 'scoper' ); - $content_min_caption = __( '(for content after %1$s)', 'scoper' ); - $content_max_caption = __( '(for content before %1$s)', 'scoper' ); - } - - $title_captions = array(); - $content_title_caption = ''; - - if ( ! empty($date_limits['date_limited']) ) { - if ( $date_limits['start_date_gmt'] != SCOPER_MIN_DATE_STRING ) { - $limit_class .= ' rs-has_start'; - - $start_date_gmt = strtotime( $date_limits['start_date_gmt'] ); - $datef = ( strpos( $date_limits['start_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; - - if ( $start_date_gmt > $current_gmt ) { - //$limit_class .= ' rs-future'; - $limit_style = 'style="background-color: #cfc" '; - $title_captions []= sprintf( $starts_caption, agp_date_i18n( $datef, $start_date_gmt + $gmt_seconds ) ); - } else - $title_captions []= sprintf( $started_caption, agp_date_i18n( $datef, $start_date_gmt + $gmt_seconds ) ); - } - - if ( $date_limits['end_date_gmt'] != SCOPER_MAX_DATE_STRING ) { - $limit_class .= ' rs-has_end'; - - $end_date_gmt = strtotime( $date_limits['end_date_gmt'] ); - $datef = ( strpos( $date_limits['end_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; - - if ( strtotime( $date_limits['end_date_gmt'] ) < $current_gmt ) { - //$limit_class .= ' rs-expired'; - $limit_style = 'style="background-color: #fcc" '; - $title_captions []= sprintf( $expired_caption, agp_date_i18n( $datef, $end_date_gmt + $gmt_seconds ) ); - } else - $title_captions []= sprintf( $expires_caption, agp_date_i18n( $datef, $end_date_gmt + $gmt_seconds ) ); - } - } - - if ( ! empty($date_limits['content_date_limited']) ) { - if ( $date_limits['content_min_date_gmt'] != SCOPER_MIN_DATE_STRING ) { - $limit_class .= ' rs-has_cmin'; - $link_class = 'rs-custom_link'; - - $content_min_date_gmt = strtotime( $date_limits['content_min_date_gmt'] ); - $datef_min = ( strpos( $date_limits['content_min_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; - } - - if ( $date_limits['content_max_date_gmt'] != SCOPER_MAX_DATE_STRING ) { - $limit_class .= ' rs-has_cmax'; - - $content_max_date_gmt = strtotime( $date_limits['content_max_date_gmt'] ); - $datef_max = ( strpos( $date_limits['content_max_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; - - if ( $date_limits['content_min_date_gmt'] != SCOPER_MIN_DATE_STRING ) { - $content_title_caption = sprintf( $content_range_caption, agp_date_i18n( $datef_min, $content_min_date_gmt + $gmt_seconds ), agp_date_i18n( $datef_max, $content_max_date_gmt + $gmt_seconds ) ); - } else - $content_title_caption = sprintf( $content_max_caption, agp_date_i18n( $datef_max, $content_max_date_gmt + $gmt_seconds ) ); - } else - $content_title_caption = sprintf( $content_min_caption, agp_date_i18n( $datef_min, $content_min_date_gmt + $gmt_seconds ) ); - } - - $title = implode(", ", $title_captions) . ' ' . $content_title_caption; - } - - - function restriction_captions( $scope, $tx = '', $display_name = '', $display_name_plural = '') { - $table_captions = array(); - - if ( TERM_SCOPE_RS == $scope ) { - if ( ! $display_name_plural ) - $display_name_plural = ( 'link_category' == $tx->name ) ? strtolower( $this->scoper->taxonomies->member_property('category', 'display_name_plural') ) : strtolower($tx->display_name_plural); - if ( ! $display_name ) - $display_name = ( 'link_category' == $tx->name ) ? strtolower( $this->scoper->taxonomies->member_property('category', 'display_name') ) : strtolower($tx->display_name); - } - - $table_captions = array(); - $table_captions['restrictions'] = array( // captions for roles which are NOT default strict - ASSIGN_FOR_ENTITY_RS => sprintf(__('Restricted for %s', 'scoper'), $display_name), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('Unrestricted for %1$s, Restricted for sub-%2$s', 'scoper'), $display_name, $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('Restricted for selected and sub-%s', 'scoper'), $display_name_plural), - false => sprintf(__('Unrestricted by default', 'scoper'), $display_name), - 'default' => sprintf(__('Unrestricted', 'scoper'), $display_name) - ); - $table_captions['unrestrictions'] = array( // captions for roles which are default strict - ASSIGN_FOR_ENTITY_RS => sprintf(__('Unrestricted for %s', 'scoper'), $display_name), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('Unrestricted for sub-%s', 'scoper'), $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('Unrestricted for selected and sub-%s', 'scoper'), $display_name_plural), - false => sprintf(__('Restricted by default', 'scoper'), $display_name), - 'default' => sprintf(__('Restricted', 'scoper'), $display_name) - ); - - return $table_captions; - } - - function role_owners_key($tx_or_otype, $args = '') { - $defaults = array( 'display_links' => true, 'display_restriction_key' => true, 'restriction_caption' => '', - 'role_basis' => '', 'agent_caption' => '' ); - $args = array_merge( $defaults, (array) $args); - extract($args); - - $display_name_plural = strtolower($tx_or_otype->display_name_plural); - $display_name = strtolower($tx_or_otype->display_name); - - if ( $role_basis ) { - if ( ! $agent_caption && $role_basis ) - $agent_caption = ( ROLE_BASIS_GROUPS == $role_basis ) ? __('Group', 'scoper') : __('User', 'scoper'); - $generic_name = ( ROLE_BASIS_GROUPS == $role_basis ) ? __('Groupname', 'scoper') : __('Username', 'scoper'); - } else - $generic_name = __awp('Name'); - - $agent_caption = strtolower($agent_caption); - - echo '

    ' . __("Users / Groups Key", 'scoper') . ':

      '; - - $link_open = ( $display_links ) ? "" : ''; - $link_close = ( $display_links ) ? '' : ''; - - echo '
    • '; - echo "{$link_open}$generic_name{$link_close}: "; - printf (__('%1$s has role assigned for the specified %2$s.', 'scoper'), $agent_caption, $display_name); - echo '
    • '; - - echo '
    • '; - echo "{$link_open}$generic_name{$link_close}: "; - printf (__('%1$s has role assigned for the specified %2$s and, by default, for all its sub-%3$s. (Propagated roles can also be explicitly removed).', 'scoper'), $agent_caption, $display_name, $display_name_plural); - echo '
    • '; - - echo '
    • '; - echo "{$link_open}$generic_name{$link_close}: "; - printf (__('%1$s does NOT have role assigned for the specified %2$s, but has it by default for sub-%3$s.', 'scoper'), $agent_caption, $display_name, $display_name_plural); - echo '
    • '; - - echo '
    • '; - echo '{' . "{$link_open}$generic_name{$link_close}" . '}: '; - printf (__('%1$s has this role via propagation from parent %2$s, and by default for sub-%3$s.', 'scoper'), $agent_caption, $display_name, $display_name_plural); - echo '
    • '; - - if ( $display_restriction_key ) { - echo '
    • '; - echo "" . __('Role Name', 'scoper') . ": "; - echo "" . sprintf(__('role is restricted for specified %s.', 'scoper'), $display_name) . ""; - echo '
    • '; - } - - echo '
    '; - } - - function taxonomy_scroll_links($tx, $terms, $admin_terms = '') { - if ( empty($terms) || ( is_array($admin_terms) && empty($admin_terms) ) ) - return; - - echo '' . __('Scroll to current settings:','scoper') . '
    '; - - if ( $admin_terms && ! is_array($admin_terms) ) - $admin_terms = ''; - - $col_id = $tx->source->cols->id; - $col_name = $tx->source->cols->name; - $col_parent = $tx->source->cols->parent; - - $font_ems = 1.2; - $text = ''; - $term_num = 0; - - $parent_id = 0; - $last_id = -1; - $last_parent_id = -1; - $parents = array(); - $depth = 0; - - foreach( $terms as $term ) { - $term_id = $term->$col_id; - - if ( isset($term->$col_parent) ) - $parent_id = $term->$col_parent; - - if ( ! $admin_terms || ! empty($admin_terms[$term_id]) ) { - if ( $parent_id != $last_parent_id ) { - if ( ($parent_id == $last_id) && $last_id ) { - $parents[] = $last_id; - $depth++; - } elseif ($depth) { - do { - array_pop($parents); - $depth--; - } while ( $parents && ( end($parents) != $parent_id ) && $depth); - } - - $last_parent_id = $parent_id; - } - - //echo "term {$term->$col_name}: depth $depth, current parents: "; - //dump($parents); - - if ( $term_num ) - $text .= ( $parent_id ) ? ' - ' : ' . '; - - if ( ! $parent_id ) - $depth = 0; - - $color_level_b = ($depth < 4) ? 220 - (60 * $depth) : 0; - $hexb = dechex($color_level_b); - if ( strlen($hexb) < 2 ) - $hexb = "0" . $hexb; - - $color_level_g = ($depth < 4) ? 80 + (40 * $depth) : 215; - $hexg = dechex($color_level_g); - - $font_ems = ($depth < 5) ? 1.2 - (0.12 * $depth) : 0.6; - $text .= "{$term->$col_name}"; - } - - $last_id = $term_id; - $term_num++; - } - - $text .= '
    '; - - return $text; - } - - function common_ui_msg( $msg_id ) { - if ( 'pagecat_plug' == $msg_id ) { - $msg = __('Category Roles for WordPress pages are disabled for this blog. Object Roles can be assigned to individual pages, and optionally propagated to sub-pages.', 'scoper'); - echo '
  • '; - printf( $msg, 'href="admin.php?page=rs-options"'); - - _e('Another option is to categorise pages via the Page Category Plus plugin.', 'scoper'); - - echo '
  • '; - } - } - - // make use of filter provided by WP 2.7 - function flt_dropdown_pages($orig_options_html) { - global $scoper, $post_ID; - - //log_mem_usage_rs( 'start flt_dropdown_pages()' ); - - if ( strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/options-' ) ) - return $orig_options_html; - - if ( empty($post_ID) ) - $object_id = $scoper->data_sources->detect('id', 'post', 0, 'post'); - else - $object_id = $post_ID; - - if ( $object_id ) - $stored_parent_id = $scoper->data_sources->detect('parent', 'post', $object_id); - else - $stored_parent_id = 0; - - //if ( is_content_administrator_rs() ) // WP 2.7 excludes private pages from Administrator's parent dropdown - // return $orig_options_html; - - if ( is_content_administrator_rs() ) { - $can_associate_main = true; - - } elseif ( ! scoper_get_option( 'lock_top_pages' ) ) { - global $current_user; - $reqd_caps = array('edit_others_pages'); - $roles = $scoper->role_defs->qualify_roles($reqd_caps, ''); - - $can_associate_main = array_intersect_key( $roles, $current_user->blog_roles[ANY_CONTENT_DATE_RS] ); - } else - $can_associate_main = false; - - // Generate the filtered page parent options, but only if user can de-associate with main page, or if parent is already non-Main - if ( $can_associate_main || ! $object_id || $stored_parent_id ) { - $options_html = ScoperAdminUI::dropdown_pages($object_id, $stored_parent_id); - } else { - $options_html = ''; - } - - // User can't associate or de-associate a page with Main page unless they have edit_pages blog-wide. - // Prepend the Main Page option if appropriate (or, to avoid submission errors, if we generated no other options) - if ( ( strpos( $orig_options_html, __('Main Page (no parent)') ) || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page.php') || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page-new.php') ) - && ( $can_associate_main || ( $object_id && ! $stored_parent_id ) || empty($options_html) ) ) { - $current = ( $stored_parent_id ) ? '' : ' selected="selected"'; - $option_main = "\t" . '"; - } else - $option_main = ''; - - //return "'; - - //log_mem_usage_rs( 'end flt_dropdown_pages()' ); - - - // can't assume name/id for this dropdown (Quick Edit uses "post_parent") - $mat = array(); - preg_match("/]*)>/", $orig_options_html, $mat); - - // If the select tag was not passed in, don't pass it out - if ( ! empty($mat[1]) ) - return "\n" . $option_main . $options_html . ''; - - // (but if core dropdown_pages passes in a nullstring, we need to insert the missing select tag). TODO: core patch to handle this more cleanly - elseif ( ! $orig_options_html ) - return "'; - - else - return $option_main . $options_html; - } - - function dropdown_pages($object_id = '', $stored_parent_id = '') { - global $scoper, $wpdb; - $args = array(); - - // buffer titles in case they are filtered on get_pages hook - $titles = ScoperAdminUI::get_page_titles(); - - if ( ! is_numeric($object_id) ) { - global $post_ID; - - if ( empty($post_ID) ) - $object_id = $scoper->data_sources->detect('id', 'post', 0, 'post'); - else - $object_id = $post_ID; - } - - if ( $object_id && ! is_numeric($stored_parent_id) ) - $stored_parent_id = $scoper->data_sources->detect('parent', 'post', $object_id); - - // make sure the currently stored parent page remains in dropdown regardless of current user roles - if ( $stored_parent_id ) { - $preserve_or_clause = " $wpdb->posts.ID = '$stored_parent_id' "; - $args['preserve_or_clause'] = array(); - foreach (array_keys( $scoper->data_sources->member_property('post', 'statuses') ) as $status_name ) - $args['preserve_or_clause'][$status_name] = $preserve_or_clause; - } - - // alternate_caps is a 2D array because objects_request / objects_where filter supports multiple alternate sets of qualifying caps - $args['force_reqd_caps']['page'] = array(); - foreach (array_keys( $scoper->data_sources->member_property('post', 'statuses') ) as $status_name ) - $args['force_reqd_caps']['page'][$status_name] = array('edit_others_pages'); - - $args['alternate_reqd_caps'][0] = array('create_child_pages'); - - $all_pages_by_id = array(); - if ( $results = scoper_get_results( "SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_type = 'page'" ) ) - foreach ( $results as $row ) - $all_pages_by_id[$row->ID] = $row; - - // Editable / associable draft and pending pages will be included in Page Parent dropdown in Edit Forms, but not elsewhere - if ( is_admin() && ( false === strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page.php') ) && ( false === strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page-new.php') ) ) - $status_clause = "AND $wpdb->posts.post_status IN ('publish', 'private')"; - else - $status_clause = "AND $wpdb->posts.post_status IN ('publish', 'private', 'pending', 'draft')"; - - $qry_parents = "SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_type = 'page' $status_clause ORDER BY menu_order"; - - $qry_parents = apply_filters('objects_request_rs', $qry_parents, 'post', 'page', $args); - - $filtered_pages_by_id = array(); - if ( $results = scoper_get_results($qry_parents) ) - foreach ( $results as $row ) - $filtered_pages_by_id [$row->ID] = $row; - - $hidden_pages_by_id = array_diff_key( $all_pages_by_id, $filtered_pages_by_id ); - - // temporarily add in the hidden parents so we can order the visible pages by hierarchy - $pages = ScoperAdminUI::add_missing_parents($filtered_pages_by_id, $hidden_pages_by_id, 'post_parent'); - - // convert keys from post ID to title+ID so we can alpha sort them - $args['pages'] = array(); - foreach ( array_keys($pages) as $id ) - $args['pages'][ $pages[$id]->post_title . chr(11) . $id ] = $pages[$id]; - - // natural case alpha sort - uksort($args['pages'], "strnatcasecmp"); - - $args['pages'] = ScoperAdminUI::order_by_hierarchy($args['pages'], 'ID', 'post_parent'); - - // take the hidden parents back out - foreach ( $args['pages'] as $key => $page ) - if ( isset( $hidden_pages_by_id[$page->ID] ) ) - unset( $args['pages'][$key] ); - - $output = ''; - - // restore buffered titles in case they were filtered on get_pages hook - scoper_restore_property_array( $args['pages'], $titles, 'ID', 'post_title' ); - - if ( $object_id ) { - $args['object_id'] = $object_id; - $args['retain_page_ids'] = true; // retain static log to avoid redundant entries by subsequent call with use_parent_clause=false - ScoperAdminUI::walk_parent_dropdown($output, $args, true, $stored_parent_id); - } - - // next we'll add disjointed branches, but don't allow this page's descendants to be offered as a parent - $arr_parent = array(); - $arr_children = array(); - - if ( $results = scoper_get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page' $status_clause") ) { - foreach ( $results as $row ) { - $arr_parent[$row->ID] = $row->post_parent; - - if ( ! isset($arr_children[$row->post_parent]) ) - $arr_children[$row->post_parent] = array(); - - $arr_children[$row->post_parent] []= $row->ID; - } - - $descendants = array(); - if ( ! empty( $arr_children[$object_id] ) ) { - foreach ( $arr_parent as $page_id => $parent_id ) { - if ( ! $parent_id || ($page_id == $object_id) ) - continue; - - do { - if ( $object_id == $parent_id ) { - $descendants[$page_id] = true; - break; - } - - $parent_id = $arr_parent[$parent_id]; - } while ( $parent_id ); - } - } - $args['descendants'] = $descendants; - } - - ScoperAdminUI::walk_parent_dropdown($output, $args, false, $stored_parent_id); - - //log_mem_usage_rs( 'end dropdown_pages()' ); - - return $output; - } - - // slightly modified transplant of WP 2.6 core parent_dropdown - function walk_parent_dropdown( &$output, &$args, $use_parent_clause = true, $default = 0, $parent = 0, $level = 0 ) { - static $use_class; - static $page_ids; - - if ( ! isset($use_class) ) - $use_class = awp_ver('2.7'); - - if ( ! isset( $page_ids ) ) - $page_ids = array(); - - // todo: defaults, merge - //extract($args); - // args keys: pages, object_id - - $page_ids[$parent] = true; - - if ( ! is_array( $args['pages'] ) ) - $args['pages'] = array(); - - if ( empty($args['descendants'] ) || ! is_array( $args['descendants'] ) ) - $args['descendants'] = array(); - - foreach ( array_keys($args['pages']) as $key ) { - // we call this without parent criteria to include pages whose parent is unassociable - if ( $use_parent_clause && $args['pages'][$key]->post_parent != $parent ) - continue; - - $id = $args['pages'][$key]->ID; - - if ( in_array($id, array_keys($args['descendants']) ) ) - continue; - - if ( isset($page_ids[$id]) ) - continue; - - $page_ids[$id] = true; - - // A page cannot be its own parent. - if ( $args['object_id'] && ( $id == $args['object_id'] ) ) - continue; - - $class = ( $use_class ) ? 'class="level-' . $level . '" ' : ''; - - $current = ( $id == $default) ? ' selected="selected"' : ''; - $pad = str_repeat( ' ', $level * 3 ); - $output .= "\n\t'; - - ScoperAdminUI::walk_parent_dropdown( $output, $args, true, $default, $id, $level +1 ); - } - - if ( ! $level && empty($args['retain_page_ids']) ) - $page_ids = array(); - } - - // object_array = db results 2D array - function order_by_hierarchy($object_array, $col_id, $col_parent, $id_key = false) { - $ordered_results = array(); - $find_parent_id = 0; - $last_parent_id = array(); - - do { - $found_match = false; - $lastcount = count($ordered_results); - foreach ( $object_array as $key => $item ) - if ( $item->$col_parent == $find_parent_id ) { - if ( $id_key ) - $ordered_results[$item->$col_id]= $object_array[$key]; - else - $ordered_results[]= $object_array[$key]; - - unset($object_array[$key]); - $last_parent_id[] = $find_parent_id; - $find_parent_id = $item->$col_id; - - $found_match = true; - break; - } - - if ( ! $found_match ) { - if ( ! count($last_parent_id) ) - break; - else - $find_parent_id = array_pop($last_parent_id); - } - } while ( true ); - - return $ordered_results; - } - - // listed_objects[object_id] = object, including at least the parent property - // unlisted_objects[object_id] = object, including at least the parent property - function add_missing_parents($listed_objects, $unlisted_objects, $col_parent) { - $need_obj_ids = array(); - foreach ( $listed_objects as $obj ) - if ( $obj->$col_parent && ! isset($listed_objects[ $obj->$col_parent ]) ) - $need_obj_ids[$obj->$col_parent] = true; - - $last_need = ''; - - while ( $need_obj_ids ) { // potentially query for several generations of object hierarchy (but only for parents of objects that have roles assigned) - if ( $need_obj_ids == $last_need ) - break; //precaution - - $last_need = $need_obj_ids; - - if ( $add_objects = array_intersect_key( $unlisted_objects, $need_obj_ids) ) { - $listed_objects = $listed_objects + $add_objects; // array_merge will not maintain numeric keys - $unlisted_objects = array_diff_key($unlisted_objects, $add_objects); - } - - $new_need = array(); - foreach ( array_keys($need_obj_ids) as $id ) { - if ( ! empty($listed_objects[$id]->$col_parent) ) // does this object itself have a nonzero parent? - $new_need[$listed_objects[$id]->$col_parent] = true; - } - - $need_obj_ids = $new_need; - } - - return $listed_objects; - } - - function get_page_titles() { - global $wpdb; - - $is_administrator = is_content_administrator_rs(); - - if ( ! $is_administrator ) - remove_filter('get_pages', array('ScoperHardway', 'flt_get_pages'), 1, 2); - - // don't retrieve post_content, to save memory - $all_pages = scoper_get_results( "SELECT ID, post_parent, post_title, post_date, post_date_gmt, post_status, post_name, post_modified, post_modified_gmt, guid, menu_order, comment_count FROM $wpdb->posts WHERE post_type = 'page'" ); - - foreach ( array_keys( $all_pages ) as $key ) - $all_pages[$key]->post_content = ''; // add an empty post_content property to each item, in case some plugin filter requires it - - $all_pages = apply_filters( 'get_pages', $all_pages ); - - if ( ! $is_administrator ) - add_filter('get_pages', array('ScoperHardway', 'flt_get_pages'), 1, 2); - - $titles = scoper_get_property_array( $all_pages, 'ID', 'post_title' ); - - unset( $all_pages ); - } - -} // end class ScoperAdminUI -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/agapetry.js b/blog/wp-content/plugins/role-scoper/admin/agapetry.js deleted file mode 100644 index 400e148..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/agapetry.js +++ /dev/null @@ -1,306 +0,0 @@ -function agp_setcss(class_name,set_property,set_display){ - var rule_exists = false; - - num_sheets = document.styleSheets.length; - for (var i = 0; i < num_sheets; i++) { - sheet = document.styleSheets[i]; - if (sheet.rules) { - sheet_length = sheet.rules.length; - for (var r = 0; r < sheet_length; r++) { - if (sheet.rules[r].selectorText == class_name) { - if ( sheet.rules[r].style[set_property] ) { - if ( sheet.rules[r].style[set_property] != set_display ) - sheet.rules[r].style[set_property] = set_display; - rule_exists = true; - } - } - } - } - else if (sheet.cssRules) { - sheet_length = sheet.cssRules.length; - for (var r = 0; r < sheet_length; r++) { - if (sheet.cssRules[r].selectorText == class_name) { - if ( sheet.cssRules[r].style[set_property] ) { - if ( sheet.cssRules[r].style[set_property] != set_display ) - sheet.cssRules[r].style[set_property] = set_display; - rule_exists = true; - } - } - } - } - - /* Rule insertion code by Shawn Olson - http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html */ - if(! rule_exists){if(sheet.insertRule){sheet.insertRule(class_name+" { "+set_property+": "+set_display+"; }",sheet_length)}else{if(sheet.addRule){sheet.addRule(class_name,set_property+": "+set_display+";")}}} - } - - return null; -} - - - -/* addLoadEvent function by Simon Willison -http://www.webreference.com/programming/javascript/onloads/ */ -function agp_addLoadEvent(func) { - var oldonload = window.onload; - if (typeof window.onload != 'function') { - window.onload = func; - } else { - window.onload = function() { - if (oldonload) { - oldonload(); - } - func(); - } - } -} - -addLoadEvent(function() { - //on page load, hide any elements which were marked with a special class name - agp_display_marked_elements('div', 'agp_js_hide', 'none'); - agp_display_marked_elements('div', 'agp_js_show', 'block'); - agp_display_marked_elements('ul', 'agp_js_hide', 'none'); - agp_display_marked_elements('ul', 'agp_js_show', 'block'); - agp_display_marked_elements('li', 'agp_js_hide', 'none'); - agp_display_marked_elements('li', 'agp_js_show', 'block'); -}); - -function agp_display_marked_elements(tag_name, class_name, display_mode) { - var elems = document.getElementsByTagName(tag_name); - - if ( ! elems) - return; - - for (var i=0; i= 0 ) { - listobj.childNodes[i].style.display = "block"; - } else { - listobj.childNodes[i].style.display = "none"; - } - } - } - - if ( listobj.parentNode.parentNode.style.display == "none" ) - listobj.parentNode.parentNode.style.display = "block"; - - var checkboxobj = document.getElementById(checkbox_id); - if ( checkboxobj ) - checkboxobj.checked = 'checked'; - - if ( links_id ) { - var links_obj = document.getElementById(links_id); - if ( links_obj ) - links_obj.style.display = "block"; - } -} - -function agp_display_child_nodes( parent_id, child_tag_name, display ) { - var parent_obj = document.getElementById(parent_id); - - for ( var i in parent_obj.childNodes ) { - if ( parent_obj.childNodes[i].tagName == child_tag_name ) - parent_obj.childNodes[i].style.display = display; - } -} - -/* note: default config if no num_parent_nodes arg: checkbox contained in label, li, and ul -*/ -function agp_check_by_name(elem_name, check_it, visibility_check, click_event, required_container_id, num_parent_nodes) { - var elems = document.getElementsByTagName('input'); - - if ( ! elems ) - return; - - if ( ! num_parent_nodes ) - var num_parent_nodes = 3; - - var checkbox_val = ( check_it ) ? 'checked' : ''; - - var parent_node; - var first_pass = true; - - for (var i=0; i< elems.length; i++) { - if ( (elems[i].type == "checkbox") && (elems[i].name == elem_name) ) { - parent_node = elems[i].parentNode; - - if ( num_parent_nodes > 1 ) { - for ( var j = 1; i < num_parent_nodes; j++ ) { - if ( ! parent_node.parentNode ) - break; - - parent_node = parent_node.parentNode; - } - } - - if ( required_container_id ) { - if ( parent_node.parentNode.id != required_container_id ) - continue; - } - - if ( visibility_check ) { - if ( parent_node.style.display == "none" ) - continue; - } - - if ( first_pass && visibility_check ) { - first_pass = false; - - if ( parent_node.parentNode.style.display == "none" || parent_node.parentNode.parentNode.style.display == "none" || parent_node.parentNode.parentNode.parentNode.style.display == "none" ) - break; - } - - if ( checkbox_val && click_event ) { - elems[i].checked = ''; - elems[i].click(); - } else { - elems[i].checked = checkbox_val; - } - } - } -} - -function agp_check_it(foo, check_it) { - if ( '' == check_it ) - check_it = true; - - var checkbox_val = ( check_it ) ? 'checked' : ''; - - var fie = document.getElementById(foo); - if (fie) - fie.checked = 'checked'; -} - -function agp_append(foo, val) { - var fie = document.getElementById(foo); - if (fie) - fie.value = fie.value + val; -} - -function agp_uncheck(all_ids_str, keep_checked_id, skip_if_id, skip_if_val) { - if ( ! skip_if_id ) - skip_if_id = 'assign_for'; - - if ( ! skip_if_val ) - skip_if_val = ''; - - var skipper_obj = document.getElementById(skip_if_id); - - if ( skipper_obj && (skipper_obj.value == skip_if_val) ) - return; - - var all_ids = all_ids_str.split(','); - var obj; - - for ( var i = 0; i < all_ids.length; i++ ) { - if ( all_ids[i] != keep_checked_id ) { - obj = document.getElementById(all_ids[i]); - if ( obj ) - obj.checked = ''; - } - } -} - -function rs_uncheck_others(all_ids_str, keep_checked_id, skip_if_id, skip_if_val) { - agp_uncheck(all_ids_str, keep_checked_id, skip_if_id, skip_if_val); -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/agents_checklist_rs.php b/blog/wp-content/plugins/role-scoper/admin/agents_checklist_rs.php deleted file mode 100644 index cfcab58..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/agents_checklist_rs.php +++ /dev/null @@ -1,503 +0,0 @@ -", ''); - //else - // $edit_groups_link = sprintf(_ x('Note: To assign roles to user groups, first %1$s define the group(s)%2$s.', 'Args are link open, close tags', 'scoper'), "", ''); - - if ( in_array(ROLE_BASIS_GROUPS, $role_bases) && $agents[ROLE_BASIS_GROUPS] ) - $edit_groups_link = sprintf(__('%1$s define user groups%2$s', 'scoper'), "", ''); - else - $edit_groups_link = sprintf(__('Note: To assign roles to user groups, first %1$s define the group(s)%2$s.', 'scoper'), "", ''); - - - foreach ( $role_bases as $role_basis ) { - echo "
    "; - ScoperAgentsChecklist::agents_checklist($role_basis, $agents[$role_basis], $role_basis, array(), $args); - - if ( ROLE_BASIS_GROUPS == $role_basis ) - echo $edit_groups_link; - - echo "
    "; - } - - if ( ! in_array(ROLE_BASIS_GROUPS, $role_bases) ) - echo "
    $edit_groups_link
    "; - } - - function agents_checklist( $role_basis, $all_agents, $id_prefix = '', $stored_assignments = '', $args = '') { - if ( empty($all_agents) && ! scoper_get_option("{$role_basis}_role_assignment_csv" ) ) - return; - - $key = array(); - $action_links = array(); - - global $is_IE; - - // list current selections on top first - if ( $stored_assignments ) { - ScoperAgentsChecklist::_agents_checklist_display( CURRENT_ITEMS_RS, $role_basis, $all_agents, $id_prefix, $stored_assignments, $args, $key, $action_links); - if ( $is_IE ) - echo '

     

    '; - } - - ScoperAgentsChecklist::_agents_checklist_display( ELIGIBLE_ITEMS_RS, $role_basis, $all_agents, $id_prefix, $stored_assignments, $args, $key, $action_links); - if ( $is_IE ) - echo '
     
    '; - - echo '
     
    '; - - if ( $action_links ) { - echo "
    "; - echo( sprintf( __('Actions: %s', 'scoper'), implode('   ', $action_links) ) ); - echo '
    '; - } - - if ( $key ) { - if ( empty($args['suppress_extra_prefix']) ) - $id_prefix .= "_{$role_basis}"; - - echo "
    "; - //echo( _ x('Key:', 'explanation of user/group role symbolic prefix/suffix', 'scoper') ); - echo( __('Key:', 'scoper') ); - echo '

    '; - echo ( implode('   ', $key) ); - echo '

    '; - } - } - - function eligible_agents_input_box( $role_basis, $id_prefix, $propagation ) { - $id = "{$id_prefix}_csv"; - $msg = ( ROLE_BASIS_GROUPS == $role_basis ) ? __( "Enter additional Group Names or IDs (comma-separate)", 'scoper') : __( "Enter additional User Names or IDs (comma-separate)", 'scoper'); - echo '
    ' . $msg . ':
    '; - echo ""; - - if ( $propagation ) { - echo '
    '; - $msg = ( ROLE_BASIS_GROUPS == $role_basis ) ? __( "Enter additional Group Names or IDs for Subpages", 'scoper') : __( "Enter additional User Names or IDs for Subpages", 'scoper'); - echo '
    ' . $msg . ':
    '; - echo ""; - } - } - - // stored_assignments[agent_id][inherited_from] = progenitor_assignment_id (note: this function treats progenitor_assignment_id as a boolean) - function _agents_checklist_display( $agents_subset, $role_basis, $all_agents, $id_prefix, $stored_assignments, $args, &$key, &$action_links) { - $defaults = array( - 'eligible_ids' => '', 'locked_ids' => '', - 'suppress_extra_prefix' => false, 'check_for_incomplete_submission' => false, - 'checkall_threshold' => 6, 'filter_threshold' => 10, 'default_hide_threshold' => 20, - 'caption_length_limit' => 20, 'emsize_threshold' => 4, - 'objtype_display_name' => '', 'objtype_display_name_plural' => '', - 'propagation' => false, 'for_children_ids' => '', 'for_entity_ids' => '', - 'via_other_scope_ids' => '', 'via_other_scope_prefix' => '/', 'via_other_scope_suffix' => '/', - 'via_other_role_ids' => '', 'via_other_role_prefix' => '(', 'via_other_role_suffix' => ')', - 'via_other_basis_ids' => '', 'via_other_basis_prefix' => "|", 'via_other_basis_suffix' => '|', - 'inherited_prefix' => '{', 'inherited_suffix' => '}' ); - - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $is_IE; - $ie_checkbox_style = ( $is_IE ) ? "style='height:1em'" : ''; - - if ( ( ELIGIBLE_ITEMS_RS == $agents_subset ) && scoper_get_option("{$role_basis}_role_assignment_csv") ) - return ScoperAgentsChecklist::eligible_agents_input_box( $role_basis, $id_prefix, $propagation ); - - if ( is_array($eligible_ids) && empty($eligible_ids) ) - $eligible_ids = array(-1); - else - if ( ! is_array($eligible_ids) ) $eligible_ids = array(); else $eligible_ids = array_flip($eligible_ids); - - if ( ! is_array($stored_assignments) ) $stored_assignments = array(); - if ( ! is_array($locked_ids) ) $locked_ids = array(); else $locked_ids = array_flip($locked_ids); - if ( ! is_array($for_children_ids) ) $for_children_ids = array(); else $for_children_ids = array_flip($for_children_ids); - if ( is_array($for_entity_ids) && ! empty($for_entity_ids) ) $for_entity_ids = array_flip($for_entity_ids); - if ( ! $via_other_scope_ids || ! is_array($via_other_scope_ids) ) $via_other_scope_ids = array(); else $via_other_scope_ids = array_flip($via_other_scope_ids); - if ( ! is_array($via_other_role_ids) ) $via_other_role_ids = array(); else $via_other_role_ids = array_flip($via_other_role_ids); - if ( ! is_array($via_other_basis_ids) ) $via_other_basis_ids = array(); else $via_other_basis_ids = array_flip($via_other_basis_ids); - - if ( ! $suppress_extra_prefix ) - $id_prefix .= "_{$role_basis}"; - - $any_inherited = $any_other_scope = $any_other_role = $any_other_basis = $any_date_limits = false; - $agent_count = array(); - - $agent_count[CURRENT_ITEMS_RS] = count($stored_assignments); - - if ( empty($eligible_ids) ) - $agent_count[ELIGIBLE_ITEMS_RS] = count($all_agents) - count( $stored_assignments ); - elseif ( $eligible_ids != array(-1) ) - $agent_count[ELIGIBLE_ITEMS_RS] = count( array_diff_key($eligible_ids, $stored_assignments) ); - else - $agent_count[ELIGIBLE_ITEMS_RS] = 0; - - $default_hide_filtered_list = ( $default_hide_threshold && ( $agent_count[$agents_subset] > $default_hide_threshold ) ); - - $checked = ( $agents_subset == CURRENT_ITEMS_RS ) ? $checked = "checked='checked'" : ''; - - // determine whether to show caption, show/hide checkbox and filter textbox - $any_display_filtering = ($agent_count[CURRENT_ITEMS_RS] > $filter_threshold) || ($agent_count[ELIGIBLE_ITEMS_RS] > $filter_threshold); - - if ( $agent_count[$agents_subset] > $filter_threshold ) { - if ( ROLE_BASIS_GROUPS == $role_basis ) - $caption = ( CURRENT_ITEMS_RS == $agents_subset ) ? __('show current groups (%d)', 'scoper') : __('show eligible groups (%d)', 'scoper'); - else - $caption = ( CURRENT_ITEMS_RS == $agents_subset ) ? __('show current users (%d)', 'scoper') : __('show eligible users (%d)', 'scoper'); - - $js_call = "agp_display_if('div_{$agents_subset}_{$id_prefix}', this.id);" - . "agp_display_if('chk-links_{$agents_subset}_{$id_prefix}', this.id);"; - - $flt_checked = ( ! $default_hide_filtered_list ) ? "checked='checked'" : ''; - - $ul_class = 'rs-agents-ul'; - - echo "
    • "; // IE6 (at least) does not render label reliably without this - echo " "; - - echo "'; - echo '
    • '; - - $class = ( $default_hide_filtered_list ) ? '' : 'class="agp_js_show"'; - - echo "\r\n" . "
    •   
    • "; - - echo "
    '; - - } else { - $ul_class = ''; - - if ( $agent_count[$agents_subset] ) { - echo "
    • "; - if ( ROLE_BASIS_GROUPS == $role_basis ) - $caption = ( CURRENT_ITEMS_RS == $agents_subset ) ? __('current groups (%d):', 'scoper') : __('eligible groups (%d):', 'scoper'); - else - $caption = ( CURRENT_ITEMS_RS == $agents_subset ) ? __('current users (%d):', 'scoper') : __('eligible users (%d):', 'scoper'); - - printf ("
      $caption
      ", $agent_count[$agents_subset]); - echo '
    '; - } - } - - $title = ''; - if ( $propagation ) { - if ( ! $objtype_display_name ) - $objtype_display_name = __('object', 'scoper'); - - if ( ! $objtype_display_name_plural ) - $objtype_display_name_plural = __('objects', 'scoper'); - } - - if ( $any_display_filtering || $agent_count[$agents_subset] > $emsize_threshold ) { - global $wp_locale; - $rtl = ( isset($wp_locale) && ('rtl' == $wp_locale->text_direction) ); - - // -------- determine required list item width ----------- - if ( $caption_length_limit > 40 ) - $caption_length_limit = 40; - - if ( $caption_length_limit < 10 ) - $caption_length_limit = 10; - - $longest_caption_length = 0; - - foreach( $all_agents as $agent ) { - $id = $agent->ID; - - if ( is_array($for_entity_ids) ) - $role_assigned = isset($for_entity_ids[$id]) || isset($for_children_ids[$id]) ; - else - $role_assigned = isset($stored_assignments[$id]); - - switch ( $agents_subset ) { - case CURRENT_ITEMS_RS: - if ( ! $role_assigned ) continue 2; - break; - default: //ELIGIBLE_ITEMS_RS - if ( $role_assigned ) continue 2; - if ( $eligible_ids && ! isset($eligible_ids[$id] ) ) continue 2; - } - - $caption = ( ( ROLE_BASIS_GROUPS == $role_basis ) && $agent->meta_id ) ? ScoperAdminLib::get_metagroup_name( $agent->meta_id ) : $agent->display_name; - - if ( $role_assigned && ! empty($stored_assignments[$id]['inherited_from']) ) - $caption = $inherited_prefix . $caption . $inherited_suffix; - - elseif ( ! $role_assigned && isset($via_other_basis_ids[$id]) ) - $caption = $via_other_basis_prefix . $caption . $via_other_basis_suffix; - - elseif ( isset($via_other_role_ids[$id]) ) - $caption = $via_other_role_prefix . $caption . $via_other_role_suffix; - - elseif ( isset($via_other_scope_ids[$id]) ) - $caption = $via_other_scope_prefix . $caption . $via_other_scope_suffix; - - if ( strlen($caption) > $longest_caption_length ) { - if ( strlen($caption) >= $caption_length_limit ) - $longest_caption_length = $caption_length_limit + 2; - else - $longest_caption_length = strlen($caption); - } - } - - if ( $longest_caption_length < 10 ) - $longest_caption_length = 10; - - //if ( ! $ems_per_character = scoper_get_option('ems_per_character') ) - if ( defined( 'UI_EMS_PER_CHARACTER') ) - $ems_per_character = UI_EMS_PER_CHARACTER; - else - $ems_per_character = 0.85; - - $list_width_ems = $ems_per_character * $longest_caption_length; - - if ( $propagation ) - $list_width_ems = $list_width_ems + 1.0; - - $ems_integer = intval($list_width_ems); - $ems_half = ( ($list_width_ems - $ems_integer) >= 0.5 ) ? '_5' : ''; - - $ul_class = "rs-agents_list_{$ems_integer}{$ems_half}"; - $hide_class = ( $default_hide_filtered_list && $agent_count[$agents_subset] > $filter_threshold ) ? 'class="agp_js_hide"' : ''; - - echo "\r\n" . "
    " - . "
    " - . "
      "; - } else { - $ul_class = "rs-agents_list_auto"; - echo "\r\n
        "; - } - //-------- end list item width determination -------------- - - $last_agents = array(); - $last_agents_prop = array(); - - foreach( $all_agents as $agent ) { - $id = $agent->ID; - $agent_display_name = ( ( ROLE_BASIS_GROUPS == $role_basis ) && $agent->meta_id ) ? ScoperAdminLib::get_metagroup_name( $agent->meta_id ) : $agent->display_name; - - if ( is_array($for_entity_ids) ) - $role_assigned = isset($for_entity_ids[$id]) || isset($for_children_ids[$id]) ; - else - $role_assigned = isset($stored_assignments[$id]); - - switch ( $agents_subset ) { - case CURRENT_ITEMS_RS: - if ( ! $role_assigned ) continue 2; - break; - default: //ELIGIBLE_ITEMS_RS - if ( $role_assigned ) continue 2; - if ( $eligible_ids && ! isset($eligible_ids[$id] ) ) continue 2; - } - - // markup for role duration / content date limits - $title = ''; // we can't set the title because it's used by JS for onkey filtering - $limit_class = ''; - $link_class = ''; - $limit_style = ''; - - if ( isset( $stored_assignments[$id] ) ) - ScoperAdminUI::set_agent_formatting( $stored_assignments[$id], $title, $limit_class, $link_class, $limit_style ); - - if ( $title ) { - $any_date_limits = true; - $label_title = " title='$title'"; - } else - $label_title = ''; - - $disabled = ( $locked_ids && isset($locked_ids[$id]) ) ? " disabled='disabled'" : ''; - - $li_title = "title=' " . strtolower($agent_display_name) . " '"; - - if ( $check_for_incomplete_submission && isset($_POST['scoper_error']) && isset($_POST[$id_prefix]) ) - $this_checked = ( in_array($id, $_POST[$id_prefix]) ) ? ' checked="checked"' : ''; - else { - if ( $role_assigned && ( ! is_array($for_entity_ids) || isset($for_entity_ids[$id]) ) ) - $this_checked = ' checked="checked"'; - else - $this_checked = ''; - } - - if ( $this_checked ) - $last_agents[] = $id; - - if ( isset($via_other_role_ids[$id]) ) - $label_class = " class='rs-via-r{$limit_class}'"; - - elseif ( ! $role_assigned && isset($via_other_basis_ids[$id]) ) - $label_class = " class='rs-via-b{$limit_class}'"; - - elseif ( isset($via_other_scope_ids[$id]) ) - $label_class = " class='rs-via-s{$limit_class}'"; - elseif( $limit_class ) - $label_class = " class='" . trim($limit_class) . "'"; - else - $label_class = ''; - - - echo "\r\n
      • " - . ""; - - if ( $propagation ) { - if ( $check_for_incomplete_submission && isset($_POST['scoper_error']) && isset($_POST["p_{$id_prefix}"]) ) - $this_checked_prop = ( in_array($id, $_POST["p_{$id_prefix}"]) ) ? ' checked="checked"' : ''; - else { - if ( isset($for_children_ids[$id]) ) - $this_checked_prop = " checked='checked'"; - else - $this_checked_prop = ''; - } - - if ( $this_checked_prop ) - $last_agents_prop[] = $id; - - echo "{" - . "" - . "}"; - } - - echo "
      • '; - - } //foreach agent - - echo "\r\n
      "; // prevent invalid markup if no other li's - - if ( CURRENT_ITEMS_RS == $agents_subset ) { - $last_agents = implode("~", $last_agents); - $last_agents_prop = implode("~", $last_agents_prop); - echo ""; - echo ""; - } - - if ( $any_display_filtering || $agent_count[$agents_subset] > $emsize_threshold ) - echo '
    '; - - // display key - /* - if ( $any_inherited && $inherited_prefix ) - $key ['inherited']= "$inherited_prefix $inherited_suffix" - . '' . sprintf(_ x('inherited from parent %s', 'user/group role status key: this role is assigned via parent object', 'scoper'), strtolower($objtype_display_name)) . ''; - - if ( $any_other_role && $via_other_role_prefix ) - $key ['other_role']= "{$via_other_role_prefix} {$via_other_role_suffix}" - . '' . str_replace( ' ', ' ', _ x('has via other role', 'user/group role status key: all caps in this role are assigned via another role', 'scoper') ) . ''; - - if ( $any_other_basis && $via_other_basis_prefix ) - $key ['other_basis']= "{$via_other_basis_prefix} {$via_other_basis_suffix}" - . '' . str_replace( ' ', ' ', _ x('has via group', 'user role status key: this role is assigned to a group the user is in', 'scoper') ) . ''; - - if ( $any_other_scope && $via_other_scope_prefix ) - $key ['other_scope']= "{$via_other_scope_prefix} {$via_other_scope_suffix}" - . '' . str_replace( ' ', ' ', _ x('has via other scope', 'user role status key: this role is assigned blog-wide or term-wide', 'scoper') ) . ''; - - if ( $propagation ) - $key ['propagation']= "{}" - . '' . sprintf(_ x('propagate to sub-%s', 'user/group role status key: propagate this role to sub-objects', 'scoper'), strtolower($objtype_display_name_plural)) . ''; - */ - - if ( $any_inherited && $inherited_prefix ) - $key ['inherited']= "$inherited_prefix $inherited_suffix" - . '' . sprintf(__('inherited from parent %s', 'scoper'), strtolower($objtype_display_name)) . ''; - - if ( $any_other_role && $via_other_role_prefix ) - $key ['other_role']= "{$via_other_role_prefix} {$via_other_role_suffix}" - . '' . str_replace( ' ', ' ', __('has via other role', 'scoper') ) . ''; - - if ( $any_other_basis && $via_other_basis_prefix ) - $key ['other_basis']= "{$via_other_basis_prefix} {$via_other_basis_suffix}" - . '' . str_replace( ' ', ' ', __('has via group', 'scoper') ) . ''; - - if ( $any_other_scope && $via_other_scope_prefix ) - $key ['other_scope']= "{$via_other_scope_prefix} {$via_other_scope_suffix}" - . '' . str_replace( ' ', ' ', __('has via other scope', 'scoper') ) . ''; - - if ( $propagation ) - $key ['propagation']= "{}" - . '' . sprintf(__('propagate to sub-%s', 'scoper'), strtolower($objtype_display_name_plural)) . ''; - - - if ( $any_date_limits && $object_id ) - $action_links ['limits']= sprintf( __('%1$sEdit date limits%2$s', 'scoper'), "", '' ); - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/attachments_utility.php b/blog/wp-content/plugins/role-scoper/admin/attachments_utility.php deleted file mode 100644 index 4176278..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/attachments_utility.php +++ /dev/null @@ -1,212 +0,0 @@ -Note: Direct access to uploaded file attachments cannot be filtered because your WP_CONTENT_DIR is not in the WordPress branch.', 'scoper'); - echo '

    '; - _e('The operation was terminated due to an invalid configuration.', 'scoper'); - } - - return false; - } - - if ( $post_ids = scoper_get_col( "SELECT ID FROM $wpdb->posts WHERE post_type IN ('post', 'page') ORDER BY post_type, post_title" ) ) { - $stored_attachments = array(); - if ( $results = scoper_get_results( "SELECT post_parent, guid FROM $wpdb->posts WHERE post_type = 'attachment'" ) ) { - foreach ( $results as $row ) { - if ( ! isset($stored_attachments[$row->post_parent]) ) - $stored_attachments[$row->post_parent] = array(); - - $stored_attachments[$row->post_parent][$row->guid] = true; - } - } - - // for reasonable memory usage, only hold 10 posts in memory at a time - $found_links = 0; - $num_inserted = 0; - $num_posts = count($post_ids); - $bite_size = 10; - $num_bites = $num_posts / $bite_size; - if ( $num_posts % $bite_size ) - $num_bites++; - - $upload_path = $uploads['baseurl']; - - if ( $echo ) { - printf(__( "checking %s posts / pages...", 'scoper' ), $num_posts); - echo '

    '; - } - - for ( $i = 0; $i < $num_bites; $i++ ) { - $id_in = "'" . implode( "','", array_slice( $post_ids, $i * $bite_size, $bite_size ) ) . "'"; - if ( ! $results = scoper_get_results( "SELECT ID, post_content, post_author, post_title, post_type FROM $wpdb->posts WHERE ID IN ($id_in)" ) ) - continue; - - foreach ( $results as $row ) { - $linked_uploads = array(); - - // preg_match technique learned from http://stackoverflow.com/questions/138313/how-to-extract-img-src-title-and-alt-from-html-using-php - $tags = array( 'img' => array(), 'a' => array() ); - - $content = $row->post_content; - - preg_match_all('/]+>/i', $row->post_content, $tags['img']); - preg_match_all('/]+>/i', $row->post_content, $tags['a']); // don't care that this will terminate with any enclosed tags (i.e. img) - - foreach ( array_keys($tags) as $tag_type ) { - foreach ( $tags[$tag_type]['0'] as $found_tag ) { - $found_attribs = array( 'src' => '', 'href' => '', 'title' => '', 'alt' => '' ); - - if ( ! preg_match_all('/(alt|title|src|href)=("[^"]*")/i', $found_tag, $tag_attributes) ) - continue; - - foreach ( $tag_attributes[1] as $key => $attrib_name ) - $found_attribs[$attrib_name] = trim($tag_attributes[2][$key], "'" . '"'); - - if ( ! $found_attribs['href'] && ! $found_attribs['src'] ) - continue; - - $file_url = ( $found_attribs['src'] ) ? $found_attribs['src'] : $found_attribs['href']; - - // links can't be registered as attachments unless they're in the WP uploads path - if ( false === strpos($file_url, $upload_path) ) { - if ( $echo ) { - //printf( _ x( 'skipping unfilterable file in %1$s "%2$s": %3$s', 'post_type, post_title, file_url', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - printf( __( 'skipping unfilterable file in %1$s "%2$s": %3$s', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - echo '

    '; - } - - continue; - } - - $caption = ( $found_attribs['title'] ) ? $found_attribs['title'] : $found_attribs['alt']; - - // we might find the same file sourced in both link and img tags - if ( ! isset($linked_uploads[$file_url]) || ! $linked_uploads[$file_url] ) { - $found_links++; - $linked_uploads[$file_url] = $caption; - } - - } // end foreach found tag - } // end foreach loop on 'img' and 'a' - - foreach ( $linked_uploads as $file_url => $caption ) { - $unsuffixed_file_url = preg_replace( "/-[0-9]{2,4}x[0-9]{2,4}./", '.', $file_url ); - - $file_info = wp_check_filetype( $unsuffixed_file_url ); - - if ( ! isset($stored_attachments[$row->ID][$unsuffixed_file_url]) ) { - $att = array(); - $att['guid'] = $unsuffixed_file_url; - - $info = pathinfo($unsuffixed_file_url); - if ( isset($info['filename']) ) { - $att['post_name'] = $info['filename']; - $att['post_title'] = $info['filename']; - } - $att['post_excerpt'] = $caption; - $att['post_author'] = $row->post_author; - $att['post_parent'] = $row->ID; - $att['post_category'] = wp_get_post_categories( $row->ID ); - if ( isset($file_info['type']) ) - $att['post_mime_type'] = $file_info['type']; - - $num_inserted++; - - if ( $echo ) - printf(__( 'new attachment in %1$s "%2$s": %3$s', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - //printf(_ x( 'new attachment in %1$s "%2$s": %3$s', 'post_type, post_title, file_url', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - - wp_insert_attachment( $att ); - } else { - if ( $echo ) - printf(__( 'attachment OK in %1$s "%2$s": %3$s', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - //printf(_ x( 'attachment OK in %1$s "%2$s": %3$s', 'post_type, post_title, file_url', 'scoper' ), __(ucwords($row->post_type)), $row->post_title, $file_url); - } - - if ( $echo ) - echo '

    '; - - } // end foreach linked_uploads - - } // end foreach post in this bite - - } // endif for each 10-post bite - - if ( $echo ) { - echo '
    '; - - printf( __( "Operation complete: %s linked uploads were found in your post / page content.", 'scoper' ), $found_links ); - echo '

    '; - if ( $num_inserted ) - printf(__( '%s attachment records were added to the database.', 'scoper' ), $num_inserted); - elseif ( $found_links ) - _e('All linked uploads are already registered as attachments.', 'scoper'); - } - - return true; - } -} - -?> - -
    - - - -
    -

    -", ''); -printf( __('Back to %1$sRole Scoper Options%2$s', 'scoper'), "", ''); -?> -
    -
    - -
    -
    - -'; -_e("Role Scoper can limit direct URL access to files linked from your posts and pages, but only if the following requirements are met:", 'scoper'); -echo '
    1. '; -_e( 'Your WP content directory must be a branch of the WordPress directory tree (i.e. wp-config.php must not be customized to separate WP_CONTENT_DIR and WP_CONTENT_URL from the main WordPress folder).', 'scoper'); -echo '
    2. '; - -$search_replace_url = awp_plugin_search_url('replace'); - -if ( false !== strpos( $upload_path, 'http://www.' ) ) - $www_msg = __('Note that to be detected as attachments, your file references must include www.'); -else - $www_msg = __('Note that to be detected as attachments, your file references must NOT include www.'); - -require_once( SCOPER_ABSPATH . '/uploads_rs.php' ); -$uploads = scoper_get_upload_info(); - -printf(__('Files linked from WP Posts and Pages must be in %1$s (or a subdirectory of it) to be filtered. After moving files, you may use %2$s a search and replace plugin%3$s to conveniently update the URLs stored in your Post / Page content. %4$s', 'scoper'), '' . $uploads['baseurl'] . '', "", '', $www_msg); -echo '
    3. '; -_e( 'Files which are already appropriately located and linked must also have their post-file attachment relationship stored to the WP database. This is normally accomplished by clicking the "Insert into Post" button in the WP file uploader / Media Library. Files which were instead uploaded manually via FTP or CPanel can receive their attachment record via this utility.', 'scoper'); -echo '
    '; - -if ( ! empty($_POST['rs_run_utility']) ) { - scoper_attach_linked_uploads( true ); -} -?> -
    -
    - -
    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/cache_flush_rs.php b/blog/wp-content/plugins/role-scoper/admin/cache_flush_rs.php deleted file mode 100644 index 30896b6..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/cache_flush_rs.php +++ /dev/null @@ -1,146 +0,0 @@ -taxonomies) ) - $taxonomies = $scoper->taxonomies->get_all_keys(); - - if ( ! $taxonomies ) { - update_option( 'scoper_need_cache_flush', true ); // if taxonomies could not be determined, invalidate entire cache - return; - } - } - - if ( ! is_array( $taxonomies) ) - $taxonomies = array($taxonomies); - - if ( $user_ids ) { - foreach ($scoper_role_types as $role_type) - foreach ( $user_ids as $user_id ) - foreach ($taxonomies as $taxonomy) - wpp_cache_delete($user_id, "{$role_type}_term-roles_{$taxonomy}_for_{$role_basis}"); - } else { - foreach ($scoper_role_types as $role_type) - foreach ($taxonomies as $taxonomy) - wpp_cache_flush_group("{$role_type}_term-roles_{$taxonomy}_for_{$role_basis}"); - } - - } else { - if ( $user_ids ) { - foreach ($scoper_role_types as $role_type) - foreach ( $user_ids as $user_id ) - wpp_cache_delete($user_id, "{$role_type}_{$scope}-roles_for_{$role_basis}"); - } else - foreach ($scoper_role_types as $role_type) - wpp_cache_flush_group("{$role_type}_{$scope}-roles_for_{$role_basis}"); - } - } -} - -function scoper_flush_restriction_cache( $scope, $src_or_tx_name = '' ) { - global $scoper_role_types; - - if ( OBJECT_SCOPE_RS == $scope ) { - if ( ! $src_or_tx_name ) { - global $scoper; - if ( ! empty($scoper->data_sources) ) - $src_or_tx_name = $scoper->data_sources->get_all_keys(); - } - - } elseif ( TERM_SCOPE_RS == $scope ) { - if ( ! $src_or_tx_name ) { - global $scoper; - if ( ! empty($scoper->taxonomies) ) - $src_or_tx_name = $scoper->taxonomies->get_all_keys(); - } - } - - if ( ! $src_or_tx_name ) { - update_option( 'scoper_need_cache_flush', true ); // if taxonomies / data sources could not be determined, invalidate entire cache - return; - } - - $names = (array) $src_or_tx_name; - - foreach ($scoper_role_types as $role_type) - foreach ($names as $src_or_tx_name) - wpp_cache_flush_group("{$role_type}_{$scope}_restrictions_{$src_or_tx_name}"); - - foreach ($scoper_role_types as $role_type) - wpp_cache_flush_group( "{$role_type}_{$scope}_def_restrictions" ); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/default_groups.php b/blog/wp-content/plugins/role-scoper/admin/default_groups.php deleted file mode 100644 index 6ef63b6..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/default_groups.php +++ /dev/null @@ -1,82 +0,0 @@ - - -
    -

    -  (  ) -

    - -Back to Groups"; -?> - -
    - -

    '; - printf(__('Default Groups Updated: %s groups', 'scoper'), count($groups) ); - echo '

    '; -} - - -if ( ! $all_groups = ScoperAdminLib::get_all_groups(UNFILTERED_RS) ) - return; - -if ( $editable_ids = ScoperAdminLib::get_all_groups(FILTERED_RS, COL_ID_RS) ) { - echo "
    "; - - if ( ! $stored_groups = scoper_get_option( 'default_groups' ) ) { - $stored_groups = array(); - echo '

    '; - _e( 'No default groups defined.', 'scoper' ); - echo '

    '; - } - - // WP Roles groups, other metagroups can't be a default group - foreach ( $all_groups as $key => $group ) - if ( ! empty($group->meta_id) && in_array( $group->ID, $editable_ids ) ) - $editable_ids = array_diff( $editable_ids, array($group->ID) ); - - $css_id = 'group'; - $locked_ids = array_diff($stored_groups, $editable_ids ); - $args = array( 'suppress_extra_prefix' => true, 'eligible_ids' => $editable_ids, 'locked_ids' => $locked_ids ); - - require_once('agents_checklist_rs.php'); - ScoperAgentsChecklist::agents_checklist( ROLE_BASIS_GROUPS, $all_groups, $css_id, array_flip($stored_groups), $args); - ?> -
    - - - - - - -

    ' . __("Notes", 'scoper') . ':

      '; -echo '
    • '; -_e( 'Each new user will be added to the default groups. Existing users are not affected.', 'scoper'); -echo '
    • '; -echo '
    • '; -_e( 'Use default groups only if you need the ability to manually remove a user from one of the groups later. To affect all users (or all users of a certain WP role), assign roles to the corresponding [WP role] group instead.', 'scoper'); -echo '
    '; -?> - - -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-legacy_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-legacy_rs.php deleted file mode 100644 index d23aa25..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-legacy_rs.php +++ /dev/null @@ -1,53 +0,0 @@ - $menu_array ) { - if ( isset($menu_array[1]) && is_string($menu_array[1]) ) { - $scoper->ignore_object_roles = true; - - if ( ! current_user_can( $menu_array[1] ) ) { - // remove this "Write" sublink if the user can't do it - unset( $submenu['post-new.php'][$key] ); - - // Don't allow WP to default the Write link to page-new.php if page creation is disabled for this user - if ( isset($menu_array[2]) && ( 'page-new.php' == $menu_array[2] ) && ( 'page-new.php' == $menu_array[2] ) ) { - if ( isset($menu[5][2]) && ( $menu[5][2] == 'page-new.php' ) ) - $menu[5] = array(__awp('Write'), 'edit_posts', 'post-new.php'); - } - } - - $scoper->ignore_object_roles = false; - } - } - - if ( empty( $submenu['post-new.php'] ) ) { - global $menu; - - unset ( $menu[5] ); - unset ( $submenu['post-new.php'] ); - } - } - - // default Manage menu to Categories if currently in Category Roles / Restrictions - $uri = $_SERVER['SCRIPT_NAME']; - if ( strpos($uri, 'role-scoper/admin/restrictions/category') || strpos($uri, 'role-scoper/admin/roles/category') ) - $menu[10][2] = 'categories.php'; - - elseif ( strpos($uri, 'role-scoper/admin/restrictions/post/page') || strpos($uri, 'role-scoper/admin/roles/post/page') ) { - $menu[5][2] = 'page-new.php'; - $menu[10][2] = 'edit-pages.php'; - - } elseif ( strpos($uri, 'role-scoper/admin/restrictions/link_category') || strpos($uri, 'role-scoper/admin/roles/link_category') ) - $menu[10][2] = 'edit-link-categories.php'; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-save_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-save_rs.php deleted file mode 100644 index 73d4764..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-save_rs.php +++ /dev/null @@ -1,947 +0,0 @@ - '' ); - $args = array_intersect_key( $defaults, (array) $args ); - extract($args); - - $is_new_object = false; - - if ( empty($object_type) ) - $object_type = scoper_determine_object_type($src_name, $object_id, $object); - - $saved_objects[$src_name][$object_id] = 1; - - // parent settings can affect the auto-assignment of propagating roles/restrictions - $last_parent = 0; - - if ( $col_parent = $scoper->data_sources->member_property($src_name, 'cols', 'parent') ) - if ( isset($_POST[$col_parent]) ) - $set_parent = $_POST[$col_parent]; - - // Determine whether this object is new (first time this RS filter has run for it, though the object may already be inserted into db) - if ( 'post' == $src_name ) { - $last_parent = ( $object_id > 0 ) ? get_post_meta($object_id, '_scoper_last_parent', true) : ''; - - $is_new_object = ! is_numeric($last_parent); - - if ( isset($set_parent) && ($set_parent != $last_parent) && ($set_parent || $last_parent) ) - update_post_meta($obj_or_term_id, '_scoper_last_parent', (int) $set_parent); - - /* // This ugly workaround should not be necessary now - $time = agp_time_gmt(); - - if ( $is_new_object ) { - update_post_meta($obj_or_term_id, '_scoper_creation_date', $time); - } else { - if ( $creation_date = get_post_meta($object_id, '_scoper_creation_date', true) ) - if ( $time - $creation_date < 1 ) - $is_new_object = true; - } - */ - - } else { - // for other data sources, we have to assume object is new unless it has a role or restriction stored already. - $is_new_object = true; - - $qry = "SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = 'object' AND src_or_tx_name = '$src_name' AND obj_or_term_id = '$object_id'"; - if ( $assignment_ids = scoper_get_col($qry) ) - $is_new_object = false; - else { - $qry = "SELECT requirement_id FROM $wpdb->role_scope_rs WHERE topic = 'object' AND src_or_tx_name = '$src_name' AND obj_or_term_id = '$object_id'"; - if ( $requirement_ids = scoper_get_col($qry) ) - $is_new_object = false; - } - - if ( $col_parent ) { - if ( ! $is_new_object ) { - $last_parents = get_option( "scoper_last_parents_{$src_name}"); - if ( ! is_array($last_parents) ) - $last_parents = array(); - - if ( isset( $last_parents[$object_id] ) ) - $last_parent = $last_parents[$object_id]; - } - - if ( isset($set_parent) && ($set_parent != $last_parent) && ($set_parent || $last_parent) ) { - $last_parents[$object_id] = $set_parent; - update_option( "scoper_last_parents_{$src_name}", $last_parents); - } - } - } - - // used here and in UI display to enumerate role definitions - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - $role_handles = array_keys($role_defs); - - - // Were roles / restrictions previously customized by direct edit? - if ( 'post' == $src_name ) - $roles_customized = $is_new_object ? false : get_post_meta($object_id, '_scoper_custom', true); - else { - $roles_customized = false; - if ( ! $is_new_object ) - if ( $custom_role_objects = get_option( "scoper_custom_{$src_name}" ) ) - $roles_customized = isset( $custom_role_objects[$object_id] ); - - if ( ! is_array($custom_role_objects) ) - $custom_role_objects = array(); - } - - $new_role_settings = false; - $new_restriction_settings = false; - - // Were roles / restrictions custom-edited just now? - if ( ! defined('XMLRPC_REQUEST') ) { - // Now determine if roles/restrictions have changed since the edit form load - foreach ( $role_defs as $role_handle => $role_def) { - $role_code = 'r' . array_search($role_handle, $role_handles); - - // make sure the role assignment UI for this role was actually reviewed - if ( ! isset($_POST["last_objscope_{$role_code}"]) ) - continue; - - // did user change roles? - $compare_vars = array( - "{$role_code}u" => "last_{$role_code}u", - "{$role_code}g" => "last_{$role_code}g" - ); - - if ( $col_parent ) { - $compare_vars ["p_{$role_code}u"] = "last_p_{$role_code}u"; - $compare_vars ["p_{$role_code}g"] = "last_p_{$role_code}g"; - } - - foreach ( $compare_vars as $var => $var_last ) { - $agents = ( isset($_POST[$var]) ) ? $_POST[$var] : array(); - $last_agents = ( ! empty($_POST[$var_last]) ) ? explode("~", $_POST[$var_last]) : array(); - - sort($agents); - sort($last_agents); - - if ( $last_agents != $agents ) { - $new_role_settings = true; - break; - } - } - - // did user change restrictions? - $compare_vars = array( - "objscope_{$role_code}" => "last_objscope_{$role_code}" - ); - - if ( $col_parent ) - $compare_vars ["objscope_children_{$role_code}"] = "last_objscope_children_{$role_code}"; - - foreach ( $compare_vars as $var => $var_last ) { - $val = ( isset($_POST[$var]) ) ? $_POST[$var] : 0; - $last_val = ( isset($_POST[$var_last]) ) ? $_POST[$var_last] : 0; - - if ( $val != $last_val ) { - $new_role_settings = true; - $new_restriction_settings = true; - break; - } - } - - if ( $new_role_settings && $new_restriction_settings ) - break; - } - - if ( $new_role_settings && ! $roles_customized ) { - if ( 'post' == $src_name ) - update_post_meta($object_id, '_scoper_custom', true); - else { - $custom_role_objects [$object_id] = true; - update_option( "scoper_custom_{$src_name}", $custom_role_objects ); - } - } - } // endif user-modified roles/restrictions weren't already saved - - // Inherit parent roles / restrictions, but only for new objects, - // or if a new parent is set and roles haven't been manually edited for this object - if ( ! $roles_customized && ! $new_role_settings && ( $is_new_object || ( isset($set_parent) && ($set_parent != $last_parent) ) ) ) { - // apply default roles for new object - if ( $is_new_object ) { - scoper_inherit_parent_roles($object_id, OBJECT_SCOPE_RS, $src_name, 0, $object_type); - } else { - $args = array( 'inherited_only' => true, 'clear_propagated' => true ); - ScoperAdminLib::clear_restrictions(OBJECT_SCOPE_RS, $src_name, $object_id, $args); - ScoperAdminLib::clear_roles(OBJECT_SCOPE_RS, $src_name, $object_id, $args); - } - - // apply propagating roles,restrictions from specific parent - if ( ! empty($set_parent) ) { - //d_echo( 'inherit parent roles' ); - scoper_inherit_parent_roles($object_id, OBJECT_SCOPE_RS, $src_name, $set_parent, $object_type); - scoper_inherit_parent_restrictions($object_id, OBJECT_SCOPE_RS, $src_name, $set_parent, $object_type); - } - } // endif new parent selection (or new object) - - // Roles/Restrictions were just edited manually, so store role settings (which may contain default roles even if no manual settings were made) - if ( $new_role_settings && ! empty($_POST['rs_object_roles']) && ( empty($_POST['action']) || ( 'autosave' != $_POST['action'] ) ) && ! defined('XMLRPC_REQUEST') ) { - $role_assigner = init_role_assigner(); - - $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only'); - if ( - ( ( 'admin' != $require_blogwide_editor ) || is_user_administrator_rs() ) && - ( ( 'admin_content' != $require_blogwide_editor ) || is_content_administrator_rs() ) - ) { - if ( $object_type && $scoper->admin->user_can_admin_object($src_name, $object_type, $object_id) ) { - // store any object role (read/write/admin access group) selections - $role_bases = array(); - if ( GROUP_ROLES_RS ) - $role_bases []= ROLE_BASIS_GROUPS; - if ( USER_ROLES_RS ) - $role_bases []= ROLE_BASIS_USER; - - $set_roles = array_fill_keys( $role_bases, array() ); - $set_restrictions = array(); - - $default_restrictions = $scoper->get_default_restrictions(OBJECT_SCOPE_RS); - - foreach ( $role_defs as $role_handle => $role_def) { - if ( ! isset($role_def->valid_scopes[OBJECT_SCOPE_RS]) ) - continue; - - $role_code = 'r' . array_search($role_handle, $role_handles); - - // make sure the role assignment UI for this role was actually reviewed - if ( ! isset($_POST["last_objscope_{$role_code}"]) ) - continue; - - $role_ops = $scoper->role_defs->get_role_ops($role_handle); - - // user can't view or edit role assignments unless they have all rolecaps - // however, if this is a new post, allow read role to be assigned even if contributor doesn't have read_private cap blog-wide - if ( ! is_user_administrator_rs() && ( ! $is_new_object || $role_ops != array( 'read' => 1 ) ) ) { - $reqd_caps = $scoper->role_defs->role_caps[$role_handle]; - if ( ! awp_user_can(array_keys($reqd_caps), $object_id) ) - continue; - - // a user must have a blog-wide edit cap to modify editing role assignments (even if they have Editor role assigned for some current object) - if ( isset($role_ops[OP_EDIT_RS]) || isset($role_ops[OP_ASSOCIATE_RS]) ) - if ( $require_blogwide_editor ) { - $required_cap = ( 'page' == $object_type ) ? 'edit_others_pages' : 'edit_others_posts'; - - global $current_user; - if ( empty( $current_user->allcaps[$required_cap] ) ) - continue; - } - } - - foreach ( $role_bases as $role_basis ) { - $id_prefix = $role_code . substr($role_basis, 0, 1); - - $for_entity_agent_ids = (isset( $_POST[$id_prefix]) ) ? $_POST[$id_prefix] : array(); - $for_children_agent_ids = ( isset($_POST["p_$id_prefix"]) ) ? $_POST["p_$id_prefix"] : array(); - - - // handle csv-entered agent names - $csv_id = "{$id_prefix}_csv"; - - if ( $csv_for_item = ScoperAdminLib::agent_ids_from_csv( $csv_id, $role_basis ) ) - $for_entity_agent_ids = array_merge($for_entity_agent_ids, $csv_for_item); - - if ( $csv_for_children = ScoperAdminLib::agent_ids_from_csv( "p_$csv_id", $role_basis ) ) - $for_children_agent_ids = array_merge($for_children_agent_ids, $csv_for_children); - - $set_roles[$role_basis][$role_handle] = array(); - - if ( $for_both_agent_ids = array_intersect($for_entity_agent_ids, $for_children_agent_ids) ) - $set_roles[$role_basis][$role_handle] = $set_roles[$role_basis][$role_handle] + array_fill_keys($for_both_agent_ids, ASSIGN_FOR_BOTH_RS); - - if ( $for_entity_agent_ids = array_diff( $for_entity_agent_ids, $for_children_agent_ids ) ) - $set_roles[$role_basis][$role_handle] = $set_roles[$role_basis][$role_handle] + array_fill_keys($for_entity_agent_ids, ASSIGN_FOR_ENTITY_RS); - - if ( $for_children_agent_ids = array_diff( $for_children_agent_ids, $for_entity_agent_ids ) ) - $set_roles[$role_basis][$role_handle] = $set_roles[$role_basis][$role_handle] + array_fill_keys($for_children_agent_ids, ASSIGN_FOR_CHILDREN_RS); - } - - if ( isset($default_restrictions[$src_name][$role_handle]) ) { - $max_scope = BLOG_SCOPE_RS; - $item_restrict = empty($_POST["objscope_{$role_code}"]); - $child_restrict = empty($_POST["objscope_children_{$role_code}"]); - } else { - $max_scope = OBJECT_SCOPE_RS; - $item_restrict = ! empty($_POST["objscope_{$role_code}"]); - $child_restrict = ! empty($_POST["objscope_children_{$role_code}"]); - } - - $set_restrictions[$role_handle] = array( 'max_scope' => $max_scope, 'for_item' => $item_restrict, 'for_children' => $child_restrict ); - } - - $args = array('implicit_removal' => true, 'object_type' => $object_type); - - // don't record first-time storage of default roles as custom settings - if ( ! $new_role_settings ) - $args['is_auto_insertion'] = true; - - // Add or remove object role restrictions as needed (no DB update in nothing has changed) - $role_assigner->restrict_roles(OBJECT_SCOPE_RS, $src_name, $object_id, $set_restrictions, $args ); - - // Add or remove object role assignments as needed (no DB update if nothing has changed) - foreach ( $role_bases as $role_basis ) - $role_assigner->assign_roles(OBJECT_SCOPE_RS, $src_name, $object_id, $set_roles[$role_basis], $role_basis, $args ); - } // endif object type is known and user can admin this object - } // end if current user is an Administrator, or doesn't need to be - } //endif roles were manually edited by user (and not autosave) - - - if ( $new_restriction_settings ) - scoper_flush_file_rules(); - else { - if ( isset( $scoper->filters_admin->last_post_status[$object_id] ) ) { - $new_status = ( isset($_POST['post_status']) ) ? $_POST['post_status'] : ''; // assume for now that XML-RPC will not modify post status - - if ( $scoper->filters_admin->last_post_status[$object_id] != $new_status ) - if ( ( 'private' == $new_status ) || ( 'private' == $scoper->filters_admin->last_post_status[$object_id] ) ) - scoper_flush_file_rules(); - - } elseif ( isset($_POST['post_status']) && ( 'private' == $_POST['post_status'] ) ) - scoper_flush_file_rules(); - } - - if ( 'page' == $object_type ) { - delete_option('scoper_page_ancestors'); - scoper_flush_cache_groups('get_pages'); - } - - // need this to make metabox captions update in first refresh following edit & save - if ( is_admin() && isset( $scoper->filters_admin_item_ui ) ) - $scoper->filters_admin_item_ui->act_tweak_metaboxes(); - - // possible TODO: remove other conditional calls since we're doing it here on every save - scoper_flush_results_cache(); - } - - - // Filtering of Page Parent selection. - // This is a required after-the-fact operation for WP < 2.7 (due to inability to control inclusion of Main Page in UI dropdown) - // For WP >= 2.7, it is an anti-hacking precaution - // - // There is currently no way to explictly restrict or grant Page Association rights to Main Page (root). Instead: - // * Require blog-wide edit_others_pages cap for association of a page with Main - // * If an unqualified user tries to associate or un-associate a page with Main Page, - // revert page to previously stored parent if possible. Otherwise set status to "unpublished". - function scoper_flt_post_status ($status) { - if ( isset($_POST['post_type']) && ( $_POST['post_type'] == 'page' ) && ('autosave' != $_POST['action']) ) { - global $scoper, $current_user; - - // overcome any denials of publishing rights which were not filterable by user_has_cap - if ( ('pending' == $status) && ( ('publish' == $_POST['post_status']) || ('Publish' == $_POST['original_publish'] ) ) ) - if ( ! empty( $current_user->allcaps['publish_pages'] ) ) - $status = 'publish'; - - // user can't associate / un-associate a page with Main page unless they have edit_pages blog-wide - if ( isset($_POST['post_ID']) ) { - $post = $scoper->data_sources->get_object( 'post', $_POST['post_ID'] ); - - // if neither the stored nor selected parent is Main, we have no beef with it // is it actually saved (if just auto-saved draft, don't provide these exceptions) - if ( ! empty($_POST['parent_id']) && ( ! empty($post->post_parent) || ( ('publish' != $post->post_status) && ('private' != $post->post_status) ) ) ) - return $status; - - $already_published = ( ('publish' == $post->post_status) || ('private' == $post->post_status) ); - - // if the page is and was associated with Main Page, don't mess - if ( empty($_POST['parent_id']) && empty( $post->post_parent ) && $already_published ) - return $status; - } else - $already_published = false; - - - $top_pages_locked = scoper_get_option( 'lock_top_pages' ); - - if ( is_content_administrator_rs() ) - $can_associate_main = true; - - elseif ( '1' !== $top_pages_locked ) { - $reqd_caps = ( 'author' == $top_pages_locked ) ? array('publish_pages') : array('edit_others_pages'); - $roles = $scoper->role_defs->qualify_roles($reqd_caps, ''); - - $can_associate_main = array_intersect_key($roles, $current_user->blog_roles[ANY_CONTENT_DATE_RS]); - - } else // only administrators can change top level structure - $can_associate_main = false; - - - if ( ! $can_associate_main ) { - // If post was previously published to another parent, allow subsequent page_parent filter to revert it - if ( $already_published ) { - if ( ! isset($scoper->revert_post_parent) ) - $scoper->revert_post_parent = array(); - - $scoper->revert_post_parent[ $_POST['post_ID'] ] = $post->post_parent; - - // message display should not be necessary with legitimate WP 2.7+ usage, since the Main Page item is filtered out of UI dropdown as necessary - global $revisionary; - if ( ! awp_ver('2.7-dev') && ( ! defined( 'RVY_VERSION' ) || empty($revisionary->admin->impose_pending_rev) ) ) { - $src = $scoper->data_sources->get('post'); - $src_edit_url = sprintf($src->edit_url, $_POST['post_ID']); - - if ( empty($post->post_parent) ) - $msg = __('The page %s was saved, but the new Page Parent setting was discarded. You do not have permission to disassociate it from the Main Page.', 'scoper'); - else - $msg = __('The Page Parent setting for %s was reverted to the previously stored value. You do not have permission to associate it with the Main Page.', 'scoper'); - - $msg = sprintf($msg, '"' . $_POST['post_title'] . '"'); - update_option("scoper_notice_{$current_user->ID}", $msg ); - } - - } elseif ( empty($_POST['parent_id']) && ( ('publish' == $_POST['post_status']) || ('private' == $_POST['post_status']) ) ) { - // This should only ever happen with WP < 2.7 or if the POST data is manually fudged - $status = 'draft'; - - global $current_user; - $src = $scoper->data_sources->get('post'); - $src_edit_url = sprintf($src->edit_url, $_POST['post_ID']); - - $msg = sprintf(__('The page %s cannot be published because you do not have permission to associate it with the Main Page. Please select a different Page Parent and try again.', 'scoper'), '"' . $_POST['post_title'] . '"'); - - update_option("scoper_notice_{$current_user->ID}", $msg ); - } - } - } - - return $status; - } - - - // Enforce any page parent filtering which may have been dictated by the flt_post_status filter, which executes earlier. - function scoper_flt_page_parent ($parent_id) { - if ( defined( 'RVY_VERSION' ) ) { - global $revisionary; - if ( ! empty($revisionary->admin->revision_save_in_progress) ) - return $parent_id; - } - - global $scoper; - - if ( isset($_POST['post_ID']) && isset($scoper->revert_post_parent) && isset( $scoper->revert_post_parent[ $_POST['post_ID'] ] ) ) - return $scoper->revert_post_parent[ $_POST['post_ID'] ]; - - // Page parent will not be reverted due to Main Page (un)association with insufficient blog role - // ... but make sure the selected parent is valid. Merely an anti-hacking precaution to deal with manually fudged POST data - if ( $parent_id && isset($_POST['post_ID']) && isset($_POST['post_type']) && ( 'page' == $_POST['post_type']) ) { - global $wpdb; - $args = array(); - $args['alternate_reqd_caps'][0] = array('create_child_pages'); - - $qry_parents = "SELECT ID FROM $wpdb->posts WHERE post_type = 'page'"; - $qry_parents = apply_filters('objects_request_rs', $qry_parents, 'post', 'page', $args); - $valid_parents = scoper_get_col($qry_parents); - - if ( ! in_array($parent_id, $valid_parents) ) { - $post = $scoper->data_sources->get_object( 'post', $_POST['post_ID'] ); - $parent_id = $post->post_parent; - } - } - - return $parent_id; - } - - - function scoper_flt_pre_object_terms ($selected_terms, $taxonomy, $args = '') { - // strip out fake term_id -1 (if applied) - if ( $selected_terms ) - $selected_terms = array_diff($selected_terms, array(-1)); - - // TODO: skip this for content admins? - if ( empty($selected_terms) || empty($selected_terms[0]) ) { // not sure who is changing empty $_POST['post_category'] array to an array with nullstring element, but we have to deal with that - global $scoper; - - if ( $tx = $scoper->taxonomies->get( $taxonomy ) ) { - - if ( ! empty($tx->default_term_option ) ) { - // get_option call sometimes fails here. Todo: why? - global $wpdb; - $selected_terms = (array) maybe_unserialize( scoper_get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = '$tx->default_term_option'" ) ); - - //$selected_terms = (array) get_option( $tx->default_term_option ); - } - } - } - - if ( is_content_administrator_rs() || defined('DISABLE_QUERYFILTERS_RS') ) - return $selected_terms; - - - global $scoper, $current_user; - - if ( ! $src = $scoper->taxonomies->member_property($taxonomy, 'object_source') ) - return $selected_terms; - - if ( defined( 'RVY_VERSION' ) ) { - global $revisionary; - - if ( ! empty($revisionary->admin->impose_pending_rev) ) - return $selected_terms; - } - - $orig_selected_terms = $selected_terms; - - if ( ! is_array($selected_terms) ) - $selected_terms = array(); - - $user_terms = array(); // will be returned by filter_terms_for_status - $selected_terms = scoper_filter_terms_for_status($taxonomy, $selected_terms, $user_terms); - - if ( $object_id = $scoper->data_sources->detect('id', $src) ) { - $selected_terms = scoper_reinstate_hidden_terms($taxonomy, $selected_terms); - - /* - if ( ! $selected_terms = scoper_reinstate_hidden_terms($taxonomy, $selected_terms) ) { - if ( $orig_selected_terms ) - return $orig_selected_terms; - } - */ - } - - if ( empty($selected_terms) || empty($selected_terms[0]) ) { - // if array empty, insert default term (wp_create_post check is only subverted on updates) - if ( $option_name = $scoper->taxonomies->member_property($taxonomy, 'default_term_option') ) { - $default_terms = get_option($option_name); - } else - $default_terms = 0; - - // but if the default term is not defined or is not in user's subset of usable terms, substitute first available - if ( $user_terms ) { - if ( ! is_array($default_terms) ) - $default_terms = (array) $default_terms; - - $default_terms = array_intersect($default_terms, $user_terms); - - if ( empty($default_terms) ) - $default_terms = $user_terms[0]; - } - - $selected_terms = (array) $default_terms; - } - - return $selected_terms; - } - - // Reinstate any object terms which the object already has, but were hidden from the user due to lack of edit caps - // (if a user does not have edit cap within some term, he can neither add nor remove them from an object) - function scoper_reinstate_hidden_terms($taxonomy, $object_terms) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return $object_terms; - - // strip out any fake placeholder IDs which may have been applied - if ( $object_terms ) - $object_terms = array_diff($object_terms, array(-1)); - - global $scoper; - - if ( ! $src = $scoper->taxonomies->member_property($taxonomy, 'object_source') ) - return $object_terms; - - if ( ! $object_id = $scoper->data_sources->get_from_http_post('id', $src) ) - return $object_terms; - - if ( ! $object_type = $scoper->data_sources->detect('type', $src, $object_id) ) - return $object_terms; - - $orig_object_terms = $object_terms; - - // make sure _others caps are required only for objects current user doesn't own - $base_caps_only = false; - if ( ! empty($src->cols->owner) ) { - $col_owner = $src->cols->owner; - if ( $object = $scoper->data_sources->get_object($src->name, $object_id) ) { - - // don't reinstate terms which were only inserted by autosave - if ( empty( $object->post_modified_gmt ) ) - return $object_terms; - - global $current_user; - if ( ! empty($object->$col_owner) && ( $object->$col_owner == $current_user->ID) ) - $base_caps_only = true; - } - } - - $reqd_caps = array(); - if ( ! empty($src->statuses) ) { - // determine object's previous status so we know what terms were hidden - if ( $stored_status = $scoper->data_sources->get_from_db('status', $src, $object_id) ) - $reqd_caps = $scoper->cap_defs->get_matching($src->name, $object_type, OP_EDIT_RS, $stored_status, $base_caps_only); - } - - // if no status-specific caps are defined, or if this source doesn't define statuses... - if ( ! $reqd_caps ) - if ( ! $reqd_caps = $scoper->cap_defs->get_matching($src->name, $object_type, OP_EDIT_RS, STATUS_ANY_RS, $base_caps_only) ) - return $object_terms; - - $user_terms = $scoper->qualify_terms_daterange(array_keys($reqd_caps), $taxonomy); - - foreach ( array_keys($user_terms) as $date_key ) { - $date_clause = ''; - - if ( $date_key && is_serialized($date_key) ) { - // Check stored post date against any role date limits associated whith this set of terms (if not stored, check current date) - - $content_date_limits = unserialize($date_key); - - $post_date_gmt = ( $object_id ) ? $scoper->data_sources->get_from_db('date', $src, $object_id) : 0; - - if ( ! $post_date_gmt ) - $post_date_gmt = agp_time_gmt(); - - if ( ( $post_date_gmt < $content_date_limits->content_min_date_gmt ) || ( $post_date_gmt > $content_date_limits->content_max_date_gmt ) ) - unset( $user_terms[$date_key] ); - } - } - - $user_terms = agp_array_flatten( $user_terms ); - - // this is a security precaution - $object_terms = array_intersect($object_terms, $user_terms); - - // current object terms which were hidden from user's admin UI must be retained - if ( $stored_object_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS, $object_id) ) { - $dropped_terms = array_diff($stored_object_terms, $object_terms); - - //terms which were dropped due to being filtered out of user UI should be reinstated - $object_terms = array_merge($object_terms, array_diff($dropped_terms, $user_terms) ); - - return array_unique($object_terms); - } else - return $orig_object_terms; - } - - - // Removes terms for which the user has edit cap, but not edit_[status] cap - // If the removed terms are already stored to the post (by a user who does have edit_[status] cap), they will be reinstated by reinstate_hidden_terms - function scoper_filter_terms_for_status($taxonomy, $selected_terms, &$user_terms) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return $selected_terms; - - global $scoper; - - if ( ! $src = $scoper->taxonomies->member_property($taxonomy, 'object_source') ) - return $selected_terms; - - if ( ! isset($src->statuses) || (count($src->statuses) < 2) ) - return $selected_terms; - - $object_id = $scoper->data_sources->detect('id', $src); - - if ( ! $status = $scoper->data_sources->get_from_http_post('status', $src) ) - if ( $object_id ) - $status = $scoper->data_sources->get_from_db('status', $src, $object_id); - - if ( ! $object_type = $scoper->data_sources->detect('type', $src, $object_id) ) - return $selected_terms; - - - // make sure _others caps are required only for objects current user doesn't own - $base_caps_only = true; - if ( ! empty($src->cols->owner) ) { - $col_owner = $src->cols->owner; - if ( $object_id ) { - if ( $object = $scoper->data_sources->get_object($src->name, $object_id) ) { - global $current_user; - if ( ! empty($object->$col_owner) && ( $object->$col_owner != $current_user->ID) ) - $base_caps_only = false; - } - } - } - - - if( ! isset( $src->reqd_caps[OP_EDIT_RS][$object_type][$status] ) ) - return $selected_terms; - - $reqd_caps = $src->reqd_caps[OP_EDIT_RS][$object_type][$status]; - - if ( $base_caps_only ) { - foreach( $reqd_caps as $key => $cap_name ) { - if ( $cap_def = $scoper->cap_defs->get( $cap_name ) ) - if ( ! empty($cap_def->base_cap ) ) { - unset( $reqd_caps[$key] ); - - if ( ! in_array($cap_def->base_cap, $reqd_caps) ) - $reqd_caps[] = $cap_def->base_cap; - - } elseif ( ! empty($cap_def->owner_privilege) && ! empty($cap_def->status) ) // don't remove edit_posts / edit_pages - unset( $reqd_caps[$key] ); - } - - if ( empty( $reqd_caps ) ) - return $selected_terms; - } - - // now using $src->reqd_caps array instead - //if ( $reqd_caps = $scoper->cap_defs->get_matching($src->name, $object_type, OP_EDIT_RS, $status, $base_caps_only) ) { - - $user_terms = $scoper->qualify_terms_daterange($reqd_caps, $taxonomy); - - foreach ( array_keys($user_terms) as $date_key ) { - $date_clause = ''; - - if ( $date_key && is_serialized($date_key) ) { - // Check stored post date against any role date limits associated whith this set of terms (if not stored, check current date) - - $content_date_limits = unserialize($date_key); - - $post_date_gmt = ( $object_id ) ? $scoper->data_sources->get_from_db('date', $src, $object_id) : 0; - - if ( ! $post_date_gmt ) - $post_date_gmt = agp_time_gmt(); - - if ( ( $post_date_gmt < $content_date_limits->content_min_date_gmt ) || ( $post_date_gmt > $content_date_limits->content_max_date_gmt ) ) - unset( $user_terms[$date_key] ); - } - } - - $user_terms = agp_array_flatten( $user_terms ); - $selected_terms = array_intersect($selected_terms, $user_terms); - //} - - return $selected_terms; - } - - - // This handler is meant to fire whenever a term is inserted or updated. - // If the client does use such a hook, we will force it by calling internally from mnt_create and mnt_edit - function scoper_mnt_save_term($taxonomy, $args, $term_id, $term = '') { - static $saved_terms; - - if ( ! isset($saved_terms) ) - $saved_terms = array(); - - // so this filter doesn't get called by hook AND internally - if ( isset($saved_terms[$taxonomy][$term_id]) ) - return; - - - global $scoper; - - // parent settings can affect the auto-assignment of propagating roles/restrictions - $set_parent = 0; - - if ( $col_parent = $scoper->taxonomies->member_property($taxonomy, 'source', 'cols', 'parent') ) { - $tx_src_name = $scoper->taxonomies->member_property($taxonomy, 'source', 'name'); - - $set_parent = $scoper->data_sources->get_from_http_post('parent', $tx_src_name); - } - - if ( empty($term_id) ) - $term_id = $scoper->data_sources->get_from_http_post('id', $tx_src_name); - - $saved_terms[$taxonomy][$term_id] = 1; - - // Determine whether this object is new (first time this RS filter has run for it, though the object may already be inserted into db) - $last_parent = 0; - - $last_parents = get_option( "scoper_last_{$taxonomy}_parents" ); - if ( ! is_array($last_parents) ) - $last_parents = array(); - - if ( ! isset($last_parents[$term_id]) ) { - $is_new_term = true; - $last_parents = array(); - } else - $is_new_term = false; - - if ( isset( $last_parents[$term_id] ) ) - $last_parent = $last_parents[$term_id]; - - if ( ($set_parent != $last_parent) && ($set_parent || $last_parent) ) { - $last_parents[$term_id] = $set_parent; - update_option( "scoper_last_{$taxonomy}_parents", $last_parents); - } - - $roles_customized = false; - if ( ! $is_new_term ) - if ( $custom_role_objects = get_option( "scoper_custom_{$taxonomy}" ) ) - $roles_customized = isset( $custom_role_objects[$term_id] ); - - // Inherit parent roles / restrictions, but only for new terms, - // or if a new parent is set and no roles have been manually assigned to this term - if ( $is_new_term || ( ! $roles_customized && ($set_parent != $last_parent) ) ) { - // apply default roles for new term - if ( $is_new_term ) - scoper_inherit_parent_roles($term_id, TERM_SCOPE_RS, $taxonomy, 0); - else { - $args = array( 'inherited_only' => true, 'clear_propagated' => true ); - ScoperAdminLib::clear_restrictions(TERM_SCOPE_RS, $taxonomy, $term_id, $args); - ScoperAdminLib::clear_roles(TERM_SCOPE_RS, $taxonomy, $term_id, $args); - } - - // apply propagating roles,restrictions from specific parent - if ( $set_parent ) { - scoper_inherit_parent_roles($term_id, TERM_SCOPE_RS, $taxonomy, $set_parent); - scoper_inherit_parent_restrictions($term_id, TERM_SCOPE_RS, $taxonomy, $set_parent); - } - } // endif new parent selection (or new object) - - scoper_term_cache_flush(); - delete_option( "{$taxonomy}_children_rs" ); - delete_option( "{$taxonomy}_ancestors_rs" ); - } - - -function scoper_get_parent_restrictions($obj_or_term_id, $scope, $src_or_tx_name, $parent_id, $object_type = '') { - global $wpdb, $scoper; - - $role_clause = ''; - - if ( ! $parent_id && (OBJECT_SCOPE_RS == $scope) ) { - // for default restrictions, need to distinguish between otype-specific roles - // (note: this only works w/ RS role type. Default object restrictions are disabled for WP role type because we'd be stuck setting all default restrictions to both post & page.) - $src = $scoper->data_sources->get($src_or_tx_name); - if ( ! empty($src->cols->type) ) { - if ( ! $object_type ) - $object_type = scoper_determine_object_type($src_name, $object_id); - - if ( $object_type ) { - $role_type = SCOPER_ROLE_TYPE; - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_or_tx_name, $object_type); - if ( $role_names = scoper_role_handles_to_names( array_keys($role_defs) ) ) - $role_clause = "AND role_type = '$role_type' AND role_name IN ('" . implode("', '", $role_names) . "')"; - } - } - } - - // Since this is a new object, propagate restrictions from parent (if any are marked for propagation) - $qry = "SELECT * FROM $wpdb->role_scope_rs WHERE topic = '$scope' AND require_for IN ('children', 'both') $role_clause AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id = '$parent_id' ORDER BY role_type, role_name"; - $results = scoper_get_results($qry); - return $results; -} - -function scoper_inherit_parent_restrictions($obj_or_term_id, $scope, $src_or_tx_name, $parent_id, $object_type = '', $parent_restrictions = '') { - global $scoper; - - if ( ! $parent_restrictions ) - $parent_restrictions = scoper_get_parent_restrictions($obj_or_term_id, $scope, $src_or_tx_name, $parent_id); - - if ( $parent_restrictions ) { - $role_assigner = init_role_assigner(); - - if ( OBJECT_SCOPE_RS == $scope ) - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_or_tx_name, $object_type); - else - $role_defs = $scoper->role_defs->get_all(); - - foreach ( $parent_restrictions as $row ) { - $role_handle = scoper_get_role_handle($row->role_name, $row->role_type); - if ( isset($role_defs[$role_handle]) ) { - $inherited_from = ( $row->obj_or_term_id ) ? $row->requirement_id : 0; - - $args = array ( 'is_auto_insertion' => true, 'inherited_from' => $inherited_from ); - - $role_assigner->insert_role_restrictions ($scope, $row->max_scope, $role_handle, $src_or_tx_name, $obj_or_term_id, 'both', $row->requirement_id, $args); - $did_insert = true; - } - } - - if ( ! empty($did_insert) ) - $role_assigner->role_restriction_aftermath( $scope ); - } -} - -function scoper_get_parent_roles($obj_or_term_id, $scope, $src_or_tx_name, $parent_id, $object_type = '') { - global $wpdb, $scoper; - - $role_clause = ''; - - if ( ! $parent_id && (OBJECT_SCOPE_RS == $scope) ) { - // for default roles, need to distinguish between otype-specific roles - // (note: this only works w/ RS role type. Default object roles are disabled for WP role type because we'd be stuck assigning all default roles to both post & page.) - $src = $scoper->data_sources->get($src_or_tx_name); - if ( ! empty($src->cols->type) ) { - if ( ! $object_type ) - $object_type = scoper_determine_object_type($src_name, $object_id); - - if ( $object_type ) { - $role_type = SCOPER_ROLE_TYPE; - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_or_tx_name, $object_type); - if ( $role_names = scoper_role_handles_to_names( array_keys($role_defs) ) ) - $role_clause = "AND role_type = '$role_type' AND role_name IN ('" . implode("', '", $role_names) . "')"; - } - } - } - - // Since this is a new object, propagate roles from parent (if any are marked for propagation) - $qry = "SELECT * FROM $wpdb->user2role2object_rs WHERE scope = '$scope' AND assign_for IN ('children', 'both') $role_clause AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id = '$parent_id' ORDER BY role_type, role_name"; - $results = scoper_get_results($qry); - return $results; -} - -function scoper_inherit_parent_roles($obj_or_term_id, $scope, $src_or_tx_name, $parent_id, $object_type = '', $parent_roles = '') { - global $scoper; - - if ( ! $parent_roles ) - $parent_roles = scoper_get_parent_roles($obj_or_term_id, $scope, $src_or_tx_name, $parent_id, $object_type); - - if ( $parent_roles ) { - $role_assigner = init_role_assigner(); - - if ( OBJECT_SCOPE_RS == $scope ) - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_or_tx_name, $object_type); - else - $role_defs = $scoper->role_defs->get_all(); - - $role_handles = array_keys($role_defs); - - $role_bases = array(); - if ( GROUP_ROLES_RS ) - $role_bases []= ROLE_BASIS_GROUPS; - if ( USER_ROLES_RS ) - $role_bases []= ROLE_BASIS_USER; - - foreach ( $role_bases as $role_basis ) { - $col_ug_id = ( ROLE_BASIS_GROUPS == $role_basis ) ? 'group_id' : 'user_id'; - - foreach ( $role_handles as $role_handle ) { - $agents = array(); - $inherited_from = array(); - - $role_duration_per_agent = array(); - $content_date_limits_per_agent = array(); - - foreach ( $parent_roles as $row ) { - $ug_id = $row->$col_ug_id; - $row_role_handle = scoper_get_role_handle($row->role_name, $row->role_type); - if ( $ug_id && ($row_role_handle == $role_handle) ) { - - $agents[$ug_id] = 'both'; - - // Default roles for new objects are stored as direct assignments with no inherited_from setting. - // 1) to prevent them from being cleared when page parent is changed with no custom role settings in place - // 2) to prevent them from being cleared when the default for new pages is changed - if ( $row->obj_or_term_id ) - $inherited_from[$ug_id] = $row->assignment_id; - - $role_duration_per_agent[$ug_id] = array( 'date_limited' => $row->date_limited, 'start_date_gmt' => $row->start_date_gmt, 'end_date_gmt' => $row->end_date_gmt ); - $content_date_limits_per_agent[$ug_id] = array( 'content_date_limited' => $row->content_date_limited, 'content_min_date_gmt' => $row->content_min_date_gmt, 'content_max_date_gmt' => $row->content_max_date_gmt ); - } - } - - if ( $agents ) { - $args = array ( 'is_auto_insertion' => true, 'inherited_from' => $inherited_from, 'role_duration_per_agent' => $role_duration_per_agent, 'content_date_limits_per_agent' => $content_date_limits_per_agent ); - $role_assigner->insert_role_assignments ($scope, $role_handle, $src_or_tx_name, $obj_or_term_id, $col_ug_id, $agents, array(), $args); - } - } - } - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-item_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-item_rs.php deleted file mode 100644 index dfd932c..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-item_rs.php +++ /dev/null @@ -1,225 +0,0 @@ -scoper =& $scoper; - - add_action('admin_menu', array(&$this, 'add_meta_boxes')); - add_action('do_meta_boxes', array(&$this, 'act_tweak_metaboxes') ); - - // On the WP post/page edit form, object_edit_ui_rs will only fire with WP < 2.5, since we are using add_meta_boxes instead - add_action('object_edit_ui_rs', array(&$this, 'ui_object_roles'), 10, 2); - - add_action('term_edit_ui_rs', array(&$this, 'ui_single_term_roles'), 10, 3); - - if ( ( strpos( $_SERVER['REQUEST_URI'], 'post-new.php' ) && scoper_get_otype_option( 'default_private', 'post', 'post' ) ) - || ( strpos( $_SERVER['REQUEST_URI'], 'page-new.php' ) && scoper_get_otype_option( 'default_private', 'post', 'page' ) ) ) - add_action('admin_footer', array(&$this, 'default_private_js') ); - - if ( ( ( strpos( $_SERVER['REQUEST_URI'], 'post-new.php' ) || strpos( $_SERVER['REQUEST_URI'], 'post.php' ) ) && scoper_get_otype_option( 'sync_private', 'post', 'post' ) ) - || ( ( strpos( $_SERVER['REQUEST_URI'], 'page.php' ) || strpos( $_SERVER['REQUEST_URI'], 'page-new.php' ) ) && scoper_get_otype_option( 'sync_private', 'post', 'page' ) ) ) - add_action('admin_head', array(&$this, 'sync_private_js') ); - } - - - function default_private_js() { -?> - - - -item_roles_ui) ) { - include_once('item_roles_ui_rs.php'); - $this->item_roles_ui = new ScoperItemRolesUI(); - } - } - - function add_meta_boxes() { - /* - // optional hack to prevent role assignment boxes for non-Editors - // - // This is now handled as a Role Scoper Option. - // On the Advanced tab, Hidden Editing Elements section: select "Role administration requires a blog-wide Editor role" - // - // end optional hack - */ - - // ========= register WP-rendered metaboxes ============ - $src_name = 'post'; - $box_object_types = array( 'post', 'page' ); - - $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only'); - - if ( ( 'admin' == $require_blogwide_editor ) && ! is_user_administrator_rs() ) - return; - - if ( ( 'admin_content' == $require_blogwide_editor ) && ! is_content_administrator_rs() ) - return; - - foreach ( $box_object_types as $object_type ) { - if ( ! scoper_get_otype_option('use_object_roles', $src_name, $object_type) ) - continue; - - if ( $require_blogwide_editor ) { - $required_cap = ( 'page' == $object_type ) ? 'edit_others_pages' : 'edit_others_posts'; - - global $current_user; - if ( empty( $current_user->allcaps[$required_cap] ) ) - continue; - } - - $role_defs = $this->scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - - foreach ( $role_defs as $role_handle => $role_def ) { - if ( ! isset($role_def->valid_scopes[OBJECT_SCOPE_RS]) ) - continue; - - $box_id = $role_handle; - add_meta_box( $box_id, $this->scoper->role_defs->get_abbrev( $role_handle, OBJECT_UI_RS ), array(&$this, 'draw_object_roles_content'), $object_type ); - $this->meta_box_ids[$role_handle] = $box_id; - } - } - } - - function act_tweak_metaboxes() { - static $been_here; - - if ( isset($been_here) ) - return; - - $been_here = true; - - global $wp_meta_boxes; - - if ( empty($wp_meta_boxes) ) - return; - - $src_name = 'post'; - $object_type = $this->scoper->data_sources->detect('type', $src_name); - - if ( empty($wp_meta_boxes[$object_type]) ) - return; - - $object_id = $this->scoper->data_sources->detect('id', $src_name, '', $object_type); - - $is_administrator = is_user_administrator_rs(); - $can_admin_object = $is_administrator || $this->scoper->admin->user_can_admin_object($src_name, $object_type, $object_id); - - if ( $can_admin_object ) { - $this->init_item_roles_ui(); - $this->item_roles_ui->load_roles($src_name, $object_type, $object_id); - } - - foreach ( $wp_meta_boxes[$object_type] as $context => $priorities ) { - foreach ( $priorities as $priority => $boxes ) { - foreach ( array_keys($boxes) as $box_id ) { - - if ( $role_handle = array_search( $box_id, $this->meta_box_ids ) ) { - // eliminate metabox shells for roles which will be suppressed for this user - if ( ! $is_administrator && ( ! $can_admin_object || ! $this->scoper->admin->user_can_admin_role($role_handle, $object_id, $src_name, $object_type) ) ) { - unset( $wp_meta_boxes[$object_type][$context][$priority][$box_id] ); - } - - // update metabox titles with role counts, restriction indicator - elseif ( $can_admin_object ) - if ( $title_suffix = $this->item_roles_ui->get_rolecount_caption($role_handle) ) - if ( ! strpos($wp_meta_boxes[$object_type][$context][$priority][$box_id]['title'], $title_suffix) ) - $wp_meta_boxes[$object_type][$context][$priority][$box_id]['title'] .= $title_suffix; - } - } - } - } - - } - - // wrapper function so we don't have to load item_roles_ui class just to register the metabox - function draw_object_roles_content( $object, $box ) { - if ( empty($box['id']) ) - return; - - // id format: src_name:object_type:role_handle (As of WP 2.7, this is only safe way to transfer these parameters) - //$role_attribs = explode( ':', $box['id'] ); - - //if ( count($role_attribs) != 3 ) - // return; - - $object_id = ( isset($object->ID) ) ? $object->ID : 0; - - $src_name = 'post'; - $object_type = $this->scoper->data_sources->detect('type', 'post'); - - $this->init_item_roles_ui(); - $this->item_roles_ui->draw_object_roles_content($src_name, $object_type, $box['id'], $object_id, false, $object); - } - - function ui_single_term_roles($taxonomy, $args, $term) { - $this->init_item_roles_ui(); - $this->item_roles_ui->single_term_roles_ui($taxonomy, $args, $term); - } - - // This is now called only with WP < 2.5 and by non-post data sources which define admin_actions->object_edit_ui - function ui_object_roles($src_name, $args = '') { - $defaults = array( 'object_type' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( ! $src = $this->scoper->data_sources->get($src_name) ) - return; - - if ( ! $object_type ) - if ( ! $object_type = $this->scoper->data_sources->detect('type', $src_name) ) - return; - - $object_id = $this->scoper->data_sources->detect('id', $src_name, '', $object_type); - - if ( ! $this->scoper->admin->user_can_admin_object($src_name, $object_type, $object_id) ) - return; - - $this->init_item_roles_ui(); - $this->item_roles_ui->single_object_roles_ui($src_name, $object_type, $object_id); - } // end function ui_object_roles - - -} // end class - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-listing_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-listing_rs.php deleted file mode 100644 index 5238c1f..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui-listing_rs.php +++ /dev/null @@ -1,124 +0,0 @@ -data_sources->detect('type', 'post'); - - if ( $blogwide_role_requirement = scoper_get_option( 'role_admin_blogwide_editor_only' ) ) { - if ( ( 'admin' == $blogwide_role_requirement ) && ! is_user_administrator_rs() ) - return $defaults; - elseif ( ( 'content_admin' == $blogwide_role_requirement ) && ! is_content_administrator_rs() ) - return $defaults; - elseif ( $blogwide_role_requirement ) { - $cap_req = "edit_others_{$object_type}s"; - - if ( empty( $current_user->allcaps[$cap_req] ) ) - return $defaults; - } - } - - $use_object_roles = scoper_get_otype_option('use_object_roles', 'post', $object_type); - - $use_term_roles = scoper_get_otype_option('use_term_roles', 'post', $object_type); - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - if ( ( $use_term_roles && ! empty($scoper->any_restricted_terms) ) || ( $use_object_roles && ! empty($scoper->any_restricted_objects) ) ) - if ( scoper_get_otype_option('restrictions_column', 'post', $object_type) ) - $defaults['restricted'] = __('Restrict', 'scoper'); - } - - if ( ! empty($scoper->have_termrole_ids['post']) ) - if ( scoper_get_otype_option('term_roles_column', 'post', $object_type) ) - $defaults['termroles'] = __('Term Roles', 'scoper'); - - if ( $use_object_roles && ! empty($scoper->have_objrole_ids['post']) ) - if ( scoper_get_otype_option('object_roles_column', 'post', $object_type) ) { - $otype_display_name = $scoper->data_sources->member_property('post', 'object_types', $object_type, 'display_name'); - //$defaults['objroles'] = sprintf( _ x('%s Roles', 'Post or Page', 'scoper'), $otype_display_name); - $defaults['objroles'] = sprintf( __('%s Roles', 'scoper'), $otype_display_name); - } - - return $defaults; - } - - function flt_manage_posts_custom_column($column_name, $id) { - global $scoper, $posts; - - switch ( $column_name ) { - case 'restricted': - $restricted_ops = array(); - if ( isset($scoper->objscoped_ids['post'][$id]['read']) ) - $restricted_ops []= '' . __('Read', 'scoper') . ''; - elseif ( isset($scoper->termscoped_ids['post'][$id]['read']) ) - $restricted_ops []= __('Read', 'scoper'); - - if ( isset($scoper->objscoped_ids['post'][$id]['edit']) ) - $restricted_ops []= '' . __awp('Edit') . ''; - elseif ( isset($scoper->termscoped_ids['post'][$id]['edit']) ) - $restricted_ops []= __awp('Edit'); - - if ( $restricted_ops ) - echo implode(", ", $restricted_ops); - - break; - - case 'termroles': - $role_names = array(); - - if ( isset($scoper->have_termrole_ids['post'][$id]) ) { - foreach ( array_keys($scoper->have_termrole_ids['post'][$id]) as $role_handle) - if ( 'rs' == SCOPER_ROLE_TYPE ) - $role_names []= str_replace( ' ', ' ', $scoper->role_defs->get_micro_abbrev($role_handle) ); - else - $role_names []= str_replace( ' ', ' ', $scoper->role_defs->get_abbrev($role_handle) ); - - sort($role_names); - echo implode(", ", $role_names); - } - break; - - case 'objroles': - $role_names = array(); - - if ( isset($scoper->have_objrole_ids['post'][$id]) ) { - foreach ( array_keys($scoper->have_objrole_ids['post'][$id]) as $role_handle) - $role_names []= str_replace( ' ', ' ', $scoper->role_defs->get_micro_abbrev($role_handle, OBJECT_UI_RS) ); - - sort($role_names); - echo implode(", ", $role_names); - } - break; - } - } - - function act_maybe_hide_quickedit() { - global $current_user, $scoper; - - $reqd_cap = ( strpos($_SERVER['SCRIPT_NAME'], 'p-admin/edit-pages.php') ) ? array('edit_others_pages', 'edit_published_pages') : array('edit_others_posts', 'edit_published_posts'); - - if ( is_content_administrator_rs() ) - return; - - $qualifying_roles = $scoper->role_defs->qualify_roles($reqd_cap); - if ( ! array_intersect_key($qualifying_roles, $current_user->blog_roles[ANY_CONTENT_DATE_RS]) ) - echo "
    "; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui_rs.php deleted file mode 100644 index b47c32d..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-ui_rs.php +++ /dev/null @@ -1,234 +0,0 @@ -scoper =& $scoper; - - $current_script = $_SERVER['SCRIPT_NAME']; - $item_edit_scripts = apply_filters( 'item_edit_scripts_rs', array('p-admin/post-new.php', 'p-admin/post.php', 'p-admin/page.php', 'p-admin/page-new.php', 'p-admin/categories.php') ); - $item_edit_scripts []= 'p-admin/admin-ajax.php'; - - foreach( $item_edit_scripts as $edit_script ) { - if ( strpos( $current_script, $edit_script ) ) { - require_once( 'filters-admin-ui-item_rs.php' ); - $scoper->filters_admin_item_ui = new ScoperAdminFiltersItemUI(); - break; - } - } - - if ( awp_ver('2.7-dev') ) - add_action( '_admin_menu', array(&$this, 'act_admin_menu') ); - else { - require_once( 'filters-admin-legacy_rs.php' ); - add_action( '_admin_menu', array('ScoperAdminFilters_Legacy', 'act_admin_menu_26') ); - } - - add_action('admin_head', array(&$this, 'ui_hide_admin_divs') ); - - if ( is_user_administrator_rs() || strpos($_SERVER['REQUEST_URI'], 'admin.php?page=rs-') ) - add_action('in_admin_footer', array(&$this, 'ui_admin_footer') ); - - if ( GROUP_ROLES_RS ) { - add_action('show_user_profile', array(&$this, 'ui_user_groups'), 2); - add_action('edit_user_profile', array(&$this, 'ui_user_groups'), 2); - add_action('edit_group_profile_rs', array(&$this, 'ui_group_roles'), 10); - } - - add_action('show_user_profile', array(&$this, 'ui_user_roles'), 2); - add_action('edit_user_profile', array(&$this, 'ui_user_roles'), 2); - - $script_name = $_SERVER['SCRIPT_NAME']; - - if ( strpos($_SERVER['SCRIPT_NAME'], 'role-management.php') && empty($_POST) ) - add_filter( 'capabilities_list', array(&$this, 'flt_capabilities_list') ); // capabilities_list is a Role Manager hook - - //temporary solution to alert user of filtering performed on saved page - see corresponding code in hardway-admin - if ( strpos($script_name, 'p-admin/page.php') || strpos($script_name, 'p-admin/page-new.php') || strpos($script_name, 'p-admin/edit-pages.php') ) { - global $current_user; - if ( $notice = get_option("scoper_notice_{$current_user->ID}") ) { - delete_option( "scoper_notice_{$current_user->ID}" ); - rs_notice($notice); - } - } - } // end class constructor - - // remove "Write Post" / "Write Page" menu items if user only has role for certain existing objects - function act_admin_menu() { - global $submenu; - - if ( isset($submenu['edit.php'][10]) ) { - $this->scoper->ignore_object_roles = true; - if ( ! current_user_can( 'edit_posts' ) ) - unset( $submenu['edit.php'][10] ); - - $this->scoper->ignore_object_roles = false; - } - - if ( isset($submenu['edit-pages.php'][10]) ) { - $this->scoper->ignore_object_roles = true; - if ( ! current_user_can( 'edit_pages' ) ) - unset( $submenu['edit-pages.php'][10] ); - - $this->scoper->ignore_object_roles = false; - } - - if ( isset($submenu['link-manager.php'][10]) ) { - $this->scoper->ignore_object_roles = true; - if ( ! current_user_can( 'manage_links' ) ) - unset( $submenu['link-manager.php'][10] ); - - $this->scoper->ignore_object_roles = false; - } - } - - function ui_hide_admin_divs() { - // Determine data source based on URI - // However, this will only consider URIs included in Scoped_Data_Source->users_where_reqd_caps - if ( ! ( $context = $this->scoper->admin->get_context() ) || empty($context->source ) || empty($context->object_type_def ) ) - return; - - $src_name = $context->source->name; - $object_type = $context->object_type_def->name; - - - // For this data source, is there any html content to hide from non-administrators? - $css_ids = scoper_get_otype_option('admin_css_ids', $src_name, $object_type); - $css_ids = str_replace(' ', '', $css_ids); - $css_ids = str_replace(',', ';', $css_ids); - $css_ids = explode(';', $css_ids); // option storage is as semicolon-delimited string - - if ( empty($css_ids) ) - return; - - $object_id = $this->scoper->data_sources->detect('id', $src_name, '', $object_type); - - $can_edit_blogwide = $this->scoper->admin->user_can_edit_blogwide($src_name, $object_type); - - $blogwide_requirement = scoper_get_option('hide_non_editor_admin_divs'); - - if ( 'admin_option' == $blogwide_requirement ) - $blogwide_requirement_met = is_option_administrator_rs(); - - elseif ( 'admin_user' == $blogwide_requirement ) - $blogwide_requirement_met = is_user_administrator_rs(); - - elseif ( 'admin_content' == $blogwide_requirement ) - $blogwide_requirement_met = is_content_administrator_rs(); - - elseif ( 'editor' == $blogwide_requirement ) - $blogwide_requirement_met = $this->scoper->admin->user_can_edit_blogwide($src_name, $object_type, array( 'status' => 'published', 'require_others_cap' => true ) ); - - elseif ( 'author' == $blogwide_requirement ) - $blogwide_requirement_met = $this->scoper->admin->user_can_edit_blogwide($src_name, $object_type, array( 'status' => 'published' ) ); - - elseif ( $blogwide_requirement ) - $blogwide_requirement_met = $can_edit_blogwide; - else - $blogwide_requirement_met = true; - - if ( $can_edit_blogwide && $blogwide_requirement_met ) { - // don't hide anything if a user with sufficient blog-wide role is creating a new object - if ( ! $object_id ) - return; - - if ( ! $object = $this->scoper->data_sources->get_object($src_name, $object_id) ) - return; - - if ( ('post' == $src_name ) && empty($object->post_date) ) // don't prevent the full editing of new posts/pages - return; - - // don't hide anything if a user with sufficient blog-wide role is editing their own object - if ( ! empty($col_owner) ) { - global $current_user; - if ( empty($object->$col_owner) || ( $object->$col_owner == $current_user->ID) ) - return; - } - } - - - if ( ( $blogwide_requirement && ! $blogwide_requirement_met ) || ! $this->scoper->admin->user_can_admin_object($src_name, $object_type, $object_id, '', '', true) ) { - - if ( ! awp_ver('2.7-dev') ) // side-info with related posts, links, etc. - echo "\n\n\n"; - - echo( "\n\n"; - } - - } - - function ui_admin_footer() { - echo '' . __('Role Scoper', 'scoper') . ' ' . SCOPER_VERSION . ' | ' . '' . __('Support Forum', 'scoper') . ' '; - } - - function ui_user_groups() { - if ( ! is_user_administrator_rs() && ! scoper_get_option( 'display_user_profile_groups' ) ) - return; - - include_once('profile_ui_rs.php'); - ScoperProfileUI::display_ui_user_groups(); - } // end function act_edit_user_groups - - - function ui_group_roles($group_id) { - if ( ! $group_id ) - return; - - include_once('profile_ui_rs.php'); - ScoperProfileUI::display_ui_group_roles($group_id); - } - - function ui_user_roles() { - if ( ! is_user_administrator_rs() && ! scoper_get_option( 'display_user_profile_roles' ) ) - return; - - global $profileuser, $current_user; - - $profile_user_rs = ( $profileuser->ID == $current_user->ID ) ? $current_user : new WP_Scoped_User($profileuser->ID); - - include_once('profile_ui_rs.php'); - ScoperProfileUI::display_ui_user_roles($profile_user_rs); - } - - function flt_capabilities_list($unused) { - echo '

    '; - _e("Note: Role Manager settings determine each user's default blog-wide capabilities. Since the Role Scoper plugin is also enabled, Term-specific or Object-specific Role Assignments may increase or decrease a user's actual capabilities.", 'scoper'); - echo '

    '; - - return $unused; - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin-users_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin-users_rs.php deleted file mode 100644 index 0890fca..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin-users_rs.php +++ /dev/null @@ -1,72 +0,0 @@ - true) ) ) { - - $group_names = array(); - foreach ( $group_ids as $group_id ) { - foreach ( $all_groups as $group ) { - if ( $group_id == $group->ID ) { - $group_names [$group->display_name] = $group_id; - break; - } - } - } - - if ( $group_names ) { - uksort($group_names, "strnatcasecmp"); - - foreach( $group_names as $name => $id ) - $group_names[$name] = "$name"; - - return implode(", ", $group_names); - } - } - } - } - - function act_rolemanager_referer($action) { - // Role Manager referers - if ( strpos($action, 'rolemanager') ) { // don't search for 1st char or strpos will return zero - - // Role Manager plugin renamed a WP role - if ( $pos = strpos($action, 'rename_role_') ) { - if ( ! strpos($action, 'rename_role_form') ) { - $role_name = substr($action, $pos + strlen('rename_role_') ); - ScoperAdminLib::rename_role($role_name, 'wp'); - } - } - } - } -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/filters-admin_rs.php b/blog/wp-content/plugins/role-scoper/admin/filters-admin_rs.php deleted file mode 100644 index d53acd3..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/filters-admin_rs.php +++ /dev/null @@ -1,584 +0,0 @@ -data_sources->get_all() as $src_name => $src ) { - if ( ! empty($src->admin_actions) ) - foreach ( $src->admin_actions as $rs_hook => $original_hook ) - $rs_actions[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$src_name', '' " ); - - if ( ! empty($src->admin_filters) ) - foreach ( $src->admin_filters as $rs_hook => $original_hook ) - $rs_filters[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$src_name', '' " ); - - // also register hooks that are specific to one object type - foreach ( $src->object_types as $object_type => $otype_def ) { - if ( ! empty($otype_def->admin_actions) ) { - foreach ( $otype_def->admin_actions as $rs_hook => $original_hook ) - $rs_actions[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$src_name', array( 'object_type' => '$object_type' ) " ); - } - - if ( ! empty($otype_def->admin_filters) ) - foreach ( $otype_def->admin_filters as $rs_hook => $original_hook ) - $rs_filters[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$src_name', array( 'object_type' => '$object_type' ) " ); - } - } //foreach data_sources - - // Register our abstract handlers to create_category, edit_category, delete_category and corresponding hooks from other taxonomies. - // (supports WP taxonomies AND custom taxonomies) - // see core_default_taxonomies() and Scoped_Taxonomies::process() for default hook names - foreach ( $scoper->taxonomies->get_all() as $taxonomy => $tx ) { - if ( ! empty($tx->admin_actions) ) - foreach ( $tx->admin_actions as $rs_hook => $original_hook ) - $rs_actions[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$taxonomy', '' " ); - - if ( ! empty($tx->admin_filters) ) - foreach ( $tx->admin_filters as $rs_hook => $original_hook ) - $rs_filters[$original_hook] = (object) array( 'name' => "{$rs_hook}_rs", 'rs_args' => "'$taxonomy', '' " ); - } - - // call our abstract handlers with a lambda function that passes in original hook name - $hook_order = ( defined('WPCACHEHOME') ) ? -1 : 50; // WP Super Cache's early create_post / edit_post handlers clash with Role Scoper - - foreach ( $rs_actions as $original_hook => $rs_hook ) { - if ( ! $original_hook ) continue; - $orig_hook_numargs = 1; - $arg_str = agp_get_lambda_argstring($orig_hook_numargs); - $comma = ( $rs_hook->rs_args ) ? ',' : ''; - $func = "do_action( '$rs_hook->name', $rs_hook->rs_args $comma $arg_str );"; - //echo "adding action: $original_hook -> $func
    "; - add_action( $original_hook, create_function( $arg_str, $func ), $hook_order, $orig_hook_numargs ); - } - - foreach ( $rs_filters as $original_hook => $rs_hook ) { - if ( ! $original_hook ) continue; - $orig_hook_numargs = 1; - $arg_str = agp_get_lambda_argstring($orig_hook_numargs); - $comma = ( $rs_hook->rs_args ) ? ',' : ''; - $func = "return apply_filters( '$rs_hook->name', $arg_str $comma $rs_hook->rs_args );"; - //echo "adding filter: $original_hook -> $func
    "; - add_filter( $original_hook, create_function( $arg_str, $func ), 50, $orig_hook_numargs ); - } - - - // WP 2.5 throws a notice if plugins add their own hooks without prepping the global array - // Source or taxonomy-specific hooks are mapped to these based on config member properties - // in WP_Scoped_Data_Sources::process() and WP_Scoped_Taxonomies:process() - $setargs = array( 'is_global' => true ); - $setkeys = array ( - 'create_object_rs', 'edit_object_rs', 'save_object_rs', 'delete_object_rs', - 'create_term_rs', 'edit_term_rs', 'save_term_rs', 'delete_term_rs' - ); - - add_action('create_object_rs', array(&$this, 'mnt_create_object'), 10, 4); - add_action('edit_object_rs', array(&$this, 'mnt_edit_object'), 10, 4); - add_action('save_object_rs', array(&$this, 'mnt_save_object'), 10, 4); - add_action('delete_object_rs', array(&$this, 'mnt_delete_object'), 10, 3); - - // these will be used even if the taxonomy in question is not a WP core taxonomy (i.e. even if uses a custom schema) - add_action('create_term_rs', array(&$this, 'mnt_create_term'), 10, 4); - add_action('edit_term_rs', array(&$this, 'mnt_edit_term'), 10, 4); - add_action('delete_term_rs', array(&$this, 'mnt_delete_term'), 10, 3); - - - // -------- Predefined WP User/Post/Page admin actions / filters ---------- - // user maintenace - add_action('profile_update', array('ScoperAdminLib', 'sync_wproles') ); - add_filter('user_has_cap', array(&$this, 'flt_has_edit_user_cap'), 99, 3 ); - add_filter('editable_roles', array(&$this, 'flt_editable_roles'), 99 ); - - if ( IS_MU_RS ) { - add_action('add_user_to_blog', array(&$this, 'act_add_user_to_blog'), 10, 3); - add_action('remove_user_from_blog', array('ScoperAdminLib', 'delete_users'), 10, 2 ); - } else { - add_action('user_register', array(&$this, 'act_user_register') ); // applies default group(s), calls sync_wproles - add_action('delete_user', array('ScoperAdminLib', 'delete_users') ); - } - - if ( GROUP_ROLES_RS ) - add_action('profile_update', array(&$this, 'act_update_user_groups')); - - // log previous post status (or other properties) prior to update - add_action( 'pre_post_update', array(&$this, 'act_log_post_status') ); - - // Filtering of Page Parent selection: - add_filter('pre_post_status', array(&$this, 'flt_post_status'), 50, 1); - add_filter('pre_post_parent', array(&$this, 'flt_page_parent'), 50, 1); - - // Filtering of terms selection: - add_action('check_admin_referer', array(&$this, 'act_detect_post_presave')); // abuse referer check to work around a missing hook - - add_filter('pre_object_terms_rs', array(&$this, 'flt_pre_object_terms'), 50, 3); - - // added this with WP 2.7 because QuickPress does not call pre_post_category - if ( strpos($_SERVER['SCRIPT_NAME'], 'p-admin/index.php' ) && ! is_content_administrator_rs() && awp_ver('2.7-dev') ) // this conflicts with filter_terms_for_status if it runs on post save. TODO: why? - add_filter('pre_option_default_category', array(&$this, 'flt_default_category') ); - - // Follow up on role creation / deletion by Role Manager, Capability Manager or other equivalent plugin - // Role Manager / Capability Manager don't actually modify the stored role def until after the option update we're hooking on, so defer our maintenance operation - global $wpdb; - add_action( "update_option_{$wpdb->prefix}user_roles", array('ScoperAdminLib', 'schedule_role_sync') ); - - add_filter( 'posts_fields', array(&$this, 'flt_posts_fields') ); - - - // TODO: make this optional - // include private posts in the post count for each term - global $wp_taxonomies; - foreach ( $wp_taxonomies as $key => $t ) { - if ( isset($t->update_count_callback) && ( '_update_post_term_count' == $t->update_count_callback ) ) - $wp_taxonomies[$key]->update_count_callback = 'scoper_update_post_term_count'; - } - } - - function act_log_post_status( $post_id ) { - if ( $post = get_post( $post_id ) ) - $this->last_post_status[$post->ID] = $post->post_status; - } - - // optional filter for WP role edit based on user level - function flt_editable_roles( $roles ) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) || ! scoper_get_option('limit_user_edit_by_level') ) - return $roles; - - require_once( 'user_lib_rs.php' ); - return ScoperUserEdit::editable_roles( $roles ); - } - - - function flt_has_edit_user_cap($wp_blogcaps, $orig_reqd_caps, $args) { - // Optionally, prevent anyone from editing a user whose level is higher than their own - if ( ! defined( 'DISABLE_QUERYFILTERS_RS' ) && in_array( 'edit_users', $orig_reqd_caps ) && ! empty($args[2]) ) { - if ( scoper_get_option('limit_user_edit_by_level') ) { - require_once( 'user_lib_rs.php' ); - $wp_blogcaps = ScoperUserEdit::has_edit_user_cap( $wp_blogcaps, $orig_reqd_caps, $args ); - } - } - - return $wp_blogcaps; - } - - function flt_posts_fields($cols) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return $cols; - - if ( - ( defined( 'SCOPER_EDIT_PAGES_LEAN' ) && strpos(urldecode($_SERVER['REQUEST_URI']), 'wp-admin/edit-pages.php') ) - || ( defined( 'SCOPER_EDIT_POSTS_LEAN' ) && strpos(urldecode($_SERVER['REQUEST_URI']), 'wp-admin/edit.php') ) - ) { - global $wpdb; - $cols = "$wpdb->posts.ID, $wpdb->posts.post_author, $wpdb->posts.post_date, $wpdb->posts.post_date_gmt, $wpdb->posts.post_title, $wpdb->posts.post_status, $wpdb->posts.comment_status, $wpdb->posts.ping_status, $wpdb->posts.post_password, $wpdb->posts.post_name, $wpdb->posts.to_ping, $wpdb->posts.pinged, $wpdb->posts.post_parent, $wpdb->posts.post_modified, $wpdb->posts.post_modified_gmt, $wpdb->posts.guid, $wpdb->posts.post_type, $wpdb->posts.post_mime_type, $wpdb->posts.menu_order, $wpdb->posts.comment_count"; - } - - return $cols; - } - - // Filtering of Page Parent selection. - // This is a required after-the-fact operation for WP < 2.7 (due to inability to control inclusion of Main Page in UI dropdown) - // For WP >= 2.7, it is an anti-hacking precaution - // - // There is currently no way to explictly restrict or grant Page Association rights to Main Page (root). Instead: - // * Require blog-wide edit_others_pages cap for association of a page with Main - // * If an unqualified user tries to associate or un-associate a page with Main Page, - // revert page to previously stored parent if possible. Otherwise set status to "unpublished". - function flt_post_status ($status) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return $status; - - require_once('filters-admin-save_rs.php'); - return scoper_flt_post_status($status); - } - - // Enforce any page parent filtering which may have been dictated by the flt_post_status filter, which executes earlier. - function flt_page_parent ($parent_id) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return $parent_id; - - require_once('filters-admin-save_rs.php'); - return scoper_flt_page_parent($parent_id); - } - - - function act_detect_post_presave($action) { - // for post update with no post categories checked, insert a fake category so WP core doesn't force default category - // (flt_pre_object_terms will first restore any existing postcats dropped due to user's lack of permissions) - if ( 0 === strpos($action, 'update-post_') ) { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) ) - return; - - if ( empty($_POST['post_category']) && ! is_content_administrator_rs() ) { - $_POST['post_category'] = array(-1); - } - } - } - - function flt_pre_object_terms ($selected_terms, $taxonomy, $args = '') { - if ( defined( 'DISABLE_QUERYFILTERS_RS' ) || did_action('tdomf_create_post_start') ) // don't filter out a category that was added by TDO Mini Forms - return $selected_terms; - - require_once('filters-admin-save_rs.php'); - return scoper_flt_pre_object_terms($selected_terms, $taxonomy, $args); - } - - // This handler is meant to fire whenever an object is inserted or updated. - // If the client does use such a hook, we will force it by calling internally from mnt_create and mnt_edit - function mnt_save_object($src_name, $args, $object_id, $object = '') { - //rs_errlog( 'mnt_save_object' ); - - if ( defined( 'RVY_VERSION' ) ) { - global $revisionary; - - if ( ! empty($revisionary->admin->revision_save_in_progress) ) { - $revisionary->admin->revision_save_in_progress = false; - return; - } - } - - require_once('filters-admin-save_rs.php'); - scoper_mnt_save_object($src_name, $args, $object_id, $object); - } - - // This handler is meant to fire only on updates, not new inserts - function mnt_edit_object($src_name, $args, $object_id, $object = '') { - static $edited_objects; - - if ( ! isset($edited_objects) ) - $edited_objects = array(); - - // so this filter doesn't get called by hook AND internally - if ( isset($edited_objects[$src_name][$object_id]) ) - return; - - $edited_objects[$src_name][$object_id] = 1; - - // call save handler directly in case it's not registered to a hook - $this->mnt_save_object($src_name, $args, $object_id, $object); - } - - function mnt_delete_object($src_name, $args, $object_id) { - $object = ''; - - $defaults = array( 'object_type' => '', 'object' => '' ); - $args = array_intersect_key( $defaults, (array) $args ); - extract($args); - - if ( ! $object_id ) - return; - - // could defer role/cache maint to speed potential bulk deletion, but script may be interrupted before admin_footer - $this->item_deletion_aftermath( OBJECT_SCOPE_RS, $src_name, $object_id ); - - if ( empty($object_type) ) - $object_type = scoper_determine_object_type($src_name, $object_id); - - if ( 'page' == $object_type ) { - delete_option('scoper_page_ancestors'); - scoper_flush_cache_groups('get_pages'); - } - - scoper_flush_roles_cache(OBJECT_SCOPE_RS); - } - - function mnt_create_object($src_name, $args, $object_id, $object = '') { - $defaults = array( 'object_type' => '' ); - $args = array_intersect_key( $defaults, (array) $args ); - extract($args); - - static $inserted_objects; - - if ( ! isset($inserted_objects) ) - $inserted_objects = array(); - - // so this filter doesn't get called by hook AND internally - if ( isset($inserted_objects[$src_name][$object_id]) ) - return; - - - global $scoper; - - if ( empty($object_type) ) - if ( $col_type = $scoper->data_sources->member_property($src_name, 'cols', 'type') ) - $object_type = ( isset($object->$col_type) ) ? $object->$col_type : ''; - - if ( empty($object_type) ) { - if ( ! isset( $object ) ) - $object = ''; - - $object_type = scoper_determine_object_type($src_name, $object_id, $object); - } - - if ( $object_type == 'revision' ) - return; - - $inserted_objects[$src_name][$object_id] = 1; - - if ( 'page' == $object_type ) { - delete_option('scoper_page_ancestors'); - scoper_flush_cache_groups('get_pages'); - } - } - - function mnt_create_term($taxonomy, $args, $term_id, $term = '') { - $this->mnt_save_term($taxonomy, $args, $term_id, $term); - - scoper_term_cache_flush(); - delete_option( "{$taxonomy}_children_rs" ); - delete_option( "{$taxonomy}_ancestors_rs" ); - } - - function mnt_edit_term($taxonomy, $args, $term_ids, $term = '') { - static $edited_terms; - - if ( ! isset($edited_terms) ) - $edited_terms = array(); - - // bookmark edit passes an array of term_ids - if ( ! is_array($term_ids) ) - $term_ids = array($term_ids); - - foreach ( $term_ids as $term_id ) { - // so this filter doesn't get called by hook AND internally - if ( isset($edited_terms[$taxonomy][$term_id]) ) - return; - - $edited_terms[$taxonomy][$term_id] = 1; - - // call save handler directly in case it's not registered to a hook - $this->mnt_save_term($taxonomy, $term_id, $term); - } - } - - // This handler is meant to fire whenever a term is inserted or updated. - // If the client does use such a hook, we will force it by calling internally from mnt_create and mnt_edit - function mnt_save_term($taxonomy, $args, $term_id, $term = '') { - require_once('filters-admin-save_rs.php'); - scoper_mnt_save_term($taxonomy, $args, $term_id, $term); - } - - function mnt_delete_term($taxonomy, $args, $term_id) { - global $wpdb; - - if ( ! $term_id ) - return; - - // could defer role/cache maint to speed potential bulk deletion, but script may be interrupted before admin_footer - $this->item_deletion_aftermath( TERM_SCOPE_RS, $taxonomy, $term_id ); - - delete_option( "{$taxonomy}_children_rs" ); - delete_option( "{$taxonomy}_ancestors_rs" ); - - scoper_term_cache_flush(); - scoper_flush_roles_cache(TERM_SCOPE_RS, '', '', $taxonomy); - scoper_flush_cache_flag_once("rs_$taxonomy"); - } - - function item_deletion_aftermath( $scope, $src_or_tx_name, $obj_or_term_id ) { - global $wpdb; - - // delete role assignments for deleted term - if ( $ass_ids = scoper_get_col("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE src_or_tx_name = '$src_or_tx_name' AND scope = '$scope' AND obj_or_term_id = '$obj_or_term_id'") ) { - $id_in = "'" . implode("', '", $ass_ids) . "'"; - scoper_query("DELETE FROM $wpdb->user2role2object_rs WHERE assignment_id IN ($id_in)"); - - // Propagated roles will be converted to direct-assigned roles if the original progenetor goes away. Removal of a "link" in the parent/child propagation chain has no effect. - scoper_query("UPDATE $wpdb->user2role2object_rs SET inherited_from = '0' WHERE inherited_from IN ($id_in)"); - } - - if ( $req_ids = scoper_get_col("SELECT requirement_id FROM $wpdb->role_scope_rs WHERE topic = '$scope' AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id = '$obj_or_term_id'") ) { - $id_in = "'" . implode("', '", $req_ids) . "'"; - - scoper_query("DELETE FROM $wpdb->role_scope_rs WHERE requirement_id IN ($id_in)"); - - // Propagated requirements will be converted to direct-assigned roles if the original progenetor goes away. Removal of a "link" in the parent/child propagation chain has no effect. - scoper_query("UPDATE $wpdb->role_scope_rs SET inherited_from = '0' WHERE inherited_from IN ($id_in)"); - } - } - - function act_update_user_groups($user_id) { - //check_admin_referer('scoper-edit_usergroups'); - - if ( empty( $_POST['rs_editing_user_groups'] ) ) // otherwise we'd delete group assignments if another plugin calls do_action('profile_update') unexpectedly - return; - - global $current_user; - - if ( $user_id == $current_user->ID ) - $stored_groups = $current_user->groups; - else { - $user = new WP_Scoped_User($user_id, '', array( 'skip_role_merge' => 1 ) ); - $stored_groups = $user->groups; - } - - // by retrieving filtered groups here, user will only modify membership for groups they can administer - $editable_group_ids = ScoperAdminLib::get_all_groups(FILTERED_RS, COL_ID_RS); - - $posted_groups = ( isset($_POST['group']) ) ? $_POST['group'] : array(); - - if ( ! empty($_POST['groups_csv']) ) { - if ( $csv_for_item = ScoperAdminLib::agent_ids_from_csv( 'groups_csv', 'groups' ) ) - $posted_groups = array_merge($posted_groups, $csv_for_item); - } - - foreach ($editable_group_ids as $group_id) { - if( in_array($group_id, $posted_groups) ) { // checkbox is checked - if( ! isset($stored_groups[$group_id]) ) - ScoperAdminLib::add_group_user($group_id, $user_id); - - } elseif( isset($stored_groups[$group_id]) ) { - ScoperAdminLib::remove_group_user($group_id, $user_id); - } - } - } - - function act_add_user_to_blog( $user_id, $role_name = '', $blog_id = '' ) { - // enroll user in default group(s) - if ( $default_groups = scoper_get_option( 'default_groups' ) ) - foreach ($default_groups as $group_id) - ScoperAdminLib::add_group_user($group_id, $user_id); - - global $scoper_role_types; - - foreach ( $scoper_role_types as $role_type ) { - wpp_cache_flush_group("{$role_type}_users_who_can"); - wpp_cache_flush_group("{$role_type}_groups_who_can"); - } - - ScoperAdminLib::sync_wproles( $user_id, $role_name, $blog_id ); - } - - function act_user_register( $user_id ) { - $this->act_add_user_to_blog( $user_id ); - } - - // added this with WP 2.7 because QuickPress does not call pre_post_category - function flt_default_category($default_cat_id) { - require_once('filters-admin-save_rs.php'); - - // support an array of default IDs (but don't require it) - $filtered_default_cat_ids = (array) $default_cat_id; - - $user_terms = array(); // will be returned by filter_terms_for_status - - $filtered_default_cat_ids = scoper_filter_terms_for_status('category', $filtered_default_cat_ids, $user_terms); - - //rs_errlog( 'flt_default_category' ); - //rs_errlog( serialize($filtered_default_cat_ids) ); - - // if the default term is not in user's subset of usable terms, substitute first available - if ( ( ! $filtered_default_cat_ids || ! $filtered_default_cat_ids[0] ) && $user_terms ) - return $user_terms[0]; - - if ( count($filtered_default_cat_ids) > 1 ) // won't return an array unless an array was passed in and more than one of its elements is usable by this user - return $filtered_default_cat_ids; - else - return $filtered_default_cat_ids[0]; // if a single cat ID was passed in and is permitted, it is returned here - } -} // end class - - -function init_role_assigner() { - global $scoper_role_assigner; - - if ( ! isset($scoper_role_assigner) ) { - require_once('role_assigner_rs.php'); - $scoper_role_assigner = new ScoperRoleAssigner(); - } - - return $scoper_role_assigner; -} - -function scoper_flush_cache_flag_once ($cache_flag) { - static $flushed_wpcache_flags; - - if ( ! isset($flushed_wpcache_flags) ) - $flushed_wpcache_flags = array(); - - if ( ! isset( $flushed_wpcache_flags[$cache_flag]) ) { - wpp_cache_flush_group($cache_flag); - $flushed_wpcache_flags[$cache_flag] = true; - } -} - -// flush a specified portion of Role Scoper's persistant cache -function scoper_flush_cache_groups($base_cache_flag) { - global $scoper_role_types; - - foreach ( $scoper_role_types as $role_type ) { - scoper_flush_cache_flag_once($role_type . '_' . $base_cache_flag . '_for_groups' ); - scoper_flush_cache_flag_once($role_type . '_' . $base_cache_flag . '_for_user' ); - scoper_flush_cache_flag_once($role_type . '_' . $base_cache_flag . '_for_ug' ); - } -} - -function scoper_term_cache_flush() { - // flush_cache_groups will expand this base flag to "rs_get_terms_for_user", etc. - scoper_flush_cache_groups('get_terms'); - scoper_flush_cache_groups('scoper_get_terms'); - - scoper_flush_cache_flag_once('all_terms'); - - // TODO: don't flush get_pages cache on modification of taxonomies other than category - if ( scoper_get_otype_option( 'use_term_roles', 'post', 'page' ) ) - scoper_flush_cache_groups('get_pages'); -} - -function scoper_determine_object_type($src_name, $object_id, $object = '') { - global $scoper; - - if ( is_object($object) ) { - $col_type = $scoper->data_sources->member_property($src_name, 'cols', 'type'); - if ( $col_type && isset($object->$col_type) ) { - $object_type_val = $object->$col_type; - $object_type = $scoper->data_sources->get_from_val('type', $object_type_val, $src_name); - } - } - - if ( empty($object_type) ) - $object_type = $scoper->data_sources->detect('type', $src_name, $object_id); - - return $object_type; -} - -// modifies WP core _update_post_term_count to include private posts in the count, since RS roles can grant access to them -function scoper_update_post_term_count( $terms ) { - global $wpdb; - - foreach ( (array) $terms as $term ) { - $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status IN ('publish', 'private') AND term_taxonomy_id = %d", $term ) ); - $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) ); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/flutter_helper_rs.php b/blog/wp-content/plugins/role-scoper/admin/flutter_helper_rs.php deleted file mode 100644 index 6a711f3..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/flutter_helper_rs.php +++ /dev/null @@ -1,71 +0,0 @@ -get_results($sql); - if (!isset($results)) - $results = array(); - - return $results; -} -*/ - - -if ( is_admin() && defined( 'FLUTTER_NAME' ) ) { - add_filter( 'panels_where_fp', array( 'ScoperFlutterHelper', 'flt_panels_where_fp' ) ); - add_action('admin_head-post-new.php', array('ScoperFlutterHelper', 'act_flutter_panel_access') ); - add_action('admin_head-page-new.php', array('ScoperFlutterHelper', 'act_flutter_panel_access') ); -} - -Class ScoperFlutterHelper { - function flt_panels_where_fp ( $where ) { - global $scoper; - - if ( $cat_ids = $scoper->get_terms( 'category', true, COL_ID_RS ) ) - $where .= " AND type != 'post' OR id IN ( SELECT panel_id FROM " . RC_CWP_TABLE_PANEL_CATEGORY . " WHERE cat_id IN ('" . implode( "','", $cat_ids ) . "') )"; - else - $where .= " AND type != 'post' "; - - return $where; - } - - function act_flutter_panel_access() { - if ( ! isset( $_GET['custom-write-panel-id'] ) || is_content_administrator_rs() ) - return; - - // we currently only filter for post panels - if ( ! $panel = RCCWP_CustomWritePanel::Get( $_GET['custom-write-panel-id'] ) ) - return; - - if ( 'post' != $panel->type ) - return; - - global $scoper; - if ( $cat_ids = $scoper->get_terms( 'category', true, COL_ID_RS ) ) - if ( scoper_get_var( "SELECT panel_id FROM " . RC_CWP_TABLE_PANEL_CATEGORY . " WHERE cat_id IN ('" . implode( "','", $cat_ids ) . "') AND panel_id = '{$panel->id}'" ) ) - return; - - // don't block panel access if it's explicitly assigned via Panel cap - if ( current_user_can( $panel->capability_name ) ) - return; - - // user doesn't have access based on category or panel capability for requested custom Write Panel, so redirect to generic Write Post form - wp_redirect( 'post-new.php' ); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/general_roles.php b/blog/wp-content/plugins/role-scoper/admin/general_roles.php deleted file mode 100644 index c2d2e80..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/general_roles.php +++ /dev/null @@ -1,419 +0,0 @@ -users_who_can('', COLS_ID_DISPLAYNAME_RS); - - $agent_list_prefix[ROLE_BASIS_USER] = ''; -} - -if ( GROUP_ROLES_RS && ( $is_administrator ) ) { - $groups_url = 'admin.php?page=rs-groups'; - - if ( $agents[ROLE_BASIS_GROUPS] = ScoperAdminLib::get_all_groups(UNFILTERED_RS) ) { - $role_bases []= ROLE_BASIS_GROUPS; - $agent_list_prefix[ROLE_BASIS_GROUPS] = __('Groups') . ': '; - //$edit_groups_link = sprintf(_ x('%1$s define user groups%2$s', 'Args are link open, close tags', 'scoper'), "", ''); - $edit_groups_link = sprintf(__('%1$s define user groups%2$s', 'scoper'), "", ''); - } else - $edit_groups_link = sprintf(__('Note: To assign roles to user groups, first %1$s define the group(s)%2$s.', 'scoper'), "", ''); - //$edit_groups_link = sprintf(_ x('Note: To assign roles to user groups, first %1$s define the group(s)%2$s.', 'Args are link open, close tags', 'scoper'), "", ''); -} - -if ( empty($role_bases) ) - wp_die(__awp('Cheatin’ uh?')); - -$duration_limits_enabled = scoper_get_option('role_duration_limits'); -$content_date_limits_enabled = scoper_get_option('role_content_date_limits'); - -$agent_names = array(); -foreach ( $role_bases as $role_basis ) - foreach( $agents[$role_basis] as $agent ) - $agent_names[$role_basis][$agent->ID] = str_replace(' ', ' ', $agent->display_name); - -if ( count($role_bases) > 1 ) { - $agent_caption = __('User / Group', 'scoper'); - $agent_caption_plural = __('Users or Groups', 'scoper'); -} elseif ( isset($agents[ROLE_BASIS_USER]) ) { - $agent_caption = __('User', 'scoper'); - $agent_caption_plural = __awp('Users'); -} elseif ( isset($agents[ROLE_BASIS_GROUPS]) ) { - $agent_caption = __('Group', 'scoper'); - $agent_caption_plural = __('Groups', 'scoper'); -} - -echo ''; - -$err = 0; - -$role_codes = array(); //generate temporary numeric id for each defined role, to reduce html bulk -$i = 0; - -$role_defs = array(); - -$date_key = ''; // temp - -if ( 'rs' == SCOPER_ROLE_TYPE ) - -foreach( $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE) as $role_handle => $role_def) { // user can only view/assign roles they have - // instead of hiding unowned roles, just make them uneditable - //if ( $is_administrator || ! array_diff(array_keys($scoper->role_defs->role_caps[$role_handle]), $current_user->allcaps) ) { - $role_defs[$role_handle] = $role_def; - $role_codes[$role_handle] = $i; - $i++; - //} -} - -if ( isset($_POST['rs_submit']) ) : ?> - -

    - -

    - - - -

    - - - - start_date_gmt || ( $date_entries_gmt->end_date_gmt != SCOPER_MAX_DATE_STRING ) || ! empty( $_POST['start_date_gmt_keep-timestamp'] ) || ! empty( $_POST['end_date_gmt_keep-timestamp'] ) ); - $args[ 'set_role_duration' ] = (object) array( 'date_limited' => $is_limited, 'start_date_gmt' => $date_entries_gmt->start_date_gmt, 'end_date_gmt' => $date_entries_gmt->end_date_gmt ); - } - - if( $content_date_limits_enabled && ! empty($_POST['set_content_date_limits']) ) { - $is_limited = ( $date_entries_gmt->content_min_date_gmt || ( $date_entries_gmt->content_max_date_gmt != SCOPER_MAX_DATE_STRING ) || ! empty( $_POST['content_min_date_gmt_keep-timestamp'] ) || ! empty( $_POST['content_max_date_gmt_keep-timestamp'] ) ); - $args[ 'set_content_date_limits' ] = (object) array( 'content_date_limited' => $is_limited, 'content_min_date_gmt' => $date_entries_gmt->content_min_date_gmt, 'content_max_date_gmt' => $date_entries_gmt->content_max_date_gmt ); - } - - $role_assigner->assign_roles( BLOG_SCOPE_RS, '', 0, $blog_roles[$role_basis], $role_basis, $args ); - } // end foreach role basis - ?> - -

    - -

    - - __('Assign', 'scoper'), REMOVE_ASSIGNMENT_RS =>__('Remove', 'scoper') ); -?> -
    -

    -'; - _e("Supplement any user's blog-wide WordPress Role with additional, type-specific role(s). This does not alter the WordPress role.", 'scoper'); - echo '
    '; -} -?> -
    -admin->blogrole_scroll_links(); -//echo '
    '; - -// ============ Users / Groups Selection Display ================ -echo "

    "; -?> -

    - -
  • 1. '; -_e('Select Assignment Mode', 'scoper'); -echo '

  • '; - -$number = ( $duration_limits_enabled || $content_date_limits_enabled ) ? 5 : 4; - -echo '
  • ' . $number . '. '; -_e('Confirm and Submit', 'scoper'); -echo '

  • '; -echo ''; -?> - -
    • - -
    • - -
    • -
    • - -
    • -
    -

    -

    2. '; -//printf( _ x('Select %s to Modify', 'Users or Groups', 'scoper'), $agent_caption_plural ); -printf( __('Select %s to Modify', 'scoper'), $agent_caption_plural ); -echo '

    '; - -$args = array( 'suppress_extra_prefix' => true, 'filter_threshold' => 20, 'default_hide_threshold' => 20, 'check_for_incomplete_submission' => true ); -require_once('agents_checklist_rs.php'); -ScoperAgentsChecklist::all_agents_checklist($role_bases, $agents, $args); - -echo '

    '; -//=================== end users/groups selection display ==================== - -echo '

    '; - -if ( $duration_limits_enabled || $content_date_limits_enabled ) { - echo '

    3. '; - _e('Set Role Duration and/or Content Date Limits (optional)', 'scoper'); - echo '

    '; - - include_once( 'admin_lib-bulk_rs.php' ); - ScoperAdminBulkLib::display_date_limit_inputs( $duration_limits_enabled, $content_date_limits_enabled ); - - echo '

    4. '; -} else - echo '

    3. '; - -_e('Select Roles to Assign / Remove', 'scoper'); -echo '

    '; - -echo ""; -_e('select all roles', 'scoper'); -echo " | "; - -echo ""; -_e('unselect all roles', 'scoper'); -echo ' | '; - -if ( in_array(ROLE_BASIS_USER, $role_bases) ) { - echo ""; - _e('hide users', 'scoper'); - echo ' | '; -} - -if ( in_array(ROLE_BASIS_GROUPS, $role_bases) ) { - echo ""; - _e('hide groups', 'scoper'); - echo ' | '; -} - -// Hide Empty -$js_call = " -agp_display_marked_elements('li','no-role-li','none'); -agp_setcss('.no-role','display','none'); -agp_setcss('.user-csv','display','inline'); -agp_setcss('.groups-csv','display','inline'); -"; -echo ""; -_e('hide empty', 'scoper'); -echo ' | '; - -// Show All -$tr_display = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) ? 'block' : 'table-row'; -$js_call = " -agp_display_marked_elements('li','role-li','block'); -agp_setcss('.no-role','display','$tr_display'); -agp_setcss('.user-csv','display','inline'); -agp_setcss('.groups-csv','display','inline'); -"; -echo ""; -_e('show all', 'scoper'); -echo ''; - -$all_roles = array(); -$otype_source = array(); - -foreach ( $scoper->data_sources->get_all() as $src_name => $src) { - if ( ! empty($src->taxonomy_only) ) - continue; - - $include_taxonomy_otypes = true; - foreach ( $src->object_types as $object_type => $otype ) { - $otype_roles = array(); - $otype_roles[$object_type] = $scoper->role_defs->get_matching( SCOPER_ROLE_TYPE, $src_name, $object_type ); - $otype_source[$object_type] = $src_name; - - if ( $include_taxonomy_otypes ) { - if ( scoper_get_otype_option('use_term_roles', $src_name, $object_type) ) { - foreach ( $src->uses_taxonomies as $taxonomy) - if ( $tx_roles = $scoper->role_defs->get_matching( SCOPER_ROLE_TYPE, $src_name, $taxonomy ) ) - $otype_roles[$taxonomy] = $tx_roles; - - $include_taxonomy_otypes = false; - } - } - - if ( ! $otype_roles ) - continue; - - echo "

    "; - printf( __('Modify role assignments for %s', 'scoper'), strtolower($otype->display_name_plural) ); - echo '

    '; - - //display each role eligible for group/user assignment - $row_class = 'rs-backwhite'; - -?> -
    • - - - - - - - - - - $roles ) { - foreach ( $roles as $role_handle => $role) { - if ( ! empty($role->anon_only) ) - continue; - - $assignment_list = array(); - foreach ( $role_bases as $role_basis ) { - if ( is_array($blog_roles[$role_basis]) && isset($blog_roles[$role_basis][$role_handle]) ) { - $assignment_names = array_intersect_key($agent_names[$role_basis], $blog_roles[$role_basis][$role_handle]); - $assignment_list[$role_basis] = "" . $agent_list_prefix[$role_basis] - . ScoperAdminUI::role_assignment_list($blog_roles[$role_basis][$role_handle], $assignment_names, $role_basis) - . ''; - } - } - - $assignment_list = implode( '  ', $assignment_list); - - // retain previous selections in case of error ( user forgets to select groups/users ) - $val = $role_codes[$role_handle]; - $id = "$role_handle"; - $checked = ( $err && isset( $_POST['roles'] ) && in_array( $val, $_POST['roles'] ) ) ? 'checked="checked"' : ''; - - $skip_if_val = REMOVE_ASSIGNMENT_RS; - - // Does current user have this role blog-wide? - $is_admin_module = isset($otype_source[$object_type]) ? $otype_source[$object_type] : ''; - if ( is_administrator_rs($is_admin_module, 'user') || array_intersect_key( array($role_handle=>1), $current_user->blog_roles[$date_key]) ) { - $checked = ( $err && isset($_POST['roles']) && in_array($val, $_POST['roles']) ) ? 'checked="checked"' : ''; - $skip_if_val = REMOVE_ASSIGNMENT_RS; - $js_call = "agp_uncheck('" . implode(',', array_keys($roles)) . "',this.id,'assign_for','$skip_if_val');"; - $checkbox = ""; - $label = ""; - } else { - $checkbox = ''; - $label = str_replace(' ', ' ', $scoper->role_defs->get_display_name($role_handle) ); - } - - if ( ! isset($blog_roles[ROLE_BASIS_USER][$role_handle]) && ! isset($blog_roles[ROLE_BASIS_GROUPS][$role_handle]) ) - $role_class = " no-role"; - elseif ( ! isset($blog_roles[ROLE_BASIS_USER][$role_handle]) ) - $role_class = " no-user"; - elseif ( ! isset($blog_roles[ROLE_BASIS_GROUPS][$role_handle]) ) - $role_class = " no-groups"; - else - $role_class = ''; - - echo "\r\n" - . "" - . "" - . "" - . "" - . ""; - - $row_class = ( 'alternate' == $row_class ) ? 'rs-backwhite' : 'alternate'; - - } // end foreach role - } // foreach otype_role (distinguish object roles from term roles) - - echo '
      $checkbox$label$assignment_list
      '; - echo '
    '; - echo '
    '; - } // end foreach object_type -} // end foreach data source - -echo '' . __('top', 'scoper') . ''; - -?> -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/group_members.php b/blog/wp-content/plugins/role-scoper/admin/group_members.php deleted file mode 100644 index 3157d91..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/group_members.php +++ /dev/null @@ -1,153 +0,0 @@ - Members Tab - * It allows to manage the groups members (users) - ****************************************************/ - -require_once('groups-support.php'); - -$mode = $_REQUEST['mode']; - -if($mode == "update"){ - $group_temp = ScoperAdminLib::get_group($_REQUEST['id']); - UserGroups_tp::write( sprintf( __('%s group membership updated.', 'scoper'), $group_temp->display_name) ); -} - - -if($_REQUEST['id'] == "" && ($mode == "edit" || $mode == "update")) - UserGroups_tp::write( __('Invalid group.', 'scoper') ); - -$cancel = $_REQUEST['cancel']; -switch($cancel){ - case 1: - UserGroups_tp::write( __('Group members edit canceled.', 'scoper') ); - break; - default: - break; -} - -?> - -
    -0 ) { - echo "\n"; - echo "\n\t"; - echo "\n\t\t\n\t\t\n\t\t"; - echo "\n\t"; - - foreach ($results as $result) { - $alt = !$alt; - $style = ( $alt ) ? 'class=\'alternate\'' : 'margin: 1em 0 1em 0;'; - - echo ""; - } - echo "\n
    Group NameMembers 
    " . $result->display_name . ""; - - if( $members = ScoperAdminLib::get_group_members($result->ID) ) { - printf(_n( '%d user', '%d users', count($members), 'scoper' ), count($members) ); - echo '
    '; - - foreach ($members as $member) - echo "- ".$member->display_name. "
    "; - } else { - if ( $result->meta_id ) - _e('(automatic)', 'scoper'); - else - _e('(no users)', 'scoper'); - } - - echo "
    "; - - if ( ! $result->meta_id ) - echo "" . __awp('Edit') . ""; - - echo "
    "; - } else - echo "

    " . __('No groups available.', 'scoper') . "

    "; -} - -switch($mode){ - case "edit": - if(isset($_REQUEST['id'])){ - $groupID = $_REQUEST['id']; - - $group = ScoperAdminLib::get_group($groupID); - - if ( $group->meta_id && ! strpos($group->meta_id, '_ed_') ) - die( __('This meta group is automatically populated. You cannot manually add members to it.', 'scoper') ); - - echo "

    "; - printf( __('Edit members of %s group', 'scoper'), $group->display_name); - echo "

    "; - - echo '
    '; - wp_nonce_field( 'scoper-edit-group-members_' . $groupID ); - echo ''; - UserGroups_tp::group_members_checklist( $groupID ); - - ?>
    -
    - - -
    -
    - -' . __('Group Members', 'scoper') . ''); - - $groups_url = 'admin.php?page=rs-groups'; - echo "Back to Groups"; - - printGroupMembers(); -} -?>
    diff --git a/blog/wp-content/plugins/role-scoper/admin/groups-support.php b/blog/wp-content/plugins/role-scoper/admin/groups-support.php deleted file mode 100644 index 02cf559..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/groups-support.php +++ /dev/null @@ -1,292 +0,0 @@ -groups_rs ($wpdb->groups_name_col, $wpdb->groups_descript_col) VALUES ('$name','$description')"; - scoper_query( $insert ); - - wpp_cache_flush_group('all_usergroups'); - wpp_cache_flush_group('group_members' ); - wpp_cache_flush_group('usergroups_for_user'); - wpp_cache_flush_group('usergroups_for_groups'); - wpp_cache_flush_group('usergroups_for_ug'); - - do_action('created_group_rs', (int) $wpdb->insert_id); - - return (int) $wpdb->insert_id; - } - - - /** - * Removes a given group - * - * @param int $id - Identifier of the group to delete - * @param boolean True if the deletion is successful - **/ - function deleteGroup ($group_id){ - global $wpdb; - - $role_type = SCOPER_ROLE_TYPE; - - if( ! $group_id || ! UserGroups_tp::getGroup($group_id) ) - return false; - - do_action('delete_group_rs', $group_id); - - wpp_cache_flush_group( 'all_usergroups' ); - wpp_cache_flush_group( 'group_members' ); - wpp_cache_flush_group( 'usergroups_for_user' ); - wpp_cache_flush_group( 'usergroups_for_groups' ); - wpp_cache_flush_group( 'usergroups_for_ug' ); - - // first delete all cache entries related to this group - if ( $group_members = ScoperAdminLib::get_group_members( $group_id, COL_ID_RS ) ) { - $id_in = "'" . implode("', '", $group_members) . "'"; - $any_user_roles = scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE role_type = '$role_type' AND user_id IN ($id_in) LIMIT 1"); - - foreach ($group_members as $user_id ) - wpp_cache_delete( $user_id, 'group_membership_for_user' ); - } - - //if ( $got_blogrole = scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = 'blog' AND role_type = '$role_type' AND group_id = '$group_id' LIMIT 1") ) { - scoper_query("DELETE FROM $wpdb->user2role2object_rs WHERE scope = 'blog' AND role_type = '$role_type' AND group_id = '$group_id'"); - - scoper_flush_roles_cache( BLOG_SCOPE_RS, ROLE_BASIS_GROUPS ); - - if ( $any_user_roles ) - scoper_flush_roles_cache( BLOG_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $group_members ); - //} - - //if ( $got_taxonomyrole = scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = 'term' AND role_type = '$role_type' AND group_id = '$group_id' LIMIT 1") ) { - scoper_query("DELETE FROM $wpdb->user2role2object_rs WHERE scope = 'term' AND role_type = '$role_type' AND group_id = '$group_id'"); - - scoper_flush_roles_cache( TERM_SCOPE_RS, ROLE_BASIS_GROUPS ); - - if ( $any_user_roles ) - scoper_flush_roles_cache( TERM_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $group_members ); - //} - - //if ( $got_objectrole = scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE scope = 'object' AND role_type = '$role_type' AND group_id = '$group_id' LIMIT 1") ) { - scoper_query("DELETE FROM $wpdb->user2role2object_rs WHERE scope = 'object' AND role_type = '$role_type' AND group_id = '$group_id'"); - - scoper_flush_roles_cache( OBJECT_SCOPE_RS, ROLE_BASIS_GROUPS ); - - if ( $any_user_roles ) - scoper_flush_roles_cache( OBJECT_SCOPE_RS, ROLE_BASIS_USER_AND_GROUPS, $group_members ); - //} - - //if ( $got_blogrole || $got_taxonomyrole || $got_objectrole ) { - scoper_flush_results_cache( ROLE_BASIS_GROUPS ); - - if ( $any_user_roles ) - scoper_flush_results_cache( ROLE_BASIS_USER_AND_GROUPS, $group_members ); - //} - - $delete = "DELETE FROM $wpdb->groups_rs WHERE $wpdb->groups_id_col='$group_id'"; - scoper_query( $delete ); - - $delete = "DELETE FROM $wpdb->user2group_rs WHERE $wpdb->user2group_gid_col='$group_id'"; - scoper_query( $delete ); - - return true; - } - - /** - * Checks if a group with a given name exists - * - * @param string $name - Name of the group to test - * @return boolean True if the group exists, false otherwise. - **/ - function groupExists($name) { - global $wpdb; - - $query = "SELECT COUNT(*) FROM $wpdb->groups_rs WHERE $wpdb->groups_name_col = '$name'"; - $results = scoper_get_var( $query ); - - return $results != 0; - } - - /** - * Verifies if a group name is valid (for a new group) - * - * @param string $string - Name of the group - * @return boolean True if the name is valid, false otherwise. - **/ - function isValidName($string){ - if($string == "" || UserGroups_tp::groupExists($string)){ - return false; - } - return true; - } - - /** - * Updates an existing Group - * - * @param int $groupID - Group identifier - * @param string $name - Name of the group - * @param string $description - Group description (optional) - * @return boolean True on successful update - **/ - function updateGroup ($group_id, $name, $description = ''){ - global $wpdb; - - $description = strip_tags($description); - - if ( $prev = scoper_get_row("SELECT * FROM $wpdb->groups_rs WHERE $wpdb->groups_id_col='$group_id';") ) { - - if( ($prev->{$wpdb->groups_name_col} != $name) && ! UserGroups_tp::isValidName($name)) - return false; - - // don't allow updating of metagroup name / descript - if( $prev->meta_id ) - return false; - } - - do_action('update_group_rs', $group_id); - - $query = "UPDATE $wpdb->groups_rs SET $wpdb->groups_name_col = '$name', $wpdb->groups_descript_col='$description' WHERE $wpdb->groups_id_col='$group_id';"; - scoper_query( $query ); - - wpp_cache_flush_group('all_usergroups'); - wpp_cache_flush_group('group_members' ); - wpp_cache_flush_group('usergroups_for_user'); - wpp_cache_flush_group('usergroups_for_groups'); - wpp_cache_flush_group('usergroups_for_ug'); - - return true; - } - - - // Called once each for members checklist, managers checklist in admin UI. - // In either case, current (checked) members are at the top of the list. - function group_members_checklist( $group_id, $user_class = 'member', $all_users = '' ) { - global $scoper; - - if ( ! $all_users ) - $all_users = $scoper->users_who_can('', COLS_ID_DISPLAYNAME_RS); - - if ( $group_id ) - $group = ScoperAdminLib::get_group($group_id); - - if ( 'manager' == $user_class ) { - if ( $group_id ) { - $group_role_defs = $scoper->role_defs->qualify_roles( 'manage_groups'); - - require_once('role_assignment_lib_rs.php'); - $current_roles = ScoperRoleAssignments::organize_assigned_roles(OBJECT_SCOPE_RS, 'group', $group_id, array_keys($group_role_defs), ROLE_BASIS_USER); - - $current_roles = agp_array_flatten($current_roles, false); - - $current_ids = ( isset($current_roles['assigned']) ) ? $current_roles['assigned'] : array(); - } else - $current_ids = array(); - - $cap_name = ( defined( 'SCOPER_USER_ADMIN_CAP' ) ) ? constant( 'SCOPER_USER_ADMIN_CAP' ) : 'edit_users'; - $admin_ids = $scoper->users_who_can( $cap_name, COL_ID_RS ); - - $require_blogwide_editor = false; - - if ( ! empty($group) ) { - if ( ! strpos( $group->meta_id, '_nr_' ) ) { // don't limit manager selection for groups that don't have role assignments - $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only'); - } - } - - if ( 'admin' == $require_blogwide_editor ) { - $eligible_ids = $admin_ids; - - } elseif ( 'admin_content' == $require_blogwide_editor ) { - $cap_name = ( defined( 'SCOPER_CONTENT_ADMIN_CAP' ) ) ? constant( 'SCOPER_CONTENT_ADMIN_CAP' ) : 'activate_plugins'; - $eligible_ids = array_unique( array_merge( $admin_ids, $scoper->users_who_can( $cap_name, COL_ID_RS ) ) ); - - } elseif ( $require_blogwide_editor ) { - $post_editors = $scoper->users_who_can('edit_others_posts', COL_ID_RS); - $page_editors = $scoper->users_who_can('edit_others_pages', COL_ID_RS); - - $eligible_ids = array_unique( array_merge($post_editors, $page_editors, $admin_ids) ); - - } else - $eligible_ids = ''; - - } else { - $current_ids = ($group_id) ? array_flip(ScoperAdminLib::get_group_members($group_id, COL_ID_RS)) : array(); - - if ( ! empty($group) && in_array( $group->meta_id, array( 'rv_pending_rev_notice_ed_nr_', 'rv_scheduled_rev_notice_ed_nr_' ) ) ) { - $args = array( 'any_object' => true ); - $post_eligible_ids = $scoper->users_who_can( array("edit_published_posts", "edit_others_posts"), COL_ID_RS, 'post', 0, $args ); - $page_eligible_ids = $scoper->users_who_can( array("edit_published_pages", "edit_others_pages"), COL_ID_RS, 'post', 0, $args ); - $eligible_ids = array_unique( array_merge( $post_eligible_ids, $page_eligible_ids ) ); - } else { - // force_all_users arg is a temporary measure to ensure that any user can be viewed / added to a sitewide MU group regardless of what blog backend it's edited through - $_args = ( IS_MU_RS && scoper_get_option( 'mu_sitewide_groups', true ) ) ? array( 'force_all_users' => true ) : array(); - - $eligible_ids = $scoper->users_who_can( '', COL_ID_RS, '', '', $_args ); - } - - $admin_ids = array(); - } - - $css_id = ( 'manager' == $user_class ) ? 'manager' : 'member'; - $args = array( 'eligible_ids' => $eligible_ids, 'via_other_scope_ids' => $admin_ids, 'suppress_extra_prefix' => true ); - require_once('agents_checklist_rs.php'); - ScoperAgentsChecklist::agents_checklist( ROLE_BASIS_USER, $all_users, $css_id, $current_ids, $args); - } - - /** - * Writes the success/error messages - * @param string $string - message to be displayed - * @param boolean $success - boolean that defines if is a success(true) or error(false) message - **/ - function write($string, $success=true, $id="message"){ - if($success){ - echo '

    '.$string.'

    '; - }else{ - echo '

    '.$string.'

    '; - } - } -} - -?> diff --git a/blog/wp-content/plugins/role-scoper/admin/groups.php b/blog/wp-content/plugins/role-scoper/admin/groups.php deleted file mode 100644 index ce4d841..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/groups.php +++ /dev/null @@ -1,403 +0,0 @@ - Groups" Tab - * It allows to manage Groups by editing, adding or deleting - ************************************************************/ - -require_once('groups-support.php'); - -global $wpdb; -global $scoper; - -$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : ''; -$cancel = isset($_REQUEST['cancel']) ? $_REQUEST['cancel'] : ''; - -$success_msg = ''; -$errorMessage = ""; -$suppress_groups_list = false; - -switch ($mode) { - case "add": - if( ! is_administrator_rs( '', 'user' ) && ! current_user_can('manage_groups') ) - wp_die(__awp('Cheatin’ uh?')); - - check_admin_referer( 'scoper-edit-groups' ); - - if ( ! empty($_POST['groupName']) ) { - $_POST['groupName'] = str_replace( '[', '', $_POST['groupName'] ); - $_POST['groupName'] = str_replace( ']', '', $_POST['groupName'] ); - } - - if( ! UserGroups_tp::isValidName($_POST['groupName'])) { - if($_POST['groupName'] == "") - $errorMessage = __("Please specify a name for the group.", 'scoper'); - else - $errorMessage = sprintf( __("A group with the name %s already exists.", 'scoper'), $_POST['groupName']); - } else { - if( UserGroups_tp::createGroup ($_POST['groupName'], $_POST['groupDesc'])){ - $success_msg = sprintf( __("Group %s created successfuly.", 'scoper'), $_POST['groupName']); - - $group = UserGroups_tp::getGroupByName($_POST['groupName']); - } - } - //$suppress_groups_list = true; - break; - - case "edit": - $id = $_REQUEST['id']; - - if( ! is_user_administrator_rs() && ! current_user_can('manage_groups', $id) ) - wp_die(__awp('Cheatin’ uh?')); - - $group = ScoperAdminLib::get_group($id); - - if ( $group->meta_id && ! strpos($group->meta_id, '_ed_') ) - die( __('This meta group is automatically populated. You cannot manually edit it.', 'scoper') ); - - $group->prev_name = $group->display_name; - $suppress_groups_list = true; - break; - - case "editSubmit": - if ( ! empty($_POST['groupName']) ) { - $_POST['groupName'] = str_replace( '[', '', $_POST['groupName'] ); - $_POST['groupName'] = str_replace( ']', '', $_POST['groupName'] ); - } - - //to continue edit - $group->display_name = $_POST['groupName']; - $group->prev_name = $_POST['prevName']; - $group->ID = $_POST['groupID']; - $group->descript = $_POST['groupDesc']; - - if ( $get_group = ScoperAdminLib::get_group($group->ID) ) - $group->meta_id = $get_group->meta_id; - - if( ! is_user_administrator_rs() && ! current_user_can('manage_groups', $group->ID) ) - wp_die(__awp('Cheatin’ uh?')); - - check_admin_referer( 'scoper-edit-group_' . $group->ID ); - - if ( ! $group->meta_id ) { // editable metagroups can have users edited but not group name\ - if(! UserGroups_tp::isValidName($_POST['groupName']) && $_POST['groupName'] != $_POST['prevName']){ - if($_POST['groupName'] == ""){ - $errorMessage = __("Please specify a name for the group.", 'scoper'); - $mode = "edit"; - } else { - $errorMessage = sprintf( __("A group with the name %s already exists.", 'scoper'), $_POST['groupName']); - $mode = "edit"; - } - } else { - if ( UserGroups_tp::updateGroup ($_POST['groupID'], $_POST['groupName'], $_POST['groupDesc']) ) { - $success_msg = sprintf( __("Group %s updated successfuly.", 'scoper'), $_POST['groupName']); - } else { - $errorMessage = sprintf( __("Group %s was not updated successfuly.", 'scoper'), $_POST['prevName']); - $mode = "edit"; - } - } - } - break; - - case "delete": - $idDel = $_REQUEST['id']; - if($idDel != ""){ - if( ! is_user_administrator_rs() && ! current_user_can('manage_groups', $idDel) ) - wp_die(__awp('Cheatin’ uh?')); - - check_admin_referer( 'scoper-edit-group_' . $idDel ); - - if(UserGroups_tp::deleteGroup($idDel)){ - UserGroups_tp::write( __("Group Deleted.", 'scoper') ); - }else{ - UserGroups_tp::write( __("Invalid group. No groups were deleted.", 'scoper'), false); - } - $_REQUEST['id'] = ""; - } - break; - - default: - switch($cancel){ - case 1: - UserGroups_tp::write( __("Group edit canceled.", 'scoper') ); - break; - default: - break; - } - break; -} - -if ( ! $errorMessage && ( ('editSubmit' == $mode) || ('add' == $mode) ) ) { - // ----- add/delete group members or managers ---- - $current_members = ScoperAdminLib::get_group_members($group->ID, COL_ID_RS); - - // members - $posted_members = ( isset($_POST['member']) ) ? $_POST['member'] : array(); - - if ( ! empty($_POST['member_csv']) ) { - if ( $csv_for_item = ScoperAdminLib::agent_ids_from_csv( 'member_csv', 'user' ) ) - $posted_members = array_merge($posted_members, $csv_for_item); - } - - if ( $delete_members = array_diff($current_members, $posted_members) ) { - ScoperAdminLib::remove_group_user($group->ID, $delete_members); - $success_msg .= ' ' . sprintf( _n('%d member deleted.', '%d members deleted.', count($delete_members), 'scoper'), count($delete_members) ); - } - - if ( $new_members = array_diff($posted_members, $current_members) ) { - ScoperAdminLib::add_group_user($group->ID, $new_members); - $success_msg .= ' ' . sprintf( _n('%d member added.', '%d members added.', count($new_members), 'scoper'), count($new_members) ); - } - - - // administrators - if ( is_user_administrator_rs() || current_user_can('manage_groups', $group->ID) ) { - $managers = ( isset($_POST['manager']) ) ? array_fill_keys( $_POST['manager'], 'entity' ) : array(); - - if ( ! empty($_POST['manager_csv']) ) { - if ( $csv_for_item = ScoperAdminLib::agent_ids_from_csv( 'manager_csv', 'user' ) ) { - foreach ( $csv_for_item as $id ) - $managers[$id] = 'entity'; - } - } - - $managers_arg = array( 'rs_group_manager' => $managers ); - - $role_assigner = init_role_assigner(); - $args = array( 'implicit_removal' => true ); - $role_assigner->assign_roles( OBJECT_SCOPE_RS, 'group', $group->ID, $managers_arg, ROLE_BASIS_USER, $args ); - } - // -------- end member / manager update ---------- - - UserGroups_tp::write( $success_msg ); - - if ( 'add' == $mode ) - $group = ''; -} -?> - - -
    -

    ( '; - echo '' . __('add new') . ''; - echo " · " . __('set defaults') . ''; - echo " · " . __('browse members') . ''; - echo ' )

    '; - } - - if ( scoper_get_option('display_hints') ) { - echo '
    '; - _e( 'By creating User Groups, you can assign RS roles to multiple users. Note that group membership itself has no effect on the users until you assign roles to the group.', 'scoper' ); - echo '

    '; - } - - $results = ScoperAdminLib::get_all_groups(FILTERED_RS, COLS_ALL_RS, true); - - $i = 0; - if ( isset($results) && count($results) ) { - $msg = __( 'You are about to delete the group %s. Do you wish to continue?', 'scoper'); - $msg = sprintf( $msg, '"\'+name+\'"' ); - ?> - - - - - - - meta_id == 'rv_pending_rev_notice_ed_nr_' ) || ( $result->meta_id == 'rv_scheduled_rev_notice_ed_nr_' ) ) - continue; - - if($i%2 == 0) - $style = 'class=\'alternate\''; - else - $style = ''; - ?> - > - - - - - - -
     
    meta_id ) ? ScoperAdminLib::get_metagroup_name( $result->meta_id, $result->display_name ) : $result->display_name; - - if ( ( ! $result->meta_id || strpos($result->meta_id, '_ed_') ) && ( is_user_administrator_rs() || current_user_can('manage_groups', $result->ID) ) ) { - $url = "admin.php?page=rs-groups&mode=edit&id={$result->ID}"; - echo "$name"; - } else - echo $name; - ?> - meta_id ) - echo ScoperAdminLib::get_metagroup_descript( $result->meta_id, $result->descript ); - else - echo $result->descript; - ?> - meta_id && ( is_user_administrator_rs() || current_user_can('manage_groups', $result->ID) ) ):?> - ID}"; - $url = wp_nonce_url( $url, 'scoper-edit-group_' . $result->ID ); - ?> - - -
    - 0) - else { - echo "

    " . __('No groups available.', 'scoper') . "

    "; - } - ?> -
    - - - - -

    -
    -

    -
    - -
    -

    display_name);?>

    - - - - ID ); -} - -if ( empty($suppress_form) ): -?> -
    - -meta_id) ) :?> - - - - - - - - - - - -
    *:/>
     : -
    - - -
    -

    -ID : 0; - -// force_all_users arg is a temporary measure to ensure that any user can be viewed / added to a sitewide MU group regardless of what blog backend it's edited through -$sitewide_groups = IS_MU_RS && scoper_get_site_option( 'mu_sitewide_groups' ); -$_args = ( $sitewide_groups ) ? array( 'force_all_users' => true ) : array(); - -$all_users = $scoper->users_who_can('', COLS_ID_DISPLAYNAME_RS, '', '', $_args ); - -UserGroups_tp::group_members_checklist( $group_id, 'member', $all_users ); -?> -
    - -
    -
    -

    ', rtrim($blog_path, '/'), '' ); -} else - _e('Group Administrators', 'scoper'); -?> -

    - -
    - -
    - -
    - -
    - - - - - - - - - - - -
    - - -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/images/menu/restrictions.png b/blog/wp-content/plugins/role-scoper/admin/images/menu/restrictions.png deleted file mode 100644 index bfeec18..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/images/menu/restrictions.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/images/menu/roles.png b/blog/wp-content/plugins/role-scoper/admin/images/menu/roles.png deleted file mode 100644 index cf4235d..0000000 Binary files a/blog/wp-content/plugins/role-scoper/admin/images/menu/roles.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/admin/item_roles_ui_rs.php b/blog/wp-content/plugins/role-scoper/admin/item_roles_ui_rs.php deleted file mode 100644 index c9c5746..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/item_roles_ui_rs.php +++ /dev/null @@ -1,595 +0,0 @@ -data_sources->get($src_name) ) - return; - - $this->loaded_src_name = $src_name; - $this->loaded_object_type = $object_type; - $this->loaded_object_id = $object_id; - - $this->indicate_blended_roles = scoper_get_option( 'indicate_blended_roles' ); - - $this->all_agents = array(); - $this->agent_captions = array(); - $this->agent_captions_plural = array(); - $this->eligible_agent_ids = array(); - - - // note: if object_id = 0, default roles will be retrieved - $get_defaults = ! $object_id; - $obj_roles = array(); - - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - $this->role_handles = array_keys($role_defs); - - // for default roles, distinguish between various object types - $filter_role_handles = ( $object_id ) ? '' : array_keys($role_defs); - - if ( GROUP_ROLES_RS ) - $this->current_roles[ROLE_BASIS_GROUPS] = ScoperRoleAssignments::organize_assigned_roles(OBJECT_SCOPE_RS, $src_name, $object_id, $filter_role_handles, ROLE_BASIS_GROUPS, $get_defaults); - - //log_mem_usage_rs( 'load_roles: organize_assigned_roles for groups' ); - - if ( USER_ROLES_RS ) - $this->current_roles[ROLE_BASIS_USER] = ScoperRoleAssignments::organize_assigned_roles(OBJECT_SCOPE_RS, $src_name, $object_id, $filter_role_handles, ROLE_BASIS_USER, $get_defaults); - - //log_mem_usage_rs( 'load_roles: organize_assigned_roles for users' ); - - - if ( GROUP_ROLES_RS ) { - $this->all_groups = ScoperAdminLib::get_all_groups(UNFILTERED_RS); - - //log_mem_usage_rs( 'load_roles: get_all_groups' ); - - if ( ! empty( $this->all_groups) ) { - $this->agent_captions [ROLE_BASIS_GROUPS] = __('Group', 'scoper'); - $this->agent_captions_plural [ROLE_BASIS_GROUPS] = __('Groups', 'scoper'); - - $this->all_agents[ROLE_BASIS_GROUPS] = $this->all_groups; - $this->all_agents[ROLE_BASIS_GROUPS] = $this->all_groups; - } - - //log_mem_usage_rs( 'load_roles: set all_groups properties' ); - } - - if ( USER_ROLES_RS ) { - $this->agent_captions [ROLE_BASIS_USER] = __('User', 'scoper'); - $this->agent_captions_plural [ROLE_BASIS_USER] = __awp('Users'); - - // note: all users are eligible for a reading role assignment, but we may not be displaying user checkboxes - - $user_csv_input = scoper_get_option("user_role_assignment_csv"); - - if ( ! $user_csv_input ) - $this->all_agents[ROLE_BASIS_USER] = $scoper->users_who_can( '', COLS_ID_DISPLAYNAME_RS); - elseif( $object_id ) { - $assignees = array(); - if ( $this->current_roles[ROLE_BASIS_USER] ) - foreach ( array_keys($this->current_roles[ROLE_BASIS_USER]) as $role_handle ) - $assignees = $assignees + array_keys( $this->current_roles[ROLE_BASIS_USER][$role_handle]['assigned'] ); - - $assignees = array_unique( $assignees ); - - global $wpdb; - $this->all_agents[ROLE_BASIS_USER] = scoper_get_results( "SELECT ID, display_name FROM $wpdb->users WHERE ID IN ('" . implode("','", $assignees) . "')" ); - } else - $this->all_agents[ROLE_BASIS_USER] = array(); - - //log_mem_usage_rs( 'load_roles: users_who_can for all_agents' ); - - //users eligible for an editing role assignments are those who have the basic edit cap via taxonomy or blog role - if ( scoper_get_otype_option( 'limit_object_editors', $src_name, $object_type ) ) { - // Limit eligible page contribs/editors based on blog ownership of "edit_posts" - // Otherwise, since pages are generally not categorized, only Blog Editors and Admins are eligible for object role ass'n - // It's more useful to exclude Blog Subscribers while including all others - $role_object_type = ( 'page' == $object_type ) ? 'post' : $object_type; - - $reqd_caps = $scoper->cap_defs->get_matching($src_name, $role_object_type, OP_EDIT_RS, '', BASE_CAPS_RS); // status-specific and 'others' caps will not be returned - $args = array( 'ignore_strict_terms' => true, 'ignore_group_roles' => true, 'skip_object_roles' => true ); - $this->eligible_agent_ids[ROLE_BASIS_USER][OP_EDIT_RS] = $scoper->users_who_can( array_keys($reqd_caps), COL_ID_RS, '', 0, $args ); - - //log_mem_usage_rs( 'load_roles: users_who_can for eligible_agent_ids' ); - } - } - - $this->blog_term_roles = array(); - - // Pull object and blog/term role assignments for all roles - // Do this first so contained / containing roles can be accounted for in UI - foreach ($role_defs as $role_handle => $role_def) { - if ( $this->indicate_blended_roles && isset($role_def->valid_scopes[OBJECT_SCOPE_RS]) ) { - - // might need to check term/blog assignment of a different role to reflect object's current status - if ( ! empty( $role_def->other_scopes_check_role) && ! empty($src->cols->status) ) { - $status = $scoper->data_sources->detect('status', $src, $object_id); - - if ( isset($role_def->other_scopes_check_role[$status]) ) - $blog_term_role_handle = $role_def->other_scopes_check_role[$status]; - elseif ( isset($role_def->other_scopes_check_role['']) ) - $blog_term_role_handle = $role_def->other_scopes_check_role['']; - else - $blog_term_role_handle = $role_handle; - } else - $blog_term_role_handle = $role_handle; - - $this_args = array('skip_object_roles' => true, 'object_type' => $object_type, 'ignore_group_roles' => true ); - - if ( empty( $user_csv_input ) ) { - $this->blog_term_roles[ROLE_BASIS_USER][$role_handle] = $scoper->users_who_can($blog_term_role_handle, COL_ID_RS, $src_name, $object_id, $this_args ); - //log_mem_usage_rs( "load_roles: users_who_can for $role_handle users" ); - } else - $this->blog_term_roles[ROLE_BASIS_USER][$role_handle] = array(); - - $this->blog_term_roles[ROLE_BASIS_GROUPS][$role_handle] = $scoper->groups_who_can($blog_term_role_handle, COL_ID_RS, $src_name, $object_id, $this_args ); - //log_mem_usage_rs( "load_roles: groups_who_can for $role_handle groups" ); - } - } - - $this->do_propagation_cboxes = ( ! empty($src->cols->parent) && ! $scoper->data_sources->member_property($src_name, 'object_types', $object_type, 'ignore_object_hierarchy') ); - - $this->object_strict_roles = array(); - $this->child_strict_roles = array(); - - $args = array( 'id' => $object_id, 'include_child_restrictions' => true ); - if ( $restrictions = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name, $args) ) { - - //log_mem_usage_rs( "load_roles: get_restrictions" ); - - foreach ( $this->role_handles as $role_handle ) { - // defaults for this role - if ( isset($restrictions['unrestrictions'][$role_handle]) && is_array($restrictions['unrestrictions'][$role_handle]) ) { - $this->object_strict_roles[$role_handle] = true; - $this->child_strict_roles[$role_handle] = true; - } else { - $this->object_strict_roles[$role_handle] = false; - $this->child_strict_roles[$role_handle] = false; - } - - // role is not default strict, and a restriction is set - if ( isset($restrictions['restrictions'][$role_handle][$object_id]) ) { - switch ( $restrictions['restrictions'][$role_handle][$object_id] ) { - case ASSIGN_FOR_ENTITY_RS: - $this->object_strict_roles[$role_handle] = true; - $this->child_strict_roles[$role_handle] = false; - break; - case ASSIGN_FOR_CHILDREN_RS: - $this->object_strict_roles[$role_handle] = false; - $this->child_strict_roles[$role_handle] = true; - break; - case ASSIGN_FOR_BOTH_RS: - $this->object_strict_roles[$role_handle] = true; - $this->child_strict_roles[$role_handle] = true; - } // end switch - - // role IS default strict, and no unrestriction is set - } elseif ( isset($restrictions['unrestrictions'][$role_handle][$object_id]) ) { - switch ( $restrictions['unrestrictions'][$role_handle][$object_id] ) { - case ASSIGN_FOR_ENTITY_RS: - $this->object_strict_roles[$role_handle] = false; - $this->child_strict_roles[$role_handle] = true; - break; - case ASSIGN_FOR_CHILDREN_RS: - $this->object_strict_roles[$role_handle] = true; - $this->child_strict_roles[$role_handle] = false; - break; - case ASSIGN_FOR_BOTH_RS: - $this->object_strict_roles[$role_handle] = false; - $this->child_strict_roles[$role_handle] = false; - } // end switch - } - - } // end foreach Role Handle - } - - //log_mem_usage_rs( 'end ItemRolesUI::load_roles()' ); - } - - function draw_object_roles_content($src_name, $object_type, $role_handle, $object_id = '', $skip_user_validation = false, $object = false ) { - global $scoper; - - //log_mem_usage_rs( 'start ItemRolesUI::draw_object_roles_content()' ); - - if ( ! $object_id ) - $object_id = $scoper->data_sources->detect('id', $src_name, '', $object_type); - - if ( ( $src_name != $this->loaded_src_name ) || ( $object_type != $this->loaded_object_type ) || ( $object_id != $this->loaded_object_id ) ) - $this->load_roles($src_name, $object_type, $object_id); - - if ( ! $otype_def = $scoper->data_sources->member_property($src_name, 'object_types', $object_type) ) - return; - - if ( ! $skip_user_validation && ! $scoper->admin->user_can_admin_role($role_handle, $object_id, $src_name, $object_type) ) - return; - - // since we may be dumping a lot of hidden user
  • into the page, enumerate role names to shorten html - $role_code = 'r' . array_search($role_handle, $this->role_handles); - - $role_def = $scoper->role_defs->get($role_handle); - - if ( ! isset($role_def->valid_scopes[OBJECT_SCOPE_RS]) ) - return; - - if ( empty( $this->drew_objroles_marker ) ) { - echo ""; - $this->drew_objroles_marker = true; - } - - // ========== OBJECT RESTRICTION CHECKBOX(ES) ============ - // checkbox to control object role scoping (dictates whether taxonomy and blog role assignments also be honored for operations on this object ) - - $checked = ( empty($this->object_strict_roles[$role_handle]) ) ? '' : 'checked="checked"'; - - $val = ( $checked ) ? '1' : '0'; - echo ""; - - echo "\r\n

    " - . "" . __('top', 'scoper') . '' - . "

    '; - - if ( $this->do_propagation_cboxes ) { - $checked = ( empty($this->child_strict_roles[$role_handle]) ) ? '' : 'checked="checked"'; - $val = ( $checked ) ? '1' : '0'; - echo ""; - - echo "

    " - . "

    '; - } - - - // ========== OBJECT ROLE ASSIGNMENT CHECKBOX(ES) ============ - // toggle groups / users view if both are enabled - //echo "

    " . sprintf(__('Assign %s Role:', 'scoper'), $display_name ) . '

    '; - //echo '
    '; - $toggle_agents = USER_ROLES_RS && GROUP_ROLES_RS && ! empty($this->all_groups); - if ( $toggle_agents ) { - if ( ! empty($this->current_roles[ROLE_BASIS_USER][$role_handle]) ) - $default_role_basis = ROLE_BASIS_USER; - else - $default_role_basis = ROLE_BASIS_GROUPS; - - $class_selected = 'agp-selected_agent_colorized agp-selected_agent agp-agent'; - $class_unselected = 'agp-unselected_agent_colorized agp-unselected_agent agp-agent'; - - $class = ( ROLE_BASIS_GROUPS == $default_role_basis ) ? "class='$class_selected'" : "class='$class_unselected'"; - $js_call = "agp_swap_display('{$role_code}_groups', '{$role_code}_user', '{$role_code}_show_group_roles', '{$role_code}_show_user_roles', '$class_selected', '$class_unselected')"; - - global $is_IE; - $bottom_margin = ( $is_IE ) ? '-0.7em' : 0; - - echo "\r\n" - . "'; - } - - $class = "class='rs-agents'"; - - //need effective line break here if not IE - echo "
    "; - - $role_ops = $scoper->role_defs->get_role_ops($role_handle); - $agents_reqd_op = (isset($role_ops[OP_EDIT_RS]) ) ? OP_EDIT_RS : OP_READ_RS; - - // account for Read vs. Read Private in indication of explicit role ownership - // (possible TODO: abstract this for other data sources, but not crucial as it doesn't affect actual access) - $contained_role_handle = $role_handle; - $fudge_objscope_equiv_role = false; - if ( ('rs_private_post_reader' == $role_handle) || ('rs_private_page_reader' == $role_handle) ) { - if ( ! scoper_get_option( "{$role_handle}_role_objscope" ) ) { - $fudge_objscope_equiv_role = true; - if ( $object && ! empty($object->post_status) && ( 'private' != $object->post_status ) ) - $contained_role_handle = str_replace( 'private_', '', $contained_role_handle ); - } - } - - $containing_roles = $scoper->role_defs->get_containing_roles($role_handle); - - // ... but we don't want assigned Post Readers marked up as "has via other role" because their actual stored object role is Private Post Reader - if ( $fudge_objscope_equiv_role ) - $containing_roles = array_diff_key( $containing_roles, array( 'rs_private_post_reader' => true, 'rs_private_page_reader' => true ) ); - - require_once('agents_checklist_rs.php'); - - $args = array( 'suppress_extra_prefix' => true, 'default_hide_threshold' => 20, 'propagation' => $this->do_propagation_cboxes, - 'objtype_display_name' => $otype_def->display_name, 'objtype_display_name_plural' => $otype_def->display_name_plural, - 'object_type' => $object_type, 'object_id' => $object_id ); - - $args['via_other_role_ids'] = array(); // must set this here b/c subsequent for loop is set up for users iteration to recall via_other_role_ids from groups iteration - - foreach ( $this->agent_captions as $role_basis => $agent_caption ) { - if ( ! is_array( $this->blog_term_roles[$role_basis][$role_handle] ) ) - $this->blog_term_roles[$role_basis][$role_handle] = array(); - - // for the purpose of indicating implicit role ownership, we will consider any assignment of a containing role as equivalent - foreach ( array_keys($containing_roles) as $containing_role_handle ) - if ( isset($this->blog_term_roles[$role_basis][$containing_role_handle]) && is_array($this->blog_term_roles[$role_basis][$containing_role_handle]) ) - $this->blog_term_roles[$role_basis][$role_handle] = array_merge( $this->blog_term_roles[$role_basis][$role_handle], $this->blog_term_roles[$role_basis][$containing_role_handle] ); - - $this->blog_term_roles[$role_basis][$role_handle] = array_unique($this->blog_term_roles[$role_basis][$role_handle]); - - $hide_class = ( $toggle_agents && ( $role_basis != $default_role_basis ) ) ? ' class="agp_js_hide"' : ''; - - echo "\r\n
    "; - - // also abbreviate "groups" to 'g', 'user' to 'u' - $id_prefix = $role_code . substr($role_basis, 0, 1); - - if ( $this->indicate_blended_roles && $object_id && GROUP_ROLES_RS && (ROLE_BASIS_USER == $role_basis) ) { - $args['via_other_basis_ids'] = array(); - - // note users who are in a group that has this role object-assigned - if ( ! empty($this->current_roles[ROLE_BASIS_GROUPS][$role_handle]['assigned']) ) { - foreach ( array_keys($this->current_roles[ROLE_BASIS_GROUPS][$role_handle]['assigned']) as $group_id ) { - if ( ! isset($this->group_members[$group_id]) ) - $this->group_members[$group_id] = ScoperAdminLib::get_group_members($group_id, COL_ID_RS, true); //arg: maybe WP role metagroup - - $args['via_other_basis_ids'] = array_merge($args['via_other_basis_ids'], $this->group_members[$group_id]); - } - } - - // note users who are in a group that has this role term-assigned or blog-assigned (and not restricted) - foreach ( $this->blog_term_roles[ROLE_BASIS_GROUPS][$role_handle] as $group_id ) { - if ( ! isset($this->group_members[$group_id]) ) - $this->group_members[$group_id] = ScoperAdminLib::get_group_members($group_id, COL_ID_RS, true); //arg: maybe WP role metagroup - - $args['via_other_basis_ids'] = array_merge($args['via_other_basis_ids'], $this->group_members[$group_id]); - } - - // note users who are in a group that has a containing role object-assigned - // (note: via_other_role_ids element was set in previous iteration since ROLE_BASIS_GROUPS is first element in agents_caption array - foreach ( $args['via_other_role_ids'] as $group_id ) { - if ( ! isset($this->group_members[$group_id]) ) - $this->group_members[$group_id] = ScoperAdminLib::get_group_members($group_id, COL_ID_RS, true); //arg: maybe WP role metagroup - - $args['via_other_basis_ids'] = array_merge($args['via_other_basis_ids'], $this->group_members[$group_id]); - } - - $args['via_other_basis_ids'] = array_unique($args['via_other_basis_ids']); - } - - if ( $this->indicate_blended_roles ) - $args['via_other_scope_ids'] = $this->blog_term_roles[$role_basis][$role_handle]; - - $args['via_other_role_ids'] = array(); - if ( $this->indicate_blended_roles && $containing_roles ) { - foreach ( array_keys($containing_roles) as $containing_role_handle ) { - if ( isset($this->current_roles[$role_basis][$containing_role_handle]['assigned']) ) - $args['via_other_role_ids'] = array_merge($args['via_other_role_ids'], array_keys($this->current_roles[$role_basis][$containing_role_handle]['assigned']) ); - } - $args['via_other_role_ids'] = array_unique($args['via_other_role_ids']); - } - - if ( $object_id && $this->do_propagation_cboxes ) { - $args['for_entity_ids'] = ( isset($this->current_roles[$role_basis][$role_handle]['entity']) ) ? array_keys($this->current_roles[$role_basis][$role_handle]['entity']) : array(); - $args['for_children_ids'] = ( isset($this->current_roles[$role_basis][$role_handle]['children']) ) ? array_keys($this->current_roles[$role_basis][$role_handle]['children']) : ''; - } - - $args['eligible_ids'] = isset($this->eligible_agent_ids[$role_basis][$agents_reqd_op]) ? $this->eligible_agent_ids[$role_basis][$agents_reqd_op]: ''; - - if ( ! empty($this->current_roles[$role_basis][$role_handle]['assigned']) ) { - ScoperAgentsChecklist::agents_checklist( $role_basis, $this->all_agents[$role_basis], $id_prefix, $this->current_roles[$role_basis][$role_handle]['assigned'], $args ); - } else - ScoperAgentsChecklist::agents_checklist( $role_basis, $this->all_agents[$role_basis], $id_prefix, '', $args ); - - echo "\r\n
    "; - - } // end foreach role basis caption (user or group) - - echo '
    '; // class rs-agents - - //log_mem_usage_rs( 'end ItemRolesUI::draw_object_roles_content()' ); - } - - function get_rolecount_caption($role_handle) { - $count_sfx = ''; - - $agents_caption = array(); - - // indicate object role scoping in container caption - if ( ! empty($this->object_strict_roles[$role_handle]) ) - $agents_caption[] = __( 'restricted role', 'scoper' ); - - if ( USER_ROLES_RS && ! empty($this->current_roles[ROLE_BASIS_USER][$role_handle]) ) { - $count = count(array_keys($this->current_roles[ROLE_BASIS_USER][$role_handle]['assigned'])); - $agents_caption[] = ( GROUP_ROLES_RS ) ? sprintf(_n('%s user', '%s users', $count, 'scoper'), $count) : $count; - //$any_roles_assigned = true; - } - - if ( GROUP_ROLES_RS && ! empty($this->current_roles[ROLE_BASIS_GROUPS][$role_handle]) ) { - $count = count(array_keys($this->current_roles[ROLE_BASIS_GROUPS][$role_handle]['assigned'])); - $agents_caption[] = ( USER_ROLES_RS ) ? sprintf(_n('%s group', '%s groups', $count, 'scoper'), $count) : $count; - //$any_roles_assigned = true; - } - - if ( $agents_caption ) { - $count_sfx = ""; - $count_sfx .= ( $agents_caption ) ? ' (' . implode(', ', $agents_caption) . ')' : ''; - $count_sfx .= ""; - } - - return $count_sfx; - } - - // This is now called only with WP < 2.5, for direct single-object role edit via the bulk admin form, - // and by any non-post data sources which define admin_actions->object_edit_ui - function single_object_roles_ui($src_name, $object_type, $object_id, $args = '') { - $defaults = array( 'html_inserts' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( ! scoper_get_otype_option('use_object_roles', $src_name, $object_type) ) - return; - - if ( ! $html_inserts ) { - if ( ! $otype_def = $scoper->data_sources->member_property($src_name, 'object_types', $object_type) ) - return; - - if ( isset($otype_def->admin_inserts->bottom) ) - $html_inserts = $otype_def->admin_inserts->bottom; - - elseif ( ! $html_inserts = $src->admin_inserts->bottom ) { - // TODO: CSS - $html_inserts->open = (object) array( - 'container' => '
    ', - 'headline' => '

    ', - 'content' => '
    ' ); - - $html_inserts->close = (object) array( - 'container' => '', 'headline' => '

    ', 'content' => '
  • ' ); - } - } - - if ( ! isset($this->all_agents) || ( $src_name != $this->loaded_src_name ) || ( $object_type != $this->loaded_object_type ) || ( $object_id != $this->loaded_object_id ) ) - $this->load_roles($src_name, $object_type, $object_id); - - $group_members = array(); - - $role_defs = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - - foreach ($role_defs as $role_handle => $role_def) { - if ( ! isset($role_def->valid_scopes[OBJECT_SCOPE_RS]) || ! $scoper->admin->user_can_admin_role($role_handle, $object_id, $src_name, $object_type) ) - continue; - - echo( "\r\n" . sprintf($html_inserts->open->container, "objrole_$role_handle") ); - - $count_sfx = $this->get_rolecount_caption($role_handle); - - echo $html_inserts->open->headline . $scoper->role_defs->get_abbrev( $role_handle, OBJECT_UI_RS ) . $count_sfx - . $html_inserts->close->headline - . $html_inserts->open->content; - - $this->draw_object_roles_content($src_name, $object_type, $role_handle, $object_id, true); // arg: skip_user_validation - - echo "\r\n" . $html_inserts->close->content . "\r\n" . $html_inserts->close->container . "\r\n"; - } // end foreach role - } - - function single_term_roles_ui($taxonomy, $args, $term) { - global $scoper; - - if ( ! $taxonomy ) - return; - - if ( ! $tx = $scoper->taxonomies->get($taxonomy) ) - return; - - $term_id = is_object($term) ? $term->{$tx->source->cols->id} : $term; - if ( ! $term_id ) - return; - - if ( ! $role_defs_by_otype = $scoper->role_defs->get_for_taxonomy($tx->object_source, $taxonomy) ) - return; - - require_once('admin-bulk_rs.php'); - - $all_terms = array( (object) array( $tx->source->cols->id => $term_id, $tx->source->cols->name => '', $tx->source->cols->parent => 0 ) ); - - $admin_terms = array( $term_id => true ); - - $role_bases = array(); - $term_roles = array(); - if ( USER_ROLES_RS ) { - $term_roles[ROLE_BASIS_USER] = ScoperRoleAssignments::get_assigned_roles(TERM_SCOPE_RS, ROLE_BASIS_USER, $taxonomy, array( 'id' => $term_id) ); - $role_bases []= ROLE_BASIS_USER; - } - if ( GROUP_ROLES_RS ) { - $term_roles[ROLE_BASIS_GROUPS] = ScoperRoleAssignments::get_assigned_roles(TERM_SCOPE_RS, ROLE_BASIS_GROUPS, $taxonomy, array( 'id' => $term_id) ); - $role_bases []= ROLE_BASIS_GROUPS; - } - - $strict_terms = $scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy ); - - $agents = ScoperAdminBulk::get_agents($role_bases); - $agent_names = ScoperAdminBulk::agent_names($agents); - $agent_list_prefix = ScoperAdminBulk::agent_list_prefixes(); - $agent_caption_plural = ScoperAdminBulk::agent_captions_plural($role_bases); - - $default_restrictions = $scoper->get_default_restrictions(TERM_SCOPE_RS); - $default_strict_roles = ( ! empty($default_restrictions[$taxonomy] ) ) ? array_flip(array_keys($default_restrictions[$taxonomy])) : array(); - - require_once('admin_ui_lib_rs.php'); - $table_captions = ScoperAdminUI::restriction_captions(TERM_SCOPE_RS, $tx, $tx->display_name, $tx->display_name_plural); - - echo '
    '; - $url = "admin.php?page=rs-category-restrictions_t#item-$term_id"; - echo "\n

    " . __('Category Restrictions', 'scoper') . '

    '; - - $args = array( - 'admin_items' => $admin_terms, 'editable_roles' => array(), 'default_strict_roles' => $default_strict_roles, - 'ul_class' => 'rs-termlist', 'table_captions' => $table_captions, 'single_item' => true - ); - ScoperAdminBulk::item_tree( TERM_SCOPE_RS, ROLE_RESTRICTION_RS, $tx->source, $tx, $all_terms, '', $strict_terms, $role_defs_by_otype, array(), $args); - - - $url = "admin.php?page=rs-category-roles_t#item-$term_id"; - echo "\n

    " . __('Category Roles', 'scoper') . '

    '; - - $args = array( - 'admin_items' => $admin_terms, 'editable_roles' => array(), 'role_bases' => $role_bases, - 'agent_names' => $agent_names, 'agent_caption_plural' => $agent_caption_plural, 'agent_list_prefix' => $agent_list_prefix, - 'ul_class' => 'rs-termlist', 'single_item' => true - ); - ScoperAdminBulk::item_tree(TERM_SCOPE_RS, ROLE_ASSIGNMENT_RS, $tx->source, $tx, $all_terms, $term_roles, $strict_terms, $role_defs_by_otype, array(), $args); - - if ( ! empty($term_roles) ) { - $args = array( 'display_links' => false, 'display_restriction_key' => false); - ScoperAdminUI::role_owners_key($tx, $args); - } - } // end function ui_single_term_roles - -} // end class ScoperObjectRolesUI -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/misc/version_notice_rs.php b/blog/wp-content/plugins/role-scoper/admin/misc/version_notice_rs.php deleted file mode 100644 index 296e015..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/misc/version_notice_rs.php +++ /dev/null @@ -1,124 +0,0 @@ - ( $check_minutes * 60 ) ) || ( ! $vcheck = get_site_option('scoper_version_info') ) ) { - $vcheck = wp_remote_fopen( 'http://agapetry.net/downloads/role-scoper_version.chk' ); - $rechecked = true; - update_option( 'scoper_version_info', $vcheck ); - } - - if ( ( (time() - $last_check) > ( $check_minutes * 60 ) ) || ( ! $vcheck_ext = get_site_option('scoper_extension_info') ) ) { - $vcheck_ext = awp_remote_fopen( 'http://agapetry.net/downloads/role-scoper-extensions.chk', 5 ); - $rechecked = true; - update_option( 'scoper_extension_info', $vcheck_ext ); - } - - if ( $rechecked ) - update_option( 'scoper_last_version_update_check', time() ); - - if($vcheck) - { - $status = explode('@', $vcheck); - $theVersion = $status[1]; - - if( ( version_compare( strval($theVersion), strval(SCOPER_VERSION), '>' ) == 1 ) ) - { - $msg = '' . sprintf(__( "A new version of Role Scoper is available (%s)", "scoper" ), $theVersion); - - if ( $rechecked || ( ! $vcheck = get_site_option('scoper_version_message') ) ) { - $vcheck = awp_remote_fopen( 'http://agapetry.net/downloads/role-scoper.chk', 5 ); - add_site_option( 'scoper_version_message', $vcheck ); - } - - if ( $vcheck ) { - $status = explode('@', $vcheck); - - $theMessage = $status[3]; - if ( $ver_pos = strpos($theMessage, '
    ' . SCOPER_VERSION) ) - $theMessage = substr($theMessage, 0, $ver_pos); - - $theMessage = str_replace( "'", ''', $theMessage ); // Despite this precaution, don't include apostrophes in .chk file because older RS versions (< 1.0.0-rc9) will choke on it. - $theMessage = str_replace( '"', '"', $theMessage ); - - $msg .= '
    ' . $theMessage . ''; - } - - if ( strpos( $msg, '' ) ) { - $more_caption = __( 'read more...', 'scoper'); - $msg = preg_replace( '/\<\!\-\-more\-\-\>/', '' . $more_caption . ''; - } else - $msg .= '
    '; - - $msg .= '' . __('Read about the update', 'scoper') . ''; - $msg .= '   ' . __('View full changelog', 'scoper') . ''; - - if ( version_compare( strval($theVersion), '1.0.0', '>=' ) ) { - $url = awp_plugin_update_url( SCOPER_BASENAME ); - $msg .= '   ' . __awp('Upgrade Automatically') . ''; - } else - $msg .= '   ' . __('Download for manual install', 'scoper') . ''; - - // slick method copied from NextGEN Gallery plugin - add_action('admin_notices', create_function('', 'echo \'

    ' . $msg . '

    \';')); - } - } - - if($vcheck_ext) - { - $plugin_titles = array(); - $plugin_links = array(); - if ( $extensions = explode(';', $vcheck_ext) ) { - foreach ( $extensions as $ext ) { - if ( $ext_info = explode( ',', $ext ) ) { - if ( count($ext_info) < 4 ) - continue; - - if ( ( $plugin_file = awp_is_plugin_active($ext_info[0]) ) && ! awp_is_plugin_active($ext_info[1]) ) { - $plugin_path = WP_CONTENT_DIR . '/plugins/' . $plugin_file; - if ( file_exists($plugin_path) ) { - $plugin_data = implode( '', file( $plugin_path )); - - preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $name ); - - if ( $name ) { - $name = trim($name[1]); - $plugin_titles [$ext_info[0]]= $name; - - if ( ( false === strpos($ext_info[3], 'wp_repository') ) || ( false !== strpos($ext_info[3], 'is_alpha') ) ) - $plugin_links[$ext_info[0]] = "http://agapetry.net/category/role-scoper-extensions/"; - else - $plugin_links[$ext_info[0]] = awp_plugin_info_url($ext_info[2]); - } - } - } - } - } - - $plugins = get_option('active_plugins'); - - if ( $plugin_titles ) { - $plugin_array = array(); - foreach ( $plugin_titles as $name => $title ) - $plugin_array []= "$title"; - - $msg = '' . sprintf(__( "Role Scoper Extensions are available for the following plugins: %s", "scoper" ), implode(', ', $plugin_array) ) . '
    '; - - // slick method copied from NextGEN Gallery plugin - add_action('admin_notices', create_function('', 'echo \'

    ' . $msg . '

    \';')); - } - } - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/object_restrictions.php b/blog/wp-content/plugins/role-scoper/admin/object_restrictions.php deleted file mode 100644 index 2b5fbdd..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/object_restrictions.php +++ /dev/null @@ -1,221 +0,0 @@ -data_sources->get($src_name) ) || ! empty($src->no_object_roles) || ! empty($src->taxonomy_only) || ($src_name == 'group') ) - wp_die(__('Invalid data source', 'scoper')); - -$is_administrator = is_administrator_rs($src, 'user'); - -$role_bases = array(); - -if ( USER_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_object($src_name, $object_type, 0, true) ) ) - $role_bases []= ROLE_BASIS_USER; - -if ( GROUP_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_object($src_name, $object_type, 0, true) || current_user_can('manage_groups') ) ) - $role_bases []= ROLE_BASIS_GROUPS; - -if ( empty($role_bases) ) - wp_die(__awp('Cheatin’ uh?')); - -$otype = $scoper->data_sources->member_property($src_name, 'object_types', $object_type); - -require_once('admin_ui_lib_rs.php'); -require_once( 'admin-bulk_rs.php' ); -$role_assigner = init_role_assigner(); - -$nonce_id = 'scoper-assign-roles'; - -$role_codes = ScoperAdminBulk::get_role_codes(); - -echo ''; - - -// ==== Process Submission ===== -$err = 0; -if ( isset($_POST['rs_submit'] ) ) { - $err = ScoperAdminBulk::role_submission(OBJECT_SCOPE_RS, ROLE_RESTRICTION_RS, '', $src_name, $role_codes, '', $nonce_id); - - if ( scoper_get_option( 'file_filtering' ) ) - scoper_flush_file_rules(); -} -?> - -
    -object_types) ) ? "{$src_name}:{$object_type}" : $src_name; -$display_name = $scoper->admin->interpret_src_otype($src_otype, false); -$display_name_plural = $scoper->admin->interpret_src_otype($src_otype, true); -echo '

    ' . sprintf(__('%s Restrictions', 'scoper'), $display_name) - . '  (' . __('see notes', 'scoper') . ')' - . '

    '; - -if ( scoper_get_option('display_hints') ) { - echo '
    '; - - $link_open = ""; - - $tx_names = $scoper->data_sources->member_property($src_name, 'uses_taxonomies'); - if ( $tx_names && (1 == count($tx_names) ) && scoper_get_otype_option('use_term_roles', $src_name, $object_type) ) { - $tx_display = $scoper->taxonomies->member_property( current($tx_names), 'display_name' ); - printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and %5$s Role assignments are ignored.', 'scoper'), $display_name, $link_open, $display_name, '', $tx_display); - } elseif ( count($tx_names) > 1 ) - printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and Section Role assignments are ignored.', 'scoper'), $display_name, $link_open, $display_name, ''); - else - printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General Role assignments are ignored.', 'scoper'), $display_name, $link_open, $display_name, ''); - - echo '
    '; -} - -$ignore_hierarchy = ! empty($otype->ignore_object_hierarchy); -?> - -
    -cols->parent) || $ignore_hierarchy ) - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('for selected %s', 'scoper'), $display_name_plural) - ); -else - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('for selected %s', 'scoper'), $display_name_plural), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('for sub-%s of selected', 'scoper'), $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('for selected and sub-%s', 'scoper'), $display_name_plural) - ); - -$max_scopes = array( 'object' => __('Restrict selected roles', 'scoper'), 'blog' => __('Unrestrict selected roles', 'scoper') ); -$args = array( 'max_scopes' => $max_scopes, 'scope' => OBJECT_SCOPE_RS ); -ScoperAdminBulk::display_inputs(ROLE_RESTRICTION_RS, $assignment_modes, $args); - -$role_display = array(); -$editable_roles = array(); -foreach ( $scoper->role_defs->get_all_keys() as $role_handle ) { - $role_display[$role_handle] = $scoper->role_defs->get_abbrev( $role_handle, OBJECT_UI_RS ); - if ( $scoper->admin->user_can_admin_role($role_handle, 0, $src_name, $object_type) ) - $editable_roles[0][$role_handle] = true; -} - -echo '
    '; -$args = array( 'default_hide_empty' => ! empty($otype->admin_default_hide_empty), 'hide_roles' => true, 'scope' => OBJECT_SCOPE_RS, 'src' => $src, 'otype' => $otype ); -ScoperAdminBulk::item_tree_jslinks(ROLE_RESTRICTION_RS, $args ); - -// buffer prev/next caption for display with each obj type -//$prevtext = _ x('prev', 'abbreviated link to previous item', 'scoper'); -//$nexttext = _ x('next', 'abbreviated link to next item', 'scoper'); -$prevtext = __('prev', 'scoper'); -$nexttext = __('next', 'scoper'); - -$site_url = get_option('siteurl'); - -$args = array( 'include_child_restrictions' => true, 'return_array' => true, 'role_type' => SCOPER_ROLE_TYPE, 'force_refresh' => true ); -$strict_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name, $args); - -$object_names = array(); -$object_status = array(); -$listed_objects = array(); -$unlisted_objects = array(); - -$col_id = $src->cols->id; -$col_parent = ( isset($src->cols->parent) && ! $ignore_hierarchy ) ? $src->cols->parent : ''; - -$object_ids = array(); -if ( isset($strict_objects['restrictions']) ) { - foreach ( array_keys($strict_objects['restrictions']) as $role_handle ) - $object_ids = $object_ids + array_keys($strict_objects['restrictions'][$role_handle]); - -} elseif ( isset($strict_objects['unrestrictions']) ) { - foreach ( array_keys($strict_objects['unrestrictions']) as $role_handle ) - $object_ids = $object_ids + array_keys($strict_objects['unrestrictions'][$role_handle]); -} - -$object_ids = array_flip( array_unique($object_ids) ); - -// Get the obj name, parent associated with each role (also sets $object_names, $unlisted objects) -$listed_objects = ScoperAdminBulk::get_objects_info($object_ids, $object_names, $object_status, $unlisted_objects, $src, $otype, $ignore_hierarchy); - - -if ( $col_parent ) { - if ( $listed_objects ) { - if ( $unlisted_objects ) // query for any parent objects which don't have their own role assignments - $listed_objects = ScoperAdminUI::add_missing_parents($listed_objects, $unlisted_objects, $col_parent); - - // convert keys from object ID to title+ID so we can alpha sort them - $listed_objects_alpha = array(); - foreach ( array_keys($listed_objects) as $id ) - $listed_objects_alpha[ $listed_objects[$id]->{$src->cols->name} . chr(11) . $id ] = $listed_objects[$id]; - - uksort($listed_objects_alpha, "strnatcasecmp"); - - $listed_objects = ScoperAdminUI::order_by_hierarchy($listed_objects_alpha, $col_id, $col_parent); - } // endif any listed objects - -} else { // endif doing object hierarchy - if ( $listed_objects ) { - // convert keys from object ID to title+ID so we can alpha sort them - $listed_objects_alpha = array(); - foreach ( array_keys($listed_objects) as $id ) - $listed_objects_alpha[ $listed_objects[$id]->{$src->cols->name} . chr(11) . $id ] = $listed_objects[$id]; - - uksort($listed_objects_alpha, "strnatcasecmp"); - - // convert to ordinal integer index - $listed_objects = array_combine( array_keys( array_fill( 0, count($listed_objects_alpha), true ) ), $listed_objects_alpha ); - } -} - -if ( ! $is_administrator ) - $cu_admin_results = ScoperAdminBulk::filter_objects_listing(ROLE_RESTRICTION_RS, $strict_objects, $src, $object_type); // unsets $strict_objects elements as needed -else - $cu_admin_results = ''; // no need to filter admins - -$role_defs_by_otype = array(); -$role_defs_by_otype[$object_type] = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - -$table_captions = ScoperAdminUI::restriction_captions(OBJECT_SCOPE_RS, '', $display_name, $display_name_plural); - -$args = array( -'admin_items' => $cu_admin_results, 'editable_roles' => $editable_roles, 'default_hide_empty' => ! empty($otype->admin_default_hide_empty), -'ul_class' => 'rs-objlist', 'object_names' => $object_names, 'object_status' => $object_status, -'table_captions' => $table_captions, 'ie_link_style' => '', 'err' => $err -); - -ScoperAdminBulk::item_tree( OBJECT_SCOPE_RS, ROLE_RESTRICTION_RS, $src, $otype, $listed_objects, '', $strict_objects, $role_defs_by_otype, $role_codes, $args); -//ScoperAdminBulk::item_tree( OBJECT_SCOPE_RS, ROLE_ASSIGNMENT_RS, $src, $otype, $all_objects, $object_roles, $strict_objects, $role_defs_by_otype, $role_codes, $args); -echo '
    '; - -echo '
    '; -$args = array( 'display_links' => true, 'display_restriction_key' => true ); -ScoperAdminUI::role_owners_key($otype, $args); -echo '
    '; - -echo '

    ' . __("Notes", 'scoper') . ':

      '; - -echo '
    • '; -printf(__('To edit all roles for any %1$s, click on the %1$s name.', 'scoper'), $otype->display_name); -echo '
    • '; - -echo '
    • '; -printf(__("To edit the %s via its default editor, click on the ID link.", 'scoper'), $otype->display_name); -echo '
    • '; - -if ( ! $is_administrator ) { - echo '
    • '; - printf(__('To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s.', 'scoper'), $otype->display_name); - echo '
    • '; -} - -echo '
    '; -echo('' . __('top', 'scoper') . ''); -?> -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/object_role_edit.php b/blog/wp-content/plugins/role-scoper/admin/object_role_edit.php deleted file mode 100644 index 09f8ee9..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/object_role_edit.php +++ /dev/null @@ -1,77 +0,0 @@ -admin->user_can_admin_object($src_name, $object_type, $object_id) ) - wp_die( __('You do not have permission to assign roles for this object.', 'scoper') ); - -// ==== Process Submission ===== -$err = 0; -if ( isset($_POST['rs_submit'] ) ) { - $scoper->filters_admin->mnt_save_object($src_name, '', $object_id); - - echo '

    '; - _e('Object Roles Updated.', 'scoper'); - echo '

    '; -} -?> - -
    -

    - -
    - - - - - -data_sources->member_property($src_name, 'object_types', $object_type, 'display_name'); -?> -
      -
    • - -
    • -
    - -
    - -data_sources->member_property('post', 'admin_inserts', 'bottom'); -$args['default_role_basis'] = $role_basis; - -if ( isset($args['html_inserts']->close->container) ) - $args['html_inserts']->close->container .= '
    '; - - include_once('item_roles_ui_rs.php'); - $item_roles_ui = new ScoperItemRolesUI(); - $item_roles_ui->single_object_roles_ui($src_name, $object_type, $object_id, $args); -?> - -

    - -

    -

    -

    -
    - -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/object_roles.php b/blog/wp-content/plugins/role-scoper/admin/object_roles.php deleted file mode 100644 index e0f2e2d..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/object_roles.php +++ /dev/null @@ -1,230 +0,0 @@ -data_sources->get($src_name) ) || ! empty($src->no_object_roles) || ! empty($src->taxonomy_only) || ($src_name == 'group') ) - wp_die(__('Invalid data source', 'scoper')); - -$is_administrator = is_administrator_rs($src, 'user'); - -$role_bases = array(); - -if ( USER_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_object($src_name, $object_type, 0, true) ) ) - $role_bases []= ROLE_BASIS_USER; - -if ( GROUP_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_object($src_name, $object_type, 0, true) || current_user_can('manage_groups') ) ) - $role_bases []= ROLE_BASIS_GROUPS; - -if ( empty($role_bases) ) - wp_die(__awp('Cheatin’ uh?')); - -$otype = $scoper->data_sources->member_property($src_name, 'object_types', $object_type); - -require_once('admin_ui_lib_rs.php'); -require_once( 'admin-bulk_rs.php' ); -require_once('role_assignment_lib_rs.php'); -$role_assigner = init_role_assigner(); - -$nonce_id = 'scoper-assign-roles'; - -$agents = ScoperAdminBulk::get_agents($role_bases); -$agent_names = ScoperAdminBulk::agent_names($agents); -$agent_list_prefix = ScoperAdminBulk::agent_list_prefixes(); -$agent_caption_plural = ScoperAdminBulk::agent_captions_plural($role_bases); -$role_bases = array_keys($agents); - -$role_codes = ScoperAdminBulk::get_role_codes(); - -echo ''; - - -// ==== Process Submission ===== -$err = 0; -if ( isset($_POST['rs_submit'] ) ) - $err = ScoperAdminBulk::role_submission(OBJECT_SCOPE_RS, ROLE_ASSIGNMENT_RS, $role_bases, $src_name, $role_codes, $agent_caption_plural, $nonce_id); -?> - -
    -object_types) ) ? "{$src_name}:{$object_type}" : $src_name; -$display_name = $scoper->admin->interpret_src_otype($src_otype, false); -$display_name_plural = $scoper->admin->interpret_src_otype($src_otype, true); - -echo '

    ' . sprintf(__('%s Roles', 'scoper'), $display_name) - . '  (' . __('see notes', 'scoper') . ')' - . '

    '; - -if ( scoper_get_option('display_hints') ) { - echo '
    '; - - $restrictions_page = "rs-{$object_type}-restrictions"; - - //printf(_ x('Expand access to a %2$s, potentially beyond what a user\'s WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s.', 'arguments are link open, object type name, link close', 'scoper'), "", $display_name, ''); - printf(__('Expand access to a %2$s, potentially beyond what a user\'s WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s.', 'scoper'), "", $display_name, ''); - echo '
    '; -} - -$ignore_hierarchy = ! empty($otype->ignore_object_hierarchy); -?> - -
    -cols->parent) || $ignore_hierarchy ) - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => __('Assign', 'scoper'), - REMOVE_ASSIGNMENT_RS =>__('Remove', 'scoper') - ); -else - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('Assign for selected %s', 'scoper'), $display_name_plural), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('Assign for sub-%s of selected', 'scoper'), $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('Assign for selected and sub-%s', 'scoper'), $display_name_plural), - REMOVE_ASSIGNMENT_RS =>__('Remove', 'scoper') - ); -$args = array( 'role_bases' => $role_bases, 'agents' => $agents, 'agent_caption_plural' => $agent_caption_plural, 'scope' => OBJECT_SCOPE_RS, 'src_or_tx_name' => $src_name ); -ScoperAdminBulk::display_inputs(ROLE_ASSIGNMENT_RS, $assignment_modes, $args); - -echo '
    '; -$args = array( 'role_bases' => $role_bases, 'default_hide_empty' => ! empty($otype->admin_default_hide_empty), 'hide_roles' => true, 'scope' => OBJECT_SCOPE_RS, 'src' => $src, 'otype' => $otype ); -ScoperAdminBulk::item_tree_jslinks(ROLE_ASSIGNMENT_RS, $args ); - -// buffer prev/next caption for display with each obj type -//$prevtext = _ x('prev', 'abbreviated link to previous item', 'scoper'); -//$nexttext = _ x('next', 'abbreviated link to next item', 'scoper'); -$prevtext = __('prev', 'scoper'); -$nexttext = __('next', 'scoper'); - -$site_url = get_option('siteurl'); - -$role_defs_by_otype = array(); -$role_defs_by_otype[$object_type] = $scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $src_name, $object_type); - -$object_roles = array(); -foreach ( $role_bases as $role_basis ) { - $args = array( 'role_handles' => array_keys( $role_defs_by_otype[$object_type] ) ); - $object_roles[$role_basis] = ScoperRoleAssignments::get_assigned_roles(OBJECT_SCOPE_RS, $role_basis, $src_name, $args); -} - -$strict_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name); - -$object_names = array(); -$object_status = array(); -$listed_objects = array(); -$unlisted_objects = array(); - -$col_id = $src->cols->id; -$col_parent = ( isset($src->cols->parent) && ! $ignore_hierarchy ) ? $src->cols->parent : ''; - -if ( $object_roles ) { - $object_ids = array(); - foreach ( $object_roles as $basis_roles ) - $object_ids = $object_ids + array_keys($basis_roles); - - $object_ids = array_flip( array_unique($object_ids) ); - - // Get the obj name, parent associated with each role (also sets $object_names, $unlisted objects) - $listed_objects = ScoperAdminBulk::get_objects_info($object_ids, $object_names, $object_status, $unlisted_objects, $src, $otype, $ignore_hierarchy); -} - -if ( $col_parent ) { - if ( $listed_objects ) { - if ( $unlisted_objects ) // query for any parent objects which don't have their own role assignments - $listed_objects = ScoperAdminUI::add_missing_parents($listed_objects, $unlisted_objects, $col_parent); - - // convert keys from object ID to title+ID so we can alpha sort them - $listed_objects_alpha = array(); - foreach ( array_keys($listed_objects) as $id ) - $listed_objects_alpha[ $listed_objects[$id]->{$src->cols->name} . chr(11) . $id ] = $listed_objects[$id]; - - uksort($listed_objects_alpha, "strnatcasecmp"); - - $listed_objects = ScoperAdminUI::order_by_hierarchy($listed_objects_alpha, $col_id, $col_parent); - } // endif any listed objects - -} else { // endif doing object hierarchy - if ( $listed_objects ) { - /// convert keys from object ID to title+ID so we can alpha sort them - $listed_objects_alpha = array(); - foreach ( array_keys($listed_objects) as $id ) - $listed_objects_alpha[ $listed_objects[$id]->{$src->cols->name} . chr(11) . $id ] = $listed_objects[$id]; - - uksort($listed_objects_alpha, "strnatcasecmp"); - - // convert to ordinal integer index - $temp = array_fill( 0, count($listed_objects_alpha), true ); - $listed_objects = array_combine( array_keys( $temp ), $listed_objects_alpha ); - } -} - -if ( ! $is_administrator ) - $admin_items = ScoperAdminBulk::filter_objects_listing(ROLE_ASSIGNMENT_RS, $object_roles, $src, $object_type); // unsets $object_roles elements as needed -else - $admin_items = ''; // no need to filter admins - -$role_display = array(); -$editable_roles = array(); -foreach ( $scoper->role_defs->get_all_keys() as $role_handle ) { - $role_display[$role_handle] = $scoper->role_defs->get_abbrev( $role_handle, OBJECT_UI_RS ); - - if ( $scoper->admin->user_can_admin_role($role_handle, 0, $src->name, $object_type) ) - $editable_roles[0][$role_handle] = true; - - /* this is too slow for a large number of bulk items. Will just show checkbox for roles user can edit base on their own termwide / blogwide role - // Will still show all editable roles if they click on single object role edit (or Post/Page edit) - if ( ! $is_administrator ) { - foreach ( $listed_objects as $key => $obj ) - if ( isset($admin_items[$obj->$col_id]) ) - $editable_roles[$obj->$col_id][$role_handle] = $scoper->admin->user_can_admin_role($role_handle, $obj->$col_id, $src->name, $object_type); - } - */ -} - -$args = array( -'admin_items' => $admin_items, 'editable_roles' => $editable_roles, 'role_bases' => $role_bases, -'agent_names' => $agent_names, 'agent_caption_plural' => $agent_caption_plural, 'agent_list_prefix' => $agent_list_prefix, -'ul_class' => 'rs-objlist', 'object_names' => $object_names, 'object_status' => $object_status, -'err' => $err, 'default_hide_empty' => ! empty($otype->admin_default_hide_empty) -); - - -ScoperAdminBulk::item_tree( OBJECT_SCOPE_RS, ROLE_ASSIGNMENT_RS, $src, $otype, $listed_objects, $object_roles, $strict_objects, $role_defs_by_otype, $role_codes, $args); -echo '
    '; - - -echo '
    '; -$args = array( 'display_links' => true, 'display_restriction_key' => true ); -ScoperAdminUI::role_owners_key($otype, $args); -echo '
    '; - -echo '

    ' . __("Notes", 'scoper') . ':

      '; - -echo '
    • '; -printf(__('To edit all roles for any %1$s, click on the %1$s name.', 'scoper'), $otype->display_name); -echo '
    • '; - -echo '
    • '; -printf(__("To edit the %s via its default editor, click on the ID link.", 'scoper'), $otype->display_name); -echo '
    • '; - -if ( ! $is_administrator ) { - echo '
    • '; - printf(__('To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s.', 'scoper'), $otype->display_name); - echo '
    • '; -} - -echo '
    '; -echo('' . __('top', 'scoper') . ''); -?> -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/object_roles_list.php b/blog/wp-content/plugins/role-scoper/admin/object_roles_list.php deleted file mode 100644 index 69cc582..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/object_roles_list.php +++ /dev/null @@ -1,286 +0,0 @@ - true, 'is_user_profile' => false, 'echo' => true ); -$args = array_merge( $defaults, (array) $args ); -extract($args); - -global $scoper, $wpdb, $current_user; - -if ( $viewing_user ) { - if ( ! is_object($viewing_user) ) { - global $current_user; - if ( $viewing_user == $current_user->ID ) - $viewing_user = $current_user; - else - $viewing_user = new WP_Scoped_User($viewing_user); - } -} - -$all_roles = array(); -$role_display = array(); -foreach ( $scoper->role_defs->get_all_keys() as $role_handle ) { - if ( $viewing_user ) - $role_display[$role_handle] = $scoper->role_defs->get_display_name( $role_handle, OBJECT_UI_RS ); - else - $role_display[$role_handle] = $scoper->role_defs->get_abbrev( $role_handle, OBJECT_UI_RS ); -} - -if ( ! $is_user_profile ) { - $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only'); - - if ( ( 'admin' === $require_blogwide_editor ) && ! is_user_administrator_rs() ) - return false; - - if ( ( 'admin_content' === $require_blogwide_editor ) && ! is_content_administrator_rs() ) - return false; -} else - $require_blogwide_editor = false; - -foreach ( $scoper->data_sources->get_all() as $src_name => $src) { - $otype_count = 0; - - if ( ! empty($src->taxonomy_only) || ( ($src_name == 'group') && ! $viewing_user ) ) - continue; - - $strict_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name); - - foreach ( $src->object_types as $object_type => $otype ) { - $otype_count++; - - $disable_role_admin = false; - if ( $require_blogwide_editor ) { - $required_cap = ( 'page' == $object_type ) ? 'edit_others_pages' : 'edit_others_posts'; - - global $current_user; - if ( empty( $current_user->allcaps[$required_cap] ) ) - $disable_role_admin = true; - } - - if ( ! empty($src->cols->type) && ! empty($otype->val) ) { - $col_type = $src->cols->type; - $otype_clause = "AND $src->table.$col_type = '$otype->val'"; - } elseif ( $otype_count < 2 ) - $otype_clause = ''; - else - continue; - - $col_id = $src->cols->id; - $col_name = $src->cols->name; - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - $ug_clause_for_user_being_viewed = ( $viewing_user ) ? $viewing_user->get_user_clause('uro') : ''; - - // TODO: replace join with uro subselect - - $qry = "SELECT DISTINCT $src->table.$col_name, $src->table.$col_id, uro.role_name, uro.date_limited, uro.start_date_gmt, uro.end_date_gmt" - . " FROM $src->table "; - - $join = " INNER JOIN $wpdb->user2role2object_rs AS uro" - . " ON uro.obj_or_term_id = $src->table.$col_id" - . " AND uro.src_or_tx_name = '$src_name'" - . " AND uro.scope = 'object' AND uro.role_type = '$SCOPER_ROLE_TYPE'"; - - $duration_clause = ( $enforce_duration_limits ) ? scoper_get_duration_clause( "{$src->table}.{$src->cols->date}" ) : ''; - - $where = " WHERE 1=1 $otype_clause $duration_clause $ug_clause_for_user_being_viewed"; - $orderby = " ORDER BY $src->table.$col_name ASC, uro.role_name ASC"; - - $qry .= $join . $where . $orderby; - - $results = scoper_get_results( $qry ); - - if ( ! is_user_administrator_rs() ) { // no need to filter admins - just query the assignments - - // only list role assignments which the logged-in user can administer - if ( isset($src->reqd_caps[OP_ADMIN_RS]) ) { - $args['required_operation'] = OP_ADMIN_RS; - } else { - $reqd_caps = array(); - foreach (array_keys($src->statuses) as $status_name) { - $admin_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_ADMIN_RS, $status_name); - $delete_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_DELETE_RS, $status_name); - $reqd_caps[$object_type][$status_name] = array_merge(array_keys($admin_caps), array_keys($delete_caps)); - } - $args['force_reqd_caps'] = $reqd_caps; - } - - $qry = "SELECT $src->table.$col_id FROM $src->table WHERE 1=1"; - - $args['require_full_object_role'] = true; - $qry_flt = apply_filters('objects_request_rs', $qry, $src_name, $object_type, $args); - $cu_admin_results = scoper_get_col( $qry_flt ); - - if ( empty($viewing_user) || ( $current_user->ID != $viewing_user->ID ) ) { - foreach ( $results as $key => $row ) - if ( ! in_array( $row->$col_id, $cu_admin_results) ) - unset($results[$key]); - } else { - // for current user's view of their own user profile, just de-link unadminable objects - $link_roles = array(); - $link_objects = array(); - - if ( ! $disable_role_admin ) { - foreach ( $results as $key => $row ) - if ( in_array( $row->$col_id, $cu_admin_results) ) - $link_roles[$row->$col_id] = true; - - $args['required_operation'] = OP_EDIT_RS; - $args['require_full_object_role'] = false; - if ( isset($args['force_reqd_caps']) ) unset($args['force_reqd_caps']); - $qry_flt = apply_filters('objects_request_rs', $qry, $src_name, $object_type, $args); - $cu_edit_results = scoper_get_col( $qry_flt ); - - foreach ( $results as $key => $row ) - if ( in_array( $row->$col_id, $cu_edit_results) ) - $link_objects[$row->$col_id] = true; - } - } - } - - $object_roles = array(); - $objnames = array(); - - if ( $results ) { - $got_object_roles = true; - - foreach ( $results as $row ) { - if ( ! isset($objnames[ $row->$col_id ]) ) { - if ( 'post' == $src->name ) - $objnames[ $row->$col_id ] = apply_filters( 'the_title', $row->$col_name, $row->$col_id); - else - $objnames[ $row->$col_id ] = $row->$col_name; - } - - $role_handle = SCOPER_ROLE_TYPE . '_' . $row->role_name; - - if ( $row->date_limited ) - $duration_key = serialize( array( 'start_date_gmt' => $row->start_date_gmt, 'end_date_gmt' => $row->end_date_gmt ) ); - else - $duration_key = ''; - - $object_roles[$duration_key][ $row->$col_id ] [ $role_handle ] = true; - } - } else - continue; - ?> - - $date_caption"; - - $duration_limits = unserialize( $duration_key ); - $duration_limits[ 'date_limited' ] = true; - - ScoperAdminUI::set_agent_formatting( $duration_limits, $date_caption, $limit_class, $link_class, $limit_style ); - $title = "title='$date_caption'"; - $date_caption = ' ' . trim($date_caption) . ''; - } else - $title = "title='$title_roles'"; - - if ( ! $disable_role_admin && ( is_user_administrator_rs() || $cu_admin_results ) ) { - if ( ( $src_name != $object_type ) && ( 'post' != $object_type ) ) { - $roles_page = "rs-roles-{$object_type}_{$src_name}"; - } else { - $roles_page = "rs-roles-$object_type"; - } - - $url = "admin.php?page=$roles_page"; - //$html .= "

    " . sprintf( _ x('%1$s Roles%2$s:', 'Post/Page Roles', 'scoper'), $otype->display_name, '' . $date_caption) . "

    "; - $html .= "

    " . sprintf( __('%1$s Roles%2$s:', 'scoper'), $otype->display_name, '' . $date_caption) . "

    "; - } else - $html .= "

    " . sprintf( __('%1$s Roles%2$s:', 'scoper'), $otype->display_name, $date_caption) . "

    "; - //$html .= "

    " . sprintf( _ x('%1$s Roles%2$s:', 'Post/Page Roles', 'scoper'), $otype->display_name, $date_caption) . "

    "; - - $html .= - "
    • " - - . "" - . "" - . "" - . " " - . " " - . " " - . "" - . "" - . ""; - - $style = ' class="rs-backwhite"'; - - //$title_item = sprintf(_ x('edit %s', 'post/page/category/etc.', 'scoper'), strtolower($otype->display_name) ); - $title_item = sprintf( __('edit %s', 'scoper'), strtolower($otype->display_name) ); - - foreach ( $object_roles[$duration_key] as $obj_id => $roles ) { - $object_name = attribute_escape($objnames[$obj_id]); - - $html .= "\n\t"; - - $link_this_object = ( ! isset($link_objects) || isset($link_objects[$obj_id]) ); - - // link from object ID to the object type's default editor, if defined - if ( $link_this_object && ! empty($src->edit_url) ) { - $src_edit_url = sprintf($src->edit_url, $obj_id); - $html .= ""; - } else - $html .= ""; - - // link from object name to our "Edit Object Role Assignment" interface - $link_this_role = ( ! isset($link_roles) || isset($link_roles[$obj_id]) ); - - if ( $link_this_role ) { - $rs_edit_url = "admin.php?page=rs-object_role_edit&src_name=$src_name&object_type=$object_type&object_id=$obj_id&object_name=$object_name"; - $html .= "\n\t"; - } else - $html .= "\n\t"; - - $html .= "'; - - $style = ( ' class="alternate"' == $style ) ? ' class="rs-backwhite"' : ' class="alternate"'; - } // end foreach object_roles - - $html .= '
      " . __('ID') . "" . __awp('Name') . "" . __('Role Assignments', 'scoper') . "
      $obj_id$obj_id{$objnames[$obj_id]}{$objnames[$obj_id]}"; - - $role_list = array(); - foreach ( array_keys($roles) as $role_handle ) { - // roles which require object assignment are asterisked (bolding would contradict the notation of term roles list, where propogating roles are bolded) - if ( isset($strict_objects['restrictions'][$role_handle][$obj_id]) - || ( isset($strict_objects['unrestrictions'][$role_handle]) && is_array($strict_objects['unrestrictions'][$role_handle]) && ! isset($strict_objects['unrestrictions'][$role_handle][$obj_id]) ) ) - $role_list[] = "" . $role_display[$role_handle] . ''; - else - $role_list[] = $role_display[$role_handle]; - } - - $html .=( implode(', ', $role_list) ); - $html .= '
      '; - $html .= '

    '; - - } // end foreach role date range - - } // end foreach object_types - -} // end foreach data source - -if ( $echo ) - echo $html; -else - return $html; - -} // end wrapper function - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/options.php b/blog/wp-content/plugins/role-scoper/admin/options.php deleted file mode 100644 index b43c4f7..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/options.php +++ /dev/null @@ -1,1954 +0,0 @@ -sitewide = $sitewide; - $this->customize_defaults = $customize_defaults; - } - - function option_checkbox( $option_name, $tab_name, $section_name, $hint_text, $trailing_html, $args = '') { - $return = array( 'in_scope' => false, 'val' => '' ); - - if ( ! is_array($args) ) - $args = array(); - - if ( in_array( $option_name, $this->form_options[$tab_name][$section_name] ) ) { - $this->all_options []= $option_name; - - $return['val'] = scoper_get_option($option_name, $this->sitewide, $this->customize_defaults); - - $js_clause = ( ! empty($args['js_call']) ) ? 'onclick="' . $args['js_call'] . '"' : ''; - $style = ( ! empty($args['style']) ) ? $args['style'] : ''; - - echo "
    " - . ""; - - if ( $hint_text && $this->display_hints ) - echo "
    " . $hint_text . ""; - - echo "
    "; - - if ( $trailing_html ) - echo $trailing_html; - - $return['in_scope'] = true; - } - - return $return; - } - - - function otype_option_checkboxes( $option_name, $caption, $tab_name, $section_name, $hint_text, $trailing_html, $args = '' ) { - global $scoper; - - if ( ! is_array($args) ) - $args = array(); - - $return = array( 'in_scope' => false, 'val' => array() ); - - if ( in_array( $option_name, $this->form_options[$tab_name][$section_name] ) ) { - $this->all_otype_options []= $option_name; - - if ( isset($this->def_otype_options[$option_name]) ) { - if ( ! $return['val'] = scoper_get_option( $option_name, $this->sitewide, $this->customize_defaults ) ) - $return['val'] = array(); - - $return['val'] = array_merge($this->def_otype_options[$option_name], $return['val']); - - $plural_display_name = ( isset($args['plural_display_name']) ) ? $args['plural_display_name'] : true; - - foreach ( $return['val'] as $src_otype => $val ) { - $display_name_plural = $scoper->admin->interpret_src_otype($src_otype, $plural_display_name); //arg: use plural display name - - $id = str_replace(':', '_', $option_name . '-' . $src_otype); - - echo "
    '); - } // end foreach src_otype - - if ( $hint_text && $this->display_hints ) - echo "" . $hint_text . ""; - - if ( $trailing_html ) - echo $trailing_html; - - } // endif default option isset - - $return['in_scope'] = true; - - } // endif in this option is controlled in this scope - - return $return; - } -} - - -function scoper_options( $sitewide = false, $customize_defaults = false ) { - -if ( ! is_option_administrator_rs() || ( $sitewide && function_exists('is_site_admin') && ! is_site_admin() ) ) - wp_die(__awp('Cheatin’ uh?')); - -if ( $sitewide ) - $customize_defaults = false; // this is intended only for storing custom default values for blog-specific options - -$ui = new ScoperOptionUI( $sitewide, $customize_defaults ); - -if ( isset($_POST['all_otype_options']) ) { - wpp_cache_flush(); - - //global $wp_rewrite; - //if ( ! empty($wp_rewrite) ) - // $wp_rewrite->flush_rules(); - - if ( isset($_POST['rs_role_resync']) ) - ScoperAdminLib::sync_wproles(); - - if ( isset($_POST['rs_defaults']) ) - $msg = __('Role Scoper options were reset to defaults.', 'scoper'); - - elseif ( isset($_POST['rs_flush_cache']) ) - $msg = __('The persistent cache was flushed.', 'scoper'); - else - $msg = __('Role Scoper options were updated.', 'scoper'); - - // submittee_rs.php fielded this submission, but output the message here. - echo '

    '; - echo $msg; - echo '

    '; -} - -global $scoper; - -define('SCOPER_REALM_ADMIN_RS', 1); // We need to access all config items here, even if they are normally removed due to disabling -$scoper->load_config(); - -// scoper_default_otype_options is hookable for other plugins to add pertinent items for their data sources -scoper_refresh_default_options(); -scoper_refresh_default_otype_options(); - -global $scoper_default_otype_options; -$ui->def_otype_options = $scoper_default_otype_options; - -$ui->all_options = array(); -$ui->all_otype_options = array(); - - -$ui->tab_captions = array( 'features' => __( 'Features', 'scoper' ), 'advanced' => __( 'Advanced', 'scoper' ), 'realm' => __( 'Realm', 'scoper' ), - 'rs_role_definitions' => __( 'RS Role Definitions', 'scoper' ), 'wp_role_definitions' => __( 'WP Role Definitions', 'scoper'), 'optscope' => __( 'Option Scope', 'scoper' ) ); - -$ui->section_captions = array( - 'features' => array( - 'user_groups' => __('User Groups', 'scoper'), - 'front_end' => __('Front End', 'scoper'), - 'pages_listing' => __('Pages Listing', 'scoper'), - 'categories_listing' => __('Categories Listing', 'scoper'), - 'content_maintenance'=> __('Content Maintenance', 'scoper'), - 'file_filtering' => __('File Filtering', 'scoper'), - 'date_limits' => __('Role Date Limits', 'scoper'), - 'internal_cache' => __('Internal Cache', 'scoper'), - 'version' => __('Version', 'scoper'), - 'rss_feeds' => __('RSS Feeds', 'scoper'), - 'hidden_content_teaser' => __('Hidden Content Teaser', 'scoper') -), -'advanced' => array( - 'role_basis' => __('Role Basis', 'scoper'), - 'role_type' => __('Role Type', 'scoper'), - 'page_structure' => __('Page Structure', 'scoper'), - 'user_profile' => __('User Profile', 'scoper'), - 'user_management' => __('User Management', 'scoper'), - 'administrator_definition' => __('Administrator Definition', 'scoper'), - 'limited_editing_elements' => __('Limited Editing Elements', 'scoper'), - 'role_assignment_interface' => __('Role Assignment Interface', 'scoper'), - 'custom_columns' => __('Custom Columns', 'scoper'), - 'additional_object_roles' => __('Additional Object Roles', 'scoper') -), -'realm' => array( - 'term_object_scopes' => __('Term / Object Scope', 'scoper'), - 'term_scope' => __('Term Scope', 'scoper'), - 'object_scope' => __('Object Scope', 'scoper'), - 'access_types' => __('Access Types', 'scoper') -), -'rs_role_definitions' => array( - '' => '' -), -'wp_role_definitions' => array( - '' => '' -) -); - - -// TODO: replace individual _e calls with these (and section, tab captions) -$ui->option_captions = array( - 'persistent_cache' => __('Cache roles and groups to disk', 'scoper'), - 'define_usergroups' => __('Enabled', 'scoper'), - 'enable_group_roles' => __('Apply Group Roles', 'scoper'), - 'enable_user_roles' => __('Apply User Roles', 'scoper'), - 'role_type' => __( 'Within any scope, each user or group has:', 'scoper'), - 'custom_user_blogcaps' => __('Support WP Custom User Caps', 'scoper'), - 'no_frontend_admin' => __('Assume No Front-end Admin', 'scoper'), - 'indicate_blended_roles' => __('Indicate blended roles', 'scoper'), - 'version_update_notice' => __('Notify on Version Updates', 'scoper'), - /* 'version_check_minutes' => __('', 'scoper'), */ - 'strip_private_caption' => __('Suppress "Private:" Caption', 'scoper'), - 'display_hints' => __('Display Administrative Hints', 'scoper'), - 'hide_non_editor_admin_divs' => __('Specified element IDs also require the following blog-wide Role:', 'scoper'), - 'role_admin_blogwide_editor_only' => __('Roles and Restrictions can be set:', 'scoper'), - 'feed_link_http_auth' => __( 'HTTP Authentication Request in RSS Feed Links', 'scoper' ), - 'rss_private_feed_mode' => __( 'Display mode for readable private posts', 'scoper' ), - 'rss_nonprivate_feed_mode' => __( 'Display mode for readable non-private posts', 'scoper' ), - 'feed_teaser' => __( 'Feed Replacement Text (use %permalink% for post URL)', 'scoper' ), - 'rs_page_reader_role_objscope' => $scoper->role_defs->get_display_name('rs_page_reader'), - 'rs_page_author_role_objscope' => $scoper->role_defs->get_display_name('rs_page_author'), - 'rs_post_reader_role_objscope' => $scoper->role_defs->get_display_name('rs_post_reader'), - 'rs_post_author_role_objscope' => $scoper->role_defs->get_display_name('rs_post_author'), - 'rs_page_revisor_role_objscope' => $scoper->role_defs->get_display_name('rs_page_revisor'), - 'rs_post_revisor_role_objscope' => $scoper->role_defs->get_display_name('rs_post_revisor'), - 'lock_top_pages' => __('Pages can be set or removed from Top Level by:', 'scoper'), - 'display_user_profile_groups' => __('Display User Groups', 'scoper'), - 'display_user_profile_roles' => __('Display User Roles', 'scoper'), - 'user_role_assignment_csv' => __('Users CSV Entry', 'scoper'), - 'admin_others_unattached_files' => __('Non-editors see other users\' unattached uploads', 'scoper'), - 'remap_page_parents' => __('Remap pages to visible ancestor', 'scoper'), - 'enforce_actual_page_depth' => __('Enforce actual page depth', 'scoper'), - 'remap_thru_excluded_page_parent' => __('Remap through excluded page parent', 'scoper'), - 'remap_term_parents' => __('Remap terms to visible ancestor', 'scoper'), - 'enforce_actual_term_depth' => __('Enforce actual term depth', 'scoper'), - 'remap_thru_excluded_term_parent' => __('Remap through excluded term parent', 'scoper'), - 'limit_user_edit_by_level' => __('Limit User Edit by Level', 'scoper'), - 'file_filtering' => __('Filter Uploaded File Attachments', 'scoper'), - 'mu_sitewide_groups' => __('Share groups site-wide', 'scoper'), - 'role_duration_limits' => __('Enable Role Duration Limits', 'scoper'), - 'role_content_date_limits' => __('Enable Content Date Limits', 'scoper'), - 'filter_users_dropdown' => __('Filter Users Dropdown', 'scoper'), - 'restrictions_column' => __('Restrictions Column', 'scoper'), - 'term_roles_column' => __('Term Roles Column', 'scoper' ), - 'object_roles_column' => __('Object Roles Column', 'scoper'), - - 'do_teaser' => __('Enable', 'scoper'), /* NOTE: submitee.php must sync all other teaser-related options to do_teaser scope setting */ - 'admin_css_ids' => __('Limited Editing Elements', 'scoper'), - 'limit_object_editors' => __('Limit eligible users for object-specific editing roles', 'scoper'), - 'private_items_listable' => __('Include Private Pages in listing if user can read them', 'scoper'), - 'enable_wp_taxonomies' => __('settings', 'scoper'), - 'disabled_access_types' => __('settings', 'scoper'), - /* disabled_role_caps' => __('settings', 'scoper'), */ - 'user_role_caps' => __('settings', 'scoper') /* NOTE: submitee.php must sync disabled_role_caps and user_role_caps scope setting */ -); - - -$ui->form_options = array( -'features' => array( - 'user_groups' => array( 'define_usergroups', 'mu_sitewide_groups' ), - 'front_end' => array( 'strip_private_caption', 'no_frontend_admin' ), - 'pages_listing' => array( 'private_items_listable', 'remap_page_parents', 'enforce_actual_page_depth', 'remap_thru_excluded_page_parent' ), - 'categories_listing' => array( 'remap_term_parents', 'enforce_actual_term_depth', 'remap_thru_excluded_term_parent' ), - 'content_maintenance'=> array( 'default_private', 'sync_private', 'role_admin_blogwide_editor_only', 'admin_others_unattached_files', 'filter_users_dropdown' ), - 'file_filtering' => array( 'file_filtering' ), - 'date_limits' => array( 'role_duration_limits', 'role_content_date_limits' ), - 'internal_cache' => array( 'persistent_cache' ), - 'version' => array( 'version_update_notice' ), - 'rss_feeds' => array( 'feed_link_http_auth', 'rss_private_feed_mode', 'rss_nonprivate_feed_mode', 'feed_teaser' ), - 'hidden_content_teaser' => array( 'do_teaser' ) /* NOTE: all teaser options follow scope setting of do_teaser */ - - /*, 'teaser_hide_private', 'use_teaser', 'teaser_logged_only', - 'teaser_replace_content', 'teaser_replace_content_anon', 'teaser_prepend_content', 'teaser_prepend_content_anon', - 'teaser_append_content', 'teaser_append_content_anon', 'teaser_prepend_name', 'teaser_prepend_name_anon', - 'teaser_append_name', 'teaser_append_name_anon', 'teaser_replace_excerpt', 'teaser_replace_excerpt_anon', - 'teaser_prepend_excerpt', 'teaser_prepend_excerpt_anon', 'teaser_append_excerpt', 'teaser_append_excerpt_anon' ), */ -), -'advanced' => array( - 'role_basis' => array( 'enable_group_roles', 'enable_user_roles' ), - 'role_type' => array( 'role_type', 'custom_user_blogcaps' ), - 'page_structure' => array( 'lock_top_pages' ), - 'user_profile' => array( 'display_user_profile_groups', 'display_user_profile_roles' ), - 'user_management' => array( 'limit_user_edit_by_level' ), - /* 'administrator_definition' => array( '' ), */ /* NOTE: administrator definition is always displayed with sitewide options (or non-mu) */ - - 'limited_editing_elements' => array( 'admin_css_ids', 'hide_non_editor_admin_divs' ), - 'role_assignment_interface' => array( 'limit_object_editors', 'indicate_blended_roles', 'display_hints', 'user_role_assignment_csv' ), - 'custom_columns' => array( 'restrictions_column', 'term_roles_column', 'object_roles_column' ), - 'additional_object_roles' => array( 'rs_page_reader_role_objscope', 'rs_post_reader_role_objscope', 'rs_page_author_role_objscope', 'rs_post_author_role_objscope', 'rs_page_revisor_role_objscope', 'rs_post_revisor_role_objscope' ) -), -'realm' => array( - 'term_object_scopes' => array( 'enable_wp_taxonomies' ), /* 'use_term_roles', 'use_object_roles' NOTE: all term_object_scopes options follow scope setting of enable_wp_taxonomies */ - 'access_types' => array( 'disabled_access_types' ) -), -'rs_role_definitions' => array( - '' => array( 'user_role_caps' ) /* 'disabled_role_caps' ), NOTE: user_role_caps scope follows disabled_role_caps */ -) -/* -'wp_role_definitions' => array( - '' => array( '' ) -) */ -); - - -if ( IS_MU_RS ) { - if ( $sitewide ) - $available_form_options = $ui->form_options; - - global $scoper_options_sitewide; - global $rvy_options_sitewide; - - foreach ( $ui->form_options as $tab_name => $sections ) - foreach ( $sections as $section_name => $option_names ) - if ( $sitewide ) - $ui->form_options[$tab_name][$section_name] = array_intersect( $ui->form_options[$tab_name][$section_name], array_keys($scoper_options_sitewide) ); - else - $ui->form_options[$tab_name][$section_name] = array_diff( $ui->form_options[$tab_name][$section_name], array_keys($scoper_options_sitewide) ); - - // WP Role Defs display follows RS Role Defs - if ( ! empty( $ui->form_options['rs_role_defs'][''] ) ) - $ui->form_options['wp_role_defs'][''] = array( '' ); - - foreach ( $ui->form_options as $tab_name => $sections ) - foreach ( array_keys($sections) as $section_name ) - if ( empty( $ui->form_options[$tab_name][$section_name] ) ) - unset( $ui->form_options[$tab_name][$section_name] ); -} - - -$ui->display_hints = scoper_get_option('display_hints', $sitewide, $customize_defaults); -?> -
    -'; -wp_nonce_field( 'scoper-update-options' ); - -if ( $sitewide ) - echo ""; - -if ( $customize_defaults ) - echo ""; - -?> - - - -
    -

    -

    -
    -
    - -
    -
    -'; - _e( 'These settings will be applied to all blogs.', 'scoper' ); - echo '

    '; - -} elseif ( $customize_defaults ) { - $color_class = 'rs-backgray'; - echo '

    '; - _e( 'These are the default settings for options which can be adjusted per-blog.', 'scoper' ); - echo '

    '; - -} else - $color_class = 'rs-backtan'; - -$class_selected = "agp-selected_agent agp-agent $color_class"; -$class_unselected = "agp-unselected_agent agp-agent"; - -// todo: prevent line breaks in these links -$js_call = "agp_swap_display('rs-features', 'rs-realm', 'rs_show_features', 'rs_show_realm', '$class_selected', '$class_unselected');"; -$js_call .= "agp_swap_display('', 'rs-roledefs', '', 'rs_show_roledefs', '$class_selected', '$class_unselected');"; -$js_call .= "agp_swap_display('', 'rs-advanced', '', 'rs_show_advanced', '$class_selected', '$class_unselected');"; -$js_call .= "agp_swap_display('', 'wp-roledefs', '', 'wp_show_roledefs', '$class_selected', '$class_unselected');"; -$js_call .= "agp_swap_display('', 'rs-optscope', '', 'rs_show_optscope', '$class_selected', '$class_unselected');"; -echo "
      " - . "
    • " - . "" . $ui->tab_captions['features'] . '' - . '
    • '; - -if ( ! empty( $ui->form_options['advanced'] ) ) { - $js_call = "agp_swap_display('rs-advanced', 'rs-features', 'rs_show_advanced', 'rs_show_features', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-realm', '', 'rs_show_realm', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-roledefs', '', 'rs_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'wp-roledefs', '', 'wp_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-optscope', '', 'rs_show_optscope', '$class_selected', '$class_unselected');"; - echo "
    • " - . "" . $ui->tab_captions['advanced'] . '' - . '
    • '; -} - -if ( ! empty( $ui->form_options['realm'] ) ) { - $js_call = "agp_swap_display('rs-realm', 'rs-features', 'rs_show_realm', 'rs_show_features', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-roledefs', '', 'rs_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-advanced', '', 'rs_show_advanced', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'wp-roledefs', '', 'wp_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-optscope', '', 'rs_show_optscope', '$class_selected', '$class_unselected');"; - echo "
    • " - . "" . $ui->tab_captions['realm'] . '' - . '
    • '; -} - -if ( ! empty( $ui->form_options['rs_role_definitions'] ) ) { - if ( 'rs' == SCOPER_ROLE_TYPE ) { - $js_call = "agp_swap_display('rs-roledefs', 'rs-features', 'rs_show_roledefs', 'rs_show_features', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-realm', '', 'rs_show_realm', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-advanced', '', 'rs_show_advanced', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'wp-roledefs', '', 'wp_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-optscope', '', 'rs_show_optscope', '$class_selected', '$class_unselected');"; - echo "
    • " - . "" . $ui->tab_captions['rs_role_definitions'] . '' - . '
    • '; - } - - $js_call = "agp_swap_display('wp-roledefs', 'rs-features', 'wp_show_roledefs', 'rs_show_features', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-realm', '', 'rs_show_realm', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-advanced', '', 'rs_show_advanced', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-roledefs', '', 'rs_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-optscope', '', 'rs_show_optscope', '$class_selected', '$class_unselected');"; - echo "
    • " - . "" . $ui->tab_captions['wp_role_definitions'] . '' - . '
    • '; -} - -if ( $sitewide ) { - $js_call = "agp_swap_display('rs-optscope', 'rs-features', 'rs_show_optscope', 'rs_show_features', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-advanced', '', 'rs_show_advanced', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-roledefs', '', 'rs_show_roledefs', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'rs-realm', '', 'rs_show_realm', '$class_selected', '$class_unselected');"; - $js_call .= "agp_swap_display('', 'wp-roledefs', '', 'wp_show_roledefs', '$class_selected', '$class_unselected');"; - echo "
    • " - . "" . $ui->tab_captions['optscope'] . '' - . '
    • '; -} - -echo '
    '; - -// ------------------------- BEGIN Features tab --------------------------------- - -$tab = 'features'; -echo "
    "; - -if ( scoper_get_option('display_hints', $sitewide, $customize_defaults) ) { - echo '
    '; - _e("This page enables optional adjustment of Role Scoper's features. For most installations, the default settings are fine.", 'scoper'); - - if ( IS_MU_RS && function_exists('is_site_admin') && is_site_admin() ) { - if ( $sitewide ) { - if ( ! $customize_defaults ) { - $link_open = ""; - $link_close = ''; - - echo ' '; - printf( __('Note that, depending on your configuration, %1$s blog-specific options%2$s may also be available.', 'scoper'), $link_open, $link_close ); - } - } else { - $link_open = ""; - $link_close = ''; - - echo ' '; - printf( __('Note that, depending on your configuration, %1$s site-wide options%2$s may also be available.', 'scoper'), $link_open, $link_close ); - } - } - - echo '
    '; -} - -$table_class = 'form-table rs-form-table'; -?> - - - -form_options[$tab][$section] ) ) :?> - -form_options[$tab][$section] ) ) :?> - - - -form_options[$tab][$section] ) ) :?> - - - -form_options[$tab][$section] ) ) :?> - - - -form_options[$tab][$section] ) ) :?> - - - -form_options[$tab][$section] ) ) :?> - - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : - // --- PERSISTENT CACHE SECTION --- -?> - - - -form_options[$tab][$section] ) ) : - // --- VERSION SECTION --- - ?> - - - -form_options[$tab][$section] ) ) : ?> - - - -form_options[$tab][$section] ) && in_array( 'do_teaser', $ui->form_options[$tab][$section] ) ) : // for now, teaser option are all-or-nothing sitewide / blogwide -?> - - - - -'; -} - -?> - -
    - section_captions[$tab][$section]; ?> - - - option_checkbox( 'define_usergroups', $tab, $section, $hint, '
    ' ); - - if ( IS_MU_RS ) { - $hint = __('If enabled, each user group will be available for role assignment in any blog. Any existing blog-specific groups will be unavailable. Group role assignments are still blog-specific.', 'scoper'); - $ui->option_checkbox( 'mu_sitewide_groups', $tab, $section, $hint, '' ); - } - ?> -
    section_captions[$tab][$section];?> - - option_checkbox( 'strip_private_caption', $tab, $section, $hint, '
    ' ); - - $hint = __('Reduce memory usage for front-end access by assuming no content, categories or users will be created or edited there. Worst case scenario if you assume wrong: manually assign roles/restrictions to new content or re-sync user roles via plugin re-activation.', 'scoper'); - $ui->option_checkbox( 'no_frontend_admin', $tab, $section, $hint, '' ); - ?> -
    section_captions[$tab][$section]; ?> - - otype_option_checkboxes( 'private_items_listable', $otype_caption, $tab, $section, $hint, '

    ' ); - - $hint = __('If a page\'s parent is not visible to the user, it will be listed below a visible grandparent instead.', 'scoper'); - $js_call = "agp_display_if('enforce_actual_page_depth_div', 'remap_page_parents');agp_display_if('remap_thru_excluded_page_parent_div', 'remap_page_parents');"; - $ret = $ui->option_checkbox( 'remap_page_parents', $tab, $section, $hint, '', array( 'js_call' => $js_call ) ); - $do_remap = $ret['val'] || ! $ret['in_scope']; - - $hint = __('When remapping page parents, apply any depth limits to the actual depth below the requested root page. If disabled, depth limits apply to apparant depth following remap.', 'scoper'); - $css_display = ( $do_remap ) ? 'block' : 'none'; - echo "
    "; - $ui->option_checkbox( 'enforce_actual_page_depth', $tab, $section, $hint, '' ); - echo '
    '; - - $hint = __('Remap a page to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_pages / list_pages call.', 'scoper'); - $css_display = ( $do_remap ) ? 'block' : 'none'; - echo "
    "; - $ui->option_checkbox( 'remap_thru_excluded_page_parent', $tab, $section, $hint, '' ); - echo '
    '; - ?> -
    section_captions[$tab][$section]; ?> - - option_checkbox( 'remap_term_parents', $tab, $section, $hint, '', array( 'js_call' => $js_call ) ); - $do_remap = $ret['val'] || ! $ret['in_scope']; - - $hint = __('When remapping category parents, apply any depth limits to the actual depth below the requested root category. If disabled, depth limits apply to apparant depth following remap.', 'scoper'); - $css_display = ( $do_remap ) ? 'block' : 'none'; - echo "
    "; - $ret = $ui->option_checkbox( 'enforce_actual_term_depth', $tab, $section, $hint, '' ); - echo '
    '; - - $hint = __('Remap a category to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_terms / get_categories call.', 'scoper'); - $css_display = ( $do_remap ) ? 'block' : 'none'; - echo "
    "; - $ret = $ui->option_checkbox( 'remap_thru_excluded_term_parent', $tab, $section, $hint, '' ); - echo '
    '; - ?> - -
    section_captions[$tab][$section]; ?> - - - otype_option_checkboxes( 'default_private', $otype_caption, $tab, $section, $hint, '

    ' ); - - //$otype_caption = _ x('Auto-set %s to Private visibility if Reader role is restricted', 'Posts / Pages', 'scoper'); - $otype_caption = __('Auto-set %s to Private visibility if Reader role is restricted', 'scoper'); - $hint = __('Note: this is only done if the Reader role is restricted via Post/Page edit form.', 'scoper'); - $ui->otype_option_checkboxes( 'sync_private', $otype_caption, $tab, $section, $hint, '

    ' ); - - if ( in_array( 'role_admin_blogwide_editor_only', $ui->form_options[$tab][$section] ) ) { - $id = 'role_admin_blogwide_editor_only'; - $ui->all_options []= $id; - $current_setting = strval( scoper_get_option($id, $sitewide, $customize_defaults) ); // force setting and corresponding keys to string, to avoid quirks with integer keys - - if ( $current_setting === '' ) - $current_setting = '0'; - ?> -
    -
    -
    - option_checkbox( 'admin_others_unattached_files', $tab, $section, $hint, '' ); - - $hint = __('If enabled, Post Author and Page Author selection dropdowns will be filtered based on scoped roles.', 'scoper'); - $ret = $ui->option_checkbox( 'filter_users_dropdown', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; ?> - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'file_filtering'; - - $site_url = untrailingslashit( get_option('siteurl') ); - if ( defined('DISABLE_ATTACHMENT_FILTERING') ) - $content_dir_notice = __('Note: Direct access to uploaded file attachments will not be filtered because DISABLE_ATTACHMENT_FILTERING is defined, perhaps in wp-config.php or role-scoper.php', 'scoper'); - - else { - require_once( SCOPER_ABSPATH . '/rewrite-rules_rs.php' ); - - require_once( SCOPER_ABSPATH . '/uploads_rs.php' ); - $uploads = scoper_get_upload_info(); - - if ( false === strpos( $uploads['baseurl'], $site_url ) ) - $content_dir_notice = __('Note: Direct access to uploaded file attachments cannot be filtered because your WP_CONTENT_DIR is not in the WordPress branch.', 'scoper'); - - elseif( ! ScoperRewrite::site_config_supports_rewrite() ) - $content_dir_notice = __('Note: Direct access to uploaded file attachments will not be filtered due to your nonstandard UPLOADS path.', 'scoper'); - - else { - global $wp_rewrite; - if ( empty($wp_rewrite->permalink_structure) ) - $content_dir_notice = __('Note: Direct access to uploaded file attachments cannot be filtered because WordPress permalinks are set to default.', 'scoper'); - } - } - - $disabled = defined('DISABLE_ATTACHMENT_FILTERING') || ! got_mod_rewrite() || ! empty($content_dir_notice); - $attachment_filtering = ! $disabled && scoper_get_option('file_filtering', $sitewide, $customize_defaults); - - ?> - -
    -
    - display_hints) - _e('Block direct URL access to images and other uploaded files in the WordPress uploads folder which are attached to post(s)/page(s) that the user cannot read. A separate RewriteRule will be added to your .htaccess file for each protected file. Non-protected files are returned with no script execution whatsoever.', 'scoper'); - if ( $attachment_filtering ) { - if ( $ui->display_hints) { - if ( IS_MU_RS && ! defined('SCOPER_MU_FILE_PROCESSING') ) { - echo '
    '; - _e("Note: The default WP-MU file request script, wp-content/blogs.php, requires a patch for compatibility with RS file filtering. If you need the advanced cache control provided by blogs.php, review the notes in role-scoper/mu_wp_content_optional/blogs.php and copy it into wp-content if desired. Otherwise, files will be accessed directly via header redirect following RS filtering. If you decide to install the patched blogs.php, add the following line to wp-config.php:
        define( 'SCOPER_MU_FILE_PROCESSING', true);", 'scoper'); - echo '
    '; - } - } - } elseif ( ! empty($content_dir_notice) ) { - echo '
    '; - echo $content_dir_notice; - echo ''; - } - ?> -
    - Note: FTP-uploaded files will not be filtered correctly until you run the %1$sAttachments Utility%2$s.', 'arguments are link open, link close', 'scoper'), "", ''); - printf( __('Note: FTP-uploaded files will not be filtered correctly until you run the %1$sAttachments Utility%2$s.', 'scoper'), "", ''); - - echo '

    '; - _e( 'If WordPress or any plugin output visible PHP warnings during filtering of a protected image request, the image will not be successfully returned.', 'scoper' ); - ?> -
    - - -
    section_captions[$tab][$section]; // --- ROLE DATE LIMITS SECTION --- - ?> - - option_checkbox( 'role_duration_limits', $tab, $section, $hint, '' ); - - $hint = __('Allow General Roles and Category Roles to be limited to content dated within in a specified range.', 'scoper'); - $ret = $ui->option_checkbox( 'role_content_date_limits', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; ?> - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'persistent_cache'; - - $cache_selected = scoper_get_option('persistent_cache', $sitewide, $customize_defaults); - $cache_enabled = $cache_selected && defined('ENABLE_PERSISTENT_CACHE') && ! defined('DISABLE_PERSISTENT_CACHE'); - ?> - -
    - - display_hints) _e('Group membership, role restrictions, role assignments and some filtered results (including term listings and WP page, category and bookmark listings) will be stored to disk, on a user-specific or group-specific basis where applicable. This does not cache content such as post listings or page views.', 'scoper'); - echo ''; - - $cache_msg = ''; - if ( $cache_selected && ! wpp_cache_test( $cache_msg, 'scoper' ) ) { - echo '
    '; - echo $cache_msg; - echo '
    '; - } elseif ( $cache_enabled && ! file_exists('../rs_cache_flush.php') && ! file_exists('..\rs_cache_flush.php') ) { - echo '
    '; - _e('Note: The internal caching code contains numerous safeguards against corruption. However, if it does become corrupted your site may be inaccessable. For optimal reliability, copy rs_cache_flush.php into your WP root directory so it can be executed directly if needed.', 'scoper'); - echo '
    '; - } - ?> - - -
    - - - - - - -
    section_captions[$tab][$section]; ?> - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'version_update_notice';?> - '; - printf( __( "Database Schema Version: %s", 'scoper'), SCOPER_DB_VERSION); - echo '
    '; - printf( __( "PHP Version: %s", 'scoper'), phpversion() ); - echo '
    '; - - $hint = ''; - $ui->option_checkbox( 'version_update_notice', $tab, $section, $hint, '
    ' ); - ?> - - -
    section_captions[$tab][$section]; ?> - - form_options[$tab][$section] ) ) : - if ( ! defined('HTTP_AUTH_DISABLED_RS') ) { - $id = 'feed_link_http_auth'; - $ui->all_options []= $id; - $current_setting = scoper_get_option($id, $sitewide, $customize_defaults); - - echo $ui->option_captions['feed_link_http_auth']; - - echo "  '; - echo "
    "; - echo ''; - if ( $ui->display_hints ) _e('Suffix RSS feed links with an extra parameter to trigger required HTTP authentication. Note that anonymous and cookie-based RSS will still be available via the standard feed URL.', 'scoper'); - echo ''; - } else { - echo ''; - _e( 'cannot use HTTP Authentication for RSS Feeds because another plugin has already defined the function "get_currentuserinfo"', 'scoper' ); - echo ''; - } - - echo "

    "; - endif;?> - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'rss_private_feed_mode'; - - //echo ( _ x( 'Display', 'prefix to RSS content dropdown', 'scoper' ) ); - echo ( __( 'Display', 'scoper' ) ); - echo '  '; - //echo ( _ x( 'for readable private posts', 'suffix to RSS content dropdown', 'scoper' ) ); - echo ( __( 'for readable private posts', 'scoper' ) ); - echo "
    "; - endif;?> - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'rss_nonprivate_feed_mode'; - //echo ( _ x( 'Display', 'prefix to RSS content dropdown', 'scoper' ) ); - echo ( __( 'Display', 'scoper' ) ); - echo '  '; - //echo ( _ x( 'for readable non-private posts', 'suffix to RSS content dropdown', 'scoper' ) ); - echo ( __( 'for readable non-private posts', 'scoper' ) ); - - echo "
    "; - ?> - - display_hints ) _e('Since some browsers will cache feeds without regard to user login, block RSS content even for qualified users.', 'scoper');?> - -

    - - - form_options[$tab][$section] ) ) : - $id = 'feed_teaser'; - $ui->all_options []= $id; - $val = htmlspecialchars( scoper_get_option($id, $sitewide, $customize_defaults) ); - - echo ""; - endif;?> - -
    section_captions[$tab][$section]; ?> - def_otype_options[$option_basename]) ) { - $ui->all_otype_options []= $option_basename; - - $opt_vals = scoper_get_option( $option_basename, $sitewide, $customize_defaults ); - if ( ! $opt_vals || ! is_array($opt_vals) ) - $opt_vals = array(); - $do_teaser = array_merge( $ui->def_otype_options[$option_basename], $opt_vals ); - - $option_hide_private = 'teaser_hide_private'; - $ui->all_otype_options []= $option_hide_private; - $opt_vals = scoper_get_option( $option_hide_private, $sitewide, $customize_defaults ); - if ( ! $opt_vals || ! is_array($opt_vals) ) - $opt_vals = array(); - $hide_private = array_merge( $ui->def_otype_options[$option_hide_private], $opt_vals ); - - $option_use_teaser = 'use_teaser'; - $ui->all_otype_options []= $option_use_teaser; - $opt_vals = scoper_get_option( $option_use_teaser, $sitewide, $customize_defaults ); - if ( ! $opt_vals || ! is_array($opt_vals) ) - $opt_vals = array(); - $use_teaser = array_merge( $ui->def_otype_options[$option_use_teaser], $opt_vals ); - - $option_logged_only = 'teaser_logged_only'; - $ui->all_otype_options []= $option_logged_only; - $opt_vals = scoper_get_option( $option_logged_only, $sitewide, $customize_defaults ); - if ( ! $opt_vals || ! is_array($opt_vals) ) - $opt_vals = array(); - $logged_only = array_merge( $ui->def_otype_options[$option_logged_only], $opt_vals ); - - // loop through each source that has a default do_teaser setting defined - foreach ( $do_teaser as $src_name => $val ) { - $id = $option_basename . '-' . $src_name; - - echo '
    '; - echo "
    '); - - $css_display = ( $do_teaser[$src_name] ) ? 'block' : 'none'; - - $style = "style='margin-left: 1em;'"; - echo "
    "; - - // loop through each object type (for current source) to provide a use_teaser checkbox - foreach ( $use_teaser as $src_otype => $teaser_setting ) { - if ( $src_name != scoper_src_name_from_src_otype($src_otype) ) - continue; - - if ( is_bool($teaser_setting) ) - $teaser_setting = intval($teaser_setting); - - $id = str_replace(':', '_', $option_use_teaser . '-' . $src_otype); - - echo '
    '; - echo "
    '; - - // Checkbox option to skip teaser for anonymous users - $id = str_replace(':', '_', $option_logged_only . '-' . $src_otype); - echo ""; - //echo( _ x( 'for:', 'teaser: anonymous, logged or both', 'scoper') ); - echo( __( 'for:', 'scoper') ); - echo "  '; - - // Checkbox option to skip teaser for logged users - echo "'; - - // Checkbox option to do teaser for BOTH logged and anon users - echo "'; - - echo ('
    '); - } - echo '
    '; - - if ( empty($displayed_teaser_caption) ) { - echo ''; - if ( $ui->display_hints) { - _e('If content is blocked, display replacement text instead of hiding it completely.', 'scoper'); - echo '
    '; - _e('Note: the prefix and suffix settings below will always be applied unless the teaser mode is "no teaser".', 'scoper'); - } - echo '
    '; - - $displayed_teaser_caption = true; - } - - // provide hide private (instead of teasing) checkboxes for each pertinent object type - echo '

    '; - $display_style = ( $do_teaser[$src_name] ) ? '' : "style='display:none;'"; - echo "
    "; - foreach ( $hide_private as $src_otype => $teaser_setting ) { - if ( $src_name != scoper_src_name_from_src_otype($src_otype) ) - continue; - - $id = str_replace(':', '_', $option_hide_private . '-' . $src_otype); - - echo "
    '); - } - echo ''; - if ( $ui->display_hints) _e('Hide private content completely, while still showing a teaser for content which is published with restrictions. Note: Private posts hidden in this way will reduce the total number of posts on their "page" of a blog listing.', 'scoper'); - echo ''; - echo '
    '; - } // end foreach source's do_teaser setting - ?> -
    - array('prepend', 'append'), - 'content' => array('replace', 'prepend', 'append'), - 'excerpt' => array('replace', 'prepend', 'append') ); - - $items_display = array( 'name' => __('name', 'scoper'), 'content' => __('content', 'scoper'), 'excerpt' => __('excerpt', 'scoper') ); - $actions_display = array( 'replace' => __('replace with (if using fixed teaser, or no excerpt available):', 'scoper'), 'prepend' => __('prefix with:', 'scoper'), 'append' => __('suffix with:', 'scoper') ); - - // first determine all src:otype keys - $src_otypes = array(); - foreach ( $user_suffixes as $anon ) - foreach ( $item_actions as $item => $actions ) - foreach ( $actions as $action ) { - $ui->all_otype_options []= "teaser_{$action}_{$item}{$anon}"; - - if ( ! empty($ui->def_otype_options["teaser_{$action}_{$item}{$anon}"]) ) - $src_otypes = array_merge($src_otypes, $ui->def_otype_options["teaser_{$action}_{$item}{$anon}"]); - } - - $last_src_name = ''; - foreach ( array_keys($src_otypes) as $src_otype ) { - $src_name = scoper_src_name_from_src_otype($src_otype); - if ( $src_name != $last_src_name ) { - if ( $last_src_name ) - echo ''; - - $last_src_name = $src_name; - $css_display = ( $do_teaser[$src_name] ) ? 'block' : 'none'; - echo "
    "; - } - - $display_name = $scoper->admin->interpret_src_otype($src_otype); - - // separate input boxes to specify teasers for anon users and unpermitted logged users - foreach ( $user_suffixes as $anon ) { - $user_descript = ( $anon ) ? __('anonymous users', 'scoper') : __('logged users', 'scoper'); - - echo ''; - printf( __('%1$s Teaser Text (%2$s):', 'scoper'), $display_name, $user_descript ); - echo ''; - echo ('
      '); - - // items are name, content, excerpt - foreach ( $item_actions as $item => $actions ) { - echo ('
    • ' . $items_display[$item] . ':'); - echo '
        '; - - // actions are prepend / append / replace - foreach( $actions as $action ) { - $option_name = "teaser_{$action}_{$item}{$anon}"; - if ( ! $opt_vals = scoper_get_option( $option_name, $sitewide, $customize_defaults ) ) - $opt_vals = array(); - - $ui->all_otype_options []= $option_name; - - if ( ! empty($ui->def_otype_options["teaser_{$action}_{$item}{$anon}"]) ) - $opt_vals = array_merge($ui->def_otype_options[$option_name], $opt_vals); - - if ( isset($opt_vals[$src_otype]) ) { - $val = htmlspecialchars($opt_vals[$src_otype]); - $id = str_replace(':', '_', $option_name . '-' . $src_otype); - - echo "

      "); - } // end foreach user_suffixes - - } // end foreach src_otypes - - echo '
    '; - } // endif any default otype_options for do_teaser - ?> -

     '; - printf( __('Idea: For Scheduled Revisions and Pending Revisions functionality that integrates with your RS Roles and Restrictions, install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin.', 'role-scoper'), "", '', "", '' ); - echo '

    - -
    -form_options[$tab] ) ) : -?> - -"; - -if ( $ui->display_hints ) { - echo '
    '; - _e("Note: for most installations, the default settings are fine.", 'scoper'); - echo '
    '; -} -?> - -form_options[$tab][$section] ) && in_array( 'do_teaser', $ui->form_options[$tab][$section] ) ) : // for now, teaser option are all-or-nothing sitewide / blogwide -?> - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : ?> - - - - - -form_options[$tab][$section] ) ) : ?> - - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : ?> - - -form_options[$tab][$section] ) ) : - $objscope_equiv_roles = array( 'rs_post_reader' => 'rs_private_post_reader', 'rs_post_author' => 'rs_post_editor', 'rs_page_reader' => 'rs_private_page_reader', 'rs_page_author' => 'rs_page_editor' ); - - if ( // To avoid confusion, don't display revision roles as candidates unless revisions are available - ( ! IS_MU_RS && defined('RVY_VERSION') ) - //|| ( IS_MU_RS && ( ($sitewide && empty($scoper_options_sitewide['pending_revisions']) ) || ($sitewide && empty($scoper_options_sitewide['scheduled_revisions']) ) || scoper_get_option( 'pending_revisions', $sitewide ) || scoper_get_option( 'scheduled_revisions', $sitewide ) ) ) - || ( IS_MU_RS && ( ($sitewide && empty($rvy_options_sitewide['pending_revisions']) ) || ($sitewide && empty($rvy_options_sitewide['scheduled_revisions']) ) || rvy_get_option( 'pending_revisions', $sitewide ) || rvy_get_option( 'scheduled_revisions', $sitewide ) ) ) - ) - $objscope_equiv_roles = array_merge( $objscope_equiv_roles, array( 'rs_post_revisor' => 'rs_post_contributor', 'rs_page_revisor' => 'rs_page_contributor' ) ); - - if ( IS_MU_RS ) { // apply option scope filtering for mu - foreach ( array_keys($objscope_equiv_roles) as $role_name ) - if ( ! in_array( $role_name . '_role_objscope', $ui->form_options[$tab][$section] ) ) - $objscope_equiv_roles = array_diff_key( $objscope_equiv_roles, array( $role_name => true ) ); - } - - if ( ! empty( $objscope_equiv_roles ) ) : ?> - $equiv_role_handle ) { - $ui->all_options []= "{$role_handle}_role_objscope"; - } - ?> - - - - - - - - - - -
    section_captions[$tab][$section]; // --- ROLE BASIS SECTION --- - ?> - - - option_checkbox( 'enable_group_roles', $tab, $section, $hint, '' ); - - $hint = ''; - $ui->option_checkbox( 'enable_user_roles', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; // --- ROLE TYPE SECTION --- - ?> - - - form_options[$tab][$section] ) ) : - $ui->all_options []= 'role_type'; - ?> - option_captions['role_type']; ?>
    -
    - - display_hints) _e('Either role type can be scoped (assigned for specific terms or objects). However, RS roles allow finer control. A user\'s main WordPress role will be applied by default regardless of this selection.', 'scoper') ?> - -

    - - - option_checkbox( 'custom_user_blogcaps', $tab, $section, $hint, '' ); - } - ?> - -
    section_captions[$tab][$section]; // --- PAGE STRUCTURE SECTION --- - ?> - - all_options []= $id; - $current_setting = strval( scoper_get_option($id, $sitewide, $customize_defaults) ); // force setting and corresponding keys to string, to avoid quirks with integer keys - - echo $ui->option_captions['lock_top_pages']; - - $captions = array( 'author' => __('Page Authors, Editors and Administrators', 'scoper'), '' => __('Page Editors and Administrators', 'scoper'), '1' => __('Administrators', 'scoper') ); - - foreach ( $captions as $key => $value) { - $key = strval($key); - echo "
    '; - } - - echo ''; - if ( $ui->display_hints ) _e('Users who do not meet this blog-wide role requirement may still be able to save and/or publish pages, but will not be able to publish a new page with a Page Parent setting of "Main Page". Nor will they be able to move a currently published page from "Main Page" to a different Page Parent.', 'scoper'); - echo ''; - ?> - -
    section_captions[$tab][$section]; // --- USER PROFILE SECTION --- - ?> - - option_checkbox( 'display_user_profile_groups', $tab, $section, $hint, '' ); - - $hint = ''; - $ui->option_checkbox( 'display_user_profile_roles', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; // --- USER MANAGEMENT SECTION --- - ?> - - option_checkbox( 'limit_user_edit_by_level', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; // --- ADMINISTRATOR DEFINITION SECTION --- - ?> - 'manage_options', 'user' => 'edit_users', 'content' => 'activate_plugins' ); - - $name['content'] = __('Content Administrator', 'scoper'); - $name['user'] = __('User Administrator', 'scoper'); - $name['option'] = __('Option Administrator', 'scoper'); - - $descript['content'] = __('RS never applies restricting or enabling content filters', 'scoper'); - $descript['user'] = __('RS allows full editing of all user groups and scoped roles / restrictions', 'scoper'); - $descript['option'] = __('Can edit Role Scoper options', 'scoper'); - - _e( 'Role Scoper internally checks the following capabilities for content and role administration. By default, these capabilities are all contained in the Administrator role only. You can use the Capability Manager plugin to split/overlap them among different roles as desired.', 'scoper' ); - - echo '' - . '' - . '' - . '' - . '' - . ''; - - foreach ( array_keys($name) as $admin_type ) { - $constant_name = 'SCOPER_' . strtoupper($admin_type) . '_ADMIN_CAP'; - $cap_name = ( defined( $constant_name ) ) ? constant( $constant_name ) : $default_cap[$admin_type]; - - echo '' - . '' - . '' - . '' - . ''; - - if ( ( 'content' == $admin_type ) && ( $cap_name != $default_cap['content'] ) ) - $custom_content_admin_cap = true; - } - echo '
    ' . __( 'Administrator Type', 'scoper' ) . '' . __( 'Required Capability', 'scoper' ) . '' . __awp( 'Description' ) . '
    ' . $name[$admin_type] . '' . $cap_name . '' . $descript[$admin_type] . '
    '; - - _e( 'Each administrator type\'s capability can be modified by adding any of the following define statements to your wp-config.php:', 'scoper' ); - echo '
    '; - echo( "define( 'SCOPER_CONTENT_ADMIN_CAP', 'your_content_capname' );" ); - echo '
    '; - echo( "define( 'SCOPER_USER_ADMIN_CAP', 'your_user_capname' );" ); - echo '
    '; - echo( "define( 'SCOPER_OPTION_ADMIN_CAP', 'your_option_capname' );" ); - echo '
    '; - _e( 'For example, by using Capability Manager to add a custom capability such as administer_all_content to certain WordPress roles, you could mirror that setting in the SCOPER_CONTENT_ADMIN_CAP definition to ensure that those users are never content-restricted by Role Scoper.', 'scoper'); - ?> -
    section_captions[$tab][$section]; // --- LIMITED EDITING ELEMENTS SECTION --- - ?> - - form_options[$tab][$section] ) ) :?> -
    - display_hints) { - echo ('
    '); - _e('Remove Edit Form elements with these html IDs from users who do not have full editing capabilities for the post/page. Separate with ;', 'scoper'); - echo '
    '; - } - ?> -
    - def_otype_options[$option_name]) ) { - if ( ! $opt_vals = scoper_get_option( $option_name, $sitewide, $customize_defaults ) ) - $opt_vals = array(); - - $opt_vals = array_merge($ui->def_otype_options[$option_name], $opt_vals); - - $ui->all_otype_options []= $option_name; - - $sample_ids = array(); - - $sample_ids['post:post'] = ''; - $sample_ids['post:page'] = ''; - - foreach ( $opt_vals as $src_otype => $val ) { - $id = str_replace(':', '_', $option_name . '-' . $src_otype); - $display = $scoper->admin->interpret_src_otype($src_otype, false); - echo('
    '); - echo(''); - printf(__('%s Edit Form HTML IDs:', 'scoper'), $display); - ?> - - -
    - ", '', $sample_ids[$src_otype] ); - } - ?> -
    - - -
    - - - - form_options[$tab][$section] ) ) : - $id = 'hide_non_editor_admin_divs'; - $ui->all_options []= $id; - $current_setting = strval( scoper_get_option($id, $sitewide, $customize_defaults) ); // force setting and corresponding keys to string, to avoid quirks with integer keys - ?> -
    - __('no requirement', 'scoper'), '1' => __('Contributor / Author / Editor', 'scoper'), 'author' => __('Author / Editor', 'scoper'), 'editor' => __awp('Editor'), 'admin_content' => __('Content Administrator', 'scoper'), 'admin_user' => __('User Administrator', 'scoper'), 'admin_option' => __('Option Administrator', 'scoper') ); - - foreach ( $captions as $key => $value) { - $key = strval($key); - echo "
    '; - } - ?> - - display_hints) _e('Note: The above roles are type-specific RS roles (for the object type involved) which must be contained in a user\'s blog-wide WordPress role.', 'scoper'); - ?> - -
    - - -
    section_captions[$tab][$section]; // --- ROLE ASSIGNMENT INTERFACE SECTION --- - ?> - - otype_option_checkboxes( 'limit_object_editors', $otype_caption, $tab, $section, $hint, '

    ', array( 'plural_display_name' => false ) ); - - $hint = __('In the Edit Post/Edit Page roles tabs, decorate user/group name with colors and symbols if they have the role implicitly via group, general role, category role, or a superior post/page role.', 'scoper'); - $ui->option_checkbox( 'indicate_blended_roles', $tab, $section, $hint, '
    ' ); - - $hint = __('Display introductory descriptions at the top of various role assignment / definition screens.', 'scoper'); - $ui->option_checkbox( 'display_hints', $tab, $section, $hint, '
    ' ); - - $hint = __('Accept entry of user names or IDs via comma-separated text instead of individual checkboxes.', 'scoper'); - $ui->option_checkbox( 'user_role_assignment_csv', $tab, $section, $hint, '' ); - ?> - -
    section_captions[$tab][$section]; // --- ROLE ASSIGNMENT INTERFACE SECTION --- - ?> - - otype_option_checkboxes( 'restrictions_column', $otype_caption, $tab, $section, $hint, '
    ' ); - - $otype_caption = __('Term Roles column in Edit %s listing', 'scoper'); - $ui->otype_option_checkboxes( 'term_roles_column', $otype_caption, $tab, $section, $hint, '
    ' ); - - $otype_caption = __('Object Roles column in Edit %s listing', 'scoper'); - $ui->otype_option_checkboxes( 'object_roles_column', $otype_caption, $tab, $section, $hint, '
    ' ); - ?> - -
    section_captions[$tab][$section]; ?> - $equiv_role_handle ) { - $id = "{$role_handle}_role_objscope"; - $checked = ( scoper_get_option( $id, $sitewide, $customize_defaults ) ) ? "checked='checked'" : ''; - echo '
    '; - echo "
    '; - } - ?> - - display_hints) { - _e('By default, the above roles are not available for object-specific assignment because another role is usually equivalent. However, the distinctions may be useful if you propagate roles to sub-Pages, set Default Roles or customize RS Role Definitions.', 'scoper'); - echo '

    '; - _e('Note: Under the default configuration, the tabs labeled "Reader" in the Post/Page Edit Form actually assign the corresponding Private Reader role.', 'scoper'); - } - ?> -
    -
    -
    - - - - -form_options[$tab] ) ) : ?> -"; - -if ( $ui->display_hints ) { - echo '
    '; - _e("These optional settings allow advanced users to adjust Role Scoper's sphere of influence. For most installations, the default settings are fine.", 'scoper'); - echo '
    '; -} -?> - - - -form_options[$tab][$section_alias] ) ) : ?> - - - - - -form_options[$tab][$section] ) ) : ?> - - - - - - - -
    section_captions[$tab][$section]; - echo '
    ' . __('see notes', 'scoper') . ' )'; - ?>
    - all_options array - - global $wp_taxonomies; - - _e('Specify which WordPress taxonomies can have Restrictions and Roles:', 'scoper'); - echo '
    '; - - - $scopes = array( 'term', 'object'); - foreach ( $scopes as $scope ) { - if ( 'object' == $scope ) { -?>
    -section_captions[$tab][$section]; -?> -form_options[$tab][$section_alias] ) ) { // use_term_roles and use_object_roles follow option scope of enable_wp_taxonomies - - $ui->all_otype_options []= $option_name; - - if ( isset($ui->def_otype_options[$option_name]) ) { - if ( ! $opt_vals = scoper_get_option( $option_name, $sitewide, $customize_defaults ) ) - $opt_vals = array(); - - $opt_vals = array_merge($ui->def_otype_options[$option_name], $opt_vals); - - foreach ( $opt_vals as $src_otype => $val ) { - $id = str_replace(':', '_', $option_name . '-' . $src_otype); - ?> -
    -
    '); - } // end foreach src_otype - } // endif default option isset - - } // endif displaying this option in form - - - if ( 'term' == $scope ) { - $option_name = "enable_wp_taxonomies"; - $enabled = scoper_get_option($option_name, $sitewide, $customize_defaults); - - $locked_taxonomies = array( 'category' => 1, 'link_category' => 1 ); - - $all = implode(',', array_keys( array_diff_key($wp_taxonomies, $locked_taxonomies) ) ); - echo ""; - - $locked = array(); - - // Detect and support any WP taxonomy - foreach ( $wp_taxonomies as $taxonomy => $wtx ) { // in case the 3rd party plugin uses a taxonomy->object_type property different from the src_name we use for RS data source definition - if ( isset( $locked_taxonomies[$taxonomy] ) ) - continue; - - if ( ! $scoper->data_sources->is_member($wtx->object_type) && ! $scoper->data_sources->is_member_alias($wtx->object_type) ) - continue; - - $disabled_attrib = ( $scoper->taxonomies->is_member($taxonomy) && ! $scoper->taxonomies->member_property($taxonomy, 'autodetected_wp_taxonomy') ) ? 'disabled="disabled"' : ''; - - $id = $option_name . '-' . $taxonomy; - $val = isset($enabled[$taxonomy]); - - if ( $disabled_attrib && $val ) - continue; - //$locked[$taxonomy] = 1; - ?> -
    -
    "); - } // end foreach wp tax - - $locked = implode(',', array_keys($locked) ); - echo ""; - - if ( ! empty($any_loose_taxonomy) ) - echo "" . __( '* = Role Assignment only (no Restrictions)', 'scoper' ) . ''; - } - - } // end foreach scope - ?> -
    section_captions[$tab][$section]; ?> - all_options array - - _e('Apply Roles and Restrictions for:', 'scoper'); - echo '
    '; - $topic = "access_types"; - $opt_vals = scoper_get_option("disabled_{$topic}", $sitewide, $customize_defaults); - - $all = implode(',', $scoper->access_types->get_all_keys() ); - echo ""; - - foreach ( $scoper->access_types->get_all() as $access_name => $access_type) { - $id = $topic . '-' . $access_name; - $val = ! $opt_vals[$access_name]; - ?> -
    -
    '); - } // end foreach access types - ?> -
    -
    - -' . __("Notes", 'scoper') . ':
      '; - -echo '
    • '; -_e('The "Post Tag" taxonomy cannot be used to define restrictions because tags are not mandatory. For most installations, categories are a better mechanism to define roles. Note that Role Scoper does not filter tag storage based on the editing user\'s access. As with any other custom-defined taxonomy, use this option at your own discretion.', 'scoper'); -echo '
    • '; - -echo '
    • '; -_e('By default, WordPress does not support page categories. The corresponding "Role Scopes" option is only meaningful if the WP core or another plugin has added this support.', 'scoper'); -echo '
    • '; - -echo '
    '; -echo ''; - -endif; // any options accessable in this tab - -// ------------------------- END Realms tab --------------------------------- - - - - -if ( ! empty( $ui->form_options['rs_role_definitions'] ) ) { - if ( 'rs' == SCOPER_ROLE_TYPE ) { - // RS Role Definitions Tab - include('role_definition.php'); - scoper_display_rs_roledefs( array( 'bgcolor_class' => $color_class, 'sitewide' => $sitewide, 'customize_defaults' => $customize_defaults ) ); - } - - // WP Role Definitions Tab - include('role_definition_wp.php'); - scoper_display_wp_roledefs( array( 'bgcolor_class' => $color_class ) ); -} - - - -// ------------------------- BEGIN Option Scope tab --------------------------------- -$tab = 'optscope'; - -if ( $sitewide ) : ?> -"; - -if ( $ui->display_hints ) { - echo '
    '; - _e("Specify which Role Scoper Options should be applied site-wide.", 'scoper'); - echo '

    '; -} - -echo '
      '; -$all_movable_options = array(); - -$option_scope_stamp = __( 'sitewide control of "%s"', 'scoper' ); - -foreach ( $available_form_options as $tab_name => $sections ) { - echo '
    • '; - - $explanatory_caption = __( 'Selected options will be controlled site-wide via Site Admin > Role Options; unselected options can be set per-blog via Roles > Options', 'scoper' ); - - if ( isset( $ui->tab_captions[$tab_name] ) ) - $tab_caption = $ui->tab_captions[$tab_name]; - else - $tab_caption = $tab_name; - - echo '
      '; - if ( $ui->display_hints ) - printf( __( '%1$s (%2$s)', 'scoper' ), $tab_caption, $explanatory_caption ); - //printf( _ x( '%1$s (%2$s)', 'option_tabname (explanatory note)', 'scoper' ), $tab_caption, $explanatory_caption ); - else - echo $tab_caption; - echo '
      '; - - echo '
        '; - - foreach ( $sections as $section_name => $option_names ) { - if ( empty( $sections[$section_name] ) ) - continue; - - echo '
      • '; - - if ( isset( $ui->section_captions[$tab_name][$section_name] ) ) - echo $ui->section_captions[$tab_name][$section_name]; - else - _e( $section_name ); - - echo '
          '; - - foreach ( $option_names as $option_name ) { - if ( $option_name && $ui->option_captions[$option_name] ) { - $all_movable_options []= $option_name; - echo '
        • '; - - $disabled = ( in_array( $option_name, array( 'file_filtering', 'mu_sitewide_groups' ) ) ) ? "disabled='disabled'" : ''; - - $id = "{$option_name}_sitewide"; - $val = isset( $scoper_options_sitewide[$option_name] ); - echo "
        • '; - } - } - - echo '
        '; - } - echo '


      '; -} -echo '
    '; - -echo ''; - -$all_movable_options = implode(',', $all_movable_options); -echo ""; - -endif; // any options accessable in this tab -// ------------------------- END Option Scope tab --------------------------------- - - - -// this was required for Access Types section, which was removed -//$all = implode(',', $all_otypes); -//echo ""; - -$ui->all_options = implode(',', $ui->all_options); -$ui->all_otype_options = implode(',', array_unique( $ui->all_otype_options ) ); -echo ""; -echo ""; - -echo ""; -?> -

    - -

    - - -

    - - -

    - -

    -

    - - -data_sources->member_property($src_name, 'object_types') ) { - $display_names = array(); - foreach ( $object_types as $object_type) - $display_names[] = $object_type->display_name_plural; - $display = implode(', ', $display_names); - } else { - $display_name = $scoper->data_sources->member_property($src_name, 'display_name_plural'); - $display = sprintf(__("%s data source", 'scoper'), $display_name); - } - - return $display; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/ozh_helper_rs.php b/blog/wp-content/plugins/role-scoper/admin/ozh_helper_rs.php deleted file mode 100644 index 581d185..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/ozh_helper_rs.php +++ /dev/null @@ -1,38 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/permission_lib_rs.php b/blog/wp-content/plugins/role-scoper/admin/permission_lib_rs.php deleted file mode 100644 index a1b9a12..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/permission_lib_rs.php +++ /dev/null @@ -1,223 +0,0 @@ -role_defs->get_role_ops($role_handle); - - // user can't view or edit role assignments unless they have all rolecaps - // however, if this is a new post, allow read role to be assigned even if contributor doesn't have read_private cap blog-wide - if ( $item_id || ( $role_ops[$role_handle] != array( 'read' => 1 ) ) ) { - static $reqd_caps; - - if ( ! isset($reqd_caps) ) - $reqd_caps = array(); - - if ( ! isset($reqd_caps[$role_handle]) ) - $reqd_caps[$role_handle] = $scoper->role_defs->role_caps[$role_handle]; - - if ( ! awp_user_can(array_keys($reqd_caps[$role_handle]), $item_id) ) - return false; - - - // are we also applying the additional requirement (based on RS Option setting) that the user is a blog-wide editor? - if ( $require_blogwide_editor ) { - static $can_edit_blogwide; - - if ( ! isset($can_edit_blogwide) ) - $can_edit_blogwide = array(); - - if ( ! isset($can_edit_blogwide[$src_name][$object_type]) ) - $can_edit_blogwide[$src_name][$object_type] = user_can_edit_blogwide_rs($src_name, $object_type, array( 'require_others_cap' => true ) ); - - if ( ! $can_edit_blogwide[$src_name][$object_type] ) - return false; - } - } - - return true; - } - - function user_can_admin_object_rs($src_name, $object_type, $object_id = false, $any_obj_role_check = false, $user = '' ) { - if ( is_content_administrator_rs() ) - return true; - - global $scoper; - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - if ( $new_object = ! $object_id && ( false !== $object_id ) ) { - //for new objects, default to requiring caps for 1st defined status (=published for posts) - $src = $scoper->data_sources->get($src_name); - reset ($src->statuses); - $status_name = key($src->statuses); - } else { - $status_name = $scoper->data_sources->detect('status', $src_name, $object_id); - } - - // insert_role_assignments passes array from get_role_attributes - if ( is_array($object_type) ) { - if ( count($object_type) == 1 ) - $object_type = reset($object_type); - else - // only WP roles should ever have multiple sources / otypes - $object_type = $scoper->data_sources->get_from_db('type', $src_name, $object_id); - } - - if ( ! $new_object && isset($src->reqd_caps[OP_ADMIN_RS][$object_type][$status_name]) ) - $reqd_caps = $src->reqd_caps[OP_ADMIN_RS][$object_type][$status_name]; - else { - $base_caps_only = $new_object; - $admin_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_ADMIN_RS, $status_name, $base_caps_only); - $delete_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_DELETE_RS, $status_name, $base_caps_only); - $reqd_caps = array_merge( array_keys($admin_caps), array_keys($delete_caps) ); - } - - if ( ! $reqd_caps ) - return true; // apparantly this src/otype has no admin caps, so no restriction to apply - - // pass this parameter the ugly way because I'm afraid to include it in user_has_cap args array - // Normally we want to disregard "others" cap requirements if a role is assigned directly for an object - // This is an exception - we need to retain a "delete_others" cap requirement in case it is the - // distinguishing cap of an object administrator - - $scoper->cap_interceptor->require_full_object_role = true; - - if ( defined( 'RVY_VERSION' ) ) { - global $revisionary; - $revisionary->skip_revision_allowance = true; - } - - $return = awp_user_can($reqd_caps, $object_id); - - $scoper->cap_interceptor->require_full_object_role = false; - - if ( defined( 'RVY_VERSION' ) ) - $revisionary->skip_revision_allowance = false; - - if ( ! $return && ! $object_id && $any_obj_role_check ) { - // No object ID was specified, and current user does not have the cap blog-wide. Credit user for capability on any individual object. - - $admin_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_ADMIN_RS, STATUS_ANY_RS); - $delete_caps = $scoper->cap_defs->get_matching($src_name, $object_type, OP_DELETE_RS, STATUS_ANY_RS); - - if ( $reqd_caps = array_merge( array_keys($admin_caps), array_keys($delete_caps) ) ) { - if ( ! defined('DISABLE_QUERYFILTERS_RS') && $scoper->cap_interceptor->user_can_for_any_object( $reqd_caps ) ) - $return = true; - } - } - - return $return; - } - - function user_can_admin_terms_rs($taxonomy = '', $term_id = '', $user = '') { - if ( is_user_administrator_rs() ) - return true; - - global $scoper; - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - $qualifying_caps = array(); - - $taxonomies = array(); - foreach ( $scoper->cap_defs->get_all() as $cap_name => $capdef ) - if ( (OP_ADMIN_RS == $capdef->op_type) && $scoper->taxonomies->is_member($capdef->object_type) ) { - if ( ! $taxonomy || ( $capdef->object_type == $taxonomy ) ) { - $qualifying_caps[$cap_name] = 1; - $taxonomies[$capdef->object_type] = 1; - } - } - - if ( empty($qualifying_caps) ) - return false; - - // does current user have any blog-wide admin caps for term admin? - $qualifying_roles = $scoper->role_defs->qualify_roles(array_flip($qualifying_caps), SCOPER_ROLE_TYPE); - - if ( $user_blog_roles = array_intersect_key( $user->blog_roles[ANY_CONTENT_DATE_RS], $qualifying_roles) ) { - if ( $term_id ) { - $strict_terms = $scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy); - - foreach ( array_keys($user_blog_roles) as $role_handle ) { - // can't blend in blog role if term requires term role assignment - if ( isset($strict_terms['unrestrictions'][$role_handle][$term_id]) - || ( ! is_array($strict_terms['unrestrictions'][$role_handle]) && ! isset($strict_terms['restrictions'][$role_handle][$term_id]) ) ) - return true; - } - } else { - // todo: more precision by checking whether ANY terms are non-strict for the qualifying role(s) - return true; - } - } - - // does current user have any term-specific admin caps for term admin? - if ( $taxonomies ) { - foreach ( array_keys($taxonomies) as $taxonomy ) { - if ( ! isset($current_user->term_roles[$taxonomy]) ) - $user->get_term_roles_daterange($taxonomy); // call daterange function populate term_roles property - possible perf enhancement for subsequent code even though we don't conider content_date-limited roles here - - if ( ! empty($user->term_roles[$taxonomy][ANY_CONTENT_DATE_RS]) ) { - foreach ( array_keys( $user->term_roles[$taxonomy][ANY_CONTENT_DATE_RS] ) as $role_handle ) { - if ( ! empty($scoper->role_defs->role_caps[$role_handle]) ) { - if ( array_intersect_key($qualifying_caps, $scoper->role_defs->role_caps[$role_handle]) ) { - if ( ! $term_id || in_array($term_id, $user->term_roles[$taxonomy][ANY_CONTENT_DATE_RS][$role_handle]) ) - return true; - } - } - } - } - } - } // endif any taxonomies have cap defined - } // end function - - - function user_can_edit_blogwide_rs( $src_name = '', $object_type = '', $args = '' ) { - if ( is_administrator_rs($src_name) ) - return true; - - global $scoper, $current_user; - - $defaults = array( 'require_others_cap' => false, 'status' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - $cap_defs = $scoper->cap_defs->get_matching( $src_name, $object_type, OP_EDIT_RS, '', ! $require_others_cap ); - - if ( $status ) - $cap_defs = array_merge( $cap_defs, $scoper->cap_defs->get_matching( $src_name, $object_type, OP_EDIT_RS, $status, ! $require_others_cap ) ); - - foreach ( array_keys($current_user->blog_roles[ANY_CONTENT_DATE_RS]) as $role_handle ) - if ( isset($scoper->role_defs->role_caps[$role_handle]) ) - if ( ! array_diff_key( $cap_defs, $scoper->role_defs->role_caps[$role_handle] ) ) - return true; - } - - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/profile_ui_rs.php b/blog/wp-content/plugins/role-scoper/admin/profile_ui_rs.php deleted file mode 100644 index c17c87e..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/profile_ui_rs.php +++ /dev/null @@ -1,377 +0,0 @@ -get_blog_roles_daterange( SCOPER_ROLE_TYPE, array( 'include_role_duration_key' => true, 'enforce_duration_limits' => false ) ); // arg: return array with additional key dimension for role duration - - foreach ( $this->scoper->taxonomies->get_all() as $taxonomy => $tx ) - $term_roles[$taxonomy] = $user->get_term_roles_daterange( $taxonomy, SCOPER_ROLE_TYPE, array( 'include_role_duration_key' => true, 'enforce_duration_limits' => false ) ); // arg: return array with additional key dimension for role duration - - $duration_limits_enabled = scoper_get_option( 'role_duration_limits' ); - $content_date_limits_enabled = scoper_get_option( 'role_content_date_limits' ); - - $html = ''; - - if ( $groups_only ) { - if ( IS_MU_RS && scoper_get_option( 'mu_sitewide_groups', true ) ) { - global $blog_id; - - $list = scoper_get_blog_list( 0, 'all' ); - - $blog_path = ''; - foreach ( $list as $blog ) { - if ( $blog['blog_id'] == $blog_id ) { - $blog_path = $blog['path']; - break; - } - } - - $group_caption = sprintf( __('Group Roles %1$s(for %2$s)%3$s', 'scoper'), '', rtrim($blog_path, '/'), '' ); - } else - $group_caption = __('Group Roles', 'scoper'); - - } else { - $html .= "
    "; - $html .= "

    " . __('Scoped Roles', 'scoper') . "

    "; - - if ( 'rs' == SCOPER_ROLE_TYPE ) - $wp_blog_roles = $user->get_blog_roles( 'wp' ); // arg: return array with additional key dimension for role duration - else { - if ( $blog_roles[''][''] ) - $wp_blog_roles = $blog_roles['']['']; - } - - if ( ! empty($wp_blog_roles) ) { - $display_names = array(); - - foreach (array_keys($wp_blog_roles) as $role_handle) - $display_names []= $scoper->role_defs->get_display_name($role_handle); - - $html .= sprintf( __("Assigned WordPress Role: %s", 'scoper'), implode(", ", $display_names) ); - - if ( $contained_roles = $this->scoper->role_defs->get_contained_roles( array_keys($wp_blog_roles), false, SCOPER_ROLE_TYPE ) ) { - $display_names = array(); - foreach (array_keys($contained_roles) as $role_handle) - $display_names []= $this->scoper->role_defs->get_display_name($role_handle); - - $html .= '
    '; - $html .= sprintf( __("(contains %s)", 'scoper'), implode(", ", $display_names) ); - $html .= ''; - } - } - - $html .= '

    '; - } - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - $display_names = array(); - - foreach ( array_keys($blog_roles) as $duration_key ) { - if ( is_serialized($duration_key) ) { - $role_date_limits = unserialize( $duration_key ); - $role_date_limits->date_limited = true; - } else - $role_date_limits = array(); - - foreach ( array_keys($blog_roles[$duration_key]) as $date_key ) { - $display_names = array(); - - if ( is_serialized($date_key) ) { - $content_date_limits = unserialize( $date_key ); - $content_date_limits->content_date_limited = true; - } else - $content_date_limits = array(); - - $date_caption = ''; - - if ( $role_date_limits || $content_date_limits ) { - $limit_class = ''; // unused byref arg - $limit_style = ''; // unused byref arg - $link_class = ''; // unused byref arg - ScoperAdminUI::set_agent_formatting( array_merge( (array) $role_date_limits, (array) $content_date_limits ), $date_caption, $limit_class, $link_class, $limit_style, false ); // arg: no title='' wrapper around date_caption - $date_caption = ' ' . trim($date_caption) . ''; - } - - if ( $rs_blog_roles = $this->scoper->role_defs->filter_roles_by_type($blog_roles[$duration_key][$date_key], 'rs') ) { - foreach (array_keys($rs_blog_roles) as $role_handle) - $display_names []= $this->scoper->role_defs->get_display_name($role_handle); - - $url = "admin.php?page=rs-general_roles"; - $linkopen = ""; - $linkclose = ""; - $list = implode(", ", $display_names); - - if ( $groups_only ) - $html .= sprintf( _n('%1$sGeneral Role%2$s%4$s: %3$s', '%1$sGeneral Roles%2$s%4$s: %3$s', count($display_names), 'scoper'), $linkopen, $linkclose, $list, $date_caption); - else - $html .= sprintf( _n('Additional %1$sGeneral Role%2$s%4$s: %3$s', 'Additional %1$sGeneral Roles%2$s%4$s: %3$s', count($display_names), 'scoper'), $linkopen, $linkclose, $list, $date_caption); - - if ( $contained_roles = $this->scoper->role_defs->get_contained_roles( array_keys($rs_blog_roles), false, 'rs' ) ) { - $display_names = array(); - foreach (array_keys($contained_roles) as $role_handle) - $display_names []= $this->scoper->role_defs->get_display_name($role_handle); - - $html .= '
    '; - $html .= sprintf( __("(contains %s)", 'scoper'), implode(", ", $display_names) ); - $html .= ''; - } - - $html .= '

    '; - } - } // end foreach content date range - } // end foreach role duration date range - } - - - $disable_role_admin = false; - - global $profileuser, $current_user; - - $viewing_own_profile = ( ! empty($profileuser) && ( $profileuser->ID == $current_user->ID ) ); - - if ( ! $viewing_own_profile ) { - if ( $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only') ) { - if ( ( 'admin' == $require_blogwide_editor ) && ! is_user_administrator_rs() ) - return false; - - if ( ( 'admin_content' == $require_blogwide_editor ) && ! is_content_administrator_rs() ) - return false; - - global $current_user; - $disable_role_admin = empty( $current_user->allcaps['edit_others_posts'] ) && empty( $current_user->allcaps['edit_others_pages'] ); - } - } - - foreach ( $this->scoper->taxonomies->get_all() as $taxonomy => $tx ) { - if ( empty($term_roles[$taxonomy]) ) - continue; - - $val = ORDERBY_HIERARCHY_RS; - $args = array( 'order_by' => $val ); - if ( ! $terms = $this->scoper->get_terms($taxonomy, UNFILTERED_RS, COLS_ALL_RS, 0, $args) ) - continue; - - if ( ! scoper_get_otype_option('use_term_roles', $tx->object_source->name) ) - continue; - - $admin_terms = ( $disable_role_admin ) ? array() : $this->scoper->get_terms($taxonomy, ADMIN_TERMS_FILTER_RS, COL_ID_RS); - - $strict_terms = $this->scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy); - - $object_types = array(); - foreach ( array_keys($tx->object_source->object_types) as $object_type) - if ( scoper_get_otype_option('use_term_roles', $tx->object_source->name, $object_type) ) - $object_types []= $object_type; - - $object_types []= $taxonomy; - - $role_defs = $this->scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $tx->object_source->name, $object_types); - - $term_names = array(); - foreach ( $terms as $term ) - $term_names[$term->term_id] = $term->name; - - foreach ( array_keys($term_roles[$taxonomy]) as $duration_key ) { - if ( is_serialized($duration_key) ) { - $role_date_limits = unserialize( $duration_key ); - $role_date_limits->date_limited = true; - } else - $role_date_limits = array(); - - foreach ( array_keys($term_roles[$taxonomy][$duration_key]) as $date_key ) { - if ( is_serialized($date_key) ) { - $content_date_limits = unserialize( $date_key ); - $content_date_limits->content_date_limited = true; - } else - $content_date_limits = array(); - - $title = ''; - $date_caption = ''; - $limit_class = ''; - $limit_style = ''; - $link_class = ''; - $style = ''; - - if ( $role_date_limits || $content_date_limits ) { - ScoperAdminUI::set_agent_formatting( array_merge( (array) $role_date_limits, (array) $content_date_limits ), $date_caption, $limit_class, $link_class, $limit_style ); - $title = "title='$date_caption'"; - $date_caption = ' ' . trim($date_caption) . ''; - } - - if ( $admin_terms ) { - $url = "admin.php?page=rs-$taxonomy-roles"; - //$html .= ("\n

    " . sprintf(_ x('%1$s Roles%2$s:', 'Category Roles, content date range', 'scoper'), $tx->display_name, '' . $date_caption) . '

    ' ); - $html .= ("\n

    " . sprintf(__('%1$s Roles%2$s:', 'scoper'), $tx->display_name, '' . $date_caption) . '

    ' ); - } else - $html .= ("\n

    " . sprintf(__('%1$s Roles%2$s:', 'scoper'), $tx->display_name, $date_caption) . '

    ' ); - //$html .= ("\n

    " . sprintf(_ x('%1$s Roles%2$s:', 'Category Roles, content date range', 'scoper'), $tx->display_name, $date_caption) . '

    ' ); - - $html .= '
      '; - $html .= '
    • '; - $html .= ''; - $html .= ''; - $html .= ''; - $html .= ''; - - - foreach ( array_keys($role_defs) as $role_handle ) { - if ( isset( $term_roles[$taxonomy][$duration_key][$date_key][$role_handle] ) ) { - - $role_terms = $term_roles[$taxonomy][$duration_key][$date_key][$role_handle]; - $role_display = $this->scoper->role_defs->get_display_name($role_handle); - - $term_role_list = array(); - foreach ( $role_terms as $term_id ) { - if ( ! in_array( $term_id, $admin_terms ) ) - $term_role_list []= $term_names[$term_id]; - elseif ( isset($strict_terms['restrictions'][$role_handle][$term_id]) - || ( isset($strict_terms['unrestrictions'][$role_handle]) && is_array($strict_terms['unrestrictions'][$role_handle]) && ! isset($strict_terms['unrestrictions'][$role_handle][$term_id]) ) ) - $term_role_list []= "" . $term_names[$term_id] . ''; - else - $term_role_list []= "" . $term_names[$term_id] . ''; - } - - $html .= "\r\n" - . "" - . "" - . '' - . ""; - $style = ( ' class="alternate"' == $style ) ? ' class="rs-backwhite"' : ' class="alternate"'; - } - } - - $html .= '
      ' . __awp('Role') . '' . $tx->display_name_plural . '
      " . str_replace(' ', ' ', $role_display) . "' . implode(', ', $term_role_list) . '
      '; - $html .= '

    '; - - } // end foreach content date range - - } // end foreach role duration date range - - } // end foreach taxonomy - - require_once('object_roles_list.php'); - $html .= scoper_object_roles_list($user, array( 'enforce_duration_limits' => false, 'is_user_profile' => $viewing_own_profile, 'echo' => false ) ); - - if ( $groups_only ) { - //if ( empty($rs_blog_roles) && empty($term_role_list) && empty($got_obj_roles) ) - if ( $html ) { - echo '
    '; - echo "

    $group_caption

    "; - echo $html; - echo '
    '; - - if ( AWP_IS_MU ) - echo '


    '; - } - //echo '

    ' . __('No roles are assigned to this group.', 'scoper'), '

    '; - } else { - echo '
    '; - echo $html; - echo '
    '; - } - - } // end function ui_user_roles - - - - function display_ui_group_roles($group_id) { - - $users = ScoperAdminLib::get_group_members($group_id, COL_ID_RS); - - $args = array('disable_user_roles' => true, 'filter_usergroups' => array($group_id => true), 'disable_wp_roles' => true ); - - $user_id = ( $users ) ? $users[0] : 0; - $user = new WP_Scoped_User($user_id, '', $args); - - if ( ! $users ) - $user->groups = array( $group_id => true ); - - if ( $group = ScoperAdminLib::get_group($group_id) ) { - if ( ! strpos( $group->meta_id, '_nr_' ) ) { - echo '
    '; - - if ( IS_MU_RS && scoper_get_option( 'mu_sitewide_groups' ) ) { - global $wpdb, $blog_id; - $blog_ids = scoper_get_col( "SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id" ); - $orig_blog_id = $blog_id; - } else - $blog_ids = array( '1' ); - - include_once('profile_ui_rs.php'); - - foreach ( $blog_ids as $id ) { - if ( count($blog_ids) > 1 ) - switch_to_blog( $id ); - - ScoperProfileUI::display_ui_user_roles($user, true); //arg: groups only - } - - echo '
    '; - - if ( count($blog_ids) > 1 ) - switch_to_blog( $orig_blog_id ); - } - } - } - - - function display_ui_user_groups() { - if ( ! $all_groups = ScoperAdminLib::get_all_groups(UNFILTERED_RS) ) - return; - - global $current_user, $profileuser; - $user_id = $profileuser->id; - - $editable_ids = ScoperAdminLib::get_all_groups(FILTERED_RS, COL_ID_RS); - - if ( $user_id == $current_user->ID ) - $stored_groups = array_keys($current_user->groups); - else { - $user = new WP_Scoped_User($user_id, '', array( 'skip_role_merge' => 1 ) ); - $stored_groups = array_keys($user->groups); - } - - // can't manually edit membership of WP Roles groups, other metagroups - $all_ids = array(); - foreach ( $all_groups as $key => $group ) { - $all_ids[]= $group->ID; - - if ( ! empty($group->meta_id) && ! is_null($group->meta_id) && in_array( $group->ID, $editable_ids ) && ! strpos($group->meta_id, '_editable') ) { - $editable_ids = array_diff( $editable_ids, array($group->ID) ); - $stored_groups = array_diff( $stored_groups, array($group->ID) ); - unset( $all_groups[$key] ); - } - } - - // avoid incorrect eligible count if orphaned group roles are included in editable_ids - $editable_ids = array_intersect( $editable_ids, $all_ids ); - - if ( ! $editable_ids && ! $stored_groups ) - return; - - echo "
    "; - echo "

    " . __('User Groups', 'scoper') . "

    "; - - $css_id = 'group'; - - $locked_ids = array_diff($stored_groups, $editable_ids ); - $args = array( 'suppress_extra_prefix' => true, 'eligible_ids' => $editable_ids, 'locked_ids' => $locked_ids ); - - require_once('agents_checklist_rs.php'); - ScoperAgentsChecklist::agents_checklist( ROLE_BASIS_GROUPS, $all_groups, $css_id, array_flip($stored_groups), $args); - - echo ''; - echo '
    '; - - echo ""; - } - -} // end class ScoperProfileUI \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role-scoper.css b/blog/wp-content/plugins/role-scoper/admin/role-scoper.css deleted file mode 100644 index e2ff107..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role-scoper.css +++ /dev/null @@ -1,741 +0,0 @@ -/* Role Scoper. Copyright (C) 2009, Kevin Behrens. - * This file is licensed under the GNU GPL. - */ -/* marker class used to trigger element hiding by javascript */ -.agp_js_hide { -padding: default; -} - -.agp_js_show { -padding: default; -} - -.agp-width97 { -margin-left: 1%; -margin-right: 1%; -padding-right: 1.5%; -padding-left: 1.5%; -width: 95%; -} - -.rs-newgroup { -border:1px solid #aaa; -background-color: #FFFEEB; -margin-top: 0.5em; -padding: 0 0.5em 0.5em 0.5em; -} - -.agp-vspaced_input { -margin-top: 0.2em; -margin-bottom: 0.6em; -} - -.rs-bold { -font-weight: bold; -} - -.rs-nobold { -font-weight: normal; -} - -.rs-has_start { -border-left: 1px dotted black; -} - -.rs-has_end { -border-right: 1px dotted black; -} - -.rs-has_cmin { -border-bottom: 1px dotted black; -} - -.rs-has_cmax { -border-top: 1px dotted black; -} - -.rs-date-limit-inputs { -background-color:#dfd; -padding-top: 1em; -border: 1px solid #ccc; -} - -.rs-list_horiz { -width: 100%; -clear: both; -float: left; -margin: 0; -padding: 0; -} - -.rs-list_horiz li { -list-style: none; -float: left; -margin: 0; -} - -.rs-role_date_entry { -margin-bottom: 2em; -} - -.rs-role_date_entry li { -width: 28em; -} - -#rs-admin-info { -width: 90%; -margin: 2em 2em 2em 0; -} - -#rs-admin-info tr { -margin: 1px; -} - -#rs-admin-info td { -background-color: white; -font-size: 1.0em; -} - -#rs-admin-info th { -font-weight: normal; -font-size: 1.1em; -color: white; -background-color: black; -} - -.rs-widefat { -width: 100%; -} - -.rs-widefat td, .rs-widefat th { -padding: 0.3em 0.3em; -background-color: white; -} - -.rs-widefat tr { -background-color: white; -} - -.rs-widefat th { -text-align: left; -background-color: black; -color: white; -} - -.rs-form-table input { -vertical-align: text-bottom; -} - -.rs-brown, .rs-brown a, .rs-brown a:link, .rs-brown a:visited { -color: #840; -} - -.rs-gray, .rs-gray a, .rs-gray a:link, .rs-gray a:visited { -color: #888; -} - -.rs-lgray, .rs-lgray a { -color: #bbb; -} - -.rs-blue, .rs-blue a, .rs-blue a:link, .rs-blue a:visited { -color: blue; -} - -.rs-green, .rs-green a, .rs-green a:link, .rs-green a:visited { -color: #0a0; -} - -.rs-role-tbl th a { -color: #bbb; -text-decoration: none; -} - -.rs-role-tbl th a:hover { -color: yellow; -} - -a.rs-link_plain { -text-decoration: none; -border-bottom: none; -padding: 0.1em 0.1em; -white-space:nowrap; -} - -a.rs-link_plain:hover { -text-decoration: underline; -border-bottom: none; -padding: 0.1em 0.1em; -color: #00aa00; -} - -a.rs-link_plain_rev { -text-decoration: none; -border-bottom: none; -padding: 0.1em 0.1em; -color: white; -white-space:nowrap; -} - -a.rs-link_plain_rev:hover { -text-decoration: underline; -border-bottom: none; -padding: 0.1em 0.1em; -color: yellow; -} - -.rs-custom_link { -text-decoration: none; -} - -.rs-termjump a { -color: white; -margin: 0.2em; -} - -a.rs-dlink_rev { -text-decoration: none; -border-bottom: 1px solid white; -color: white; -margin: 0.2em; -white-space:nowrap; -} - -a.rs-dlink_rev:hover { -text-decoration: none; -border-bottom: 1px solid white; -color: #00ee00; -margin: 0.2em; -} - -.rs-dbx_headline_populated { -font-weight: bold; -} - -/* defines background highlighting for post UI if scoped roles assigned */ -.rs-scoped_post { -background-color: #FFFEEB; -border-top: 2px solid #2583AD; -} - -.rs-check { -vertical-align: text-bottom; -margin-right: 0.2em; -} - -.rs-backtan { -background-color: #FFFEEB; -} - -.rs-backgray { -background-color: #E8E8E8; -} - -.rs-backgreen { -background-color: #E8FFE8; -} - -.rs-options { -padding: 0 0.5em 1em 0.5em; -border: 1px solid #ccc; -margin-top:0; -} - -.rs-agents-spacer-ie { -margin: 0.5em 0 0.5em 0; -padding: 0; -} - -.rs-agents-ul { -margin: 0.1em 0 0 0; -padding-top: 0.2em; -} - -.rs-agents-ul li { -margin: 0; -padding: 0; -} - -.rs-agents { -background-color: #FFFEEB; -padding: 0 0 0.2em 0.3em; -border: 1px solid #ccc; -margin-top:0; -} - -.rs-agents input { -vertical-align: text-bottom; -} - -.agp-agent { -padding: 0.2em 0.5em 0.2em 0.5em; -} - -.agp-unselected_agent { -border: none; -} - -.agp-selected_agent { -border-left: 1px solid #ccc; -border-right: 1px solid #ccc; -border-top: 1px solid #ccc; -} - -.agp-selected_agent a{ -color: black; -text-decoration: none; -font-weight: bold; -} - -.agp-unselected_agent a{ -color: #00019b; -text-decoration: default; -font-weight: normal; -} - -.agp-selected_agent_colorized { -background-color: #FFFEEB; -border-bottom: 1px solid #FFFEEB; -} - -.agp-unselected_agent_colorized { -background: none; -} - -.rs-agents_caption { -margin: 0 0 0 0.75em; -clear:both; -} - -.rs-agents_checkbox { -margin-left: 0; -} - -.rs-agents_filter { -margin: 0 0 0.5em 0; -} - -.rs-via-b { -color: blue; -} - -.rs-via-r { -color: #a0a; -} - -.rs-via-s { -color: green; -} - -.rs-agents_list_auto { -margin: 0.5em 0 1em 0; -padding: 0; -clear: both; -float: left; -width: 100%; -} -.rs-agents_list_auto li { -list-style: none; - float: left; -margin: 0.3em 1.5em 0.3em 0; -} - -.rs-agents_list_auto input { -margin: 0; -font-size: auto; -padding: 0; -} - -.rs-agents_emsized { -clear: both; -width: 100%; -} - -.rs-agents_emsized ul { -margin: 0 0 1em 0; -padding: 0; -clear: both; -float: left; -width: 100%; -} - -.rs-agents_emsized ul li { -margin: 0.3em 0 0.3em 0; -list-style: none; - float: left; -} - -.rs-agents_emsized ul input { -margin: 0; -font-size: auto; -padding: 0; -} - -.rs-agents_list_7 li { width: 7em; } -.rs-agents_list_8 li { width: 8em; } -.rs-agents_list_9 li { width: 9em; } -.rs-agents_list_10 li { width: 10em; } -.rs-agents_list_11 li { width: 11em; } -.rs-agents_list_12 li { width: 12em; } -.rs-agents_list_13 li { width: 13em; } -.rs-agents_list_14 li { width: 14em; } -.rs-agents_list_15 li { width: 15em; } -.rs-agents_list_16 li { width: 16em; } -.rs-agents_list_17 li { width: 17em; } -.rs-agents_list_18 li { width: 18em; } -.rs-agents_list_19 li { width: 19em; } -.rs-agents_list_20 li { width: 20em; } -.rs-agents_list_21 li { width: 21em; } -.rs-agents_list_22 li { width: 22em; } -.rs-agents_list_23 li { width: 23em; } -.rs-agents_list_24 li { width: 24em; } -.rs-agents_list_25 li { width: 25em; } -.rs-agents_list_26 li { width: 26em; } -.rs-agents_list_27 li { width: 27em; } -.rs-agents_list_28 li { width: 28em; } -.rs-agents_list_29 li { width: 29em; } -.rs-agents_list_30 li { width: 30em; } - -.rs-agents_list_7_5 li { width: 7.5em; } -.rs-agents_list_8_5 li { width: 8.5em; } -.rs-agents_list_9_5 li { width: 9.5em; } -.rs-agents_list_10_5 li { width: 10.5em; } -.rs-agents_list_11_5 li { width: 11.5em; } -.rs-agents_list_12_5 li { width: 12.5em; } -.rs-agents_list_13_5 li { width: 13.5em; } -.rs-agents_list_14_5 li { width: 14.5em; } -.rs-agents_list_15_5 li { width: 15.5em; } -.rs-agents_list_16_5 li { width: 16.5em; } -.rs-agents_list_17_5 li { width: 17.5em; } -.rs-agents_list_18_5 li { width: 18.5em; } -.rs-agents_list_19_5 li { width: 19.5em; } -.rs-agents_list_20_5 li { width: 20.5em; } -.rs-agents_list_21_5 li { width: 21.5em; } -.rs-agents_list_22_5 li { width: 22.5em; } -.rs-agents_list_23_5 li { width: 23.5em; } -.rs-agents_list_24_5 li { width: 24.5em; } -.rs-agents_list_25_5 li { width: 25.5em; } -.rs-agents_list_26_5 li { width: 26.5em; } -.rs-agents_list_27_5 li { width: 27.5em; } -.rs-agents_list_28_5 li { width: 28.5em; } -.rs-agents_list_29_5 li { width: 29.5em; } -.rs-agents_list_30_5 li { width: 30.5em; } - - -#userprofile_groupsdiv_rs fieldset { -width: 90%; -} - -#userprofile_groupsdiv_rs fieldset input{ -width: auto; -} - - -.rs-subtext { -color: #393; -} - -.rs-warning { -color: #b00; -} - -.rs-agents_key li { -margin-bottom: 0.5em; -} - -.rs-keytext { -margin-left: 0.2em; -margin-right: 0.75em; -} - -.rs-optiontable { -width: 100%; -} - -#rs-admin_table tr, #rs-realm_table tr, #realm_adjustments tr, #rs-advanced_table tr { -border-bottom: 4px solid #FFFEEB; -} - -#rs-admin_table tr td, #rs-realm_table tr td, #realm_adjustments tr td, #rs-advanced_table tr td { -padding: 1em 0 1em 0; -} - -#rs-admin_table th, #rs-realm_table th, #realm_adjustments th, #rs-advanced_table th { -font-weight: bold; -} - -.rs-optiontable td, .rs-optiontable th { -padding: .5em; -} - -.rs-optiontable th { -text-align: right; -font-size: 1.3em; -font-weight: normal; -} - -.rs-form-table tr th span a { -color: #333; -background-color: #CFEBF7; -} - -.rs-form-table tr th, .rs-form-table tr td { -background-color: #CFEBF7; -border-bottom: 4px solid #FFFEEB; -} - -.rs-role-tbl tr th { -font-size: 1.1em; -} - -.rs-role-tbl tr th a { -background-color: black; -} - - -/* used for object_type / section disable in realm.php */ -.rs-adminlist { -margin: 0.2em 0 0 0; -padding: 0.2em; -float:left; -} - -.rs-adminlist li { -list-style: none; -padding-left: 0.4em; -margin-bottom: 0.8em; -border: 1px solid #ccc; -background-color: #eee; -} - -.rs-adminlist ul { -margin-top: 0.15em; -padding-left: 0.4em; -padding-right: 0.6em; -} - -.rs-adminlist ul li { -list-style: none; -padding-left: 0.4em; -border: none; -background-color: white; -} - - -.rs-textentries { -margin-top: 0.15em; -padding-left: 1.2em; -} - -.rs-textentries li { -list-style: none; -padding-left: 0.4em; -border: 1px solid #ccc; -background-color: #f8f8f8; -} - -.rs-textentries input { -margin-top: 0.15em; -background-color: white; -width: 100%; -} - -.rs-textentries ul { -margin-top: 0; -padding-left: 1.2em; -} - -.rs-textentries ul li { -list-style: none; -border: none; -background-color: #f8f8f8; -} - -.rs-vtight input { -margin-top: 0.15em; -} - -.rs-cap_list { -padding-left: 0.4em; -} - -.rs-cap_list li { -list-style: none; -float: left; -width: 20em; -height: 2.5em; -margin-left: 0.2em; -} - -.rs-backwhite { -background-color: white; -} - -.rs-backylw, .rs-backylw td { -background-color: #FFFBCF; -} - -.rs-white, .rs-white a, .rs-white a:link { -color: white; -} - -.rs-termlist { -margin: 0; -padding: 0 0 0.4em 0.4em; -clear: both; -} - -.rs-termlist li { -list-style: none; -padding: 0 0 0.5em 0.3em; -margin: 0; -clear: both; -background-color: #14568A; -color: white; -border-left: 1px dotted white; -} - -.rs-termlist_linkspacer { -color: #14568A; -padding: 0.2em; -} - -.rs-termlist li table { -color: black; -padding: 0.3em; -border-bottom: none; /*1px dotted white;*/ -} - -.rs-termlist li table td, .rs-termlist li table th { -padding-left: 0.5em; -padding-right: 0.5em; -} - -.rs-objlist { -margin: 0; -padding: 0 0 0.4em 0.4em; -clear: both; -} - -.rs-objlist li { -list-style: none; -padding: 0 0 0.5em 0.3em; -margin: 0; -clear: both; -background-color: #CFEBF7; -border-left: 1px dotted #aaa; -} - -.rs-objlist_linkspacer { -color: #CFEBF7; -padding: 0.2em; -} - -.rs-objlist li table { -padding: 0.3em; -border-bottom: none; /*1px dotted white;*/ -} - -.rs-objlist li table td, .rs-objlist li table th { -padding-left: 0.5em; -padding-right: 0.5em; -} - -.rs-objlist li table td a { -color: normal; -} - -.rs-objlist a { -color: #00A; -} - -.rs-objlistkey a { -color: #00A; -} - -.rs-tightcol { -width: 2%; -} - -.rs-hint { -margin-top: 0.2em; -/*color: #393*/ -} - -.rs-optionhint { -margin-top: 0.5em; -} - -.rs-small { -font-size: 0.9em; -} - -.no-rol-hide { -display: none; -} - -.no-rol-li-hide { -display: none; -} - -.rs-member_table { -background-color: white; -} - -.rs-member_table tr td{ -padding: 0.5em 0 0.5em 0; -} - -.rs-notes { -margin-top: 0.2em; -list-style-type: circle; -} - -.rs-notes li { -margin-bottom: 1em; -margin-left: 1.5em; -} -.rs-instructions ol { -list-style-type: decimal; -} -.rs-instructions ol li{ -margin: 1em 0 1em 2em; -} - -label.rs-objrole-label { -color: black; -} - -.rs-ver_msg { -font-size: 0.7em; -} - -.rs-group_members { -background-color: #eee; -margin: 2em 0 2em 0; -padding: 0 0.5em 0.5em 0.5em; -border: 1px solid black; -} - -.rs-group_admins { -background-color: #fee; -margin: 2em 0 2em 0; -padding: 0 0.5em 0.5em 0.5em; -border: 1px solid black; -} - -.rs-scoped_role_profile { -background-color: #fff; -margin: 2em 0 2em 0; -padding: 0 0.5em 0 0.5em; -border: 1px solid black; -} - -.rs-h3text { -font-size: 1.5em; -font-weight: bold; -} - -#parent_id { -width: 100%; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role-scoper.js b/blog/wp-content/plugins/role-scoper/admin/role-scoper.js deleted file mode 100644 index 4268f2b..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role-scoper.js +++ /dev/null @@ -1,37 +0,0 @@ -addLoadEvent(function() { - //on page load, highlight the UI if scoped roles affect to the item being edited - //scoper_in_the_house('rs-scoping_alert'); - maybe_hide_quickedit('rs_hide_quickedit'); -}); - -function maybe_hide_quickedit(flag_id) { - var got_flag = document.getElementById(flag_id); - if ( got_flag ) - agp_setcss('.editinline', 'display', 'none'); -} - -/* note: supports some operations no longer used by role scoper admin. TODO: reduce to required functionality */ -function scoper_checkroles(togglebox, allterms_ser, rolenums_ser) { - allterms_ser += '-Z'; - var term_ids = allterms_ser.split('-'); - var role_nums = rolenums_ser.split('-'); - var val = document.getElementById(togglebox).checked; - var term_count = term_ids.length; - var role_count = role_nums.length; - - var i, j, baseid, term_id, cbox; - - for ( j = 0; j < term_count; j++ ) { - term_id = term_ids[j]; - for ( i = 0; i < role_count; i++ ) { - cbox = document.getElementById('rs-' + role_nums[i] + '-' + term_id); - if (cbox) { - cbox.checked = val; - } - } - } -} - -function rs_display_version_more() { - agp_set_display('rs_version_more', 'block'); -} \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role_assigner_rs.php b/blog/wp-content/plugins/role-scoper/admin/role_assigner_rs.php deleted file mode 100644 index 0169225..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role_assigner_rs.php +++ /dev/null @@ -1,893 +0,0 @@ -scoper =& $scoper; - } - - function user_has_role_in_term($role_handles, $taxonomy, $term_id, $user = '', $args = '') { - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - if ( ! is_array($role_handles) ) - $role_handles = array($role_handle => true); - - $role_handles = $this->scoper->role_defs->add_containing_roles( $role_handles, SCOPER_ROLE_TYPE ); - - if ( isset($args['src_name']) && isset($args['object_type']) ) { - $match_roles = $this->scoper->role_defs->get_matching(SCOPER_ROLE_TYPE, $args['src_name'], $args['object_type']); - - $role_handles = array_intersect_key($role_handles, $match_roles ); - } - - $strict_terms = $this->scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy ); - - $date_key = ''; // temp - - foreach ( array_keys($role_handles) as $role_handle ) { - // can't blend in blog role if term requires term role assignment - if ( isset($strict_terms['unrestrictions'][$role_handle][$term_id]) - || ( isset($strict_terms['restrictions'][$role_handle]) && is_array($strict_terms['restrictions'][$role_handle]) && ! isset($strict_terms['restrictions'][$role_handle][$term_id]) ) ) { - - if ( isset($user->blog_roles[$date_key][$role_handle]) ) - return true; - } - } - - // does current user have any term-specific admin caps for term admin? - if ( ! isset($user->term_roles[$taxonomy]) ) - $user->get_term_roles_daterange($taxonomy); // call daterange function populate term_roles property - possible perf enhancement for subsequent code even though we don't conider content_date-limited roles here - - if ( ! empty($user->term_roles[$taxonomy][ANY_CONTENT_DATE_RS]) ) { - $qualifying_term_roles = array_intersect_key($user->term_roles[$taxonomy][ANY_CONTENT_DATE_RS], $role_handles); - - foreach ( array_keys($qualifying_term_roles) as $role_handle ) { - if ( in_array($term_id, $qualifying_term_roles[$role_handle]) ) { - return true; - } - } - } - } - - function _validate_assigner_roles($scope, $src_or_tx_name, $item_id, $roles) { - $user_has_role = array(); - if ( TERM_SCOPE_RS == $scope ) { - foreach ( array_keys($roles) as $role_handle ) { - $role_attrib = $this->scoper->role_defs->get_role_attributes($role_handle); - $args = array( 'src_name' => $role_attrib->src_names, 'object_type' => $role_attrib->object_types ); - $user_has_role[$role_handle] = $this->user_has_role_in_term( array($role_handle => 1), $src_or_tx_name, $item_id, $args); - } - } else { - if ( $require_blogwide_editor = scoper_get_option('role_admin_blogwide_editor_only') ) { - global $current_user; - - $is_user_administrator = is_user_administrator_rs(); - $is_content_administrator = is_content_administrator_rs(); - } - - foreach ( array_keys($roles) as $role_handle ) { - // a user must have a blog-wide edit cap to modify editing role assignments (even if they have Editor role assigned for some current object) - if ( $require_blogwide_editor ) { - - if ( ! $is_user_administrator && ( 'admin' == $require_blogwide_editor ) ) { - $user_has_role[$role_handle] = false; - continue; - } - - if ( ! $is_content_administrator && ( 'admin_content' == $require_blogwide_editor ) ) { - $user_has_role[$role_handle] = false; - continue; - } - - $role_attrib = $this->scoper->role_defs->get_role_attributes($role_handle); - - $required_cap = ( ( 1 == count($role_attrib->object_types) ) && ( 'page' == $role_attrib->object_types[0] ) ) ? 'edit_others_pages' : 'edit_others_posts'; - - if ( empty( $current_user->allcaps[$required_cap] ) ) { - $user_has_role[$role_handle] = false; - continue; - } - } - - $reqd_caps = $this->scoper->role_defs->role_caps[$role_handle]; - - if ( is_array($reqd_caps) && count($reqd_caps) ) // TODO: why would this ever be non-array? (as reported by one user) - $user_has_role[$role_handle] = awp_user_can(array_keys($reqd_caps), $item_id); - } - } - - return $user_has_role; - } - - function _compare_role_settings($assign_for, $role_assignment, $propagated_assignments, &$delete_assignments, &$update_assign_for, &$update_role_duration, &$update_content_date_limits, $set_role_duration = '', $set_content_date_limits = '', $skip_assignfor_comparison = false ) { - $retval = array( 'role_change' => false, 'unset' => false ); - $assignment_id = 0; - - if ( REMOVE_ASSIGNMENT_RS == $assign_for ) { - // since the role is being removed for this user/group, don't insert it - $retval['unset'] = true; - - if ( ! empty($role_assignment['assignment_id']) ) { - $assignment_id = $role_assignment['assignment_id']; - $delete_assignments [$assignment_id] = true; - - // also remove any propagated roles - if ( ! empty($propagated_assignments[$assignment_id]) ) - $delete_assignments = $delete_assignments + $propagated_assignments[$assignment_id]; - - $retval['role_change'] = true; - } - } else { - if ( ! empty($role_assignment) ) { - // no need for any insertion for this entity if a record already exists - // (will still consider update and possibly insert roles for children) - $retval['unset'] = true; - - $assignment_id = $role_assignment['assignment_id']; - - if ( ! $skip_assignfor_comparison ) { - // If the currently stored assignment has a different 'assign_for' setting, update the record. - // If the currently stored assignment was inherited, convert it to a direct assignment. - if ( ($role_assignment['assign_for'] != $assign_for) || ($role_assignment['inherited_from'] != '0') ) { - $update_assign_for[$assign_for] []= $role_assignment['assignment_id']; - $retval['role_change'] = true; - - // if propagated roles exist, but the role is now set for entity only, delete the propagated assignments - if ( (ASSIGN_FOR_ENTITY_RS == $assign_for) && ! empty($propagated_assignments[$assignment_id]) ) - $delete_assignments = $delete_assignments + $propagated_assignments[$assignment_id]; - } //endif assign_for changed - } - - if ( $set_role_duration ) { - if ( ($role_assignment['date_limited'] != $set_role_duration->date_limited) || ($role_assignment['start_date_gmt'] != $set_role_duration->start_date_gmt) || ($role_assignment['end_date_gmt'] != $set_role_duration->end_date_gmt) ) { - $update_role_duration []= $role_assignment['assignment_id']; - $retval['role_change'] = true; - } //endif role duration changed - } - - if ( $set_content_date_limits ) { - if ( ($role_assignment['content_date_limited'] != $set_content_date_limits->content_date_limited) || ($role_assignment['content_min_date_gmt'] != $set_content_date_limits->content_min_date_gmt) || ($role_assignment['content_max_date_gmt'] != $set_content_date_limits->content_max_date_gmt) ) { - $update_content_date_limits []= $role_assignment['assignment_id']; - $retval['role_change'] = true; - } //endif role duration changed - } - - } else //endif any assignment currently stored for this user/group - $retval['role_change'] = true; - - // if assign_for was changed from 'entity' to 'children' or 'both', need to insert roles for children - if ( ($assign_for == ASSIGN_FOR_CHILDREN_RS) || ($assign_for == ASSIGN_FOR_BOTH_RS) ) { - if ( empty($role_assignment) || ( ASSIGN_FOR_ENTITY_RS == $role_assignment['assign_for'] ) ) { - $retval['new_propagation'] = ( $assignment_id ) ? $assignment_id : true; - $retval['role_change'] = true; - } - } - } - - return $retval; - } - - function assign_roles($scope, $src_or_tx_name, $item_id, $roles, $role_basis = ROLE_BASIS_USER, $args = '' ) { - $defaults = array( 'implicit_removal' => false, 'is_auto_insertion' => false, 'force_flush' => false, 'set_role_duration' => '', 'set_content_date_limits' => '' ); - $args = array_merge($defaults, (array) $args); - extract($args); - - global $wpdb; - - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - $col_ug_id = ( ROLE_BASIS_GROUPS == $role_basis ) ? 'group_id' : 'user_id'; - - $is_administrator = is_administrator_rs( $src_or_tx_name, 'user' ); - - $role_change_agent_ids = array(); - $delete_assignments = array(); - $propagate_agents = array(); - $propagated_assignments = array(); - - // make sure end date is never accidentally set to zero - if ( $set_role_duration && ! $set_role_duration->end_date_gmt ) - $set_role_duration->end_date_gmt = SCOPER_MAX_DATE_STRING; - - if ( $set_content_date_limits && ! $set_content_date_limits->content_max_date_gmt ) - $set_content_date_limits->content_max_date_gmt = SCOPER_MAX_DATE_STRING; - - $ug_clause = ( ROLE_BASIS_USER == $role_basis ) ? "AND user_id > 0" : "AND group_id > 0"; - - $qry = "SELECT $col_ug_id, assignment_id, assign_for, inherited_from, role_name, date_limited, start_date_gmt, end_date_gmt, content_date_limited, content_min_date_gmt, content_max_date_gmt FROM $wpdb->user2role2object_rs WHERE scope = '$scope' $ug_clause" - . " AND role_type = '$SCOPER_ROLE_TYPE' AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id = '$item_id'"; - - $results = scoper_get_results($qry); - - $stored_assignments = array(); - $assignment_ids = array(); - - if ( OBJECT_SCOPE_RS == $scope ) { - $is_objscope_equiv = array(); - foreach ( $this->scoper->role_defs->get_all() as $role_handle => $role_def ) - if ( isset($role_def->objscope_equivalents) ) - foreach ( $role_def->objscope_equivalents as $equiv_role_handle ) - $is_objscope_equiv[$equiv_role_handle] = $role_handle; - } - - foreach ($results as $key => $ass) { - $role_handle = scoper_get_role_handle( $ass->role_name, SCOPER_ROLE_TYPE ); - - if ( (OBJECT_SCOPE_RS == $scope) && isset($is_objscope_equiv[$role_handle]) ) - $role_handle = $is_objscope_equiv[$role_handle]; - - $stored_assignments[$role_handle][$ass->$col_ug_id] = (array) $ass; - $assignment_ids[$role_handle][$ass->assignment_id] = array(); - } - - if ( ! $is_administrator ) - $user_has_role = $this->_validate_assigner_roles($scope, $src_or_tx_name, $item_id, $roles); - - foreach ( $roles as $role_handle => $agents ) { - if ( ! $is_administrator && ! $user_has_role[$role_handle] ) - continue; - - $propagate_agents = array(); - - $update_assign_for = array( ASSIGN_FOR_ENTITY_RS => array(), ASSIGN_FOR_CHILDREN_RS => array(), ASSIGN_FOR_BOTH_RS => array() ); - $update_role_duration = array(); - $update_content_date_limits = array(); - - if ( ! empty($assignment_ids[$role_handle]) && ( BLOG_SCOPE_RS != $scope ) ) { - $propagated_assignments = $assignment_ids[$role_handle]; - - $id_in = "'" . implode("', '", array_keys($propagated_assignments) ) . "'"; - $qry = "SELECT assignment_id, inherited_from FROM $wpdb->user2role2object_rs WHERE inherited_from IN ($id_in)"; - - if ( $results = scoper_get_results($qry) ) - foreach ($results as $key => $ass) - $propagated_assignments[$ass->inherited_from] [$ass->assignment_id] = true; - } - - if ( $implicit_removal && isset($stored_assignments[$role_handle]) ) { - // Stored assignments which are not included in $agents will be deleted (along with their prodigy) - foreach ( $stored_assignments[$role_handle] as $ug_id => $ass ) { - if ( ! isset($agents[$ug_id]) && ! empty($ass['assignment_id']) ) { - $assignment_id = $ass['assignment_id']; - $delete_assignments [ $assignment_id ] = true; - - // also remove any propagated roles - if ( ! empty($propagated_assignments[$assignment_id]) ) - $delete_assignments = $delete_assignments + $propagated_assignments[$assignment_id]; - } - } - } - - foreach ( $agents as $ug_id => $assign_for ) { - // don't assign a role which would remove existing assignment of role the current user doesn't have - // (i.e. you can't change someone else from category Editor to category Reader if you are only a category Contributor) - if ( ! $is_administrator ) { - foreach ( $stored_assignments as $stored_role_handle => $this_stored_assignment ) { - if ( isset($this_stored_assignment[$ug_id]) ) { - if ( ! $user_has_role[$role_handle] ) { - unset( $agents[$ug_id] ); - continue 2; - } - } - } - } - - $stored_assignment = ( isset($stored_assignments[$role_handle][$ug_id]) ) ? $stored_assignments[$role_handle][$ug_id] : array(); - - $comparison = $this->_compare_role_settings($assign_for, $stored_assignment, $propagated_assignments, $delete_assignments, $update_assign_for, $update_role_duration, $update_content_date_limits, $set_role_duration, $set_content_date_limits); - - // Mark assignment for propagation to child items (But don't do so on storage of default role to root item. Default roles are only applied at item creation.) - if ( $item_id && isset($comparison['new_propagation']) ) - $propagate_agents[$ug_id] = $comparison['new_propagation']; - - if ( $comparison['unset'] ) - unset( $agents[$ug_id] ); - - if ( $comparison['role_change'] ) - $role_change_agent_ids[$role_basis][$ug_id] = 1; - } // end foreach users or groups - - // do this for each role prior to insert call because insert function will consider inherited_from value - foreach ($update_assign_for as $assign_for => $this_ass_ids) { - if ( $this_ass_ids ) { - $id_in = "'" . implode("', '", $this_ass_ids) . "'"; - $qry = "UPDATE $wpdb->user2role2object_rs SET assign_for = '$assign_for', inherited_from = '0' WHERE assignment_id IN ($id_in)"; - scoper_query($qry); - } - } - - if ( $update_role_duration ) { - $id_in = "'" . implode("', '", $update_role_duration) . "'"; - $qry = "UPDATE $wpdb->user2role2object_rs SET date_limited = '" . (int) $set_role_duration->date_limited . "'"; - - if ( -1 != $set_role_duration->start_date_gmt ) - $qry .= ", start_date_gmt = '$set_role_duration->start_date_gmt'"; - - if ( -1 != $set_role_duration->end_date_gmt ) - $qry .= ", end_date_gmt = '$set_role_duration->end_date_gmt'"; - - $qry .= " WHERE assignment_id IN ($id_in)"; - scoper_query($qry); - } - - if ( $update_content_date_limits ) { - $id_in = "'" . implode("', '", $update_content_date_limits) . "'"; - $qry = "UPDATE $wpdb->user2role2object_rs SET content_date_limited = '" . (int) $set_content_date_limits->content_date_limited . "'"; - - if ( -1 != $set_content_date_limits->content_min_date_gmt ) - $qry .= ", content_min_date_gmt = '$set_content_date_limits->content_min_date_gmt'"; - - if ( -1 != $set_content_date_limits->content_max_date_gmt ) - $qry .= ", content_max_date_gmt = '$set_content_date_limits->content_max_date_gmt'"; - - $qry .= " WHERE assignment_id IN ($id_in)"; - - scoper_query($qry); - } - - if ( $agents || $propagate_agents ) - $this->insert_role_assignments($scope, $role_handle, $src_or_tx_name, $item_id, $col_ug_id, $agents, $propagate_agents, $args ); - } // end foreach roles - - // delete assignments; flush user/group roles cache - $this->role_assignment_aftermath($scope, $role_basis, $role_change_agent_ids, $delete_assignments, '', $force_flush || $update_assign_for); - - // possible todo: reinstate this after further testing - //$this->delete_orphan_roles($scope, $src_or_tx_name); - } - - function role_assignment_aftermath($scope, $role_basis, $role_change_agent_ids, $delete_assignments, $object_type = '', $force_flush = false) { - global $wpdb; - - if ( count($delete_assignments) ) { - // Propagated roles will be deleted only if the original progenetor goes away. Removal of a "link" in the parent/child propagation chain has no effect. - $id_in = "'" . implode("', '", array_keys($delete_assignments) ) . "'"; - $qry = "DELETE FROM $wpdb->user2role2object_rs WHERE assignment_id IN ($id_in) OR (inherited_from IN ($id_in) AND inherited_from != '0')"; - - scoper_query($qry); - } - - if ( count($role_change_agent_ids) || $force_flush ) { - $role_change_user_ids = array(); - - if ( ROLE_BASIS_GROUPS == $role_basis ) { - scoper_flush_roles_cache( $scope, ROLE_BASIS_GROUPS ); - scoper_flush_results_cache( ROLE_BASIS_GROUPS ); - - // also delete corresponding combined user/group roles cache for all group members - if ( isset($role_change_agent_ids['groups']) ) { - foreach ( array_keys($role_change_agent_ids['groups']) as $group_id ) { - $group_members = ScoperAdminLib::get_group_members( $group_id, COL_ID_RS ); - $role_change_user_ids = array_merge($role_change_user_ids, $group_members); - } - } - - if ( $role_change_user_ids ) { - $role_change_user_ids = array_unique($role_change_user_ids); - scoper_flush_roles_cache( $scope, ROLE_BASIS_USER_AND_GROUPS, $role_change_user_ids ); - scoper_flush_results_cache( ROLE_BASIS_USER_AND_GROUPS, $role_change_user_ids ); - } - } else { - scoper_flush_roles_cache( $scope, ROLE_BASIS_USER, array_keys($role_change_user_ids) ); - scoper_flush_results_cache( ROLE_BASIS_USER, array_keys($role_change_user_ids) ); - - scoper_flush_roles_cache( $scope, ROLE_BASIS_USER_AND_GROUPS, array_keys($role_change_user_ids) ); - scoper_flush_results_cache( ROLE_BASIS_USER_AND_GROUPS, array_keys($role_change_user_ids) ); - } - } - } - - - // $agent_ids[agent_id] = role assignment method ('entity', 'children' or 'both') - // $propagate_agents[agent_id] = assignment_id for inherited_from - function insert_role_assignments ($scope, $role_handle, $src_or_tx_name, $obj_or_term_id, $col_ug_id, $insert_agents, $propagate_agents, $args = '') { - $defaults = array( 'inherited_from' => array(), 'is_auto_insertion' => false, 'set_role_duration' => '', 'set_content_date_limits' => '', 'role_duration_per_agent' => '', 'content_date_limits_per_agent' => '' ); // auto_insertion arg set for role propagation from parent objects - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $current_user, $scoper, $wpdb; - - $assigner_id = $current_user->ID; - - if ( ! $role_spec = scoper_explode_role_handle($role_handle) ) - return; - - // keep track of which objects from non-post data sources have ever had their roles/restrictions custom-edited - if ( ! $is_auto_insertion && ( (TERM_SCOPE_RS == $scope) || ( (OBJECT_SCOPE_RS == $scope) && ('post' != $src_or_tx_name) ) ) ) { - $custom_role_items = get_option( "scoper_custom_{$src_or_tx_name}" ); - - if ( ! is_array($custom_role_items) ) - $custom_role_items = array(); - } - - // Before inserting a role, delete any overlooked old assignment. - // Also delete (for the same user/group) any roles which cannot be simultaneously assigned - if ( $role_attrib = $this->scoper->role_defs->get_role_attributes($role_handle) ) { - $this_otype_role_defs = $this->scoper->role_defs->get_matching($role_spec->role_type, $role_attrib->src_names, $role_attrib->object_types); - $delete_role_if_exists = array_keys($this_otype_role_defs); - - // need object_type for permission check when modifying propagated object roles - $object_type = $role_attrib->object_types; - } else { - $delete_role_if_exists = array($role_handle); - $object_type = ''; // probably won't be able to propagate roles if this error occurs - } - - - // prepare hierarchy and object type data for subsequent propagation - if ( ! empty($propagate_agents) ) { - if ( TERM_SCOPE_RS == $scope ) { - if ( ! $tx = $scoper->taxonomies->get($src_or_tx_name) ) - return; - - $src = $tx->source; - } elseif ( ! $src = $scoper->data_sources->get($src_or_tx_name) ) - return; - - if ( empty( $src->cols->parent ) ) - return; - - $descendant_ids = awp_query_descendant_ids( $src->table, $src->cols->id, $src->cols->parent, $obj_or_term_id); - - $remove_ids = array(); - foreach ( $descendant_ids as $id ) { - if ( TERM_SCOPE_RS == $scope ) { - if ( ! $this->scoper->admin->user_can_admin_terms($src_or_tx_name, $id) ) - $remove_ids []= $id; - } else { - if ( ! $this->scoper->admin->user_can_admin_object($src_or_tx_name, $object_type, $id) ) - $remove_ids []= $id; - } - } - if ( $remove_ids ) - $descendant_ids = array_diff( $descendant_ids, $remove_ids ); - - $retain_roles = $this->scoper->role_defs->add_containing_roles( array($role_handle => true), $role_spec->role_type ); - $retain_role_names = scoper_role_handles_to_names(array_keys($retain_roles)); - - $role_in = "'" . implode("', '", $retain_role_names) . "'"; - $role_clause = "AND role_name IN ($role_in)"; - } - - - $delete_role_in = "'" . implode("', '", scoper_role_handles_to_names( $delete_role_if_exists ) ) . "'"; - - $qry_delete_base = "DELETE FROM $wpdb->user2role2object_rs" - . " WHERE scope = '$scope' AND src_or_tx_name = '$src_or_tx_name'" - . " AND role_type = '$role_spec->role_type' AND role_name IN ($delete_role_in)"; - - $qry_select_base = "SELECT assignment_id FROM $wpdb->user2role2object_rs" - . " WHERE scope = '$scope' AND src_or_tx_name = '$src_or_tx_name'" - . " AND role_type = '$role_spec->role_type'"; - - if ( ! empty($set_role_duration) || ! empty( $role_duration_per_agent ) ) - $duration_cols = "date_limited, start_date_gmt, end_date_gmt,"; - else - $duration_cols = ''; - - if ( ! empty($set_content_date_limits) || ! empty( $content_date_limits_per_agent ) ) - $content_date_cols = "content_date_limited, content_min_date_gmt, content_max_date_gmt,"; - else - $content_date_cols = ''; - - if ( ! empty($set_role_duration) ) - $universal_duration_vals = "'" . (int) $set_role_duration->date_limited . "', '$set_role_duration->start_date_gmt', '$set_role_duration->end_date_gmt',"; - else - $universal_duration_vals = ''; - - if ( ! empty($set_content_date_limits) ) - $universal_content_date_vals = "'" . (int) $set_content_date_limits->content_date_limited . "', '$set_content_date_limits->content_min_date_gmt', '$set_content_date_limits->content_max_date_gmt',"; - else - $universal_content_date_vals = ''; - - $duration_vals = ''; - $content_date_vals = ''; - - $qry_insert_base = "INSERT INTO $wpdb->user2role2object_rs" - . " (src_or_tx_name, role_type, role_name, assigner_id, scope, $duration_cols $content_date_cols obj_or_term_id, assign_for, inherited_from, $col_ug_id)" - . " VALUES ('$src_or_tx_name', '$role_spec->role_type', '$role_spec->role_name', '$assigner_id', '$scope', "; // duration values, content date limit values, obj_or_term_id, propagate, inherited_from and group_id/user_id values must be appended - - $all_agents = $propagate_agents + $insert_agents; - - foreach ( array_keys($all_agents) as $ug_id ) { - $assignment_id = 0; - - if ( $duration_cols ) { - if ( $universal_duration_vals ) - $duration_vals = $universal_duration_vals; - else { - if ( ! empty($role_duration_per_agent[$ug_id]) ) - $duration_vals = "'" . (int) $role_duration_per_agent[$ug_id]->date_limited . "', '{$role_duration_per_agent[$ug_id]}->start_date_gmt', '{$role_duration_per_agent[$ug_id]}->end_date_gmt',"; - else - $duration_vals = "'0', '" . SCOPER_MIN_DATE_STRING . "', '" . SCOPER_MAX_DATE_STRING . "',"; - } - } - - if ( $content_date_cols ) { - if ( $universal_content_date_vals ) - $content_date_vals = $universal_content_date_vals; - else { - if ( ! empty($content_date_limits_per_agent[$ug_id]) ) - $content_date_vals = "'" . (int) $content_date_limits_per_agent[$ug_id]->content_date_limited . "', '{$content_date_limits_per_agent[$ug_id]}->content_min_date_gmt', '{$content_date_limits_per_agent[$ug_id]}->content_max_date_gmt',"; - else - $content_date_vals = "'0', '" . SCOPER_MIN_DATE_STRING . "', '" . SCOPER_MAX_DATE_STRING . "',"; - } - } - - // won't delete any other role assignments which have date limits - $date_clause = " AND date_limited = '0' AND start_date_gmt = '" . SCOPER_MIN_DATE_STRING . "' AND end_date_gmt = '" . SCOPER_MAX_DATE_STRING . "' AND content_date_limited = '0' AND content_min_date_gmt = '" . SCOPER_MIN_DATE_STRING . "' AND content_max_date_gmt = '" . SCOPER_MAX_DATE_STRING . "'"; - - if ( isset($insert_agents[$ug_id]) ) { - $assign_for = $insert_agents[$ug_id]; - $this_inherited_from = ( isset($inherited_from[$ug_id]) ) ? $inherited_from[$ug_id] : 0; - - // don't delete other role assignments if this insertion has date limits - if ( ! $duration_vals && ! $content_date_vals ) { - // before inserting the role, delete any other matching or conflicting assignments this user/group has for the same object - scoper_query( $qry_delete_base . "$date_clause AND $col_ug_id = '$ug_id' AND obj_or_term_id = '$obj_or_term_id';" ); - } - - // insert role for specified object and group(s) - scoper_query( $qry_insert_base . " $duration_vals $content_date_vals '$obj_or_term_id', '$assign_for', '$this_inherited_from', '$ug_id')" ); - $assignment_id = (int) $wpdb->insert_id; - - // keep track of which objects have ever had their roles/restrictions custom-edited - if ( ! $is_auto_insertion ) { - if ( (OBJECT_SCOPE_RS == $scope) && ('post' == $src_or_tx_name) ) - update_post_meta($obj_or_term_id, '_scoper_custom', true); - else - $custom_role_items[$obj_or_term_id] = true; - } - } - - // insert role for all descendant items - if ( isset($propagate_agents[$ug_id]) ) { - if ( ! $assignment_id ) - $assignment_id = $propagate_agents[$ug_id]; - - // note: Propagated roles will be converted to direct-assigned roles if the parent object/term is deleted. - foreach ( $descendant_ids as $id ) { - // Don't overwrite an explicitly assigned object role with a propagated assignment - // unless the propagated role would be an upgrade - if ( $direct_assignment = scoper_get_var( "$qry_select_base AND inherited_from = '0' $role_clause AND $col_ug_id = '$ug_id' AND obj_or_term_id = '$id' LIMIT 1" ) ) - continue; - - // don't delete other role assignments if this insertion has date limits - if ( ! $duration_vals && ! $content_date_vals ) { - // before inserting the role, delete any other propagated assignments this user/group has for the same object type - scoper_query( $qry_delete_base . " $date_clause AND $col_ug_id = '$ug_id' AND obj_or_term_id = '$id'" ); - } - - scoper_query( $qry_insert_base . "$duration_vals $content_date_vals '$id', 'both', '$assignment_id', '$ug_id')" ); - } - } - } - - // keep track of which objects from non-post data sources have ever had their roles/restrictions custom-edited - if ( ! empty($custom_role_items) ) - update_option( "scoper_custom_{$src_or_tx_name}", $custom_role_items ); - } - - function restrict_roles($scope, $src_or_tx_name, $item_id, $roles, $args = '' ) { - $defaults = array( 'implicit_removal' => false, 'is_auto_insertion' => false, 'force_flush' => false ); - $args = array_merge($defaults, (array) $args); - extract($args); - - global $wpdb; - - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - $is_administrator = is_administrator_rs($src_or_tx_name, 'user'); - - $delete_reqs = array(); - $propagated_restrictions = array(); - $role_change = false; - $default_strict_modes = array( false ); - $strict_role_in = ''; - - // for object restriction, handle auto-setting of equivalent object roles ( 'post reader' for 'private post reader', 'post author' for 'post editor' ). There is no logical distinction between these roles where a single object is concerned. - if ( OBJECT_SCOPE_RS == $scope ) { - foreach ( array_keys($roles) as $role_handle ) { - $equiv_role_handles = array(); - - if ( $objscope_equivalents = $this->scoper->role_defs->member_property($role_handle, 'objscope_equivalents') ) - foreach ( $objscope_equivalents as $equiv_role_handle ) - if ( ! isset( $roles[$equiv_role_handle] ) ) // if the equiv role was set manually, leave it alone. This would not be normal RS behavior - $roles[$equiv_role_handle] = $roles[$role_handle]; - } - } - - if ( $item_id ) { - $default_restrictions = $this->scoper->get_default_restrictions($scope); - $default_strict_roles = ( ! empty($default_restrictions[$src_or_tx_name] ) ) ? array_keys($default_restrictions[$src_or_tx_name]) : array(); - - if ( $default_strict_roles ) { - $strict_role_in = "'" . implode("', '", scoper_role_handles_to_names($default_strict_roles) ) . "'"; - $default_strict_modes []= true; - } - } - - foreach ( $default_strict_modes as $default_strict ) { - $stored_reqs = array(); - $req_ids = array(); - - if ( $default_strict && $strict_role_in ) - $role_clause = "AND role_name IN ($strict_role_in)"; - elseif ($strict_role_in) - $role_clause = "AND role_name NOT IN ($strict_role_in)"; - else - $role_clause = ''; - - // IMPORTANT: max_scope value determines whether we are inserting / updating RESTRICTIONS or UNRESTRICTIONS - if ( TERM_SCOPE_RS == $scope ) - $query_max_scope = ( $default_strict ) ? 'blog' : 'term'; // note: max_scope='object' entries are treated as separate, overriding requirements - else - $query_max_scope = ( $default_strict ) ? 'blog' : 'object'; // Storage of 'blog' max_scope as object restriction does not eliminate any term restrictions. It merely indicates, for data sources that are default strict, that this object does not restrict roles - - $qry = "SELECT requirement_id AS assignment_id, require_for AS assign_for, inherited_from, role_name FROM $wpdb->role_scope_rs WHERE topic = '$scope' AND max_scope = '$query_max_scope'" - . " AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id = '$item_id' AND role_type = '$SCOPER_ROLE_TYPE' $role_clause"; - - if ( $results = scoper_get_results($qry) ) { - foreach ($results as $key => $req) { - $role_handle = SCOPER_ROLE_TYPE . '_' . $req->role_name; - - if ( (OBJECT_SCOPE_RS == $scope) && isset($is_objscope_equiv[$role_handle]) ) - $role_handle = $is_objscope_equiv[$role_handle]; - - $stored_reqs[$role_handle] = array( 'assignment_id' => $req->assignment_id, 'assign_for' => $req->assign_for, 'inherited_from' => $req->inherited_from ); - $req_ids[$role_handle][$req->assignment_id] = array(); - } - } - - if ( ! empty($req_ids[$role_handle]) ) { - // log propagated restrictions - $id_in = "'" . implode("', '", array_keys($req_ids[$role_handle]) ) . "'"; - $qry = "SELECT requirement_id AS assignment_id, inherited_from FROM $wpdb->role_scope_rs WHERE inherited_from IN ($id_in)"; - - if ( $results = scoper_get_results($qry) ) - foreach ( $results as $row ) - $propagated_restrictions[$row->inherited_from][$row->assignment_id] = true; - } - - if ( ! $is_administrator ) - $user_has_role = $this->_validate_assigner_roles($scope, $src_or_tx_name, $item_id, $roles); - - if ( $implicit_removal ) { - // Stored restrictions which are not mirrored in $roles will be deleted (along with their prodigy) - foreach ( array_keys($stored_reqs) as $role_handle ) { - $max_scope = isset($roles[$role_handle]['max_scope']) ? $roles[$role_handle]['max_scope'] : false; - - if ( $max_scope != $query_max_scope ) { - $delete_reqs = $delete_reqs + $req_ids[$role_handle]; - - // also remove any propagated restrictions - foreach ( array_keys($req_ids[$role_handle]) as $req_id ) - if ( isset($all_propagated_restrictions[$req_id]) ) - $delete_reqs = $delete_reqs + $propagated_restrictions[$req_id]; - } - } - } - - foreach ( $roles as $role_handle => $setting ) { - if ( ! $is_administrator && ! $user_has_role[$role_handle] ) - continue; - - if ( $default_strict && ! in_array($role_handle, $default_strict_roles) ) - continue; - - if ( ! $default_strict && $default_strict_roles && in_array($role_handle, $default_strict_roles) ) - continue; - - $max_scope = $setting['max_scope']; - - if ( $max_scope != $query_max_scope ) - $require_for = REMOVE_ASSIGNMENT_RS; - elseif ( $setting['for_item'] ) - $require_for = ( $setting['for_children'] ) ? ASSIGN_FOR_BOTH_RS : ASSIGN_FOR_ENTITY_RS; - else - $require_for = ( $setting['for_children'] ) ? ASSIGN_FOR_CHILDREN_RS : REMOVE_ASSIGNMENT_RS; - - $update_require_for = array( ASSIGN_FOR_ENTITY_RS => array(), ASSIGN_FOR_CHILDREN_RS => array(), ASSIGN_FOR_BOTH_RS => array() ); - - $stored_req = ( isset($stored_reqs[$role_handle]) ) ? $stored_reqs[$role_handle] : array(); - - $unused_byref_arg = ''; - $comparison = $this->_compare_role_settings($require_for, $stored_req, $propagated_restrictions, $delete_reqs, $update_require_for, $default_strict, $unused_byref_arg, $unused_byref_arg); - - $insert_restriction = ( $comparison['unset'] ) ? false : $require_for; - - // Mark assignment for propagation to child items (But don't do so on storage of default restriction to root item. Default restrictions are only applied at item creation.) - $propagate_restriction = ( $item_id && isset($comparison['new_propagation']) ) ? $comparison['new_propagation'] : ''; - - if ( $comparison['role_change'] ) - $role_change = true; - - if ( ! empty($req_ids[$role_handle]) ) { - $id_in = "'" . implode("', '", array_keys($req_ids[$role_handle]) ) . "'"; - - // do this for each role prior to insert call because insert function will consider inherited_from value - foreach ($update_require_for as $require_for => $this_ass_ids) { - if ( $this_ass_ids ) { - $id_in = "'" . implode("', '", $this_ass_ids) . "'"; - $qry = "UPDATE $wpdb->role_scope_rs SET require_for = '$require_for', inherited_from = '0' WHERE requirement_id IN ($id_in)"; - scoper_query($qry); - } - } - } - - if ( $insert_restriction || $propagate_restriction ) - $this->insert_role_restrictions($scope, $max_scope, $role_handle, $src_or_tx_name, $item_id, $insert_restriction, $propagate_restriction, $args ); - } // end foreach roles - } - - // delete assignments; flush user,group results cache - if ( $role_change || ! empty($delete_reqs) || $update_require_for || $force_flush ) { - $this->role_restriction_aftermath($scope, $delete_reqs); - - if ( ! $item_id ) - $this->scoper->default_restrictions = array(); - } - - // possible TODO: reinstate this after further testing - //$this->delete_orphan_restrictions($scope, $src_or_tx_name); - } - - function role_restriction_aftermath($scope, $delete_restrictions = '') { - global $wpdb; - - if ( is_array($delete_restrictions) && count($delete_restrictions) ) { - // Propagated roles will be deleted only if the original progenetor goes away. Removal of a "link" in the parent/child propagation chain has no effect. - $id_in = "'" . implode("', '", array_keys($delete_restrictions) ) . "'"; - $qry = "DELETE FROM $wpdb->role_scope_rs WHERE requirement_id IN ($id_in) OR (inherited_from IN ($id_in) AND inherited_from != '0')"; - - scoper_query($qry); - } - - scoper_flush_restriction_cache( $scope ); - scoper_flush_results_cache(); - } - - // $insert_restriction = require_for value for insertion ('entity', 'children' or 'both') - // $propagate_from_req_id = requirement_id for inherited_from - function insert_role_restrictions ($topic, $max_scope, $role_handle, $src_or_tx_name, $obj_or_term_id, $insert_restriction, $propagate_from_req_id, $args = '') { - $defaults = array( 'inherited_from' => 0, 'is_auto_insertion' => false ); // auto_insertion arg set for restriction propagation from parent objects - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $current_user, $scoper, $wpdb; - - if ( ! $role_spec = scoper_explode_role_handle($role_handle) ) - return; - - // keep track of which objects from non-post data sources have ever had their roles/restrictions custom-edited - if ( ! $is_auto_insertion && ( (TERM_SCOPE_RS == $scope) || ( (OBJECT_SCOPE_RS == $scope) && ('post' != $src_or_tx_name) ) ) ) { - $custom_role_items = get_option( "scoper_custom_{$src_or_tx_name}" ); - - if ( ! is_array($custom_role_items) ) - $custom_role_items = array(); - } - - // need object_type for permission check when modifying propagated object roles - if ( OBJECT_SCOPE_RS == $topic ) { - if ( $role_attrib = $this->scoper->role_defs->get_role_attributes($role_handle) ) - $object_type = $role_attrib->object_types[0]; - else - $object_type = ''; // probably won't be able to propagate roles if this error occurs - } - - // prepare hierarchy and object type data for subsequent propagation - if ( $propagate_from_req_id ) { - if ( TERM_SCOPE_RS == $topic ) { - if ( ! $tx = $scoper->taxonomies->get($src_or_tx_name) ) - return; - - $src = $tx->source; - } elseif ( ! $src = $scoper->data_sources->get($src_or_tx_name) ) - return; - - if ( empty( $src->cols->parent ) ) - return; - - $descendant_ids = awp_query_descendant_ids( $src->table, $src->cols->id, $src->cols->parent, $obj_or_term_id); - - $remove_ids = array(); - foreach ( $descendant_ids as $id ) { - if ( TERM_SCOPE_RS == $topic ) { - if ( ! $this->scoper->admin->user_can_admin_terms($src_or_tx_name, $id) ) - $remove_ids []= $id; - } else { - if ( ! $this->scoper->admin->user_can_admin_object($src_or_tx_name, $object_type, $id) ) - $remove_ids []= $id; - } - } - if ( $remove_ids ) - $descendant_ids = array_diff( $descendant_ids, $remove_ids ); - } - - // Before inserting a restriction, delete any overlooked old restriction. - $qry_delete_base = "DELETE FROM $wpdb->role_scope_rs" - . " WHERE topic = '$topic' AND max_scope = '$max_scope' AND src_or_tx_name = '$src_or_tx_name'" - . " AND role_type = '$role_spec->role_type' AND role_name = '$role_spec->role_name'"; - - $qry_select_base = "SELECT requirement_id AS assignment_id FROM $wpdb->role_scope_rs" - . " WHERE topic = '$topic' AND max_scope = '$max_scope' AND src_or_tx_name = '$src_or_tx_name'" - . " AND role_type = '$role_spec->role_type' AND role_name = '$role_spec->role_name'"; - - $qry_insert_base = "INSERT INTO $wpdb->role_scope_rs" - . " (src_or_tx_name, role_type, role_name, topic, max_scope, obj_or_term_id, require_for, inherited_from)" - . " VALUES ('$src_or_tx_name', '$role_spec->role_type', '$role_spec->role_name', '$topic', '$max_scope',"; // obj_or_term_id, propagate, inherited_from values must be appended - - if ( $insert_restriction ) { - // before inserting the role, delete any other matching or conflicting assignments this user/group has for the same object - scoper_query( $qry_delete_base . " AND obj_or_term_id = '$obj_or_term_id';" ); - - // insert role for specified object and group(s) - scoper_query( $qry_insert_base . "'$obj_or_term_id', '$insert_restriction', '$inherited_from')" ); - $inserted_req_id = (int) $wpdb->insert_id; - - // keep track of which objects have ever had their roles/restrictions custom-edited - if ( ! $is_auto_insertion ) { - if ( (OBJECT_SCOPE_RS == $scope) && ('post' == $src_or_tx_name) ) - update_post_meta($obj_or_term_id, '_scoper_custom', true); - else - $custom_role_items[$obj_or_term_id] = true; - } - } - - // insert role for all descendant items - if ( $propagate_from_req_id ) { - if ( $insert_restriction ) - $propagate_from_req_id = $inserted_req_id; - - // note: Propagated roles will be converted to direct-assigned roles if the parent object/term is deleted. - // But if the parent setting is changed without deleting old object/term, inherited roles from the old parent remain. - // TODO: 're-inherit parent roles' checkbox for object and term role edit UI - foreach ( $descendant_ids as $id ) { - // Don't overwrite an explicitly assigned object role with a propagated assignment - if ( $direct_assignment = scoper_get_var( "$qry_select_base AND inherited_from = '0' $role_clause AND obj_or_term_id = '$id' LIMIT 1" ) ) - continue; - - // before inserting the role, delete any other propagated assignments this user/group has for the same object type - scoper_query( $qry_delete_base . " AND obj_or_term_id = '$id'" ); - - scoper_query( $qry_insert_base . "'$id', 'both', '$propagate_from_req_id')" ); - } - } - - // keep track of which objects from non-post data sources have ever had their roles/restrictions custom-edited - if ( ! empty($custom_role_items) ) - update_option( "scoper_custom_{$src_or_tx_name}", $custom_role_items ); - } - - -} // end class ScoperRoleAssigner - - -function awp_query_descendant_ids( $table_name, $col_id, $col_parent, $parent_id ) { - global $wpdb; - - $descendant_ids = array(); - - // todo: abstract this - $type_clause = ( $table_name == $wpdb->posts ) ? "AND post_type != 'revision'" : ''; - - $query = "SELECT $col_id FROM $table_name WHERE $col_parent = '$parent_id' $type_clause"; - if ( $results = scoper_get_col($query) ) { - foreach ( $results as $id ) { - if ( ! in_array( $id, $descendant_ids ) ) { - $descendant_ids []= $id; - $next_generation = awp_query_descendant_ids($table_name, $col_id, $col_parent, $id, $descendant_ids); - $descendant_ids = array_merge($descendant_ids, $next_generation); - } - } - } - return $descendant_ids; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role_assignment_lib_rs.php b/blog/wp-content/plugins/role-scoper/admin/role_assignment_lib_rs.php deleted file mode 100644 index 9b35ecc..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role_assignment_lib_rs.php +++ /dev/null @@ -1,142 +0,0 @@ - 0'; - break; - case ROLE_BASIS_GROUPS: - $col_ug_id = 'group_id'; - $ug_clause = 'AND group_id > 0'; - break; - } - - $qry = "SELECT assignment_id, $col_ug_id, role_name, date_limited, start_date_gmt, end_date_gmt, content_date_limited, content_min_date_gmt, content_max_date_gmt FROM $wpdb->user2role2object_rs" - . " WHERE role_type = '$role_type' AND scope = 'blog' $ug_clause"; - - $results = scoper_get_results($qry); - - foreach($results as $blogrole) { - $role_handle = $role_type . '_' . $blogrole->role_name; - $blog_roles[$role_handle] [$blogrole->$col_ug_id] = (array) $blogrole; - $blog_roles[$role_handle] [$blogrole->$col_ug_id]['assign_for'] = ASSIGN_FOR_ENTITY_RS; - } - - return $blog_roles; - } - - // Return all assigned term or object roles for specified arguments - // (NOTE: key order differs from front end implementation) - function get_assigned_roles($scope, $role_basis, $src_or_tx_name, $args = '') { - global $wpdb; - - $defaults = array( 'id' => false, 'ug_id' => 0, 'join' => '', 'role_handles' => '' ); - $args = array_merge($defaults, (array) $args); - extract($args); - - if ( BLOG_SCOPE_RS == $scope ) - return ScoperRoleAssignments::get_assigned_blog_roles($role_basis); - - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - $roles = array(); - - switch ( $role_basis ) { - case ROLE_BASIS_USER: - $col_ug_id = 'user_id'; - $ug_clause = ($ug_id) ? " AND user_id = '$ug_id'" : 'AND user_id > 0'; - break; - case ROLE_BASIS_GROUPS: - $col_ug_id = 'group_id'; - $ug_clause = ($ug_id) ? " AND group_id = '$ug_id'" : 'AND group_id > 0'; - break; - } - - $id_clause = ( false === $id ) ? '' : "AND obj_or_term_id = '$id'"; - - if ( $role_handles ) { - if ( ! is_array($role_handles) ) - $role_handles = (array) $role_handles; - $role_clause = ( $role_handles ) ? "AND role_name IN ('" . implode( "', '", scoper_role_handles_to_names($role_handles) ) . "')" : ''; - } else - $role_clause = ''; - - $qry = "SELECT $col_ug_id, obj_or_term_id, role_name, assign_for, assignment_id, inherited_from, date_limited, start_date_gmt, end_date_gmt, content_date_limited, content_min_date_gmt, content_max_date_gmt FROM $wpdb->user2role2object_rs AS uro " - . "$join WHERE role_type = '$SCOPER_ROLE_TYPE' $role_clause AND scope = '$scope' AND src_or_tx_name = '$src_or_tx_name' $id_clause $ug_clause"; - - $results = scoper_get_results($qry); - - foreach($results as $role) { - $role_handle = SCOPER_ROLE_TYPE . '_' . $role->role_name; - $roles [$role->obj_or_term_id] [$role_handle] [$role->$col_ug_id] = (array) $role; - } - - return $roles; - } - - // wrapper used for single object edit - function organize_assigned_roles($scope, $src_or_tx_name, $obj_or_term_id, $role_handles = '', $role_basis = ROLE_BASIS_USER, $get_defaults = false) { - $assignments = array(); - - if ( $get_defaults ) - $obj_or_term_id = intval($obj_or_term_id); - - $args = array( 'role_handles' => $role_handles ); - $args['id'] = ( $obj_or_term_id || $get_defaults ) ? $obj_or_term_id : false; - - $roles = ScoperRoleAssignments::get_assigned_roles($scope, $role_basis, $src_or_tx_name, $args); - - $role_duration_enabled = scoper_get_option( 'role_duration_limits' ); - $content_date_limits_enabled = scoper_get_option ( 'content_date_limits' ); - - if ( ! isset($roles[$obj_or_term_id]) ) - return array(); - - foreach ( $roles[$obj_or_term_id] as $role_handle => $agents ) { - foreach ( $agents as $ug_id => $ass ) { - $ass_id = $ass['assignment_id']; - $assign_for = $ass['assign_for']; - - $assignments[$role_handle] ['assigned'] [$ug_id] ['inherited_from'] = $ass['inherited_from']; - - $assignments[$role_handle] ['assigned'] [$ug_id] ['assign_for'] = $assign_for; - $assignments[$role_handle] ['assigned'] [$ug_id] ['assignment_id'] = $ass_id; - - if ( $role_duration_enabled && $ass['date_limited'] ) { - $assignments[$role_handle] ['assigned'] [$ug_id] ['date_limited'] = $ass['date_limited']; - $assignments[$role_handle] ['assigned'] [$ug_id] ['start_date_gmt'] = $ass['start_date_gmt']; - $assignments[$role_handle] ['assigned'] [$ug_id] ['end_date_gmt'] = $ass['end_date_gmt']; - } - - if ( $content_date_limits_enabled && $ass['content_date_limited'] ) { - $assignments[$role_handle] ['assigned'] [$ug_id] ['content_date_limited'] = $ass['content_date_limited']; - $assignments[$role_handle] ['assigned'] [$ug_id] ['content_min_date_gmt'] = $ass['content_min_date_gmt']; - $assignments[$role_handle] ['assigned'] [$ug_id] ['content_max_date_gmt'] = $ass['content_max_date_gmt']; - } - - // also save the calling function some work by returning each flavor of assignment as an array keyed by user/group id - if ( ('children' == $assign_for) || ('both' == $assign_for) ) - $assignments[$role_handle] ['children'] [$ug_id] = $ass_id; - - if ( ('entity' == $assign_for) || ('both' == $assign_for) ) - $assignments[$role_handle] ['entity'] [$ug_id] = $ass_id; - - if ( $ass['inherited_from'] ) - $assignments[$role_handle] ['propagated'] [$ass['inherited_from']] = $ass_id; - } - } - - return $assignments; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role_definition.php b/blog/wp-content/plugins/role-scoper/admin/role_definition.php deleted file mode 100644 index 8114e52..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role_definition.php +++ /dev/null @@ -1,233 +0,0 @@ -"; - -if ( scoper_get_option('display_hints') ) { - echo '
    '; - echo '

    '; - _e('These roles are defined by Role Scoper (and possibly other plugins) for your use in designating content-specific access or supplemental blog-wide access. Although the default capabilities are ideal for most installations, you may modify them at your discretion.', 'scoper'); - echo '

    '; - - echo '

    '; - _e('Since Role Scoper role definitions pertain to a particular object type, available capabilities are defined by the provider of that object type. WordPress core or plugins can add or revise default role definitions based on available capabilities.', 'scoper'); - echo '

    '; - - echo '

    '; - _e('WordPress Role assignments function as a default which may be supplemented or overriden by blog-wide or content-specific assignment of these RS Roles.', 'scoper'); - - echo '

    '; - echo '
    '; -} - -echo ""; - - -if ( empty( $args['customize_defaults'] ) ) { - $rs_role_defs = $scoper->role_defs; -} else { - global $scoper_role_types; - $rs_role_defs = new WP_Scoped_Roles($scoper->cap_defs, $scoper_role_types); - - //$this->load_role_caps(); - $rs_role_defs->role_caps = apply_filters('define_role_caps_rs', scoper_core_role_caps() ); - - if ( $user_role_caps = scoper_get_option( 'user_role_caps', -1, true ) ) - $rs_role_defs->add_role_caps( $user_role_caps ); - - if ( $disabled_role_caps = scoper_get_option( 'disabled_role_caps', -1, true ) ) - $rs_role_defs->remove_role_caps( $disabled_role_caps ); - - $rs_role_defs->add_member_objects( scoper_core_role_defs() ); - - $rs_role_defs = apply_filters('define_roles_rs', $rs_role_defs); - $rs_role_defs->remove_invalid(); // currently don't allow additional custom-defined post, page or link roles - - // To support merging in of WP role assignments, always note actual WP-defined roles - // regardless of which role type we are scoping with. - $rs_role_defs->populate_with_wp_roles(); - $rs_role_defs->lock(); // prevent inadvertant improper API usage -} - - -// object_type association of roles needs to be based on default role_caps, otherwise roles with all caps disabled will be excluded from UI -// This also allows the default bolding to be based on custom default settings when role defs are defined per-blog in wp-mu -global $scoper_role_types; -$rs_default_role_defs = new WP_Scoped_Roles($scoper->cap_defs, $scoper_role_types); - -$rs_default_role_defs->role_caps = apply_filters('define_role_caps_rs', scoper_core_role_caps() ); - -if ( IS_MU_RS && ! $args['customize_defaults'] && ! $args['sitewide'] ) { - if ( $user_role_caps = scoper_get_option( 'user_role_caps', -1, true ) ) - $rs_default_role_defs->add_role_caps( $user_role_caps ); - - if ( $disabled_role_caps = scoper_get_option( 'disabled_role_caps', -1, true ) ) - $rs_default_role_defs->remove_role_caps( $disabled_role_caps ); -} - -$rs_default_role_defs->add_member_objects( scoper_core_role_defs() ); - -$rs_default_role_defs = apply_filters('define_roles_rs', $rs_default_role_defs); -$rs_default_role_defs->remove_invalid(); - - - -foreach ( $scoper->data_sources->get_all() as $src_name => $src) { - - $include_taxonomy_otypes = true; - - foreach ( $src->object_types as $object_type => $otype ) { - $otype_roles = array(); - $otype_display_names = array(); - - if ( $obj_roles = $rs_default_role_defs->get_matching( 'rs', $src_name, $object_type ) ) { - $otype_roles[$object_type] = $obj_roles; - $otype_display_names[$object_type] = $otype->display_name; - } - - if ( $include_taxonomy_otypes ) { - if ( scoper_get_otype_option('use_term_roles', $src_name, $object_type) ) { - foreach ( $src->uses_taxonomies as $taxonomy) { - $tx_display_name = $scoper->taxonomies->member_property($taxonomy, 'display_name'); - - if ( $tx_roles = $rs_role_defs->get_matching( 'rs', $src_name, $taxonomy ) ) { - $otype_roles[$taxonomy] = $tx_roles; - $otype_display_names[$taxonomy] = $tx_display_name; - } - } - $include_taxonomy_otypes = false; - } - } - - if ( ! $otype_roles ) - continue; - - foreach ( $otype_roles as $object_type => $roles ) { - //display each role which has capabilities for this object type - echo '
    '; - echo '

    ' . sprintf( __('%s Roles'), $otype_display_names[$object_type] ) . '

    '; -?> - - - - - - - - - 'contributor', - 'rs_post_revisor' => 'revisor', - 'rs_post_author' => 'author', - 'rs_post_editor' => 'editor', - 'rs_page_editor' => 'editor' - ); - - if ( defined( 'RVY_VERSION' ) ) - $wp_role_sync['rs_page_revisor'] = 'revisor'; - - global $wp_roles; - - foreach ( $roles as $rs_role_handle => $role_def ) { - $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; - - echo "\n\t" - . "'; - } - - echo '
    " . $rs_role_defs->get_display_name($rs_role_handle) . ''; - - if ( isset( $wp_role_sync[$rs_role_handle] ) ) { - if ( isset( $wp_roles->role_objects[ $wp_role_sync[$rs_role_handle] ] ) ) { - $wp_role_handle = "wp_" . $wp_role_sync[$rs_role_handle]; - $wp_display_name = $wp_roles->role_names[ $wp_role_sync[$rs_role_handle] ]; - - $contained_roles = $rs_role_defs->get_contained_roles( $wp_role_handle ); - - if ( ! isset( $contained_roles[$rs_role_handle] ) ) { - echo( '

    ' ); - printf( __( 'Warning: Since the WP %1$s role def lacks some caps selected here, it will be treated as a lesser role if Restrictions are applied.', 'scoper' ), $wp_display_name ); - echo( '' ); - $missing_caps = true; - } else - $missing_caps = false; - - // only display "sync WP role" checkbox if the WP role has missing caps or extra caps - $otype_caps = $scoper->cap_defs->get_matching( $src_name, $object_type, '', STATUS_ANY_RS ); - $wp_defined_caps = array_intersect_key( $wp_roles->role_objects[ $wp_role_sync[$rs_role_handle] ]->capabilities, $otype_caps ); - $wp_extra_caps = array_diff_key( $wp_defined_caps, $rs_role_defs->role_caps[$rs_role_handle] ); - - /* - if ( $wp_extra_caps ) - $sync_caption = sprintf( _ x( 'sync WP %1$s
    to these selections (currently includes %2$s)', 'role name', 'scoper' ), $wp_display_name, implode( ", ", array_keys($wp_extra_caps) ) ); - else - $sync_caption = sprintf( _ x( 'sync WP %s
    to these selections', 'role name', 'scoper' ), $wp_display_name); - */ - - if ( $wp_extra_caps ) - $sync_caption = sprintf( __( 'sync WP %1$s
    to these selections (currently includes %2$s)', 'scoper' ), $wp_display_name, implode( ", ", array_keys($wp_extra_caps) ) ); - else - $sync_caption = sprintf( __( 'sync WP %s
    to these selections', 'scoper' ), $wp_display_name); - - echo '

    ' ; - $title = __( 'note: only the capabilities listed here will be affected', 'scoper' ); - echo "" - . "'; - } - } - - echo "
      "; - - $active_cap_names = array_keys($rs_role_defs->role_caps[$rs_role_handle]); - - if ( ! empty($role_def->anon_user_blogrole) || ! empty($role_def->no_custom_caps) ) { - $disabled_role = 'disabled="disabled"'; - $available_cap_names = $active_cap_names; - } else { - $disabled_role = ''; - $available_caps = $rs_default_role_defs->cap_defs->get_matching($src_name, $object_type, '', STATUS_ANY_RS); - $available_cap_names = array_keys($available_caps); - sort($available_cap_names); - } - - foreach($available_cap_names as $cap_name) { - $checked = ( in_array($cap_name, $active_cap_names) ) ? 'checked="checked"' : ''; - $is_default = ! empty($rs_default_role_defs->role_caps[$rs_role_handle][$cap_name]); - $disabled_cap = $disabled_role || ( $is_default && ! empty($available_caps[$cap_name]->no_custom_remove) ) || ( ! $is_default && ! empty($available_caps[$cap_name]->no_custom_add) ); - $disabled = ( $disabled_cap ) ? 'disabled="disabled"' : ''; - - $style = ( $is_default ) ? "style='font-weight: bold'" : ''; - - $cap_safename = str_replace( ' ', '_', $cap_name ); - - echo "
    • " - . "
    • '; - } - - echo '
    '; - echo '

    '; - } // foreach otype_role (distinguish object roles from term roles) - } // end foreach object_type - -} // end foreach data source - -echo ''; -echo ''; -echo '
    ' - -?> -
    - - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/role_definition_wp.php b/blog/wp-content/plugins/role-scoper/admin/role_definition_wp.php deleted file mode 100644 index d105a97..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/role_definition_wp.php +++ /dev/null @@ -1,117 +0,0 @@ -"; - -if ( scoper_get_option('display_hints') ) { - echo '
    '; - echo '

    '; - _e('Note that only capabilities configured for filtering by Role Scoper are listed here.', 'scoper'); - echo ' '; - _e('These WordPress role definitions may be modified via the Capability Manager or Role Manager plugin.', 'scoper'); - echo '

    '; - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - echo '

    '; - _e('To understand how your WordPress roles relate to type-specific RS Roles, see WP/RS Role Equivalence.', 'scoper'); - echo '

    '; - } - - echo '
    '; -} - - $roles = $scoper->role_defs->get_matching( 'wp', '', '' ); - - echo '

    ' . __('WordPress Roles', 'scoper'), '

    '; -?> - - - - - - - - -role_names; - uasort($wp_role_names, "strnatcasecmp"); // sort by array values, but maintain keys - - // order WP roles by display name - foreach ( array_keys($wp_role_names) as $wp_role_name ) { - $role_handle = scoper_get_role_handle( $wp_role_name, 'wp' ); - - $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; - - if ( empty($scoper->role_defs->role_caps[$role_handle]) ) - continue; - - $cap_names = array_keys($scoper->role_defs->role_caps[$role_handle]); - sort($cap_names); - $cap_display_names = array(); - foreach($cap_names as $cap_name) - $cap_display_names[] = ucwords( str_replace('_', ' ', $cap_name) ); - - $caplist = "
  • " . implode("
  • ", $cap_display_names) . "
  • "; - - echo "\n\t" - . ""; - } // end foreach role - - - - echo '
    " . $scoper->role_defs->get_display_name($role_handle) . "
      $caplist
    '; - echo '

    '; - -if ( 'rs' == SCOPER_ROLE_TYPE ) { - echo ''; - echo '

    ' . __('WP / RS Role Equivalence', 'scoper'), '

    '; -?> - - - - - - - - -role_defs->get_contained_roles($role_handle, false, 'rs'); - - foreach( array_keys($contained_roles_handles) as $contained_role_handle ) - $display_names[] = $scoper->role_defs->get_display_name($contained_role_handle); - - $list = "
  • " . implode("
  • ", $display_names) . "
  • "; - - echo "\n\t" - . ""; - } // end foreach role - - echo '
    " . $scoper->role_defs->get_display_name($role_handle) . "
      $list
    '; - echo '

    '; -} // endif 'rs' == SCOPER_ROLE_TYPE -?> - - - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/rs-objrole-cbox-maint.js b/blog/wp-content/plugins/role-scoper/admin/rs-objrole-cbox-maint.js deleted file mode 100644 index 10e2954..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/rs-objrole-cbox-maint.js +++ /dev/null @@ -1,32 +0,0 @@ -addLoadEvent(function() { - //on page load... - scoper_rig_role_checkboxes(); -}); - -function scoper_rig_role_checkboxes() { - var elems = document.getElementsByTagName('input'); - - var role_for_object_regex = /^r[0-9]+[g,u][0-9]+/ - var role_for_child_regex = /^p_r[0-9]+[g,u][0-9]+/ - - for (var i=0; itaxonomies->get($taxonomy); -if ( empty($tx) || empty($tx->requires_term) ) - wp_die(__('Invalid taxonomy', 'scoper')); - -$is_administrator = is_administrator_rs($tx, 'user'); - -if ( ! $scoper->admin->user_can_admin_terms($taxonomy) ) - wp_die(__awp('Cheatin’ uh?')); - -require_once('admin_ui_lib_rs.php'); -require_once( 'admin-bulk_rs.php' ); -$role_assigner = init_role_assigner(); - -$nonce_id = 'scoper-assign-roles'; - -$role_codes = ScoperAdminBulk::get_role_codes(); - -echo ''; - - -// retrieve all terms to track hierarchical relationship, even though some may not be adminable by current user -$val = ORDERBY_HIERARCHY_RS; -$args = array( 'order_by' => $val ); -$all_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COLS_ALL_RS, 0, $args); - -// =========================== Submission Handling ========================= -if ( isset($_POST['rs_submit']) ) { - $err = ScoperAdminBulk::role_submission(TERM_SCOPE_RS, ROLE_RESTRICTION_RS, '', $taxonomy, $role_codes, '', $nonce_id); - - if ( scoper_get_option( 'file_filtering' ) ) - scoper_flush_file_rules(); -} else - $err = 0; - - -// =========================== Prepare Data =============================== - -if ( $col_id = $scoper->taxonomies->member_property($taxonomy, 'source', 'cols', 'id') ) { - // determine which terms current user can admin - if ( $admin_terms = $scoper->get_terms($taxonomy, ADMIN_TERMS_FILTER_RS, COL_ID_RS) ) { - $admin_terms = array_fill_keys( $admin_terms, true ); - } -} else - $admin_terms = array(); - -// =========================== Display UI =============================== -?> - -
    -' . sprintf(__('%s Restrictions', 'scoper'), $tx->display_name); -echo '  (' . __('see notes', 'scoper') . ')'; -if ( scoper_get_option('display_hints') ) { - echo '
    '; - if ( 'category' == $taxonomy && scoper_get_otype_option('use_object_roles', 'post', 'post') ) - printf(__('Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s (or %4$s-assigned). Corresponding General Roles (whether assigned by WordPress or Role Scoper) are ignored.', 'scoper'), "", $tx->display_name, '', $tx->object_source->display_name); - else - printf(__('Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s. Corresponding General Role assignments are ignored.', 'scoper'), "", $tx->display_name, ''); - echo '
    '; -} - -if ( ! $role_defs_by_otype = $scoper->role_defs->get_for_taxonomy($tx->object_source, $taxonomy) ) { - echo '
    ' . sprintf (__( 'Role definition error (taxonomy: %s).', 'scoper'), $taxonomy); - echo '
    '; - return; -} - -if ( empty($admin_terms) ) { - echo '
    ' . sprintf(__( 'Either you do not have permission to administer any %s, or none exist.', 'scoper'), $tx->display_name_plural); - echo ''; - return; -} - -?> -
    -
    '; - -// ============ Assignment Mode Selection Display ================ -// little hack to avoid awkward caption with "link category" { -$display_name_plural = ( 'link_category' == $taxonomy ) ? strtolower( $scoper->taxonomies->member_property('category', 'display_name_plural') ) : strtolower($tx->display_name_plural); -$display_name = ( 'link_category' == $taxonomy ) ? strtolower( $scoper->taxonomies->member_property('category', 'display_name') ) : strtolower($tx->display_name); - -if ( empty($tx->source->cols->parent) || ( ! empty($tx->uses_standard_schema) && empty($tx->hierarchical) ) ) - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('for selected %s', 'scoper'), $display_name_plural) - ); -else - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('for selected %s', 'scoper'), $display_name_plural), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('for sub-%s of selected', 'scoper'), $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('for selected and sub-%s', 'scoper'), $display_name_plural) - ); - -$max_scopes = array( 'term' => __('Restrict selected roles', 'scoper'), 'blog' => __('Unrestrict selected roles', 'scoper') ); -$args = array( 'max_scopes' => $max_scopes, 'scope' => TERM_SCOPE_RS ); -ScoperAdminBulk::display_inputs(ROLE_RESTRICTION_RS, $assignment_modes, $args); - -ScoperAdminBulk::item_tree_jslinks(ROLE_RESTRICTION_RS); - -// IE (6 at least) won't obey link color directive in a.classname CSS -$ie_link_style = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) ? ' style="color:white;"' : ''; - -$args = array( 'include_child_restrictions' => true, 'return_array' => true, 'role_type' => SCOPER_ROLE_TYPE, 'force_refresh' => true ); -$strict_terms = $scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy, $args ); -//strict_terms[taxonomy][role name][term_id] = array: terms which require Role Scoper assignment for specified role (user blog roles ignored, required caps may be supplied by scoper term role or object-specific assignment) - // (for other terms, Role Scoper role assignment is optional (term role assignments will supplement blog caps) - -$editable_roles = array(); -foreach ( $all_terms as $term ) { - $id = $term->$col_id; - - foreach ( $role_defs_by_otype as $object_type => $role_defs ) - foreach ( array_keys($role_defs) as $role_handle ) - if ( $role_assigner->user_has_role_in_term( array($role_handle=>1), $taxonomy, $id, '', array('src_name' => $tx->object_source->name, 'object_type' => $object_type) ) ) - $editable_roles[$id][$role_handle] = true; -} - -$default_restrictions = $scoper->get_default_restrictions(TERM_SCOPE_RS); - -$default_strict_roles = ( ! empty($default_restrictions[$taxonomy] ) ) ? array_flip(array_keys($default_restrictions[$taxonomy])) : array(); - -$table_captions = ScoperAdminUI::restriction_captions(TERM_SCOPE_RS, $tx, $display_name, $display_name_plural); - -$args = array( -'admin_items' => $admin_terms, 'editable_roles' => $editable_roles, 'default_strict_roles' => $default_strict_roles, -'ul_class' => 'rs-termlist', 'ie_link_style' => $ie_link_style, 'err' => $err, -'table_captions' => $table_captions -); - -ScoperAdminBulk::item_tree( TERM_SCOPE_RS, ROLE_RESTRICTION_RS, $tx->source, $tx, $all_terms, '', $strict_terms, $role_defs_by_otype, $role_codes, $args); - -echo '' . __('top', 'scoper') . ''; -echo '
    '; -echo '

    ' . __("Notes", 'scoper') . ':

      '; - -if ( ('category' == $taxonomy) && ( ! scoper_get_otype_option('use_term_roles', 'post', 'page') ) ) - ScoperAdminUI::common_ui_msg( 'pagecat_plug' ); - -if ( empty($tx->object_source->no_object_roles) ) { - echo '
    • '; - printf(__('Any %1$s Restriction causes the specified role to be granted only via %1$s Role assignment, regardless of these %2$s settings.', 'scoper'), $tx->object_source->display_name, $tx->display_name); - echo '
    '; -} -?> -
    - - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/section_roles.php b/blog/wp-content/plugins/role-scoper/admin/section_roles.php deleted file mode 100644 index 34a40d9..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/section_roles.php +++ /dev/null @@ -1,219 +0,0 @@ -taxonomies->get($taxonomy) ) - wp_die(__('Invalid taxonomy', 'scoper')); - -$is_administrator = is_administrator_rs($tx, 'user'); - -$role_bases = array(); - -if ( USER_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_terms($taxonomy) ) ) - $role_bases []= ROLE_BASIS_USER; - -if ( GROUP_ROLES_RS && ( $is_administrator || $scoper->admin->user_can_admin_terms($taxonomy) || current_user_can('manage_groups') ) ) - $role_bases []= ROLE_BASIS_GROUPS; - -if ( empty($role_bases) ) - wp_die(__awp('Cheatin’ uh?')); - -require_once('admin_ui_lib_rs.php'); -require_once( 'admin-bulk_rs.php' ); -require_once('role_assignment_lib_rs.php'); -$role_assigner = init_role_assigner(); - -$nonce_id = 'scoper-assign-roles'; - -$agents = ScoperAdminBulk::get_agents($role_bases); -$agent_names = ScoperAdminBulk::agent_names($agents); -$agent_list_prefix = ScoperAdminBulk::agent_list_prefixes(); -$agent_caption_plural = ScoperAdminBulk::agent_captions_plural($role_bases); -$role_bases = array_keys($agents); - -$role_codes = ScoperAdminBulk::get_role_codes(); - -echo ''; - -// retrieve all terms to track hierarchical relationship, even though some may not be adminable by current user -$val = ORDERBY_HIERARCHY_RS; -$args = array( 'order_by' => $val ); -$all_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COLS_ALL_RS, 0, $args); - - -// =========================== Submission Handling ========================= -if ( isset($_POST['rs_submit']) ) - $err = ScoperAdminBulk::role_submission(TERM_SCOPE_RS, ROLE_ASSIGNMENT_RS, $role_bases, $taxonomy, $role_codes, $agent_caption_plural, $nonce_id); -else - $err = 0; - - -// =========================== Prepare Data =============================== - -//$term_roles [role_basis] [src_name] [object_id] [role_handle] [agent_id] = array( 'assign_for' => ENUM , 'inherited_from' => assignment_id) -$term_roles = array(); -foreach ( $role_bases as $role_basis ) - $term_roles[$role_basis] = ScoperRoleAssignments::get_assigned_roles( TERM_SCOPE_RS, $role_basis, $taxonomy ); - -if ( $col_id = $scoper->taxonomies->member_property($taxonomy, 'source', 'cols', 'id') ) { - // determine which terms current user can admin - if ( $admin_terms = $scoper->get_terms($taxonomy, ADMIN_TERMS_FILTER_RS, COL_ID_RS) ) { - $admin_terms = array_fill_keys( $admin_terms, true ); - } -} else - $admin_terms = array(); - -// =========================== Display UI =============================== -?> -
    -' . sprintf(__('%s Roles', 'scoper'), $tx->display_name) - . '  (' . __('see notes', 'scoper') . ')' - . ''; - -if ( scoper_get_option('display_hints') ) { - echo '
    '; - if ( ! empty($tx->requires_term) ) { - //printf(_ x('Grant capabilities within a specific %2$s, potentially more than a user\'s WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s.', 'arguments are link open, taxonomy name, link close', 'scoper'), "", $tx->display_name, ''); - printf(__('Grant capabilities within a specific %2$s, potentially more than a user\'s WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s.', 'scoper'), "", $tx->display_name, ''); - } else - printf(__('Grant capabilities within a specific %s, potentially more than a user\'s WP role would allow.', 'scoper'), $tx->display_name); - - echo '
    '; -} - -if ( ! $role_defs_by_otype = $scoper->role_defs->get_for_taxonomy($tx->object_source, $taxonomy) ) { - echo '
    ' . sprintf (__( 'Role definition error (taxonomy: %s).', 'scoper'), $taxonomy); - echo '
    '; - return; -} - -if ( empty($admin_terms) ) { - echo '
    ' . sprintf(__( 'Either you do not have permission to administer any %s, or none exist.', 'scoper'), $tx->display_name_plural); - echo ''; - return; -} -?> -
    -
    '; - -// ============ Users / Groups and Assignment Mode Selection Display ================ -// little hack to avoid awkward caption with "link category" { -$display_name_plural = ( 'link_category' == $taxonomy ) ? strtolower( $scoper->taxonomies->member_property('category', 'display_name_plural') ) : strtolower($tx->display_name_plural); - -if ( empty($tx->source->cols->parent) || ( ! empty($tx->uses_standard_schema) && empty($tx->hierarchical) ) ) - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => __('Assign', 'scoper'), - REMOVE_ASSIGNMENT_RS =>__('Remove', 'scoper') - ); -else - $assignment_modes = array( - ASSIGN_FOR_ENTITY_RS => sprintf(__('Assign for selected %s', 'scoper'), $display_name_plural), - ASSIGN_FOR_CHILDREN_RS => sprintf(__('Assign for sub-%s of selected', 'scoper'), $display_name_plural), - ASSIGN_FOR_BOTH_RS => sprintf(__('Assign for selected and sub-%s', 'scoper'), $display_name_plural), - REMOVE_ASSIGNMENT_RS =>__('Remove', 'scoper') - ); -$args = array( 'role_bases' => $role_bases, 'agents' => $agents, 'agent_caption_plural' => $agent_caption_plural, 'scope' => TERM_SCOPE_RS, 'src_or_tx_name' => $taxonomy ); -ScoperAdminBulk::display_inputs(ROLE_ASSIGNMENT_RS, $assignment_modes, $args); - -$args = array( 'role_bases' => $role_bases ); -ScoperAdminBulk::item_tree_jslinks(ROLE_ASSIGNMENT_RS, $args); - -echo '
    '; - -// IE (6 at least) won't obey link color directive in a.classname CSS -$ie_link_style = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) ? ' style="color:white;" ' : ''; - -$args = array( 'include_child_restrictions' => true, 'return_array' => true, 'role_type' => SCOPER_ROLE_TYPE, 'force_refresh' => true ); -$strict_terms = $scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy, $args ); - -$src_name = $tx->object_source->name; - -$editable_roles = array(); -foreach ( $all_terms as $term ) { - $id = $term->$col_id; - - foreach ( $role_defs_by_otype as $object_type => $role_defs ) - foreach ( array_keys($role_defs) as $role_handle ) - if ( $role_assigner->user_has_role_in_term( array($role_handle=>1), $taxonomy, $id, '', array('src_name' => $src_name, 'object_type' => $object_type) ) ) - $editable_roles[$id][$role_handle] = true; -} - -$args = array( -'admin_items' => $admin_terms, 'editable_roles' => $editable_roles, 'role_bases' => $role_bases, -'agent_names' => $agent_names, 'agent_caption_plural' => $agent_caption_plural, 'agent_list_prefix' => $agent_list_prefix, -'ul_class' => 'rs-termlist', 'ie_link_style' => $ie_link_style, 'err' => $err -); - -ScoperAdminBulk::item_tree( TERM_SCOPE_RS, ROLE_ASSIGNMENT_RS, $tx->source, $tx, $all_terms, $term_roles, $strict_terms, $role_defs_by_otype, $role_codes, $args); - -echo '
    '; -echo '
    '; //rs-section-roles - -//================================ Notes Section ================================== -?> -
    - - true, 'display_restriction_key' => true ); -ScoperAdminUI::role_owners_key($tx, $args); - -echo '

    ' . __("Notes", 'scoper') . ':

      '; - -echo '
    • '; -_e('A Role is a collection of capabilities.', 'scoper'); -echo '
    • '; - -echo '
    • '; -_e("Capabilities in a user's WordPress Role (and, optionally, RS-assigned General Roles) enable blog-wide operations (read/edit/delete) on some object type (post/page/link), perhaps of a certain status (private/published/draft).", 'scoper'); -echo '
    • '; - -echo '
    • '; -if ( empty($tx->object_source->no_object_roles) ) - printf(__('Scoped Roles can grant users these same WordPress capabilities on a per-%1$s or per-%2$s basis. Useful in fencing off sections your site.', 'scoper'), $tx->display_name, $tx->object_source->display_name); -else - printf(__('Scoped Roles can grant users these same WordPress capabilities on a per-%1$s basis. Useful in fencing off sections your site.', 'scoper'), $tx->display_name, $tx->object_source->display_name); -echo '
    • '; - -echo '
    • '; -printf(__('Users with a %1$s Role assignment may have capabilities beyond their General Role(s) for %2$s in the specified %1$s.', 'scoper'), $tx->display_name, $tx->object_source->display_name_plural); -echo '
    • '; - -if ( ! empty($tx->requires_term) ) { - echo '
    • '; - printf(__('If a role is restricted for some %s, general (blog-wide) assignments of that role are ignored.', 'scoper'), $tx->display_name); - echo '
    • '; - - echo '
    • '; - printf(__('If a %1$s is in multiple %2$s, permission is granted if any %3$s has a qualifying role assignment or permits a qualifying General Role.', 'scoper'), $tx->object_source->display_name, $tx->display_name_plural, $tx->display_name); - echo '
    • '; -} - -if ( ('category' == $taxonomy) && ( ! scoper_get_otype_option('use_term_roles', 'post', 'page') ) ) - ScoperAdminUI::common_ui_msg( 'pagecat_plug' ); - -if ( empty($tx->object_source->no_object_roles) ) { - echo '
    • '; - printf(__('If a role is restricted for some requested %1$s, %2$s-assignment and General-assignment of that role are ignored.', 'scoper'), $tx->object_source->display_name, $tx->display_name); - echo '
    • '; -} - -echo '
    • '; -_e('Administrators are exempted from Role Restrictions.', 'scoper'); -echo '
    '; - -echo('' . __('top', 'scoper') . ''); -?> - - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/subscribe2_helper_rs.php b/blog/wp-content/plugins/role-scoper/admin/subscribe2_helper_rs.php deleted file mode 100644 index b5bb257..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/subscribe2_helper_rs.php +++ /dev/null @@ -1,170 +0,0 @@ -usermeta WHERE $wpdb->usermeta.meta_key='s2_autosub' AND $wpdb->usermeta.meta_value='yes'"); -*/ - -function scoper_watch_for_subscribe2_autosub($cat_id) { - add_filter( 'query', 'scoper_limit_subscribe2_autosub', 99 ); - - global $subscribe2_category_rs; - $subscribe2_category_rs = $cat_id; -} - -function scoper_limit_subscribe2_autosub( $query ) { - global $wpdb; - - if ( "SELECT DISTINCT user_id FROM $wpdb->usermeta WHERE $wpdb->usermeta.meta_key='s2_autosub' AND $wpdb->usermeta.meta_value='yes'" == $query ) { - global $scoper, $subscribe2_category_rs; - - //rs_errlog("subscribe2 cat creation: $subscribe2_category_rs"); - - $post_roles = $scoper->role_defs->qualify_roles( 'read', SCOPER_ROLE_TYPE, 'post' ); - - // WP roles containing the 'activate plugins' capability are always honored regardless of object or term restritions - $admin_roles_wp = array(); - global $wp_roles; - if ( isset($wp_roles->roles) ) { - $admin_cap_name = ( defined( 'SCOPER_CONTENT_ADMIN_CAP' ) ) ? constant( 'SCOPER_CONTENT_ADMIN_CAP' ) : 'activate_plugins'; - - foreach (array_keys($wp_roles->roles) as $wp_role_name) - if ( ! empty($wp_roles->roles[$wp_role_name]['capabilities']) ) - if ( array_intersect_key($wp_roles->roles[$wp_role_name]['capabilities'], array($admin_cap_name => 1) ) ) - $admin_roles_wp = array_merge($admin_roles_wp, array($wp_role_name => 1) ); - } - - if ( $admin_roles_wp ) - $admin_roles_wp = scoper_role_names_to_handles(array_keys($admin_roles_wp), 'wp', true); //arg: return as array keys - - $args = array( 'id' => $subscribe2_category_rs ); - $restrictions = $scoper->get_restrictions( TERM_SCOPE_RS, 'category', $args ); - - $restricted_roles = array(); - - if ( ! empty($restrictions['unrestrictions']) ) { - if ( $restrictions['unrestrictions'] = array_intersect_key( $restrictions['unrestrictions'], $post_roles ) ) { - foreach ( $restrictions['unrestrictions'] as $role_handle => $entries ) - if ( ! isset($entries[$subscribe2_category_rs]) || ( 'children' == $entries[$subscribe2_category_rs] ) ) - $restricted_roles [$role_handle] = true; - } - } - - if ( ! empty($restrictions['restrictions']) ) { - if ( $restrictions['restrictions'] = array_intersect_key( $restrictions['restrictions'], $post_roles ) ) { - foreach ( $restrictions['restrictions'] as $role_handle => $entries ) - if ( isset($entries[$subscribe2_category_rs]) && ( 'children' != $entries[$subscribe2_category_rs] ) ) - $restricted_roles [$role_handle] = true; - } - } - - $unrestricted_roles = array_diff_key( $post_roles, $restricted_roles ); - - // for our purposes, a role is only restricted if all its contained qualifying roles are also restricted - if ( $restricted_roles ) { - foreach ( array_keys($restricted_roles) as $role_handle ) { - if ( $contained_roles = $scoper->role_defs->get_contained_roles($role_handle, false, SCOPER_ROLE_TYPE) ) - if ( $contained_roles = array_intersect_key( $contained_roles, $unrestricted_roles ) ) - unset ( $restricted_roles[$role_handle] ); - } - - $unrestricted_roles = array_diff_key( $post_roles, $restricted_roles ); - } - - // account for WP blog roles - if ( 'rs' == SCOPER_ROLE_TYPE ) { - $unrestricted_roles_wp = array(); - $restricted_roles_wp = array(); - - // Todo: modify qualify_roles to make passing of object_types equivalent to passing exclude_object_types, regarding handling of otype-ambiguous caps - if ( $post_roles_wp = $scoper->role_defs->qualify_roles( 'read', 'wp', '', array( 'exclude_object_types' => array('page') ) ) ) { - foreach ( array_keys($post_roles_wp) as $wp_role ) - if ( $contains_rs_roles = $scoper->role_defs->get_contained_roles($wp_role, false, 'rs') ) { - if ( $contains_rs_roles = array_intersect_key($contains_rs_roles, $unrestricted_roles) ) - $unrestricted_roles_wp = array_merge($unrestricted_roles_wp, array($wp_role => true) ); - } - - $restricted_roles_wp = array_diff_key($post_roles_wp, $unrestricted_roles_wp); - } - - $unrestricted_roles_wp = array_merge($unrestricted_roles_wp, $admin_roles_wp); - $role_in_wp = implode( "', '", scoper_role_handles_to_names(array_keys($unrestricted_roles_wp)) ); - } else - $unrestricted_roles = array_merge($unrestricted_roles, $admin_roles_wp); - - /* - dump($post_roles); - dump($restricted_roles); - dump($restricted_roles_wp); - dump($unrestricted_roles); - dump($unrestricted_roles_wp); - */ - - $role_type = SCOPER_ROLE_TYPE; - - // account for blog roles, where allowed - if ( $unrestricted_roles ) { - $wp_role_clause = ( ! empty($role_in_wp) ) ? "OR ( role_type = 'wp' AND scope = 'blog' AND role_name IN ('$role_in_wp') )" : ''; - - $role_in = implode( "', '", scoper_role_handles_to_names(array_keys($unrestricted_roles)) ); - - $qry = "SELECT DISTINCT user_id FROM $wpdb->user2role2object_rs" - . " WHERE user_id > 0 AND (" - . " ( role_type = '$role_type' AND scope = 'blog' AND role_name IN ('$role_in') ) $wp_role_clause )"; - - $users = scoper_get_col( $qry ); - - $qry = "SELECT DISTINCT group_id FROM $wpdb->user2role2object_rs" - . " WHERE group_id > 0 AND (" - . " ( role_type = '$role_type' AND scope = 'blog' AND role_name IN ('$role_in') ) $wp_role_clause )"; - - if ( $groups = scoper_get_col( $qry ) ) { - foreach ( $groups as $group_id ) - if ( $group_members = ScoperAdminLib::get_group_members($group_id, $cols, true) ) - $users = array_merge( $users, $group_members ); - - $users = array_unique($users); - } - } else - $users = array(); - - // account for category roles - $role_in = implode( "', '", scoper_role_handles_to_names(array_keys($post_roles)) ); - - $qry = "SELECT DISTINCT user_id FROM $wpdb->user2role2object_rs" - . " WHERE user_id > 0 AND role_type = '$role_type' AND scope = 'term' AND role_name IN ('$role_in')" - . " AND assign_for IN ('entity', 'both')" - . " AND src_or_tx_name = 'category' AND obj_or_term_id = '$subscribe2_category_rs'"; - - $catrole_users = scoper_get_col( $qry ); - $users = array_merge( $users, $catrole_users ); - - $qry = "SELECT DISTINCT group_id FROM $wpdb->user2role2object_rs" - . " WHERE group_id > 0 AND role_type = '$role_type' AND scope = 'term' AND role_name IN ('$role_in')" - . " AND assign_for IN ('entity', 'both')" - . " AND src_or_tx_name = 'category' AND obj_or_term_id = '$subscribe2_category_rs'"; - - if ( $groups = scoper_get_col( $qry ) ) { - foreach ( $groups as $group_id ) - if ( $group_members = ScoperAdminLib::get_group_members($group_id, $cols, true) ) - $users = array_merge( $users, $group_members ); - - $users = array_unique($users); - } - - if ( $users ) - $query .= " AND user_id IN ('" . implode( "', '", $users) . "')"; - else - $query .= ' AND 1=2'; - - remove_filter( 'query', 'scoper_limit_subscribe2_autosub', 99 ); - } - return $query; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/update_rs.php b/blog/wp-content/plugins/role-scoper/admin/update_rs.php deleted file mode 100644 index 60f7e40..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/update_rs.php +++ /dev/null @@ -1,507 +0,0 @@ -query( "UPDATE $wpdb->options SET autoload = 'no' WHERE option_name LIKE 'scoper_%' AND option_name != 'scoper_version'" ); - - // stopped storing needless postmeta data for parent=0 in 1.1 - global $wpdb; - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_value = '0' AND meta_key = '_scoper_last_parent'" ); - } else break; - - // stopped using rs_get_page_children() in 1.0.8 - if ( version_compare( $prev_version, '1.0.8', '<') ) { - delete_option('scoper_page_children'); - } else break; - - if ( version_compare( $prev_version, '1.0.0-rc6', '<') && version_compare( $prev_version, '1.0.0-rc2', '>=') ) { - // In rc2 through rc4, we forced invalid img src attribute for image attachments on servers deemed non-apache - // note: false === stripos( php_sapi_name(), 'apache' ) was the criteria used by the offending code - // Need to update all affected post_content to convert attachment_id URL to file URL - if ( false === stripos( php_sapi_name(), 'apache' ) && ! get_site_option('scoper_fixed_img_urls') ) { - global $wpdb, $wp_rewrite; - - if ( ! empty($wp_rewrite) ) { - $blog_url = get_bloginfo('url'); - if ( $results = $wpdb->get_results( "SELECT ID, guid, post_parent FROM $wpdb->posts WHERE post_type = 'attachment' && post_date > '2008-12-7'" ) ) { - foreach ( $results as $row ) { - $data = array(); - $data['post_content'] = $wpdb->get_var( "SELECT post_content FROM $wpdb->posts WHERE ID = '$row->post_parent'" ); - - if ( $row->guid ) { - $attachment_link_raw = $blog_url . "/?attachment_id={$row->ID}"; - $data['post_content'] = str_replace('src="' . $attachment_link_raw, 'src="' . $row->guid, $data['post_content']); - - $attachment_link = get_attachment_link($row->ID); - $data['post_content'] = str_replace('src="' . $attachment_link, 'src="' . $row->guid, $data['post_content']); - } - - if ( ! empty($data['post_content']) ) { - $wpdb->update($wpdb->posts, $data, array("ID" => $row->post_parent) ); - } - } - } - - update_option('scoper_fixed_img_urls', true); - } - } - } else break; - - - // fixed failure to properly maintain scoper_page_ancestors options in 1.0.0-rc5 - if ( version_compare( $prev_version, '1.0.0-rc5', '<') ) { - delete_option('scoper_page_ancestors'); - } else break; - - - // changed default teaser_hide_private otype option to separate entries for posts, pages in v1.0.0-rc4 - if ( version_compare( $prev_version, '1.0.0-rc4', '<') ) { - $teaser_hide_private = get_option('scoper_teaser_hide_private'); - - if ( isset($teaser_hide_private['post']) && ! is_array($teaser_hide_private['post']) ) { - if ( $teaser_hide_private['post'] ) - // despite "for posts and pages" caption, previously this option caused pages to be hidden but posts still teased - update_option( 'scoper_teaser_hide_private', array( 'post:post' => 0, 'post:page' => 1 ) ); - else - update_option( 'scoper_teaser_hide_private', array( 'post:post' => 0, 'post:page' => 0 ) ); - } - } else break; - - // 0.9.15 eliminated ability to set recursive page parents - if ( version_compare( $prev_version, '0.9.15', '<') ) { - scoper_fix_page_parent_recursion(); - } else break; - - - // added WP role metagroups in v0.9.9 - if ( ( ! empty($prev_version) && version_compare( $prev_version, '0.9.9', '<') ) ) { - global $wp_roles; - - if ( ! empty($wp_roles) ) - scoper_sync_wproles(); - - } else break; - - } while ( 0 ); // end single-pass version check loop -} - - -function scoper_sync_wproles($user_ids = '', $role_name_arg = '', $blog_id_arg = '' ) { - global $wpdb, $wp_roles; - - if ( $user_ids && ( ! is_array($user_ids) ) ) - $user_ids = array($user_ids); - - if ( empty($wp_roles->role_objects) ) - return; - - $wp_rolenames = array_keys($wp_roles->role_objects); - - $uro_table = ( $blog_id_arg ) ? $wpdb->base_prefix . $blog_id_arg . '_' . 'user2role2object_rs' : $wpdb->user2role2object_rs; - - $groups_table = $wpdb->groups_rs; - $user2group_table = $wpdb->user2group_rs; - - // Delete any role entries for WP roles which were deleted or renamed while Role Scoper was deactivated - // (users will be re-synched to new role name) - $name_in = "'" . implode("', '", $wp_rolenames) . "'"; - $qry = "DELETE FROM $uro_table WHERE role_type = 'wp' AND scope = 'blog' AND role_name NOT IN ($name_in)"; - scoper_query($qry); - - // also sync WP Role metagroups - if ( ! empty($user_ids) ) - foreach ( $user_ids as $user_id ) - wpp_cache_delete( $user_id, 'group_membership_for_user' ); - - $metagroup_ids = array(); - $metagroup_names = array(); - $metagroup_descripts = array(); - foreach ( $wp_rolenames as $role_name ) { - $metagroup_id = "wp_role_" . trim(substr($role_name, 0, 40)); - - // if the name is too long and its truncated ID already taken, just exclude it from eligible metagroups - if ( in_array( $metagroup_id, $metagroup_ids ) ) - continue; - - $metagroup_ids []= $metagroup_id; - $metagroup_names [ "wp_role_{$role_name}" ] = sprintf( '[WP %s]', $role_name ); - $metagroup_descripts[ "wp_role_{$role_name}" ] = sprintf( 'All users with the WordPress %s blog role', $role_name ); - } - - // add a metagroup for anonymous users - $metagroup_ids []= "wp_anon"; - $metagroup_names [ "wp_anon" ] = '[Anonymous]'; - $metagroup_descripts[ "wp_anon" ] = 'Anonymous users (not logged in)'; - - // add a metagroup for pending revision e-mail notification recipients - $metagroup_ids []= "rv_pending_rev_notice_ed_nr_"; - $metagroup_names [ "rv_pending_rev_notice_ed_nr_" ] = '[Pending Revision Monitors]'; - $metagroup_descripts[ "rv_pending_rev_notice_ed_nr_" ] = 'Administrators / Publishers to notify (by default) of pending revisions'; - - // add a metagroup for pending revision e-mail notification recipients - $metagroup_ids []= "rv_scheduled_rev_notice_ed_nr_"; - $metagroup_names [ "rv_scheduled_rev_notice_ed_nr_" ] = '[Scheduled Revision Monitors]'; - $metagroup_descripts[ "rv_scheduled_rev_notice_ed_nr_" ] = 'Administrators / Publishers to notify when any scheduled revision is published'; - - $stored_metagroup_ids = array(); - $qry = "SELECT $wpdb->groups_meta_id_col, $wpdb->groups_id_col, $wpdb->groups_name_col FROM $groups_table WHERE NOT ISNULL($wpdb->groups_meta_id_col) AND ( $wpdb->groups_meta_id_col != '' )"; // LIKE 'wp_%'"; - if ( $results = scoper_get_results($qry) ) { - //rs_errlog("metagroup results: " . serialize($stored_metagroup_ids)'); - - $delete_metagroup_ids = array(); - $update_metagroup_ids = array(); - - foreach ( $results as $row ) { - if ( ! in_array( $row->{$wpdb->groups_meta_id_col}, $metagroup_ids ) ) - $delete_metagroup_ids []= $row->{$wpdb->groups_id_col}; - else { - $stored_metagroup_ids []= $row->{$wpdb->groups_meta_id_col}; - - if ( $row->{$wpdb->groups_name_col} != $metagroup_names[$row->{$wpdb->groups_meta_id_col}] ) - $update_metagroup_ids[] = $row->{$wpdb->groups_meta_id_col}; - } - } - - if ( $delete_metagroup_ids ) { - $id_in = "'" . implode("', '", $delete_metagroup_ids) . "'"; - scoper_query( "DELETE FROM $groups_table WHERE $wpdb->groups_id_col IN ($id_in)" ); - } - - if ( $update_metagroup_ids ) { - foreach ( $update_metagroup_ids as $metagroup_id ) { - if ( $metagroup_id ) - scoper_query( "UPDATE $groups_table SET $wpdb->groups_name_col = '$metagroup_names[$metagroup_id]', $wpdb->groups_descript_col = '$metagroup_descripts[$metagroup_id]' WHERE $wpdb->groups_meta_id_col = '$metagroup_id'" ); - } - } - } - - - if ( $insert_metagroup_ids = array_diff( $metagroup_ids, $stored_metagroup_ids ) ) { - //rs_errlog("inserting metagroup ids: " . serialize($insert_metagroup_ids)'); - - foreach ( $insert_metagroup_ids as $metagroup_id ) { - scoper_query( "INSERT INTO $groups_table ( $wpdb->groups_meta_id_col, $wpdb->groups_name_col, $wpdb->groups_descript_col ) VALUES ( '$metagroup_id', '$metagroup_names[$metagroup_id]', '$metagroup_descripts[$metagroup_id]' )" ); - //rs_errlog( "INSERT INTO $groups_table ( $wpdb->groups_meta_id_col, $wpdb->groups_name_col, $wpdb->groups_descript_col ) VALUES ( '$metagroup_id', '$metagroup_names[$metagroup_id]', '$metagroup_descripts[$metagroup_id]' )" ); - } - } - - if ( ! empty($delete_metagroup_ids) || ! empty($update_metagroup_ids) ) { - wpp_cache_flush(); // role deletion / rename might affect other cached data or settings, so flush the whole cache - - } elseif ( ! empty($insert_group_ids) ) { - wpp_cache_flush_group( 'all_usergroups' ); - wpp_cache_flush_group( 'usergroups_for_groups' ); - wpp_cache_flush_group( 'usergroups_for_user' ); - wpp_cache_flush_group( 'usergroups_for_ug' ); - } - - // Now step through every WP usermeta record, - // synchronizing the user's user2role2object_rs blog role entries with their WP role and custom caps - - // get each user's WP roles and caps - $user_clause = ( $user_ids ) ? 'AND user_id IN (' . implode(', ', $user_ids) . ')' : ''; - - $qry = "SELECT user_id, meta_value FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' $user_clause"; - if ( ! $usermeta = scoper_get_results($qry) ) - return; - - //rs_errlog("got " . count($usermeta) . " usermeta records"); - - $wp_rolecaps = array(); - foreach ( $wp_roles->role_objects as $role_name => $role ) - $wp_rolecaps[$role_name] = $role->capabilities; - - //rs_errlog(serialize($wp_rolecaps)); - - $strip_vals = array('', 0, false); - - $stored_assignments = array( 'wp' => array(), 'wp_cap' => array() ); - foreach ( array_keys($stored_assignments) as $role_type ) { - $results = scoper_get_results("SELECT user_id, role_name, assignment_id FROM $uro_table WHERE role_type = '$role_type' AND user_id > 0 $user_clause"); - foreach ( $results as $key => $row ) { - $stored_assignments[$role_type][$row->user_id][$row->assignment_id] = $row->role_name; - unset( $results[$key] ); - } - } - - foreach ( array_keys($usermeta) as $key ) { - $user_id = $usermeta[$key]->user_id; - $user_caps = maybe_unserialize($usermeta[$key]->meta_value); - if ( empty($user_caps) || ! is_array($user_caps) ) - continue; - - //rs_errlog("user caps: " . serialize($user_caps)); - - $user_roles = array(); - - // just in case, strip out any entries with false value - $user_caps = array_diff($user_caps, $strip_vals); - - $user_roles = array( 'wp' => array(), 'wp_cap' => array() ); - - //Filter out caps that are not role names - $user_roles['wp'] = array_intersect(array_keys($user_caps), $wp_rolenames); - - - // Store any custom-assigned caps as single-cap roles - // This will be invisible and only used to support the users query filter - // With current implementation, the custom cap will only be honored when - // users_who_can is called with a single capreq - $user_roles['wp_cap'] = array_diff( array_keys($user_caps), $user_roles['wp'] ); - - - // which roles are already stored in user2role2object_rs table? - $stored_roles = array(); - $delete_roles = array(); - foreach ( array_keys($user_roles) as $role_type ) { - //$results = scoper_get_results("SELECT role_name, assignment_id FROM $uro_table WHERE role_type = '$role_type' AND user_id = '$user_id'"); - //if ( $results ) { - if ( isset( $stored_assignments[$role_type][$user_id] ) ) { - //rs_errlog("results: " . serialize($results)); - foreach ( $stored_assignments[$role_type][$user_id] as $assignment_id => $role_name ) { - // Log stored roles, and delete any roles which user no longer has (possibly because the WP role definition was deleted). - // Only Role Scoper's mirroring of WP blog roles is involved here unless Role Scoper was configured and used with a Role Type of "WP". - // This also covers any WP role changes made while Role Scoper was deactivated. - if ( in_array( $role_name, $user_roles[$role_type]) ) - $stored_roles[$role_type] []= $role_name; - else - $delete_roles []= $assignment_id; - } - } else - $stored_roles[$role_type] = array(); - } - - if ( $delete_roles ) { - $id_in = implode(', ', $delete_roles); - scoper_query("DELETE FROM $uro_table WHERE assignment_id IN ($id_in)"); - } - - //rs_errlog("user roles " . serialize($user_roles) '); - //rs_errlog("stored roles " . serialize($stored_roles)'); - - // add any missing roles - foreach ( array_keys($user_roles) as $role_type ) { - if ( $stored_roles[$role_type] ) - $user_roles[$role_type] = array_diff($user_roles[$role_type], $stored_roles[$role_type]); - - if ( $user_roles[$role_type] ) - foreach ( $user_roles[$role_type] as $role_name ) { - //rs_errlog("INSERT INTO $uro_table (user_id, role_name, role_type, scope) VALUES ('$user_id', '$role_name', '$role_type', 'blog')"); - scoper_query("INSERT INTO $uro_table (user_id, role_name, role_type, scope) VALUES ('$user_id', '$role_name', '$role_type', 'blog')"); - } - } - - } // end foreach WP usermeta - - - // Delete any role assignments for users which no longer exist - delete_roles_orphaned_from_user(); - - // Delete any role assignments for WP groups which no longer exist - delete_roles_orphaned_from_group(); - - // Delete any role assignments for posts/pages which no longer exist - delete_roles_orphaned_from_item( OBJECT_SCOPE_RS, 'post' ); - //delete_restrictions_orphaned_from_item( OBJECT_SCOPE_RS, 'post' ); // hold off on this until delete_roles_orphaned_from_item() call has a long, clear track record - - // Delete any role assignments for categories which no longer exist - delete_roles_orphaned_from_item( TERM_SCOPE_RS, 'category' ); - //delete_restrictions_orphaned_from_item( TERM_SCOPE_RS, 'category' ); - - //rs_errlog("finished syncroles "'); - -} // end scoper_sync_wproles function - - -function delete_roles_orphaned_from_user() { - global $wpdb; - - // Delete any role entries for WP metagroups (or other groups) which no longer exists - if ( $users_table_valid = scoper_get_var( "SELECT ID FROM $wpdb->users LIMIT 1" ) ) { - $qry = "DELETE FROM $wpdb->user2role2object_rs WHERE user_id >= '1' AND user_id NOT IN ( SELECT ID FROM $wpdb->users )"; - scoper_query($qry); - } -} - -function delete_roles_orphaned_from_group() { - global $wpdb; - - // Delete any role entries for WP metagroups (or other groups) which no longer exists - if ( ! empty($wpdb->groups_id_col) && ! empty($wpdb->groups_rs) ) { - if ( $groups_table_valid = scoper_get_var( "SELECT $wpdb->groups_id_col FROM $wpdb->groups_rs LIMIT 1" ) ) { - $qry = "DELETE FROM $wpdb->user2role2object_rs WHERE group_id >= '1' AND group_id NOT IN ( SELECT $wpdb->groups_id_col FROM $wpdb->groups_rs )"; - //rs_errlog( $qry ); - scoper_query($qry); - } - } -} - -// delete roles for any terms/objects which no longer exist -function delete_roles_orphaned_from_item( $scope, $src_or_tx_name ) { - global $scoper, $wpdb; - - if ( 'term' == $scope ) { - if ( 'category' == $src_or_tx_name ) { // this is called early by sync_roles - $item_table = $wpdb->term_taxonomy; - $col_item_id = 'term_id'; - } elseif ( ! empty($scoper) ) { - $qv = $scoper->taxonomies->get_terms_query_vars($src_or_tx_name, true); // arg: terms only - $item_table = $qv->term->table; - $col_item_id = $qv->term->col_id; - } - } else { - if ( 'post' == $src_or_tx_name ) { // this is called early by sync_roles - $col_item_id = 'ID'; - $item_table = $wpdb->posts; - } elseif( ! empty($scoper) ) { - $col_item_id = $scoper->data_sources->member_property($src_or_tx_name, 'cols', 'id'); - $item_table = $scoper->data_sources->member_property($src_or_tx_name, 'table'); - } - } - - if ( $is_valid_items = scoper_get_var( "SELECT $col_item_id FROM $item_table LIMIT 1" ) ) { - $where = "AND scope = '$scope' AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id NOT IN ( SELECT $col_item_id FROM $item_table ) AND obj_or_term_id >= 1 "; - if ( $items_to_delete = scoper_get_var( "SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE 1=1 $where LIMIT 1" ) ) { - $qry = "DELETE FROM $wpdb->user2role2object_rs WHERE 1=1 $where"; - scoper_query( $qry ); - wpp_cache_flush(); - } - } -} - -/* -// delete restrictions for any terms/objects which no longer exist -function delete_restrictions_orphaned_from_item( $scope, $src_or_tx_name ) { - global $wpdb; - - if ( 'term' == $scope ) { - if ( 'category' == $src_or_tx_name ) { // this is called early by sync_roles - $item_table = $wpdb->term_taxonomy; - $col_item_id = 'term_id'; - } elseif ( ! empty($scoper) ) { - $qv = $scoper->taxonomies->get_terms_query_vars($src_or_tx_name, true); // arg: terms only - $item_table = $qv->term->table; - $col_item_id = $qv->term->col_id; - } - } else { - if ( 'post' == $src_or_tx_name ) { // this is called early by sync_roles - $col_item_id = 'ID'; - $item_table = $wpdb->posts; - } elseif( ! empty($scoper) ) { - $col_item_id = $scoper->data_sources->member_property($src_or_tx_name, 'cols', 'id'); - $item_table = $scoper->data_sources->member_property($src_or_tx_name, 'table'); - } - } - - if ( $is_valid_items = scoper_get_var( "SELECT $col_item_id FROM $item_table LIMIT 1" ) ) { - $where = "AND topic = '$scope' AND src_or_tx_name = '$src_or_tx_name' AND obj_or_term_id NOT IN ( SELECT $col_item_id FROM $item_table ) AND obj_or_term_id >= 1"; - if ( $items_to_delete = scoper_get_var( "SELECT requirement_id FROM $wpdb->role_scope_rs WHERE 1=1 $where LIMIT 1" ) ) { - $qry = "DELETE FROM $wpdb->role_scope_rs WHERE 1=1 $where"; - scoper_query( $qry ); - wpp_cache_flush(); - } - } -} -*/ - - -// legacy function called when upgrading from versions older than 0.9.15 -function scoper_fix_page_parent_recursion() { - global $wpdb; - $arr_parent = array(); - $arr_children = array(); - - if ( $results = scoper_get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'") ) { - foreach ( $results as $row ) { - $arr_parent[$row->ID] = $row->post_parent; - - if ( ! isset($arr_children[$row->post_parent]) ) - $arr_children[$row->post_parent] = array(); - - $arr_children[$row->post_parent] []= $row->ID; - } - - // if a page's parent is also one of its children, set parent to Main - foreach ( $arr_parent as $page_id => $parent_id ) - if ( isset($arr_children[$page_id]) && in_array($parent_id, $arr_children[$page_id]) ) - scoper_query("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = '$page_id'"); - } -} - - -// On first-time install, prevent WP/RS role mismatch by disabling RS rolecaps that are missing from corresponding default WP roles -function scoper_set_default_rs_roledefs() { - global $wp_roles, $scoper; - - $sitewide = IS_MU_RS; - - if ( scoper_get_option( 'disabled_role_caps', $sitewide ) || scoper_get_option( 'default_disabled_role_caps', $sitewide ) ) - return; - - $default_role_caps = scoper_core_role_caps(); - - $wp_role_sync = array( - 'rs_post_contributor' => 'contributor', - 'rs_post_revisor' => 'revisor', - 'rs_post_author' => 'author', - 'rs_post_editor' => 'editor', - 'rs_page_revisor' => 'revisor', - 'rs_page_editor' => 'editor' - ); - - $disable_caps = array(); - - foreach ( $wp_role_sync as $rs_role_handle => $wp_role_name ) { - if ( isset( $wp_roles->role_objects[ $wp_role_name ] ) ) - if ( $wp_missing_caps = array_diff_key( $default_role_caps[$rs_role_handle], $wp_roles->role_objects[$wp_role_name]->capabilities ) ) - $disable_caps[$rs_role_handle] = $wp_missing_caps; - } - - if ( $disable_caps ) { - scoper_update_option( 'disabled_role_caps', $disable_caps, $sitewide); - - if ( $sitewide ) - scoper_update_option( 'default_disabled_role_caps', $disable_caps, $sitewide); - } -} - - -function scoper_check_revision_settings() { - static $been_here; - - if ( defined( 'RVY_VERSION' ) || ! empty($been_here) ) - return; - - $been_here = true; - - // Give a heads-up and download link if pending Revisions were active in RS <= 1.0.8, but Revisionary is not installed - if ( scoper_get_option( 'pending_revisions' ) ) { - $err_msg = sprintf(__('Pending Revisions were enabled in your previous Role Scoper version. To retain that feature, you need to install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin.', 'revisionary'), "", '', "", ''); - - $func_body .= '$msg = str_replace( "__rvy-info__", awp_plugin_info_url("revisionary"), "' . $err_msg . '");'; - $func_body .= "echo '" - . '

    ' - . "'" - . ' . $msg . ' - . "'

    ';"; - - if ( is_admin() ) - add_action('admin_notices', create_function('', $func_body) ); - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/admin/user_lib_rs.php b/blog/wp-content/plugins/role-scoper/admin/user_lib_rs.php deleted file mode 100644 index 3894fd4..0000000 --- a/blog/wp-content/plugins/role-scoper/admin/user_lib_rs.php +++ /dev/null @@ -1,138 +0,0 @@ -ID ); - - foreach ( array_keys($roles) as $role_name ) - if ( isset($role_levels[$role_name]) && ( $role_levels[$role_name] > $current_user_level ) ) - unset( $roles[$role_name] ); - - return $roles; - } - - - function has_edit_user_cap($wp_blogcaps, $orig_reqd_caps, $args) { - if ( isset( $wp_blogcaps['edit_users'] ) ) { - // prevent anyone from editing a user whose level is higher than their own - $levels = ScoperUserEdit::get_user_level( array( $args[1], $args[2] ) ); - - // finally, compare would-be editor's level with target user's - if ( $levels[ $args[2] ] > $levels[ $args[1] ] ) - unset( $wp_blogcaps['edit_users'] ); - } - - return $wp_blogcaps; - } - - - function get_user_level( $user_ids ) { - static $user_levels; - - $return_array = is_array( $user_ids ); // if an array was passed in, return results as an array - - if ( ! is_array($user_ids) ) { - if ( IS_MU_RS && function_exists('is_site_admin') && is_site_admin() ) // mu site administrator may not be a user for the current blog - return 10; - - $orig_user_id = $user_ids; - $user_ids = (array) $user_ids; - } - - if ( ! isset($user_levels) ) - $user_levels = array(); - - if ( array_diff( $user_ids, array_keys($user_levels) ) ) { - // one or more of the users were not already logged - - $role_levels = ScoperUserEdit::get_role_levels(); // local buffer for performance - - // If the listed user ids were logged following a search operation, save extra DB queries by getting the levels of all those users now - global $wp_user_search; - - if ( ! empty( $wp_user_search->results ) ) { - $query_users = $wp_user_search->results; - $query_users = array_unique( array_merge( $query_users, $user_ids ) ); - } else - $query_users = $user_ids; - - // get the WP roles for user - global $wpdb; - $results = scoper_get_results( "SELECT user_id, role_name FROM $wpdb->user2role2object_rs WHERE scope = 'blog' AND role_type = 'wp' AND user_id IN ('" . implode( "','", $query_users ) . "')" ); - - //echo("SELECT user_id, role_name FROM $wpdb->user2role2object_rs WHERE scope = 'blog' AND role_type = 'wp' AND user_id IN ('" . implode( "','", $query_users ) . "')"); - - // credit each user for the highest role level they have - foreach ( $results as $row ) { - if ( ! isset( $role_levels[ $row->role_name ] ) ) - continue; - - if ( ! isset( $user_levels[$row->user_id] ) || ( $role_levels[ $row->role_name ] > $user_levels[$row->user_id] ) ) - $user_levels[$row->user_id] = $role_levels[ $row->role_name ]; - } - - // note any "No Role" users - if ( $no_role_users = array_diff( $query_users, array_keys($user_levels) ) ) - $user_levels = $user_levels + array_fill_keys( $no_role_users, 0 ); - } - - - if ( $return_array ) - $return = array_intersect_key( $user_levels, array_fill_keys( $user_ids, true ) ); - else - $return = ( isset($user_levels[$orig_user_id]) ) ? $user_levels[$orig_user_id] : 0; - - return $return; - } - - - // NOTE: user/role levels are used only for optional limiting of user edit - not for content filtering - function get_role_levels() { - static $role_levels; - - if ( isset($role_levels) ) - return $role_levels; - - $role_levels = array(); - - global $wp_roles; - foreach ( $wp_roles->roles as $role_name => $role ) { - $level = 0; - for ( $i=0; $i<=10; $i++ ) - if ( ! empty( $role['capabilities']["level_$i"] ) ) - $level = $i; - - $role_levels[$role_name] = $level; - } - - return $role_levels; - } - -} // end class - - -function awp_get_user_by_name( $name, $display_or_username = true ) { - global $wpdb; - - if ( ! $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_login = '$name'") ) - if ( $display_or_username ) - $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE display_name = '$name'"); - - return $user; -} - -function awp_get_user_by_id( $id ) { - global $wpdb; - - if ( $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$id'") ) - - return $user; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/analyst_rs.php b/blog/wp-content/plugins/role-scoper/analyst_rs.php deleted file mode 100644 index 59165e3..0000000 --- a/blog/wp-content/plugins/role-scoper/analyst_rs.php +++ /dev/null @@ -1,219 +0,0 @@ - $guid ); - return ScoperAnalyst::identify_protected_posts( $attachment_id, true, $cols, $args ); - } - - - function identify_protected_posts( $attachment_id = 0, $attachments = false, $cols = '', $args = '' ) { - $defaults = array( 'use_object_restrictions' => true, 'use_term_restrictions' => true, 'use_private_status' => true, 'guid' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb, $scoper; - - if ( ! isset($scoper) || is_null($scoper) ) { - scoper_get_init_options(); - scoper_init(); - } - - if ( empty($scoper->taxonomies) ) - $scoper->load_config(); - - $role_type = SCOPER_ROLE_TYPE; - - $restricted_roles = array(); - $unrestricted_roles = array(); // TODO: also protect uploads based on restriction of other taxonomies - - $restricted_terms = array(); - $restricted_objects = array(); - - $term_restriction_clause = ''; - $object_restriction_clause = ''; - $limit_clause = ''; - $unattached_clause = ''; - - if ( $use_private_status ) - $role_clause = ( 'rs' == SCOPER_ROLE_TYPE ) ? "AND rs.role_name IN ('post_reader', 'page_reader')" : ''; // if also checking for private status, don't need to check for restriction of private_reader roles - else - $role_clause = ( 'rs' == SCOPER_ROLE_TYPE ) ? "AND rs.role_name IN ('post_reader', 'page_reader', 'private_post_reader', 'private_page_reader')" : ''; - - - if ( $use_term_restrictions ) { - $term_restriction_query = "SELECT rs.obj_or_term_id AS term_id, rs.role_name, rs.max_scope FROM $wpdb->role_scope_rs AS rs " - . "INNER JOIN $wpdb->term_taxonomy AS tt ON tt.taxonomy = rs.src_or_tx_name AND tt.taxonomy = 'category' AND tt.term_taxonomy_id = rs.obj_or_term_id " - . "WHERE rs.role_type = '$role_type' AND rs.require_for IN ('entity', 'both') AND rs.topic = 'term' $role_clause"; - - $term_default_restriction_query = "SELECT rs.role_name FROM $wpdb->role_scope_rs AS rs " - . "WHERE rs.role_type = '$role_type' AND rs.require_for IN ('entity', 'both') AND rs.topic = 'term' AND rs.max_scope = 'term' AND rs.src_or_tx_name = 'category' AND rs.obj_or_term_id = '0' $role_clause"; - - $all_terms = array(); - - $all_terms['category'] = $scoper->get_terms( 'category', false, COL_ID_RS ); - - if ( $results = scoper_get_results( $term_restriction_query ) ) { - foreach ( $results as $row ) { - if ( 'blog' == $row->max_scope ) - $unrestricted_roles['category'][$row->role_name] []= $row->term_id; - else - $restricted_roles['category'][$row->role_name] []= $row->term_id; - } - } - - - // if there a role is default-restricted, mark all terms as restricted (may be unrestricted later) - if ( $results = scoper_get_col( $term_default_restriction_query ) ) { - foreach ( $results as $role_name ) { - if ( isset( $unrestricted_roles['category'][$role_name] ) ) - $default_restricted = array_diff( $all_terms['category'], $unrestricted_roles['category'][$role_name] ); - else - $default_restricted = $all_terms['category']; - - if ( isset( $restricted_roles['category'][$role_name] ) ) - $restricted_roles['category'][$role_name] = array_unique( array_merge( $restricted_roles['category'][$role_name], $default_restricted ) ); - else - $restricted_roles['category'][$role_name] = $default_restricted; - } - } - - $restricted_terms['category'] = isset($restricted_roles['category']) ? agp_array_flatten( $restricted_roles['category'] ) : array(); - - if ( $restricted_terms['category'] ) { - $term_restriction_clause = "OR post_parent IN ( SELECT $wpdb->posts.ID FROM $wpdb->posts " - . "INNER JOIN $wpdb->term_relationships AS tr ON tr.object_id = $wpdb->posts.ID " - . "WHERE tr.term_taxonomy_id IN ('" . implode( "','", $restricted_terms['category'] ) . "') )"; - } - } - - - if ( $attachment_id ) { - if ( is_array($attachment_id) ) - $id_clause = "AND ID IN '" . implode( "','", $attachment_id ) . "'"; - else { - $id_clause = "AND ID = '$attachment_id'"; - $limit_clause = 'LIMIT 1'; - } - } elseif ( $guid ) - $id_clause = "AND guid = '$file_path'"; - else - $id_clause = ''; - - - if ( $attachments ) { - // to reduce pool of objects, we only care about those that have an attachment - $attachment_query = "SELECT $wpdb->posts.ID FROM $wpdb->posts WHERE $wpdb->posts.ID IN ( SELECT post_parent FROM $wpdb->posts WHERE post_type = 'attachment' $id_clause ) "; - } - - - if ( $use_object_restrictions ) { - $object_restriction_query = "SELECT rs.obj_or_term_id AS obj_id, rs.role_name, rs.max_scope FROM $wpdb->role_scope_rs AS rs " - . "WHERE rs.role_type = '$role_type' AND rs.require_for IN ('entity', 'both') AND rs.topic = 'object' AND rs.src_or_tx_name = 'post' $role_clause AND rs.obj_or_term_id IN ( $attachment_query )"; - - $object_default_restriction_query = "SELECT rs.role_name FROM $wpdb->role_scope_rs AS rs " - . "WHERE rs.require_for IN ('entity', 'both') AND rs.topic = 'object' AND rs.max_scope = 'object' AND rs.src_or_tx_name = 'post' AND rs.obj_or_term_id = '0' $role_clause"; - - $all_objects = array(); - $all_objects['post'] = scoper_get_col( $attachment_query ); - - $restricted_roles = array(); - $unrestricted_roles = array(); - - if ( $results = scoper_get_results( $object_restriction_query ) ) { - foreach ( $results as $row ) { - if ( 'blog' == $row->max_scope ) - $unrestricted_roles['post'][$row->role_name] []= $row->obj_id; - else - $restricted_roles['post'][$row->role_name] []= $row->obj_id; - } - } - - - // if there a role is default-restricted, mark all terms as restricted (may be unrestricted later) - if ( $results = scoper_get_col( $object_default_restriction_query ) ) { - foreach ( $results as $role_name ) { - if ( isset( $unrestricted_roles['category'][$role_name] ) ) - $default_restricted = array_diff( $all_terms['post'], $unrestricted_roles['post'][$role_name] ); - else - $default_restricted = $all_objects['post']; - - if ( isset( $restricted_roles['post'][$role_name] ) ) - $restricted_roles['post'][$role_name] = array_unique( array_merge( $restricted_roles['post'][$role_name], $default_restricted ) ); - else - $restricted_roles['post'][$role_name] = $default_restricted; - } - } - - if ( ! empty( $restricted_objects ) ) { - $restricted_objects['post'] = agp_array_flatten( $restricted_roles['post'] ); - - if ( $restricted_objects['post'] ) - $object_restriction_clause = "OR post_parent IN ( SELECT ID FROM $wpdb->posts WHERE ID IN ('" . implode( "','", $restricted_objects['post'] ) . "') )"; - } - } - - - if ( $use_private_status ) { - $status_query = "AND post_parent IN ( SELECT $wpdb->posts.ID FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'private' )"; - } - - if ( $attachments ) { - $attachment_type_clause = "post_type = 'attachment' AND"; - - $unattached_clause = ( defined('SCOPER_BLOCK_UNATTACHED_UPLOADS') ) ? " OR post_parent < 1" : ''; - } - - - $single_col = false; - - if ( COLS_ALL_RS == $cols ) - $query_cols = '*'; - elseif ( COL_ID_RS == $cols ) { - $query_cols = 'ID'; - $single_col = true; - } elseif ( COLS_ID_DISPLAYNAME_RS == $cols ) { - if ( $attachment ) - $query_cols = 'ID, post_title, guid'; - else - $query_cols = 'ID, post_title'; - } else { - if ( $attachment ) - $query_cols = 'ID, guid'; - else { - $query_cols = 'ID'; - $single_col = true; - } - } - - $query = "SELECT $query_cols FROM $wpdb->posts WHERE $attachment_type_clause ( 1=1 $status_query $term_restriction_clause $object_restriction_clause $unattached_clause ) $id_clause ORDER BY ID DESC $limit_clause"; - - - if ( $id_clause && ! is_array( $attachment_id ) ) { - if ( $single_col ) - $results = scoper_get_var( $query ); - else - $results = scoper_get_row( $query ); - } else { - if ( $single_col ) - $results = scoper_get_col( $query ); - else - $results = scoper_get_results( $query ); - } - - return $results; - } - -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/attachment-filters_rs.php b/blog/wp-content/plugins/role-scoper/attachment-filters_rs.php deleted file mode 100644 index 4203ff3..0000000 --- a/blog/wp-content/plugins/role-scoper/attachment-filters_rs.php +++ /dev/null @@ -1,218 +0,0 @@ -posts WHERE post_type = 'attachment' AND guid = '$orig_file_url' AND post_parent > 0 LIMIT 1" ) ) - return; - } - - if ( ! $key = get_post_meta( $attachment_id, '_rs_file_key' ) ) { - // The key was lost from DB, so regenerate it (and files / uploads .htaccess) - require_once( 'rewrite-rules_rs.php' ); - ScoperRewrite::resync_file_rules(); - - // If the key is still not available, fail out to avoid recursion - if ( ! $key = get_post_meta( $attachment_id, '_rs_file_key' ) ) - exit(0); - } elseif ( ! empty($_GET['rs_file_key']) && ( $_GET['rs_file_key'] == $key ) ) { - // Apparantly, the .htaccess rules contain an entry for this file, but with invalid file key. URL with this valid key already passed through RewriteRules. - // Regenerate .htaccess, but don't risk recursion by redirecting again. - require_once( 'rewrite-rules_rs.php' ); - ScoperRewrite::resync_file_rules(); - - exit(0); - } - - if ( is_array($key) ) - $key = reset($key); - - if ( IS_MU_RS ) { - $basedir = parse_url( $uploads['basedir'] ); - $baseurl = parse_url( $uploads['baseurl'] ); - - global $base; - - $file_url = str_replace( ABSPATH, $baseurl['scheme'] . '://'. $baseurl['host'] . $base , $file_path ); - $file_url = str_replace( '\\', '/', $file_url ); - } - - $redirect = $file_url . "?rs_file_key=$key"; - - //rs_errlog( "redirect: $redirect" ); - - wp_redirect( $redirect ); - exit(0); -} - - -class AttachmentFilters_RS { - - function user_can_read_file( $file ) { - $return_attachment_id = 0; - $matched_public_post = array(); - return AttachmentFilters_RS::_user_can_read_file( $file, $return_attachment_id, $matched_public_post ); - } - - function _user_can_read_file( $file, &$return_attachment_id, &$matched_published_post, $uploads = '' ) { - if ( ! is_array( $uploads ) || empty($uploads['basedir']) ) { - require_once( 'uploads_rs.php' ); - $uploads = scoper_get_upload_info(); - } - - //rs_errlog('_user_can_read_file'); - - $file_path = $uploads['basedir'] . "/$file"; - - // don't filter the direct file URL request if filtering is disabled, or if the request is from wp-admin - if ( defined('DISABLE_QUERYFILTERS_RS') || is_content_administrator_rs() || ! scoper_get_option( 'file_filtering' ) - || ( ! empty($_SERVER['HTTP_REFERER']) && ( false !== strpos($_SERVER['HTTP_REFERER'], '/wp-admin' ) ) && ( false !== strpos($_SERVER['HTTP_REFERER'], get_option('siteurl') . '/wp-admin' ) ) ) ) { - // note: image links from wp-admin should now never get here due to http_referer RewriteRule, but leave above check just in case - inexpensive since we're checking for wp-admin before calling get_option - - //rs_errlog("skipping filtering for $file_path"); - return true; - } - - //rs_errlog("$file_path exists."); - - global $wpdb, $wp_query; - - $file_url = $uploads['baseurl'] . "/$file"; - - // Resized copies have -NNNxNNN suffix, but the base filename is stored as attachment. Strip the suffix out for db query. - $orig_file_url = preg_replace( "/-[0-9]{2,4}x[0-9]{2,4}./", '.', $file_url ); - - $qry = "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent > 0 AND guid = '$orig_file_url'"; - $results = scoper_get_results( $qry ); - $matched_published_post = array(); - $return_attachment_id = 0; - - if ( empty($results) ) { - global $scoper; - - $scoper->cap_interceptor->skip_any_object_check = true; - $scoper->cap_interceptor->skip_any_term_check = true; - $can_edit_others = current_user_can('edit_others_posts') || current_user_can('edit_others_pages'); - $scoper->cap_interceptor->skip_any_object_check = false; - $scoper->cap_interceptor->skip_any_term_check = false; - - //rs_errlog( "unattached upload, returning $can_edit_others" ); - - return $can_edit_others; - } else { - // set global flag (checked by flt_user_has_cap, which filters current_user_Can) - global $scoper_checking_attachment_access; - $scoper_checking_attachment_access = true; - - foreach ( $results as $attachment ) { - //rs_errlog( "found attachment: " . serialize($attachment) ); - if ( is_content_administrator_rs() ) - $return_attachment_id = $attachment->ID; - - if ( $attachment->post_parent ) { - if ( $parent_post = scoper_get_row( "SELECT post_type, post_status FROM $wpdb->posts WHERE ID = '$attachment->post_parent' LIMIT 1" ) ) { - $object_type = $parent_post->post_type; - $containing_post_status = $parent_post->post_status; - - // Only return content that is attached to published (potentially including private) posts/pages - // If some other statuses for published posts are introduced in later WP versions, - // the failure mode here will be to overly suppress attachments - if ( ( 'publish' == $containing_post_status ) || ( 'private' == $containing_post_status ) ) { - if ( current_user_can( "read_$object_type", $attachment->post_parent ) ) { - $return_attachment_id = $attachment->ID; - break; - } else { - global $current_user; - $matched_published_post[$object_type] = $attachment->post_name; - } - } - } - } - } - - // clear global flag - $scoper_checking_attachment_access = false; - } - - if ( $return_attachment_id ) - return true; - } - - - // handle access to uploaded file where request was a direct file URL, which was rewritten according to our .htaccess addition - function parse_query_for_direct_access ( &$query ) { - if ( empty($query->query_vars['attachment']) || ( false === strpos($_SERVER['QUERY_STRING'], 'rs_rewrite') ) ) - return; - - $file = $query->query_vars['attachment']; - - require_once( 'uploads_rs.php' ); - $uploads = scoper_get_upload_info(); - - $return_attachment_id = 0; - $matched_published_post = array(); - if ( AttachmentFilters_RS::_user_can_read_file( $file, $return_attachment_id, $matched_published_post, $uploads ) ) { - agp_return_file($file, $return_attachment_id); - return; - } - - // file access was not granted. Determine if teaser message should be triggered - if ( file_exists( $uploads['basedir'] . "/$file" ) ) { - - if ( $matched_published_post && scoper_get_otype_option('do_teaser', 'post') ) { - foreach ( array_keys($matched_published_post) as $object_type ) { - if ( $use_teaser_type = scoper_get_otype_option('use_teaser', 'post', $object_type) ) { - if ( $matched_published_post[$object_type] ) { - if ( ! defined('SCOPER_QUIET_FILE_404') ) { - // note: subsequent act_attachment_access will call impose_post_teaser() - $will_tease = true; // will_tease flag only used within this function - $wp_query->query_vars['attachment'] = $matched_published_post[$object_type]; - break; - } - } - } - } - } - - status_header(401); // Unauthorized - - if ( empty($will_tease) ) { - // User is not qualified to access the requested attachment, and no teaser will apply - - // Normally, allow the function to return for WordPress 404 handling - // But end script execution here if requested attachment is a media type (or if definition set) - // Linking pages won't want WP html returned in place of inaccessable image / video - if ( defined('SCOPER_QUIET_FILE_404') ) { - exit; - } - - // this may not be necessary - $wp_query->is_404 = true; - $wp_query->is_single = true; - $wp_query->is_singular = true; - $wp_query->query_vars['is_single'] = true; - } - - } - - } -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/attachment-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/attachment-interceptor_rs.php deleted file mode 100644 index 0f3d5cd..0000000 --- a/blog/wp-content/plugins/role-scoper/attachment-interceptor_rs.php +++ /dev/null @@ -1,42 +0,0 @@ -query_vars['attachment']) || ( false === strpos($_SERVER['QUERY_STRING'], 'rs_rewrite') ) ) { - //rs_errlog( 'not an attachment: ' . serialize($_SERVER) ); - return; - } - - require_once('attachment-filters_rs.php'); - AttachmentFilters_RS::parse_query_for_direct_access( $query ); - } - - // Filter attacment page content prior to display by attachment template. - // Note: teaser-subject direct file URL requests also land here - function act_attachment_access() { - if ( is_admin() || defined('DISABLE_QUERYFILTERS_RS') || is_content_administrator_rs() || ! scoper_get_option( 'file_filtering' ) ) - return; - - // if ( is_attachment() ) { as of WP 2.6, is_attachment() returns false for custom permalink attachment URL - if ( is_attachment_rs() ) { - //rs_errlog( 'IS an attachment:' ); - - require_once('attachment-template_rs.php'); - AttachmentTemplate_RS::attachment_access(); - } - } -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/attachment-template_rs.php b/blog/wp-content/plugins/role-scoper/attachment-template_rs.php deleted file mode 100644 index b05e464..0000000 --- a/blog/wp-content/plugins/role-scoper/attachment-template_rs.php +++ /dev/null @@ -1,93 +0,0 @@ -query_vars['attachment_id']) ) { - $post = scoper_get_row("SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID = '{$wp_query->query_vars['attachment_id']}'"); - - } elseif ( ! empty($wp_query->query_vars['attachment']) ) - $post = scoper_get_row("SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_name = '{$wp_query->query_vars['attachment']}'"); - } - - if ( ! empty($post) ) { - $object_type = scoper_get_var("SELECT post_type FROM $wpdb->posts WHERE ID = '$post->post_parent'"); - - // default to 'post' object type if retrieval failed for some reason - if ( empty($object_type) ) - $object_type = 'post'; - - if ( $post->post_parent ) { - if ( ! current_user_can( "read_$object_type", $post->post_parent ) ) { - if ( scoper_get_otype_option('do_teaser', 'post') ) { - if ( $use_teaser_type = scoper_get_otype_option('use_teaser', 'post', $object_type) ) - AttachmentTemplate_RS::impose_post_teaser($post, $object_type, $use_teaser_type); - else - unset( $post ); - } else - unset( $post ); // WordPress generates 404 if teaser is not enabled - } - } elseif ( defined('SCOPER_BLOCK_UNATTACHED_UPLOADS') && SCOPER_BLOCK_UNATTACHED_UPLOADS ) { - unset( $post ); - } - } - } - - function impose_post_teaser(&$object, $object_type, $use_teaser_type = 'fixed') { - global $current_user, $scoper, $wp_query; - - require_once('teaser_rs.php'); - - $src_name = 'post'; - - $teaser_replace = array(); - $teaser_prepend = array(); - $teaser_append = array(); - - $teaser_replace[$object_type]['post_content'] = ScoperTeaser::get_teaser_text( 'replace', 'content', $src_name, $object_type, $current_user ); - - $teaser_replace[$object_type]['post_excerpt'] = ScoperTeaser::get_teaser_text( 'replace', 'excerpt', $src_name, $object_type, $current_user ); - $teaser_prepend[$object_type]['post_excerpt'] = ScoperTeaser::get_teaser_text( 'prepend', 'excerpt', $src_name, $object_type, $current_user ); - $teaser_append[$object_type]['post_excerpt'] = ScoperTeaser::get_teaser_text( 'append', 'excerpt', $src_name, $object_type, $current_user ); - - $teaser_prepend[$object_type]['post_name'] = ScoperTeaser::get_teaser_text( 'prepend', 'name', $src_name, $object_type, $current_user ); - $teaser_append[$object_type]['post_name'] = ScoperTeaser::get_teaser_text( 'append', 'name', $src_name, $object_type, $current_user ); - - $force_excerpt = array(); - $force_excerpt[$object_type] = ( 'excerpt' == $use_teaser_type ); - - $args = array( 'col_excerpt' => 'post_excerpt', 'col_content' => 'post_content', 'col_id' => 'ID', - 'teaser_prepend' => $teaser_prepend, 'teaser_append' => $teaser_append, 'teaser_replace' => $teaser_replace, - 'force_excerpt' => $force_excerpt ); - - ScoperTeaser::apply_teaser( $object, $src_name, $object_type, $args ); - - $wp_query->is_404 = false; - $wp_query->is_attachment = true; - $wp_query->is_single = true; - $wp_query->is_singular = true; - $object->ancestors = array( $object->post_parent ); - - $wp_query->post_count = 1; - $wp_query->is_attachment = true; - $wp_query->posts[] = $object; - - if ( isset($wp_query->query_vars['error']) ) - unset( $wp_query->query_vars['error'] ); - - if ( isset($wp_query->query['error']) ) - $wp_query->query['error'] = ''; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/cap-interceptor-basic_rs.php b/blog/wp-content/plugins/role-scoper/cap-interceptor-basic_rs.php deleted file mode 100644 index 5c2dae8..0000000 --- a/blog/wp-content/plugins/role-scoper/cap-interceptor-basic_rs.php +++ /dev/null @@ -1,111 +0,0 @@ -has_cap (usually via WP current_user_can function) - // Pertains to logged user's capabilities blog-wide, or for a single item - // - // $wp_blogcaps = current user's blog-wide capabilities - // $reqd_caps = primitive capabilities being tested / requested - // $args = array with: - // $args[0] = original capability requirement passed to current_user_can (possibly a meta cap) - // $args[1] = user being tested - // $args[2] = object id (could be a postID, linkID, catID or something else) - // - // The intent here is to add to (or take away from) $wp_blogcaps based on scoper role assignments - // (only offer an opinion on scoper-defined caps, with others left in $allcaps array as blog-wide caps) - // - function flt_user_has_cap($wp_blogcaps, $orig_reqd_caps, $args) { - if ( empty($args[2]) ) - return $wp_blogcaps; - - global $scoper; - - // Disregard caps which are not defined in Role Scoper config - if ( ! $rs_reqd_caps = array_intersect( $orig_reqd_caps, $scoper->cap_defs->get_all_keys() ) ) - return $wp_blogcaps; - - $user_id = ( isset($args[1]) ) ? $args[1] : 0; - - global $current_user; - - if ($user_id && ($user_id != $current_user->ID) ) - $user = new WP_Scoped_User($user_id); - else - $user = $current_user; - - - $object_id = (int) $args[2]; - - // since WP user_has_cap filter does not provide an object type / data source arg, - // we determine data source and object type based on association to required cap(s) - $object_types = $scoper->cap_defs->object_types_from_caps($rs_reqd_caps); - - // If an object id was provided, all required caps must share a common data source (object_types array is indexed by src_name) - if ( count($object_types) > 1 || ! count($object_types) ) { - return array(); - } - - $src_name = key($object_types); - if ( ! $src = $scoper->data_sources->get($src_name) ) { - return array(); - } - - // If cap definition(s) did not specify object type (as with "read" cap), enlist help detecting it - reset($object_types); - if ( (count($object_types[$src_name]) == 1) && key($object_types[$src_name]) ) - $object_type = key($object_types[$src_name]); - else - $object_type = $scoper->data_sources->detect('type', $src, $object_id); - - // If caps pertain to more than one object type, filter will probably return empty set, but let it pass in case of strange and unanticipated (yet valid) usage - - - $id_in = " AND $src->table.{$src->cols->id} = '$object_id'"; - - $use_term_roles = $src->uses_taxonomies && scoper_get_otype_option( 'use_term_roles', $src_name, $object_type ); - - $use_object_roles = ( empty($src->no_object_roles) ) ? scoper_get_otype_option( 'use_object_roles', $src_name, $object_type ) : false; - - $this_args = array('object_type' => $object_type, 'user' => $user, 'use_term_roles' => $use_term_roles, 'use_object_roles' => $use_object_roles, 'skip_teaser' => true ); - - // As of RS 1.1, using subselects in where clause instead - //$join = $scoper->query_interceptor->flt_objects_join('', $src_name, $object_type, $this_args ); - - $where = $scoper->query_interceptor->objects_where_role_clauses($src_name, $rs_reqd_caps, $this_args ); - - if ( $where ) - $where = "AND ( $where )"; - - // As of RS 1.1, using subselects in where clause instead - //$query = "SELECT $src->table.{$src->cols->id} FROM $src->table $join WHERE 1=1 $where $id_in LIMIT 1"; - $query = "SELECT $src->table.{$src->cols->id} FROM $src->table WHERE 1=1 $where $id_in LIMIT 1"; - - $id_ok = scoper_get_var($query); - - $rs_reqd_caps = array_fill_keys( $rs_reqd_caps, true ); - - if ( ! $id_ok ) { - //d_echo("object_id $object_id not okay!" ); - //rs_errlog( "object_id $object_id not okay!" ); - - return array_diff_key( $wp_blogcaps, $rs_reqd_caps); // required caps we scrutinized are excluded from this array - } else { - if ( $restore_caps = array_diff($orig_reqd_caps, array_keys($rs_reqd_caps) ) ) - $rs_reqd_caps = $rs_reqd_caps + array_fill_keys($restore_caps, true); - - //rs_errlog( 'RETURNING:' ); - //rs_errlog( serialize(array_merge($wp_blogcaps, $rs_reqd_caps)) ); - - return array_merge($wp_blogcaps, $rs_reqd_caps); - } - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/cap-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/cap-interceptor_rs.php deleted file mode 100644 index 7f19e00..0000000 --- a/blog/wp-content/plugins/role-scoper/cap-interceptor_rs.php +++ /dev/null @@ -1,749 +0,0 @@ -has_cap (usually via WP current_user_can function) - // Pertains to logged user's capabilities blog-wide, or for a single item - // - // $wp_blogcaps = current user's blog-wide capabilities - // $reqd_caps = primitive capabilities being tested / requested - // $args = array with: - // $args[0] = original capability requirement passed to current_user_can (possibly a meta cap) - // $args[1] = user being tested - // $args[2] = object id (could be a postID, linkID, catID or something else) - // - // The intent here is to add to (or take away from) $wp_blogcaps based on scoper role assignments - // (only offer an opinion on scoper-defined caps, with others left in $allcaps array as blog-wide caps) - // - function flt_user_has_cap($wp_blogcaps, $orig_reqd_caps, $args) { - global $scoper; - - static $tested_object_ids; - static $hascap_object_ids; // $hascap_object_ids[src_name][object_type][capreqs key] = array of object ids for which user has the required caps - // capreqs key = md5(sorted array of required capnames) - - static $in_process; // prevent recursion - if ( ! empty($in_process) ) - return $wp_blogcaps; - - $in_process = true; - - if ( empty($hascap_object_ids) ) { - $hascap_object_ids = array(); - $tested_object_ids = array(); - } - - // work around bug in mw_EditPost method (requires publish_pages AND publish_posts cap) - if ( defined('XMLRPC_REQUEST') && ( 'publish_posts' == $orig_reqd_caps[0] ) ) { - global $xmlrpc_post_type_rs; - if ( 'page' == $xmlrpc_post_type_rs ) { - $in_process = false; - return array('publish_posts' => true); - } - } - - if ( defined('UNSCOPED_CAPS_RS') ) { - $unscoped_caps = explode( ',', UNSCOPED_CAPS_RS ); - - if ( ( 1 == count($orig_reqd_caps[0]) ) && in_array( $orig_reqd_caps[0], $unscoped_caps ) ) { - $in_process = false; - return $wp_blogcaps; - } - } - - //dump($orig_reqd_caps); - //dump($args); - - /* - rs_errlog(' '); - rs_errlog('flt_user_has_cap'); - rs_errlog(serialize($orig_reqd_caps)); - //rs_errlog(serialize($args)); - rs_errlog(' '); - */ - - - // permitting this filter to execute early in an attachment request resets the found_posts record, preventing display in the template - if ( is_attachment() && ! is_admin() && ! did_action('template_redirect') ) { - global $scoper_checking_attachment_access; - - if ( empty( $scoper_checking_attachment_access ) ) { - $in_process = false; - return $wp_blogcaps; - } - } - - // convert 'rs_role_name' to corresponding caps (and also make a tinkerable copy of reqd_caps) - $reqd_caps = $scoper->role_defs->role_handles_to_caps($orig_reqd_caps); - - // Disregard caps which are not defined in Role Scoper config - if ( ! $rs_reqd_caps = array_intersect( $reqd_caps, $scoper->cap_defs->get_all_keys() ) ) { - $in_process = false; - return $wp_blogcaps; - } - - global $current_user; - - $user_id = ( isset($args[1]) ) ? $args[1] : 0; - - if ($user_id && ($user_id != $current_user->ID) ) - $user = new WP_Scoped_User($user_id); - else - $user = $current_user; - - // If something blew away the scoped allcaps array (which includes RS blogroles), regenerate it. This has only been reported with MU, but check under WP just in case - //if ( $user->ID && ! isset( $user->allcaps['is_scoped_user'] ) ) - // $user->merge_scoped_blogcaps(); - - $script_name = $_SERVER['SCRIPT_NAME']; - - if ( defined('RVY_VERSION') ) { - global $revisionary; - - if ( ! $revisionary->skip_revision_allowance ) { - // Allow contributors to edit published post/page, with change stored as a revision pending review - $replace_caps = array('edit_published_posts', 'edit_private_posts', 'publish_posts'); - if ( array_intersect( $rs_reqd_caps, $replace_caps) ) { // don't need to fudge the capreq for post.php unless existing post has public/private status - - $revision_uris = apply_filters( 'scoper_revision_uris', array( 'p-admin/edit.php', 'p-admin/edit-pages.php', 'p-admin/widgets.php' ) ); - - if ( is_preview() || agp_strpos_any( $script_name, $revision_uris ) || ( in_array( get_post_field('post_status', $scoper->data_sources->detect('id', 'post') ), array('publish', 'private') ) ) ) { - if ( rvy_get_option('pending_revisions') ) { - if ( strpos($script_name, 'p-admin/page.php') || strpos($script_name, 'p-admin/edit-pages.php') ) - $use_cap_req = 'edit_pages'; - else - $use_cap_req = 'edit_posts'; - - foreach ( $rs_reqd_caps as $key => $cap_name ) - if ( in_array($cap_name, $replace_caps) ) - $rs_reqd_caps[$key] = $use_cap_req; - } - } - } - - $replace_caps = array('edit_published_pages', 'edit_private_pages', 'publish_pages'); - if ( array_intersect( $rs_reqd_caps, $replace_caps) ) { // don't need to fudge the capreq for page.php unless existing page has public/private status - if ( empty($revision_uris) ) - $revision_uris = apply_filters( 'scoper_revision_uris', array( 'p-admin/edit.php', 'p-admin/edit-pages.php', 'p-admin/widgets.php' ) ); - - if ( is_preview() || agp_strpos_any( $script_name, $revision_uris ) || ( in_array( get_post_field('post_status', $scoper->data_sources->detect('id', 'post') ), array('publish', 'private') ) ) ) { - if ( rvy_get_option('pending_revisions') ) { - foreach ( $rs_reqd_caps as $key => $cap_name ) - if ( in_array($cap_name, $replace_caps) ) - $rs_reqd_caps[$key] = 'edit_pages'; - } - } - } - } - } - - // WP core quirk workaround: edit_others_posts is required as preliminary check for populating authors dropdown for pages - // (but we are doing are own validation, so just short circuit the WP get_editable_user_ids safeguard - if ( ('edit_others_posts' == $reqd_caps[0]) && ( strpos($script_name, 'p-admin/page.php') || strpos($script_name, 'p-admin/page-new.php') ) ) { - - $key = array_search( 'edit_others_posts', $rs_reqd_caps ); - - if ( awp_ver('2.6') ) { // Allow contributors to edit published post/page, with change stored as a revision pending review - $object_types = $scoper->cap_defs->object_types_from_caps($rs_reqd_caps); - $object_type = key($object_types); - - require_once( 'lib/agapetry_wp_admin_lib.php' ); // function awp_metaboxes_started() - - if ( ! awp_metaboxes_started($object_type) && ! strpos($script_name, 'p-admin/revision.php') && false === strpos(urldecode($_SERVER['REQUEST_URI']), 'page=revisions' ) ) // don't enable contributors to view/restore revisions - $rs_reqd_caps[$key] = 'edit_pages'; - else - $rs_reqd_caps[$key] = 'edit_published_pages'; - - } elseif ( $args[2] ) { - // $wp_blogcaps = array_merge( $wp_blogcaps, array('edit_others_posts' => true) ); - $rs_reqd_caps[$key] = 'edit_others_pages'; - } - } - - // also short circuit any unnecessary edit_posts checks within page edit form, but only after admin menu is drawn - if ( ('edit_posts' == $reqd_caps[0]) && ( strpos($script_name, 'p-admin/page.php') || strpos($script_name, 'p-admin/page-new.php') ) && did_action('admin_notices') ) { - $key = array_search( 'edit_posts', $rs_reqd_caps ); - - $wp_blogcaps = array_merge( $wp_blogcaps, array('edit_posts' => true) ); - - if ( ! empty($args[2]) ) // since we're in edit page form, convert id-specific edit_posts requirement to edit_pages - $rs_reqd_caps[$key] = 'edit_pages'; - } - - - // If no object id was passed in, we won't do much. - if ( empty($args[2]) ) { - if ( ! $this->skip_id_generation && ! defined('XMLRPC_REQUEST') ) { - // Try to generate missing object_id argument for problematic current_user_can calls - if ( empty( $scoper->generate_id_caps ) ) { - $scoper->generate_id_caps = array('moderate_comments', 'manage_categories', 'edit_published_posts', 'edit_published_pages', 'edit_others_posts', 'edit_others_pages', 'publish_posts', 'publish_pages', 'delete_others_posts', 'delete_others_pages', 'upload_files'); - $scoper->generate_id_caps = apply_filters( 'caps_to_generate_object_id_rs', $scoper->generate_id_caps ); - - if ( ! strpos($script_name, 'p-admin/page.php') && ! strpos($script_name, 'p-admin/page-new.php') ) - $scoper->generate_id_caps []= 'edit_posts'; - - if ( ! strpos($script_name, 'p-admin/post.php') && ! strpos($script_name, 'p-admin/post-new.php') ) - $scoper->generate_id_caps []= 'edit_pages'; - } - - if ( in_array( $reqd_caps[0], $scoper->generate_id_caps ) ) { - //rs_errlog("trying to determine ID for {$reqd_caps[0]}"); - - if ( $gen_id = $this->generate_missing_object_id( $reqd_caps[0]) ) { - if ( ! is_array($gen_id) ) { - // Special case for upload scripts: don't do scoped role query if the post doesn't have any categories saved yet - if ( strpos($script_name, 'p-admin/media-upload.php') || strpos($script_name, 'p-admin/async-upload.php') ) { - if ( ! wp_get_post_categories($gen_id) ) - $gen_id = 0; - } - - if ( $gen_id ) { - $args[2] = $gen_id; - } - } - } - } - - } else - $this->skip_id_generation = false; // too risky to leave this set - - - if ( empty($args[2]) ) { - - if ( $missing_caps = array_diff($rs_reqd_caps, array_keys($wp_blogcaps) ) ) { - // These checks are only relevant since no object_id was provided. - // Otherwise (in the main body of this function), taxonomy and object caps will be credited via scoped query - - // If we are about to fail the blogcap requirement, credit a missing cap if - // the user has it by term role for ANY term. - // This prevents failing initial UI entrance exams that assume blogroles-only - if ( $missing_caps = array_diff($rs_reqd_caps, array_keys($wp_blogcaps) ) ) - if ( ! $this->skip_any_term_check ) - if ( $tax_caps = $this->user_can_for_any_term($missing_caps) ) - $wp_blogcaps = array_merge($wp_blogcaps, $tax_caps); - - // If we are about to fail the blogcap requirement, credit a missing scoper-defined cap if - // the user has it by object role for ANY object. - // (i.e. don't bar user from edit-pages.php if they have edit_pages cap for at least one page) - if ( $missing_caps = array_diff($rs_reqd_caps, array_keys($wp_blogcaps) ) ) { - - $honor_objrole = awp_ver('2.7') || ! strpos($script_name, 'p-admin/index.php') || ! did_action('admin_notices') || ! empty($scoper->honor_any_objrole); - - if ( ! $this->skip_any_object_check && $honor_objrole ) { // credit object role assignment for menu visibility check and Dashboard Post/Page total, but not for Dashboard "Write Post" / "Write Page" links - - // Complication due to the dual usage of 'edit_posts' / 'edit_pages' caps for creation AND editing permission: - // We don't want to allow a user to create a new page or post simply because they have an editing role assigned directly to some other post/page - $any_objrole_skip_uris = array( 'p-admin/page-new.php', 'p-admin/post-new.php' ); - $any_objrole_skip_uris = apply_filters( 'any_objrole_skip_uris_rs', $any_objrole_skip_uris ); - - $skip = false; - foreach ( $any_objrole_skip_uris as $uri_sub ) { - if ( strpos(urldecode($_SERVER['REQUEST_URI']), $uri_sub) ) { - $skip = true; - break; - } - } - - if ( ! $skip ) { - $any_objrole_caps = array( 'edit_posts', 'edit_pages', 'edit_comments', 'manage_links', 'manage_categories', 'manage_groups', 'upload_files' ); - $any_objrole_caps = apply_filters( 'caps_granted_from_any_objrole_rs', $any_objrole_caps ); - - //dump($any_objrole_caps); - - $missing_caps = array_intersect($missing_caps, $any_objrole_caps); - - //dump($missing_caps); - - $this->skip_any_object_check = true; - - if ( $object_caps = $this->user_can_for_any_object( $missing_caps ) ) - $wp_blogcaps = array_merge($wp_blogcaps, $object_caps); - - $this->skip_any_object_check = false; - } - } - } - } - - $in_process = false; - return $wp_blogcaps; - } - } else { // endif no object_id provided - - // if the top level page structure is locked, don't allow non-administrator to delete a top level page either - if ( 'delete_page' == $args[0] ) { - if ( ! is_content_administrator_rs() && scoper_get_option( 'lock_top_pages' ) ) { - if ( $page = get_post( $args[2] ) ) { - if ( empty( $page->post_parent ) ) { - $in_process = false; - return false; - } - } - } - } - } - - $object_id = (int) $args[2]; - - global $wpdb; - - // since WP user_has_cap filter does not provide an object type / data source arg, - // we determine data source and object type based on association to required cap(s) - $object_types = $scoper->cap_defs->object_types_from_caps($rs_reqd_caps); - - // If an object id was provided, all required caps must share a common data source (object_types array is indexed by src_name) - if ( count($object_types) > 1 || ! count($object_types) ) { - - if ( $object_type = $scoper->data_sources->get_from_uri('type', 'post', $object_id) ) { - $object_types = array( 'post' => array( $object_type => true ) ); - } else { - rs_notice ( 'Error: user has_cap call is not valid for specified object_id because required capabilities pertain to more than one data source.' . ' ' . implode(', ', $orig_reqd_caps) ); - $in_process = false; - return array(); - } - } - - $src_name = key($object_types); - if ( ! $src = $scoper->data_sources->get($src_name) ) { - rs_notice ( sprintf( 'Role Scoper Config Error (%1$s): Data source (%2$s) is not defined', 'flt_user_has_cap', $src_name ) ); - $in_process = false; - return array(); - } - - // If cap definition(s) did not specify object type (as with "read" cap), enlist help detecting it - reset($object_types); - if ( (count($object_types[$src_name]) == 1) && key($object_types[$src_name]) ) - $object_type = key($object_types[$src_name]); - else { - $object_type = $scoper->data_sources->detect('type', $src, $object_id); - } - - // if this is a term administration request, route to user_can_admin_terms() - if ( ! isset($src->object_types[$object_type]) && $scoper->taxonomies->is_member($object_type) ) { - if ( count($rs_reqd_caps) == 1 ) { // technically, should support multiple caps here - if ( $cap_def = $scoper->cap_defs->get( $reqd_caps[0] ) ) { - if ( $cap_def->op_type == OP_ADMIN_RS ) { - // always pass through any assigned blog caps which will not be involved in this filtering - $rs_reqd_caps = array_fill_keys( $rs_reqd_caps, 1 ); - $undefined_reqd_caps = array_diff_key( $wp_blogcaps, $rs_reqd_caps); - - if ( $scoper->admin->user_can_admin_terms($object_type, $object_id, $user) ) { - $in_process = false; - return array_merge($undefined_reqd_caps, $rs_reqd_caps); - } else { - $in_process = false; - return $undefined_reqd_caps; // required caps we scrutinized are excluded from this array - } - } - } - } - } - - // Workaround to deal with WP core's checking of publish cap prior to storing categories - // Store terms to DB in advance of any cap-checking query which may use those terms to qualify an operation - if ( in_array('publish_posts', $rs_reqd_caps) && ! empty($_POST) && $object_id ) { - foreach ( $src->uses_taxonomies as $taxonomy ) { - $stored_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS, $object_id); - - $post_var = isset( $src->http_post_vars->$taxonomy ) ? $src->http_post_vars->$taxonomy : $taxonomy; - - $selected_terms = isset( $_POST[$post_var] ) ? $_POST[$post_var] : array(); - - if ( $set_terms = $scoper->filters_admin->flt_pre_object_terms($selected_terms, $taxonomy) ) { - $set_terms = array_map('intval', $set_terms); - $set_terms = array_unique($set_terms); - - if ( $set_terms != $stored_terms ) - wp_set_object_terms( $object_id, $set_terms, $taxonomy ); - - // delete any buffered cap check results which were queried prior to storage of these object terms - if ( isset($hascap_object_ids[$src_name][$object_type]) ) - unset($hascap_object_ids[$src_name][$object_type]); - } - } - } - - - // If caps pertain to more than one object type, filter will probably return empty set, but let it pass in case of strange and unanticipated (yet valid) usage - - // Before querying for caps on this object, check whether it was put in the - // global buffer (page_cache / post_cache / listed_ids). If so, run the same - // query for ALL the pages/posts/entities in the buffer, and buffer the results. - // - // (This is useful when front end code must check caps for each post - // to determine whether to display 'edit' link, etc.) - - // now that object type is known, retrieve / construct memory cache of all ids which satisfy capreqs - sort($rs_reqd_caps); - $capreqs_key = md5( serialize($rs_reqd_caps) . ! $scoper->query_interceptor->require_full_object_role ); // see ScoperAdmin::user_can_admin_object - - - // is the requested object a revision or attachment? - $maybe_revision = ( 'post' == $src_name && awp_ver('2.6') && ! isset($hascap_object_ids[$src_name][$object_type][$capreqs_key][$object_id]) ); - - $maybe_attachment = strpos($_SERVER['SCRIPT_NAME'], 'p-admin/upload.php') || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/media.php'); - - if ( $object_id && ( $maybe_revision || $maybe_attachment ) ) { - if ( ! $_post = wp_cache_get($object_id, 'posts') ) { - if ( $_post = & scoper_get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $object_id)) ) - wp_cache_add($_post->ID, $_post, 'posts'); - } - - if ( $_post ) { - if ( 'revision' == $_post->post_type ) { - require_once( 'lib/revisions_lib_rs.php' ); - $revisions = rs_get_post_revisions($_post->post_parent, 'inherit', array( 'fields' => constant('COL_ID_RS'), 'return_flipped' => true ) ); - } - - //todo: eliminate redundant post query (above by detect method to determine object type) - if ( ( 'revision' == $_post->post_type ) || ( 'attachment' == $_post->post_type ) ) { - $object_id = $_post->post_parent; - - if ( ! $_parent = wp_cache_get($_post->post_parent, 'posts') ) { - if ( $object_id ) - if ( $_parent = & scoper_get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $_post->post_parent)) ) - wp_cache_add($_post->post_parent, $_parent, 'posts'); - } - - if ( $_parent ) { - $object_type = $_parent->post_type; - - // compensate for WP's requirement of posts cap for attachment editing, regardless of whether it's attached to a post or page - if ( ( $maybe_attachment || ( 'revision' == $_post->post_type ) ) && ( 'page' == $object_type ) ) { - if ( 'edit_others_posts' == $rs_reqd_caps[0] ) - $rs_reqd_caps[0] = 'edit_others_pages'; - - elseif ( 'delete_others_posts' == $rs_reqd_caps[0] ) - $rs_reqd_caps[0] = 'delete_others_pages'; - - elseif ( 'edit_posts' == $rs_reqd_caps[0] ) - $rs_reqd_caps[0] = 'edit_pages'; - - elseif ( 'delete_posts' == $rs_reqd_caps[0] ) - $rs_reqd_caps[0] = 'delete_pages'; - } - } elseif ( 'attachment' == $_post->post_type ) { - // special case for unattached uploads: uploading user should have their way with them - if( $_post->post_author == $current_user->ID ) - $rs_reqd_caps[0] = 'read'; - } - } - } - } - - if ( ! isset($hascap_object_ids[$src_name][$object_type][$capreqs_key]) || ! isset($tested_object_ids[$src_name][$object_type][$capreqs_key][$object_id]) ) { - // Check whether Object ids meeting specified capreqs were already memcached during this http request - if ( 'post' == $src_name ) { - global $wp_object_cache; - } - - // there's too much happening on the dashboard (and too much low-level query filtering) to buffer listed IDs reliably - if ( ! strpos($script_name, 'p-admin/index.php') ) { - // If we have a cache of all currently listed object ids, limit capreq query to those ids - if ( isset($scoper->listed_ids[$src_name]) ) - $listed_ids = array_keys($scoper->listed_ids[$src_name]); - - elseif ( ( 'post' == $src_name ) && ! empty($wp_object_cache->cache['posts']) && is_array($wp_object_cache->cache['posts']) ) - $listed_ids = array_keys($wp_object_cache->cache['posts']); - else - $listed_ids = array(); - } else - $listed_ids = array(); - - // make sure this object is in the list - $listed_ids[] = $object_id; - - if ( isset( $tested_object_ids[$src_name][$object_type][$capreqs_key] ) ) - $tested_object_ids[$src_name][$object_type][$capreqs_key] = $tested_object_ids[$src_name][$object_type][$capreqs_key] + array_fill_keys($listed_ids, true); - else - $tested_object_ids[$src_name][$object_type][$capreqs_key] = array_fill_keys($listed_ids, true); - - // If a listing buffer exists, query on its IDs. Otherwise just for this object_id - $id_in = " AND $src->table.{$src->cols->id} IN ('" . implode("', '", array_unique($listed_ids)) . "')"; - - $query_key = $capreqs_key . $id_in; - - // As of 1.1, using subselects in where clause instead - //$join = $scoper->query_interceptor->flt_objects_join('', $src_name, $object_type, $this_args ); - - if ( isset($hascap_object_ids[$src_name][$object_type][$query_key]) ) - $okay_ids = $hascap_object_ids[$src_name][$object_type][$query_key]; - - else { - if ( isset($args['use_term_roles']) ) - $use_term_roles = $args['use_term_roles']; - else - $use_term_roles = $src->uses_taxonomies && scoper_get_otype_option( 'use_term_roles', $src_name, $object_type ); - - $use_object_roles = ( empty($src->no_object_roles) ) ? scoper_get_otype_option( 'use_object_roles', $src_name, $object_type ) : false; - - $this_args = array('object_type' => $object_type, 'user' => $user, 'use_term_roles' => $use_term_roles, 'use_object_roles' => $use_object_roles, 'skip_teaser' => true ); - - //dump($rs_reqd_caps); - - $where = $scoper->query_interceptor->objects_where_role_clauses($src_name, $rs_reqd_caps, $this_args ); - - if ( $use_object_roles && $scoper->query_interceptor->require_full_object_role ) - $this->require_full_object_role = false; // return just-used temporary switch back to normal - - if ( $where ) - $where = "AND ( $where )"; - - $query = "SELECT $src->table.{$src->cols->id} FROM $src->table WHERE 1=1 $where $id_in"; - - $okay_ids = scoper_get_col($query); - - // If set of listed ids is not known, each current_user_can call will generate a new query construction - // But if the same query is generated, use buffered result - if ( ! empty($okay_ids) ) - $okay_ids = array_fill_keys($okay_ids, true); - - if ( count($listed_ids) > 1 ) { - // bulk post/page deletion is broken by hascap buffering - if ( empty($_GET['doaction']) || ( ('delete_post' != $args[0]) && ('delete_page' != $args[0]) ) ) - $hascap_object_ids[$src_name][$object_type][$capreqs_key] = $okay_ids; - } - $hascap_object_ids[$src_name][$object_type][$query_key] = $okay_ids; - } - - } else { - // results of this same has_cap inquiry are already stored (from another call within current http request) - $okay_ids = $hascap_object_ids[$src_name][$object_type][$capreqs_key]; - } - - // if we redirected the cap check to revision parent, credit all the revisions for passing results - if ( isset($okay_ids[$object_id]) && ! empty($revisions) ) { - $okay_ids = $okay_ids + $revisions; - - // bulk post/page deletion is broken by hascap buffering - if ( empty($_GET['doaction']) || ( ('delete_post' != $args[0]) && ('delete_page' != $args[0]) ) ) - $hascap_object_ids[$src_name][$object_type][$capreqs_key] = $okay_ids; - - if ( ! empty($query_key) ) - $hascap_object_ids[$src_name][$object_type][$query_key] = $okay_ids; - } - - //dump($okay_ids); - - $rs_reqd_caps = array_fill_keys( $rs_reqd_caps, true ); - - if ( ! $okay_ids || ! isset($okay_ids[$object_id]) ) { - //d_echo("object_id $object_id not okay!" ); - //rs_errlog( "object_id $object_id not okay!" ); - - $in_process = false; - return array_diff_key( $wp_blogcaps, $rs_reqd_caps); // required caps we scrutinized are excluded from this array - } else { - if ( $restore_caps = array_diff($orig_reqd_caps, array_keys($rs_reqd_caps) ) ) - $rs_reqd_caps = $rs_reqd_caps + array_fill_keys($restore_caps, true); - - //$test = array_merge( $wp_blogcaps, $rs_reqd_caps ); - //dump($test); - - //rs_errlog( 'RETURNING:' ); - //rs_errlog( serialize(array_merge($wp_blogcaps, $rs_reqd_caps)) ); - - $in_process = false; - return array_merge($wp_blogcaps, $rs_reqd_caps); - } - } - - - // Try to generate missing has_cap object_id arguments for problematic caps - // Ideally, this would be rendered unnecessary by updated current_user_can calls in WP core or other offenders - function generate_missing_object_id($required_cap) { - global $scoper; - - if ( has_filter('generate_missing_object_id_rs') ) { - if ( $object_id = apply_filters('generate_missing_object_id_rs', 0, $required_cap) ) - return $object_id; - } - - if ( ! $cap_def = $scoper->cap_defs->get($required_cap) ) - return; - - if ( ! empty($cap_def->is_taxonomy_cap) ) { - if ( ! $src_name = $scoper->taxonomies->member_property($cap_def->is_taxonomy_cap, 'source', 'name') ) - return; - } - - // WP core edit_post function requires edit_published_posts or edit_published_pages cap to save a post to "publish" status, but does not pass a post ID - // Similar situation with edit_others_posts, publish_posts. - // So... insert the object ID from POST vars - if ( empty($src_name) ) - $src_name = $scoper->cap_defs->member_property($required_cap, 'src_name'); - - if ( ! empty( $_POST ) ) { - // special case for comment post ID - if ( ! empty( $_POST['comment_post_ID'] ) ) - $_POST['post_ID'] = $_POST['comment_post_ID']; - - if ( ! $id = $scoper->data_sources->get_from_http_post('id', $src_name) ) { - - if ( strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/async-upload.php' ) ) { - if ( $attach_id = $scoper->data_sources->get_from_http_post('attachment_id', $src_name) ) { - if ( $attach_id ) { - global $wpdb; - $id = scoper_get_var( "SELECT post_parent FROM $wpdb->posts WHERE post_type = 'attachment' AND ID = '$attach_id'" ); - if ( $id > 0 ) - return $id; - } - } - } elseif ( ! $id && ! empty($_POST['id']) ) // in case normal POST variable differs from ajax variable - $id = $_POST['id']; - } - - /* on the moderation page, admin-ajax tests for moderate_comments without passing any ID */ - if ( ('moderate_comments' == $required_cap) ) - if ( $comment = get_comment( $id ) ) - return $comment->comment_post_ID; - - if ( $id > 0 ) - return $id; - - // special case for adding categories - if ( ( 'manage_categories' == $required_cap ) ) { - if ( ! empty($_POST['newcat_parent']) ) - return $_POST['newcat_parent']; - elseif ( ! empty($_POST['category_parent']) ) - return $_POST['category_parent']; - } - - - } elseif ( defined('XMLRPC_REQUEST') ) { - global $xmlrpc_post_id_rs; - if ( ! empty($xmlrpc_post_id_rs) ) - return $xmlrpc_post_id_rs; - } else { - //rs_errlog("checking uri for source $src_name"); - $id = $scoper->data_sources->get_from_uri('id', $src_name); - if ( $id > 0 ) - return $id; - } - } - - - // Some users with term or object roles are now able to view and edit certain - // content, if only the unscoped core would let them in the door. For example, you can't - // load edit-pages.php unless current_user_can('edit_pages') blog-wide. - // - // This policy is sensible for unscoped users, as it hides stuff they can't have. - // But it is needlessly oppressive to those who walk according to the law of the scoping. - // Subvert the all-or-nothing paradigm by reporting a blog-wide cap if the user has - // the capability for any taxonomy. - // - // Due to subsequent query filtering, this does not unlock additional content blog-wide. - // It merely enables us to run all pertinent content through our gauntlet (rather than having - // some contestants disqualified before we arrive at the judging stand). - // - // A happy side effect is that, in a fully scoped blog, all non-administrator users can be set - // to "Subscriber" blogrole so the failure state upon accidental Role Scoper disabling - // is overly narrow access, not overly open. - function user_can_for_any_term($reqd_caps, $user = '') { - global $scoper; - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - // Instead of just intersecting the missing reqd_caps with termcaps from all term_roles, - // require each subset of caps with matching src_name, object type and op_type to - // all be satisfied by the same role (any assigned term role). This simulates flt_objects_where behaviour. - - $grant_caps = array(); - - $caps_by_otype = $scoper->cap_defs->organize_caps_by_otype($reqd_caps); - - foreach ( $caps_by_otype as $src_name => $otypes ) { - $src = $scoper->data_sources->get($src_name); - - if ( empty($src->uses_taxonomies) ) - continue; - - foreach ( $otypes as $this_otype_caps ) { // keyed by object_type - $caps_by_op = $scoper->cap_defs->organize_caps_by_op($this_otype_caps); - - foreach ( $caps_by_op as $this_op_caps ) { // keyed by op_type - $roles = $scoper->role_defs->qualify_roles($this_op_caps); - - foreach ($src->uses_taxonomies as $taxonomy) { - if ( ! isset($user->term_roles[$taxonomy]) ) - $user->term_roles[$taxonomy] = $user->get_term_roles_daterange($taxonomy); // call daterange function populate term_roles property - possible perf enhancement for subsequent code even though we don't conider content_date-limited roles here - - if ( array_intersect_key($roles, agp_array_flatten( $user->term_roles[$taxonomy], false ) ) ) // okay to include all content date ranges because can_for_any_term checks are only preliminary measures to keep the admin UI open - $grant_caps = array_merge($grant_caps, $this_op_caps); - } - } - } - } - - if ( $grant_caps ) - return array_fill_keys($reqd_caps, true); - else - return array(); - } - - // used by flt_user_has_cap prior to failing blogcaps requirement - // Note that this is not to be called if an object_id was provided to (or detected by) flt_user_has_cap - // This is primarily a way to ram open a closed gate prior to selectively re-closing it ourself - function user_can_for_any_object($reqd_caps, $user = '') { - global $wpdb; - global $scoper; - - if ( ! empty( $scoper->ignore_object_roles ) ) { - // use this to force cap via blog/term role for Write Menu item - $scoper->ignore_object_roles = false; - return array(); - } - - $check_caps = $scoper->cap_defs->get_base_caps($reqd_caps); // convert 'edit_others', etc. to equivalent base cap - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - if ( $roles = $scoper->role_defs->qualify_object_roles($check_caps) ) { - - // a user might have the caps via object role even if not via blog role or term role - if ( $user_object_roles = $scoper->role_defs->get_applied_object_roles($user) ) { - - if ( array_intersect_key($roles, $user_object_roles) ) - return array_fill_keys($reqd_caps, true); - } - } - - return array(); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/capabilities_rs.php b/blog/wp-content/plugins/role-scoper/capabilities_rs.php deleted file mode 100644 index 4b3f599..0000000 --- a/blog/wp-content/plugins/role-scoper/capabilities_rs.php +++ /dev/null @@ -1,212 +0,0 @@ -locked ) { - $notice = sprintf('A plugin or theme (%1$s) is too late in its attempt to define a capability (%2$s).', $defining_module_name, $name) - . '

    ' . 'This must be done via the define_capabilities_rs hook.'; - rs_notice($notice); - return; - } - - if ( isset($this->members[$name]) ) - unset($this->members[$name]); - - $this->members[$name] = new WP_Scoped_Capability($name, $defining_module_name, $src_name, $object_type, $op_type, $args); - $this->process($this->members[$name]); - - return $this->members[$name]; - } - - function process( &$cap_def ) { - if ( ! isset($cap_def->attributes) ) - $cap_def->attributes = ''; - - if ( ! isset($cap_def->status) ) - $cap_def->status = ''; - } - - //returns array[src_name][object_type] = 1 - function object_types_from_caps($reqd_caps) { - if ( ! is_array($reqd_caps) ) - $reqd_caps = ($reqd_caps) ? array($reqd_caps) : array(); - - $object_types = array(); - foreach( $reqd_caps as $cap_name) { - if ( isset($this->members[$cap_name]) ) { - $cap_def = $this->members[$cap_name]; - - if ( isset($cap_def->src_name) && isset($cap_def->object_type) ) - $object_types[$cap_def->src_name][$cap_def->object_type] = 1; - } - } - - return $object_types; - } - - // returns caps array[op_type] = array of cap names - function organize_caps_by_op($caps, $include_undefined_caps = false ) { - $opcaps = array(); - - foreach ($caps as $cap_name) { - if ( isset($this->members[$cap_name]) ) - $opcaps[$this->members[$cap_name]->op_type] []= $cap_name; - - elseif ( $include_undefined_caps ) - $opcaps[''] []= $cap_name; - } - - return $opcaps; - } - - // returns caps array[src_name][object_type] = array of cap names - function organize_caps_by_otype( $caps, $include_undefined_caps = false, $required_src_name = '', $default_object_type = '' ) { - $otype_caps = array(); - - foreach ($caps as $cap_name) { - if ( isset($this->members[$cap_name]) ) { - $src_name = $this->members[$cap_name]->src_name; - - if ( $required_src_name && ( $src_name != $required_src_name ) ) { - $src_name = ''; - $object_type = ''; - } else - $object_type = $this->members[$cap_name]->object_type; - - if ( ! $object_type ) - $object_type = $default_object_type; - - $otype_caps[$src_name][$object_type] []= $cap_name; - - } elseif ( $include_undefined_caps ) - $otype_caps[''][''] []= $cap_name; - } - - // if an otype-indeterminate cap (i.e. 'read') is present alongside otype-specific caps, combine them into the otype-specfic array(s) - foreach ( array_keys($otype_caps) as $src_name ) { - if ( (count($otype_caps[$src_name]) > 1) && isset($otype_caps[$src_name]['']) ) { - foreach ( array_keys($otype_caps[$src_name]) as $otype ) { - if ( $otype ) - $otype_caps[$src_name][$otype] = array_merge($otype_caps[$src_name][$otype], $otype_caps[$src_name][''] ); - } - unset ($otype_caps[$src_name]['']); - } - } - - return $otype_caps; - } - - function get_base_cap($cap) { - if ( isset($this->members[$cap]->base_cap) ) - return $this->members[$cap]->base_cap; - } - - function get_base_caps($caps, $require_owner_privilege = false) { - if ( ! is_array($caps) ) - $caps = array($caps); - - foreach ($caps as $key => $cap_name) { - if ( isset($this->members[$cap_name]) ) { - $capdef = $this->members[$cap_name]; - if ( isset($capdef->base_cap) && ( ! $require_owner_privilege || ! empty($this->members[$capdef->base_cap]->owner_privilege) ) ) { - unset($caps[$key]); - $caps []= $capdef->base_cap; - } - } - } - return array_unique($caps); - } - - // remove caps which do not apply to owners, or are granted to them automatically - function remove_owner_caps($caps) { - if ( ! is_array($caps) ) - $caps = array($caps); - - foreach ($caps as $key => $cap_name) - if ( ! empty($this->members[$cap_name]->owner_privilege) || ! empty($this->members[$cap_name]->base_cap) ) - unset($caps[$key]); - - return $caps; - } - - function get_matching($src_name, $object_type = '', $op_type = '', $status = '', $base_caps_only = false, $args = '' ) { - $arr = array(); - - $defaults = array( 'strict_op_match' => false); - $args = array_intersect_key( $defaults, (array) $args ); - extract($args); - - // disregard a status arg which is not present in any cap - if ( $status && ( $status != STATUS_ANY_RS ) ) { - $status_present = false; - foreach ( $this->members as $cap_name => $capdef ) - if ( $capdef->status == $status ) { - $status_present = true; - break; - } - - if ( ! $status_present ) - $status = ''; - } - - // first narrow to specified source name, object type, status and baseness - foreach ( $this->members as $cap_name => $capdef ) - if ( ( $capdef->src_name == $src_name ) - && ( ! $object_type || empty($capdef->object_type) || ( $object_type == $capdef->object_type ) ) - && ( (STATUS_ANY_RS == $status) || ( ! $status && empty($capdef->status) ) || ( isset($capdef->status) && ($status == $capdef->status) ) ) - && ( (BASE_CAPS_RS != $base_caps_only) || empty($capdef->base_cap) ) - ) - $arr[$cap_name] = $capdef; - - // Narrow to specified op type. - // But if no cap of this op type is defined, sustitute a cap of higher op level (which also met the other criteria) - if ( $arr && $op_type ) { - $sustitute_ops = array( OP_EDIT_RS, OP_PUBLISH_RS, OP_DELETE_RS, OP_ADMIN_RS ); - if ( ! $op_level = array_search($op_type, $sustitute_ops) ) - $op_level = -1; - - $op_caps = array(); - do { - if ( $op_level >= 0 ) - $op_type = $sustitute_ops[$op_level]; - - foreach ( $arr as $cap_name => $capdef ) - if ( $capdef->op_type == $op_type ) - $op_caps[$cap_name] = $capdef; - - $op_level++; - } while ( ! $op_caps && ($op_level < count($sustitute_ops) ) && empty($strict_op_match) ); - - return $op_caps; - } else - return $arr; - } -} - -class WP_Scoped_Capability extends AGP_Config_Item { - var $src_name; // required - var $object_type; // required - var $op_type; // required - var $status = ''; - var $attributes; // array of attribute names: 'others', etc. - var $base_cap; // documentation not finished - see scoper_core_cap_defs() - var $owner_privilege; // '' - var $anon_user_has; // '' - var $is_taxonomy_cap; // '' - - // args: status, base_cap, owner_privilege, anon_user_has, is_taxonomy_cap - function WP_Scoped_Capability($name, $defining_module_name, $src_name, $object_type = '', $op_type = '', $args) { - $this->AGP_Config_Item($name, $defining_module_name, $args); - - $this->src_name = $src_name; - $this->object_type = $object_type; - $this->op_type = $op_type; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/data_sources_rs.php b/blog/wp-content/plugins/role-scoper/data_sources_rs.php deleted file mode 100644 index 935d6fe..0000000 --- a/blog/wp-content/plugins/role-scoper/data_sources_rs.php +++ /dev/null @@ -1,490 +0,0 @@ - 1, 'taxonomy_only' => 1, - 'table_basename' => 'term_taxonomy', 'table' => $wpdb->prefix . 'term_taxonomy', - 'table_alias' => 'tt', 'edit_url' => '%1$s/wp-admin/categories.php?action=edit&cat_ID=%2$d', - 'cols' => (object) array( 'id' => 'term_id', 'name' => 'name', 'parent' => 'parent' ), // NOTE on ID col: DB queries actually use term_taxonomy_id based on attributes returned by get_terms_query_vars. term_id here is used for categories queries. Possible Todo: resolve this discrepancy and potential bug source - 'http_post_vars' => (object) array( 'id' => 'cat_ID', 'parent' => 'category_parent' ), - 'uri_vars' => (object) array( 'id' => 'cat_ID' ) - ); // end outer array - - // $src_name, $table_basename, $display_name, $display_name_plural, $col_id, $col_name - $this->add('term', 'role-scoper', __('Term', 'scoper'), __('Terms', 'scoper'), 'terms', 'term_id', 'name', $args ); - } - - function &add( $name, $defining_module_name, $display_name, $display_name_plural, $table_basename, $col_id, $col_name, $args) { - if ( $this->locked ) { - $notice = sprintf('A plugin or theme (%1$s) is too late in its attempt to define a data source (%2$s).', $defining_module_name, $name) - . '

    ' . 'This must be done via the define_data_sources_rs hook.'; - rs_notice($notice); - return; - } - - if ( isset($this->members[$name]) ) - unset($this->members[$name]); - - $this->members[$name] = new WP_Scoped_Data_Source($name, $defining_module_name, $display_name, $display_name_plural, $table_basename, $col_id, $col_name, $args); - - $this->process( $this->members[$name] ); - return $this->members[$name]; - } - - - // accepts reference to WP_Data_Source object (must pass object so we can call base class function statically) - function process( &$src ) { - global $wpdb; - - // apply wp prefix to tablename - if ( ! isset($src->table) && ! empty($src->table_basename) ) { // the prefix was already applied, or is unnecessary - if ( empty($src->table_no_prefix) ) - $src->table = $wpdb->prefix . $src->table_basename; - else - $src->table = $src->table_basename; - } - - // if no alias specified, set alias property to table name - if ( empty($src->table_alias) ) - $src->table_alias = $src->table; - - if ( ! empty($src->uses_rs_data_table) ) { - $src->cols->id = 'actual_id'; - $src->cols->name = 'name'; - // Extension code must set cols->parent = 'parent', cols->owner = 'owner', cols->status = 'status' manually if column will be used - } - - // default object_types array to single member matching source name - if ( empty($src->object_types) ) { - $src->object_types = array($src->name => (object) array() ); - - if ( is_admin() ) { - $src->object_types[$src->name]->display_name = $src->display_name; - $src->object_types[$src->name]->display_name_plural = $src->display_name_plural; - } - } - - if ( empty($src->statuses) ) - $src->statuses = array('' => ''); - - foreach ( array_keys($src->object_types) as $name ) - $src->object_types[$name]->name = $name; - - if ( empty($src->taxonomy_only) ) { - $src_name = $src->name; - - // note: This defaults to source action names create_[src_name], save_[src_name], edit_[src_name], delete_[src_name] - // unless otherwise specified in data source definition. Better to support a logical default even if it means registering hooks that are never used. - // (since WP core uses save_post, edit_post, delete_post only, the create_post registration is suppressed in default_data_sources by admin_hooks 'create_object' => '') - $defaults = array( - 'save_object' => "save_$src_name", 'edit_object' => "edit_$src_name", 'create_object' => '', - 'delete_object' => "delete_$src_name", 'object_edit_ui' => '' ); - if ( isset($src->admin_actions) ) - $src->admin_actions = (object) array_merge($defaults, array_intersect_key( (array) $src->admin_actions, $defaults ) ); - else - $src->admin_actions = (object) $defaults; - - $def_obj_status_hook = ( ! empty($src->statuses) && ( count($src->statuses) > 1 ) ) ? "pre_{$src_name}_status" : ''; - $defaults = array( 'pre_object_status' => $def_obj_status_hook ); - if ( isset($src->admin_filters) ) - $src->admin_filters = (object) array_merge($defaults, array_intersect_key( (array) $src->admin_filters, $defaults ) ); - else - $src->admin_filters = (object) $defaults; - } - } - - // note: this is called by the parent class in AGP_Data_Sources::get_from_db - function get_object($src_name, $object_id, $cols = '') { - // special cases to take advantage of cached post/link - if ( ('post' == $src_name) && ! $cols ) - return get_post($object_id); - - elseif ( 'link' == $src_name ) - return get_bookmark($object_id); - - else { - if ( ! $src = $this->get($src_name) ) - return; - - if ( ! isset($src->cols->type) ) - return; - - global $wpdb; - - if ( ! $cols ) - $cols = '*'; - - if ( empty($object_id) ) - return array(); - - return scoper_get_row("SELECT $cols FROM $src->table WHERE {$src->cols->id} = '$object_id' LIMIT 1"); - } // end switch - } - - - function detect($what, $src, $object_id = 0, $object_type = '', $query = '') { - // so we can pass in $src object or $src_name string - if ( ! $src = $this->get($src) ) - return; - - // if there is only one possible answer, give it - if ( 'id' != $what ) { - if ( $it = $this->get_the_only($what, $src) ) - return $it; - - if ( $it = $this->get_from_func($what, $src) ) - return $it; - } else { - if ( defined('XMLRPC_REQUEST') && ! empty( $xmlrpc_post_id_rs ) ) - return $xmlrpc_post_id_rs; - } - - // Is it set as a $_POST variable? - if ( $it = $this->get_from_http_post($what, $src, $object_type) ) - return $it; - - /* - // TODO: test this (it would eliminate unnecessary clauses in some queries where object type can be determined) - // Is it one of the query variables in current WP query? - if ( 'post' == $src->name ) { - global $wp_query; - if ( ! empty($wp_query->query) ) { - if ( $it = $this->get_from_queryvars($what, $src, $wp_query->query, $object_type) ) - return $it; - } - } - */ - - // If we have the object ID, go to the source - if ( $object_id ) - if ( $it = $this->get_from_db($what, $src, $object_id) ) - return $it; - - // Is it one of the query variables in current URI? - if ( $it = $this->get_from_uri($what, $src, $object_type) ) - return $it; - - // Does the last database query include a helpful equality clause? - if ( $it = $this->get_from_query($what, $src, $query) ) - return $it; - - // if detection failed and the desired quanity is a member of a config array, default to first array element - if ( $it = $this->get_the_only($what, $src, true) ) - return $it; - } - - function get_the_only($what, $src, $force_first = false) { - if ( ! $src = $this->get($src) ) - return; - - if ( isset( $src->collections[$what] ) ) { - $collection_property = $src->collections[$what]; - - if ( isset( $src->$collection_property ) ) { - // If only one object type is defined, we have a winner. - if ( $force_first || ( 1 == count( $src->$collection_property ) ) ) { - reset( $src->$collection_property ); - return key( $src->$collection_property ); - } - } - } elseif ( ('type' == $what) && ( ! isset($src->object_types) || ( count($src->object_types) < 2 ) ) ) - return $src->name; - } - - function get_from_func($what, $src) { - if ( ! $src = $this->get($src) ) - return; - - if ( ! isset( $src->collections[$what] ) ) - return; - - $collection_property = $src->collections[$what]; - if ( isset( $src->$collection_property ) ) - foreach ( $src->$collection_property as $it => $prop ) - if ( isset( $prop->function ) ) - if ( call_user_func($prop->function) ) - return $it; - } - - function get_from_db($what, $src, $object_id) { - if ( ! method_exists($this, 'get_object') ) - return; - - if ( ! $src = $this->get($src) ) - return; - - if ( ! isset($src->cols->$what) ) - return; - - $col = $src->cols->$what; - - if ( $object = $this->get_object($src->name, $object_id, $col) ) - if ( isset( $object->$col ) ) { - $val = $object->$col; - return $this->get_from_val($what, $val, $src); - } - } - - function get_from_http($what, $src) { - if ( $val = $this->get_from_http_post($what, $src) ) - return $val; - - if ( $val = $this->get_from_urivars($what, $src) ) - return $val; - } - - // determines, using cfg->data_sources config, the http POST variable for desired information, then returns its value if present - function get_from_http_post($what, $src, $object_type = '') { - if ( empty($_POST) ) - return; - - if ( ! $src = $this->get($src) ) - return; - - /* - rs_errlog(''); - rs_errlog("get $what from_http_post"); - rs_errlog( serialize($_POST) ); - */ - - $varname = $this->get_varname('http_post', $what, $src, $object_type); - - //rs_errlog('varname: '. $varname); - - if ( isset($_POST[$varname]) ) { - $it = $this->get_from_val($what, $_POST[$varname], $src); - //rs_errlog("got $it"); - return $it; - } else { - if ( isset($src->http_post_vars_alt->$what) ) { - $vars_alt = (array) $src->http_post_vars_alt->$what; - foreach ( $vars_alt as $varname_alt ) { - if ( isset($_POST[$varname_alt]) ) { - $it = $this->get_from_val($what, $_POST[$varname_alt], $src); - //rs_errlog("got $it"); - return $it; - } - } - } - } - } - - // determines, using cfg->data_sources config, the URI query variable for desired information, then returns its value if present - function get_from_uri($what, $src, $object_type = '') { - $full_uri = urldecode($_SERVER['REQUEST_URI']); - - if ( ! $src = $this->get($src) ) - return; - - /* - rs_errlog(''); - rs_errlog("get $what from_uri"); - rs_errlog('URI: '. $full_uri); - */ - - // First, does the URI match a uri substring (i.e. php filename) defined for the data we're seeking? - if ( isset( $src->collections[$what] ) ) { - - $collection_property = $src->collections[$what]; - - if ( isset( $src->$collection_property ) ) - foreach( $src->$collection_property as $it => $it_properties ) - if ( isset($it_properties->uri) ) - foreach ( $it_properties->uri as $uri_sub ) - if ( strpos($full_uri, $uri_sub) ) - return $it; - } - - // Try to pull the desired value from URI variables, - // using data_sources definition to convert the abstract $what into URI variable name - $varname = $this->get_varname('uri', $what, $src, $object_type); - - //rs_errlog('varname: '. $varname); - - if ( isset($_GET[$varname]) ) { - $it = $this->get_from_val($what, $_GET[$varname], $src); - //rs_errlog("got $it"); - return $it; - } else { - if ( isset($src->uri_vars_alt->$what) ) { - $vars_alt = (array) $src->uri_vars_alt->$what; - foreach ( $vars_alt as $varname_alt ) { - if ( isset($_GET[$varname_alt]) ) { - $it = $this->get_from_val($what, $_GET[$varname_alt], $src); - //rs_errlog("got $it"); - return $it; - } - } - } - } - } - - /* - function get_from_queryvars($what, $src, $query_vars, $object_type = '') { - $varname = $this->get_varname('uri', $what, $src, $object_type); - - if ( isset($query_vars[$varname]) ) - return $this->get_from_val($what, $query_vars[$varname], $src); - } - */ - - function get_from_query($what, $src, $query) { - if ( ! $query ) - return; - - if ( ! $src = $this->get($src) ) - return; - - if ( empty($src->cols->$what) ) - return; - - $col = $src->cols->$what; - - // force standard query padding - $query = preg_replace("/$col\s*=\s*'/", "$col = '", $query); - - $found = array(); - $search = "$col = '"; - $pos = -1; - do { - $pos = strpos($query, $search, $pos + 1); - if ( false !== $pos ) { - $startpos = strpos($query, "'", $pos + strlen($search) ); - $val = substr($query, $pos + strlen($search), $startpos - $pos - strlen($search) ); - $found[$val] = 1; - } - } while ( false !== $pos ); - - if ( ! $found || ( count($found) > 1 ) ) - return; // query contains zero or multiple equality clauses for requested variable (currently not considering IN clauses) - - return $this->get_from_val($what, $val, $src); - } - - function get_from_val( $what, $val, $src ) { - if ( ! $src = $this->get($src) ) - return $val; - - if ( ! empty ( $src->value_arrays[$what] ) ) { - $array_property = $src->value_arrays[$what]; - if ( $it = array_search($val, $src->$array_property ) ) - return $it; - } - - if ( empty( $src->collections[$what] ) ) - return $val; - - $collection_property = $src->collections[$what]; - if ( empty( $src->$collection_property ) ) - return $val; - - // Our value should match a value in the Data_Source::$collection_property array - // ... but if that array contains objects, our value should match the "val" property of one of those objects. Blah; this is not fit for human consumption. - if ( is_object( current($src->$collection_property) ) ) { - foreach( array_keys($src->$collection_property) as $it ) - if ( $src->$collection_property[$it]->val == $val ) - return $it; - } else - if ( $it = array_search($val, $src->$collection_property) ) - return $it; - - return $val; - } - - function get_varname( $var_type, $what_for, $src, $object_type = '') { - if ( ! $src = $this->get($src) ) - return; - - $vars = "{$var_type}_vars"; - - // return otype-specific variable, if defined - if ( ! empty($object_type) ) - if ( isset($src->object_types[$object_type]->$vars->$what_for[CURRENT_ACCESS_NAME_RS] ) ) - return $src->object_types[$object_type]->$vars->$what_for[CURRENT_ACCESS_NAME_RS]; - - if ( isset($src->$vars->$what_for) ) - return $src->$vars->$what_for; - elseif ( isset($src->cols->$what_for) ) - return $src->cols->$what_for; - else - return $what_for; - } -} - - -// Note: These classes are currently for API support only; -// Internal usage (below) mirrors this interface but instantiates via stdObject cast from array -class WP_Scoped_Data_Source extends AGP_Config_Item { - var $table_basename; // REQUIRED: database table name, without wp prefix - var $table; // generated from table_basename - var $table_alias = ''; // database table alias, if any, for use in queries - - var $display_name; // REQUIRED: proper case display name (singular) - var $display_name_plural = ''; // REQUIRED: proper case display name (plural) - - var $cols; // database column names. required keys: id, name, content - // optional keys: type, owner, parent, status, excerpt - - var $http_post_vars = array(); // http_post_vars[agp_key] = POST variable name for data indicated by agp_key, if it differs from cols[agp_key] - var $uri_vars = array(); // uri_vars[agp_key] = URI variable name for data indicated by agp_key, if it differs from cols[agp_key] - var $uri_vars_alt; // (object) array( 'id' => array('post_id') ) - var $http_post_vars_alt; // (object) array( 'id' => array('post_id') ) - - var $collections = array(); // collections[ agp_key ] = child class property name, indicating child class array property ChildClass::collection_name[meaningful value] = whatever - // (i.e. in child class WP_Scoped_Data_Sources, - // collections['type'] = 'object_types' relates cols[id] to the WP_Scoped_Data_Source::object_types[object type name] = whatever, - // making it possible for AGP_Data_Sources:get_the_only to shortcut the detection process if the array has only one member - - var $value_arrays = array(); - - var $object_types = array(); // array[obj type name] = various optional properties for object types included in this data source - // (if not set, default to single object type with same name as source) - // valid props: - // object_types[obj type name]->val = value string stored to DB, passed as POST variable - // ->uri_vars = array of otype-specific uri query variable names for source id : array( 'id' => array( 'front' => 'page_id' ) ) - // ->uri = array of uri substrings which indicate this object type - - var $statuses = array(); // statuses = array[access_name] = array( status_name => status_type_val ) - // (indicates statuses valid for display in the specified access type, and the values representing them in DB record and POST vars) - - var $usage; // see core_default_data_sources in defaults_rs.php - - var $is_taxonomy = 0; // This data source stores taxonomy terms (may be WP core "taxonomy" or other) - var $taxonomy_only = 0; // This data source is significant only as a taxonomy for other data sources - var $uses_taxonomies = array(); - - var $query_hooks; // (object) array( 'request' => 'posts_request', 'results' => 'posts_results', 'listing' => 'the_posts' ), - var $query_replacements = array(); - - var $reqd_caps = array(); // see core_default_data_sources in defaults_rs.php - var $users_where_reqd_caps = array(); // '' - var $terms_where_reqd_caps = array(); // '' - - var $no_object_roles = 0; - var $edit_url = ''; // URL to object editor, includes [id] placeholder - - // usage: $src = new WP_Scoped_Data_Source, then set additional properties on $src - function WP_Scoped_Data_Source( $name, $defining_module_name, $display_name, $display_name_plural, $table_basename, $col_id, $col_name, $args = '' ) { - $this->cols = (object) array( 'id' => $col_id, 'name' => $col_name ); - - $this->AGP_Config_Item($name, $defining_module_name, $args); - - $this->display_name = $display_name; - $this->display_name_plural = $display_name_plural; - $this->table_basename = $table_basename; - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/db-config_rs.php b/blog/wp-content/plugins/role-scoper/db-config_rs.php deleted file mode 100644 index 32b57cf..0000000 --- a/blog/wp-content/plugins/role-scoper/db-config_rs.php +++ /dev/null @@ -1,63 +0,0 @@ -user2role2object_rs = $wpdb->prefix . 'user2role2object_rs'; -$wpdb->role_scope_rs = $wpdb->prefix . 'role_scope_rs'; - -//default names for tables which might otherwise be replaced by existing groups & user2group tables from an external forum app -// (must be stored within the Wordpress DB) -$prefix = ( ! empty($wpdb->base_prefix) && $sitewide_groups ) ? $wpdb->base_prefix : $wpdb->prefix; - -$wpdb->groups_basename = 'groups_rs'; -$wpdb->groups_rs = $prefix . $wpdb->groups_basename; - -$wpdb->user2group_rs = $prefix . 'user2group_rs'; - - -//default column names for groups table; may need to change if using another app's table -// (note, if no equivalent column exists in the existing table, scoper column can usually be created without bothering the other app) -$wpdb->groups_id_col = 'ID'; -$wpdb->groups_name_col = 'group_name'; -$wpdb->groups_descript_col = 'group_description'; -$wpdb->groups_homepage_col = 'group_homepage'; -$wpdb->groups_meta_id_col = 'group_meta_id'; - -//default column names for user2group table; may need to change if using another app's table -// (note, if no equivalent column exists in the existing table, scoper column can usually be created without bothering the other app) -$wpdb->user2group_gid_col = 'group_id'; -$wpdb->user2group_uid_col = 'user_id'; -$wpdb->user2group_assigner_id_col = 'assigner_id'; - - -// sample integration with Vanilla (not recently tested or officially supported): -// For groups and user2groups tables, user Vanilla forum's lum_role and lum_userrole (possible only if these are installed within WP database) -//$wpdb->groups_rs = 'lum_role'; -//$wpdb->user2group_rs = 'lum_userrole'; - -//$wpdb->groups_id_col = 'RoleID'; -//$wpdb->groups_name_col = 'Name'; -//$wpdb->groups_descript_col = 'Description'; - -//$wpdb->user2group_gid_col = 'RoleID'; -//$wpdb->user2group_uid_col = 'UserID'; - -// NOTE: default value insertion for custom group tables is not yet implemented by RS -//default values to insert into specified columns of shared tables -// i.e. when using Vanilla 1.03 "Roles" table for scoper groups, insert default Vanilla Member permissions: -//$default_value[$groups]['Permissions'] = 'a:33:{s:23:"PERMISSION_ADD_COMMENTS";i:1;s:27:"PERMISSION_START_DISCUSSION";i:1; ... - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/db-setup_rs.php b/blog/wp-content/plugins/role-scoper/db-setup_rs.php deleted file mode 100644 index 85aa991..0000000 --- a/blog/wp-content/plugins/role-scoper/db-setup_rs.php +++ /dev/null @@ -1,427 +0,0 @@ -groups_id_col] = "bigint(20) NOT NULL auto_increment"; - $cols[$wpdb->groups_name_col] = "text NOT NULL"; - $cols[$wpdb->groups_descript_col] = "text NOT NULL"; - $cols[$wpdb->groups_homepage_col] = "varchar(128) NOT NULL default ''"; - $cols[$wpdb->groups_meta_id_col] = "varchar(64) NOT NULL default ''"; - - if($tables = $wpdb->get_col('SHOW TABLES;')) - foreach($tables as $table) - if ($table == $wpdb->groups_rs) - break; - - if ( $table != $wpdb->groups_rs ) { //group table doesn't already exist - $query = "CREATE TABLE IF NOT EXISTS " . $wpdb->groups_rs . ' ('; - - foreach ($cols as $colname => $typedef) - $query .= $colname . ' ' . $typedef . ','; - - $query .= " PRIMARY KEY ($wpdb->groups_id_col)," - . " KEY meta_id ($wpdb->groups_meta_id_col, $wpdb->groups_id_col) );"; - - $wpdb->query($query); - - } else { - //specified group table exists already, so do not alter any existing columns - // (we're not fussy about data types since the joins to these tables are infrequent and/or buffered, - // but other app(s) might be fussy). - - $tablefields = $wpdb->get_col("DESC $wpdb->groups_rs", 0); - - if ( $add_cols = array_diff_key( $cols, array_flip($tablefields) ) ) { - foreach ( $add_cols as $requiredcol_name => $requiredcol_typedef ) { - if ( $requiredcol_name == $wpdb->groups_id_col ) // don't try to add id column - continue; - - $wpdb->query("ALTER TABLE $wpdb->groups_rs ADD COLUMN $requiredcol_name $requiredcol_typedef"); - - if ( $wpdb->groups_meta_id_col == $requiredcol_name ) - $wpdb->query( "CREATE INDEX meta_id ON $wpdb->groups_rs ($wpdb->groups_meta_id_col, $wpdb->groups_id_col)" ); - } - } - - if ( ! version_compare( $last_db_ver, '1.0.2', '>=') ) { - // DB version < 1.0.2 used varchar columns, which don't support unicode - $wpdb->query("ALTER TABLE $wpdb->groups_rs MODIFY COLUMN $wpdb->groups_name_col text NOT NULL"); - $wpdb->query("ALTER TABLE $wpdb->groups_rs MODIFY COLUMN $wpdb->groups_descript_col text NOT NULL"); - } - - if ( ! version_compare( $last_db_ver, '1.1.1', '>=') ) { - $query = "ALTER TABLE $wpdb->groups_rs MODIFY $wpdb->groups_meta_id_col VARCHAR(64)"; - $wpdb->query($query); - } - } - - - // User2Group table def (use existing table from other app if so defined in grp-config.php) - $cols = array(); - $cols[$wpdb->user2group_gid_col] = "bigint(20) unsigned NOT NULL default '0'"; - $cols[$wpdb->user2group_uid_col] = "bigint(20) unsigned NOT NULL default '0'"; - $cols[$wpdb->user2group_assigner_id_col] = "bigint(20) unsigned NOT NULL default '0'"; - - if($tables = $wpdb->get_col('SHOW TABLES;')) - foreach($tables as $table) - if ($table == $wpdb->user2group_rs) - break; - - if ( $table != $wpdb->user2group_rs ) { // table doesn't already exist - - $query = "CREATE TABLE IF NOT EXISTS " . $wpdb->user2group_rs . ' ('; - - foreach ($cols as $colname => $typedef) - $query .= $colname . ' ' . $typedef . ','; - - $query .= "PRIMARY KEY user2group ($wpdb->user2group_uid_col, $wpdb->user2group_gid_col));"; - - $wpdb->query($query); - - } else { - - // if existing table was found but specified groupid and userid columns are invalid, bail - $tablefields = $wpdb->get_col("DESC $wpdb->user2group_rs", 0); - - foreach ($tablefields as $column) if ($column == $wpdb->user2group_gid_col) break; - if ($column != $wpdb->user2group_gid_col) - wp_die ( sprintf( 'Database config error: specified ID column (%1$s) not found in table %2$s', $wpdb->user2group_gid_col, $wpdb->user2group_rs ) ); - - foreach ($tablefields as $column) if ($column == $wpdb->user2group_uid_col) break; - if ($column != $wpdb->user2group_uid_col) - wp_die ( sprintf( 'Database config error: specified ID column (%1$s) not found in table %2$s', $wpdb->user2group_uid_col, $wpdb->user2group_rs ) ); - - foreach ($cols as $requiredcol_name => $requiredcol_typedef) { - foreach ($tablefields as $col_name) - if ($requiredcol_name == $col_name) break; - - if ($requiredcol_name != $col_name) - //column was not found, so create it - $wpdb->query("ALTER TABLE $wpdb->user2group_rs ADD COLUMN $requiredcol_name $requiredcol_typedef"); - } - } - - $tabledefs=''; - - /* user2role2object_rs: - - (scope == 'object' ) => for the specified object, all users in specified group have all caps in specified role - - OR - - (scope == 'term' ) => for all entities for which the specified object is a category, all users in specified group have all caps in specified role - - (assign_for = 'children' or 'both' ) => new children of the specified object inherit this object_role_name - - Abstract object type to support group control of new content-specific roles without revising db schema - - note: Term roles are retrieved and buffered into memory for the current user at login. - */ - - // note: dbDelta_rs requires two spaces after PRIMARY KEY, no spaces between KEY columns - $tabledefs .= "CREATE TABLE $wpdb->user2role2object_rs ( - assignment_id bigint(20) unsigned NOT NULL auto_increment, - user_id bigint(20) unsigned NULL, - group_id bigint(20) unsigned NULL, - role_name varchar(32) NOT NULL default '', - role_type enum('rs', 'wp', 'wp_cap') NOT NULL default 'rs', - scope enum('blog', 'term', 'object') NOT NULL, - src_or_tx_name varchar(32) NOT NULL default '', - obj_or_term_id bigint(20) unsigned NOT NULL default '0', - assign_for enum('entity', 'children', 'both') NOT NULL default 'entity', - inherited_from bigint(20) unsigned NOT NULL default '0', - assigner_id bigint(20) unsigned NOT NULL default '0', - date_limited tinyint(2) NOT NULL default '0', - start_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', - end_date_gmt datetime NOT NULL default '2035-01-01 00:00:00', - content_date_limited tinyint(2) NOT NULL default '0', - content_min_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', - content_max_date_gmt datetime NOT NULL default '2035-01-01 00:00:00', - PRIMARY KEY (assignment_id), - KEY role2obj (scope,assign_for,role_type,role_name,src_or_tx_name,obj_or_term_id), - KEY role2agent (assign_for,scope,role_type,role_name,group_id,user_id), - KEY role_rs (date_limited,role_type,role_name,scope,assign_for,src_or_tx_name,group_id,user_id,obj_or_term_id), - KEY role_assignments (role_name,role_type,scope,assign_for,src_or_tx_name,group_id,user_id,obj_or_term_id,inherited_from,assignment_id) - ); - "; - - $tabledefs .= "CREATE TABLE $wpdb->role_scope_rs ( - requirement_id bigint(20) NOT NULL auto_increment, - role_name varchar(32) NOT NULL default '', - role_type enum('rs', 'wp', 'wp_cap') NOT NULL default 'rs', - topic enum('blog', 'term', 'object') NOT NULL, - src_or_tx_name varchar(32) NOT NULL default '', - obj_or_term_id bigint(20) NOT NULL default '0', - max_scope enum('blog', 'term', 'object') NOT NULL, - require_for enum('entity', 'children', 'both') NOT NULL default 'entity', - inherited_from bigint(20) NOT NULL default '0', - PRIMARY KEY (requirement_id), - KEY role_scope (max_scope,topic,require_for,role_type,role_name,src_or_tx_name,obj_or_term_id), - KEY role_scope_assignments (max_scope,topic,require_for,role_type,role_name,src_or_tx_name,obj_or_term_id,inherited_from,requirement_id) - ); - "; - - // apply all table definitions - dbDelta_rs($tabledefs); - -} //end update_schema function - - -function scoper_update_supplemental_schema($table_name) { - global $wpdb; - - if ( 'data_rs' == $table_name ) { - $tabledefs .= "CREATE TABLE {$wpdb->prefix}{$table_name} ( - rs_id bigint(20) NOT NULL auto_increment, - topic enum('term', 'object') default 'object', - src_or_tx_name varchar(32) NOT NULL default '', - object_type varchar(32) NOT NULL default '', - actual_id bigint(20) NOT NULL default '0', - name text NOT NULL, - parent bigint(20) NOT NULL default '0', - owner bigint(20) NOT NULL default '0', - status varchar(20) NOT NULL default '', - PRIMARY KEY (rs_id), - KEY actual_id (actual_id,src_or_tx_name,object_type,topic) - ); - "; - - // apply all table definitions - dbDelta_rs($tabledefs); - - return true; - } -} - - -/** - * {@internal Missing Short Description}} - * - * {@internal Missing Long Description}} - * - * @since unknown - * - * @param unknown_type $queries - * @param unknown_type $execute - * @return unknown - */ -function dbDelta_rs($queries, $execute = true) { // lifted from MU 2.8.4a because forced inclusion of schema.php by Role Scoper interferes with blog creation - global $wpdb; - - // Separate individual queries into an array - if( !is_array($queries) ) { - $queries = explode( ';', $queries ); - if('' == $queries[count($queries) - 1]) array_pop($queries); - } - - $cqueries = array(); // Creation Queries - $iqueries = array(); // Insertion Queries - $for_update = array(); - - // Create a tablename index for an array ($cqueries) of queries - foreach($queries as $qry) { - if(preg_match("|CREATE TABLE (?:IF NOT EXISTS )?([^ ]*)|", $qry, $matches)) { - $cqueries[trim( strtolower($matches[1]), '`' )] = $qry; - $for_update[$matches[1]] = 'Created table '.$matches[1]; - } - else if(preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) { - array_unshift($cqueries, $qry); - } - else if(preg_match("|INSERT INTO ([^ ]*)|", $qry, $matches)) { - $iqueries[] = $qry; - } - else if(preg_match("|UPDATE ([^ ]*)|", $qry, $matches)) { - $iqueries[] = $qry; - } - else { - // Unrecognized query type - } - } - - // Check to see which tables and fields exist - if($tables = $wpdb->get_col('SHOW TABLES;')) { - // For every table in the database - foreach($tables as $table) { - // If a table query exists for the database table... - if( array_key_exists(strtolower($table), $cqueries) ) { - // Clear the field and index arrays - unset($cfields); - unset($indices); - // Get all of the field names in the query from between the parens - preg_match("|\((.*)\)|ms", $cqueries[strtolower($table)], $match2); - $qryline = trim($match2[1]); - - // Separate field lines into an array - $flds = explode("\n", $qryline); - - // For every field line specified in the query - foreach($flds as $fld) { - // Extract the field name - preg_match("|^([^ ]*)|", trim($fld), $fvals); - $fieldname = trim( $fvals[1], '`' ); - - // Verify the found field name - $validfield = true; - switch(strtolower($fieldname)) - { - case '': - case 'primary': - case 'index': - case 'fulltext': - case 'unique': - case 'key': - $validfield = false; - $indices[] = trim(trim($fld), ", \n"); - break; - } - $fld = trim($fld); - - // If it's a valid field, add it to the field array - if($validfield) { - $cfields[strtolower($fieldname)] = trim($fld, ", \n"); - } - } - - // Fetch the table column structure from the database - $tablefields = $wpdb->get_results("DESCRIBE {$table};"); - - // For every field in the table - foreach($tablefields as $tablefield) { - // If the table field exists in the field array... - if(array_key_exists(strtolower($tablefield->Field), $cfields)) { - // Get the field type from the query - preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches); - $fieldtype = $matches[1]; - - // Is actual field type different from the field type in query? - if($tablefield->Type != $fieldtype) { - // Add a query to change the column type - $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)]; - $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}"; - } - - // Get the default value from the array - //echo "{$cfields[strtolower($tablefield->Field)]}
    "; - if(preg_match("| DEFAULT '(.*)'|i", $cfields[strtolower($tablefield->Field)], $matches)) { - $default_value = $matches[1]; - if($tablefield->Default != $default_value) - { - // Add a query to change the column's default value - $cqueries[] = "ALTER TABLE {$table} ALTER COLUMN {$tablefield->Field} SET DEFAULT '{$default_value}'"; - $for_update[$table.'.'.$tablefield->Field] = "Changed default value of {$table}.{$tablefield->Field} from {$tablefield->Default} to {$default_value}"; - } - } - - // Remove the field from the array (so it's not added) - unset($cfields[strtolower($tablefield->Field)]); - } - else { - // This field exists in the table, but not in the creation queries? - } - } - - // For every remaining field specified for the table - foreach($cfields as $fieldname => $fielddef) { - // Push a query line into $cqueries that adds the field to that table - $cqueries[] = "ALTER TABLE {$table} ADD COLUMN $fielddef"; - $for_update[$table.'.'.$fieldname] = 'Added column '.$table.'.'.$fieldname; - } - - // Index stuff goes here - // Fetch the table index structure from the database - $tableindices = $wpdb->get_results("SHOW INDEX FROM {$table};"); - - if($tableindices) { - // Clear the index array - unset($index_ary); - - // For every index in the table - foreach($tableindices as $tableindex) { - // Add the index to the index data array - $keyname = $tableindex->Key_name; - $index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part); - $index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false; - } - - // For each actual index in the index array - foreach($index_ary as $index_name => $index_data) { - // Build a create string to compare to the query - $index_string = ''; - if($index_name == 'PRIMARY') { - $index_string .= 'PRIMARY '; - } - else if($index_data['unique']) { - $index_string .= 'UNIQUE '; - } - $index_string .= 'KEY '; - if($index_name != 'PRIMARY') { - $index_string .= $index_name; - } - $index_columns = ''; - // For each column in the index - foreach($index_data['columns'] as $column_data) { - if($index_columns != '') $index_columns .= ','; - // Add the field to the column list string - $index_columns .= $column_data['fieldname']; - if($column_data['subpart'] != '') { - $index_columns .= '('.$column_data['subpart'].')'; - } - } - // Add the column list to the index create string - $index_string .= ' ('.$index_columns.')'; - if(!(($aindex = array_search($index_string, $indices)) === false)) { - unset($indices[$aindex]); - } - } - } - - // For every remaining index specified for the table - foreach ( (array) $indices as $index ) { - // Push a query line into $cqueries that adds the index to that table - $cqueries[] = "ALTER TABLE {$table} ADD $index"; - $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index; - } - - // Remove the original table creation query from processing - unset($cqueries[strtolower($table)]); - unset($for_update[strtolower($table)]); - } else { - // This table exists in the database, but not in the creation queries? - } - } - } - - $allqueries = array_merge($cqueries, $iqueries); - if($execute) { - foreach($allqueries as $query) { - $wpdb->query($query); - } - } - - return $for_update; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/defaults_rs.php b/blog/wp-content/plugins/role-scoper/defaults_rs.php deleted file mode 100644 index 7e6bea3..0000000 --- a/blog/wp-content/plugins/role-scoper/defaults_rs.php +++ /dev/null @@ -1,736 +0,0 @@ - 1, - 'define_usergroups' => 1, - 'enable_group_roles' => 1, - 'enable_user_roles' => 1, - 'role_type' => 'rs', - /*'rs_blog_roles' => 1, */ - 'custom_user_blogcaps' => 0, - 'enable_wp_taxonomies' => array(), /* NOTE: category and link_category taxonomies are always enabled by hardcode (but their roles/restrictions can be disabled via otype option) */ - 'user_role_caps' => array(), /* NOTE: "user" here does not refer to WP user account(s), but to the user of the plugin. The option value adds capabilities to RS Role Definitions, and would have been better named "custom_role_caps" */ - 'disabled_role_caps' => array(), - 'disabled_access_types' => array(), - 'no_frontend_admin' => 0, - 'indicate_blended_roles' => 1, - 'version_update_notice' => 1, - 'version_check_minutes' => 30, - 'strip_private_caption' => 0, - 'display_hints' => 1, - 'hide_non_editor_admin_divs' => 1, - 'role_admin_blogwide_editor_only' => 0, - 'feed_link_http_auth' => 'logged', - 'rss_private_feed_mode' => 'title_only', - 'rss_nonprivate_feed_mode' => 'full_content', - 'feed_teaser' => "View the content of this article", - 'rs_page_reader_role_objscope' => 0, - 'rs_page_author_role_objscope' => 0, - 'rs_post_reader_role_objscope' => 0, - 'rs_post_author_role_objscope' => 0, - 'rs_page_revisor_role_objscope' => 0, - 'rs_post_revisor_role_objscope' => 0, - 'lock_top_pages' => 0, - 'display_user_profile_groups' => 1, - 'display_user_profile_roles' => 1, - 'user_role_assignment_csv' => 0, - 'admin_others_unattached_files' => 0, - 'remap_page_parents' => 0, - 'enforce_actual_page_depth' => 1, - 'remap_thru_excluded_page_parent' => 0, - 'remap_term_parents' => 0, - 'enforce_actual_term_depth' => 1, - 'remap_thru_excluded_term_parent' => 0, - 'limit_user_edit_by_level' => 1, - 'file_filtering' => 0, - 'mu_sitewide_groups' => 1, // version check code will set this to 0 for first-time execution of this version on mu installations that ran a previous RS version - 'role_duration_limits' => 1, - 'role_content_date_limits' => 1, - 'filter_users_dropdown' => 1, - 'auto_private' => 1 - ); - - return $def; -} - -function scoper_po_trigger( $string ) { - return $string; -} - -function scoper_default_otype_options() { - $def = array(); - - //------------------------ DEFAULT OBJECT TYPE OPTIONS --------------------- - // format for second key is {src_name}:{object_type} - $def['do_teaser'] ['post'] = false; // enable/disable teaser for WP posts and pages - $def['use_teaser'] ['post:post'] = 1; // use teaser (if enabled) for WP posts. Note: Use integer because this option is multi-select. Other valid setting is "excerpt" - $def['use_teaser'] ['post:page'] = 1; // use teaser (if enabled) for WP pages - $def['teaser_hide_private']['post:post'] = 0; - $def['teaser_hide_private']['post:page'] = 0; - $def['teaser_logged_only'] ['post:post'] = 0; - $def['teaser_logged_only'] ['post:page'] = 0; - - $def['teaser_replace_content'] ['post:post'] = scoper_po_trigger( "Sorry, this content requires additional permissions. Please contact an administrator for help." ); - $def['teaser_replace_content_anon'] ['post:post'] = scoper_po_trigger( "Sorry, you don't have access to this content. Please log in or contact a site administrator for help." ); - $def['teaser_prepend_content'] ['post:post'] = ''; - $def['teaser_prepend_content_anon'] ['post:post'] = ''; - $def['teaser_append_content'] ['post:post'] = ''; - $def['teaser_append_content_anon'] ['post:post'] = ''; - $def['teaser_prepend_name'] ['post:post'] = '('; - $def['teaser_prepend_name_anon'] ['post:post'] = '('; - $def['teaser_append_name'] ['post:post'] = ')*'; - $def['teaser_append_name_anon'] ['post:post'] = ')*'; - $def['teaser_replace_excerpt'] ['post:post'] = ''; - $def['teaser_replace_excerpt_anon'] ['post:post'] = ''; - $def['teaser_prepend_excerpt'] ['post:post'] = ''; - $def['teaser_prepend_excerpt_anon'] ['post:post'] = ''; - $def['teaser_append_excerpt'] ['post:post'] = "
    " . scoper_po_trigger( "note: This content requires a higher login level." ) . ""; - $def['teaser_append_excerpt_anon'] ['post:post'] = "
    " . scoper_po_trigger( "note: This content requires site login." ) . ""; - - $def['teaser_replace_content'] ['post:page'] = scoper_po_trigger( "Sorry, this content requires additional permissions. Please contact an administrator for help." ); - $def['teaser_replace_content_anon'] ['post:page'] = scoper_po_trigger( "Sorry, you don't have access to this content. Please log in or contact a site administrator for help." ); - $def['teaser_prepend_content'] ['post:page'] = ''; - $def['teaser_prepend_content_anon'] ['post:page'] = ''; - $def['teaser_append_content'] ['post:page'] = ''; - $def['teaser_append_content_anon'] ['post:page'] = ''; - $def['teaser_prepend_name'] ['post:page'] = '('; - $def['teaser_prepend_name_anon'] ['post:page'] = '('; - $def['teaser_append_name'] ['post:page'] = ')*'; - $def['teaser_append_name_anon'] ['post:page'] = ')*'; - $def['teaser_replace_excerpt'] ['post:page'] = ''; - $def['teaser_replace_excerpt_anon'] ['post:page'] = ''; - $def['teaser_prepend_excerpt'] ['post:page'] = ''; - $def['teaser_prepend_excerpt_anon'] ['post:page'] = ''; - $def['teaser_append_excerpt'] ['post:page'] = "
    " . scoper_po_trigger( "note: This content requires a higher login level." ) . ""; - $def['teaser_append_excerpt_anon'] ['post:page'] = "
    " . scoper_po_trigger( "note: This content requires site login." ) . ""; - - $def['admin_css_ids'] ['post:post'] = 'password-span; slugdiv; authordiv; commentstatusdiv; trackbacksdiv; postcustom; revisionsdiv'; - $def['admin_css_ids'] ['post:page'] = 'password-span; pageslugdiv; pageauthordiv; pageparentdiv; pagecommentstatusdiv; pagecustomdiv; revisionsdiv'; - - $def['use_term_roles']['post:post'] = 1; - $def['use_term_roles']['post:page'] = 0; // Wordpress core does not categorize pages by default - $def['use_term_roles']['link:link'] = 1; - - $def['use_object_roles']['post:post'] = 1; - $def['use_object_roles']['post:page'] = 1; - - $def['limit_object_editors']['post:post'] = 0; - $def['limit_object_editors']['post:page'] = 0; - - $def['private_items_listable']['post:page'] = 1; - - $def['default_private']['post:post'] = 0; - $def['default_private']['post:page'] = 0; - - $def['sync_private']['post:post'] = 0; - $def['sync_private']['post:page'] = 0; - - $def['restrictions_column']['post:post'] = 1; - $def['restrictions_column']['post:page'] = 1; - - $def['term_roles_column']['post:post'] = 1; - $def['term_roles_column']['post:page'] = 1; - - $def['object_roles_column']['post:post'] = 1; - $def['object_roles_column']['post:page'] = 1; - - return $def; -} - -function scoper_core_access_types() { - $arr = array( 'front' => (object) array(), 'admin' => (object) array() ); - - if ( is_admin() ) { - $arr['front']->display_name = __('front-end', 'scoper'); - $arr['admin']->display_name = __('admin', 'scoper'); - } - - return $arr; -} - -function scoper_core_data_sources() { - global $wpdb; - - $arr = array(); - - $is_admin = is_admin(); - - $name = 'post'; - $arr[$name] = (object) array( - 'table_basename' => 'posts', - 'cols' => (object) array( - 'id' => 'ID', 'name' => 'post_title', 'type' => 'post_type', - 'owner' => 'post_author', 'content' => 'post_content', 'parent' => 'post_parent', - 'status' => 'post_status', 'excerpt' => 'post_excerpt', 'date' => 'post_date_gmt' - ), - 'http_post_vars' => (object) array( 'id' => 'post_ID', 'category' => 'post_category' ), - 'uri_vars' => (object) array( 'id' => 'post' ), - 'uri_vars_alt' => (object) array( 'id' => array('post_id') ), - 'http_post_vars_alt' => (object) array( 'id' => array('post_id') ), - - 'collections' => array ('type' => 'object_types'), - 'value_arrays' => array ('status' => 'statuses'), - 'object_types' => array( - 'post' => (object) array( - 'val' => 'post', - 'uri' => array( 'wp-admin/post.php', 'wp-admin/post-new.php', 'wp-admin/edit.php' ), - 'admin_default_hide_empty' => true, - 'admin_max_unroled_objects' => 100, - 'ignore_object_hierarchy' => true - ), - 'page' => (object) array( - 'val' => 'page', - 'function' => 'is_page', - 'wp_cache_all_group' => 'get_pages', - 'uri_vars' => (object) array( 'id' => array( 'front' => 'page_id' ) ), - 'uri' => array( 'wp-admin/page.php', 'wp-admin/page-new.php', 'wp-admin/edit-pages.php' ) - ) - ), - - 'statuses' => array( - 'published' => 'publish', 'private' => 'private', 'draft' => 'draft', 'future' => 'future', 'pending' => 'pending', 'trash' => 'trash' - ), - - 'usage' => (object) array( - 'statuses' => (object) array( - 'access_type' => array( - 'front' => array( 'published', 'private' ), - 'admin' => array( 'published', 'private', 'draft', 'future', 'pending', 'trash' ) - ) - ) - ), - - 'uses_taxonomies' => array( 'category' ), - - 'query_hooks' => (object) array( 'request' => 'posts_request', 'results' => 'posts_results', 'listing' => 'the_posts' ), - - 'query_replacements' => array( "OR post_author = [user_id] AND post_status = 'private'" => "OR post_status = 'private'" ), - - // This is somewhat redundant with cap_defs, but does allow for a clear distinction between - // caps which are defined (cap defs) and caps which are always required for common operations (this array) - // - // user_can_admin functions require these caps if defined for object type, otherwise require cap_defs with matching op_type, object_type and status - 'reqd_caps' => array( - 'read' => array( - 'post' => array( - 'published' => array( 'read' ), - 'private' => array( 'read', 'read_private_posts' ) - ), - 'page' => array( - 'published' => array( 'read' ), - 'private' => array( 'read', 'read_private_pages' ) - ) - ), - 'edit' => array( - 'post' => array( - 'published' => array( 'edit_others_posts', 'edit_published_posts' ), - 'private' => array( 'edit_others_posts', 'edit_published_posts', 'edit_private_posts' ), - 'draft' => array( 'edit_others_posts' ), - 'pending' => array( 'edit_others_posts' ), - 'future' => array( 'edit_others_posts' ), - 'trash' => array( 'edit_others_posts' ) - ), - 'page' => array( - 'published' => array( 'edit_others_pages', 'edit_published_pages' ), - 'private' => array( 'edit_others_pages', 'edit_published_pages', 'edit_private_pages' ), - 'draft' => array( 'edit_others_pages' ), - 'pending' => array( 'edit_others_pages' ), - 'future' => array( 'edit_others_pages' ), - 'trash' => array( 'edit_others_pages' ) - ) - ), - 'admin' => array( - 'post' => array( - 'published' => array( 'delete_others_posts', 'delete_published_posts' ), - 'private' => array( 'delete_others_posts', 'delete_published_posts', 'delete_private_posts' ), - 'draft' => array( 'delete_others_posts' ), - 'pending' => array( 'delete_others_posts' ), - 'future' => array( 'delete_others_posts' ), - 'trash' => array( 'delete_others_posts' ) - ), - 'page' => array( - 'published' => array( 'delete_others_pages', 'delete_published_pages' ), - 'private' => array( 'delete_others_pages', 'delete_published_pages', 'delete_private_pages' ), - 'draft' => array( 'delete_others_pages' ), - 'pending' => array( 'delete_others_pages' ), - 'future' => array( 'delete_others_pages' ), - 'trash' => array( 'delete_others_posts' ) - ) - ) - ), - - 'terms_where_reqd_caps' => array( // note: This criteria is not used to determine the data source, since taxonomy is always supplied to get_terms - 'front' => array( - '' => array( 'post' => array('read') ) - ), - 'admin' => array( - 'wp-admin/categories.php' => array( 'post' => array('manage_categories') ), - 'wp-admin/page.php' => array( 'page' => array('edit_pages') ), - 'wp-admin/page-new.php' => array( 'page' => array('edit_pages') ), - '' => array( 'post' => array('edit_posts'), 'page' => array('edit_pages') ) - ) - ), - - 'users_where_reqd_caps' => array( // note: A positive URI match can be used to determine data source and cap requirements. - 'front' => array( // If data source is known but URI not matched, default capreq will be used. - '' => array( 'read' ) - ), - 'admin' => array( - 'wp-admin/post-new.php' => array( 'edit_posts' ), - 'wp-admin/post.php' => array( 'edit_posts' ), - 'wp-admin/page-new.php' => array( 'edit_pages' ), - 'wp-admin/page.php' => array( 'edit_pages' ), - '' => array( 'edit_posts' ) - ) - ), - ); // end outer array - - $arr[$name]->query_replacements = array( "OR $wpdb->posts.post_author = [user_id] AND $wpdb->posts.post_status = 'private'" => "OR $wpdb->posts.post_status = 'private'" ); - - // preview supports non-published statuses, but requires edit capability - if ( ! empty($_GET['preview']) ) { - $arr[$name]->usage->statuses->access_type['front'] = array( 'draft', 'pending', 'future', 'published', 'private' ); - $arr[$name]->reqd_caps['read']['post'] = array ( 'draft' => array('edit_others_posts'), 'pending' => array('edit_others_posts'), 'future' => array('edit_others_posts'), 'published' => array('edit_others_posts'), 'private' => array('edit_others_posts') ); - $arr[$name]->reqd_caps['read']['page'] = array ( 'draft' => array('edit_others_pages'), 'pending' => array('edit_others_pages'), 'future' => array('edit_others_pages'), 'published' => array('edit_others_pages'), 'private' => array('edit_others_pages') ); - } - - /* Post data source and others following the "save_{src_name}", etc. pattern - do not actually need to set these properties because these associations will be made by default - - $arr[$name]->admin_actions = (object) array( - 'save_object' => "save_post", 'edit_object' => "edit_post", - 'create_object' => '', 'delete_object' => "delete_post", - 'object_edit_ui' => '' ); // post data source defines an object_type-specific object_edit_ui hook - - $arr[$name]->admin_filters->pre_object_status = 'pre_post_status'; - */ - - // note: Inserting Role Scoper's role assignment interface into a Custom-defined Data Source's own item edit form - // requires two configuration steps: - // 1. Set the object_edit_ui property to an action you call at the appropriate time - // 2. Add the corresponding script name via 'item_edit_scripts_rs' filter - // The default value passed by that filter is array('wp-admin/post-new.php', 'wp-admin/post.php', 'wp-admin/page.php', 'wp-admin/page-new.php', 'wp-admin/categories.php') ); - - // define html inserts for object role administration only if this is an admin URI - if ( $is_admin ) { - $arr['post']->display_name = __awp('Post'); - $arr['post']->display_name_plural = __awp('Posts'); - - $arr['post']->object_types['post']->display_name = __awp('Post'); - $arr['post']->object_types['post']->display_name_plural = __awp('Posts'); - - $arr['post']->object_types['page']->display_name = __awp('Page'); - $arr['post']->object_types['page']->display_name_plural = __awp('Pages'); - - $arr['post']->edit_url = 'post.php?action=edit&post=%d'; // xhtml validation fails with &post= - - // Sample code: Old pre-WP2.3 syntax for registering metabox action and markup can be used for custom data sources - /* - $arr['your_source_name']->admin_actions = (object) array( 'object_edit_ui' => 'your_action_name' ); - // - or - - $arr['your_source_name']->object_types['your_object_type_name']->admin_actions = (object) array( 'object_edit_ui' => 'your_action_name' ); - - $inserts = (object) array(); - - $inserts->bottom->open = (object) array( - 'container' => '
    ' . "\r\n" . '
    ', - 'headline' => '
    ' . "\r\n" . '

    ', - 'content' => '
    ' . "\r\n" . '
    ' ); - - $inserts->bottom->close = (object) array( - 'container' => '

    ', 'headline' => '', 'content' => '' ); - - $arr['post']->admin_inserts = (object) $inserts; - */ - - } //endif is_admin() - - if ( $is_admin || defined('XMLRPC_REQUEST') ) { - $name = 'link'; - $arr[$name] = (object) array( - 'table_basename' => 'links', - 'cols' => (object) array( - 'id' => 'link_id', 'name' => 'link_name', 'type' => '', - 'owner' => 'link_owner', 'status' => '' - ), - 'uses_taxonomies' => array( 'link_category' ), - - 'query_hooks' => (object) array( 'request' => 'links_request' ), - - 'no_object_roles' => true - ); // end outer array - $arr['link']->reqd_caps = array(); // object types with a single status store nullstring status key - $arr['link']->reqd_caps['admin']['link'][''] = array( 'manage_links' ); - $arr['link']->reqd_caps['edit']['link'][''] = array( 'manage_links' ); - $arr['link']->terms_where_reqd_caps['admin']['link'][''] = array( 'manage_links' ); - - if ( $is_admin ) { - $arr['link']->display_name = __('Link', 'scoper'); - $arr['link']->display_name_plural = __awp('Links'); - $arr['link']->edit_url = 'link.php?action=edit&link_id=%s'; - } - - - //groups table - // scoper-defined table can be customized via db-config_rs.php - $name = 'group'; - $arr[$name] = (object) array( - 'table_no_prefix' => true, - 'table_basename' => $wpdb->groups_rs, - 'cols' => (object) array( - 'id' => $wpdb->groups_id_col, 'name' => $wpdb->groups_name_col, 'owner' => '', 'status' => '', 'type' => '' - ), - 'uri_vars' => array( 'id' => 'id'), - 'http_post_vars' => array( 'id' => 'id'), - - 'query_hooks' => (object) array( 'request' => 'groups_request' ), - - ); // end outer array - $arr['group']->reqd_caps = array(); // object types with a single status store nullstring status key - $arr['group']->reqd_caps['admin']['group'][''] = array( 'manage_groups' ); - $arr['group']->reqd_caps['edit']['group'][''] = array( 'manage_groups' ); - - if ( $is_admin ) { - $arr['group']->display_name = __('Group', 'scoper'); - $arr['group']->display_name_plural = __('Groups', 'scoper'); - $arr['group']->edit_url = 'admin.php?page=rs-groups&mode=edit&id=%d'; - } - } - - - // Sample code: use the following syntax to define a custom taxonomy source (that doesn't use the wp_term_taxonomy table) - // ( WP_Scoped_Taxonomies::process will define default WP taxonomy source ) - /* - // note: also requires 'taxonomies' definition(s) - $name = 'your_taxonomy_source_name'; - $arr[$name] = (object) array( - 'table_basename' => 'categories', 'is_taxonomy' => true, 'taxonomy_only' => true, - 'cols' => (object) array( - 'id' => 'cat_ID', 'name' => 'cat_name', 'parent' => 'category_parent' - ), - 'http_post_vars' => (object) array( 'id' => 'cat_ID'), - 'uri_vars' => (object) array( 'id' => 'cat_ID' ) - ); // end outer array - */ - - return $arr; -} - - -function scoper_core_taxonomies() { - $arr = array(); - - $is_admin = is_admin(); - - $name = 'category'; - $arr[$name] = (object) array( - 'requires_term' => true, 'uses_standard_schema' => true, 'hierarchical' => true, 'default_term_option' => 'default_category', - 'admin_filters' => (object) array( 'pre_object_terms' => 'pre_post_category' ), - 'admin_actions' => (object) array( - 'create_term' => 'created_category', 'edit_term' => 'edit_category', 'delete_term' => 'delete_category', - 'save_term' => '', 'term_edit_ui' => 'edit_category_form' - ) - ); // end outer array - - if ( $is_admin ) { - $arr['category']->display_name = __awp('Category'); - $arr['category']->display_name_plural = __awp('Categories'); - $arr['category']->edit_url = 'categories.php?action=edit&cat_ID=%d'; - } - - // Sample code: use the following syntax to define custom taxonomies which use a custom source (not the wp_term_taxonomy table) - /* - $tx =& $arr['your_taxonomy_name']; - $tx->requires_term = 1; - $tx->uses_standard_schema = 0; // this would also be set false by WP_Taxonomies::process - - $tx->source = 'category'; // process_config will convert this to object reference - - $tx->table_term2obj_basename = 'post2cat'; - $tx->table_term2obj_alias = ''; - - $tx->cols = (object) array( - 'count' => 'category_count', 'term2obj_tid' => 'category_id', 'term2obj_oid' => 'post_id', - 'require_zero' => 'link_count', 'require_nonzero' => '' ); - - $tx->admin_actions->pre_object_terms = 'category_save_pre'; - */ - - // link filtering is only for management in wp-admin - if ( $is_admin || defined('XMLRPC_REQUEST') ) { - $name = 'link_category'; // note: also requires 'data_sources' definition - $arr[$name] = (object) array( - 'requires_term' => true, - 'uses_standard_schema' => true, 'hierarchical' => false, - 'default_term_option' => 'default_link_category', - 'admin_actions' => array ( 'term_edit_ui' => 'edit_link_category_form' ) - ); // end outer array - - $arr['link_category']->display_name = __('Link Category', 'scoper'); - $arr['link_category']->display_name_plural = __awp('Link Categories'); - $arr['link_category']->edit_url = 'categories.php?action=edit&cat_ID=%d'; - } - - return $arr; -} - - -function scoper_core_cap_defs() { - $arr = array( - 'read' => (object) array( 'src_name' => 'post', 'object_type' => '', 'op_type' => OP_READ_RS, 'owner_privilege' => true, 'anon_user_has' => true, 'no_custom_remove' => true ), - - 'read_private_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_READ_RS, 'owner_privilege' => true, 'status' => 'private' ), - 'edit_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_EDIT_RS, 'owner_privilege' => true, 'no_custom_remove' => true ), - 'edit_others_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_EDIT_RS, 'attributes' => array('others'), 'base_cap' => 'edit_posts', 'no_custom_remove' => true ), - 'edit_private_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_EDIT_RS, 'owner_privilege' => true, 'status' => 'private' ), - 'edit_published_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_EDIT_RS, 'status' => 'published' ), - 'upload_files' => (object) array( 'src_name' => 'post', 'object_type' => '', 'op_type' => '', 'ignore_restrictions' => true ), - 'moderate_comments' => (object) array( 'src_name' => 'post', 'object_type' => '', 'op_type' => '' ), - 'unfiltered_html' => (object) array( 'src_name' => 'post', 'object_type' => '', 'op_type' => '' ), - - 'delete_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_DELETE_RS, 'owner_privilege' => true ), - 'delete_others_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_DELETE_RS, 'attributes' => array('others'), 'base_cap' => 'delete_posts' ), - 'delete_private_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_DELETE_RS, 'status' => 'private' ), - 'delete_published_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_DELETE_RS, 'status' => 'published' ), - 'publish_posts' => (object) array( 'src_name' => 'post', 'object_type' => 'post', 'op_type' => OP_PUBLISH_RS ), - - 'read_private_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_READ_RS, 'owner_privilege' => true, 'status' => 'private' ), - 'edit_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_EDIT_RS, 'owner_privilege' => true, 'no_custom_remove' => true ), - 'edit_others_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_EDIT_RS, 'attributes' => array('others'), 'base_cap' => 'edit_pages', 'no_custom_remove' => true ), - 'edit_private_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_EDIT_RS, 'owner_privilege' => true, 'status' => 'private' ), - 'edit_published_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_EDIT_RS, 'status' => 'published' ), - 'delete_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_DELETE_RS, 'owner_privilege' => true ), - 'delete_others_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_DELETE_RS, 'attributes' => array('others'), 'base_cap' => 'delete_pages' ), - 'delete_private_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_DELETE_RS, 'status' => 'private' ), - 'delete_published_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_DELETE_RS, 'status' => 'published' ), - 'publish_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_PUBLISH_RS ), - 'create_child_pages' => (object) array( 'src_name' => 'post', 'object_type' => 'page', 'op_type' => OP_ASSOCIATE_RS, 'no_custom_add' => true, 'no_custom_remove' => true ), - - 'manage_links' => (object) array( 'src_name' => 'link', 'object_type' => 'link', 'op_type' => OP_ADMIN_RS, 'no_custom_remove' => true ), - - // note: taxonomy caps carry src_name of their associated object source (in this case, post) - 'manage_categories' => (object) array( 'src_name' => 'post', 'object_type' => 'category', 'op_type' => OP_ADMIN_RS, 'is_taxonomy_cap' => 'category' ), - - 'manage_groups' => (object) array( 'src_name' => 'group', 'object_type' => 'group', 'op_type' => OP_ADMIN_RS, 'no_custom_remove' => true ) - ); // CapDefs array - - foreach ( array_keys($arr) as $cap_name ) - $arr[$cap_name]->defining_module_name = 'wordpress'; - - // important: any rs-introduced caps in standard post / page roles must not be included in core role caps and must have no_custom_add, no_custom_remove properties set (otherwise would need to add code in get_contained_roles to disregard such caps) - $arr['create_child_pages']->defining_module_name = 'role-scoper'; - $arr['manage_groups']->defining_module_name = 'role-scoper'; - - return $arr; -} - -//note: rs_ is a role type prefix which is required for array key, but will be stripped off for name property -function scoper_core_role_caps() { - // separate array is friendlier to php array function - $arr = array( - 'rs_post_reader' => array( - 'read' => true - ), - 'rs_private_post_reader' => array( - 'read_private_posts' => true, - 'read' => true - ), - 'rs_post_contributor' => array( - 'edit_posts' => true, - 'delete_posts' => true, - 'read' => true - ), - 'rs_post_revisor' => array( - 'edit_posts' => true, - 'delete_posts' => true, - 'read' => true, - 'read_private_posts' => true, - 'edit_others_posts' => true - ), - 'rs_post_author' => array( - 'upload_files' => true, - 'publish_posts' => true, - 'edit_published_posts' => true, - 'delete_published_posts' => true, - 'edit_posts' => true, - 'delete_posts' => true, - 'read' => true - ), - 'rs_post_editor' => array( - 'moderate_comments' => true, - 'delete_others_posts' => true, - 'edit_others_posts' => true, - 'upload_files' => true, - 'publish_posts' => true, - 'delete_private_posts' => true, - 'edit_private_posts' => true, - 'delete_published_posts' => true, - 'edit_published_posts' => true, - 'delete_posts' => true, - 'edit_posts' => true, - 'read_private_posts' => true, - 'read' => true - ), - - 'rs_page_reader' => array( - 'read' => true - ), - 'rs_private_page_reader' => array( - 'read_private_pages' => true, - 'read' => true - ), - 'rs_page_associate' => array( - 'create_child_pages' => true, - 'read' => true - ), - // Note: create_child_pages should only be present in page associate role, which is used as an object-assigned alternate to blog-wide edit role - // This way, blog-assignment of Page author role allows user to create new pages, but only as subpages of pages they can edit (or for which Associate role is object-assigned) - - 'rs_page_contributor' => array( - 'edit_pages' => true, - 'delete_pages' => true, - 'read' => true - ), - 'rs_page_revisor' => array( - 'edit_pages' => true, - 'delete_pages' => true, - 'read' => true, - 'read_private_pages' => true, - 'edit_others_pages' => true - ), - 'rs_page_author' => array( - 'upload_files' => true, - 'publish_pages' => true, - 'edit_published_pages' => true, - 'delete_published_pages' => true, - 'edit_pages' => true, - 'delete_pages' => true, - 'read' => true - ), - 'rs_page_editor' => array( - 'moderate_comments' => true, - 'delete_others_pages' => true, - 'edit_others_pages' => true, - 'upload_files' => true, - 'publish_pages' => true, - 'delete_private_pages' => true, - 'edit_private_pages' => true, - 'delete_published_pages' => true, - 'edit_published_pages' => true, - 'delete_pages' => true, - 'edit_pages' => true, - 'read_private_pages' => true, - 'read' => true - ), - - 'rs_link_editor' => array( - 'manage_links' => true - ), - - 'rs_category_manager' => array( - 'manage_categories' => true - ), - - 'rs_group_manager' => array( - 'manage_groups' => true - ) - - ); // end role_caps array - - if ( ! defined( 'RVY_VERSION' ) ) - $arr = array_diff_key( $arr, array( 'rs_post_revisor' => 1, 'rs_page_revisor' => 1 ) ); - - return $arr; -} - - -function scoper_supplemental_wp_role_caps() { - // separate array is friendlier to php array function - $arr = array( - 'wp_revisor' => array( - 'read' => true, - 'edit_posts' => true, - 'delete_posts' => true, - 'edit_others_posts' => true, - 'edit_pages' => true, - 'delete_pages' => true, - 'edit_others_pages' => true, - 'level_3' => true, - 'level_2' => true, - 'level_1' => true, - 'level_0' => true - ) - ); - - return $arr; -} - -// -// -//note: rs_ is a role type prefix which is required for array key, but will be stripped off for name property -function scoper_core_role_defs() { - $arr = array( - // note: object scope converts 'others' cap requirements to base cap, so for object scope assignment, 'Authors' and 'Editors' are equivalent. - // Define 'Editors' roles for object assignment to avoid ambiguity with WP 'Post Author' / 'Page Author', who may have fewer caps on his object than the scoped "Authors". - 'rs_post_reader' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ), 'object_type' => 'post', 'anon_user_blogrole' => true ), - 'rs_private_post_reader' => (object) array( 'objscope_equivalents' => array('rs_post_reader') ), - - 'rs_post_contributor' => (object) array( 'objscope_equivalents' => array('rs_post_revisor') ), - 'rs_post_author' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ) ), - 'rs_post_revisor' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ) ), - 'rs_post_editor' => (object) array( 'objscope_equivalents' => array('rs_post_author') ), - - 'rs_page_reader' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ), 'object_type' => 'page', 'anon_user_blogrole' => true ), - 'rs_private_page_reader' => (object) array( 'objscope_equivalents' => array('rs_page_reader') ), - - 'rs_page_contributor' => (object) array( 'objscope_equivalents' => array('rs_page_revisor') ), - 'rs_page_revisor' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ) ), - 'rs_page_author' => (object) array( 'valid_scopes' => array( 'blog' => true, 'term' => true ) ), - 'rs_page_editor' => (object) array( 'objscope_equivalents' => array('rs_page_author') ), - /* 'rs_page_associate' => (object) array(), //including this confuses determination of equiv. RS roles from WP blogrole */ - // TODO: can we include it now after rc9.9222.b fix ? - 'rs_link_editor' => (object) array(), - - 'rs_category_manager' => (object) array( 'no_custom_caps' => true ), - - 'rs_group_manager' => (object) array() - ); // end role_defs array - - if ( ! defined( 'RVY_VERSION' ) ) - $arr = array_diff_key( $arr, array( 'rs_post_revisor' => 1, 'rs_page_revisor' => 1 ) ); - - if ( is_admin() ) { - $arr['rs_page_associate']->no_custom_caps = true; - - $arr['rs_private_post_reader']->other_scopes_check_role = array( 'private' => 'rs_private_post_reader', '' => 'rs_post_reader' ); - $arr['rs_private_page_reader']->other_scopes_check_role = array( 'private' => 'rs_private_page_reader', '' => 'rs_page_reader' ); - } - - foreach ( array_keys($arr) as $key ) - $arr[$key]->role_type = 'rs'; - - return $arr; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/error_rs.php b/blog/wp-content/plugins/role-scoper/error_rs.php deleted file mode 100644 index bd3230f..0000000 --- a/blog/wp-content/plugins/role-scoper/error_rs.php +++ /dev/null @@ -1,43 +0,0 @@ -All posts, pages and links are currently hidden
    . Please remove the offending plugin, or deactivate Role Scoper to revert to blog-wide Wordpress roles.'); - } - - // To prevent inadverant content exposure, default to blocking all content if another plugin steals wp_set_current_user definition. - if ( ! strpos($_SERVER['SCRIPT_NAME'], 'p-admin/plugins.php') ) { - add_filter('posts_where', create_function('$a', "return 'AND 1=2';"), 99); - add_filter('posts_results', create_function('$a', "return array();"), 1); - add_filter('get_pages', create_function('$a', "return array();"), 99); - add_filter('get_bookmarks', create_function('$a', "return array();"), 99); - add_filter('get_categories', create_function('$a', "return array();"), 99); - add_filter('get_terms', create_function('$a', "return array();"), 99); - - // Also run interference for all custom-defined where_hook, request_filter or results_filter - require_once('role-scoper_main.php'); - - global $scoper, $wpdb; - $scoper = new Scoper(); - $scoper->load_config(); - - foreach( $scoper->data_sources->get_all() as $src ) { - if ( ! empty($src->query_hooks->request) ) - add_filter($src->query_hooks->request, create_function('$a', "return 'SELECT * FROM $wpdb->posts WHERE 1=2';"), 99); - - if ( ! empty($src->query_hooks->where) ) - add_filter($src->query_hooks->where, create_function('$a', "return 'AND 1=2';"), 99); - - if ( ! empty($src->query_hooks->results) ) - add_filter($src->query_hooks->results, create_function('$a', "return array();"), 1); - } - } -} - -function awp_notice($message, $plugin_name) { - // slick method copied from NextGEN Gallery plugin // TODO: why isn't there a class that can turn this text black? - add_action('admin_notices', create_function('', 'echo \'
    ' . $message . '
    \';')); - trigger_error("$plugin_name internal notice: $message"); - $err = new WP_Error($plugin_name, $message); -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/feed-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/feed-interceptor_rs.php deleted file mode 100644 index c2ae2b3..0000000 --- a/blog/wp-content/plugins/role-scoper/feed-interceptor_rs.php +++ /dev/null @@ -1,156 +0,0 @@ -ID); - } - - if ( $http_auth_if ) { - add_filter('feed_link', array(&$this, 'filter_feed_link')); - add_filter('category_feed_link', array(&$this, 'filter_feed_link')); - add_filter('tag_feed_link', array(&$this, 'filter_feed_link')); - add_filter('author_feed_link', array(&$this, 'filter_feed_link')); - add_filter('post_comments_feed_link', array(&$this, 'filter_feed_link')); - } - - add_filter('the_content_rss', array(&$this, 'filter_the_content_rss')); - add_filter('the_excerpt_rss', array(&$this, 'filter_the_excerpt_rss')); - - if ( is_feed() ) { - // Only filter the_content if we're sure this is an RSS request (TODO: is this still necessary?) - if ( ! empty($_GET[HTTP_AUTH_RS]) ) - add_filter('the_content', array(&$this, 'filter_the_content_rss')); - } - } - - function replace_feed_teaser_placeholder($content) { - global $post; - - $search[] = PERMALINK_PLACEHOLDER_RS; - $replace[] = get_permalink($post->ID); - $content = str_replace($search, $replace, $content); - return $content; - } - - function filter_rss( $text, $subject = 'content' ) { - global $post; - - if ( ! empty( $post->scoper_teaser ) ) - return $text; - - if ( $post->post_status == 'private') - $feed_privacy = scoper_get_option( 'rss_private_feed_mode' ); - else - $feed_privacy = scoper_get_option( 'rss_nonprivate_feed_mode' ); - - switch ($feed_privacy) { - case RSS_FULL_CONTENT_RS: - return $text; - - case RSS_EXCERPT_ONLY_RS: - if ( 'content' == $subject ) - return apply_filters( 'the_excerpt_rss', get_the_excerpt(true) ); - else - return $text; - - default: - if ( $msg = scoper_get_option( 'feed_teaser' ) ) { - if ( defined('SCOPER_TRANSLATE_TEASER') ) { - scoper_load_textdomain(); // otherwise this is only loaded for wp-admin - - $msg = translate( $msg, 'scoper'); - - if ( ! empty($msg) && ! is_null($msg) && is_string($msg) ) - $msg = htmlspecialchars_decode( $msg ); - } - - return $this->replace_feed_teaser_placeholder( $msg ); - } - } - } - - // Called when using HTTP auth -- changes the article content for items which are not already filtered by Hidden Content Teaser - function filter_the_content_rss($content) { - return $this->filter_rss($content, 'content'); - } - - // Called when using HTTP auth -- changes the article excerpt for items which are not already filtered by Hidden Content Teaser - function filter_the_excerpt_rss($excerpt) { - return $this->filter_rss($excerpt, 'excerpt'); - } - - // Rewrites RSS feed links to support http authentication - // if the user is logged in - function filter_feed_link($output) { - $delim = (strpos($output, '?') === false) ? '?' : '&'; - return $output. $delim . HTTP_AUTH_RS . '=1'; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/cache-persistent.php b/blog/wp-content/plugins/role-scoper/hardway/cache-persistent.php deleted file mode 100644 index eacf419..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/cache-persistent.php +++ /dev/null @@ -1,736 +0,0 @@ -global_groups ) && ! in_array( $flag, $wpp_object_cache->global_groups ) ) { - global $blog_id; - $flag .= "_$blog_id"; - } - } - - return $flag; -} - -function wpp_cache_add($key, $data, $flag = '', $expire = 0, $append_blog_suffix = true) { - if ( ! empty($_POST) ) // kevinB: reduce elusive anomolies and allow flushing optimization by disabling cache updates during POST operation - return; - - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - //$data = unserialize(serialize($data)); - if ( is_serialized( $data ) ) - $data = unserialize($data); - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->add($key, $data, $flag, $expire); -} - -function wpp_cache_close() { - global $wpp_object_cache; - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->save(); -} - -function wpp_cache_delete($id, $flag = '', $append_blog_suffix = true) { - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - //rs_errlog("wpp_cache_delete: $id, $flag"); - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->delete($id, $flag); -} - -function wpp_cache_flush() { - global $wpp_object_cache; - - if ( empty($wpp_object_cache) || ! is_object($wpp_object_cache) ) { - - if ( empty($wpp_object_cache->auto_flushed) ) { - //rs_errlog('need flush - failed wpp_cache_flush'); - update_option( 'scoper_need_cache_flush', true ); - } - return; - } - - return $wpp_object_cache->flush(); -} - -// added by kevinB for use with Role Scoper -function wpp_cache_flush_group($flag, $append_blog_suffix = true) { - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - if ( ! empty($_POST) ) { // kevinB: since cache updating during POST operation is disabled, improve perf by flushing each group only once - static $already_flushed; - - if ( ! isset($already_flushed) ) - $already_flushed = array(); - - if ( isset($already_flushed[$flag]) ) - return; - } - - - if ( empty($wpp_object_cache) || ! is_object($wpp_object_cache) ) - return; - - $flush_okay = $wpp_object_cache->flush($flag); - - if ( $flush_okay && ! empty($_POST) ) - $already_flushed[$flag] = true; - - return $flush_okay; -} - -function wpp_cache_get($id, $flag = '', $append_blog_suffix = true) { - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->get($id, $flag); -} - -function wpp_cache_init( $sitewide_groups = true ) { - global $wpp_object_cache; - - if ( isset($wpp_object_cache) ) - $wpp_object_cache->save(); - - $GLOBALS['wpp_object_cache'] = new WP_Persistent_Object_Cache(); - - if ( IS_MU_RS && $sitewide_groups ) - $GLOBALS['wpp_object_cache']->global_groups = array_merge( $GLOBALS['wpp_object_cache']->global_groups, array( 'all_usergroups', 'group_members' ) ); - - // added by kevinB: if a flush fails, try try again (and meanwhile, DON'T use the old invalid cache) - $need_flush = ( function_exists('scoper_get_option') ) ? scoper_get_option('need_cache_flush') : get_option('scoper_need_cache_flush'); - if ( $need_flush ) { - //rs_errlog('cache init: performing pending flush'); - delete_option('scoper_need_cache_flush'); - - $wpp_object_cache->auto_flushed = true; - $GLOBALS['wpp_object_cache']->flush(); - } - -} - -function wpp_cache_replace($key, $data, $flag = '', $expire = 0, $append_blog_suffix = true) { - if ( ! empty($_POST) ) // kevinB: reduce elusive anomolies and allow flushing optimization by disabling cache updates during POST operation - return; - - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - //$data = unserialize(serialize($data)); - if ( is_serialized( $data ) ) - $data = unserialize($data); - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->replace($key, $data, $flag, $expire); -} - -function wpp_cache_set($key, $data, $flag = '', $expire = 0, $append_blog_suffix = true) { - if ( ! empty($_POST) ) // kevinB: reduce elusive anomolies and allow flushing optimization by disabling cache updates during POST operation - return; - - global $wpp_object_cache; - - if ( $append_blog_suffix ) - $flag = wpp_suffix_flag( $flag ); - - //$data = unserialize(serialize($data)); - if ( is_serialized( $data ) ) - $data = unserialize($data); - - if ( empty($wpp_object_cache) ) - return; - - return $wpp_object_cache->set($key, $data, $flag, $expire); -} - -// returns true on success -function wpp_cache_test( &$err_msg, $text_domain = '' ) { - // intentionally not using WP_CACHE_DIR because we need a known location so rs_cache_flush.php can delete files without loading WP - $cache_dir = ( defined( 'CACHE_PATH' ) ) ? CACHE_PATH : WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR; - $err = false; - - if ( ! defined( 'ENABLE_PERSISTENT_CACHE' ) ) { - $err_msg = __('The file cache will not operate because ENABLE_PERSISTENT_CACHE is not defined in wp-config.php or role-scoper.php.', 'scoper'); - $err = true; - } elseif ( defined( 'DISABLE_PERSISTENT_CACHE' ) ) { - $err_msg = __('The file cache will not operate because DISABLE_PERSISTENT_CACHE is defined, possibly in wp-config.php or role-scoper.php.', 'scoper'); - $err = true; - } elseif ( ! is_writable($cache_dir) || ! is_dir($cache_dir)) { - $err_msg = sprintf( __('The file cache cannot operate because the cache directory (%s) is not writeable to WordPress.', $text_domain), $cache_dir ); - $err = true; - } elseif ( ! defined('SCOPER_SAFE_MODE_CACHE') && ini_get('safe_mode') ) { - $err_msg = __('The file cache cannot operate because PHP is running in safe mode.', $text_domain); - $err = true; - } else { - global $wpp_object_cache; - $temp_file = tempnam($cache_dir, 'tmp'); - - $fd = @fopen($temp_file, 'w'); - if ( false === $fd ) { - $err_msg = sprintf( __('The file cache cannot operate because file creation attempts fail in %s', $text_domain), $cache_dir ); - $err = true; - } else { - $serial = ''; - fputs($fd, $serial); - fclose($fd); - - if ( file_exists($temp_file) ) - unlink($temp_file); - else { - $err_msg = sprintf( __('The file cache cannot operate because file storage attempts fail in %s', $text_domain), $cache_dir ); - $err = true; - } - } - } // endif cache directory is writeable - - return ! $err; -} - -if ( ! defined('CACHE_SERIAL_HEADER') ) - define('CACHE_SERIAL_HEADER', ""); - -class WP_Persistent_Object_Cache { - var $cache_dir; - var $cache_enabled = false; - var $expiration_time = 900; - var $flock_filename = 'wpp_object_cache.lock'; - var $mutex; - var $cache = array (); - var $dirty_objects = array (); - var $non_existant_objects = array (); - var $global_groups = array ('users', 'userlogins', 'usermeta'); - var $non_persistent_groups = array('comment'); - var $blog_id; // Note: wpp_cache_get() / wpp_cache_set() / wpp_cache_delete() functions also attach blog_id suffix to flag. This blog_id property is just to establish a separate physical cache subfolder for each blog - var $cold_cache_hits = 0; - var $warm_cache_hits = 0; - var $cache_misses = 0; - var $secret = ''; - var $is_404; - - function WP_Persistent_Object_Cache() { - global $blog_id; - - // Destructor method is not reliable. Call non-object function manually via WP shutdown hook instead. - // Also leave this method in place as a backup in case WP shutdown hook is not called. - register_shutdown_function(array(&$this, "__destruct")); - - if ( defined('DISABLE_PERSISTENT_CACHE') || ! defined('ENABLE_PERSISTENT_CACHE') ) - return; - - // Disable the persistent cache if safe_mode is on. - if ( ! defined('SCOPER_SAFE_MODE_CACHE') && ini_get('safe_mode') ) - return; - - if (defined('CACHE_PATH')) - $this->cache_dir = CACHE_PATH; - else { - // Intentionally not using WP_CACHE_DIR because we need a known location so rs_cache_flush.php can delete files without loading WP. - // Using the correct separator eliminates some cache flush errors on Windows - $this->cache_dir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR; - } - - if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) { - $this->cache_enabled = true; - } else { - if (is_writable(WP_CONTENT_DIR)) { - $this->cache_enabled = true; - } - } - - if (defined('CACHE_EXPIRATION_TIME')) - $this->expiration_time = CACHE_EXPIRATION_TIME; - - if ( defined('WP_SECRET') ) - $this->secret = WP_SECRET; - else - $this->secret = DB_PASSWORD . DB_USER . DB_NAME . DB_HOST . ABSPATH; - - $this->blog_id = $this->hash($blog_id); - } - - function __destruct() { - //if ( empty($this->saved) ) // kevinB: no harm checking for new dirty objects even if save was already invoked manually - $this->save(); - - return true; - } - - function acquire_lock() { - // Acquire a write lock. - $this->mutex = @fopen($this->cache_dir.$this->flock_filename, 'w'); - if ( false == $this->mutex) - return false; - flock($this->mutex, LOCK_EX); - return true; - } - - function add($id, $data, $group = 'default', $expire = '') { - if (empty ($group)) - $group = 'default'; - - if (false !== $this->get($id, $group, false)) - return false; - - return $this->set($id, $data, $group, $expire); - } - - function delete($id, $group = 'default', $force = true) { - if (empty ($group)) - $group = 'default'; - - if (!$force && false === $this->get($id, $group, false)) - return false; - - //rs_errlog ("
    deleting $id/$group:
    "); - - $this->non_existant_objects[$group][$id] = true; - $this->dirty_objects[$group][] = $id; - - if ( isset($this->cache[$group][$id]) ) { - //rs_errlog ("
    deleting {$this->cache[$group][$id]}
    "); - unset ($this->cache[$group][$id]); - } else { - // workaround for problematic servers - delete entire file just in case it's getting cached by the server - //rs_errlog ("removing entire cache file."); - $this->rm_cache_dir($group); - } - - return true; - } - - // * flush method modified by kevinB for use with Role Scoper: - // With scoped roles, get_terms and get_pages results are potentially unique for each user or set of groups - // Avoid passing potentially huge cache arrays to and from wp_object_cache by giving - // each user/group set a separate cache group. However, as of WP 2.5, these can - // only be deleted by flushing the entire cache, or by explicit deletion of each - // user/group id. Neither option is reasonable; we need the ability to flush a wp_cache group. - // - function flush($group = '') { - if ( empty( $this->cache_enabled ) ) - return true; - - if ( ! $this->acquire_lock() ) { - $this->cache_enabled = false; // if a pending flush failed, make sure we don't use an invalid cache - - if ( empty($this->auto_flushed) ) { - //rs_errlog('need flush - failed flush'); - update_option( 'scoper_need_cache_flush', true ); - } - - return false; - } - - $this->rm_cache_dir($group); - - //rs_errlog ("
    removing cached group $group:
    "); - - if ( $group ) { - if ( isset($this->cache[$group]) ) - unset($this->cache[$group]); - - if ( isset($this->dirty_objects[$group]) ) - unset($this->dirty_objects[$group]); - - if ( isset($this->non_existant_objects[$group]) ) - unset($this->non_existant_objects[$group]); - } else { - $this->cache = array (); - $this->dirty_objects = array (); - $this->non_existant_objects = array (); - } - - $this->release_lock(); - - return true; - } - - function get($id, $group = 'default', $count_hits = true) { - if (empty ($group)) - $group = 'default'; - - if (isset ($this->cache[$group][$id])) { - if ($count_hits) - $this->warm_cache_hits += 1; - return $this->cache[$group][$id]; - } - - if (isset ($this->non_existant_objects[$group][$id])) - return false; - - //rs_errlog ("
    getting $id/$group:
    "); - - // If caching is not enabled, still return any memcached results from this http session - if (!$this->cache_enabled) { - if (isset ($this->cache[$group][$id])) { - $this->cold_cache_hits += 1; - return $this->cache[$group][$id]; - } - - $this->non_existant_objects[$group][$id] = true; - $this->cache_misses += 1; - return false; - } - - $cache_file = $this->cache_dir.$this->get_group_dir($group)."/".$this->hash($id).'.php'; - if (!file_exists($cache_file)) { - $this->non_existant_objects[$group][$id] = true; - $this->cache_misses += 1; - return false; - } - - // If the object has expired, remove it from the cache and return false to force - // a refresh. - $now = time(); - if ((filemtime($cache_file) + $this->expiration_time) <= $now) { - $this->cache_misses += 1; - $this->delete($id, $group, true); - return false; - } - - $this->cache[$group][$id] = unserialize(base64_decode(substr(@ file_get_contents($cache_file), strlen(CACHE_SERIAL_HEADER), -strlen(CACHE_SERIAL_FOOTER)))); - if (false === $this->cache[$group][$id]) - $this->cache[$group][$id] = ''; - - $this->cold_cache_hits += 1; - return $this->cache[$group][$id]; - } - - function get_group_dir($group) { - if (false !== array_search($group, $this->global_groups)) - return $group; - - return "{$this->blog_id}/$group"; - } - - function hash($data) { - if ( function_exists('hash_hmac') ) { - return hash_hmac('md5', $data, $this->secret); - } else { - return md5($data . $this->secret); - } - } - - function load_group_from_db($group) { - return; - } - - function make_group_dir($group, $perms) { - $group_dir = $this->get_group_dir($group); - $make_dir = ''; - foreach (split('/', $group_dir) as $subdir) { - $make_dir .= "$subdir/"; - if (!file_exists($this->cache_dir.$make_dir)) { - // kevinB: don't make an empty cache entry following unnecessary delete call - if ( empty($this->cache[$group]) ) - return false; - - if (! @ mkdir($this->cache_dir.$make_dir)) - break; - @ chmod($this->cache_dir.$make_dir, $perms); - } - - if (!file_exists($this->cache_dir.$make_dir."index.php")) { - $file_perms = $perms & 0000666; - @ touch($this->cache_dir.$make_dir."index.php"); - @ chmod($this->cache_dir.$make_dir."index.php", $file_perms); - } - } - - return $this->cache_dir."$group_dir/"; - } - - // modified by kevinB for use with Role Scoper ( see explanation above flush method ) - function rm_cache_dir($group = '') { - // BEGIN Rolescoper Modification: optionally reference group subdir - $group_dir = ( $group ) ? $this->get_group_dir($group) : ''; - - $dir = $this->cache_dir . $group_dir; - $dir = rtrim($dir, DIRECTORY_SEPARATOR); - // END RoleScoper Modification --// - - $top_dir = $dir; - $stack = array($dir); - $index = 0; - $errors = 0; - - while ($index < count($stack)) { - # Get indexed directory from stack - $dir = $stack[$index]; - - if ( ! is_dir($dir) ) { - $index++; - continue; - } - - $dh = @ opendir($dir); - if (!$dh) { - $this->cache_enabled = false; // if a pending flush failed, make sure we don't use an invalid cache - - if ( empty($this->auto_flushed) ) { - //rs_errlog('need flush - failed rm_cache_dir opendir'); - update_option( 'scoper_need_cache_flush', true ); - } - - return false; - } - - while (($file = @ readdir($dh)) !== false) { - if ($file == '.' or $file == '..') - continue; - - if (@ is_dir($dir . DIRECTORY_SEPARATOR . $file)) - $stack[] = $dir . DIRECTORY_SEPARATOR . $file; - else if (@ is_file($dir . DIRECTORY_SEPARATOR . $file)) { - if ( file_exists($dir . DIRECTORY_SEPARATOR . $file) ) { - if ( !@ unlink($dir . DIRECTORY_SEPARATOR . $file)) { - $errors++; - } - } - } - } - - $index++; - } - - $stack = array_reverse($stack); // Last added dirs are deepest - foreach($stack as $dir) { - if ( $dir != $top_dir) { - if ( ! @ rmdir($dir) ) { - $errors++; - } - } - } - - if ( $errors ) { - // false positives cause perpetual flush - $this->cache_enabled = false; // if a pending flush failed, make sure we don't use an invalid cache - - if ( empty($this->auto_flushed) ) { - //rs_errlog('need flush - failed rm_cache_dir'); - update_option( 'scoper_need_cache_flush', true ); - } - } - } - - function release_lock() { - // Release write lock. - flock($this->mutex, LOCK_UN); - fclose($this->mutex); - } - - function replace($id, $data, $group = 'default', $expire = '') { - if (empty ($group)) - $group = 'default'; - - if (false === $this->get($id, $group, false)) - return false; - - return $this->set($id, $data, $group, $expire); - } - - function set($id, $data, $group = 'default', $expire = '') { - if (empty ($group)) - $group = 'default'; - - if ( ! is_array($data) && ( NULL == $data ) ) - $data = ''; - - //rs_errlog ("
    setting $id/$group:
    "); - - // is_404() function is no longer available at the execution of this wpp_cache_close, so check it here - if ( function_exists( 'is_404' ) && is_404() && empty( $this->is_404 ) ) - $this->is_404 = true; - - if ( ! empty( $this->is_404 ) ) - return true; - - $this->cache[$group][$id] = $data; - unset ($this->non_existant_objects[$group][$id]); - $this->dirty_objects[$group][] = $id; - - return true; - } - - function save() { - //$this->stats(); - - //rs_errlog ("
    cache save function
    "); - - if ( ! $this->cache_enabled ) - return true; - - if (empty ($this->dirty_objects)) - return true; - - if ( ! empty( $this->is_404 ) ) // is_404() function is no longer available at the execution of this wpp_cache_close - return true; - - //rs_errlog ("
    saving pers cache:
    "); - - // Give the new dirs the same perms as WP_CONTENT_DIR - $stat = stat(WP_CONTENT_DIR); - $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. - $file_perms = $dir_perms & 0000666; // Remove execute bits for files. - - // Make the base cache dir. - if (!file_exists($this->cache_dir)) { - if (! @ mkdir($this->cache_dir)) - return false; - @ chmod($this->cache_dir, $dir_perms); - } - - //rs_errlog ("
    made cache dir:
    "); - - if (!file_exists($this->cache_dir."index.php")) { - @ touch($this->cache_dir."index.php"); - @ chmod($this->cache_dir."index.php", $file_perms); - } - - if ( ! $this->acquire_lock() ) { - // This causes perpetual auto-flushing - //$this->cache_enabled = false; // if a pending flush failed, make sure we don't use an invalid cache - //update_option( 'scoper_need_cache_flush', true ); - - return false; - } - - //rs_errlog ("
    acquired lock
    "); - - // Loop over dirty objects and save them. - $errors = 0; - foreach ($this->dirty_objects as $group => $ids) { - if ( in_array($group, $this->non_persistent_groups) ) - continue; - - if ( ! $group_dir = $this->make_group_dir($group, $dir_perms) ) - continue; - - $ids = array_unique($ids); - foreach ($ids as $id) { - $cache_file = $group_dir.$this->hash($id).'.php'; - - // Remove the cache file if the key is not set. - if (!isset ($this->cache[$group][$id])) { - if (file_exists($cache_file)) - if ( !@ unlink($cache_file) ) - $errors++; - - continue; - } - - $temp_file = tempnam($group_dir, 'tmp'); - $serial = CACHE_SERIAL_HEADER.base64_encode(serialize($this->cache[$group][$id])).CACHE_SERIAL_FOOTER; - - //rs_errlog ("
    $temp_file
    "); - - $fd = @fopen($temp_file, 'w'); - if ( false === $fd ) { - $errors++; - continue; - } - - //rs_errlog ("
    file $temp_file opened
    "); - - fputs($fd, $serial); - fclose($fd); - if (!@ rename($temp_file, $cache_file)) { - if (!@ copy($temp_file, $cache_file)) - $errors++; - - if ( file_exists($temp_file) ) - if ( !@ unlink($temp_file)) - $errors++; - } - @ chmod($cache_file, $file_perms); - } - } - - if ( $errors && $this->dirty_objects ) { - $this->cache_enabled = false; // if a pending flush failed, make sure we don't use an invalid cache - - // This causes perpetual flushing, at least with WP 2.6 - //if ( empty($this->auto_flushed) ) - //update_option( 'scoper_need_cache_flush', true ); - } - - $this->dirty_objects = array(); - - $this->release_lock(); - - if ( $errors ) { - return false; - } - - $this->saved = true; - - return true; - } - - function stats() { - echo "

    "; - echo "Cold Cache Hits: {$this->cold_cache_hits}
    "; - echo "Warm Cache Hits: {$this->warm_cache_hits}
    "; - echo "Cache Misses: {$this->cache_misses}
    "; - echo "

    "; - - foreach ($this->cache as $group => $cache) { - echo "

    "; - echo "Group: $group
    "; - echo "Cache:"; - echo "

    ";
    -			print_r($cache);
    -			echo "
    "; - if (isset ($this->dirty_objects[$group])) { - echo "Dirty Objects:"; - echo "
    ";
    -				print_r(array_unique($this->dirty_objects[$group]));
    -				echo "
    "; - echo "

    "; - } - } - } -} - -add_action('admin_footer', 'wpp_cache_close'); -add_action('wp_footer', 'wpp_cache_close'); -?> diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin-legacy_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-admin-legacy_rs.php deleted file mode 100644 index 4a4c744..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin-legacy_rs.php +++ /dev/null @@ -1,126 +0,0 @@ -allcaps ) ) - // return $sentence; - - global $scoper; - $scoper->honor_any_objrole = true; - - $can_edit_posts = current_user_can('edit_posts'); - $can_edit_pages = current_user_can('edit_pages'); - - //----------------------------------- begin WP core code from wp-admin/index.php ---------------------------- - $num_posts = wp_count_posts( 'post' ); - $num_pages = wp_count_posts( 'page' ); - - // requery comment count so we can truncate the message if there are no comments - $num_comm = get_comment_count( ); - - $post_type_texts = array(); - - if ( !empty($num_posts->publish) ) { // with feeds, anyone can tell how many posts there are. Just unlink if !current_user_can // note: Role Scoper mod - include private posts, pages in total - $post_text = sprintf( ScoperAdminHardwayLegacy::_n_( '%s post', '%s posts', $num_posts->publish + $num_posts->private ), number_format_i18n( $num_posts->publish + $num_posts->private ) ); - $post_type_texts[] = $can_edit_posts ? "$post_text" : $post_text; - } - if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can - $post_type_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s page', '%s pages', $num_pages->publish + $num_pages->private ), number_format_i18n( $num_pages->publish + $num_pages->private ) ).''; - } - if ( $can_edit_posts && !empty($num_posts->draft) ) { - $post_type_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).''; - } - if ( $can_edit_pages && !empty($num_pages->draft) ) { - $post_type_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s draft page', '%s draft pages', $num_pages->draft ), number_format_i18n( $num_pages->draft ) ).''; - } - if ( $can_edit_posts && !empty($num_posts->future) ) { - $post_type_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).''; - } - if ( $can_edit_pages && !empty($num_pages->future) ) { - $post_type_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s scheduled page', '%s scheduled pages', $num_pages->future ), number_format_i18n( $num_pages->future ) ).''; - } - - $pending_texts = array(); - if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { - $pending_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s pending post', '%s pending posts', $num_posts->pending ), number_format_i18n( $num_posts->pending ) ).''; - $plural = ( $num_posts->pending > 1 ); - } - if ( current_user_can('publish_pages') && !empty($num_pages->pending) ) { - $pending_texts[] = ''.sprintf( ScoperAdminHardwayLegacy::_n_( '%s pending page', '%s pending pages', $num_pages->pending ), number_format_i18n( $num_pages->pending ) ).''; - $plural = ( $num_pages->pending > 1 ); - } - - if ( $pending_texts ) { - if ( 2 == count($pending_texts) ) - $pending_text = sprintf( ScoperAdminHardwayLegacy::_c_( 'There are %1$s and %2$s awaiting review.|n posts, n pages', 'scoper'), $pending_texts[0], $pending_texts[1]); - elseif ( $plural ) - $pending_text = sprintf( ScoperAdminHardwayLegacy::_c_( 'There are %s awaiting review.|n posts', 'scoper'), $pending_texts[0]); - else { - // if there are no pending pages, use the WP core message to support existing translations. - $pending_text = sprintf( ScoperAdminHardwayLegacy::_n_( 'There is %2$s post pending your review.', 'There are %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); - } - } - - - // note: retaining original cats / tags text - - - if ( empty($num_comm['total_comments']) ) { - $comm_text = ''; - - } elseif ( empty($current_user->allcaps['moderate_comments']) ) { - $total_comments = sprintf( ScoperAdminHardwayLegacy::_n_( '%1$s total', '%1$s total', $num_comm['total_comments'] ), number_format_i18n($num_comm['total_comments']) ); - $approved_comments = sprintf( ScoperAdminHardwayLegacy::_n_( '%1$s approved', '%1$s approved', $num_comm['approved'] ), number_format_i18n($num_comm['approved']) ); - $spam_comments = sprintf( ScoperAdminHardwayLegacy::_n_( '%1$s spam', '%1$s spam', $num_comm['spam'] ), number_format_i18n($num_comm['spam']) ); - $moderated_comments = sprintf( ScoperAdminHardwayLegacy::_n_( '%1$s awaiting moderation', '%1$s awaiting moderation', $num_comm['awaiting_moderation'] ), number_format_i18n($num_comm['awaiting_moderation']) ); - - if( current_user_can( 'moderate_comments' ) ) { - $total_comments = "{$total_comments}"; - $approved_comments = "{$approved_comments}"; - $moderated_comments = "{$moderated_comments}"; - } - - $comm_text = sprintf( ScoperAdminHardwayLegacy::_n_( 'You have %1$s comment, %2$s, %3$s and %4$s.', 'You have %1$s comments, %2$s, %3$s and %4$s.', $num_comm['total_comments'] ), $total_comments, $approved_comments, $spam_comments, $moderated_comments ); - } - - $post_type_text = implode(', ', $post_type_texts); - - // There is always a category... well, not really. With RS, some users may be able to edit pages without editing posts. Then again, pages may be categorized so just leave this for now. - if ( $post_type_text ) - $sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s %5$s' ), $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text ); - else - $sentence = ''; - //------------------------------------- end WP core code ---------------------------- - - unset($scoper->honor_any_objrole); - - return $sentence; - } - - // prevents core / legacy strings from being forced into plugin .po - function _n_( $single, $plural, $number, $domain = 'default' ) { - return _n( $single, $plural, $number, $domain ); - } - - // prevents core / legacy strings from being forced into plugin .po - function _c_( $text, $domain = 'default' ) { - return _c( $text, $domain ); - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_non-administrator_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_non-administrator_rs.php deleted file mode 100644 index 0318858..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_non-administrator_rs.php +++ /dev/null @@ -1,609 +0,0 @@ -data_sources->is_member('link') ) - add_filter('get_bookmarks', array('ScoperAdminHardway_Ltd', 'flt_get_bookmarks'), 1, 2); - -add_action( 'check_admin_referer', array('ScoperAdminHardway_Ltd', 'act_check_admin_referer') ); - -add_action( 'check_ajax_referer', array('ScoperAdminHardway_Ltd', 'act_check_ajax_referer') ); - -// limit these links on post/page edit listing to drafts which current user can edit -add_filter('get_others_drafts', array('ScoperAdminHardway_Ltd', 'flt_get_others_drafts'), 50, 1); - -// TODO: better handling of low-level AJAX filtering -// URIs ending in specified filename will not be subjected to low-level query filtering -$nomess_uris = apply_filters( 'scoper_skip_lastresort_filter_uris', array( 'p-admin/categories.php', 'p-admin/themes.php', 'p-admin/plugins.php', 'p-admin/profile.php' ) ); -$nomess_uris = array_merge($nomess_uris, array('p-admin/admin-ajax.php')); - -if ( ! agp_strpos_any(urldecode($_SERVER['REQUEST_URI']), $nomess_uris ) ) - add_filter('query', array('ScoperAdminHardway_Ltd', 'flt_last_resort_query') ); - - -class ScoperAdminHardway_Ltd { - - // next-best way to handle any permission checks for non-Ajax operations which can't be done via has_cap filter - function act_check_admin_referer( $referer_name ) { - - // filter category parent selection for Category editing - if ( ! isset( $_POST['cat_ID'] ) ) - return; - - if ( 'update-category_' . $_POST['cat_ID'] == $referer_name ) { - - $stored_term = get_term_by( 'id', $_POST['cat_ID'], 'category' ); - - $selected_parent = $_POST['category_parent']; - - if ( -1 == $selected_parent ) - $selected_parent = 0; - - if ( $stored_term->parent != $selected_parent ) { - global $scoper; - - if ( $selected_parent ) { - $user_terms = $scoper->qualify_terms( 'manage_categories', 'category' ); - $permit = in_array( $selected_parent, $user_terms ); - } else { - $scoper->cap_interceptor->skip_id_generation = true; - $scoper->cap_interceptor->skip_any_term_check = true; - $permit = current_user_can( 'manage_categories' ); - $scoper->cap_interceptor->skip_any_term_check = false; - } - - if ( ! $permit ) - wp_die( __('You do not have permission to select that Category Parent', 'scoper') ); - } - } - - } - - - // next-best way to handle permission checks for Ajax operations which can't be done via has_cap filter - function act_check_ajax_referer( $referer_name ) { - if ( 'add-category' == $referer_name ) { - if ( ! empty($_POST['newcat_parent']) ) - $parent = $_POST['newcat_parent']; - elseif ( ! empty($_POST['category_parent']) ) - $parent = $_POST['category_parent']; - else - $parent = 0; - - // Concern here is for addition of top level categories. Subcat addition attempts will already be filtered by has_cap filter. - if ( ! $parent ) { - global $scoper; - $scoper->cap_interceptor->skip_any_term_check = true; - $permit = current_user_can( 'manage_categories' ); - $scoper->cap_interceptor->skip_any_term_check = false; - - if ( ! $permit ) - die('-1'); - } - } - } - - - - // low-level filtering of otherwise unhookable queries - // - // Todo: review all queries for version-specificity; apply regular expressions to make it less brittle - function flt_last_resort_query($query) { - global $wpdb, $scoper; - - $posts = $wpdb->posts; - $comments = $wpdb->comments; - $links = $wpdb->links; - $term_taxonomy = $wpdb->term_taxonomy; - - // no recursion - if ( scoper_querying_db() ) - return $query; - - // Media Library - unattached (as of WP 2.8, not filterable via posts_request) - // - //SELECT post_mime_type, COUNT( * ) AS num_posts FROM wp_trunk_posts WHERE post_type = 'attachment' GROUP BY post_mime_type - //if ( preg_match( "/ELECT\s*post_mime_type", $query ) ) { - if ( strpos($query, "post_type = 'attachment'") && strpos($query, "post_parent < 1") && strpos($query, '* FROM') ) { - - if ( $where_pos = strpos($query, 'WHERE ') ) { - // optionally hide other users' unattached uploads, but not from blog-wide Editors - global $current_user; - if ( ( empty( $current_user->allcaps['edit_others_posts'] ) && empty( $current_user->allcaps['edit_others_pages'] ) ) && ! scoper_get_option( 'admin_others_unattached_files' ) ) - $author_clause = "AND $wpdb->posts.post_author = '{$current_user->ID}'"; - - if ( $author_clause ) { - $query = str_replace( "post_type = 'attachment'", "post_type = 'attachment' $author_clause", $query); - - return $query; - } - } - } - - - // Search on query portions to make this as forward-compatible as possible. - // Important to include " FROM table WHERE " as a strpos requirement because scoped queries (which should not be further altered here) will insert a JOIN clause - // strpos search for "ELECT " rather than "SELECT" so we don't have to distinguish 0 from false - - // Recent posts: SELECT ID, post_title FROM wp_posts WHERE post_type = 'post' AND (post_status = 'publish' OR post_status = 'private') AND post_date_gmt < '2008-04-30 05:04:04' ORDER BY post_date DESC LIMIT 5 - // Scheduled entries: SELECT ID, post_title, post_date_gmt FROM wp_posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date ASC" - if ( - ( strpos($query, "post_date_gmt <") && strpos ($query, "ELECT ID, post_title") && strpos($query, " FROM $posts WHERE ") ) - || ( strpos ($query, "ELECT ID, post_title, post_date_gmt") && strpos($query, " FROM $posts WHERE ") ) - ) { - //rs_errlog ("
    caught $query
    "); - $query = apply_filters('objects_request_rs', $query, 'post', 'post', ''); - //rs_errlog ("

    replaced with $query

    "); - } - - - // totals on edit.php - // WP 2.5: SELECT post_status, COUNT( * ) AS num_posts FROM wp_posts WHERE post_type = 'post' GROUP BY post_status - if ( strpos($query, "ELECT post_status, COUNT( * ) AS num_posts ") && strpos($query, " FROM $posts WHERE post_type = 'post'") ) { - //rs_errlog ("
    caught $query
    "); - - global $current_user; - $query = str_replace( "AND (post_status != 'private' OR ( post_author = '{$current_user->ID}' AND post_status = 'private' ))", '', $query); - - $query = str_replace( "post_status", "$posts.post_status", $query); - - $query = apply_filters('objects_request_rs', $query, 'post', 'post', array( 'objrole_revisions_clause' => true ) ); - - //rs_errlog ("

    returned $query "); - return $query; - } - - // totals on edit-pages.php - // WP 2.5: SELECT post_status, COUNT( * ) AS num_posts FROM wp_posts WHERE post_type = 'post' GROUP BY post_status - elseif ( strpos($query, "ELECT post_status, COUNT( * )") && ( ( strpos($query, " FROM $posts WHERE post_type = 'page'") || strpos($query, " FROM $posts WHERE ( post_type = 'page'") ) ) ) { - global $current_user; - - //rs_errlog ("
    caught $query
    "); - - $query = str_replace( "AND (post_status != 'private' OR ( post_author = '{$current_user->ID}' AND post_status = 'private' ))", '', $query); - - $query = str_replace( "post_status", "$posts.post_status", $query); - - $query = apply_filters('objects_request_rs', $query, 'post', 'page', array( 'objrole_revisions_clause' => true ) ); - - //rs_errlog ("

    returned $query "); - return $query; - } - - ////rs_errlog ("

    checking $query"); - - // TODO: simplify this - // - // num cats: "SELECT COUNT(*) FROM $categories" - // SELECT DISTINCT COUNT(tt.term_id) FROM wp_term_taxonomy AS tt WHERE 1=1 AND tt.taxonomy = 'category' - // SELECT DISTINCT tt.term_id FROM wp_term_taxonomy AS tt WHERE - $script_name = urldecode($_SERVER['REQUEST_URI']); - if ( ! strpos($script_name, 'p-admin/post.php') && ! strpos($script_name, 'p-admin/post-new.php') && ! strpos($script_name, 'p-admin/page.php') && ! strpos($script_name, 'p-admin/page-new.php') && ! defined('XMLRPC_REQUEST') ) { - if ( ( strpos ($query, "ELECT COUNT(*) FROM $term_taxonomy WHERE") ) - || ( strpos ($query, "ELECT DISTINCT COUNT(*) FROM $term_taxonomy WHERE") ) - || ( strpos ($query, " tt.term_id FROM $term_taxonomy AS tt WHERE") ) - || ( strpos ($query, " t.*, tt.* FROM $wpdb->terms ") ) - ) { - //rs_errlog ("
    caught $query
    "); - - // don't mess with parent category selection/availability for single category edit - if ( $tx = $scoper->taxonomies->get('category') ) { - if ( ! empty( $tx->uri_vars ) ) - $term_id = $scoper->data_sources->detect('id', $tx); - else - $term_id = $scoper->data_sources->detect('id', $tx->source); - - if ( $term_id ) - return $query; - } - - $search = "taxonomy IN ('"; - if ( $pos = strpos($query, $search) ) - if ( $pos_end = strpos($query, "'", $pos + strlen($search) ) ) - $taxonomy = substr($query, $pos + strlen($search), $pos_end - ( $pos + strlen($search) ) ); - - if ( empty($taxonomy ) ) { - $search = "taxonomy = '"; - if ( $pos = strpos($query, $search) ) - if ( $pos_end = strpos($query, "'", $pos + strlen($search) ) ) - $taxonomy = substr($query, $pos + strlen($search), $pos_end - ( $pos + strlen($search) ) ); - } - - if ( $taxonomy && $scoper->taxonomies->is_member($taxonomy) ) { - $query = str_replace( "COUNT(*) FROM $wpdb->term_taxonomy WHERE", "COUNT(*) FROM $wpdb->term_taxonomy AS tt WHERE", $query ); - //$query = str_replace( "ELECT COUNT(*) FROM $term_taxonomy WHERE", "ELECT COUNT(DISTINCT tt.term_taxonomy_id) FROM $term_taxonomy AS tt WHERE", $query); - $src_name = $scoper->taxonomies->member_property($taxonomy, 'object_source', 'name'); - $args = array(); - $args['use_object_roles'] = false; - $args['reqd_caps_by_otype'] = $scoper->get_terms_reqd_caps($src_name, 'admin'); - $query = apply_filters( 'terms_request_rs', $query, $taxonomy, '', $args ); - - /* // object source join, filtering was unnecessary for category count on dashboard - - if ( $src = $scoper->taxonomies->member_property($taxonomy, 'object_source') ) { - $object_types = array(); - foreach ( array_keys($src->object_types) as $object_type ) - if ( scoper_get_otype_option('use_term_roles', $src->name, $object_type) ) - $object_types []= $object_type; - - if ( $object_types ) { - $query = str_replace( "ELECT COUNT(*) FROM $term_taxonomy WHERE", "ELECT COUNT(DISTINCT tt.term_taxonomy_id) FROM $term_taxonomy AS tt WHERE", $query); - $args = array('terms_query' => true, 'force_objects_join' => true); - $query = apply_filters('objects_request_rs', $query, $src->name, $object_types, $args); - } - } - */ - } - - //rs_errlog ("

    returning $query
    "); - return $query; - } - - } - - /* As of RS 1.1, this is replaced by the block above - // - if ( strpos ($query, "ELECT COUNT(*) FROM $term_taxonomy") ) { - //rs_errlog ("
    caught $query
    "); - - $query = str_replace( "COUNT(*)", " COUNT(DISTINCT ID)", $query); - $query = str_replace( "FROM $term_taxonomy", "FROM $term_taxonomy AS tt", $query); - $args = array('terms_query' => true, 'force_objects_join' => true); - $query = apply_filters('objects_request_rs', $query, 'post', 'post', $args); - - //rs_errlog ("

    returning $query
    "); - return $query; - } - */ - - - // WP 2.5: SELECT comment_approved, COUNT( * ) AS num_comments FROM wp_comments GROUP BY comment_approved - // SELECT comment_post_ID, COUNT(comment_ID) as num_comments - // SELECT SQL_CALC_FOUND_ROWS * FROM wp_comments USE INDEX (comment_date_gmt) WHERE ( comment_approved = '0' OR comment_approved = '1' ) - // - // WP 2.6: SELECT comment_approved, COUNT( * ) AS num_comments FROM wp_comments GROUP BY comment_approved - // - // comment count: SELECT COUNT(*) FROM wp_comments WHERE comment_approved = '0' - // comments: SELECT SQL_CALC_FOUND_ROWS * FROM wp_comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT 0, 25 - // comment moderation : SELECT * FROM wp_comments WHERE comment_approved = '0' - if ( strpos($query, "ELECT ") && preg_match ("/FROM\s*{$comments}\s*(WHERE|GROUP BY|USE INDEX|ORDER BY)/", $query) - && ( ! strpos($query, "ELECT COUNT") || empty( $_POST ) ) - && ( ! strpos($_SERVER['SCRIPT_FILENAME'], 'p-admin/upload.php') ) - ) // don't filter the comment count query prior to DB storage of comment_count to post record - { - //rs_errlog ("
    caught $query
    "); - - // apply DISTINCT clause so we can join on the posts table for RS filtering - $query = str_replace( "SELECT *", "SELECT DISTINCT $comments.*", $query); - $query = str_replace( "SELECT SQL_CALC_FOUND_ROWS *", "SELECT SQL_CALC_FOUND_ROWS DISTINCT $comments.*", $query); - - if ( ! strpos( $query, ' DISTINCT ' ) ) - $query = str_replace( "SELECT ", "SELECT DISTINCT ", $query); - - $query = str_replace( "COUNT(*)", " COUNT(DISTINCT $comments.comment_ID)", $query); - $query = str_replace( "COUNT(comment_ID)", " COUNT(DISTINCT $comments.comment_ID)", $query); - $query = preg_replace( "/COUNT(\s*\*\s*)/", " COUNT(DISTINCT $comments.comment_ID)", $query); - $query = preg_replace( "/COUNT(\s*comment_ID\s*)/", " COUNT(DISTINCT $comments.comment_ID)", $query); - - $query = str_replace( "user_id ", "$comments.user_id ", $query); - - $query = preg_replace( "/FROM\s*{$comments}\s*WHERE /", "FROM $comments INNER JOIN $posts ON $posts.ID = $comments.comment_post_ID WHERE ", $query); - - // wp 2.6: also some formatting changes with leading tabs instead of spaces - //$query = preg_replace( "/FROM\s*{$comments}\s*USE INDEX\s*(comment_date_gmt)\s*WHERE/", "FROM $comments USE INDEX (comment_date_gmt) INNER JOIN $posts ON $posts.ID = $comments.comment_post_ID WHERE", $query); - $query = str_replace("FROM $comments USE INDEX (comment_date_gmt) WHERE", "FROM $comments USE INDEX (comment_date_gmt) INNER JOIN $posts ON $posts.ID = $comments.comment_post_ID WHERE", $query); - - $query = preg_replace( "/FROM\s*$comments\s*GROUP BY /", "FROM $comments INNER JOIN $posts ON $posts.ID = $comments.comment_post_ID WHERE 1=1 GROUP BY ", $query); - - // this is already covered if we replace "SELECT " to "SELECT DISTINCT " - //$query = str_replace( "SELECT comment_approved", "SELECT DISTINCT comment_approved", $query); - //$query = str_replace( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments", "SELECT DISTINCT comment_post_ID, COUNT(DISTINCT comment_ID)", $query); - - $reqd_caps = array(); - if ( $statuses = $scoper->data_sources->member_property('post', 'statuses') ) - foreach ( array_keys($statuses) as $status_name ) { - $reqd_caps['post'][$status_name] = array('edit_others_posts', 'moderate_comments'); - $reqd_caps['page'][$status_name] = array('edit_others_pages', 'moderate_comments'); - } - - $reqd_caps['post']['private'] = array('edit_others_posts', 'edit_private_posts', 'moderate_comments'); - $reqd_caps['page']['private'] = array('edit_others_pages', 'edit_private_pages', 'moderate_comments'); - - $args = array( 'force_reqd_caps' => $reqd_caps ); - - $object_types = (array) $scoper->data_sources->detect( 'type', 'post' ); - - $query = apply_filters('objects_request_rs', $query, 'post', $object_types, $args); - - if ( ! strpos($query, "JOIN $posts") ) - $query = str_replace( " FROM $comments ", " FROM $comments INNER JOIN $posts ON $posts.ID = $comments.comment_post_ID ", $query); - - // pre-execute the comments listing query and buffer the listed IDs for more efficient user_has_cap calls - if ( strpos( $query, "* FROM $comments") && empty($scoper->listed_ids['post']) ) { - if ( $results = scoper_get_results($query) ) { - $scoper->listed_ids['post'] = array(); - - foreach ( $results as $row ) { - if ( ! empty($row->comment_post_ID) ) - $scoper->listed_ids['post'][$row->comment_post_ID] = true; - } - } - } - - //rs_errlog ("

    replaced with $query

    "); - return $query; - } - - // Page parent dropdown: Only display pages for which user has edit_pages or create_child_pages. - if ( ! awp_ver('2.7-dev') || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/admin.php') ) { - if ( strpos ($query, "ELECT ID, post_parent, post_title") && strpos($query, "FROM $posts WHERE post_parent =") && function_exists('parent_dropdown') ) { - require_once( SCOPER_ABSPATH . '/admin/admin_ui_lib_rs.php'); - - $page_temp = ''; - $object_id = $scoper->data_sources->detect( 'id', 'post' ); - if ( $object_id ) - $page_temp = get_post( $object_id ); - - if ( empty($page_temp) || ! isset($page_temp->post_parent) || $page_temp->post_parent ) { - $output = ScoperAdminUI::dropdown_pages(); - echo $output; - } - $query = "SELECT ID, post_parent FROM $posts WHERE 1=2"; - - return $query; - } - } - - // attachment count - //SELECT post_mime_type, COUNT( * ) AS num_posts FROM wp_trunk_posts WHERE post_type = 'attachment' GROUP BY post_mime_type - //if ( preg_match( "/ELECT\s*post_mime_type", $query ) ) { - if ( strpos($query, 'ELECT post_mime_type') ) { - if ( $where_pos = strpos($query, 'WHERE ') ) { - $parent_query = "SELECT $wpdb->posts.ID FROM $wpdb->posts WHERE 1=1"; - $parent_query = apply_filters('objects_request_rs', $parent_query, 'post', array('post', 'page') ); - - global $current_user; - - $author_clause = ( ! empty( $current_user->allcaps['edit_others_posts'] ) || ! empty( $current_user->allcaps['edit_others_pages'] ) || scoper_get_option( 'admin_others_unattached_files' ) ) ? '' : "AND $wpdb->posts.post_author = '{$current_user->ID}'"; - - $unattached_clause = ( ! empty( $current_user->allcaps['upload_files'] ) ) ? "( $wpdb->posts.post_parent = '0' $author_clause ) OR " : ''; - - $where_insert = "( $unattached_clause ( $wpdb->posts.post_parent IN ($parent_query) ) ) AND "; - - $query = substr( $query, 0, $where_pos + strlen('WHERE ') ) . $where_insert . substr($query, $where_pos + strlen('WHERE ') ); - - return $query; - } - } - - - // links - //SELECT * , IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated FROM wp_links WHERE 1=1 ORDER BY link_name ASC - if ( ( strpos($query, "FROM $links WHERE") || strpos($query, "FROM $links WHERE") ) && strpos($query, "ELECT ") ) { - $query = apply_filters('objects_request_rs', $query, 'link', 'link'); - - return $query; - } - - return $query; - } // end function flt_last_resort_query - - // Note: this filter is never invoked by WP core as of WP 2.7 - function flt_get_others_drafts($results) { - global $wpdb, $current_user, $scoper; - - // buffer titles in case they were filtered previously - $titles = scoper_get_property_array( $results, 'ID', 'post_title' ); - - // WP 2.3 added pending status, but no new hook or hook argument - $draft_query = strpos($wpdb->last_query, 'draft'); - $pending_query = strpos($wpdb->last_query, 'pending'); - - if ( $draft_query && $pending_query ) - $status_clause = "AND ( post_status = 'draft' OR post_status = 'pending' )"; - elseif ( $draft_query ) - $status_clause = "AND post_status = 'draft'"; - else - $status_clause = "AND post_status = 'pending'"; - - $object_type = $scoper->data_sources->detect('type', 'post'); - if ( ! $object_type ) - $object_type = 'post'; - - if ( ! $otype_val = $scoper->data_sources->member_property('post', 'object_types', $object_type, 'val') ) - $otype_val = $object_type; - - $qry = "SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = '$otype_val' AND post_author != '$current_user->ID' $status_clause"; - $qry = apply_filters('objects_request_rs', $qry, 'post', '', ''); - - $items = scoper_get_results($qry); - - // restore buffered titles in case they were filtered previously - scoper_restore_property_array( $items, $titles, 'ID', 'post_title' ); - - return $items; - } - - // scoped equivalent to WP 2.8.3 core get_bookmarks - // Currently, scoped roles cannot be enforced without replicating the whole function - // - // Enforces cap requirements as specified in WP_Scoped_Data_Source::reqd_caps - function flt_get_bookmarks($results, $args) { - global $wpdb; - - $defaults = array( - 'orderby' => 'name', 'order' => 'ASC', - 'limit' => -1, 'category' => '', - 'category_name' => '', 'hide_invisible' => 1, - 'show_updated' => 0, 'include' => '', - 'exclude' => '', 'search' => '' - ); - - $r = wp_parse_args( $args, $defaults ); - extract( $r, EXTR_SKIP ); - - - // === BEGIN RoleScoper ADDITION: exemption for content administrators - if ( is_content_administrator_rs() ) - return $results; - // === END RoleScoper ADDITION === - - - // === BEGIN RoleScoper MODIFICATION: wp-cache key and flag specific to access type and user/groups --// - // - global $current_user; - $ckey = md5 ( serialize( $r ) . CURRENT_ACCESS_NAME_RS ); - - $cache_flag = SCOPER_ROLE_TYPE . '_get_bookmarks'; - - $cache = $current_user->cache_get( $cache_flag ); - - if ( false !== $cache ) { - if ( !is_array($cache) ) - $cache = array(); - - if ( isset( $cache[ $key ] ) ) - //alternate filter name (WP core already called get_bookmarks filter) - return apply_filters('get_bookmarks_rs', $cache[ $ckey ], $r); - } - // - // === END RoleScoper MODIFICATION === - // =================================== - - - $inclusions = ''; - if ( !empty($include) ) { - $exclude = ''; //ignore exclude, category, and category_name params if using include - $category = ''; - $category_name = ''; - $inclinks = preg_split('/[\s,]+/',$include); - if ( count($inclinks) ) { - foreach ( $inclinks as $inclink ) { - if (empty($inclusions)) - $inclusions = ' AND ( link_id = ' . intval($inclink) . ' '; - else - $inclusions .= ' OR link_id = ' . intval($inclink) . ' '; - } - } - } - if (!empty($inclusions)) - $inclusions .= ')'; - - $exclusions = ''; - if ( !empty($exclude) ) { - $exlinks = preg_split('/[\s,]+/',$exclude); - if ( count($exlinks) ) { - foreach ( $exlinks as $exlink ) { - if (empty($exclusions)) - $exclusions = ' AND ( link_id <> ' . intval($exlink) . ' '; - else - $exclusions .= ' AND link_id <> ' . intval($exlink) . ' '; - } - } - } - if (!empty($exclusions)) - $exclusions .= ')'; - - if ( ! empty($category_name) ) { - if ( $category = get_term_by('name', $category_name, 'link_category') ) - $category = $category->term_id; - else - return array(); - } - - if ( ! empty($search) ) { - $search = like_escape($search); - $search = " AND ( (link_url LIKE '%$search%') OR (link_name LIKE '%$search%') OR (link_description LIKE '%$search%') ) "; - } - - $category_query = ''; - $join = ''; - if ( !empty($category) ) { - $incategories = preg_split('/[\s,]+/',$category); - if ( count($incategories) ) { - foreach ( $incategories as $incat ) { - if (empty($category_query)) - $category_query = ' AND ( tt.term_id = ' . intval($incat) . ' '; - else - $category_query .= ' OR tt.term_id = ' . intval($incat) . ' '; - } - } - } - if (!empty($category_query)) { - $category_query .= ") AND taxonomy = 'link_category'"; - $join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id"; - } - - if (get_option('links_recently_updated_time')) { - $recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_option('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated "; - } else { - $recently_updated_test = ''; - } - - if ($show_updated) { - $get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f "; - } else - $get_updated = ''; - - $orderby = strtolower($orderby); - $length = ''; - switch ($orderby) { - case 'length': - $length = ", CHAR_LENGTH(link_name) AS length"; - break; - case 'rand': - $orderby = 'rand()'; - break; - default: - $orderby = "link_" . $orderby; - } - - if ( 'link_id' == $orderby ) - $orderby = "$wpdb->links.link_id"; - - $visible = ''; - if ( $hide_invisible ) - $visible = "AND link_visible = 'Y'"; - - $query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query"; - $query .= " $exclusions $inclusions $search"; - $query .= " ORDER BY $orderby $order"; - if ($limit != -1) - $query .= " LIMIT $limit"; - - - // === BEGIN RoleScoper MODIFICATION: run query through scoping filter, cache key specific to user/group - $query = apply_filters('objects_request_rs', $query, 'link', '', ''); - - $results = scoper_get_results($query); - - // cache key and flag specific to access type and user/groups - $cache[ $ckey ] = $results; - $current_user->cache_set( $cache, $cache_flag ); - - // alternate hook name (WP core already applied get_bookmarks) - $links = apply_filters('get_bookmarks_rs', $results, $r); - // - // === END RoleScoper MODIFICATION === - // =================================== - - - // === BEGIN RoleScoper ADDITION: memory cache akin to page_cache to assist bulk operations - // - global $scoper; - $ilim = count($links); - for ($i = 0; $i < $ilim; $i++) - $scoper->listed_ids['link'][$links[$i]->link_id] = true; - // - // === END RoleScoper ADDITION === - // =================================== - - - return $links; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_rs.php deleted file mode 100644 index b5556f9..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-admin_rs.php +++ /dev/null @@ -1,47 +0,0 @@ -posts ") && strpos($query, "post_parent") ) ) { - // as of WP 2.6, only the post_parent is being wiped. - if ( ! awp_ver('2.6') ) { - global $current_user; - $query = preg_replace( "/,\s*`post_author`\s*=\s*'{$current_user->ID}'/", "", $query); - $query = preg_replace( "/`post_author`\s*=\s*'{$current_user->ID}',/", "", $query); - } - - $query = preg_replace( "/,\s*`post_parent`\s*=\s*'0'/", "", $query); - } - - return $query; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-front_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-front_rs.php deleted file mode 100644 index adb2e96..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-front_rs.php +++ /dev/null @@ -1,245 +0,0 @@ - 'ids', 'skip_teaser' => true) ); - - foreach ( $cats as $key => $cat ) - if ( ! in_array($cat->cat_ID, $readable_cats) ) - unset( $cats[$key] ); - - return $cats; - } - - function flt_recent_comments($query) { - - // Due to missing get_comments hook, this filter operates on every front-end query. - // If query doesn't pertain to comments, skip out with as little overhead as possible. - if ( strpos($query, 'comment') - //&& ( preg_match("/WHERE\s*comment_approved\s*=\s*'1'/", $query) || preg_match("/AND\s*comment_approved\s*=\s*'1'/", $query) ) - && strpos($query, "ELECT") && ! strpos($query, 'JOIN') && ! strpos($query, "COUNT") && strpos($query, "comment_approved") ) - { - if ( ! is_attachment() && ! is_content_administrator_rs() ) { - global $wpdb; - - if ( awp_is_plugin_active( 'wp-wall') ) { - $options = WPWall_GetOptions(); - - if ( strpos( $query, 'comment_post_ID=' . $options['pageId'] ) ) - return $query; - } - - if ( strpos($query, $wpdb->comments) ) { - $query = str_replace( "user_id ", "$wpdb->comments.user_id ", $query); - - $query = str_replace( "SELECT * FROM $wpdb->comments", "SELECT DISTINCT $wpdb->comments.* FROM $wpdb->comments", $query); - - if ( ! strpos( $query, ' DISTINCT ' ) ) - $query = str_replace( "SELECT ", "SELECT DISTINCT ", $query); - - // theoretically, a slight performance enhancement if we can simplify the query to skip filtering of attachment comments - if ( defined('SCOPER_NO_ATTACHMENT_COMMENTS') || ( false !== strpos( $query, 'comment_post_ID =') ) ) { - $query = preg_replace( "/FROM\s*{$wpdb->comments}\s*WHERE /", "FROM $wpdb->comments INNER JOIN $wpdb->posts ON {$wpdb->posts}.ID = {$wpdb->comments}.comment_post_ID WHERE ", $query); - $query = apply_filters('objects_request_rs', $query, 'post', '', array('skip_teaser' => true) ); - } else { - $join = "LEFT JOIN $wpdb->posts as parent ON parent.ID = {$wpdb->posts}.post_parent AND parent.post_type IN ('post', 'page') AND $wpdb->posts.post_type = 'attachment'"; - //$join = apply_filters('objects_join_rs', $join, 'post', '', array('skip_teaser' => true) ); - - $where_post = apply_filters('objects_where_rs', '', 'post', 'post', array('skip_teaser' => true) ); - $where_page = apply_filters('objects_where_rs', '', 'post', 'page', array('skip_teaser' => true) ); - - $where_post_att = str_replace( "$wpdb->posts.", "parent.", $where_post ); - $where_page_att = str_replace( "$wpdb->posts.", "parent.", $where_page ); - - $where = " ( ( $wpdb->posts.post_type = 'post' $where_post )" - . " OR ( $wpdb->posts.post_type = 'page' $where_page )" - . " OR ( $wpdb->posts.post_type = 'attachment' AND parent.post_type = 'post' $where_post_att )" - . " OR ( $wpdb->posts.post_type = 'attachment' AND parent.post_type = 'page' $where_page_att ) )"; - - $query = preg_replace( "/FROM\s*{$wpdb->comments}\s*WHERE /", "FROM $wpdb->comments INNER JOIN $wpdb->posts ON {$wpdb->posts}.ID = {$wpdb->comments}.comment_post_ID $join WHERE $where AND ", $query); - } - } - } - } - - return $query; - } - - function flt_snazzy_archives( $query ) { - if ( strpos( $query, "posts WHERE post_status = 'publish' AND post_password = '' AND post_type IN (" ) ) { - - // query parsing currently does not deal with IN syntax for post_type - if ( strpos( $query, "('post','page')" ) ) { - $object_type = array( 'post', 'page' ); - $query = str_replace( "post_type IN ('post','page')", "( post_type = 'post' OR post_type = 'page')", $query ); - - } elseif ( strpos( $query, "('post')" ) ) { - $object_type = 'post'; - $query = str_replace( "post_type IN ('post')", "post_type = 'post'", $query ); - - } elseif ( strpos( $query, "('page')" ) ) { - $object_type = 'page'; - $query = str_replace( "post_type IN ('page')", "post_type = 'page'", $query ); - } - - $query = str_replace( "post_status = 'publish' AND ", '', $query ); - - $query = apply_filters( 'objects_request_rs', $query, 'post', $object_type ); - } - - return $query; - } - - /* RS 1.1 no longer adds any join clauses, so this WP shortcoming is moot for us - - // wp_get_archives uses unfilterable SELECT * for postbypost archive type - function flt_log_getarchives( $query ) { - add_filter( 'query', array('ScoperHardwayFront', 'flt_archives_bugstomper') ); - - return $query; - } - - function flt_archives_bugstomper( $query ) { - if ( strpos( $query, 'ELECT * FROM' ) ) { - global $wpdb; - - $query = str_replace( "SELECT * FROM $wpdb->posts", "SELECT DISTINCT $wpdb->posts.* FROM $wpdb->posts", $query ); - - remove_filter( 'query', array('ScoperHardwayFront', 'flt_archives_bugstomper') ); - } - - return $query; - } - */ - - function flt_get_tags( $results, $taxonomies, $args ) { - if ( ! is_array($taxonomies) ) - $taxonomies = (array) $taxonomies; - - if ( ('post_tag' != $taxonomies[0]) || (count($taxonomies) > 1) ) - return $results; - - global $wpdb; - - $defaults = array( - 'exclude' => '', 'include' => '', - 'number' => '', 'offset' => '', 'slug' => '', - 'name__like' => '', 'search' => ''); - $args = wp_parse_args( $args, $defaults ); - extract($args, EXTR_SKIP); - - global $scoper, $current_user; - - $filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; - $ckey = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); - $cache_flag = SCOPER_ROLE_TYPE . '_get_terms'; - - if ( $cache = $current_user->cache_get( $cache_flag ) ) - if ( isset( $cache[ $ckey ] ) ) - return apply_filters('get_tags_rs', $cache[ $ckey ], 'post_tag', $args); - - //------------ WP argument application code from get_terms(), with hierarchy-related portions removed ----------------- - // - // NOTE: must change 'tt.count' to 'count' in orderby and hide_empty settings - // Also change default orderby to name - // - $where = ''; - $inclusions = ''; - if ( !empty($include) ) { - $exclude = ''; - $exclude_tree = ''; - $interms = preg_split('/[\s,]+/',$include); - if ( count($interms) ) { - foreach ( (array) $interms as $interm ) { - if (empty($inclusions)) - $inclusions = ' AND ( t.term_id = ' . intval($interm) . ' '; - else - $inclusions .= ' OR t.term_id = ' . intval($interm) . ' '; - } - } - } - - if ( !empty($inclusions) ) - $inclusions .= ')'; - $where .= $inclusions; - - $exclusions = ''; - if ( !empty($exclude) ) { - $exterms = preg_split('/[\s,]+/',$exclude); - if ( count($exterms) ) { - foreach ( (array) $exterms as $exterm ) { - if ( empty($exclusions) ) - $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' '; - else - $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' '; - } - } - } - - if ( !empty($exclusions) ) - $exclusions .= ')'; - $exclusions = apply_filters('list_terms_exclusions', $exclusions, $args ); - $where .= $exclusions; - - if ( !empty($slug) ) { - $slug = sanitize_title($slug); - $where .= " AND t.slug = '$slug'"; - } - - if ( !empty($name__like) ) - $where .= " AND t.name LIKE '{$name__like}%'"; - - // don't limit the query results when we have to descend the family tree - if ( ! empty($number) ) { - if( $offset ) - $limit = 'LIMIT ' . $offset . ',' . $number; - else - $limit = 'LIMIT ' . $number; - - } else - $limit = ''; - - if ( !empty($search) ) { - $search = like_escape($search); - $where .= " AND (t.name LIKE '%$search%')"; - } - // ------------- end get_terms() argument application code -------------- - - - // embedded select statement for posts ID IN clause - $posts_qry = "SELECT $wpdb->posts.ID FROM $wpdb->posts WHERE 1=1"; - $posts_qry = apply_filters('objects_request_rs', $posts_qry, 'post', 'post', array('skip_teaser' => true)); - - $qry = "SELECT DISTINCT t.*, tt.*, COUNT(p.ID) AS count FROM $wpdb->terms AS t" - . " INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id AND tt.taxonomy = 'post_tag'" - . " INNER JOIN $wpdb->term_relationships AS tagr ON tagr.term_taxonomy_id = tt.term_taxonomy_id" - . " INNER JOIN $wpdb->posts AS p ON p.ID = tagr.object_id WHERE p.ID IN ($posts_qry)" - . " $where GROUP BY t.term_id ORDER BY count DESC $limit"; // must hardcode orderby clause to always query top tags - - $results = scoper_get_results( $qry ); - - $cache[ $ckey ] = $results; - $current_user->cache_set( $cache, $cache_flag ); - - $results = apply_filters('get_tags_rs', $results, 'post_tag', $args); - - return $results; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-taxonomy_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-taxonomy_rs.php deleted file mode 100644 index d825f3c..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-taxonomy_rs.php +++ /dev/null @@ -1,688 +0,0 @@ -is_front() || ! is_content_administrator_rs() ) { - add_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - - // Since the NOT IN subquery is a painful aberration for filtering, replace it with the separate term query used by WP prior to 2.7 - add_filter('posts_where', array('ScoperHardwayTaxonomy', 'flt_cat_not_in_subquery'), 1); -} - - -/** - * ScoperHardwayTaxonomy PHP class for the WordPress plugin Role Scoper - * hardway-taxonomy_rs.php - * - * @author Kevin Behrens - * @copyright Copyright 2009 - * - * Used by Role Scoper Plugin as a container for statically-called functions - * - */ -class ScoperHardwayTaxonomy -{ - // Scoped equivalent to WP 2.8.3 core get_terms - // Currently, scoped roles cannot be enforced without replicating the whole function - // - // Cap requirements depend on access type, and are specified in the WP_Scoped_Data_Source->get_terms_reqd_caps corresponding to taxonomy in question - function flt_get_terms($results, $taxonomies, $args) { - global $wpdb; - $empty_array = array(); - - //d_echo( 'flt_get_terms input:' ); - - $single_taxonomy = false; - if ( !is_array($taxonomies) ) { - $single_taxonomy = true; - $taxonomies = array($taxonomies); - } - // === BEGIN Role Scoper MODIFICATION: single-item array is still a single taxonomy === - elseif( count($taxonomies) < 2 ) - $single_taxonomy = true; - // === END Role Scoper MODIFICATION === - - foreach ( (array) $taxonomies as $taxonomy ) { - if ( ! is_taxonomy($taxonomy) ) { - // === BEGIN Role Scoper MODIFICATION: this caused plugin activation error in some situations (though at that time, the error object was created and return on a single line, not byRef as now) === - // - //$error = & new WP_Error('invalid_taxonomy', __awp('Invalid Taxonomy')); - //return $error; - return array(); - // - // === END Role Scoper MODIFICATION === - } - } - - // === BEGIN Role Scoper ADDITION: global var; various special case exemption checks === - // - global $scoper; - - if ( ! $scoper->taxonomies->is_member( $taxonomies[0] ) ) - return $results; - - // no backend filter for administrators - $parent_or = ''; - if ( ( is_admin() || defined('XMLRPC_REQUEST') ) ) { - if ( is_content_administrator_rs() ) { - return $results; - } else { - $tx = $scoper->taxonomies->get($taxonomies[0]); - - // is a Category Edit form being displayed? - if ( ! empty( $tx->uri_vars ) ) - $term_id = $scoper->data_sources->detect('id', $tx); - else - $term_id = $scoper->data_sources->detect('id', $tx->source); - - if ( $term_id ) - // don't filter current parent category out of selection UI even if current user can't manage it - $parent_or = " OR t.term_id = (SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '$term_id') "; - } - } - - // need to skip cache retrieval if QTranslate is filtering get_terms with a priority of 1 or less - static $no_cache; - if ( ! isset($no_cache) ) - $no_cache = defined( 'SCOPER_NO_TERMS_CACHE' ) || ( ! defined('SCOPER_QTRANSLATE_COMPAT') && awp_is_plugin_active('qtranslate') ); - - // this filter currently only supports a single taxonomy for each get_terms call - // (although the terms_where filter does support multiple taxonomies and this function could be made to do so) - if ( ! $single_taxonomy ) - return $results; - - // link category roles / restrictions are only scoped for management (TODO: abstract this) - if ( $single_taxonomy && ( 'link_category' == $taxonomies[0] ) && $scoper->is_front() ) - return $results; - - // depth is not really a get_terms arg, but remap exclude arg to exclude_tree if wp_list_terms called with depth=1 - if ( ! empty($args['exclude']) && empty($args['exclude_tree']) && ! empty($args['depth']) && ( 1 == $args['depth'] ) ) - $args['exclude_tree'] = $args['exclude']; - - // don't offer to set a category as its own parent - if ( is_admin() && ( 'category' == $taxonomy ) ) { - if ( strpos(urldecode($_SERVER['REQUEST_URI']), 'categories.php') ) { - if ( $editing_cat_id = $scoper->data_sources->get_from_uri('id', 'term') ) { - if ( ! empty($args['exclude']) ) - $args['exclude'] .= ','; - - $args['exclude'] .= $editing_cat_id; - } - } - } - - // we'll need this array in most cases, to support a disjointed tree with some parents missing (note alternate function call - was _get_term_hierarchy) - $children = ScoperAncestry::get_terms_children($taxonomies[0]); - // - // === END Role Scoper ADDITION === - // ================================= - - - $in_taxonomies = "'" . implode("', '", $taxonomies) . "'"; - - $defaults = array('orderby' => 'name', 'order' => 'ASC', - 'hide_empty' => true, 'exclude' => '', 'exclude_tree' => '', 'include' => '', - 'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '', - 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', - 'pad_counts' => false, 'offset' => '', 'search' => '', 'skip_teaser' => false, - - 'depth' => 0, - 'remap_parents' => -1, 'enforce_actual_depth' => -1, 'remap_thru_excluded_parent' => -1 - ); // Role Scoper arguments added above - - $args = wp_parse_args( $args, $defaults ); - $args['number'] = (int) $args['number']; - $args['offset'] = absint( $args['offset'] ); - if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) || - '' !== $args['parent'] ) { - $args['child_of'] = 0; - $args['hierarchical'] = false; - $args['pad_counts'] = false; - } - - if ( 'all' == $args['get'] ) { - $args['child_of'] = 0; - $args['hide_empty'] = 0; - $args['hierarchical'] = false; - $args['pad_counts'] = false; - } - - extract($args, EXTR_SKIP); - - // === BEGIN Role Scoper MODIFICATION: use the $children array we already have === - // - if ( $child_of && ! isset($children[$child_of]) ) - return array(); - - if ( $parent && ! isset($children[$parent]) ) - return array(); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - - $filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; - $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); - - - // === BEGIN Role Scoper MODIFICATION: cache key specific to access type and user/groups === - // - $object_src_name = $scoper->taxonomies->member_property($taxonomies[0], 'object_source', 'name'); - $ckey = md5( $key . serialize($scoper->get_terms_reqd_caps($object_src_name)) ); - - global $current_user; - $cache_flag = SCOPER_ROLE_TYPE . '_get_terms'; - - $cache = $current_user->cache_get( $cache_flag ); - - if ( false !== $cache ) { - if ( !is_array($cache) ) - $cache = array(); - - if ( ! $no_cache && isset( $cache[ $ckey ] ) ) { - // RS Modification: alternate filter name (get_terms filter is already applied by WP) - remove_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - $terms = apply_filters('get_terms', $cache[ $ckey ], $taxonomies, $args); - $terms = apply_filters('get_terms_rs', $terms, $taxonomies, $args); - add_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - return $terms; - } - } - - // buffer term names in case they were filtered previously - if ( 'all' == $fields ) - $term_names = scoper_get_property_array( $results, 'term_id', 'name' ); - - - // - // === END Role Scoper MODIFICATION === - // ===================================== - - - $_orderby = strtolower($orderby); - if ( 'count' == $_orderby ) - $orderby = 'tt.count'; - else if ( 'name' == $_orderby ) - $orderby = 't.name'; - else if ( 'slug' == $_orderby ) - $orderby = 't.slug'; - else if ( 'term_group' == $_orderby ) - $orderby = 't.term_group'; - elseif ( empty($_orderby) || 'id' == $_orderby ) - $orderby = 't.term_id'; - elseif ( 'order' == $_orderby ) - $orderby = 't.term_order'; - - $orderby = apply_filters( 'get_terms_orderby', $orderby, $args ); - - $where = ''; - $inclusions = ''; - if ( !empty($include) ) { - $exclude = ''; - $interms = preg_split('/[\s,]+/',$include); - if ( count($interms) ) { - foreach ( $interms as $interm ) { - if (empty($inclusions)) - $inclusions = ' AND ( t.term_id = ' . intval($interm) . ' '; - else - $inclusions .= ' OR t.term_id = ' . intval($interm) . ' '; - } - } - } - - if ( !empty($inclusions) ) - $inclusions .= ')'; - $where .= $inclusions; - - $exclusions = ''; - - if ( ! empty( $exclude_tree ) ) { - // === BEGIN Role Scoper MODIFICATION: temporarily unhook this filter for unfiltered get_terms calls === - remove_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - // === END Role Scoper MODIFICATION === - - $excluded_trunks = preg_split('/[\s,]+/',$exclude_tree); - foreach( (array) $excluded_trunks as $extrunk ) { - $excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids')); - $excluded_children[] = $extrunk; - foreach( (array) $excluded_children as $exterm ) { - if ( empty($exclusions) ) - $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' '; - else - $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' '; - - } - } - - // === BEGIN Role Scoper MODIFICATION: re-hook this filter - add_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - // === END Role Scoper MODIFICATION === - } - - if ( !empty($exclude) ) { - $exterms = preg_split('/[\s,]+/',$exclude); - if ( count($exterms) ) { - foreach ( $exterms as $exterm ) { - if (empty($exclusions)) - $exclusions = ' AND ( t.term_id <> "' . intval($exterm) . '" '; - else - $exclusions .= ' AND t.term_id <> "' . intval($exterm) . '" '; - } - } - } - - if ( !empty($exclusions) ) - $exclusions .= ')'; - - $exclusions = apply_filters('list_terms_exclusions', $exclusions, $args); - $where .= $exclusions; - - if ( !empty($slug) ) { - $slug = sanitize_title($slug); - $where .= " AND t.slug = '$slug'"; - } - - if ( !empty($name__like) ) - $where .= " AND t.name LIKE '{$name__like}%'"; - - if ( '' != $parent ) { - $parent = (int) $parent; - - // === BEGIN Role Scoper MODIFICATION: otherwise termroles only work if parent terms also have role - if ( ( $parent ) || ('ids' != $fields) ) - $where .= " AND tt.parent = '$parent'"; - // === END Role Scoper MODIFICATION === - } - - - // === BEGIN Role Scoper MODIFICATION: instead, manually remove truly empty cats at the bottom of this function, so we don't exclude cats with private but readable posts - //if ( $hide_empty && !$hierarchical ) - // $where .= ' AND tt.count > 0'; - // === END Role Scoper MODIFICATION === - - - // don't limit the query results when we have to descend the family tree - if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' == $parent ) { - if( $offset ) - $limit = 'LIMIT ' . $offset . ',' . $number; - else - $limit = 'LIMIT ' . $number; - - } else - $limit = ''; - - if ( ! empty($search) ) { - $search = like_escape($search); - $where .= " AND (t.name LIKE '%$search%')"; - } - - $selects = array(); - if ( 'all' == $fields ) - $selects = array('t.*', 'tt.*'); - else if ( 'ids' == $fields ) - $selects = array('t.term_id', 'tt.parent', 'tt.count'); - else if ( 'names' == $fields ) - $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); - - $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args )); - - - // === BEGIN Role Scoper MODIFICATION: run the query through scoping filter - // - $query_base = "SELECT DISTINCT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE 1=1 AND tt.taxonomy IN ($in_taxonomies) $where $parent_or ORDER BY $orderby $order $limit"; - - // only force application of scoped query filter if we're NOT doing a teaser - if ( 'all' == $fields ) - $do_teaser = ( $scoper->is_front() && empty($skip_teaser) && scoper_get_otype_option('do_teaser', 'post') ); - else - $do_teaser = false; - - $query = apply_filters('terms_request_rs', $query_base, $taxonomies[0], '', array('skip_teaser' => ! $do_teaser)); - - - // if no filering was applied because the teaser is enabled, prevent a redundant query - if ( ! empty($exclude_tree) || ($query_base != $query) || $parent || ( 'all' != $fields ) ) { - $terms = scoper_get_results($query); - } else - $terms = $results; - - if ( 'all' == $fields ) - update_term_cache($terms); - - // RS: don't cache an empty array, just in case something went wrong - if ( empty($terms) ) - return array(); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - // === BEGIN Role Scoper ADDITION: Support a disjointed terms tree with some parents hidden - // - if ( 'all' == $fields ) { - $ancestors = ScoperAncestry::get_term_ancestors( $taxonomy ); // array of all ancestor IDs for keyed term_id, with direct parent first - - if ( ( $parent > 0 ) || ! $hierarchical ) { - // in Category Edit form, need to list all editable cats even if parent is not editable - $remap_parents = false; - $enforce_actual_depth = true; - $remap_thru_excluded_parent = false; - } else { - // if these settings were passed into this get_terms call, use them - if ( is_admin() ) { - $remap_parents = true; - - } else { - if ( -1 === $remap_parents ) - $remap_parents = scoper_get_option( 'remap_term_parents' ); - - if ( $remap_parents ) { - if ( -1 === $enforce_actual_depth ) - $enforce_actual_depth = scoper_get_option( 'enforce_actual_term_depth' ); - - if ( -1 === $remap_thru_excluded_parent ) - $remap_thru_excluded_parent = scoper_get_option( 'remap_thru_excluded_term_parent' ); - } - } - } - - $remap_args = compact( 'child_of', 'parent', 'depth', 'orderby', 'remap_parents', 'enforce_actual_depth', 'remap_thru_excluded_parent' ); // one or more of these args may have been modified after extraction - - ScoperHardway::remap_tree( $terms, $ancestors, 'term_id', 'parent', $remap_args ); - } - // - // === END Role Scoper ADDITION === - // ================================ - - - // === BEGIN Role Scoper MODIFICATION: call alternate functions - // rs_tally_term_counts() replaces _pad_term_counts() - // rs_get_term_descendants replaces _get_term_children() - // - if ( ( $child_of || $hierarchical ) && ! empty($children) ) - $terms = rs_get_term_descendants($child_of, $terms, $taxonomies[0]); - - if ( ! $terms ) - return array(); - - // Replace DB-stored term counts with actual number of posts this user can read. - // In addition, without the rs_tally_term_counts call, WP will hide categories that have no public posts (even if this user can read some of the pvt posts). - // Post counts will be incremented to include child categories only if $pad_counts is true - if ( ! defined('XMLRPC_REQUEST') && ( 'all' == $fields ) ) - //-- RoleScoper Modification - alternate function call (was _pad_term_counts) --// - rs_tally_term_counts($terms, $taxonomies[0], '', array('pad_counts' => $pad_counts, 'skip_teaser' => ! $do_teaser ) ); - - // Make sure we show empty categories that have children. - if ( $hierarchical && $hide_empty ) { - foreach ( $terms as $k => $term ) { - if ( ! $term->count ) { - //-- RoleScoper Modification - call alternate function (was _get_term_children) --// - if ( $children = rs_get_term_descendants($term->term_id, $terms, $taxonomies[0]) ) - foreach ( $children as $child ) - if ( $child->count ) - continue 2; - - // It really is empty - unset($terms[$k]); - } - } - } - reset ( $terms ); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - - // === BEGIN Role Scoper ADDITION: hide empty cats based on actual query result instead of 'count > 0' clause, so we don't exclude cats with private but readable posts - if ( $terms && empty( $hierarchical ) && ! empty( $hide_empty ) ) { - foreach ( $terms as $key => $term ) - if ( ! $term->count ) - unset( $terms[$key] ); - } - // - // === END Role Scoper ADDITION === - // ================================ - - $_terms = array(); - if ( 'ids' == $fields ) { - while ( $term = array_shift($terms) ) - $_terms[] = $term->term_id; - $terms = $_terms; - } elseif ( 'names' == $fields ) { - while ( $term = array_shift($terms) ) - $_terms[] = $term->name; - $terms = $_terms; - } - - if ( 0 < $number && intval(@count($terms)) > $number ) { - $terms = array_slice($terms, $offset, $number); - } - - - // === BEGIN Role Scoper MODIFICATION: cache key is specific to user/group - // - if ( ! $no_cache ) { - $cache[ $ckey ] = $terms; - $current_user->cache_set( $cache, $cache_flag ); - } - - // RS Modification: alternate filter name (get_terms filter is already applied by WP) - remove_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - $terms = apply_filters('get_terms', $terms, $taxonomies, $args); - $terms = apply_filters('get_terms_rs', $terms, $taxonomies, $args); - add_filter('get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3); - - // restore buffered term names in case they were filtered previously - if ( 'all' == $fields ) - scoper_restore_property_array( $terms, $term_names, 'term_id', 'name' ); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - //dump($terms); - - return $terms; - } - - - function flt_cat_not_in_subquery( $where ) { - if ( strpos( $where, "ID NOT IN ( SELECT tr.object_id" ) ) { - global $wp_query; - global $wpdb; - - // Since the NOT IN subquery is a painful aberration for filtering, - // replace it with the separatare term query used by WP prior to 2.7 - if ( strpos( $where, "AND {$wpdb->posts}.ID NOT IN ( SELECT tr.object_id" ) ) { // global wp_query is not set on manual WP_Query calls by template code - $whichcat = ''; - - //if ( ! empty($wp_query->query_vars['category__not_in']) ) { - $ids = get_objects_in_term($wp_query->query_vars['category__not_in'], 'category'); - if ( is_wp_error( $ids ) ) - $ids = array(); - if ( is_array($ids) && count($ids > 0) ) { - $out_posts = "'" . implode("', '", $ids) . "'"; - $whichcat .= " AND $wpdb->posts.ID NOT IN ($out_posts)"; - } - $where = preg_replace( "/ AND {$wpdb->posts}\.ID NOT IN \( SELECT tr\.object_id [^)]*\) \)/", $whichcat, $where ); - } - } - - return $where; - } -} - - -// -// Private -// -function rs_get_term($term_id, $taxonomy) { - global $scoper; - - if ( ! isset($scoper->taxonomies[$taxonomy]) ) { - return new WP_Error('invalid_taxonomy', __awp('Invalid Taxonomy') . ': ' . __($taxonomy)); - } - - $tx = $scoper->taxonomies[$taxonomy]; - - if ( $tx->uses_standard_schema ) - return get_term_by( 'id', $term_id, $taxonomy); // this is a WP core taxonomy, let core get_term() handle it - - if ( ! $_term = wpp_cache_get($term_id, "rs_$taxonomy") ) { //TODO: is this caching useful? - $_term = scoper_get_row("SELECT * FROM $tx->source WHERE $tx->source->cols->id = '$term_id' LIMIT 1"); - wpp_cache_set($term_id, $_term, "rs_$taxonomy"); - } -} - - -// renamed for clarity (was get_term_children) -// Also adds support for taxonomies that don't use wp_term_taxonomy schema -function &rs_get_term_descendants($requested_parent_id, $qualified_terms, $taxonomy) { - if ( empty($qualified_terms) ) - return array(); - - $term_list = array(); - $has_children = ScoperAncestry::get_terms_children($taxonomy); - - if ( $requested_parent_id && ! isset($has_children[$requested_parent_id]) ) { - $arr = array(); - return $arr; - } - - global $scoper; - $tx = $scoper->taxonomies->get($taxonomy); - $col_id = $tx->source->cols->id; - $col_parent = $tx->source->cols->parent; - - foreach ( $qualified_terms as $term ) { - $use_id = false; - if ( !is_object($term) ) { - $term = rs_get_term($term, $taxonomy); - if ( is_wp_error( $term ) ) - return $term; - $use_id = true; - } - - if ( $term->$col_id == $requested_parent_id ) - continue; - - // if this qualified term has the requested parent, log it and all its descendants - if ( $term->$col_parent == $requested_parent_id ) { - if ( $use_id ) - $descendant_list[] = $term->$col_id; - else - $descendant_list[] = $term; - - if ( !isset($has_children[$term->$col_id]) ) - continue; - - if ( $descendants = rs_get_term_descendants($term->$col_id, $qualified_terms, $taxonomy) ) - $descendant_list = array_merge($descendant_list, $descendants); - } - } - - return $descendant_list; -} - - -// Rewritten from WP core pad_term_counts to make object count reflect any user-specific roles -// Recalculates term counts by including items from child terms (or if pad_counts is false, simply credits each term for readable private posts) -// Assumes all relevant children are already in the $terms argument -function rs_tally_term_counts(&$terms, $taxonomy, $object_type = '', $args = '') { - global $wpdb, $scoper; - - $defaults = array ( 'pad_counts' => true, 'skip_teaser' => false ); - $args = array_merge( $defaults, $args ); - extract($args); - - if ( ! $terms ) - return; - - if ( ! $tx = $scoper->taxonomies->get($taxonomy) ) - return; - - if ( empty($tx->cols->count) || empty($tx->object_source) ) - return; - - $term_items = array(); - $terms_by_id = array(); - foreach ( $terms as $key => $term ) { - $terms_by_id[$term->{$tx->source->cols->id}] = & $terms[$key]; - $term_ids[$term->{$tx->cols->term2obj_tid}] = $term->{$tx->source->cols->id}; // key and value will match for WP < 2.3 and other non-taxonomy category types - } - - $src = $scoper->data_sources->get('post'); - $categorized_types = array('post'); - foreach ( array_keys($src->object_types) as $this_object_type ) - if ( 'post' != $this_object_type ) - if ( scoper_get_otype_option( 'use_term_roles', 'post', $this_object_type ) ) - $categorized_types []= $this_object_type; - - // Get the object and term ids and stick them in a lookup table - $request = "SELECT DISTINCT $wpdb->posts.ID, tt.term_taxonomy_id, tt.term_id, tr.object_id" - . " FROM $wpdb->posts" - . " INNER JOIN $wpdb->term_relationships AS tr ON $wpdb->posts.ID = tr.object_id " - . " INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id " - . " WHERE tt.term_id IN ('" . implode("','", $term_ids) . "') " - . " AND $wpdb->posts.post_type IN ('" . implode("','", $categorized_types) . "')"; - - // no need to pass any parameters which do not pertain to the objects_request filter - $args = array_intersect_key( $args, array_flip( array('skip_teaser') ) ); - - if ( 1 == count($categorized_types) ) - $object_type = reset($categorized_types); - - $request = apply_filters('objects_request_rs', $request, $tx->object_source->name, $object_type, $args); - - $results = scoper_get_results($request); - - foreach ( $results as $row ) { - $id = $term_ids[$row->term_taxonomy_id]; - if ( isset($term_items[$id][$row->object_id]) ) - ++$term_items[$id][$row->object_id]; - else - $term_items[$id][$row->object_id] = 1; - } - - // credit each term for every object contained in any of its descendant terms - if ( $pad_counts && ScoperAncestry::get_terms_children($taxonomy) ) { - foreach ( $term_ids as $term_id ) { - $child_term_id = $term_id; - - while ( isset($terms_by_id[$child_term_id]->{$tx->source->cols->parent}) ) { - if ( ! $parent_term_id = $terms_by_id[$child_term_id]->{$tx->source->cols->parent} ) - break; - - if ( ! empty($term_items[$term_id]) ) - foreach ( array_keys($term_items[$term_id]) as $item_id ) - $term_items[$parent_term_id][$item_id] = 1; - - $child_term_id = $parent_term_id; - } - } - } - - // Tally and apply the item credits - foreach ( $term_items as $term_id => $items ) - if ( isset($terms_by_id[$term_id]) ) - $terms_by_id[$term_id]->count = count($items); - - // update count property for zero-item terms too - foreach ( array_keys($terms_by_id) as $term_id ) - if ( ! isset($term_items[$term_id]) ) - if ( is_object($terms_by_id[$term_id]) ) - $terms_by_id[$term_id]->count = 0; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway-users_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway-users_rs.php deleted file mode 100644 index 5704109..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway-users_rs.php +++ /dev/null @@ -1,298 +0,0 @@ -usermeta WHERE meta_key = '{$wpdb->prefix}user_level'") ) { - //log_mem_usage_rs( 'start flt_editable_user_ids()' ); - - if ( isset( $_POST['post_type']) ) { - if ( 'page' == $_POST['post_type'] ) - $reqd_caps = array('edit_pages'); - else - $reqd_caps = array('edit_posts'); - - if ( isset($_POST['post_ID']) ) - $object_id = $_POST['post_ID']; - - } elseif ( $context = $scoper->admin->get_context('') ) {//arg: return reqd_caps only { - if ( $context->source ) { - $src_name = $context->source->name; - $object_id = $scoper->data_sources->detect('id', $src_name); - } else { - $src_name = ''; - $object_id = 0; - } - - $reqd_caps = $context->reqd_caps; - } - - if ( ! empty($reqd_caps) ) { - global $scoper, $current_user; - - if ( 'page' == $context->object_type_def->val ) - $current_user_reqd_cap = 'edit_others_pages'; - else - $current_user_reqd_cap = 'edit_others_posts'; - - $id = $scoper->data_sources->detect('id', 'post'); - - // only modify the default authors list if current user can edit_others for the current post/page - if ( current_user_can( $current_user_reqd_cap, $id ) ) { - $users = $scoper->users_who_can($reqd_caps, COL_ID_RS, $src_name, $object_id); - - if ( ! in_array($current_user->ID, $users) ) - $users []= $current_user->ID; - - $query = "SELECT $wpdb->users.ID FROM $wpdb->users WHERE ID IN ('" . implode("','", $users) . "')"; - } - } - - //log_mem_usage_rs( 'end flt_editable_user_ids()' ); - } - } - - return $query; - } - - //horrible reverse engineering of dropdown_users execution because only available filter is on html output - function flt_wp_dropdown_users($wp_output) { - //log_mem_usage_rs( 'start flt_wp_dropdown_users()' ); - - // if (even after our blogcap tinkering) the author list is already locked due to insufficient blog-wide caps, don't mess - if ( ! $pos = strpos ($wp_output, 'last_query; - - // This uri-checking functions will be called by flt_users_where. - // If the current uri is not recognized, don't bother with the painful parsing. - $context = $scoper->admin->get_context(''); - - if ( empty ($context->reqd_caps) ) - return $wp_output; - - if ( 'page' == $context->object_type_def->val ) - $current_user_reqd_cap = 'edit_others_pages'; - else - $current_user_reqd_cap = 'edit_others_posts'; - - $id = $scoper->data_sources->detect('id', 'post'); - - // only modify the default authors list if current user has Editor role for the current post/page - $scoper->query_interceptor->require_full_object_role = true; - $have_cap = current_user_can( $current_user_reqd_cap, $id ); - $scoper->query_interceptor->require_full_object_role = false; - - //if ( ! $have_cap ) - //return $wp_output; - - $src_name = $context->source->name; - - $orderpos = strpos($last_query, 'ORDER BY'); - $orderby = ( $orderpos ) ? substr($last_query, $orderpos) : ''; - if ( ! strpos( $orderby, 'display_name' ) ) // sanity check in case the last_query buffer gets messed up - $orderby = ''; - - $id_in = $id_not_in = $show_option_all = $show_option_none = ''; - - $pos = strpos($last_query, 'AND ID IN('); - if ( $pos ) { - $pos_close = strpos($last_query, ')', $pos); - if ( $pos_close) - $id_in = substr($last_query, $pos, $pos_close - $pos + 1); - } - - $pos = strpos($last_query, 'AND ID NOT IN('); - if ( $pos ) { - $pos_close = strpos($last_query, ')', $pos); - if ( $pos_close) - $id_not_in = substr($last_query, $pos, $pos_close - $pos + 1); - } - - $search = "', $pos); - if ( $pos_close) - $show_option_all = substr($wp_output, $pos + strlen($search), $pos_close - $pos - strlen($search)); - } - - $search = "', $pos); - if ( $pos_close) - $show_option_none = substr($wp_output, $pos + strlen($search), $pos_close - $pos - strlen($search)); - } - - $search = "\n"; - - if ( $show_option_all ) - $output .= "\t\n"; - - if ( $show_option_none ) - $output .= "\t\n"; - - foreach ( (array) $users as $user ) { - $user->ID = (int) $user->ID; - $_selected = $user->ID == $selected ? " selected='selected'" : ''; - $display = !empty($user->$show) ? $user->$show : '('. $user->user_login . ')'; - $output .= "\t\n"; - } - - $output .= ""; - // ----------- end wp_dropdown_users code copy (from WP 2.7) ------------- - - //log_mem_usage_rs( 'flt_wp_dropdown_users()' ); - - return $output; - } - - function flt_get_editable_authors($unfiltered_results) { - global $wpdb, $scoper; - - $context = $scoper->admin->get_context('', true); // arg: return reqd_caps only - - if ( ! empty ($context->reqd_caps) ) { - if ( 'page' == $matched->object_type_def->val ) - $current_user_reqd_cap = 'edit_others_pages'; - else - $current_user_reqd_cap = 'edit_others_posts'; - - $object_id = $scoper->data_sources->detect('id', 'post'); - - $scoper->query_interceptor->require_full_object_role = true; - $have_cap = current_user_can( $current_user_reqd_cap, $object_id ); - $scoper->query_interceptor->require_full_object_role = false; - - if ( $have_cap ) - return $scoper->users_who_can($context->reqd_caps, COLS_ALL_RS); - else { - if ( $object_id ) { - if ( $current_author = $scoper->data_sources->get_from_db('owner', 'post', $object_id) ) - $force_user_id = $current_author; - } else { - global $current_user; - $force_user_id = $current_user->ID; - } - - if ( $force_user_id ) { - $display_name = $wpdb->get_var( "SELECT display_name FROM $wpdb->users WHERE ID = '$force_user_id'" ); - $users = array( (object) array( 'ID' => $force_user_id, 'display_name' => $display_name ) ); - return $users; - } - } - - //log_mem_usage_rs( 'flt_get_editable_authors()' ); - } - - return $unfiltered_results; - } - -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/hardway_rs.php b/blog/wp-content/plugins/role-scoper/hardway/hardway_rs.php deleted file mode 100644 index 9901152..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/hardway_rs.php +++ /dev/null @@ -1,469 +0,0 @@ -is_front() ) - require_once('hardway-front_rs.php'); - -if ( $scoper->is_front() || ! is_content_administrator_rs() ) - require_once('hardway-taxonomy_rs.php'); - - -// flt_get_pages is required on the front end (even for administrators) to enable the inclusion of private pages -// flt_get_pages also needed for inclusion of private pages in some 3rd party plugin config UI (Simple Section Nav) - -// flt_get_terms '' so private posts are included in count, as basis for display when hide_empty arg is used - - -if ( $scoper->data_sources->member_property('post', 'object_types', 'page') ) - add_filter('get_pages', array('ScoperHardway', 'flt_get_pages'), 1, 2); - -/** - * ScoperHardway PHP class for the WordPress plugin Role Scoper - * hardway_rs.php - * - * @author Kevin Behrens - * @copyright Copyright 2009 - * - * Used by Role Scoper Plugin as a container for statically-called functions - * - */ -class ScoperHardway -{ - // Scoped equivalent to WP 2.8.3 core get_pages - // Currently, scoped roles cannot be enforced without replicating the whole function - // - // Enforces cap requirements as specified in WP_Scoped_Data_Source::reqd_caps - function flt_get_pages($results, $args = '') { - if ( isset( $args['show_option_none'] ) && ( __('Main Page (no parent)') == $args['show_option_none'] ) ) { - // avoid redundant filtering (currently replacing parent dropdown on flt_dropdown_pages filter) - return $results; - } - - if ( ! is_array($results) ) - $results = (array) $results; - - global $wpdb; - - // === BEGIN Role Scoper ADDITION: global var; various special case exemption checks === - // - global $scoper, $current_user; - - // need to skip cache retrieval if QTranslate is filtering get_pages with a priority of 1 or less - $no_cache = ! defined('SCOPER_QTRANSLATE_COMPAT') && awp_is_plugin_active('qtranslate'); - - // buffer titles in case they were filtered previously - $titles = scoper_get_property_array( $results, 'ID', 'post_title' ); - - if ( ! scoper_get_otype_option( 'use_object_roles', 'post', 'page' ) ) - return $results; - - // depth is not really a get_pages arg, but remap exclude arg to exclude_tree if wp_list_terms called with depth=1 - if ( ! empty($args['exclude']) && empty($args['exclude_tree']) && ! empty($args['depth']) && ( 1 == $args['depth'] ) ) - if ( 0 !== strpos( $args['exclude'], ',' ) ) // work around wp_list_pages() bug of attaching leading comma if a plugin uses wp_list_pages_excludes filter - $args['exclude_tree'] = $args['exclude']; - // - // === END Role Scoper ADDITION === - // ================================= - - $defaults = array( - 'child_of' => 0, 'sort_order' => 'ASC', - 'sort_column' => 'post_title', 'hierarchical' => 1, - 'exclude' => '', 'include' => '', - 'meta_key' => '', 'meta_value' => '', - 'authors' => '', 'parent' => -1, 'exclude_tree' => '', - 'number' => '', 'offset' => 0, - - 'depth' => 0, - 'remap_parents' => -1, 'enforce_actual_depth' => -1, 'remap_thru_excluded_parent' => -1 - ); // Role Scoper arguments added above - - // === BEGIN Role Scoper ADDITION: support front-end optimization - if ( $scoper->is_front() ) { - if ( defined( 'SCOPER_GET_PAGES_LEAN' ) ) - $defaults['fields'] = "$wpdb->posts.ID, $wpdb->posts.post_title, $wpdb->posts.post_parent, $wpdb->posts.post_date, $wpdb->posts.post_date_gmt, $wpdb->posts.post_status, $wpdb->posts.post_name, $wpdb->posts.post_modified, $wpdb->posts.post_modified_gmt, $wpdb->posts.guid, $wpdb->posts.menu_order, $wpdb->posts.comment_count"; - else { - $defaults['fields'] = "$wpdb->posts.*"; - - if ( ! defined( 'SCOPER_FORCE_PAGES_CACHE' ) ) - $no_cache = true; // serialization / unserialization of post_content for all pages is too memory-intensive for sites with a lot of pages - } - } else { - // required for xmlrpc getpagelist method - $defaults['fields'] = "$wpdb->posts.*"; - - if ( ! defined( 'SCOPER_FORCE_PAGES_CACHE' ) ) - $no_cache = true; - } - // === END Role Scoper MODIFICATION === - - - $r = wp_parse_args( $args, $defaults ); - extract( $r, EXTR_SKIP ); - $number = (int) $number; - $offset = (int) $offset; - - - // === BEGIN Role Scoper MODIFICATION: wp-cache key and flag specific to access type and user/groups - // - $key = md5( serialize( compact(array_keys($defaults)) ) ); - $ckey = md5 ( $key . CURRENT_ACCESS_NAME_RS ); - - global $current_user; - $cache_flag = SCOPER_ROLE_TYPE . '_get_pages'; - - $cache = $current_user->cache_get($cache_flag); - - if ( false !== $cache ) { - if ( !is_array($cache) ) - $cache = array(); - - if ( ! $no_cache && isset( $cache[ $ckey ] ) ) - // alternate filter name (WP core already applied get_pages filter) - return apply_filters('get_pages_rs', $cache[ $ckey ], $r); - } - // - // === END Role Scoper MODIFICATION === - // ==================================== - - - $inclusions = ''; - if ( !empty($include) ) { - $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include - $parent = -1; - $exclude = ''; - $meta_key = ''; - $meta_value = ''; - $hierarchical = false; - $incpages = preg_split('/[\s,]+/',$include); - if ( count($incpages) ) { - foreach ( $incpages as $incpage ) { - if (empty($inclusions)) - $inclusions = ' AND ( ID = ' . intval($incpage) . ' '; - else - $inclusions .= ' OR ID = ' . intval($incpage) . ' '; - } - } - } - if (!empty($inclusions)) - $inclusions .= ')'; - - $exclusions = ''; - if ( !empty($exclude) ) { - $expages = preg_split('/[\s,]+/',$exclude); - if ( count($expages) ) { - foreach ( $expages as $expage ) { - if (empty($exclusions)) - $exclusions = ' AND ( ID <> ' . intval($expage) . ' '; - else - $exclusions .= ' AND ID <> ' . intval($expage) . ' '; - } - } - } - if (!empty($exclusions)) - $exclusions .= ')'; - - $author_query = ''; - if (!empty($authors)) { - $post_authors = preg_split('/[\s,]+/',$authors); - - if ( count($post_authors) ) { - foreach ( $post_authors as $post_author ) { - //Do we have an author id or an author login? - if ( 0 == intval($post_author) ) { - $post_author = get_userdatabylogin($post_author); - if ( empty($post_author) ) - continue; - if ( empty($post_author->ID) ) - continue; - $post_author = $post_author->ID; - } - - if ( '' == $author_query ) - $author_query = ' post_author = ' . intval($post_author) . ' '; - else - $author_query .= ' OR post_author = ' . intval($post_author) . ' '; - } - if ( '' != $author_query ) - $author_query = " AND ($author_query)"; - } - } - - - // === BEGIN Role Scoper MODIFICATION: split query into join, where clause for filtering - // - $where_base = " AND post_type = 'page' AND post_status='publish' $exclusions $inclusions $author_query "; - - if ( $parent >= 0 ) - $where_base .= $wpdb->prepare(' AND post_parent = %d ', $parent); - - if ( ! empty( $meta_key ) && ! empty($meta_value) ) { - // meta_key and meta_value might be slashed - $meta_key = stripslashes($meta_key); - $meta_value = stripslashes($meta_value); - $join_base = " INNER JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id"; - $where_base .= " AND $wpdb->postmeta.meta_key = '$meta_key' AND $wpdb->postmeta.meta_value = '$meta_value'"; - } else - $join_base = ''; - - $request = "SELECT $fields FROM $wpdb->posts $join_base WHERE 1=1 $where_base ORDER BY $sort_column $sort_order "; - - $list_private_pages = scoper_get_otype_option('private_items_listable', 'post', 'page'); - - $def_caps = $scoper->data_sources->members['post']->reqd_caps['read']['page']['private']; - - if ( ! is_admin() && ! $list_private_pages ) { - // As an extra precaution to make sure we can PREVENT private page listing even if private status is included in query, - // temporarily set the required cap for reading private pages to a nonstandard cap name (which is probably not owned by any user) - $scoper->data_sources->members['post']->reqd_caps['read']['page']['private'] = array('list_private_pages'); - } else { - // WP core does not include private pages in query. Include private status clause in anticipation of user-specific filtering - $request = str_replace("AND post_status='publish'", "AND ( post_status IN ('publish','private') )", $request); - } - - if ( $scoper->is_front() && scoper_get_otype_option('do_teaser', 'post') && scoper_get_otype_option('use_teaser', 'post', 'page') && ! defined('SCOPER_TEASER_HIDE_PAGE_LISTING') ) { - // We are in the front end and the teaser is enabled for pages - - $pages = scoper_get_results($request); // execute unfiltered query - - // Pass results of unfiltered query through the teaser filter. - // If listing private pages is disabled, they will be omitted completely, but restricted published pages - // will still be teased. This is a slight design compromise to satisfy potentially conflicting user goals without yet another option - $pages = apply_filters('objects_teaser_rs', $pages, 'post', 'page', array('request' => $request, 'force_teaser' => true) ); - - if ( $list_private_pages ) { - if ( ! scoper_get_otype_option('teaser_hide_private', 'post', 'page') ) - $tease_all = true; - } else - // now that the teaser filter has been applied, restore reqd_caps value to normal - $scoper->data_sources->members['post']->reqd_caps['read']['page']['private'] = $def_caps; - - } else { - // Pass query through the request filter - $request = apply_filters('objects_request_rs', $request, 'post', 'page', array('skip_teaser' => true)); - - // now that the request filter has been applied, restore reqd_caps value to normal - if ( ! $list_private_pages ) - $scoper->data_sources->members['post']->reqd_caps['read']['page']['private'] = $def_caps; - - // Execute the filtered query - $pages = scoper_get_results($request); - } - - if ( empty($pages) ) - // alternate hook name (WP core already applied get_pages filter) - return apply_filters('get_pages_rs', array(), $r); - - // restore buffered titles in case they were filtered previously - scoper_restore_property_array( $pages, $titles, 'ID', 'post_title' ); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - - // Role Scoper note: WP core get_pages has already updated wp_cache and pagecache with unfiltered results. - update_page_cache($pages); - - - // === BEGIN Role Scoper MODIFICATION: Support a disjointed pages tree with some parents hidden ======== - if ( $child_of || empty($tease_all) ) { // if we're including all pages with teaser, no need to continue thru tree remapping - - $ancestors = ScoperAncestry::get_page_ancestors(); // array of all ancestor IDs for keyed page_id, with direct parent first - - $orderby = $sort_column; - - if ( ( $parent > 0 ) || ! $hierarchical ) - $remap_parents = false; - else { - // if these settings were passed into this get_pages call, use them - if ( -1 === $remap_parents ) - $remap_parents = scoper_get_option( 'remap_page_parents' ); - - if ( $remap_parents ) { - if ( -1 === $enforce_actual_depth ) - $enforce_actual_depth = scoper_get_option( 'enforce_actual_page_depth' ); - - if ( -1 === $remap_thru_excluded_parent ) - $remap_thru_excluded_parent = scoper_get_option( 'remap_thru_excluded_page_parent' ); - } - } - - $remap_args = compact( 'child_of', 'parent', 'exclude', 'depth', 'orderby', 'remap_parents', 'enforce_actual_depth', 'remap_thru_excluded_parent' ); // one or more of these args may have been modified after extraction - - ScoperHardway::remap_tree( $pages, $ancestors, 'ID', 'post_parent', $remap_args ); - } - // === END Role Scoper MODIFICATION === - // ==================================== - - if ( ! empty($exclude_tree) ) { - $exclude = array(); - - $exclude = (int) $exclude_tree; - $children = get_page_children($exclude, $pages); // RS note: okay to use unfiltered function here since it's only used for excluding - $excludes = array(); - foreach ( $children as $child ) - $excludes[] = $child->ID; - $excludes[] = $exclude; - $total = count($pages); - for ( $i = 0; $i < $total; $i++ ) { - if ( in_array($pages[$i]->ID, $excludes) ) - unset($pages[$i]); - } - } - - // re-index the array, just in case anyone cares - $pages = array_values($pages); - - - // === BEGIN Role Scoper MODIFICATION: cache key and flag specific to access type and user/groups - // - if ( ! $no_cache ) { - $cache[ $ckey ] = $pages; - $current_user->cache_set($cache, $cache_flag); - } - - // alternate hook name (WP core already applied get_pages filter) - $pages = apply_filters('get_pages_rs', $pages, $r); - // - // === END Role Scoper MODIFICATION === - // ==================================== - - return $pages; - } - - - - function remap_tree( &$items, $ancestors, $col_id, $col_parent, $args ) { - $defaults = array( - 'child_of' => 0, 'parent' => -1, - 'orderby' => 'post_title', 'depth' => 0, - 'remap_parents' => true, 'enforce_actual_depth' => true, - 'exclude' => '', 'remap_thru_excluded_parent' => false - ); - - $args = wp_parse_args( $args, $defaults ); - extract($args, EXTR_SKIP); - - if ( $depth < 0 ) - $depth = 0; - - $exclude = preg_split('/[\s,]+/',$exclude); - - $filtered_items_by_id = array(); - foreach ( $items as $item ) - $filtered_items_by_id[$item->$col_id] = true; - - $remapped_items = array(); - - // temporary WP bug workaround - //$any_top_items = false; - $first_child_of_match = -1; - - // The desired "root" is included in the ancestor array if using $child_of arg, but not if child_of = 0 - $one_if_root = ( $child_of ) ? 0 : 1; - - foreach ( $items as $key => $item ) { - if ( ! empty($child_of) ) { - if ( ! isset($ancestors[$item->$col_id]) || ! in_array($child_of, $ancestors[$item->$col_id]) ) { - unset($items[$key]); - - continue; - } - } - - if ( $remap_parents ) { - $id = $item->$col_id; - $parent_id = $item->$col_parent; - - if ( $parent_id && ( $child_of != $parent_id ) && isset($ancestors[$id]) ) { - - // Don't use any ancestors higher than $child_of - if ( $child_of ) { - $max_key = array_search( $child_of, $ancestors[$id] ); - if ( false !== $max_key ) - $ancestors[$id] = array_slice( $ancestors[$id], 0, $max_key + 1 ); - } - - // Apply depth cutoff here so Walker is not thrown off by parent remapping. - if ( $depth && $enforce_actual_depth ) { - if ( count($ancestors[$id]) > ( $depth - $one_if_root ) ) - unset( $items[$key] ); - } - - if ( ! isset($filtered_items_by_id[$parent_id]) ) { - - // Remap to a visible ancestor, if any - if ( ! $depth || isset($items[$key]) ) { - $visible_ancestor_id = 0; - - foreach( $ancestors[$id] as $ancestor_id ) { - if ( isset($filtered_items_by_id[$ancestor_id]) || ($ancestor_id == $child_of) ) { - // don't remap through a parent which was explicitly excluded - if( $exclude && in_array( $items[$key]->$col_parent, $exclude ) && ! $remap_thru_excluded_parent ) - break; - - $visible_ancestor_id = $ancestor_id; - break; - } - } - - if ( $visible_ancestor_id ) - $items[$key]->$col_parent = $visible_ancestor_id; - - elseif ( ! $child_of ) - $items[$key]->$col_parent = 0; - - // if using custom ordering, force remapped items to the bottom - if ( ( $visible_ancestor_id == $child_of ) && ( false !== strpos( $orderby, 'order' ) ) ) { - $remapped_items [$key]= $items[$key]; - unset( $items[$key] ); - } - } - } - } - } // end if not skipping page parent remap - - - // temporary WP bug workaround: need to keep track of parent, for reasons described below - if ( $child_of && ! $remapped_items ) { - //if ( ! $any_top_items && ( 0 == $items[$key]->$col_parent ) ) - // $any_top_items = true; - - if ( ( $first_child_of_match < 0 ) && ( $child_of == $items[$key]->$col_parent ) ) - $first_child_of_match = $key; - } - } - - // temporary WP bug workaround - //if ( $child_of && ( $parent < 0 ) && ( ! $any_top_items ) && $first_child_of_match ) { - if ( $child_of && ( $parent < 0 ) && $first_child_of_match ) { - $first_item = reset($items); - - if ( $child_of != $first_item->$col_parent ) { - // As of WP 2.8.4, Walker class with botch this array because it assumes that the first element in the page array is a child of the display root - // To work around, we must move first element with the desired child_of up to the top of the array - $_items = array( $items[$first_child_of_match] ); - - unset( $items[$first_child_of_match] ); - $items = array_merge( $_items, $items ); - } - } - - if ( $remapped_items ) - $items = array_merge($items, $remapped_items); - - } // end function rs_remap_tree - -} // end class ScoperHardway - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/hardway/wp-patches_agp.php b/blog/wp-content/plugins/role-scoper/hardway/wp-patches_agp.php deleted file mode 100644 index 479a860..0000000 --- a/blog/wp-content/plugins/role-scoper/hardway/wp-patches_agp.php +++ /dev/null @@ -1,35 +0,0 @@ - 7 && strpos($link, '//', 7) > 7 ) { - if ( empty($home_path) ) - $home_path = get_option('home'); - - $link = $home_path . "/?page_id=$id"; - } - - return $link; -} - -add_filter('_get_page_link', 'scoper_flt_page_link', 50, 2); -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.mo b/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.mo deleted file mode 100644 index a019171..0000000 Binary files a/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.mo and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.po b/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.po deleted file mode 100644 index 1d6daa8..0000000 --- a/blog/wp-content/plugins/role-scoper/languages/scoper-es_ES.po +++ /dev/null @@ -1,2611 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Role Scoper 1.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-31 13:31-0400\n" -"PO-Revision-Date: \n" -"Last-Translator: Rafael Pérez \n" -"Language-Team: Rafo \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Spanish\n" -"X-Poedit-Country: SPAIN\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: E:\\AppServ\\www\\renacimiento.cl\\wp-content\\plugins\\role-scoper\n" -"X-Poedit-KeywordsList: __;_e;_c;__ngettext;_n;scoper_po_trigger;_x\n" -"X-Poedit-SearchPath-0: E:\\AppServ\\www\\renacimiento.cl\\wp-content\\plugins\\role-scoper\n" -"X-Poedit-SearchPath-1: E:\\AppServ\\www\\renacimiento.cl\\wp-content\\plugins\\role-scoper\\admin\n" -"X-Poedit-SearchPath-2: E:\\AppServ\\www\\renacimiento.cl\\wp-content\\plugins\\role-scoper\\hardway\n" -"X-Poedit-SearchPath-3: E:\\AppServ\\www\\renacimiento.cl\\wp-content\\plugins\\role-scoper\\lib\n" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/data_sources_rs.php:26 -#, fuzzy -msgid "Term" -msgstr "Término" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/data_sources_rs.php:26 -msgid "Terms" -msgstr "Términos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:95 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:112 -msgid "Sorry, this content requires additional permissions. Please contact an administrator for help." -msgstr "Lo sentimos, este contenido requiere de permisos adicionales. Póngase en contacto con un administrador para obtener ayuda." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:96 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:113 -msgid "Sorry, you don't have access to this content. Please log in or contact a site administrator for help." -msgstr "Lo sentimos, no tiene acceso a este contenido. Inicia sesión o comunícatee con un administrador del sitio para obtener ayuda." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:109 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:126 -msgid "note: This content requires a higher login level." -msgstr "Nota: Este contenido requiere un mayor nivel de acceso." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:110 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:127 -msgid "note: This content requires site login." -msgstr "Nota: Este contenido requiere inicio de sesión." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:166 -msgid "front-end" -msgstr "Consola de Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:167 -msgid "admin" -msgstr "Administrador" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:390 -msgid "Link" -msgstr "Vínculo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:416 -msgid "Group" -msgstr "Grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:417 -msgid "Groups" -msgstr "Grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/defaults_rs.php:491 -msgid "Link Category" -msgstr "Categoría de vínculos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/feed-interceptor_rs.php:57 -msgid "Access denied: Incorrect credentials supplied." -msgstr "Acceso denegado: Credenciales incorrectas suministradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/role-scoper.php:37 -#, php-format -msgid "Error: Multiple copies of Role Scoper activated. Only version %1$s (in folder \"%2$s\") is functional." -msgstr "Error: Varias copias de Role Scoper están habilitadas. Sólo la versión %1$s (en directorio \"%2$s\") está activa." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:8 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Post Reader" -msgstr "Lector de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Private Post Reader" -msgstr "Lector de artículo privado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:17 -msgid "Post Contributor" -msgstr "Contribuyente de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:20 -msgid "Post Author" -msgstr "Autor de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:23 -msgid "Post Revisor" -msgstr "Revisor de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:27 -msgid "Post Publisher" -msgstr "Publicador de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:29 -msgid "Post Editor" -msgstr "Editor de artículo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:32 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Page Reader" -msgstr "Lector de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Private Page Reader" -msgstr "Lector de página privada" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:38 -msgid "Page Associate" -msgstr "Asociado de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:41 -msgid "Page Contributor" -msgstr "Contribuyente de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:44 -msgid "Page Author" -msgstr "Autor de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:47 -msgid "Page Revisor" -msgstr "Revisor de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:51 -msgid "Page Publisher" -msgstr "Publicador de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:53 -msgid "Page Editor" -msgstr "Editor de página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:56 -msgid "Link Admin" -msgstr "Administración de Vínculos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:59 -msgid "Category Manager" -msgstr "Gestión de Categorías" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:62 -msgid "Group Manager" -msgstr "Gestión de Grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:75 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Readers" -msgstr "Lectores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Private Readers" -msgstr "Lectores Privados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:83 -msgid "Contributors" -msgstr "Contribuyentes" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:87 -msgid "Authors" -msgstr "Autores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:91 -msgid "Revisors" -msgstr "Revisores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:96 -msgid "Publishers" -msgstr "Publicadores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:98 -msgid "Editors" -msgstr "Editores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:101 -msgid "Associates" -msgstr "Socios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:105 -msgid "Admins" -msgstr "Administradores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:109 -msgid "Managers" -msgstr "Directores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:122 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -msgid "Reader" -msgstr "Lector" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -msgid "Pvt Reader" -msgstr "Lector Privado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:130 -msgid "Contrib" -msgstr "Contribuyente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:134 -msgid "Author" -msgstr "Autor" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:138 -msgid "Revisor" -msgstr "Revisor" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:143 -msgid "Publisher" -msgstr "Publicador" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:145 -msgid "Editor" -msgstr "Editor" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:148 -msgid "Assoc" -msgstr "Socio" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:152 -msgid "Admin" -msgstr "Administrador" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles-strings_rs.php:156 -msgid "Manager" -msgstr "Director" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/roles_rs.php:387 -msgid "Anonymous Reader" -msgstr "Lector anónimo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/teaser_rs.php:263 -#, php-format -msgid "%s..." -msgstr "%s..." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:31 -msgid "unselfish, benevolent love, born of the Spirit." -msgstr "desinteresado, amor benevolente, nacido del Espíritu." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:33 -msgid "Agapé discerns needs and meets them unselfishly and effectively." -msgstr "Ágape discierne sobre las necesidades y las satisface desinteresada y eficazmente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:36 -#, php-format -msgid "This WordPress plugin is part of my agapé try, a lifelong effort to love God and love people by rightly using the time and abilities He has leant me. As a husband, father, engineer, farmer and/or software developer, I have found this stewardship effort to be often fraught with contradiction. A wise and sustainable balancing of roles has seemed to elude me. Yet I want to keep trying, trusting that if God blesses and multiplies the effort, it will become agapetry, a creative arrangement motivated by benevolent love. A fleeting childlike sketch of the beautiful %1$s chain-breaking agapé%2$s which %3$s Jesus Christ unleashed%4$s so %5$s freely%6$s and aptly on an enslaving, enslaved world." -msgstr "Este plugin de WordPress es parte de mi agapé un esfuerzo de toda una vida en amar a Dios y amar a la gente en forma justa, usando el tiempo y las habilidades que Él me ha prestado. Como esposo, padre, ingeniero, agricultor y desarrollador de software. A menudo, he encontrado este esfuerzo de administración de mis talentos, estar lleno de contradicciones. Parecerí que eludo un equilibrio racional y sostenible de los roles. Sin embargo, quiero seguir intentando, confiando en que, si Dios bendice y multiplica el esfuerzo, se convertirá en agapetry, un acuerdo creativo motivado por el benevolente amor. Un fugaz dibujo infantil de mi hermosa liberación %1$s de esas cadenas %2$s por medio de %3$s Jesucristo %4$s, tan %5$s libremente%6$s y con tanto acierto, en un mundo esclavizante y de esclavitud." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:38 -#, php-format -msgid "Although Role Scoper's development was a maniacal hermit-like effort, it was only possible because of the clean and flexible %1$s WordPress code base%2$s. My PHP programming skills grew immensely by the good examples set forth there and in plugins such as %3$s NextGen Gallery%4$s. I'm not done learning, and look forward to some real-time cooperation with these and other developers now that my all-consuming quest has reached a stable plateau." -msgstr "El inigualable, ermitaño y maniático esfuerzo en el desarrollo del Role Scoper, sólo fue posible gracias a la %1$s base de código %2$s limpio y flexible de Wordpress. Mis conocimientos de programación PHP creció enormemente por los buenos ejemplos establecidos allí y en los plugins como %3$s NextGen Gallery%4$s. No he terminado de aprender, y tengo esperanza de recibir algún tipo de cooperación en tiempo real de estos y otros desarrolladores, ahora que veo que mi obsesiva búsqueda ha alcanzado un nivel aceptable." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:40 -#, php-format -msgid "Thanks to %1$sAlberto Ramicciotti%2$s for the Italian translation. I do try to be translator-friendly, but any untranslated captions are due to my flurry of recent additions and changes, and will no doubt be updated soon. Now there must be someone else who wants Role Scoper in their language..." -msgstr "Gracias a %1$sRafo Computación & Web%2$s por la traducción al español. Trato de hacer código fácilmente traducible, y cualquier frase no traducida se puede deber a mi serie de adiciones y cambios recientes, que sin duda se actualizará en breve. Ahora tiene que haber alguien más que quiera Rol Scoper en su idioma..." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:42 -#, php-format -msgid "Role Scoper is open source software released under the %1$s General Public License (GPL)%2$s. Due to limitations, obligations and non-technical aspirations common to most human beings, I will probably never again pursue uncommissioned plugin development on the scale Role Scoper has required. However, I do plan to provide some free support, correct bugs which emerge and revise the plugin for future WordPress versions. If it adds value to your website or saves you time and money, you can express appreciation in several ways:" -msgstr "Role Scoper es un software de código abierto publicado bajo %1$s General Public License (GPL)%2$s. Debido a las limitaciones, obligaciones y aspiraciones técnicas comunes a la mayoría de los seres humanos, probablemente nunca volverá a intentar el desarrollo de plugins en la escala y envergadura que Role Scoper ha requerido. Sin embargo, planeo proveer algo de apoyo gratuito, corregir errores que surgan y actualizar el plug-in para futuras versiones de WordPress. Si añade valor a su sitio web o le ahorra tiempo y dinero, puede expresar su reconocimiento de varias maneras:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:44 -#, php-format -msgid "%1$s Submit technical feedback%2$s, including improvement requests." -msgstr "%1$s Enviar comentarios técnicos %2$s, y las solicitudes de mejora." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:46 -#, php-format -msgid "%1$s Submit a case study%2$s, explaining how Role Scoper helps you do something excellent and praiseworthy." -msgstr "%1$s Presentar un caso de estudio%2$s, explicando cómo Role Scoper le ayuda a hacer algo excelente y digno de elogio." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:48 -#, php-format -msgid "%1$s Localize Role Scoper%2$s to your own language %3$s using poEdit%4$s " -msgstr "%1$s Traducir Role Scoper%2$s a su propio idioma %3$s usando poEdit%4$s " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:52 -#, php-format -msgid "If the plugin has seriously broadened your CMS horizons, %s" -msgstr "Si el plugin ha ampliado drásticamente sus horizontes en CMS, %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:54 -#, php-format -msgid "If you are an established web developer, %1$s grant me your professional opinion%2$s on how this work stacks up. Might the skills, work ethic and values I express here fit into a development team near you?" -msgstr "Si usted es un desarrollador web establecido, %1$s Deme su opinión profesional%2$s sobre cómo funciona este trabajo. Es posible que los conocimientos, la ética de trabajo y los valores que expreso aquí calcen con algún perfil de equipo de desarrollo de cerca de usted?" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/about.php:56 -msgid "Hire or refer my services to design, redesign or enhance your site - quality care at reasonable rates." -msgstr "Contrate o recomiende mis servicios, rediseñe o mejore su sitio web, con calidad y eficiencia a precios razonables. " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:48 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:677 -msgid "Users or Groups" -msgstr "Usuarios o Grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:57 -msgid "User / Group" -msgstr "Usuario / Grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:59 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:262 -msgid "User" -msgstr "Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:90 -msgid "Select Assignment Mode" -msgstr "Seleccione el Modo de Asignación" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:107 -msgid "Select Restriction Mode" -msgstr "Seleccione el modo de Restricción" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:115 -msgid "Review and Submit" -msgstr "Revisar y Enviar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:152 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1067 -msgid "Update »" -msgstr "Actualizar »" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:159 -#, php-format -msgid "Select %s to Modify" -msgstr "Seleccionar %s para modificar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:173 -msgid "Set Role Duration and/or Content Date Limits (optional)" -msgstr "Ajustar Duracion y Caducidad para Roles y Contenidos (opcional)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:183 -msgid "Select Roles to Assign / Remove" -msgstr "Seleccionar Roles para Asignar / Remover" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:188 -msgid "Select Roles to Modify" -msgstr "Seleccionar Roles para Moficar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:253 -#, php-format -msgid "Error: no %s were selected!" -msgstr "Error: Ningún %s fue seleccionado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:259 -msgid "Error: no roles were selected!" -msgstr "Error: Ningún rol ha sido seleccionado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:350 -#, php-format -msgid "%d user" -msgstr "%d usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:352 -#, php-format -msgid "%d group" -msgstr "%d grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:360 -#, php-format -msgid "%d role selection" -msgstr "%d selección de rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:362 -#, php-format -msgid "Role Assignments Updated: %1$s for %2$s" -msgstr "Asignaciones de rol completadas: %1$s para %2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:366 -#, php-format -msgid "Role Restrictions Updated: %d setting" -msgstr "Limitación de roles completada: %d ajustes" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:516 -msgid "unselect all roles" -msgstr "desmarcar todos los roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:521 -msgid "hide users" -msgstr "ocultar usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:525 -msgid "show users" -msgstr "mostrar usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:531 -msgid "hide groups" -msgstr "ocultar grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:535 -msgid "show groups" -msgstr "mostrar grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:541 -msgid "hide roles" -msgstr "ocultar roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:545 -msgid "show roles" -msgstr "mostrar roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:571 -msgid "hide unmodified items" -msgstr "ocultar items no modificado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:574 -msgid "hide defaulted" -msgstr "ocultar predefinido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:576 -msgid "hide unassigned" -msgstr "ocultar no asignado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:587 -msgid "items" -msgstr "items" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:590 -#, php-format -msgid "include the newest %s with default restrictions" -msgstr "incluir los nuevos %s con restricciones por defecto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:592 -#, php-format -msgid "include the newest %s with no role assignments" -msgstr "incluir los nuevos %s sin asignación de roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:596 -msgid "show defaulted" -msgstr "mostrar predeterminado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:598 -msgid "show unassigned" -msgstr "mostrar no asignados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:612 -msgid "collapse all" -msgstr "colapsar todo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:623 -msgid "expand all" -msgstr "expandir todo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:630 -#, php-format -msgid "Note: %1$s with default restrictions will not be listed here unless they are among the %2$s newest." -msgstr "Nota: %1$s con restricciones por defecto no será listados aquí a menos que esté entre los %2$s más recientes." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:632 -#, php-format -msgid "Note: %1$s with no role assignments will not be listed here unless they are among the %2$s newest." -msgstr "Nota: %1$s sin asignación de roles no será listados aquí a menos que estén entr los %2$s más recientes." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:688 -msgid "prev" -msgstr "Anterior" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:689 -msgid "next" -msgstr "Siguiente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:697 -#, php-format -msgid "Current %s" -msgstr "%s actual" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:701 -msgid "Current Restrictions" -msgstr "Restricciones actuales" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:731 -msgid "top" -msgstr "Arriba" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:733 -msgid "show all" -msgstr "mostrar todo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:743 -#, php-format -msgid "DEFAULTS for new %s" -msgstr "VALORES PREDETERMINADOS para nuevos %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:745 -#, php-format -msgid "DEFAULTS for all %s" -msgstr "VALORES PREDETERMINADOS para todos los %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:762 -msgid "edit roles" -msgstr "modifica roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:763 -#, php-format -msgid "edit %s" -msgstr "editar %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:821 -#, php-format -msgid "id %s" -msgstr "id %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1074 -msgid "select / unselect all:" -msgstr "seleccionar / deseleccionar todo:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1075 -msgid "Actions" -msgstr "Acciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1096 -#, php-format -msgid "(all %s)" -msgstr "(todo los %s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:11 -msgid "Pending Post" -msgstr "artículo pendiente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:29 -msgid "Pending Page" -msgstr "Página pendiente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:53 -msgid "Role Duration specifies the time period in which a role is active." -msgstr "Duración del Rol especifica el período de tiempo en el que una función está activa." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:58 -msgid "Content Date Limits narrow the content which the role applies to." -msgstr "Fecha de Caducidad del Contenido filtra el contenido y las fechas donde se aplica el Rol." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:77 -msgid "Modify Role Duration" -msgstr "Modificar Duración del Rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:85 -msgid "Grant Role on:" -msgstr "Habilitar Rol en:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:90 -msgid "Expire Role on:" -msgstr "Terminar Rol en:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:112 -msgid "Modify Content Date Limits" -msgstr "Modificar Límites de Fecha para contenidos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:118 -msgid "Min Content Date:" -msgstr "Fecha Mínima del contenido:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:123 -msgid "Max Content Date:" -msgstr "Fecha máxima del contenido:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:135 -msgid "This controls what limits to apply to the User / Group roles you select for creation or modification. Currently stored limits are indicated by a colored background behind the User or Group name. For details, hover over the name or view the User or Group Profile." -msgstr "Controla qué límites aplicar a los roles de Usuarios y Grupos seleccionados para crear o modificar. Límites almacenados act5ualmente están indicados por un fondo coloreado tras el nombre del Usuario o Grupo. Para detalles, mueve el cursor sobre el nombre o examina el Perfil del Usuario o Grupo." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:238 -#, php-format -msgid "%1$s%2$s, %3$s @ %4$s : %5$s" -msgstr "%1$s%2$s, %3$s @ %4$s : %5$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:266 -msgid "keep current setting" -msgstr "guardar ajustes actuales" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:393 -msgid "Role Scoper Options" -msgstr "Opciones de Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -msgid "Role Options" -msgstr "Opciones de Rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Scoper Option Defaults" -msgstr "Opciones Predefinidas de Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Defaults" -msgstr "Rol predefinido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:218 -#, php-format -msgid "[WP %s]" -msgstr "[%s WP]" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:221 -msgid "[Anonymous]" -msgstr "[Anónimo]" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:232 -#, php-format -msgid "All users with the WordPress role of %s" -msgstr "Todos los usuarios con el rol WordPress de %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:235 -msgid "Anonymous users (not logged in)" -msgstr "Usuarios Anónimos (no autentificados)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:114 -#, php-format -msgid "assign role for this %s" -msgstr "asignar rol para este %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:115 -#, php-format -msgid "assign role for sub-%s" -msgstr "asignar rol para sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:168 -#, php-format -msgid "%1$s Role Scoper Documentation%2$s" -msgstr "%1$s Documentación de Role Scoper%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:169 -#, php-format -msgid "%1$s Role Scoper Support Forum%2$s" -msgstr "%1$s Foro de soporte para Role Scoper%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:254 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:259 -msgid "Role Groups" -msgstr "Grupos de Roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "User Groups" -msgstr "Grupos de Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -msgid "Default Groups" -msgstr "Grupos predeterminados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "Group Members" -msgstr "Miembros del Grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:382 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:400 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:405 -msgid "Restrictions" -msgstr "Restricciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:383 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:401 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:403 -msgid "Roles" -msgstr "Roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:390 -msgid "Role Restrictions" -msgstr "Restricciones de Rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General Roles" -msgstr "Roles Generales" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General" -msgstr "General" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:458 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:530 -#, php-format -msgid "%s Roles" -msgstr "Roles %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:470 -#, php-format -msgid "%s restrictions" -msgstr "Restricciones de %s " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:539 -#, php-format -msgid "%s Restrictions" -msgstr "Restricciones de %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About Role Scoper" -msgstr "Acerca de Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About" -msgstr "Acerca de" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:569 -msgid "Attachment Utility" -msgstr "Utilidad para Adjuntos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_rs.php:637 -msgid "Object Role Edit" -msgstr "Editar Rol de Objeto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:152 -#, php-format -msgid "TO START on %s" -msgstr "COMIENZO el %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:153 -#, php-format -msgid "started on %s" -msgstr "iniciado el %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:154 -#, php-format -msgid "EXPIRED on %s" -msgstr "EXPIRACIÓN el %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:155 -#, php-format -msgid "expire on %s" -msgstr "expira el %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:157 -#, php-format -msgid "(for content %1$s to %2$s)" -msgstr "(para contenidos entre %1$s y %2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:158 -#, php-format -msgid "(for content after %1$s)" -msgstr "(para contenidos posteriores a %1$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:159 -#, php-format -msgid "(for content before %1$s)" -msgstr "(para contenidos anteriores a %1$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:234 -#, php-format -msgid "Restricted for %s" -msgstr "Restringido para %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:235 -#, php-format -msgid "Unrestricted for %1$s, Restricted for sub-%2$s" -msgstr "Libre para %1$s, Restringido para sub-%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:236 -#, php-format -msgid "Restricted for selected and sub-%s" -msgstr "Restringido para la selección y sus sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:237 -msgid "Unrestricted by default" -msgstr "Libre por defecto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:238 -msgid "Unrestricted" -msgstr "Libre" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:241 -#, php-format -msgid "Unrestricted for %s" -msgstr "Libre para %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:242 -#, php-format -msgid "Unrestricted for sub-%s" -msgstr "Libre para sus sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:243 -#, php-format -msgid "Unrestricted for selected and sub-%s" -msgstr "Libre para la selección y sus sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:244 -msgid "Restricted by default" -msgstr "Restringido por defecto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:245 -msgid "Restricted" -msgstr "Restringido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Groupname" -msgstr "Nombre de grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Username" -msgstr "Nombre de usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:269 -msgid "Users / Groups Key" -msgstr "Llave para Usuarios / Grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:276 -#, php-format -msgid "%1$s has role assigned for the specified %2$s." -msgstr "%1$s tiene Rol asignado para las %2$s especificadas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:281 -#, php-format -msgid "%1$s has role assigned for the specified %2$s and, by default, for all its sub-%3$s. (Propagated roles can also be explicitly removed)." -msgstr "%1$s tiene Rol asignado para las %2$s especificadas, y por defecto, para todas sus sub-%3$s. (Roles propagados pueden también ser explícitamente removidos)." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:286 -#, php-format -msgid "%1$s does NOT have role assigned for the specified %2$s, but has it by default for sub-%3$s." -msgstr "%1$s no tiene Rol asignado para las %2$s especificadas, sino por defecto para sus sub-%3$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:291 -#, php-format -msgid "%1$s has this role via propagation from parent %2$s, and by default for sub-%3$s." -msgstr "%1$s tiene Rol asignado por propagación desde sus padres %2$s, y por defecto para sus sub-%3$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:296 -msgid "Role Name" -msgstr "Nombre de Rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:297 -#, php-format -msgid "role is restricted for specified %s." -msgstr "El Rol está restringido para el %s especificado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:308 -msgid "Scroll to current settings:" -msgstr "Vaya a la configuración actual:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:380 -#, php-format -msgid "Category Roles for WordPress pages are disabled for this blog. Object Roles can be assigned to individual pages, and optionally propagated to sub-pages." -msgstr "Los Roles de Categoría se encuentran deshabilitados. Los Roles de Objetos pueden ser asignados a páginas individuales, y, opcionalmente, propagados a sus sub-páginas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:384 -#, php-format -msgid "Another option is to categorise pages via the Page Category Plus plugin." -msgstr "Otra opción consiste en clasificar las páginas a través del plugin Page Category Plus." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:435 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:438 -msgid "Main Page (no parent)" -msgstr "Página principal (sin padre)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:23 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:31 -#, php-format -msgid "%1$s define user groups%2$s" -msgstr "%1$s definir grupos de usuarios%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:25 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:33 -#, php-format -msgid "Note: To assign roles to user groups, first %1$s define the group(s)%2$s." -msgstr "Nota: Para asignar roles a grupos de usuarios, primero se necesita %1$s definir los grupos %2$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:65 -#, php-format -msgid "Actions: %s" -msgstr "Acciones: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:74 -msgid "Key:" -msgstr "Clave:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:83 -msgid "Enter additional Group Names or IDs (comma-separate)" -msgstr "Introducir Nombres o ID de Grupos adicionales (separados por comas)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:83 -msgid "Enter additional User Names or IDs (comma-separate)" -msgstr "Introducir Nombres o ID de Grupos adicionales (separados por comas)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:89 -msgid "Enter additional Group Names or IDs for Subpages" -msgstr "Introducir Nombres o ID de Grupos adicionales para las subpáginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:89 -msgid "Enter additional User Names or IDs for Subpages" -msgstr "Introducir Nombres o ID de Usuarios adicionales para las subpáginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:155 -#, php-format -msgid "show current groups (%d)" -msgstr "mostrar grupos actuales (%d)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:155 -#, php-format -msgid "show eligible groups (%d)" -msgstr "mostrar grupos disponibles (%d)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:157 -#, php-format -msgid "show current users (%d)" -msgstr "mostrar usuarios actuales (%d)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:157 -#, php-format -msgid "show eligible users (%d)" -msgstr "mostrar usuarios disponibles (%d)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:177 -msgid "filter:" -msgstr "filtro:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:186 -msgid "select" -msgstr "seleccionar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:191 -msgid "unselect" -msgstr "deseleccionar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:197 -msgid "propagate" -msgstr "propagar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:202 -msgid "unpropagate" -msgstr "no propagar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:211 -#, php-format -msgid "current groups (%d):" -msgstr "grupos actuales (%d):" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:211 -#, php-format -msgid "eligible groups (%d):" -msgstr "grupos disponibles (%d):" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:213 -#, php-format -msgid "current users (%d):" -msgstr "usuarios actuales (%d):" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:213 -#, php-format -msgid "eligible users (%d):" -msgstr "usuarios disponibles (%d):" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:222 -msgid "object" -msgstr "objeto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:225 -msgid "objects" -msgstr "objetos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:446 -#, php-format -msgid "inherited from parent %s" -msgstr "heredado del padre %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:450 -msgid "has via other role" -msgstr "tiene vía otro rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:454 -msgid "has via group" -msgstr "tiene vía grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:458 -msgid "has via other scope" -msgstr "tiene a través de otros alcances" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:462 -#, php-format -msgid "propagate to sub-%s" -msgstr "propagar a sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:465 -#, php-format -msgid "%1$sEdit date limits%2$s" -msgstr "%1$sEditar rango de fechas%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:17 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because your WP_CONTENT_DIR is not in the WordPress branch." -msgstr "Nota: Acceso directo a los archivos adjuntos de archivos subidos no se pueden filtrar porque su WP_CONTENT_DIR no está bajo el directorio." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:19 -msgid "The operation was terminated due to an invalid configuration." -msgstr "La operación se terminó debido a una configuración no válida." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:48 -#, php-format -msgid "checking %s posts / pages..." -msgstr "revisando %s artículos / páginas..." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:86 -#, php-format -msgid "skipping unfilterable file in %1$s \"%2$s\": %3$s" -msgstr "saltando archivo no filtrable en %1$s \"%2$s\": %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:128 -#, php-format -msgid "new attachment in %1$s \"%2$s\": %3$s" -msgstr "nuevo adjunto en %1$s \"%2$s\": %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:133 -#, php-format -msgid "attachment OK in %1$s \"%2$s\": %3$s" -msgstr "adjunto OK en %1$s \"%2$s\": %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:148 -#, php-format -msgid "Operation complete: %s linked uploads were found in your post / page content." -msgstr "Operación completa: %s subidas vinculadas fueron encontradas en el contenido del artículo / página." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:151 -#, php-format -msgid "%s attachment records were added to the database." -msgstr "%s registros de datos adjuntos se añadieron a la base de datos." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:153 -msgid "All linked uploads are already registered as attachments." -msgstr "Todos los archivos subidos vinculados ya están registrados como archivos adjuntos." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:165 -msgid "Attachments Utility" -msgstr "Utilidad para Adjuntos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:167 -#, php-format -msgid "Back to %1$sRole Scoper Options%2$s" -msgstr "Regresar a %1$sOpciones de Role Scoper%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:180 -msgid "Role Scoper can limit direct URL access to files linked from your posts and pages, but only if the following requirements are met:" -msgstr "Role Scoper puede limitar el acceso URL directo a los archivos vinculados de sus mensajes y páginas, pero sólo si se cumplen los siguientes requisitos:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:182 -msgid "Your WP content directory must be a branch of the WordPress directory tree (i.e. wp-config.php must not be customized to separate WP_CONTENT_DIR and WP_CONTENT_URL from the main WordPress folder)." -msgstr "El directorio de contenido debe encontrarse bajo el árbol de directorios (es decir, wp-config.php no debe personalizarse para separar WP_CONTENT_DIR y WP_CONTENT_URL de la carpeta principal)." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:188 -msgid "Note that to be detected as attachments, your file references must include www." -msgstr "Tenga en cuenta que para ser detectadas como archivos adjuntos, sus referencias de archivo deben incluir www." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:190 -msgid "Note that to be detected as attachments, your file references must NOT include www." -msgstr "Tenga en cuenta que para ser detectadas como archivos adjuntos, sus referencias de archivo deben NO incluir www." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:195 -#, php-format -msgid "Files linked from WP Posts and Pages must be in %1$s (or a subdirectory of it) to be filtered. After moving files, you may use %2$s a search and replace plugin%3$s to conveniently update the URLs stored in your Post / Page content. %4$s" -msgstr "Los archivos vinculados en Artículos y Páginas deben estar en %1$s (o en un subdirectorio del mismo) para ser filtrados. Después de mover archivos, puede utilizar la búsqueda %2$s y reemplazar plugin%3$s para convenientemente actualizar las URL almacenadas en el contenido del Artículo / Páginas. %4$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:197 -msgid "Files which are already appropriately located and linked must also have their post-file attachment relationship stored to the WP database. This is normally accomplished by clicking the \"Insert into Post\" button in the WP file uploader / Media Library. Files which were instead uploaded manually via FTP or CPanel can receive their attachment record via this utility." -msgstr "Los ficheros que están ya debidamente ubicados y vínculados también deben tener almacenada en la base de datos, su relación con el adjunto del archivo del Artículo. Esto normalmente se logra haciendo clic en el \"Insertar en artículo \" en el subidor de archivos / Biblioteca multimedia. Archivos que fueron subidos en lugar manualmente a través de FTP o CPanel pueden recibir sus registros de adjuntos a través de esta utilidad." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/attachments_utility.php:206 -msgid "Register File Attachments »" -msgstr "Registrar Adjuntos de Archivo »" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:8 -msgid "see notes" -msgstr "ver notas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:30 -#, php-format -msgid "Default Groups Updated: %s groups" -msgstr "Grupos Predeterminados Actualizados: %s grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:44 -msgid "No default groups defined." -msgstr "No hay grupos definidos por defecto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:66 -msgid "No groups defined." -msgstr "No hay grupos definidos." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:72 -msgid "Notes" -msgstr "Notas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:74 -msgid "Each new user will be added to the default groups. Existing users are not affected." -msgstr "Cada nuevo usuario se añadirá a los grupos por defecto. Los usuarios existentes no se ven afectados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/default_groups.php:77 -msgid "Use default groups only if you need the ability to manually remove a user from one of the groups later. To affect all users (or all users of a certain WP role), assign roles to the corresponding [WP role] group instead." -msgstr "utilice los grupos por defecto sólo si se necesita la capacidad de eliminar manualmente un usuario de uno de los grupos más adelante. Para afectar a todos los usuarios (o a todos los usuarios de un rol WP determinado), en vez, asigna directamente roles al rol WP correspondiente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:400 -#, php-format -msgid "The page %s was saved, but the new Page Parent setting was discarded. You do not have permission to disassociate it from the Main Page." -msgstr "La Página %s ha sido guardada, pero la nueva configuración de Página Padre fue descartada. Tú no tienes privilegios para disociarla de la Página Principal." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:402 -#, php-format -msgid "The Page Parent setting for %s was reverted to the previously stored value. You do not have permission to associate it with the Main Page." -msgstr "La configuración de Página Padre para %s se ha regresado al valor almacenado previamente. Tú no tienes privilegios para asociarla con la Página Principal." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:416 -#, php-format -msgid "The page %s cannot be published because you do not have permission to associate it with the Main Page. Please select a different Page Parent and try again." -msgstr "La página %s no puede ser publicada debido a que no tienes permiso para asociarla a la página principal. Por favor seleccione una Página Padre diferente y vuelve a intentarlo." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:43 -msgid "Restrict" -msgstr "Restringir" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:48 -msgid "Term Roles" -msgstr "Roles para Términos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:66 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:68 -msgid "Read" -msgstr "Reed" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:170 -msgid "Role Scoper Plugin CSS:" -msgstr "CSS del Plugin Role Scoper:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Role Scoper" -msgstr "Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Support Forum" -msgstr "Foro de soporte" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:227 -msgid "Note: Role Manager settings determine each user's default blog-wide capabilities. Since the Role Scoper plugin is also enabled, Term-specific or Object-specific Role Assignments may increase or decrease a user's actual capabilities." -msgstr "Nota: La configuración del Administrador de Roles determina las capacidades predeterminadas para cada usuario. Dado que el plugin Role Scoper también está habilitado, las Asignaciones específicas de Roles a Objetos o Plazos puede aumentar o disminuir las capacidades reales de un usuario." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:174 -msgid "Assign" -msgstr "Asignar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:174 -msgid "Remove" -msgstr "Remover" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:177 -msgid "Assign General Roles" -msgstr "Asignar Roles Generales" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:181 -msgid "Supplement any user's blog-wide WordPress Role with additional, type-specific role(s). This does not alter the WordPress role." -msgstr "Complementa todos los Roles existentes con roles adicionales de tipo específico, pero no altera los Roles existentes." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:207 -msgid "Confirm and Submit" -msgstr "Confirmar y Enviar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:260 -msgid "select all roles" -msgstr "seleccionar todos los roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:287 -msgid "hide empty" -msgstr "ocultar vacíos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/general_roles.php:329 -#, php-format -msgid "Modify role assignments for %s" -msgstr "Modifica asignaciones de rol para %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:42 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:93 -msgid "Please specify a name for the group." -msgstr "Por favor, especifique un nombre para el grupo." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:44 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:96 -#, php-format -msgid "A group with the name %s already exists." -msgstr "Un grupo con el nombre %s ya existe." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:47 -#, php-format -msgid "Group %s created successfuly." -msgstr "Grupo %s creado exitosamente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:64 -msgid "This meta group is automatically populated. You cannot manually edit it." -msgstr "Este grupo meta se rellena automáticamente. No se puede editar manualmente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:101 -#, php-format -msgid "Group %s updated successfuly." -msgstr "Grupo %s actualizado exitosamente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:103 -#, php-format -msgid "Group %s was not updated successfuly." -msgstr "Grupo %s no fue actualizado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:119 -msgid "Group Deleted." -msgstr "Grupo eliminado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:121 -msgid "Invalid group. No groups were deleted." -msgstr "Grupo no válido. Ningún grupo fue eliminado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:130 -msgid "Group edit canceled." -msgstr "Edición de grupo cancelada." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:152 -#, php-format -msgid "%d member deleted." -msgstr "%d miembro borrado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:157 -#, php-format -msgid "%d member added." -msgstr "%d miembro añadido." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:195 -msgid "add new" -msgstr "añadir nuevo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:196 -msgid "set defaults" -msgstr "valores predeterminados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:197 -msgid "browse members" -msgstr "Mostrar miembros" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:203 -msgid "By creating User Groups, you can assign RS roles to multiple users. Note that group membership itself has no effect on the users until you assign roles to the group." -msgstr "Mediante la creación de grupos de usuarios, puede asignar funciones de RS para múltiples usuarios. Tenga en cuenta que la pertenencia a un grupo, en sí no tiene ningún efecto en los usuarios hasta que al grupo se le asignan roles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:211 -#, php-format -msgid "You are about to delete the group %s. Do you wish to continue?" -msgstr "Está a punto de eliminar el grupo %s. ¿Desea continuar?" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:274 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:82 -msgid "No groups available." -msgstr "No hay grupos disponibles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:294 -msgid "Create New Group" -msgstr "Crear nuevo grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:310 -#, php-format -msgid "Edit Group: %s" -msgstr "Editar Grupo: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:371 -#, php-format -msgid "Group Administrators %1$s(via login to %2$s)%3$s" -msgstr "Administradores de Grupos %1$s (via acceso a %2$s) %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/groups.php:373 -msgid "Group Administrators" -msgstr "Administradores de grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:22 -#, php-format -msgid "%s group membership updated." -msgstr "participación en el grupo %s actualizada." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:27 -msgid "Invalid group." -msgstr "Grupo no válido." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:32 -msgid "Group members edit canceled." -msgstr "Edición de miembros de grupoo cancelada." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:68 -msgid "(automatic)" -msgstr "(automático)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:70 -msgid "(no users)" -msgstr "(no hay usuarios)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:93 -msgid "This meta group is automatically populated. You cannot manually add members to it." -msgstr "Este grupo meta se rellena automáticamente. No se le puede agregar miembros manualmente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/group_members.php:96 -#, php-format -msgid "Edit members of %s group" -msgstr "Editar miembros de %s grupos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:267 -#, php-format -msgid "Restrict for %1$s (only selected users/groups are %2$s)" -msgstr "Restringir para %1$s (solo usuarios/grupos selecccionados son %2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:278 -#, php-format -msgid "Restrict for Sub-%1$s" -msgstr "Restringir para sus sub-%1$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:442 -msgid "restricted role" -msgstr "rol restringido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:446 -#, php-format -msgid "%s user" -msgstr "%s usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:452 -#, php-format -msgid "%s group" -msgstr "%s grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:569 -msgid "Category Restrictions" -msgstr "Restricción de Categorías" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:579 -msgid "Category Roles" -msgstr "Roles de Categorías" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:10 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:10 -msgid "Invalid data source" -msgstr "Fuente de datos no válida" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:66 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and %5$s Role assignments are ignored." -msgstr "Reducir el acceso a un %1$s específico, mediante la asignación de algunos roles a la %2$s%3$s %4$s. Los roles WP correspondientes y las asignaciones RS de Roles y de Roles Generales a %5$s son ignoradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:68 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and Section Role assignments are ignored." -msgstr "Reducir el acceso a un %1$s específico, mediante la asignación de algunos roles a la %2$s%3$s %4$s. Los roles WP correspondientes y las asignaciones RS de Roles Generales y de Sección son ignoradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:70 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General Role assignments are ignored." -msgstr "Reducir el acceso a un %1$s específico, mediante la asignación de algunos roles a la %2$s%3$s %4$s. Los roles WP correspondientes y las asignaciones RS de Roles Generales son ignoradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:85 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:89 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:97 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:101 -#, php-format -msgid "for selected %s" -msgstr "para la %s seleccionada" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:90 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:102 -#, php-format -msgid "for sub-%s of selected" -msgstr "para las sub-%s de la selección" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:91 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:103 -#, php-format -msgid "for selected and sub-%s" -msgstr "para la selección y sus sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Restrict selected roles" -msgstr "Restringir roles seleccionados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Unrestrict selected roles" -msgstr "Liberar roles seleccionados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:200 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:208 -#, php-format -msgid "To edit all roles for any %1$s, click on the %1$s name." -msgstr "Para editar todos los roles de cualquier %1$s, haga clic en nombre de la %1$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:204 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:212 -#, php-format -msgid "To edit the %s via its default editor, click on the ID link." -msgstr "Para editar el %s en su editor predeterminado, haga clic en el vínculo ID." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_restrictions.php:209 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:217 -#, php-format -msgid "To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s." -msgstr "Para mejorar el rendimiento, las cajas de opciones de edición de roles no puede incluir algunos roles que sólo se puede editar, debido a su rol específico a la %1$s. En estos casos, haga clic en el enlace de edición para editar los roles para el %1$s in dividual." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:67 -#, php-format -msgid "Expand access to a %2$s, potentially beyond what a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "Expandir el acceso a un %2$s, potencialmente más allá de lo que un rol WP de usuario permitiría. Para reducir el acceso, defina %1$s%2$s Restricciones%3$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:87 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:119 -#, php-format -msgid "Assign for selected %s" -msgstr "Asignar a la %s seleccionada" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:88 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:120 -#, php-format -msgid "Assign for sub-%s of selected" -msgstr "Asignar a las sub-%s de la selección" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles.php:89 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:121 -#, php-format -msgid "Assign for selected and sub-%s" -msgstr "Asignar a la selección y sus sub-%s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles_list.php:205 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles_list.php:207 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:211 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:213 -#, php-format -msgid "%1$s Roles%2$s:" -msgstr "%1$s Roles%2$s:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles_list.php:215 -msgid "ID" -msgstr "ID" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_roles_list.php:217 -msgid "Role Assignments" -msgstr "Asignación de Roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_role_edit.php:21 -msgid "You do not have permission to assign roles for this object." -msgstr "Usted no tiene permiso para asignar roles para este objeto." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_role_edit.php:29 -msgid "Object Roles Updated." -msgstr "Los Roles para Objetos fueron actualizados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/object_role_edit.php:36 -#, php-format -msgid "Assign Roles for %1$s \"%2$s\"" -msgstr "Asignar Roles para %1$s \"%2$s\"" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:126 -msgid "Role Scoper options were reset to defaults." -msgstr "Las opciones de Role Scoper fueron reseteadas a sus valores predeterminados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:129 -msgid "The persistent cache was flushed." -msgstr "La caché permanente fue vaciada." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:131 -msgid "Role Scoper options were updated." -msgstr "Las opciones de Role Scoper fueron actualizadas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Features" -msgstr "Características" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Advanced" -msgstr "Avanzado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Realm" -msgstr "Esfera" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "RS Role Definitions" -msgstr "Definición de Roles RS" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "WP Role Definitions" -msgstr "Definición de Roles WP" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "Option Scope" -msgstr "Alcance de las Opciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:161 -msgid "Front End" -msgstr "Interfaz de Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:162 -msgid "Pages Listing" -msgstr "Listado de Páginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:163 -msgid "Categories Listing" -msgstr "Listado de Categorías" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:164 -msgid "Content Maintenance" -msgstr "Mantenimiento de Contendio" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:165 -msgid "File Filtering" -msgstr "Filtrado de Archivos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:166 -msgid "Role Date Limits" -msgstr "Roles limitados según Fecha" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:167 -msgid "Internal Cache" -msgstr "Cache interna" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:168 -msgid "Version" -msgstr "Versión" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:169 -msgid "RSS Feeds" -msgstr "Alimentadores de RSS" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:170 -msgid "Hidden Content Teaser" -msgstr "Teaser de Contenido Oculto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:173 -msgid "Role Basis" -msgstr "Base de Rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:174 -msgid "Role Type" -msgstr "Tipo de rol" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:175 -msgid "Page Structure" -msgstr "Estructura de Página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:176 -msgid "User Profile" -msgstr "Perfil de Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:177 -msgid "User Management" -msgstr "Manejo de Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:178 -msgid "Administrator Definition" -msgstr "Definición de Administrador" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:179 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:247 -msgid "Limited Editing Elements" -msgstr "Elementos de Edición Limitada" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:180 -msgid "Role Assignment Interface" -msgstr "Elementos de Edición Limitada" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:181 -msgid "Custom Columns" -msgstr "Columnas Personalizadas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:182 -msgid "Additional Object Roles" -msgstr "Roles Adicionales para Objetos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:185 -msgid "Term / Object Scope" -msgstr "Alcance de Términos / Objectos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:186 -msgid "Term Scope" -msgstr "Alcance para Términos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:187 -msgid "Object Scope" -msgstr "Alcance para el Objeto" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:188 -msgid "Access Types" -msgstr "Tipos de Acceso" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:201 -msgid "Cache roles and groups to disk" -msgstr "Cachear roles y grupos al disco" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:202 -msgid "Enabled" -msgstr "Habilitado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:203 -msgid "Apply Group Roles" -msgstr "Aplicar Roles de Grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:204 -msgid "Apply User Roles" -msgstr "Aplicar Roles de Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:205 -msgid "Within any scope, each user or group has:" -msgstr "Según cualquier alcance, cada usuario o grupo tiene:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:206 -msgid "Support WP Custom User Caps" -msgstr "Permitir mayúsculas en los Usuarios de WP" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:207 -msgid "Assume No Front-end Admin" -msgstr "Permitir mayúsculas en los Usuarios de WP" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:208 -msgid "Indicate blended roles" -msgstr "Mostrar roles decorados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:209 -msgid "Notify on Version Updates" -msgstr "Notificar actualizaciones de versión" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:211 -msgid "Suppress \"Private:\" Caption" -msgstr "Suprimir la palabra \"Privado:\"" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:212 -msgid "Display Administrative Hints" -msgstr "Mostrar Sugerencias de Administración" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:213 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1421 -msgid "Specified element IDs also require the following blog-wide Role:" -msgstr "ID de elemento especificado también requieren el siguiente Rol:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:214 -msgid "Roles and Restrictions can be set:" -msgstr "Roles y Restricciones pueden ser configurados:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:215 -msgid "HTTP Authentication Request in RSS Feed Links" -msgstr "Solicitud de autenticación HTTP en vínculos RSS" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:216 -msgid "Display mode for readable private posts" -msgstr "Modalidad de visualización para artículos privados con permiso de lectura" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:217 -msgid "Display mode for readable non-private posts" -msgstr "Modalidad de visualización para artículos no privados con permiso de lectura" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:218 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:895 -msgid "Feed Replacement Text (use %permalink% for post URL)" -msgstr "Texto de Reemplazo para RSS (use %permalink% para suscribir URLs)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:225 -msgid "Pages can be set or removed from Top Level by:" -msgstr "Las páginas pueden ajustadas o removidas del Nivel Superior por:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:226 -msgid "Display User Groups" -msgstr "Mostrar Grupos de Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:227 -msgid "Display User Roles" -msgstr "Mostrar Roles de Usuario" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:228 -msgid "Users CSV Entry" -msgstr "Entrada CSV para Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:229 -msgid "Non-editors see other users' unattached uploads" -msgstr "Los no editores pueden ver subidas no adjuntadas de otros usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:230 -msgid "Remap pages to visible ancestor" -msgstr "Reasignación de las páginas al padre visible" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:231 -msgid "Enforce actual page depth" -msgstr "Forzar profundidad de página actual" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:232 -msgid "Remap through excluded page parent" -msgstr "Reasignar a través de los padres de las páginas excluidas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:233 -msgid "Remap terms to visible ancestor" -msgstr "Reasignación de los términos para su padre visible" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:234 -msgid "Enforce actual term depth" -msgstr "Forzar profundidad de términos actual" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:235 -msgid "Remap through excluded term parent" -msgstr "Reasignación a través de de los padres de términos que están excluidos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:236 -msgid "Limit User Edit by Level" -msgstr "Limitar Edición de Usuarios según Nivel" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:237 -msgid "Filter Uploaded File Attachments" -msgstr "Filtrar archivos adjuntos subidos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:238 -msgid "Share groups site-wide" -msgstr "Compartir grupos en todo el sitio" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:239 -msgid "Enable Role Duration Limits" -msgstr "Habilitar Limites de Duración para Roles" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:240 -msgid "Enable Content Date Limits" -msgstr "Habilitar Limites de Duración para Contenido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:241 -msgid "Filter Users Dropdown" -msgstr "Menú de despliegue para Filtro de Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:242 -msgid "Restrictions Column" -msgstr "Columna de Restricciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:243 -msgid "Term Roles Column" -msgstr "Columna de Roles para Términos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:244 -msgid "Object Roles Column" -msgstr "Columna de Roles para Objetos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:246 -msgid "Enable" -msgstr "Habilitar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:248 -msgid "Limit eligible users for object-specific editing roles" -msgstr "Limitar a los usuarios disponibles con roles específicos de edición de objetos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:249 -msgid "Include Private Pages in listing if user can read them" -msgstr "Incluir Páginas Privadas en la lista si el usuario puede leerlas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:250 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:251 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:253 -msgid "settings" -msgstr "Configuración" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:347 -msgid "Role Scoper Site Options" -msgstr "Opciones Sito Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:349 -msgid "Role Scoper Default Blog Options" -msgstr "Opciones Blog predefinido Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:351 -msgid "Role Scoper Blog Options" -msgstr "Opciones Blog Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:367 -msgid "These settings will be applied to all blogs." -msgstr "Estos ajustes se aplicarán en todos los blogs." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:373 -msgid "These are the default settings for options which can be adjusted per-blog." -msgstr "Estos son los ajustes predeterminados para las opciones que pueden ajustar en el blog." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:457 -msgid "This page enables optional adjustment of Role Scoper's features. For most installations, the default settings are fine." -msgstr "Esta página permite ajustes opcionales de características de Role Scoper. Para la mayoría de las instalaciones, los ajustes por defecto funcionan bien." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:466 -#, php-format -msgid "Note that, depending on your configuration, %1$s blog-specific options%2$s may also be available." -msgstr "Note que, dependiendo de su configuración, las opciones específicas para %1$s del blog %2$s podrían también estar disponibles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:473 -#, php-format -msgid "Note that, depending on your configuration, %1$s site-wide options%2$s may also be available." -msgstr "Note que, dependiendo de su configuración, las opciones específicas para %1$s del sitio %2$s podrían también estar disponibles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:499 -msgid "If enabled, each user group will be available for role assignment in any blog. Any existing blog-specific groups will be unavailable. Group role assignments are still blog-specific." -msgstr "Si está habilitado, cada grupo de usuarios estará disponible para la asignación de funciones en cualquier blog. Cualquier grupo específico existente del blog no estará disponible. Asignaciones de roles para grupos son todavía específicas del blog." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:515 -msgid "Remove the \"Private:\" and \"Protected\" prefix from Post, Page titles" -msgstr "Remover el prefijo \"Privado:\" y \"Protegido\" del título de Artículos y Páginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:518 -msgid "Reduce memory usage for front-end access by assuming no content, categories or users will be created or edited there. Worst case scenario if you assume wrong: manually assign roles/restrictions to new content or re-sync user roles via plugin re-activation." -msgstr "Reducir el uso de memoria para acceso de usuarios asumiendo que no hay contenidos, las categorías o los usuarios serán creados o editados allí. En el peor de los casos si se supone mal: asignar manualmente las funciones o restricciones a los contenidos nuevos o re-sincronizar las funciones de usuario a través de una reactivación del plug-in." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:533 -#, php-format -msgid "Include Private %s in listing if user can read them" -msgstr "Incluir Privado %s en la lista, si el usuario puede leerla" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:534 -msgid "Determines whether administrators, editors and users who have been granted access to a private page will see it in their sidebar or topbar page listing." -msgstr "Determina si los administradores, editores y usuarios que han tenido acceso a una página privada la verán en su barra lateral o en el listado de páginas de la barra superior." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:537 -msgid "If a page's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "Si el padre de una página no es visible para el usuario, se enumera en vez un abuelo visible." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:542 -msgid "When remapping page parents, apply any depth limits to the actual depth below the requested root page. If disabled, depth limits apply to apparant depth following remap." -msgstr "Al reasignar padres de página, aplicar límites de profundidad a la profundidad actual por debajo de la página raíz solicitada. Si está desactivado, los límites de profundidad se aplican a la profundidad aparente después de reasignar." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:548 -msgid "Remap a page to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_pages / list_pages call." -msgstr "Reasignar una página al siguiente antepasados visible, aún si algunos antepasados ocultos fueron explícitamente excluidos en las llamadas get_pages / list_pages." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:566 -msgid "If a category's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "Si el padre de una categoría no es visible para el usuario, se lista en vez, un abuelo visible." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:571 -msgid "When remapping category parents, apply any depth limits to the actual depth below the requested root category. If disabled, depth limits apply to apparant depth following remap." -msgstr "Al reasignar padres de categoría, aplicar límites de profundidad a la profundidad actual por debajo de la categoría raíz solicitada. Si está desactivado, los límites de profundidad se aplican a la profundidad aparente después de reasignar." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:577 -msgid "Remap a category to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_terms / get_categories call." -msgstr "Reasignar una categoría al siguiente antepasado visible, aún si algunos antepasados ocultos fueron explícitamente excluidos en las llamadas get_terms / list_categories." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:597 -#, php-format -msgid "Default new %s to Private visibility" -msgstr "Visibilidad Privada para todos los nuevos %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:598 -msgid "Note: this does not apply to Quickposts or XML-RPC submissions." -msgstr "Nota: Esto no se aplica a Quickposts o envíos XML-RPC" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:601 -#, php-format -msgid "Auto-set %s to Private visibility if Reader role is restricted" -msgstr "Definir %s automáticamente Visibilidad Privada si el rol de Lector esta restringido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:602 -msgid "Note: this is only done if the Reader role is restricted via Post/Page edit form." -msgstr "Nota: Esto ocurre si el rol de Lector está restringido via formulario de Edición de Páginas/Artículos." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by the Author or Editor of any Post/Category/Page" -msgstr "por el Autor o Editor de cualquier Artículo/Categoría/Página" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by blog-wide Editors and Administrators" -msgstr "por Editores y Administradores del blog" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by Content Administrators only" -msgstr "por Administradores de Contenido solamente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by User Administrators only" -msgstr "por Administradores de Usuarios solamente" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:630 -msgid "Specify which users can assign and restrict roles for their content - via Post/Page Edit Form or Roles/Restrictions sidebar menu. For a description of Administrator roles, see the Advanced tab." -msgstr "Especifica qué usuarios pueden asignar y restringir roles a sus contenidos - via formulario de Edición de Páginas/Artículos del menú lateral. Para una descripción de Roles de Administrador, consulte la ficha Opciones avanzadas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:637 -msgid "If enabled, users who are not blog-wide Editors will see only their own unattached uploads in the Media Library." -msgstr "Si está activada, los usuarios qaue no posean rol de Editor, sólo verán sus propias subidas no adjuntas en la Biblioteca multimedia." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:640 -msgid "If enabled, Post Author and Page Author selection dropdowns will be filtered based on scoped roles." -msgstr "Si está habilitado, los meni de despliegue para selección de Autor de Artículo y Autor de Página, serán filtrados en base a la incidencia de los Roles asignados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:663 -msgid "Note: Direct access to uploaded file attachments will not be filtered because DISABLE_ATTACHMENT_FILTERING is defined, perhaps in wp-config.php or role-scoper.php" -msgstr "Nota: El acceso directo a los adjuntos de archivos subidos no serán filtrados porque está definido DISABLE_ATTACHMENT_FILTERING, tal vez en wp-config.php o role-scoper.php" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:675 -msgid "Note: Direct access to uploaded file attachments will not be filtered due to your nonstandard UPLOADS path." -msgstr "Nota: Acceso directo a los archivos adjuntos de archivos subidos no serán filtrados, debido a la ruta no estándar para las subidas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:680 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because WordPress permalinks are set to default." -msgstr "Nota: El acceso directo a los adjuntos de archivos subidos no serán filtrados porque los permalinks están configurados por defecto." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:695 -msgid "Block direct URL access to images and other uploaded files in the WordPress uploads folder which are attached to post(s)/page(s) that the user cannot read. A separate RewriteRule will be added to your .htaccess file for each protected file. Non-protected files are returned with no script execution whatsoever." -msgstr "Bloquear el acceso URL directo a las imágenes y otros archivos en la carpeta de archivos subidos, que se adjunten al contenido que el usuario tiene restricción de Lectura. Un RewriteRule separado será añadido a su archivo httaccess para cada archivo protegido. Los archivos protegidos se manipulan sin ejecución de scripts de ningún tipo." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:700 -msgid "Note: The default WP-MU file request script, wp-content/blogs.php, requires a patch for compatibility with RS file filtering. If you need the advanced cache control provided by blogs.php, review the notes in role-scoper/mu_wp_content_optional/blogs.php and copy it into wp-content if desired. Otherwise, files will be accessed directly via header redirect following RS filtering. If you decide to install the patched blogs.php, add the following line to wp-config.php:
        define( 'SCOPER_MU_FILE_PROCESSING', true);" -msgstr "Nota: El script predeterminado para solicitudes de archivos WP-MU , wp-content/blogs.php, requiere de un parche de compatibilidad con filtrado RS de archivos. Si usted necesita el control avanzado de caché proporcionado por blogs.php, revise las notas en role-scoper/mu_wp_content_optional/blogs.php y cópiela en wp-content, si lo desea. De lo contrario, los archivos podrán serán accesados directamente vía redirecccionamiendo de encabezado por medio de filtrado RS. Si decide instalar el blogs.php parchado, agregar la siguiente línea a wp-config.php:
        define( 'SCOPER_MU_FILE_PROCESSING', true);" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:712 -#, php-format -msgid "Note: FTP-uploaded files will not be filtered correctly until you run the %1$sAttachments Utility%2$s." -msgstr "Nota: Los archivos subidos a través de FTP no se filtrarán correctamente hasta que se ejecute la %1$sUtilidad para Adjuntos%2$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:714 -msgid "If WordPress or any plugin output visible PHP warnings during filtering of a protected image request, the image will not be successfully returned." -msgstr "Si WordPress o cualquier plugin despliega advertencias PHP visibles durante la filtración de una solicitud de imagen protegida, la imagen no se retornará exitosamente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:730 -msgid "Allow the delay or expiration of roles based on a specified date range." -msgstr "Permitir el retraso o vencimiento de roles basados en un intervalo de fechas especificado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:733 -msgid "Allow General Roles and Category Roles to be limited to content dated within in a specified range." -msgstr "Permitir Roles Generales and Roles de Categoría basados en un intervalo de fechas especificado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:762 -msgid "Group membership, role restrictions, role assignments and some filtered results (including term listings and WP page, category and bookmark listings) will be stored to disk, on a user-specific or group-specific basis where applicable. This does not cache content such as post listings or page views." -msgstr "La pertenencia a grupos, las restricción y asignación de roles y algunos resultados de filtrado (incluyendo listado de términos y página WP, las categorías y listas de favoritos) serán almacenados en el disco, en base a condiciones de grupo o usuarios, específicas para cada caso. Esto no realiza caché de contenido, tales como listas de artículos o vistas de página." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:772 -msgid "Note: The internal caching code contains numerous safeguards against corruption. However, if it does become corrupted your site may be inaccessable. For optimal reliability, copy rs_cache_flush.php into your WP root directory so it can be executed directly if needed." -msgstr "Nota: El código de almacenamiento en caché interno contiene numerosas salvaguardias contra la corrupción. Sin embargo, si es que se daña, su sitio puede ser inaccesible. Para una óptima fiabilidad, copie rs_cache_flush.php en el directorio raíz WP de forma que pueda ser ejecutado directamente si es necesario." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:780 -msgid "Flush Cache" -msgstr "Vaciar Caché" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:800 -#, php-format -msgid "Role Scoper Version: %s" -msgstr "Versión de Role Scoper: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:802 -#, php-format -msgid "Database Schema Version: %s" -msgstr "Versión de Esquema de Base de Datos: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:804 -#, php-format -msgid "PHP Version: %s" -msgstr "Versión de PHP: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "never" -msgstr "nunca" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "always" -msgstr "siempre" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "for logged users" -msgstr "para usuarios que han iniciado sesión" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:841 -msgid "Suffix RSS feed links with an extra parameter to trigger required HTTP authentication. Note that anonymous and cookie-based RSS will still be available via the standard feed URL." -msgstr "Añadir sufijo a alimentadores RSS con un parámetro adicional que gatille la autentificación HTTP. Tenga en cuenta que los RSS anónimos o basados en cookies, todavía estarán disponibles a través de la URL estándar del alimentador RSS." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:845 -msgid "cannot use HTTP Authentication for RSS Feeds because another plugin has already defined the function \"get_currentuserinfo\"" -msgstr "No se puede utilizar la autenticación HTTP para las fuentes RSS porque otro plugin ya ha definido la función \"get_currentuserinfo\"" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:855 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:870 -msgid "Display" -msgstr "Mostrar" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Full Content" -msgstr "Texto Completo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Excerpt Only" -msgstr "Sólo Resumen" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Title Only" -msgstr "Sólo Título" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:864 -msgid "for readable private posts" -msgstr "para mensajes privados con acceso de lectura" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:879 -msgid "for readable non-private posts" -msgstr "para mensajes no privados con acceso de lectura" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:884 -msgid "Since some browsers will cache feeds without regard to user login, block RSS content even for qualified users." -msgstr "Dado que algunos navegadores realizan caché de alimentadores RSS sin considerar la autentificación previa de los usuarios, bloquear el contenido RSS incluso para usuarios calificados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:955 -#, php-format -msgid "Enable teaser for %s" -msgstr "Habilitar teaser para %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:977 -#, php-format -msgid "%s:" -msgstr "%s:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "no teaser" -msgstr "no hay teaser" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "fixed teaser (specified below)" -msgstr "teaser ajustado (especificado a continuación)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "excerpt as teaser" -msgstr "resumen como teaser" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "excerpt or pre-more as teaser" -msgstr "resumen o pre-más como teaser" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:981 -#, php-format -msgid "excerpt, pre-more or first %s chars" -msgstr "resumen, pre-más o primer %s caracteres" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:991 -msgid "for:" -msgstr "para:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:996 -msgid "anonymous" -msgstr "Anónimo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1004 -msgid "logged" -msgstr "conectado" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1012 -msgid "both" -msgstr "ambos " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1022 -msgid "If content is blocked, display replacement text instead of hiding it completely." -msgstr "Si se bloquea el contenido, mostrar texto de reemplazo en lugar de esconderlo completamente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1024 -msgid "Note: the prefix and suffix settings below will always be applied unless the teaser mode is \"no teaser\"." -msgstr "Nota: Los siguientes ajustes de prefijo y sufijo siempre se aplicará a menos que el modo de teaser sea \"no teaser\"." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1046 -#, php-format -msgid "Hide private %s (instead of teasing)" -msgstr "Ocultar %s privado (en lugar de teaser)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1050 -msgid "Hide private content completely, while still showing a teaser for content which is published with restrictions. Note: Private posts hidden in this way will reduce the total number of posts on their \"page\" of a blog listing." -msgstr "Ocultar completamente el contenido privado, mientras se siga mostrando un teaser para contenidos restringidos. Nota: Los Artículos Privados ocultos de esta manera reducirán su cantidad total de Artículos en sus \"páginas\" de listados del blog." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "name" -msgstr "nombre" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "content" -msgstr "contenido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "excerpt" -msgstr "resumen" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "replace with (if using fixed teaser, or no excerpt available):" -msgstr "reemplazar con (if se estuviera usando un teaser ajustado, o no haya resumen disponible)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "prefix with:" -msgstr "prefijo:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "suffix with:" -msgstr "sufijo:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1093 -msgid "anonymous users" -msgstr "usuarios anónimos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1093 -msgid "logged users" -msgstr "usuarios conectados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1096 -#, php-format -msgid "%1$s Teaser Text (%2$s):" -msgstr "%1$s Texto del Teaser (%2$s):" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1146 -#, php-format -msgid "Idea: For Scheduled Revisions and Pending Revisions functionality that integrates with your RS Roles and Restrictions, install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "Idea: Para obtener funcionalidad en Revisiones Programadas y Revisiones Pendientes integrada completamente con Role Scoper, instale %1$s Revisionary%2$s, otro plugin de %3$s Agapetry Creations%4$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1169 -msgid "Note: for most installations, the default settings are fine." -msgstr "Nota: Para la mayoría de las instalaciones, los ajustes predeterminados funcionan bien." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1209 -msgid "Multiple RS Roles (type-specific, plugin-defined)" -msgstr "Roles RS Múltiples (por tipo, configurados por RS)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1209 -msgid "Single WP Role (comprehensive, WP-defined)" -msgstr "Roles WP Individuales (globales, definidos por WP)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1218 -msgid "Either role type can be scoped (assigned for specific terms or objects). However, RS roles allow finer control. A user's main WordPress role will be applied by default regardless of this selection." -msgstr "Cualquier tipo de rol puede ser asignado (por términos u objetos específicos). Sin embargo, los roles RS permiten un control más preciso. Un rol WP será aplicado por defecto, independientemente de esta selección." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1225 -msgid "Some users created under older WP versions may have direct-assigned capabilities in addition to their blog-wide role assignment. This setting does not enable or block that feature, but determines whether Role Scoper must account for it. Disable when possible (capabilities unrelated to RS Role Definitions are irrelevant)." -msgstr "Algunos usuarios creados en versiones anteriores de WP pueden tener capacidades asignadas directamente que se sumarían a la política de asignaciones de roles del blog. Esta configuración no habilita o bloquea tal característica, pero determina si Role Scoper debe tomar cuenta de la contingencia. Desactivar cuando sea posible (las capacidades no relacionadas con Definiciones RS de Roles son irrelevantes)." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1246 -msgid "Page Authors, Editors and Administrators" -msgstr "Autores , Editores y Administradores de páginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1246 -msgid "Page Editors and Administrators" -msgstr "Editores y Administradores de páginas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1246 -msgid "Administrators" -msgstr "Administradores" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1259 -msgid "Users who do not meet this blog-wide role requirement may still be able to save and/or publish pages, but will not be able to publish a new page with a Page Parent setting of \"Main Page\". Nor will they be able to move a currently published page from \"Main Page\" to a different Page Parent." -msgstr "Los usuarios que no cumplan con este requisito de roles del blog, podrían todavía estar habilitados para guardar o publicar páginas, pero no será capaces de publicar una página nueva con una configuración de Págiina Padre configurada en \"Página Inicial\". Ni serán capaces de mover una página publica publicada en la \"Página Inicial\" a otra página diferente." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1292 -msgid "If enabled, prevents those with edit_users capability from editing a user with a higher level or assigning a role higher than their own." -msgstr "Si está activado, evita que aquéllos con capacidad de Edición de Usuarios puedan editar a otro usuario la asignación de roles, incluso de nivel superior." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1308 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1423 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Content Administrator" -msgstr "Administrador de Contenido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1309 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "User Administrator" -msgstr "Administrador de Usuarios" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1310 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Option Administrator" -msgstr "Administrador de Opciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1312 -msgid "RS never applies restricting or enabling content filters" -msgstr "RS nunca restringue o habilita filtros de contenido" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1313 -msgid "RS allows full editing of all user groups and scoped roles / restrictions" -msgstr "RS permite la edición completa de todos los grupos de usuario y roles / restricciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1314 -msgid "Can edit Role Scoper options" -msgstr "Puede editar opciones de Role Scoper" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1316 -msgid "Role Scoper internally checks the following capabilities for content and role administration. By default, these capabilities are all contained in the Administrator role only. You can use the Capability Manager plugin to split/overlap them among different roles as desired." -msgstr "Role Scoper controla internamente las siguientes capacidades para el contenido y administración de roles. De forma predeterminada, estas funciones están contenidas en los roles exclusivos del Administrador. Puede utilizar el plugin Capability Manager para dividirlas o superponerlas entre distintos roles según se desee." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1320 -msgid "Administrator Type" -msgstr "Tipo de Administrador" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1321 -msgid "Required Capability" -msgstr "Capacidad Requerida" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1340 -msgid "Each administrator type's capability can be modified by adding any of the following define statements to your wp-config.php:" -msgstr "Cada capacidad de los tipos de administrador puede ser modificada mediante la adición de cualquiera de las siguientes declaraciones en su wp-config.php:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1348 -msgid "For example, by using Capability Manager to add a custom capability such as administer_all_content to certain WordPress roles, you could mirror that setting in the SCOPER_CONTENT_ADMIN_CAP definition to ensure that those users are never content-restricted by Role Scoper." -msgstr "Por ejemplo, utilizando el Administrador de Capacidades para agregar una capacidad personalizada, tal como administer_all_content para ciertos Roles de WP, podrías reflejar la configuración en la definición de SCOPER_CONTENT_ADMIN_CAP para garantizar que tales usuarios no sufran contenidos restringidos por Role Scoper." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1366 -msgid "Remove Edit Form elements with these html IDs from users who do not have full editing capabilities for the post/page. Separate with ;" -msgstr "Eliminar elementos del Formulario de Edición con estas ID HTML de usuarios que no tienen capacidades de Edición Completa para Artículos o Páginas. Separar con ;" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1391 -#, php-format -msgid "%s Edit Form HTML IDs:" -msgstr "%s IDs de Formulario de Edición HTML:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1401 -#, php-format -msgid "%1$s sample IDs:%2$s %3$s" -msgstr "%1$s IDs de muestra:%2$s %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "no requirement" -msgstr "sin requerimientos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Contributor / Author / Editor" -msgstr "Contribuyente / Autor / Editor" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Author / Editor" -msgstr "Autor / Editor" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1439 -msgid "Note: The above roles are type-specific RS roles (for the object type involved) which must be contained in a user's blog-wide WordPress role." -msgstr "Nota: Los roles anteriores son específicos a los roles RS según tipo (para el tipo de objeto en cuestión) que deben estar contenidos en el rol WP para usuario." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1458 -#, php-format -msgid "Limit eligible users for %s-specific editing roles" -msgstr "Limitar usuarios disponibles a roles de edición específicos a %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1459 -msgid "Role Scoper can enable any user to edit a post or page you specify, regardless of their blog-wide WordPress role. If that's not a good thing, check above options to require basic editing capability blog-wide or category-wide." -msgstr "Rol Scoper puede habilitar a ciertos usuarios para editar un mensaje o página especifica, independiente de los roles WP asignados. Si eso no es una buena cosa, marque las opciones que figuran más arriba para simplificar la edición básica de roles para el blog completo o categorías determinadas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1462 -msgid "In the Edit Post/Edit Page roles tabs, decorate user/group name with colors and symbols if they have the role implicitly via group, general role, category role, or a superior post/page role." -msgstr "En las fichas de roles de Creación/Edición de Paginas, decorar el nombre de usuarios y grupos con colores y símbolos si tienen roles implícitos vía grupos, rol general, rol de categorías, o roles de orden superior sobre artículos o páginas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1465 -msgid "Display introductory descriptions at the top of various role assignment / definition screens." -msgstr "Mostrar descripciones de introducción en la parte superior de la las distintas páginas de asignación de roles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1468 -msgid "Accept entry of user names or IDs via comma-separated text instead of individual checkboxes." -msgstr "Aceptar la entrada de nombres de usuario o ID vía texto separado por comas en lugar de casillas de verificación individual." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1486 -#, php-format -msgid "Restrictions column in Edit %s listing" -msgstr "Columna de Restricciones en Listado de Edición %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1489 -#, php-format -msgid "Term Roles column in Edit %s listing" -msgstr "Columna de Roles de Términos en listado de Editar %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1492 -#, php-format -msgid "Object Roles column in Edit %s listing" -msgstr "Columna de Roles de Objeto en listado de Editar %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1535 -#, php-format -msgid "%1$s (normally equivalent to %2$s)" -msgstr "%1$s (normalmente equivalente a %2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1542 -msgid "By default, the above roles are not available for object-specific assignment because another role is usually equivalent. However, the distinctions may be useful if you propagate roles to sub-Pages, set Default Roles or customize RS Role Definitions." -msgstr "De forma predeterminada, los roles anteriores no están disponibles para asignaciones de roles a objetos, porque es usualmente equivalente. Sin embargo, la distinción puede ser útil si se propagan los roles a sus subpáginas, establece roles por defecto o personaliza Definiciones RS de Roles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1544 -msgid "Note: Under the default configuration, the tabs labeled \"Reader\" in the Post/Page Edit Form actually assign the corresponding Private Reader role." -msgstr "Nota: En la configuración predeterminada, las fichas con etiqueta \"Reader\" en el Formulario de Edición de Artículos o Páginas asigna el correspondiente rol de Lector Privado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1577 -msgid "These optional settings allow advanced users to adjust Role Scoper's sphere of influence. For most installations, the default settings are fine." -msgstr "Estos ajustes opcionales permiten que usuarios avanzados ajusten el ámbito de incidencia de Role Scoper. Para la mayoría de las instalaciones, los ajustes predeterminados funcionan bien." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1600 -msgid "Specify which WordPress taxonomies can have Restrictions and Roles:" -msgstr "Especifica qué taxonomías WP pueden tener Restricciones y Roles:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1617 -msgid "Specify whether Restrictions and Roles can be set for individual Objects:" -msgstr "Especifica qué Restricciones y Roles pueden ser configuradas por Objetos individuales:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1645 -msgid "Section" -msgstr "Sección" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1648 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1700 -#, php-format -msgid "%1$s (for %2$s)" -msgstr "%1$s (para %2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1714 -msgid "* = Role Assignment only (no Restrictions)" -msgstr "* = Sólo Asignación de Roles (no Restricciones)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1734 -msgid "Apply Roles and Restrictions for:" -msgstr "Aplicar Roles y Restricciones para:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1751 -msgid "Viewing content (front-end)" -msgstr "Presentando contenido (interfaz de usuario)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1753 -msgid "Editing and administering content (admin)" -msgstr "Edición y Administración de contenido (admin)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1775 -msgid "The "Post Tag" taxonomy cannot be used to define restrictions because tags are not mandatory. For most installations, categories are a better mechanism to define roles. Note that Role Scoper does not filter tag storage based on the editing user's access. As with any other custom-defined taxonomy, use this option at your own discretion." -msgstr "La taxonomía de la "Ficha de Artículos" no puede usarse para definir restricciones porque las fichas no son obligatorias. Para la mayoría de las instalaciones, las categorías son un mejor mecanismo para definir roles. Note que Role Scoper no filtra el almacenamiento de fichas basado en el acceso de usuarios con privilegios de Edición. Como con cualquier otra taxonomía personalizada, use esta opción a su propia discreción." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1779 -msgid "By default, WordPress does not support page categories. The corresponding "Role Scopes" option is only meaningful if the WP core or another plugin has added this support." -msgstr "Por defecto, WP no es compatible con las categorías de página. Las correspondientes opciones de "Rol Scope" tienen sentido si el núcleo de WP u algún otro plugin ha añadido esta modalidad." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1815 -msgid "Specify which Role Scoper Options should be applied site-wide." -msgstr "Especificar qué Opciones de Role Scoper debieran aplicarse a nivel del sitio." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1822 -#, php-format -msgid "sitewide control of \"%s\"" -msgstr "control de \"%s\"" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1827 -msgid "Selected options will be controlled site-wide via Site Admin > Role Options; unselected options can be set per-blog via Roles > Options" -msgstr "Las opciones seleccionadas serán controladas en todo el sitio vía Administración de Sitio > Opciones de Rol; opciones deseleccionadas pueden ser ajustadas para-blog vía Roles > Opciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1836 -#, php-format -msgid "%1$s (%2$s)" -msgstr "%1$s (%2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1906 -msgid "All settings in this form (including those on undisplayed tabs) will be reset to DEFAULTS. Are you sure?" -msgstr "Todos los valores de este formulario (incluyendo aquéllos en pestañas ocultas) se restablecerán a los valores predeterminados. ¿Estás seguro?" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1911 -msgid "Revert to Defaults" -msgstr "Volver valores predeterminados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/options.php:1937 -#, php-format -msgid "%s data source" -msgstr "%s fuente de datos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:37 -#, php-format -msgid "Group Roles %1$s(for %2$s)%3$s" -msgstr "Roles de Grupo %1$s(para %2$s)%3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:39 -msgid "Group Roles" -msgstr "Roles de Grupo" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:43 -msgid "Scoped Roles" -msgstr "Roles Implementados" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:58 -#, php-format -msgid "Assigned WordPress Role: %s" -msgstr "Rol Wordpress asignado: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:66 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:123 -#, php-format -msgid "(contains %s)" -msgstr "(contiene %s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:113 -#, php-format -msgid "%1$sGeneral Role%2$s%4$s: %3$s" -msgstr "%1$sRol General%2$s%4$s: %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:115 -#, php-format -msgid "Additional %1$sGeneral Role%2$s%4$s: %3$s" -msgstr "%1$sRol General%2$s adicional%4$s: %3$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:15 -msgid "These roles are defined by Role Scoper (and possibly other plugins) for your use in designating content-specific access or supplemental blog-wide access. Although the default capabilities are ideal for most installations, you may modify them at your discretion." -msgstr "Estos roles se definen por Role Scoper (y posiblemente otros plugins) para su uso en la designación de acceso a contenidos específicos o suplementario. Aunque las capacidades por defecto son ideales para la mayoría de las instalaciones, puede modificarlos según sus necesidades." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:19 -msgid "Since Role Scoper role definitions pertain to a particular object type, available capabilities are defined by the provider of that object type. WordPress core or plugins can add or revise default role definitions based on available capabilities." -msgstr "Dado que las definiciones de roles de Role Scoper pertenecen a un tipo de objeto particular, las capacidades disponibles son definidas por el proveedor de ese tipo de objeto. el núcleo de WP o plugins pueden añadir o revisar las definiciones predeterminadas de rol basado en las capacidades disponibles." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:23 -msgid "WordPress Role assignments function as a default which may be supplemented or overriden by blog-wide or content-specific assignment of these RS Roles." -msgstr "La asignacion de Roles en WP funcionan como predeterminadas, aunque pueden ser suplantadas o anuladas por tales asignaciones RS, tanto globales como en contenidos específicos." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:120 -msgid "Capabilities (defaults are bolded)" -msgstr "Capacidades (valores predeterminados figuran en negrita)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:153 -#, php-format -msgid "Warning: Since the WP %1$s role def lacks some caps selected here, it will be treated as a lesser role if Restrictions are applied." -msgstr "Advertencia: Dado que el rol %1$s de WP debilita algunas capacidades seleccionadas aquí, será tratado como de nivel inferior si se aplicaran Restricciones en RS." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:165 -#, php-format -msgid "sync WP %1$s
    to these selections (currently includes %2$s)" -msgstr "sincronizar %1$s de WP
    a estas selecciones (actualmente incluye %2$s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:167 -#, php-format -msgid "sync WP %s
    to these selections" -msgstr "sincronizar %1$s de WP
    a estas selecciones" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:170 -msgid "note: only the capabilities listed here will be affected" -msgstr "Nota: solo las capacidades listadas aquí se verán afectadas" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition.php:217 -msgid "Re-sync with WordPress roles on next Update" -msgstr "Re-sincronizar con roles WP durante la siguiente Actualización" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:16 -msgid "Note that only capabilities configured for filtering by Role Scoper are listed here." -msgstr "Note que sólo aquellas capacidades configuradas por el filtrado de Role Soper son listadas aquí:" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:18 -msgid "These WordPress role definitions may be modified via the Capability Manager or Role Manager plugin." -msgstr "Estas definiciones de rol de WP pueden ser modificadas vía los plugins Capability Manager o Role Manager." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:23 -msgid "To understand how your WordPress roles relate to type-specific RS Roles, see WP/RS Role Equivalence." -msgstr "Para entender cómo los roles WP se asemejan con los roles RS por tipo, vea Equivalencia de Roles WP/RS." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:32 -msgid "WordPress Roles" -msgstr "Roles WP" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:38 -msgid "Capabilities" -msgstr "Capacidades" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:78 -msgid "WP / RS Role Equivalence" -msgstr "Equivalencia de Roles WP / RS" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:83 -msgid "WP Role" -msgstr "Rol WP" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/role_definition_wp.php:84 -msgid "Contained RS Roles" -msgstr "Roles RS Contenidos" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:10 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:10 -msgid "Invalid taxonomy" -msgstr "Taxonomía no válida" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:63 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s (or %4$s-assigned). Corresponding General Roles (whether assigned by WordPress or Role Scoper) are ignored." -msgstr "Reduzca el acceso mediante la %1$sasignación de algunos roles por %2$s%3$s (o asignados por %4$s). Los Roles Generales correspondientes (sea asignados por WordPress o Role Scoper) son ignorados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:65 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s. Corresponding General Role assignments are ignored." -msgstr "Reduzca el acceso mediante la %1$sasignación de algunos roles por %1$s%2$s (o asignados por %3$s). Los Roles Generales correspondientes son ignorados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:70 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:89 -#, php-format -msgid "Role definition error (taxonomy: %s)." -msgstr "Error de definición de rol (taxonomía: %s)." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:76 -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:95 -#, php-format -msgid "Either you do not have permission to administer any %s, or none exist." -msgstr "O usted no tiene permiso para administrar una %s, o bien no existe ninguno." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_restrictions.php:153 -#, php-format -msgid "Any %1$s Restriction causes the specified role to be granted only via %1$s Role assignment, regardless of these %2$s settings." -msgstr "Cualquier Restricción de %1$s causa que el rol específico sea habilitado sólo vía asignación de Roles de %1$s, independiente de los ajustes de %2$s implementados." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:81 -#, php-format -msgid "Grant capabilities within a specific %2$s, potentially more than a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "Brinda capacidades dentro de un %2$s específico, potencialmente más de rol de usuario WP permitiría. Para restringir el acceso, defina %1$s%2$s Restricciones%3$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:83 -#, php-format -msgid "Grant capabilities within a specific %s, potentially more than a user's WP role would allow." -msgstr "Permitir capacidades dentro de un %s específico, potencialmente más de lo que permitría un rol WP de usuario." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:172 -msgid "A Role is a collection of capabilities." -msgstr "Un Rol es una colección de capacidades." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:176 -msgid "Capabilities in a user's WordPress Role (and, optionally, RS-assigned General Roles) enable blog-wide operations (read/edit/delete) on some object type (post/page/link), perhaps of a certain status (private/published/draft)." -msgstr "Las capacidades en un rol WP de Usuario (y, opcionalmente, roles RS generales asignados) habilitan operaciones en todo el blog (lectura/edición/eliminación) de algún tipo de objeto (artículo/página/vínculo), y tal vez en un cierto estado (privado/publicado/borrador)." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:181 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s or per-%2$s basis. Useful in fencing off sections your site." -msgstr "La incidencia de los Roles pueden permitir a los usuarios las mismas capacidades de WP en una base para-%1$s o para-%2$s, Útil en la protección de secciones de su sitio." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:183 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s basis. Useful in fencing off sections your site." -msgstr "La incidencia de los Roles pueden permitir a los usuarios las mismas capacidades de WP en una base para-%1$s, Útil en la protección de secciones de su sitio." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:187 -#, php-format -msgid "Users with a %1$s Role assignment may have capabilities beyond their General Role(s) for %2$s in the specified %1$s." -msgstr "Los usuarios con una asignación de Roles %1$s pueden tener capacidades, por sobre sus Roles Generales, sobre %2$s en el %1$s especificado." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:192 -#, php-format -msgid "If a role is restricted for some %s, general (blog-wide) assignments of that role are ignored." -msgstr "Si un rol se restringe por algunos %s, las asignaciones generales de tal rol serán ignoradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:196 -#, php-format -msgid "If a %1$s is in multiple %2$s, permission is granted if any %3$s has a qualifying role assignment or permits a qualifying General Role." -msgstr "Si un %1$s se encuentra en múltiples %2$s, el estará garantizado si cualquier %3$s tiene una asignación de rol válida o permita un rol general válido." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:205 -#, php-format -msgid "If a role is restricted for some requested %1$s, %2$s-assignment and General-assignment of that role are ignored." -msgstr "Si un rol se restringe por algunos %1$s solicitados, las asignaciones a %2$s y asignaciones generales de tal rol serán ignoradas." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/section_roles.php:210 -msgid "Administrators are exempted from Role Restrictions." -msgstr "Los administradores están exentos de las restricciones de rol." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/update_rs.php:494 -#, php-format -msgid "Pending Revisions were enabled in your previous Role Scoper version. To retain that feature, you need to install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "Revisiones Pendientes fueron habilitadas en versiones previas de Role Scoper. Para retener tal característica, se necesita instalar %1$s Revisionary%2$s, otro plugin de %3$s Agapetry Creations%4$s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:36 -#, php-format -msgid "A new version of Role Scoper is available (%s)" -msgstr "Una nueva versión de Role Scoper está disponible (%s)" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:57 -msgid "read more..." -msgstr "Leer más..." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:63 -msgid "Read about the update" -msgstr "Lee sobre la actualización" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:64 -msgid "View full changelog" -msgstr "Ver lista de cambios completa" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:70 -msgid "Download for manual install" -msgstr "Descargar para instalación manual" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:115 -#, php-format -msgid "Role Scoper Extensions are available for the following plugins: %s" -msgstr "Las extensiones de Role Scoper están disponibles para los siguientes plugins: %s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:190 -msgid "The file cache will not operate because ENABLE_PERSISTENT_CACHE is not defined in wp-config.php or role-scoper.php." -msgstr "La caché de archivos no puede operar porque wp-config.php o role-scoper.php no tiene definida ENABLE_PERSISTENT_CACHE." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:193 -msgid "The file cache will not operate because DISABLE_PERSISTENT_CACHE is defined, possibly in wp-config.php or role-scoper.php." -msgstr "La caché de archivos no puede operar porque la constante DISABLE_PERSISTENT_CACHE está definida, posiblemente en wp-config.php o role-scoper.php." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:196 -#, php-format -msgid "The file cache cannot operate because the cache directory (%s) is not writeable to WordPress." -msgstr "La caché de archivos no puede operar porque el directorio del caché (%s) no es escribible. " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:199 -msgid "The file cache cannot operate because PHP is running in safe mode." -msgstr "La caché de archivos no puede operar porque PHP está ejecutándose en Modo Seguro." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:207 -#, php-format -msgid "The file cache cannot operate because file creation attempts fail in %s" -msgstr "La caché de archivos no puede operar porque los intentos de almacenamiento de archivos fallaron en %s " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/cache-persistent.php:217 -#, php-format -msgid "The file cache cannot operate because file storage attempts fail in %s" -msgstr "La caché de archivos no puede operar porque los intentos de almacenamiento de archivos fallaron en %s " - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/hardway-admin-legacy_rs.php:105 -#, php-format -msgid "You have %1$s, contained within %2$s and %3$s. %4$s %5$s" -msgstr "Usted tiene %1$s, contenido dentro de %2$s y %3$s. %4$s %5$s" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/hardway/hardway-admin_non-administrator_rs.php:59 -msgid "You do not have permission to select that Category Parent" -msgstr "Usted no tiene permiso para seleccionar esa Categoría Padre" - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:14 -#, php-format -msgid "%1$s attempted to define a configuration item (%2$s) after the collection was locked." -msgstr "%1$s intentó definir un item de configuración (%2$s) después que la colección fue bloqueada." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:15 -#, php-format -msgid "The calling function probably needs to be registered to a hook. Consult %s developer documentation." -msgstr "La función que se encuentra invocando, probablemente tiene que ser registrada por un hook. Consulte la documentación del desarrollador de %s." - -#: E:\AppServ\www\renacimiento.cl\wp-content\plugins\role-scoper/lib/debug.php:182 -#, php-format -msgid "%1$s queries in %2$s seconds. %3$s MB used." -msgstr "%1$s consultas en %2$s segundos. %3$s MB usados." - diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.mo b/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.mo deleted file mode 100644 index ad2961c..0000000 Binary files a/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.mo and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.po b/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.po deleted file mode 100644 index eab4262..0000000 --- a/blog/wp-content/plugins/role-scoper/languages/scoper-it_IT.po +++ /dev/null @@ -1,2703 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Role Scoper 1.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-22 12:45-0500\n" -"PO-Revision-Date: \n" -"Last-Translator: Kevin Behrens\n" -"Language-Team: agapetry \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: E:\\www\\wp29c\\wp-content\\plugins\\role-scoper\\\n" -"X-Poedit-KeywordsList: __;_e;_c;__ngettext;_n;scoper_po_trigger;_x\n" -"X-Poedit-SearchPath-0: E:\\www\\wp29c\\wp-content\\plugins\\role-scoper\n" -"X-Poedit-SearchPath-1: E:\\www\\wp29c\\wp-content\\plugins\\role-scoper\\admin\n" -"X-Poedit-SearchPath-2: E:\\www\\wp29c\\wp-content\\plugins\\role-scoper\\hardway\n" -"X-Poedit-SearchPath-3: E:\\www\\wp29c\\wp-content\\plugins\\role-scoper\\lib\n" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/data_sources_rs.php:26 -msgid "Term" -msgstr "Termine" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/data_sources_rs.php:26 -msgid "Terms" -msgstr "Termini" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:95 -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:112 -msgid "Sorry, this content requires additional permissions. Please contact an administrator for help." -msgstr "Scusate, questo contenuto richiede maggiori permessi. Si prega di contattare un amministratore per chiedere aiuto." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:96 -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:113 -msgid "Sorry, you don't have access to this content. Please log in or contact a site administrator for help." -msgstr "Spiacenti, non avete accesso a questo contenuto. Si prega di autenticarsi nel sito o di contattare un amministratore del sito per richiedere un supporto." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:109 -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:126 -msgid "note: This content requires a higher login level." -msgstr "nota: Questo contenuto richiede un livello di autenticazione maggiore." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:110 -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:127 -msgid "note: This content requires site login." -msgstr "nota: Questo contenuto richiede l'autenticazione nel sito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:166 -#, fuzzy -msgid "front-end" -msgstr "Front End" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:167 -msgid "admin" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:390 -msgid "Link" -msgstr "Collegamento ipertestuale" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:416 -msgid "Group" -msgstr "Gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:417 -msgid "Groups" -msgstr "Gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/defaults_rs.php:491 -msgid "Link Category" -msgstr "Categoria collegamenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/feed-interceptor_rs.php:57 -msgid "Access denied: Incorrect credentials supplied." -msgstr "Accesso negato: credenziali errate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/role-scoper.php:37 -#, fuzzy, php-format -msgid "Error: Multiple copies of Role Scoper activated. Only version %1$s (in folder \"%2$s\") is functional." -msgstr "Un'altra copia di Role Scoper è già attiva (versione %1$s in \"%2$s\")" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:8 -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Post Reader" -msgstr "Lettore di articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Private Post Reader" -msgstr "Lettore di articolo privato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:17 -msgid "Post Contributor" -msgstr "Contribuente di articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:20 -msgid "Post Author" -msgstr "Autore di articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:23 -msgid "Post Revisor" -msgstr "Revisore articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:27 -msgid "Post Publisher" -msgstr "Pubblicatore articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:29 -msgid "Post Editor" -msgstr "Editore di articolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:32 -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Page Reader" -msgstr "Pagina di lettura" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Private Page Reader" -msgstr "Lettore di pagina privata" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:38 -msgid "Page Associate" -msgstr "Pagina associate" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:41 -msgid "Page Contributor" -msgstr "Pagina Contribuente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:44 -msgid "Page Author" -msgstr "Pagina autore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:47 -msgid "Page Revisor" -msgstr "Revisore di Pagina" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:51 -msgid "Page Publisher" -msgstr "Pubblicatore pagina" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:53 -msgid "Page Editor" -msgstr "Pagina editore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:56 -msgid "Link Admin" -msgstr "Collegamenti amministratore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:59 -msgid "Category Manager" -msgstr "Gestore di categoria" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:62 -msgid "Group Manager" -msgstr "Gestore di gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:75 -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Readers" -msgstr "Lettori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Private Readers" -msgstr "Lettori privati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:83 -msgid "Contributors" -msgstr "Contribuenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:87 -msgid "Authors" -msgstr "Autori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:91 -msgid "Revisors" -msgstr "Revisori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:96 -msgid "Publishers" -msgstr "Pubblicatori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:98 -msgid "Editors" -msgstr "Editori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:101 -msgid "Associates" -msgstr "Associati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:105 -msgid "Admins" -msgstr "Amministratori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:109 -msgid "Managers" -msgstr "Gestori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:122 -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -#, fuzzy -msgid "Reader" -msgstr "Leggi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -msgid "Pvt Reader" -msgstr "Lettore privato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:130 -msgid "Contrib" -msgstr "Contribuente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:134 -msgid "Author" -msgstr "Autore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:138 -msgid "Revisor" -msgstr "Revisore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:143 -msgid "Publisher" -msgstr "Pubblicatore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:145 -msgid "Editor" -msgstr "Editore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:148 -msgid "Assoc" -msgstr "Associato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:152 -msgid "Admin" -msgstr "Amministratori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles-strings_rs.php:156 -msgid "Manager" -msgstr "Gestore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/roles_rs.php:387 -msgid "Anonymous Reader" -msgstr "Lettore anonimo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/teaser_rs.php:263 -#, php-format -msgid "%s..." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:31 -msgid "unselfish, benevolent love, born of the Spirit." -msgstr "disinteressato, l'amore benevole, nato dallo Spirito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:33 -msgid "Agapé discerns needs and meets them unselfishly and effectively." -msgstr "Agapé individua i vostri bisogni e li soddisfa disinteressatamente ed efficacemente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:36 -#, php-format -msgid "This WordPress plugin is part of my agapé try, a lifelong effort to love God and love people by rightly using the time and abilities He has leant me. As a husband, father, engineer, farmer and/or software developer, I have found this stewardship effort to be often fraught with contradiction. A wise and sustainable balancing of roles has seemed to elude me. Yet I want to keep trying, trusting that if God blesses and multiplies the effort, it will become agapetry, a creative arrangement motivated by benevolent love. A fleeting childlike sketch of the beautiful %1$s chain-breaking agapé%2$s which %3$s Jesus Christ unleashed%4$s so %5$s freely%6$s and aptly on an enslaving, enslaved world." -msgstr "Questo plugin per WordPress è parte della mia prova agapé, uno sforzo di tutta una vita che l'amore di Dio e per le persone che, giustamente, utilizzando il tempo e le mie capacità, mi Ha sempre appoggiato. Come marito, padre, ingegnere, imprenditore e / o sviluppatore software, ho trovato questo sforzo di gestione essere spesso irto di contraddizioni. Un equilibrio sapiente e sostenibile dei ruoli è sembrato sfuggirmi. Eppure io voglio continuare a provare, confidando nel fatto che se Dio benedice e moltiplica gli sforzi, diventerà agapetry, un accordo creativo motivato dalla benevole carità. Uno schizzo fugace ed infantile del bel %1$s chain-breaking agapé %2$s, che %3$s Gesù Cristo ha scatenato %4$s in modo cosi %5$s libero %6$s e giustamente in una riduzione in schiavitù, schiavo del mondo ." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:38 -#, php-format -msgid "Although Role Scoper's development was a maniacal hermit-like effort, it was only possible because of the clean and flexible %1$s WordPress code base%2$s. My PHP programming skills grew immensely by the good examples set forth there and in plugins such as %3$s NextGen Gallery%4$s. I'm not done learning, and look forward to some real-time cooperation with these and other developers now that my all-consuming quest has reached a stable plateau." -msgstr "Sebbene lo sviluppo di Role Scoper è stato uno sforzo maniacale da emerita, reso possibile soltanto dalla %1$s base del codice pulito e flessibile di WordPress%2$s. Le mie abilità di programmazione in PHP crescono immensamente grazie a quella buona raccolta di esempi e di plugins quali la %3$s Galleria NextGen %4$s. Non sono nato imparato, e guardo avanti a qualche cooperazioni in tempo reale con questi ed altri sviluppatori ora che tutte le mie ricerche di consumo hanno raggiunto una forma stabile." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:40 -#, php-format -msgid "Thanks to %1$sAlberto Ramicciotti%2$s for the Italian translation. I do try to be translator-friendly, but any untranslated captions are due to my flurry of recent additions and changes, and will no doubt be updated soon. Now there must be someone else who wants Role Scoper in their language..." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:42 -#, php-format -msgid "Role Scoper is open source software released under the %1$s General Public License (GPL)%2$s. Due to limitations, obligations and non-technical aspirations common to most human beings, I will probably never again pursue uncommissioned plugin development on the scale Role Scoper has required. However, I do plan to provide some free support, correct bugs which emerge and revise the plugin for future WordPress versions. If it adds value to your website or saves you time and money, you can express appreciation in several ways:" -msgstr "Role Scoper è un software a sorgente aperta rilasciato sotto %1$s General Public License (GPL)%2$s. A causa di limitazioni, obblighi e delle aspirazioni non-tecniche comuni alla maggior parte degli esseri umani, io probabilmente non potro' mai più continuare lo sviluppo del plugin sulla scala che Role Scoper richiede. Comunque, sto pianificando di fornire un supporto libero, correzione dei bugs che vengono rilevati e rivedere il plugin per le future versioni di WordPress. Se aggiunge qualità al vostro sito web o vi fa risparmiare tempo e denaro, potete esprimere l'apprezzamento in diversi modi:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:44 -#, php-format -msgid "%1$s Submit technical feedback%2$s, including improvement requests." -msgstr "%1$s Inoltra un messaggio di ritorno%2$s, includendovi le richieste di miglioramento." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:46 -#, php-format -msgid "%1$s Submit a case study%2$s, explaining how Role Scoper helps you do something excellent and praiseworthy." -msgstr "%1$s Inviare uno studio di esempi %2$s, spiegando come Role Scoper vi aiuta a creare qualcosa di eccellente e meritevole." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:48 -#, php-format -msgid "%1$s Localize Role Scoper%2$s to your own language %3$s using poEdit%4$s " -msgstr "%1$s Localizzare Role Scoper%2$s nella vostra lingua %3$s usando poEdit%4$s " - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:52 -#, php-format -msgid "If the plugin has seriously broadened your CMS horizons, %s" -msgstr "Se questo plugin ha seriamente migliorato gli orizzonti del vostro CMS, %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:54 -#, php-format -msgid "If you are an established web developer, %1$s grant me your professional opinion%2$s on how this work stacks up. Might the skills, work ethic and values I express here fit into a development team near you?" -msgstr "Se siete stabili sviluppatori web, %1$s rilasciatemi le vostre opinioni professionali %2$s sui progressi di questo lavoro. Potrebbero interessarvi le competenze, l'etica del lavoro e dei valori qua espressi, per essere inserite in un gruppo di sviluppo vicino a voi?" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/about.php:56 -msgid "Hire or refer my services to design, redesign or enhance your site - quality care at reasonable rates." -msgstr "Assumermi o parlarmi dei miei servizi per lavori di design, re-design o miglioria del vostro sito - mantenendo un equilibrio fra qualita ed un giusto prezzo." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:48 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:673 -msgid "Users or Groups" -msgstr "Gruppi di utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:57 -msgid "User / Group" -msgstr "Utente / Gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:59 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:262 -msgid "User" -msgstr "Utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:90 -msgid "Select Assignment Mode" -msgstr "Selezionare tipo di assegnamento" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:107 -msgid "Select Restriction Mode" -msgstr "Selezionare tipo di restrizione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:115 -msgid "Review and Submit" -msgstr "Revisione e pubblicazione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:152 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1063 -msgid "Update »" -msgstr "Aggiorna »" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:159 -#, fuzzy, php-format -msgid "Select %s to Modify" -msgstr "Selezionare i Ruoli da Moficare" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:173 -msgid "Set Role Duration and/or Content Date Limits (optional)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:183 -msgid "Select Roles to Assign / Remove" -msgstr "Selezionare Ruoli da Assegnare / Rimuovere" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:188 -msgid "Select Roles to Modify" -msgstr "Selezionare i Ruoli da Moficare" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:253 -#, php-format -msgid "Error: no %s were selected!" -msgstr "Errore: nessun %s era selezionato!" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:259 -msgid "Error: no roles were selected!" -msgstr "Errore: nessun ruolo è stato selezionato!" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:346 -#, php-format -msgid "%d user" -msgstr "%d utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:348 -#, php-format -msgid "%d group" -msgstr "%d gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:356 -#, php-format -msgid "%d role selection" -msgstr "%d selezione del ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:358 -#, fuzzy, php-format -msgid "Role Assignments Updated: %1$s for %2$s" -msgstr "Assegnamento di ruolo aggiornato: %1$s per %2$s|%d selections for %d" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:362 -#, php-format -msgid "Role Restrictions Updated: %d setting" -msgstr "Limitazioni ruoli aggiornate: %d impostazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:512 -msgid "unselect all roles" -msgstr "deseleziona tutti i ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:517 -msgid "hide users" -msgstr "nascondi utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:521 -msgid "show users" -msgstr "mostra utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:527 -msgid "hide groups" -msgstr "nascondi gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:531 -msgid "show groups" -msgstr "mostra gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:537 -msgid "hide roles" -msgstr "nascondi ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:541 -msgid "show roles" -msgstr "mostra ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:567 -msgid "hide unmodified items" -msgstr "nascondi voci non modificate" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:570 -msgid "hide defaulted" -msgstr "nascondi predefinito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:572 -msgid "hide unassigned" -msgstr "nascondi non assegnato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:583 -msgid "items" -msgstr "voci" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:586 -#, php-format -msgid "include the newest %s with default restrictions" -msgstr "Inludi il più recente %s con le le impostazioni predefinite" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:588 -#, php-format -msgid "include the newest %s with no role assignments" -msgstr "Inludi il più recente %s con nessun assegnamento di ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:592 -msgid "show defaulted" -msgstr "mostra il predefinito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:594 -msgid "show unassigned" -msgstr "mostra non assegnati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:608 -msgid "collapse all" -msgstr "chiudi tutto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:619 -msgid "expand all" -msgstr "Espandi tutto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:626 -#, php-format -msgid "Note: %1$s with default restrictions will not be listed here unless they are among the %2$s newest." -msgstr "Nota: %1$s con le limitazioni predefinite non saranno elencate a meno che non siano tra i %2$s più recenti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:628 -#, php-format -msgid "Note: %1$s with no role assignments will not be listed here unless they are among the %2$s newest." -msgstr "Nota: %1$s con nessuna assegnazione di ruolo non saranno elencate a meno che non siano fra i %2$s più recenti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:684 -msgid "prev" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:685 -msgid "next" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:693 -#, fuzzy, php-format -msgid "Current %s" -msgstr "Attuali limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:697 -msgid "Current Restrictions" -msgstr "Attuali limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:727 -msgid "top" -msgstr "Inizio" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:729 -msgid "show all" -msgstr "Mostra tutto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:739 -#, php-format -msgid "DEFAULTS for new %s" -msgstr "Predefinito per i nuovi %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:741 -#, php-format -msgid "DEFAULTS for all %s" -msgstr "Predefiniti per tutti %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:758 -msgid "edit roles" -msgstr "modifica ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:759 -#, fuzzy, php-format -msgid "edit %s" -msgstr "modifica ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:817 -#, php-format -msgid "id %s" -msgstr "id %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1070 -msgid "select / unselect all:" -msgstr "seleziona / deseleziona tutto:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1071 -msgid "Actions" -msgstr "Azioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1092 -#, php-format -msgid "(all %s)" -msgstr "(tutto %s)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:11 -msgid "Pending Post" -msgstr "Articolo in attesa" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:29 -msgid "Pending Page" -msgstr "Pagina in attesa" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:53 -msgid "Role Duration specifies the time period in which a role is active." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:58 -msgid "Content Date Limits narrow the content which the role applies to." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:77 -msgid "Modify Role Duration" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:85 -msgid "Grant Role on:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:90 -msgid "Expire Role on:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:112 -msgid "Modify Content Date Limits" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:118 -#, fuzzy -msgid "Min Content Date:" -msgstr "Nasconde anteprima dei contenuti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:123 -#, fuzzy -msgid "Max Content Date:" -msgstr "Mantenimento contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:135 -msgid "This controls what limits to apply to the User / Group roles you select for creation or modification. Currently stored limits are indicated by a colored background behind the User or Group name. For details, hover over the name or view the User or Group Profile." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:238 -#, php-format -msgid "%1$s%2$s, %3$s @ %4$s : %5$s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:266 -#, fuzzy -msgid "keep current setting" -msgstr "Scorri fino all'impostazione attuale" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:393 -msgid "Role Scoper Options" -msgstr "Opzioni Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -msgid "Role Options" -msgstr "Opzioni Ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Scoper Option Defaults" -msgstr "Opzioni Predefinite di Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Defaults" -msgstr "Ruolo predefinito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:218 -#, php-format -msgid "[WP %s]" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:221 -msgid "[Anonymous]" -msgstr "[Anonimi]" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:232 -#, php-format -msgid "All users with the WordPress role of %s" -msgstr "Tutti gli utenti con il ruolo di Wordpress di %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:235 -msgid "Anonymous users (not logged in)" -msgstr "Utenti anonimi (no autenticati nel sito)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:114 -#, php-format -msgid "assign role for this %s" -msgstr "assegna ruolo per questo %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:115 -#, php-format -msgid "assign role for sub-%s" -msgstr "assegna ruolo per il sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:168 -#, php-format -msgid "%1$s Role Scoper Documentation%2$s" -msgstr "%1$s Documentazione di Role Scoper%2$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:169 -#, php-format -msgid "%1$s Role Scoper Support Forum%2$s" -msgstr "%1$s Forum di supporto per Role Scoper%2$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:254 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:259 -#, fuzzy -msgid "Role Groups" -msgstr "Gruppi utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "User Groups" -msgstr "Gruppi utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -msgid "Default Groups" -msgstr "Gruppi di default" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "Group Members" -msgstr "Membri del gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:382 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:400 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:405 -msgid "Restrictions" -msgstr "Limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:383 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:401 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:403 -msgid "Roles" -msgstr "Ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:390 -msgid "Role Restrictions" -msgstr "Limitazioni ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General Roles" -msgstr "Ruoli generali" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General" -msgstr "Generale" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:458 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:530 -#, php-format -msgid "%s Roles" -msgstr "%s Ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:470 -#, php-format -msgid "%s restrictions" -msgstr "%s limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:539 -#, php-format -msgid "%s Restrictions" -msgstr "%s limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About Role Scoper" -msgstr "Riguardo Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About" -msgstr "Riguardo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:569 -msgid "Attachment Utility" -msgstr "Strumento allegato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_rs.php:637 -msgid "Object Role Edit" -msgstr "Modifica Ruolo oggetto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:152 -#, php-format -msgid "TO START on %s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:153 -#, fuzzy, php-format -msgid "started on %s" -msgstr "Limitazione per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:154 -#, php-format -msgid "EXPIRED on %s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:155 -#, php-format -msgid "expire on %s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:157 -#, php-format -msgid "(for content %1$s to %2$s)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:158 -#, php-format -msgid "(for content after %1$s)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:159 -#, php-format -msgid "(for content before %1$s)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:234 -#, php-format -msgid "Restricted for %s" -msgstr "Limitazione per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:235 -#, php-format -msgid "Unrestricted for %1$s, Restricted for sub-%2$s" -msgstr "Illimitato per %1$s, Limitato per i sotto-%2$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:236 -#, php-format -msgid "Restricted for selected and sub-%s" -msgstr "Limitato per la selezionata e le sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:237 -msgid "Unrestricted by default" -msgstr "Illimitato di default" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:238 -msgid "Unrestricted" -msgstr "Illimitato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:241 -#, php-format -msgid "Unrestricted for %s" -msgstr "Illimitato per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:242 -#, php-format -msgid "Unrestricted for sub-%s" -msgstr "Illimitato per i sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:243 -#, php-format -msgid "Unrestricted for selected and sub-%s" -msgstr "Illimitato per la selezionata e le sue sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:244 -msgid "Restricted by default" -msgstr "Limitato di default" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:245 -msgid "Restricted" -msgstr "Limitato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Groupname" -msgstr "Nome gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Username" -msgstr "Nome utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:269 -msgid "Users / Groups Key" -msgstr "chiave utenti / gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:276 -#, php-format -msgid "%1$s has role assigned for the specified %2$s." -msgstr "%1$s ha un ruolo assegnato per lo specificato %2$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:281 -#, php-format -msgid "%1$s has role assigned for the specified %2$s and, by default, for all its sub-%3$s. (Propagated roles can also be explicitly removed)." -msgstr "%1$s ha un ruolo assegnato per lo specifico %2$s e, di default, per tutti i suoi sotto-%3$s. (i Ruoli Estesi possono essere anche esplicitatamente rimossi)." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:286 -#, php-format -msgid "%1$s does NOT have role assigned for the specified %2$s, but has it by default for sub-%3$s." -msgstr "%1$s non ha un ruolo assegnato per lo specificato %2$s, ma lo possiede di default per i sotto-%3$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:291 -#, php-format -msgid "%1$s has this role via propagation from parent %2$s, and by default for sub-%3$s." -msgstr "%1$s ha questo ruolo attraverso l'estensione dal genitore %2$s, e di default per i sotto-%3$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:296 -msgid "Role Name" -msgstr "Nome gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:297 -#, php-format -msgid "role is restricted for specified %s." -msgstr "ruolo limitato allo specificato %s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:308 -msgid "Scroll to current settings:" -msgstr "Scorri fino all'impostazione attuale" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:380 -#, php-format -msgid "Category Roles for WordPress pages are disabled for this blog. Object Roles can be assigned to individual pages, and optionally propagated to sub-pages." -msgstr "I ruoli per le categorie delle pagine di Wordpress sono disabilitati per questo blog. I ruoli ad oggetto possono essere assegnati a pagine singole, e alternativamente estesi alle sotto-pagine." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:384 -#, php-format -msgid "Another option is to categorise pages via the Page Category Plus plugin." -msgstr "Un'altra opzione è quella di categorizzare le pagine con l'uso del plugin Pagina Categoria Addizionale ." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:435 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:438 -msgid "Main Page (no parent)" -msgstr "Pagina principale (nessun genitore)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:23 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:31 -#, fuzzy, php-format -msgid "%1$s define user groups%2$s" -msgstr "%1$s definire i gruppi di utenza %2$s|Args are link open, close tags" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:25 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:33 -#, fuzzy, php-format -msgid "Note: To assign roles to user groups, first %1$s define the group(s)%2$s." -msgstr "Nota: Per assegnare ruoli a gruppi utente, per prima cosa %1$s definire il gruppo(i) %2$s.|Args are link open, close tags" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:65 -#, fuzzy, php-format -msgid "Actions: %s" -msgstr "Azioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:74 -msgid "Key:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:83 -msgid "Enter additional Group Names or IDs (comma-separate)" -msgstr "Inserire nomi di Gruppi o IDs supplementari (separare con una virgola)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:83 -msgid "Enter additional User Names or IDs (comma-separate)" -msgstr "Inserire nomi utente o IDs (separare con una virgola)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:89 -msgid "Enter additional Group Names or IDs for Subpages" -msgstr "Inserire nomi di Gruppi o IDs supplementari per le sottopagine" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:89 -msgid "Enter additional User Names or IDs for Subpages" -msgstr "Inserire nomi utente o IDs supplementari per le sottopagine" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:155 -#, php-format -msgid "show current groups (%d)" -msgstr "mostra gli attuali gruppi (%d)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:155 -#, php-format -msgid "show eligible groups (%d)" -msgstr "mostra gruppi eleggibili (%d)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:157 -#, php-format -msgid "show current users (%d)" -msgstr "mostra utenti attuali (%d)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:157 -#, php-format -msgid "show eligible users (%d)" -msgstr "mostra utenti eleggibili (%d)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:177 -msgid "filter:" -msgstr "filtra:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:186 -msgid "select" -msgstr "seleziona" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:191 -msgid "unselect" -msgstr "deseleziona" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:197 -msgid "propagate" -msgstr "estendere" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:202 -msgid "unpropagate" -msgstr "restringere" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:211 -#, php-format -msgid "current groups (%d):" -msgstr "gruppi attuali (%d):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:211 -#, php-format -msgid "eligible groups (%d):" -msgstr "gruppi eleggibili (%d):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:213 -#, php-format -msgid "current users (%d):" -msgstr "utenti attuali (%d):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:213 -#, php-format -msgid "eligible users (%d):" -msgstr "utenti eleggibili (%d):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:222 -msgid "object" -msgstr "oggetto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:225 -msgid "objects" -msgstr "oggetti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:446 -#, fuzzy, php-format -msgid "inherited from parent %s" -msgstr "Illimitato per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:450 -msgid "has via other role" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:454 -#, fuzzy -msgid "has via group" -msgstr "nascondi gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:458 -msgid "has via other scope" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:462 -#, fuzzy, php-format -msgid "propagate to sub-%s" -msgstr "estendere" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:465 -#, php-format -msgid "%1$sEdit date limits%2$s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:17 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because your WP_CONTENT_DIR is not in the WordPress branch." -msgstr "Nota: Accesso diretto agli allegati dei file caricati non possono essere filtrati perchè la vostra WP_CONTENT_DIR non è parte di una sezione di WordPress." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:19 -msgid "The operation was terminated due to an invalid configuration." -msgstr "L'operazione è stata terminata a causa di una configurazione non valida." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:48 -#, php-format -msgid "checking %s posts / pages..." -msgstr "sto controllando %s articoli / pagine..." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:86 -#, fuzzy, php-format -msgid "skipping unfilterable file in %1$s \"%2$s\": %3$s" -msgstr "saltare i file non filtrabili in %1$s \"%2$s\": %3$s|post_type, post_title, file_url" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:128 -#, fuzzy, php-format -msgid "new attachment in %1$s \"%2$s\": %3$s" -msgstr "nuovo allegato in %1$s \"%2$s\": %3$s|post_type, post_title, file_url" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:133 -#, fuzzy, php-format -msgid "attachment OK in %1$s \"%2$s\": %3$s" -msgstr "allegato correttamente in %1$s \"%2$s\": %3$s|post_type, post_title, file_url" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:148 -#, php-format -msgid "Operation complete: %s linked uploads were found in your post / page content." -msgstr "Operazione completata: %s gli uploads collegati sono stati trovati nei contenuti del vostro articolo / pagina." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:151 -#, php-format -msgid "%s attachment records were added to the database." -msgstr "%s i documenti allegati sono stati aggiunti al database." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:153 -msgid "All linked uploads are already registered as attachments." -msgstr "Tutti gli uploads collegati sono gia registrati come allegati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:165 -msgid "Attachments Utility" -msgstr "Utilità degli allegati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:167 -#, fuzzy, php-format -msgid "Back to %1$sRole Scoper Options%2$s" -msgstr "Opzioni Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:180 -msgid "Role Scoper can limit direct URL access to files linked from your posts and pages, but only if the following requirements are met:" -msgstr "Role Scoper può limitare l'accesso diretto all'URL dei files collegati dai vostri articoli e pagine, ma solo se incontra i seguenti requisiti:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:182 -msgid "Your WP content directory must be a branch of the WordPress directory tree (i.e. wp-config.php must not be customized to separate WP_CONTENT_DIR and WP_CONTENT_URL from the main WordPress folder)." -msgstr "La vostra cartella dei contenuti di WP deve essere un ramo dell'albero della cartella di WordPress (per esempio: wp-config.php non deve essere personalizzato per separare WP_CONTENT_DIR e WP_CONTENT_URL dalla cartella principale di WordPress)." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:188 -msgid "Note that to be detected as attachments, your file references must include www." -msgstr "Notare che per essere rilevato come allegati, i vostri riferimenti nel file devono includere www." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:190 -msgid "Note that to be detected as attachments, your file references must NOT include www." -msgstr "Notare che per essere rilevato come allegati, i vostri riferimenti nel file NON devono includere www." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:195 -#, php-format -msgid "Files linked from WP Posts and Pages must be in %1$s (or a subdirectory of it) to be filtered. After moving files, you may use %2$s a search and replace plugin%3$s to conveniently update the URLs stored in your Post / Page content. %4$s" -msgstr "I files collegati dagli Articoli o Pagine di WP devono stare in %1$s (od una sua sotto-cartella) per essere filtrati. Dopo aver effettuato lo spostamento dei files, potrete utilizzare un %2$s plugin di Cerca e Sostituisci%3$s per aggiornare convenientemente gli URLs immagazzinati nel contenuto del vostro Articolo / Pagina. %4$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:197 -msgid "Files which are already appropriately located and linked must also have their post-file attachment relationship stored to the WP database. This is normally accomplished by clicking the \"Insert into Post\" button in the WP file uploader / Media Library. Files which were instead uploaded manually via FTP or CPanel can receive their attachment record via this utility." -msgstr "I files che sono già appropriatamente collocati e collegati devono anche avere il proprio rapporto dell'allegato al file dell'articolo, immagazzinato nel database di WP. Questo è normalmente attuato tramite il clic sul bottone \"Inserire nell'articolo\" nello strumento di caricamento file di WP / Libreria Media. I files che invece sono stati caricati manualmente attraverso un FTP o un CPanel possono ricevere i propri allegati registrati attraverso questo strumento." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/attachments_utility.php:206 -msgid "Register File Attachments »" -msgstr "Registrare gli allegati ai file »" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:8 -msgid "see notes" -msgstr "vedi note" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:30 -#, php-format -msgid "Default Groups Updated: %s groups" -msgstr "Gruppi predefiniti aggiornati: gruppi %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:44 -msgid "No default groups defined." -msgstr "Nessun gruppo predefinito è stato definito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:66 -msgid "No groups defined." -msgstr "Nessun gruppo è definito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:72 -#, fuzzy -msgid "Notes" -msgstr "voci" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:74 -msgid "Each new user will be added to the default groups. Existing users are not affected." -msgstr "Ogni nuovo utente sarà aggiunto al gruppo predefinito. Gli utenti già esistenti non ne saranno affetti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/default_groups.php:77 -msgid "Use default groups only if you need the ability to manually remove a user from one of the groups later. To affect all users (or all users of a certain WP role), assign roles to the corresponding [WP role] group instead." -msgstr "Utilizzare i gruppi predefiniti soltanto se necessitate della possibilità di rimuovere manualmente, in seguito, un utente da uno dei gruppi. Per comprendere tutti gli utenti (o tutti gli utenti di un certo ruolo WP), assegnare invece i ruoli al corrispondente [ruolo WP] gruppo." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:391 -#, php-format -msgid "The page %s was saved, but the new Page Parent setting was discarded. You do not have permission to disassociate it from the Main Page." -msgstr "La pagina %s è stata salvata, ma l'impostazione della nuova Pagina Parente è stata scartata. Non hai i permessi per separarla dalla Pagina Principale." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:393 -#, php-format -msgid "The Page Parent setting for %s was reverted to the previously stored value. You do not have permission to associate it with the Main Page." -msgstr "L'impostazione della Pagina Parente per %s è ritornata al valore precedentemente immagazzinato. Non hai i permessi per associarla con la Pagina Principale." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:407 -#, php-format -msgid "The page %s cannot be published because you do not have permission to associate it with the Main Page. Please select a different Page Parent and try again." -msgstr "La pagina %s non può essere pubblicata perchè non si dispone dei permessi necessari per associarla alla Pagina Principale. Si prega di selezionare una Pagina Parente differente e riprovare." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:43 -msgid "Restrict" -msgstr "Limita" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:48 -#, fuzzy -msgid "Term Roles" -msgstr "Ruoli generali" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:66 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:68 -msgid "Read" -msgstr "Leggi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:170 -msgid "Role Scoper Plugin CSS:" -msgstr "CSS del Plugin Role Scoper:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Role Scoper" -msgstr "Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Support Forum" -msgstr "Forum di supporto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:227 -msgid "Note: Role Manager settings determine each user's default blog-wide capabilities. Since the Role Scoper plugin is also enabled, Term-specific or Object-specific Role Assignments may increase or decrease a user's actual capabilities." -msgstr "Nota: le impostazioni del Role Manager determina che ogni utente abbia capacità di blog-wide predefinito. Dal momento che anche il plugin Role Scoper è attivato, l'assegnazione di Ruolo Specifico-per-Termine o Specifico-per-Oggetto potrebbe incrementare o ridurre le capacità attuali di un utente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:174 -msgid "Assign" -msgstr "Assegna" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:174 -msgid "Remove" -msgstr "Rimuovi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:177 -msgid "Assign General Roles" -msgstr "Assegna ruoli generali" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:181 -msgid "Supplement any user's blog-wide WordPress Role with additional, type-specific role(s). This does not alter the WordPress role." -msgstr "Integrare qualsiasi Ruolo di WordPress di un utente blog-wide con ruoli di tipo specifico aggiuntivi. Questo non altera il ruolo di WordPress." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:207 -msgid "Confirm and Submit" -msgstr "Conferma ed inoltra" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:260 -msgid "select all roles" -msgstr "Seleziona tutti i ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:287 -msgid "hide empty" -msgstr "nascondi vuoti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/general_roles.php:329 -#, php-format -msgid "Modify role assignments for %s" -msgstr "Modifica assegnazioni di ruolo per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:42 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:93 -msgid "Please specify a name for the group." -msgstr "Si prega di specificare un nome per questo gruppo." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:44 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:96 -#, php-format -msgid "A group with the name %s already exists." -msgstr "Un gruppo con il nome %s esiste già." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:47 -#, php-format -msgid "Group %s created successfuly." -msgstr "Il gruppo %s è stato creato con successo." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:64 -msgid "This meta group is automatically populated. You cannot manually edit it." -msgstr "Questo gruppo è automaticamente popolato. Non potete modificarlo manualmente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:101 -#, php-format -msgid "Group %s updated successfuly." -msgstr "Aggiornato correttamente il gruppo %s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:103 -#, php-format -msgid "Group %s was not updated successfuly." -msgstr "il gruppo %s non è stato aggiornato correttamente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:119 -msgid "Group Deleted." -msgstr "Gruppo cancellato." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:121 -msgid "Invalid group. No groups were deleted." -msgstr "Gruppo non valido. Nessun gruppo è stato cancellato." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:130 -msgid "Group edit canceled." -msgstr "Modifica di gruppo cancellata." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:152 -#, php-format -msgid "%d member deleted." -msgstr "%d membro cancellato." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:157 -#, php-format -msgid "%d member added." -msgstr "%d membro aggiunto." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:195 -msgid "add new" -msgstr "aggiungi nuovo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:196 -msgid "set defaults" -msgstr "setta predefinito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:197 -msgid "browse members" -msgstr "Sfoglia membri" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:203 -msgid "By creating User Groups, you can assign RS roles to multiple users. Note that group membership itself has no effect on the users until you assign roles to the group." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:211 -#, php-format -msgid "You are about to delete the group %s. Do you wish to continue?" -msgstr "State per cancellare il gruppo %s. Si desidera continuare?" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:274 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:82 -msgid "No groups available." -msgstr "Nessun gruppo disponibile" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:294 -msgid "Create New Group" -msgstr "Creare un nuovo gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:310 -#, php-format -msgid "Edit Group: %s" -msgstr "Modifica gruppo: %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:371 -#, php-format -msgid "Group Administrators %1$s(via login to %2$s)%3$s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/groups.php:373 -msgid "Group Administrators" -msgstr "Amministratori del gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:22 -#, php-format -msgid "%s group membership updated." -msgstr "%s aggiornato il gruppo dei membri." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:27 -msgid "Invalid group." -msgstr "Gruppo non valido." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:32 -msgid "Group members edit canceled." -msgstr "La modifica dei membri del gruppo è annullata." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:68 -msgid "(automatic)" -msgstr "(automatico)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:70 -msgid "(no users)" -msgstr "(nessun utente)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:93 -msgid "This meta group is automatically populated. You cannot manually add members to it." -msgstr "Questo gruppo è automaticamente popolato. Non potete aggiungervi membri manualmente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/group_members.php:96 -#, php-format -msgid "Edit members of %s group" -msgstr "Modifica i membri del gruppo %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:267 -#, php-format -msgid "Restrict for %1$s (only selected users/groups are %2$s)" -msgstr "Limita a %1$s (soltanto gli utenti/gruppi selezionati sono %2$s)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:278 -#, php-format -msgid "Restrict for Sub-%1$s" -msgstr "Limita per i Sotto-%1$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:442 -msgid "restricted role" -msgstr "Ruolo limitato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:446 -#, php-format -msgid "%s user" -msgstr "%s utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:452 -#, php-format -msgid "%s group" -msgstr "%s gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:569 -msgid "Category Restrictions" -msgstr "Limitazioni della categoria" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:579 -msgid "Category Roles" -msgstr "Ruoli della categoria" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:10 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:10 -msgid "Invalid data source" -msgstr "Sorgente dei dati invalida" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:66 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and %5$s Role assignments are ignored." -msgstr "Riduce l'accesso allo specifico %1$s richiedendo che alcuni ruoli siano %2$s%3$s-assegnati %4$s. I Ruoli corrispondenti assegnati da WP, quelli Generali assegnati da RS e le assegnazioni di Ruolo %5$s sono ignorate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:68 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and Section Role assignments are ignored." -msgstr "Ridurre l'accesso ad uno specifico %1$s richiedendo che alcuni ruoli siano assegnati %2$s%3$s %4$s. I Ruoli corrispondenti assegnati da WP ed il Generale assegnato da RS e l'assegnazione dei Ruoli per Sezione vengono ignorati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:70 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General Role assignments are ignored." -msgstr "Ridurre l'accesso ad uno specifico %1$s richiedendo che alcuni ruoli siano assegnati-%2$s%3$s %4$s. I Ruoli assegnati da WP e le assegnazioni del Ruolo Generale assegnato da RS saranno ignorati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:85 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:89 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:97 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:101 -#, php-format -msgid "for selected %s" -msgstr "per il selezionato %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:90 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:102 -#, php-format -msgid "for sub-%s of selected" -msgstr "per le sotto-%s della selezionata" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:91 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:103 -#, php-format -msgid "for selected and sub-%s" -msgstr "per la selezionata e le sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Restrict selected roles" -msgstr "Limita i ruoli selezionati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Unrestrict selected roles" -msgstr "Illimita i ruoli selezionati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:200 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:208 -#, php-format -msgid "To edit all roles for any %1$s, click on the %1$s name." -msgstr "Per modificare tutti i ruoli per qualsiasi %1$s, cliccare sul nome %1$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:204 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:212 -#, php-format -msgid "To edit the %s via its default editor, click on the ID link." -msgstr "Per modificare il %s attraverso l'editor predefinito, cliccare sul collegamento ID." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_restrictions.php:209 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:217 -#, php-format -msgid "To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s." -msgstr "Per migliorare le prestazioni, le caselle di modifica del ruolo qui non possono includere alcuni ruoli che si possono modificare solo grazie al vostro proprio ruolo specifico %1$s. In tali casi, cliccare sul collegamento per la modifica, per modificare i ruoli per i singoli %1$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:67 -#, fuzzy, php-format -msgid "Expand access to a %2$s, potentially beyond what a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "Aumenta l'accesso ad un %2$s, potenzialmente più di quanto il ruolo di un utente WP permetterebbe. Per ridurre l'accesso, definire le %1$s%2$s Limitazioni%3$s.|gli argomenti sono collegamenti aperti, il nome del tipo di oggetto, collegamenti chiusi." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:87 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:119 -#, php-format -msgid "Assign for selected %s" -msgstr "Assegna al selezionato %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:88 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:120 -#, php-format -msgid "Assign for sub-%s of selected" -msgstr "Assegna ai sotto-%s del selezionato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles.php:89 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:121 -#, php-format -msgid "Assign for selected and sub-%s" -msgstr "Assegna alla selezionata e le sotto-%s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles_list.php:205 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles_list.php:207 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:211 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:213 -#, fuzzy, php-format -msgid "%1$s Roles%2$s:" -msgstr "%s Ruoli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles_list.php:215 -msgid "ID" -msgstr "ID" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_roles_list.php:217 -msgid "Role Assignments" -msgstr "Assegnazione ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_role_edit.php:21 -msgid "You do not have permission to assign roles for this object." -msgstr "Non si dispone di permessi per assegnare ruoli a questo oggetto." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_role_edit.php:29 -msgid "Object Roles Updated." -msgstr "Ruoli di oggetti aggiornati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/object_role_edit.php:36 -#, php-format -msgid "Assign Roles for %1$s \"%2$s\"" -msgstr "Assegna ruoli per %1$s \"%2$s\"" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:126 -msgid "Role Scoper options were reset to defaults." -msgstr "Le ozioni di Role scoper erano azzerati di default." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:129 -msgid "The persistent cache was flushed." -msgstr "La cache permanente è stata svuotata." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:131 -msgid "Role Scoper options were updated." -msgstr "Le ozioni di Role scoper sono aggiornate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Features" -msgstr "Caratteristiche" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Advanced" -msgstr "Avanzate" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Realm" -msgstr "Regno" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "RS Role Definitions" -msgstr "Definizioni del Ruolo RS" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "WP Role Definitions" -msgstr "Definizioni del Ruolo WP" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "Option Scope" -msgstr "Opzioni dello Scope" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:161 -msgid "Front End" -msgstr "Front End" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:162 -msgid "Pages Listing" -msgstr "Lista di pagine" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:163 -msgid "Categories Listing" -msgstr "Lista dele categorie" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:164 -msgid "Content Maintenance" -msgstr "Mantenimento contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:165 -msgid "File Filtering" -msgstr "Filtraggio del file" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:166 -#, fuzzy -msgid "Role Date Limits" -msgstr "Definizioni del Ruolo RS" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:167 -msgid "Internal Cache" -msgstr "Cache interna" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:168 -msgid "Version" -msgstr "Versione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:169 -msgid "RSS Feeds" -msgstr "RSS Feeds" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:170 -msgid "Hidden Content Teaser" -msgstr "Nasconde anteprima dei contenuti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:173 -msgid "Role Basis" -msgstr "Basi del ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:174 -msgid "Role Type" -msgstr "Tipo di ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:175 -msgid "Page Structure" -msgstr "Struttura della pagina" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:176 -msgid "User Profile" -msgstr "Profilo utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:177 -msgid "User Management" -msgstr "Gestione utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:178 -msgid "Administrator Definition" -msgstr "Definizione Amministratore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:179 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:247 -msgid "Limited Editing Elements" -msgstr "Elementi con modifiche limitate" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:180 -msgid "Role Assignment Interface" -msgstr "Interfaccia di assegnazione Ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:181 -msgid "Custom Columns" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:182 -msgid "Additional Object Roles" -msgstr "Oggetto dei Ruoli supplementari" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:185 -msgid "Term / Object Scope" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:186 -#, fuzzy -msgid "Term Scope" -msgstr "Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:187 -#, fuzzy -msgid "Object Scope" -msgstr "Opzioni dello Scope" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:188 -msgid "Access Types" -msgstr "Tipi di accesso" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:201 -msgid "Cache roles and groups to disk" -msgstr "Cache dei Ruoli e dei gruppi su disco" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:202 -msgid "Enabled" -msgstr "Abilitato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:203 -msgid "Apply Group Roles" -msgstr "Applica i Ruoli di gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:204 -msgid "Apply User Roles" -msgstr "Applica Ruoli utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:205 -msgid "Within any scope, each user or group has:" -msgstr "All'interno di qualsiasi applicazione, ogni utente o gruppo ha:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:206 -msgid "Support WP Custom User Caps" -msgstr "Supporto utente di WP personalizzato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:207 -msgid "Assume No Front-end Admin" -msgstr "Si presuppone che non vi sia un Amministratore di Front-end" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:208 -msgid "Indicate blended roles" -msgstr "Indicare i ruoli mescolati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:209 -msgid "Notify on Version Updates" -msgstr "Notifica gli aggiornamenti di versione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:211 -msgid "Suppress \"Private:\" Caption" -msgstr "Sopprimi la didascalia \"Privato:\"" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:212 -msgid "Display Administrative Hints" -msgstr "Mostra le note amministrative" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:213 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1421 -msgid "Specified element IDs also require the following blog-wide Role:" -msgstr "Gli ID degli elementi specificati richiedono anche i seguenti Ruoli di blog-wide:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:214 -msgid "Roles and Restrictions can be set:" -msgstr "Ruoli e Limitazioni possono essere settati:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:215 -msgid "HTTP Authentication Request in RSS Feed Links" -msgstr "Richiesta di autenticazione HTTP nei collegamenti dei Feed RSS" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:216 -msgid "Display mode for readable private posts" -msgstr "Modalità di visualizzazione per articoli privati leggibili" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:217 -msgid "Display mode for readable non-private posts" -msgstr "Modalità di visualizzazione per articoli non privati leggibili" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:218 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:895 -msgid "Feed Replacement Text (use %permalink% for post URL)" -msgstr "Testo sostitutivo del Feed (usa il %permalink% come URL dell'articolo)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:225 -msgid "Pages can be set or removed from Top Level by:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:226 -msgid "Display User Groups" -msgstr "Mostra gruppi utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:227 -msgid "Display User Roles" -msgstr "Mostra Ruoli utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:228 -msgid "Users CSV Entry" -msgstr "Voce CSV degli utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:229 -msgid "Non-editors see other users' unattached uploads" -msgstr "I non-editori vedono gli upload non allegati degli altri utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:230 -msgid "Remap pages to visible ancestor" -msgstr "Mappa ancora le pagine ad un antenato visibile" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:231 -msgid "Enforce actual page depth" -msgstr "Obbliga la profondità Pagina attuale" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:232 -msgid "Remap through excluded page parent" -msgstr "Mappa ancora attraverso le Pagine parenti escluse" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:233 -msgid "Remap terms to visible ancestor" -msgstr "Mappa ancora i termini ad un antenato visibile" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:234 -msgid "Enforce actual term depth" -msgstr "Imponi la attuale profondità dei termini" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:235 -msgid "Remap through excluded term parent" -msgstr "Mappa ancora attraverso i termini parenti esclusi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:236 -msgid "Limit User Edit by Level" -msgstr "Limita la modifica utente per livello" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:237 -msgid "Filter Uploaded File Attachments" -msgstr "Filtrare i file allegati caricati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:238 -msgid "Share groups site-wide" -msgstr "Condividi gruppi con livello site-wide" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:239 -msgid "Enable Role Duration Limits" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:240 -msgid "Enable Content Date Limits" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:241 -msgid "Filter Users Dropdown" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:242 -#, fuzzy -msgid "Restrictions Column" -msgstr "Limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:243 -msgid "Term Roles Column" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:244 -#, fuzzy -msgid "Object Roles Column" -msgstr "Modifica Ruolo oggetto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:246 -msgid "Enable" -msgstr "Attivato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:248 -msgid "Limit eligible users for object-specific editing roles" -msgstr "Limite degli utenti eleggibili per ruoli di modifica object-specific" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:249 -msgid "Include Private Pages in listing if user can read them" -msgstr "Includi Pagine Private nell'elenco se l'utente può leggerli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:250 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:251 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:253 -msgid "settings" -msgstr "Impostazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:347 -msgid "Role Scoper Site Options" -msgstr "Opzioni Sito Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:349 -msgid "Role Scoper Default Blog Options" -msgstr "Opzioni Blog Predefinito Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:351 -msgid "Role Scoper Blog Options" -msgstr "Opzioni Blog Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:367 -msgid "These settings will be applied to all blogs." -msgstr "Queste impostazioni saranno applicate a tutti i blogs." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:373 -msgid "These are the default settings for options which can be adjusted per-blog." -msgstr "Queste sono le impostazioni predefinite per le opzioni che possono essere aggiustate singolarmente per ogni blog." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:457 -msgid "This page enables optional adjustment of Role Scoper's features. For most installations, the default settings are fine." -msgstr "Questa pagina attivale le opzioni facoltative di aggiustamento delle caratteristiche di Role Scoper. Per un'istallazione generica, le impostazioni predefinite sono sufficienti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:466 -#, php-format -msgid "Note that, depending on your configuration, %1$s blog-specific options%2$s may also be available." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:473 -#, php-format -msgid "Note that, depending on your configuration, %1$s site-wide options%2$s may also be available." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:499 -msgid "If enabled, each user group will be available for role assignment in any blog. Any existing blog-specific groups will be unavailable. Group role assignments are still blog-specific." -msgstr "Se attivato, ogni gruppo di utenti sarà disponibile per l'assegnazione di ruolo in qualsiasi blog. Tutti i gruppi esistenti con livello di specific-blog non saranno disponibili. Le assegnazioni di ruolo del gruppo sono ancora settati con livello blog-specifici." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:515 -msgid "Remove the \"Private:\" and \"Protected\" prefix from Post, Page titles" -msgstr "Rimuove il prefisso \"Privato:\" and \"Protetto\" dal titolo dell' Articoli, Pagina." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:518 -msgid "Reduce memory usage for front-end access by assuming no content, categories or users will be created or edited there. Worst case scenario if you assume wrong: manually assign roles/restrictions to new content or re-sync user roles via plugin re-activation." -msgstr "Ridurre l'utilizzo della memoria per l'accesso al front-end assumendo nessun contenuto, categorie o gli utenti che vi saranno creati o modificati. Nella peggiore delle ipotesi, se si assume erroneamente: assegnare manualmente i ruoli/limitazioni ai nuovi contenuti o ri-sincronizzando i ruoli utente disabilitando e riattivando il plugin." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:533 -#, php-format -msgid "Include Private %s in listing if user can read them" -msgstr "Includi Privato %s nell'elenco se l'utente può leggerli" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:534 -msgid "Determines whether administrators, editors and users who have been granted access to a private page will see it in their sidebar or topbar page listing." -msgstr "Determina se gli amministratori, gli editori e gli utenti che hanno ottenuto l'accesso ad una pagina privata saranno mostrati nella colonna del menu o all'inizio di pagina." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:537 -msgid "If a page's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "Se il genitore di una pagina non è visibile ad un utente, sarà invece mostrato di seguito ad un nonno visibile" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:542 -msgid "When remapping page parents, apply any depth limits to the actual depth below the requested root page. If disabled, depth limits apply to apparant depth following remap." -msgstr "Quando mappa di nuovo i genitori di una pagina, applica qualsiasi limite di profondità all'attuale profondità sotto alla pagina radice richiesta. Se disabilitata, i limiti di profondità apparentemente applicati seguiranno la nuova mappatura." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:548 -msgid "Remap a page to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_pages / list_pages call." -msgstr "Mappa ancora una pagina al prossimo antenato visibile anche se alcuni antenati nascosti erano esplicitamente esclusi nella chiamata get_pages / list_pages." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:566 -msgid "If a category's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "Se il genitore di una categoria non è visibile ad un utente, sarà invece mostrato in seguito ad un nonno visibile." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:571 -msgid "When remapping category parents, apply any depth limits to the actual depth below the requested root category. If disabled, depth limits apply to apparant depth following remap." -msgstr "Quando mappa di nuovo i genitori di una categoria, applica qualsiasi limite di profondità all'attuale profondità sotto alla categoria radice richiesta. Se disabilitata, i limiti di profondità apparentemente applicati seguiranno la nuova mappatura." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:577 -msgid "Remap a category to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_terms / get_categories call." -msgstr "Mappa ancora una categoria al prossimo antenato visibile anche se alcuni antenati nascosti erano esplicitamente esclusi nella chiamata get_terms / get_categories." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:597 -#, php-format -msgid "Default new %s to Private visibility" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:598 -msgid "Note: this does not apply to Quickposts or XML-RPC submissions." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:601 -#, php-format -msgid "Auto-set %s to Private visibility if Reader role is restricted" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:602 -msgid "Note: this is only done if the Reader role is restricted via Post/Page edit form." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by the Author or Editor of any Post/Category/Page" -msgstr "da un Autore o Editore di qualsiasi Articolo/Categoria/Pagina" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by blog-wide Editors and Administrators" -msgstr "Dagli Editori con ampi permessi e gli Amministratori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by Content Administrators only" -msgstr "solo da Amministratori del contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:618 -msgid "by User Administrators only" -msgstr "solo da Amministratori degli utenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:630 -msgid "Specify which users can assign and restrict roles for their content - via Post/Page Edit Form or Roles/Restrictions sidebar menu. For a description of Administrator roles, see the Advanced tab." -msgstr "Specificare quali utenti possono assegnare e limitare i ruoli per i propri contenuti - attraverso il modulo di modifica Articolo/Pagina od il menu dei Ruoli/Limitazioni. Per una descrizione dei Ruoli di Amministratore, vedere la sezione Avanzate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:637 -msgid "If enabled, users who are not blog-wide Editors will see only their own unattached uploads in the Media Library." -msgstr "Se attivato, utenti che non sono Editori con livello blog-wide vedranno solo i loro file non allegati caricati nella Libreria Media." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:640 -msgid "If enabled, Post Author and Page Author selection dropdowns will be filtered based on scoped roles." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:663 -msgid "Note: Direct access to uploaded file attachments will not be filtered because DISABLE_ATTACHMENT_FILTERING is defined, perhaps in wp-config.php or role-scoper.php" -msgstr "Nota: l'accesso diretto agli allegati dei file caricati non saranno filtrati perchè è definita DISABLE_ATTACHMENT_FILTERING, probabilmente nel wp-config.php o nel role-scoper.php" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:675 -#, fuzzy -msgid "Note: Direct access to uploaded file attachments will not be filtered due to your nonstandard UPLOADS path." -msgstr "Nota: Accesso diretto agli allegati dei file caricati non possono essere filtrati perchè le impostazioni dei permalinks di Wordpress sono settate al tipo predefinito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:680 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because WordPress permalinks are set to default." -msgstr "Nota: Accesso diretto agli allegati dei file caricati non possono essere filtrati perchè le impostazioni dei permalinks di Wordpress sono settate al tipo predefinito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:695 -msgid "Block direct URL access to images and other uploaded files in the WordPress uploads folder which are attached to post(s)/page(s) that the user cannot read. A separate RewriteRule will be added to your .htaccess file for each protected file. Non-protected files are returned with no script execution whatsoever." -msgstr "Bloccare l'accesso diretto all'URL delle immagini ed agli altri file caricati nella cartella upload di WordPress che sono allegate all'articolo (i) / pagina (e) che l'utente non può leggere. Una regola separata di RewriteRule sarà aggiunta al tuo file .htaccess per ogni singolo file protetto. I file non protetti sono restituiti senza esecuzione del programma di sorta." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:700 -msgid "Note: The default WP-MU file request script, wp-content/blogs.php, requires a patch for compatibility with RS file filtering. If you need the advanced cache control provided by blogs.php, review the notes in role-scoper/mu_wp_content_optional/blogs.php and copy it into wp-content if desired. Otherwise, files will be accessed directly via header redirect following RS filtering. If you decide to install the patched blogs.php, add the following line to wp-config.php:
        define( 'SCOPER_MU_FILE_PROCESSING', true);" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:712 -#, fuzzy, php-format -msgid "Note: FTP-uploaded files will not be filtered correctly until you run the %1$sAttachments Utility%2$s." -msgstr "Nota: i files caricati via FTP non saranno filtrati correttamente fino a che non lancerete %1$sUtilità degli allegati%2$s.|gli argomenti sono collegati apertamente, in stretto legame" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:714 -msgid "If WordPress or any plugin output visible PHP warnings during filtering of a protected image request, the image will not be successfully returned." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:730 -msgid "Allow the delay or expiration of roles based on a specified date range." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:733 -msgid "Allow General Roles and Category Roles to be limited to content dated within in a specified range." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:762 -msgid "Group membership, role restrictions, role assignments and some filtered results (including term listings and WP page, category and bookmark listings) will be stored to disk, on a user-specific or group-specific basis where applicable. This does not cache content such as post listings or page views." -msgstr "I membri del grppo, le limitazioni di ruolo, le assegnazioni di ruolo ed alcuni risultati filtrati (inclusi lista dei termini e le pagine WP, delle categorie e dei segnalibri) saranno immagazzinati nel disco, basati su uno specifico utente o gruppo ove applicabile. Questo non nasconderà il contenuto quali le liste di articoli o le pagine visualizzate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:772 -#, fuzzy -msgid "Note: The internal caching code contains numerous safeguards against corruption. However, if it does become corrupted your site may be inaccessable. For optimal reliability, copy rs_cache_flush.php into your WP root directory so it can be executed directly if needed." -msgstr "Nota: la cache interna potrebbe essere soggetta a corruzione in installazioni multi-autore. Per un ripristino manuale o automatico, copiare rs_cache_flush.php nella vostra cartella radice di WP ed eseguirlo direttamente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:780 -msgid "Flush Cache" -msgstr "Svuota la cache" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:800 -#, php-format -msgid "Role Scoper Version: %s" -msgstr "Versione di Role Scoper: %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:802 -#, php-format -msgid "Database Schema Version: %s" -msgstr "Versione dello schema del database: : %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:804 -#, fuzzy, php-format -msgid "PHP Version: %s" -msgstr "Versione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "never" -msgstr "mai" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "always" -msgstr "sempre" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:833 -msgid "for logged users" -msgstr "per gli utenti autenticati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:841 -msgid "Suffix RSS feed links with an extra parameter to trigger required HTTP authentication. Note that anonymous and cookie-based RSS will still be available via the standard feed URL." -msgstr "Il suffisso dei collegamenti degli RSS feeds con un parametro aggiuntivo da impostare richiede l'autenticazione HTTP. Notare che gli RSS anonimi e basati sui cookies saranno ancora disponibili attraverso il feed URL standard." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:845 -msgid "cannot use HTTP Authentication for RSS Feeds because another plugin has already defined the function \"get_currentuserinfo\"" -msgstr "Non è possibile utilizzare l'Autenticazione HTTP per i Feeds RSS perchè un altro plugin ha già definito la funzione \"get_currentuserinfo\"" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:855 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:870 -msgid "Display" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Full Content" -msgstr "Tutto il contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Excerpt Only" -msgstr "Solo riassunto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:858 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:873 -msgid "Title Only" -msgstr "Solo il titolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:864 -#, fuzzy -msgid "for readable private posts" -msgstr "Modalità di visualizzazione per articoli privati leggibili" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:879 -#, fuzzy -msgid "for readable non-private posts" -msgstr "Modalità di visualizzazione per articoli non privati leggibili" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:884 -msgid "Since some browsers will cache feeds without regard to user login, block RSS content even for qualified users." -msgstr "Dal momento che alcuni browsers inseriscono i feeds nella cache senza riguardo all'autenticazione dell'utente, bloccare il contenuto RSS anche per gli utenti qualificati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:955 -#, php-format -msgid "Enable teaser for %s" -msgstr "Abilita anteprima per %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:977 -#, php-format -msgid "%s:" -msgstr "%s:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "no teaser" -msgstr "nessuna anteprima" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "fixed teaser (specified below)" -msgstr "anteprima fissa (specificata sotto)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "excerpt as teaser" -msgstr "riassunto come anteprima" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:981 -msgid "excerpt or pre-more as teaser" -msgstr "riassunto o pre-more come anteprima" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:981 -#, php-format -msgid "excerpt, pre-more or first %s chars" -msgstr "riassunto o pre-more o i primi %s caratteri" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:991 -msgid "for:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:996 -msgid "anonymous" -msgstr "anonimi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1004 -msgid "logged" -msgstr "autenticato" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1012 -msgid "both" -msgstr "entrambi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1022 -msgid "If content is blocked, display replacement text instead of hiding it completely." -msgstr "Se il contenuto è bloccato, mostra testo di sostituvo invece di nasconderlo completamente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1024 -msgid "Note: the prefix and suffix settings below will always be applied unless the teaser mode is \"no teaser\"." -msgstr "Nota: le impostazioni sottostanti del prefisso e suffisso saranno sempre applicate anche se il modo anteprima sia impostato a \"nessuna anteprima\"." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1046 -#, php-format -msgid "Hide private %s (instead of teasing)" -msgstr "Nascondi %s privati (invece delle anteprime)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1050 -msgid "Hide private content completely, while still showing a teaser for content which is published with restrictions. Note: Private posts hidden in this way will reduce the total number of posts on their \"page\" of a blog listing." -msgstr "Nasconde completamente il contenuto privato, mentre continua a mostrare un'anteprima per il contenuto che sia pubblicato con limitazioni. Nota: Nascondendo gli Articoli privati in questa maniera si ridurrà il numero totale di articoli nella loro \"pagina\" elencata del blog." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "name" -msgstr "nome" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "content" -msgstr "contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1063 -msgid "excerpt" -msgstr "riassunto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "replace with (if using fixed teaser, or no excerpt available):" -msgstr "sostituisci con (se state usando una anteprima fissa, oppure se nessun riassunto è disponibile):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "prefix with:" -msgstr "con prefisso:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1064 -msgid "suffix with:" -msgstr "con suffisso:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1093 -msgid "anonymous users" -msgstr "utenti anonimi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1093 -msgid "logged users" -msgstr "utenti autenticati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1096 -#, php-format -msgid "%1$s Teaser Text (%2$s):" -msgstr "%1$s Testo della anteprima (%2$s):" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1146 -#, php-format -msgid "Idea: For Scheduled Revisions and Pending Revisions functionality that integrates with your RS Roles and Restrictions, install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1169 -msgid "Note: for most installations, the default settings are fine." -msgstr "Nota: per le maggiori installazioni, le impostazioni predefinite sono sufficienti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1209 -msgid "Multiple RS Roles (type-specific, plugin-defined)" -msgstr "Ruoli RS multipli (specificato dal tipo, definito dal plugin)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1209 -msgid "Single WP Role (comprehensive, WP-defined)" -msgstr "Singolo Ruolo WP (comprensivo, definito da WP)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1218 -msgid "Either role type can be scoped (assigned for specific terms or objects). However, RS roles allow finer control. A user's main WordPress role will be applied by default regardless of this selection." -msgstr "Entrambi i tipi di ruolo sono possibili (assegnati per termini specifici od oggetti). Tuttavia, i ruoli di RS consentono un controllo più preciso. Il ruolo di un utente principale di WordPress sarà applicato per impostazione predefinita a prescindere da questa selezione." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1225 -msgid "Some users created under older WP versions may have direct-assigned capabilities in addition to their blog-wide role assignment. This setting does not enable or block that feature, but determines whether Role Scoper must account for it. Disable when possible (capabilities unrelated to RS Role Definitions are irrelevant)." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1246 -#, fuzzy -msgid "Page Authors, Editors and Administrators" -msgstr "Dagli Editori con ampi permessi e gli Amministratori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1246 -#, fuzzy -msgid "Page Editors and Administrators" -msgstr "Dagli Editori con ampi permessi e gli Amministratori" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1246 -#, fuzzy -msgid "Administrators" -msgstr "Amministratori del gruppo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1259 -msgid "Users who do not meet this blog-wide role requirement may still be able to save and/or publish pages, but will not be able to publish a new page with a Page Parent setting of \"Main Page\". Nor will they be able to move a currently published page from \"Main Page\" to a different Page Parent." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1292 -msgid "If enabled, prevents those with edit_users capability from editing a user with a higher level or assigning a role higher than their own." -msgstr "Se attivato, impedisce a quelli con capacità di edit_users di modificare un utente con un più alto livello o l'assegnazione di un ruolo superiore al proprio." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1308 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1423 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Content Administrator" -msgstr "Amministratore del contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1309 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "User Administrator" -msgstr "Amministratore utente" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1310 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Option Administrator" -msgstr "Opzioni Amministratore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1312 -msgid "RS never applies restricting or enabling content filters" -msgstr "RS non applica mai restrizioni o consente filtri di contenuto" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1313 -msgid "RS allows full editing of all user groups and scoped roles / restrictions" -msgstr "RS permette una piena modifica di tutti i gruppi di utenti e i Ruoli possibili / limitazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1314 -msgid "Can edit Role Scoper options" -msgstr "E' possibile modificare le opzioni di Role Scoper" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1316 -msgid "Role Scoper internally checks the following capabilities for content and role administration. By default, these capabilities are all contained in the Administrator role only. You can use the Capability Manager plugin to split/overlap them among different roles as desired." -msgstr "Internamente il Role Scoper controlla le seguenti capacità per i contenuti ed i ruoli di amministrazione. Per predefinito, queste capacità sono tutte comprese soltanto nel Ruolo Amministratore. Potete utilizzare il plugin Capability Manager per dividerle / sovrapporle ai differenti ruoli desiderati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1320 -msgid "Administrator Type" -msgstr "Tipo di Amministratore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1321 -msgid "Required Capability" -msgstr "Capacità richiesta" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1340 -msgid "Each administrator type's capability can be modified by adding any of the following define statements to your wp-config.php:" -msgstr "Ogni capacità del tipo di amministratore può essere modificata con l'aggiunta di qualsiasi delle seguenti dichiarazioni al vostro wp-config.php:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1348 -#, fuzzy -msgid "For example, by using Capability Manager to add a custom capability such as administer_all_content to certain WordPress roles, you could mirror that setting in the SCOPER_CONTENT_ADMIN_CAP definition to ensure that those users are never content-restricted by Role Scoper." -msgstr "Per esempio, utilizzando Capability Manager per aggiungere capacità personalizzate come administer_all_content ad un determinato ruolo di WordPress, si potrebbe volere l'impostazione nella definizione SCOPER_CONTENT_ADMIN_CAP per garantire che gli utenti non abbiano mai contenuti limitati dal Role Scoper, e poter moderare le Revisioni." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1366 -msgid "Remove Edit Form elements with these html IDs from users who do not have full editing capabilities for the post/page. Separate with ;" -msgstr "Rimuovere gli elementi del modulo per la Modifica con questi ID html dagli utenti che non hanno pieni permessi di modifica per gli articoli/pagine. Separare con  ;" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1391 -#, php-format -msgid "%s Edit Form HTML IDs:" -msgstr "%s Modifica il modulo HTML per gli ID:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1401 -#, php-format -msgid "%1$s sample IDs:%2$s %3$s" -msgstr "%1$s modello ID:%2$s %3$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "no requirement" -msgstr "nessun requisito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Contributor / Author / Editor" -msgstr "Contribuente / Autore / Editore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1425 -msgid "Author / Editor" -msgstr "Autore / Editore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1439 -msgid "Note: The above roles are type-specific RS roles (for the object type involved) which must be contained in a user's blog-wide WordPress role." -msgstr "Nota: I ruoli di cui sopra sono Ruoli RS di tipo specifico (per coinvolgere il tipo di oggetto) che deve contenere al suo interno un ruolo utente di WordPress ad ampio-blog." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1458 -#, php-format -msgid "Limit eligible users for %s-specific editing roles" -msgstr "Limite degli utenti eleggibili per ruoli di modifica %s-specifici" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1459 -msgid "Role Scoper can enable any user to edit a post or page you specify, regardless of their blog-wide WordPress role. If that's not a good thing, check above options to require basic editing capability blog-wide or category-wide." -msgstr "Role Scoper può attivare qualsiasi utente a modificare un articolo o pagina da voi specificata, indipendentemente dai loro ruoli di WordPress settati. Se questa non è una buona cosa, controllare le opzioni di cui sopra, che richiedono una capacità basilare di modifica di blog-ampio o ampia-categoria." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1462 -msgid "In the Edit Post/Edit Page roles tabs, decorate user/group name with colors and symbols if they have the role implicitly via group, general role, category role, or a superior post/page role." -msgstr "Nelle schede dei ruoli Modifica Articolo / Modifica Pagina, decorare l' utente / nome del gruppo con colori e simboli, se hanno implicitamente il ruolo attraverso il gruppo, ruolo generale, ruolo di categoria, od un ruolo superiore di Articolo/ Pagina." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1465 -msgid "Display introductory descriptions at the top of various role assignment / definition screens." -msgstr "Mostrare descrizioni introduttive all'inizio delle varie assegnazioni di ruolo / definizione degli schermi." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1468 -msgid "Accept entry of user names or IDs via comma-separated text instead of individual checkboxes." -msgstr "Accetta l'inserimento dei nomi utente o ID attraverso testo separato con una virgola piuttosto che selezionare individualmente ogni opzione." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1486 -#, fuzzy, php-format -msgid "Restrictions column in Edit %s listing" -msgstr "Limitazioni ruoli aggiornate: %d impostazioni" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1489 -#, php-format -msgid "Term Roles column in Edit %s listing" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1492 -#, php-format -msgid "Object Roles column in Edit %s listing" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1535 -#, php-format -msgid "%1$s (normally equivalent to %2$s)" -msgstr "%1$s (solitamente uguale a %2$s)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1542 -msgid "By default, the above roles are not available for object-specific assignment because another role is usually equivalent. However, the distinctions may be useful if you propagate roles to sub-Pages, set Default Roles or customize RS Role Definitions." -msgstr "Per impostazione predefinita, i ruoli di cui sopra non sono disponibili per un'assegnazione specifica dell'oggetto, perché gli altri ruoli (Lettore Privato, Editore) solitamente sono equivalenti. Tuttavia, la distinzione può essere utile se si propagano i ruoli delle sotto-pagine, impostate a Ruoli predefiniti o personalizzate per definizione dei ruoli di RS." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1544 -msgid "Note: Under the default configuration, the tabs labeled \"Reader\" in the Post/Page Edit Form actually assign the corresponding Private Reader role." -msgstr "Nota: nella configurazione predefinita, le voci targate \"Lettore\" nel modulo di modifica degli Articoli/Pagine sono assegnati attualmente al Ruolo di Lettore Privato corrispondente." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1577 -msgid "These optional settings allow advanced users to adjust Role Scoper's sphere of influence. For most installations, the default settings are fine." -msgstr "Queste impostazioni facoltative permettono agli utenti avanzati di regolare l'ambiente o l'influenza di Role Scoper. Per la maggior parte delle installazioni, le impostazioni predefinite sono sufficienti." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1600 -msgid "Specify which WordPress taxonomies can have Restrictions and Roles:" -msgstr "Specificare quale tassonomia di WordPress può avere Limitazioni e Ruoli:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1617 -msgid "Specify whether Restrictions and Roles can be set for individual Objects:" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1645 -msgid "Section" -msgstr "Sezione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1648 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1700 -#, fuzzy, php-format -msgid "%1$s (for %2$s)" -msgstr "Assegna ruoli per %1$s \"%2$s\"" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1714 -msgid "* = Role Assignment only (no Restrictions)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1734 -msgid "Apply Roles and Restrictions for:" -msgstr "Applica Ruoli e Limitazioni per:" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1751 -msgid "Viewing content (front-end)" -msgstr "Visualizzando il contenuto (front-end)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1753 -msgid "Editing and administering content (admin)" -msgstr "Modificando e amministrando il contenuto (amministratore)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1775 -msgid "The "Post Tag" taxonomy cannot be used to define restrictions because tags are not mandatory. For most installations, categories are a better mechanism to define roles. Note that Role Scoper does not filter tag storage based on the editing user's access. As with any other custom-defined taxonomy, use this option at your own discretion." -msgstr "La tassonomia del "Tag di un articolo" non può essere utilizzata per definire le limitazioni perchè i tags non sono obbligatori. Per la maggior parte delle installazioni, le categorie sono un meccanismo migliore per definire i ruoli. Si noti che Role Scoper non filtra l'immagazzinamento dei tags basati sull' accesso dell'utente che può modificare. Come con qualsiasi altra tassonomia personalizzata, utilizzare questa opzione a propria discrezione." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1779 -msgid "By default, WordPress does not support page categories. The corresponding "Role Scopes" option is only meaningful if the WP core or another plugin has added this support." -msgstr "Da impostazione predefinita, Wordpress non supporta le categorie di pagina. L'opzione corrispondente in "Role Scopes" è solo sensato se il WP o un suo plugin ha aggiunto questo supporto." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1815 -msgid "Specify which Role Scoper Options should be applied site-wide." -msgstr "Specificare quali Opzioni di Role Scoper dovrebbero essere applicate al livello di site-wide." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1822 -#, php-format -msgid "sitewide control of \"%s\"" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1827 -msgid "Selected options will be controlled site-wide via Site Admin > Role Options; unselected options can be set per-blog via Roles > Options" -msgstr "Le opzioni selezionate saranno controllate a livello di sito tramite Amministrazione del Sito > Opzioni del Ruolo , le opzioni non selezionate possono essere impostate singolarmente per ogni blog tramite Ruoli> Opzioni " - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1836 -#, fuzzy, php-format -msgid "%1$s (%2$s)" -msgstr "%1$s (%2$s)|option_tabname (explanatory note)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1906 -#, fuzzy -msgid "All settings in this form (including those on undisplayed tabs) will be reset to DEFAULTS. Are you sure?" -msgstr "Tutte le impostazioni in questo modulo (incluse quelle nelle schede non selezionate) saranno azzerate alle impostazioni predefinite. Siete sicuri?" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1911 -msgid "Revert to Defaults" -msgstr "Ritorna al predefinito" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/options.php:1937 -#, php-format -msgid "%s data source" -msgstr "%s sorgente dei dati" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:37 -#, php-format -msgid "Group Roles %1$s(for %2$s)%3$s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:39 -msgid "Group Roles" -msgstr "Ruoli dei gruppi" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:43 -msgid "Scoped Roles" -msgstr "Ruoli di possibilità" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:58 -#, php-format -msgid "Assigned WordPress Role: %s" -msgstr "Ruolo Wordpress assegnato: %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:66 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:123 -#, php-format -msgid "(contains %s)" -msgstr "(contiene %s)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:113 -#, fuzzy, php-format -msgid "%1$sGeneral Role%2$s%4$s: %3$s" -msgstr "Ulteriore %1$sRuolo Generale%2$s: %3$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:115 -#, fuzzy, php-format -msgid "Additional %1$sGeneral Role%2$s%4$s: %3$s" -msgstr "Ulteriore %1$sRuolo Generale%2$s: %3$s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:15 -#, fuzzy -msgid "These roles are defined by Role Scoper (and possibly other plugins) for your use in designating content-specific access or supplemental blog-wide access. Although the default capabilities are ideal for most installations, you may modify them at your discretion." -msgstr "Questi ruoli sono definiti da Role Scoper (e probabilmente da altri plugins) per il vostro utilizzo nel designare l'accesso a specifici contenuti. Anche se le funzionalità predefinite sono ideali per la maggior parte delle installazioni, è possibile modificarli a propria discrezione." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:19 -msgid "Since Role Scoper role definitions pertain to a particular object type, available capabilities are defined by the provider of that object type. WordPress core or plugins can add or revise default role definitions based on available capabilities." -msgstr "Dal momento che le definizioni di ruolo di Role Scoper appartengono ad un particolare tipo di oggetto, le capacità disponibili sono definite dal fornitore di tale tipo di oggetto. WordPress o un suo plugin può aggiungere o revisionare le definizioni di ruolo predefinite basate sulle capacità disponibili." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:23 -msgid "WordPress Role assignments function as a default which may be supplemented or overriden by blog-wide or content-specific assignment of these RS Roles." -msgstr "La funzione di assegnazione dei Ruoli di WordPress come uno predefinito che potrebbe essere integrato o sovrascritto da una assegnazione a contenuto specifico o di ampio-blog di questi Ruoli RS." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:120 -msgid "Capabilities (defaults are bolded)" -msgstr "Capacità (i predefiniti sono in grassetto)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:153 -#, php-format -msgid "Warning: Since the WP %1$s role def lacks some caps selected here, it will be treated as a lesser role if Restrictions are applied." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:165 -#, php-format -msgid "sync WP %1$s
    to these selections (currently includes %2$s)" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:167 -#, php-format -msgid "sync WP %s
    to these selections" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:170 -msgid "note: only the capabilities listed here will be affected" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition.php:217 -msgid "Re-sync with WordPress roles on next Update" -msgstr "Sincronizza con i Ruoli di WordPress al prossimo aggiornamento" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:16 -msgid "Note that only capabilities configured for filtering by Role Scoper are listed here." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:18 -msgid "These WordPress role definitions may be modified via the Capability Manager or Role Manager plugin." -msgstr "Queste definizioni di ruolo di WordPress possono essere modificate attraverso il Gestore di Capacità o il plugin Role Manager." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:23 -msgid "To understand how your WordPress roles relate to type-specific RS Roles, see WP/RS Role Equivalence." -msgstr "Per comprendere come i vostri ruoli di WordPress si riferiscono al tipo specifico dei ruoli di RS, vedere Equivalenza dei ruoli WP/RS." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:32 -msgid "WordPress Roles" -msgstr "Ruoli Wordpress" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:38 -msgid "Capabilities" -msgstr "Capacità" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:78 -msgid "WP / RS Role Equivalence" -msgstr "Equivalenza dei ruoli WP / RS" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:83 -msgid "WP Role" -msgstr "Ruolo WP" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/role_definition_wp.php:84 -msgid "Contained RS Roles" -msgstr "Ruoli RS contenuti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:10 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:10 -msgid "Invalid taxonomy" -msgstr "Tassonomia non valida" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:63 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s (or %4$s-assigned). Corresponding General Roles (whether assigned by WordPress or Role Scoper) are ignored." -msgstr "Riduce l'accesso richiedendo che alcuni ruoli siano assegnati-%1$s%2$s %3$s (o assegnati-%4$s). I ruoli generali corrispondenti (se assegnati da WordPress o Role Scoper) vengono ignorati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:65 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s. Corresponding General Role assignments are ignored." -msgstr "Riduce l'accesso richiedendo che alcuni ruoli siano assegnati-%1$s%2$s %3$s. I ruoli generali corrispondenti assegnati vengono ignorati." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:70 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:89 -#, php-format -msgid "Role definition error (taxonomy: %s)." -msgstr "Errore di definizione del Ruolo (tassonomia: %s)." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:76 -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:95 -#, php-format -msgid "Either you do not have permission to administer any %s, or none exist." -msgstr "O non possiedi permessi sufficienti per amministrare qualsiasi %s, o non ne esistono." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_restrictions.php:153 -#, php-format -msgid "Any %1$s Restriction causes the specified role to be granted only via %1$s Role assignment, regardless of these %2$s settings." -msgstr "Qualsiasi Limitazione %1$s comporta che il ruolo specificato ad essere concesso soltanto attraverso l'assegnazione di Ruolo, a prescindere da queste impostazioni %2$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:81 -#, fuzzy, php-format -msgid "Grant capabilities within a specific %2$s, potentially more than a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "Concende capacità nei limiti di uno specifico %2$s, potenzialmente più di un ruolo utente di WordPress lo permetterebbe. Per ridurre l'accesso, definirne le %1$s%2$s Limitazioni%3$s.|arguments are link open, taxonomy name, link close" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:83 -#, php-format -msgid "Grant capabilities within a specific %s, potentially more than a user's WP role would allow." -msgstr "Capacità di concedere all'interno di uno specifico %s, più di quanto un ruolo WP di un utente permetterebbe." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:172 -msgid "A Role is a collection of capabilities." -msgstr "Un Ruolo è una collezione di capacità" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:176 -msgid "Capabilities in a user's WordPress Role (and, optionally, RS-assigned General Roles) enable blog-wide operations (read/edit/delete) on some object type (post/page/link), perhaps of a certain status (private/published/draft)." -msgstr "Capacità in un Ruolo utente di WordPress (e, facoltativamente, Ruoli Generali assegnati da RS) attiva le operazioni (lettura/modifica/cancellazione) su alcuni tipi di oggetto (articolo/pagina/collegamento), probabilmente a specifici stati (privato/pubblicato/bozza)." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:181 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s or per-%2$s basis. Useful in fencing off sections your site." -msgstr "I ruoli di Scoper possono concedere agli utenti le stesse capacità di WordPress basate su per-%1$s o per-%2$s. Utile per restringere alcune sezioni del vostro sito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:183 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s basis. Useful in fencing off sections your site." -msgstr "I ruoli di Scoper possono concedere agli utenti le stesse capacità di WordPress basate su un per-%1$s. Utile per restringere alcune sezioni del vostro sito." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:187 -#, php-format -msgid "Users with a %1$s Role assignment may have capabilities beyond their General Role(s) for %2$s in the specified %1$s." -msgstr "Utenti con un' assegnazione di ruolo %1$s possono avere capacità maggiori rispetto al/ai ruolo(i) Generale(i) per %2$s all'interno dello specificato %1$s." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:192 -#, php-format -msgid "If a role is restricted for some %s, general (blog-wide) assignments of that role are ignored." -msgstr "Se un ruolo è limitato ad alcuni %s, le assegnazioni generali di quel ruolo sono ignorate." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:196 -#, php-format -msgid "If a %1$s is in multiple %2$s, permission is granted if any %3$s has a qualifying role assignment or permits a qualifying General Role." -msgstr "Se un %1$s è compreso in più %2$s, il permesso è garantito se qualsiasi %3$s ha una qualificata assegnazione di ruolo o permette un Ruolo Generale qualificato." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:205 -#, php-format -msgid "If a role is restricted for some requested %1$s, %2$s-assignment and General-assignment of that role are ignored." -msgstr "Se un ruolo ha dei limiti a qualche richiesta %1$s, l'assegnazione %2$s e l'assegnazione Generale di quel ruolo è ignorata." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/section_roles.php:210 -msgid "Administrators are exempted from Role Restrictions." -msgstr "Gli amministratori sono esentati dalle limitazioni di ruolo" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/update_rs.php:503 -#, php-format -msgid "Pending Revisions were enabled in your previous Role Scoper version. To retain that feature, you need to install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:36 -#, php-format -msgid "A new version of Role Scoper is available (%s)" -msgstr "E' disponibile una nuova versione di Role Scoper (%s)" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:57 -msgid "read more..." -msgstr "leggi tutto..." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:63 -msgid "Read about the update" -msgstr "Leggi riguardo gli aggiornamenti" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:64 -msgid "View full changelog" -msgstr "Visualizza completo changelog" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:70 -msgid "Download for manual install" -msgstr "Collegamento per il download del manuale di installazione" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:115 -#, php-format -msgid "Role Scoper Extensions are available for the following plugins: %s" -msgstr "Le estensioni di Role Scoper sono disponibili per i seguenti plugins: %s" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:190 -msgid "The file cache will not operate because ENABLE_PERSISTENT_CACHE is not defined in wp-config.php or role-scoper.php." -msgstr "La cache del file non opererà perchè nel wp-config.php o nel role-scoper.php non è definita ENABLE_PERSISTENT_CACHE." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:193 -msgid "The file cache will not operate because DISABLE_PERSISTENT_CACHE is defined, possibly in wp-config.php or role-scoper.php." -msgstr "La cache del file non opererà perchè la costante DISABLE_PERSISTENT_CACHE è definita, probabilmente nel wp-config.php o nel role-scoper.php." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:196 -#, php-format -msgid "The file cache cannot operate because the cache directory (%s) is not writeable to WordPress." -msgstr "La cache del file non può operare perchè WordPress non può scrivere nella cartella della cache (%s). " - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:199 -msgid "The file cache cannot operate because PHP is running in safe mode." -msgstr "La cache del file non può operare perchè il PHP sta lavorando in modalità sicura." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:207 -#, php-format -msgid "The file cache cannot operate because file creation attempts fail in %s" -msgstr "La cache del file non può operare perchè i tentativi di creazione del file falliscono in %s " - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/cache-persistent.php:217 -#, php-format -msgid "The file cache cannot operate because file storage attempts fail in %s" -msgstr "La cache del file non può operare perchè i tentativi di immagazzinamento del file falliscono in %s " - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/hardway-admin-legacy_rs.php:105 -#, php-format -msgid "You have %1$s, contained within %2$s and %3$s. %4$s %5$s" -msgstr "" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/hardway/hardway-admin_non-administrator_rs.php:59 -msgid "You do not have permission to select that Category Parent" -msgstr "Non avete permessi per selezionare quella Categoria Genitore" - -#: E:\www\wp29c\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:14 -#, php-format -msgid "%1$s attempted to define a configuration item (%2$s) after the collection was locked." -msgstr "%1$s ha tentato di definire una voce di configurazione (%2$s) dopo che la raccolta era stata bloccata." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:15 -#, php-format -msgid "The calling function probably needs to be registered to a hook. Consult %s developer documentation." -msgstr "La funzione richiamata probabilmente necessita di essere registrata con un hook. Consultare %s la documentazione di sviluppo." - -#: E:\www\wp29c\wp-content\plugins\role-scoper/lib/debug.php:182 -#, php-format -msgid "%1$s queries in %2$s seconds. %3$s MB used." -msgstr "%1$s richieste al database effettuate in %2$s. %3$s MB usati." - -#~ msgid "Lock Top Level Page Structure" -#~ msgstr "Blocca la struttura della pagina di massimo livello" -#~ msgid "" -#~ "If selected, only Administrators can create new top-" -#~ "level pages. Otherwise, top level pages can be created " -#~ "by any user with the edit_pages and " -#~ "edit_others_pages capability in their WordPress Role or " -#~ "RS General Role(s)." -#~ msgstr "" -#~ "se selezionato, solo gli Amministratori possono creare " -#~ "nuovi massimi livelli di Pagine. Altrimenti, le pagine " -#~ "di massimo livello possono essere create da qualsiasi utente con i " -#~ "permessi di edit_pages e edit_others_pages impostati nei loro Ruoli di WordPress o nei Ruoli Generali di RS." -#~ msgid "Email Recipients" -#~ msgstr "Destinatari E-mail:" -#~ msgid "" -#~ "To force a hard disable of this feature, add the following line to wp-" -#~ "config.php:
        define" -#~ "( 'DISABLE_ATTACHMENT_FILTERING', true);
    Then regenerate .htaccess " -#~ "by re-saving your WP permalink settings or de/re-activating Role Scoper." -#~ msgstr "" -#~ "Per disabilitare, aggiungere la seguente linea al wp-config.php:
        define( 'DISABLE_ATTACHMENT_FILTERING', true);
    Quindi ri-creare il file .htaccess aggiornando la struttura dei " -#~ "permalink di WP oppure disattivando e riattivando il plugin Role Scoper." -#~ msgid "No roles are assigned to this group." -#~ msgstr "Nessun ruoli sono stati assegnati a questo gruppo." -#~ msgid "Post Reader|role" -#~ msgstr "Lettore di articolo|role" -#~ msgid "Categ. Roles" -#~ msgstr "Ruoli di Categorie" -#~ msgid "Taxonomy Usage" -#~ msgstr "Utilizzo tassonomia" -#~ msgid "Role Scopes" -#~ msgstr "Role Scopes" -#~ msgid "Term Restrictions and Roles" -#~ msgstr "Limitazioni e Ruoli del Termine" -#~ msgid "Object Restrictions and Roles" -#~ msgstr "Limitazioni e Ruoli degli Oggetti" -#~ msgid "Notify on Version Updates." -#~ msgstr "Notifica gli aggiornamenti di versione" -#~ msgid "" -#~ "WordPress core allows users to be granted individual blog-wide " -#~ "capabilities, in addition to their blog-wide role assignment." -#~ msgstr "" -#~ "WordPress permette agli utenti di concedere singole capacità di livello " -#~ "blog-wide, in aggiunta alla loro assegnazione di ruolo." - -#, fuzzy -#~ msgid "%1$s Restrictions and Roles for %2$s" -#~ msgstr "Limitazioni e Ruoli del Termine" - -#, fuzzy -#~ msgid "%1$s Restrictions and Roles" -#~ msgstr "Limitazioni e Ruoli del Termine" - -#, fuzzy -#~ msgid "%s post" -#~ msgstr "%s Ruoli" - -#, fuzzy -#~ msgid "%s pending post" -#~ msgstr "Articolo in attesa" - -#, fuzzy -#~ msgid "%s pending page" -#~ msgstr "Pagina in attesa" - diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper.mo b/blog/wp-content/plugins/role-scoper/languages/scoper.mo deleted file mode 100644 index bf5e87c..0000000 Binary files a/blog/wp-content/plugins/role-scoper/languages/scoper.mo and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/languages/scoper.po b/blog/wp-content/plugins/role-scoper/languages/scoper.po deleted file mode 100644 index 861be22..0000000 --- a/blog/wp-content/plugins/role-scoper/languages/scoper.po +++ /dev/null @@ -1,2610 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Role Scoper 1.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-27 12:51-0500\n" -"PO-Revision-Date: \n" -"Last-Translator: Kevin Behrens\n" -"Language-Team: agapetry \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-Basepath: E:\\www\\mu28\\wp-content\\plugins\\role-scoper\\\n" -"X-Poedit-KeywordsList: __;_e;_c;__ngettext;_n;scoper_po_trigger;_x\n" -"X-Poedit-SearchPath-0: E:\\www\\mu28\\wp-content\\plugins\\role-scoper\n" -"X-Poedit-SearchPath-1: E:\\www\\mu28\\wp-content\\plugins\\role-scoper\\admin\n" -"X-Poedit-SearchPath-2: E:\\www\\mu28\\wp-content\\plugins\\role-scoper\\hardway\n" -"X-Poedit-SearchPath-3: E:\\www\\mu28\\wp-content\\plugins\\role-scoper\\lib\n" - -#: E:\www\mu28\wp-content\plugins\role-scoper/data_sources_rs.php:26 -msgid "Term" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/data_sources_rs.php:26 -msgid "Terms" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:95 -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:112 -msgid "Sorry, this content requires additional permissions. Please contact an administrator for help." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:96 -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:113 -msgid "Sorry, you don't have access to this content. Please log in or contact a site administrator for help." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:109 -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:126 -msgid "note: This content requires a higher login level." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:110 -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:127 -msgid "note: This content requires site login." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:166 -msgid "front-end" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:167 -msgid "admin" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:390 -msgid "Link" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:416 -msgid "Group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:417 -msgid "Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/defaults_rs.php:491 -msgid "Link Category" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/feed-interceptor_rs.php:57 -msgid "Access denied: Incorrect credentials supplied." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/role-scoper.php:37 -#, php-format -msgid "Error: Multiple copies of Role Scoper activated. Only version %1$s (in folder \"%2$s\") is functional." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:8 -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Post Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:14 -msgid "Private Post Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:17 -msgid "Post Contributor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:20 -msgid "Post Author" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:23 -msgid "Post Revisor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:27 -msgid "Post Publisher" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:29 -msgid "Post Editor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:32 -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Page Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:35 -msgid "Private Page Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:38 -msgid "Page Associate" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:41 -msgid "Page Contributor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:44 -msgid "Page Author" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:47 -msgid "Page Revisor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:51 -msgid "Page Publisher" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:53 -msgid "Page Editor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:56 -msgid "Link Admin" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:59 -msgid "Category Manager" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:62 -msgid "Group Manager" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:75 -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Readers" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:79 -msgid "Private Readers" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:83 -msgid "Contributors" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:87 -msgid "Authors" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:91 -msgid "Revisors" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:96 -msgid "Publishers" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:98 -msgid "Editors" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:101 -msgid "Associates" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:105 -msgid "Admins" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:109 -msgid "Managers" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:122 -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -msgid "Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:126 -msgid "Pvt Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:130 -msgid "Contrib" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:134 -msgid "Author" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:138 -msgid "Revisor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:143 -msgid "Publisher" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:145 -msgid "Editor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:148 -msgid "Assoc" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:152 -msgid "Admin" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles-strings_rs.php:156 -msgid "Manager" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/roles_rs.php:387 -msgid "Anonymous Reader" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/teaser_rs.php:263 -#, php-format -msgid "%s..." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:31 -msgid "unselfish, benevolent love, born of the Spirit." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:33 -msgid "Agapé discerns needs and meets them unselfishly and effectively." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:36 -#, php-format -msgid "This WordPress plugin is part of my agapé try, a lifelong effort to love God and love people by rightly using the time and abilities He has leant me. As a husband, father, engineer, farmer and/or software developer, I have found this stewardship effort to be often fraught with contradiction. A wise and sustainable balancing of roles has seemed to elude me. Yet I want to keep trying, trusting that if God blesses and multiplies the effort, it will become agapetry, a creative arrangement motivated by benevolent love. A fleeting childlike sketch of the beautiful %1$s chain-breaking agapé%2$s which %3$s Jesus Christ unleashed%4$s so %5$s freely%6$s and aptly on an enslaving, enslaved world." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:38 -#, php-format -msgid "Although Role Scoper's development was a maniacal hermit-like effort, it was only possible because of the clean and flexible %1$s WordPress code base%2$s. My PHP programming skills grew immensely by the good examples set forth there and in plugins such as %3$s NextGen Gallery%4$s. I'm not done learning, and look forward to some real-time cooperation with these and other developers now that my all-consuming quest has reached a stable plateau." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:40 -#, php-format -msgid "Thanks to %1$sAlberto Ramicciotti%2$s for the Italian translation. I do try to be translator-friendly, but any untranslated captions are due to my flurry of recent additions and changes, and will no doubt be updated soon. Now there must be someone else who wants Role Scoper in their language..." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:42 -#, php-format -msgid "Role Scoper is open source software released under the %1$s General Public License (GPL)%2$s. Due to limitations, obligations and non-technical aspirations common to most human beings, I will probably never again pursue uncommissioned plugin development on the scale Role Scoper has required. However, I do plan to provide some free support, correct bugs which emerge and revise the plugin for future WordPress versions. If it adds value to your website or saves you time and money, you can express appreciation in several ways:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:44 -#, php-format -msgid "%1$s Submit technical feedback%2$s, including improvement requests." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:46 -#, php-format -msgid "%1$s Submit a case study%2$s, explaining how Role Scoper helps you do something excellent and praiseworthy." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:48 -#, php-format -msgid "%1$s Localize Role Scoper%2$s to your own language %3$s using poEdit%4$s " -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:52 -#, php-format -msgid "If the plugin has seriously broadened your CMS horizons, %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:54 -#, php-format -msgid "If you are an established web developer, %1$s grant me your professional opinion%2$s on how this work stacks up. Might the skills, work ethic and values I express here fit into a development team near you?" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/about.php:56 -msgid "Hire or refer my services to design, redesign or enhance your site - quality care at reasonable rates." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:48 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:667 -msgid "Users or Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:57 -msgid "User / Group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:59 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:262 -msgid "User" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:90 -msgid "Select Assignment Mode" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:107 -msgid "Select Restriction Mode" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:115 -msgid "Review and Submit" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:152 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1061 -msgid "Update »" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:160 -#, php-format -msgid "Select %s to Modify" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:174 -msgid "Set Role Duration and/or Content Date Limits (optional)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:184 -msgid "Select Roles to Assign / Remove" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:189 -msgid "Select Roles to Modify" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:254 -#, php-format -msgid "Error: no %s were selected!" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:260 -msgid "Error: no roles were selected!" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:339 -#, php-format -msgid "%d user" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:341 -#, php-format -msgid "%d group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:349 -#, php-format -msgid "%d role selection" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:352 -#, php-format -msgid "Role Assignments Updated: %1$s for %2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:356 -#, php-format -msgid "Role Restrictions Updated: %d setting" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:506 -msgid "unselect all roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:511 -msgid "hide users" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:515 -msgid "show users" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:521 -msgid "hide groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:525 -msgid "show groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:531 -msgid "hide roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:535 -msgid "show roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:561 -msgid "hide unmodified items" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:564 -msgid "hide defaulted" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:566 -msgid "hide unassigned" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:577 -msgid "items" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:580 -#, php-format -msgid "include the newest %s with default restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:582 -#, php-format -msgid "include the newest %s with no role assignments" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:586 -msgid "show defaulted" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:588 -msgid "show unassigned" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:602 -msgid "collapse all" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:613 -msgid "expand all" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:620 -#, php-format -msgid "Note: %1$s with default restrictions will not be listed here unless they are among the %2$s newest." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:622 -#, php-format -msgid "Note: %1$s with no role assignments will not be listed here unless they are among the %2$s newest." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:680 -msgid "prev" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:681 -msgid "next" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:690 -#, php-format -msgid "Current %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:694 -msgid "Current Restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:724 -msgid "top" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:726 -msgid "show all" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:736 -#, php-format -msgid "DEFAULTS for new %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:738 -#, php-format -msgid "DEFAULTS for all %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:755 -msgid "edit roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:757 -#, php-format -msgid "edit %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:815 -#, php-format -msgid "id %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1068 -msgid "select / unselect all:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1069 -msgid "Actions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-bulk_rs.php:1090 -#, php-format -msgid "(all %s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:11 -msgid "Pending Post" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin-dashboard_rs.php:29 -msgid "Pending Page" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:53 -msgid "Role Duration specifies the time period in which a role is active." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:58 -msgid "Content Date Limits narrow the content which the role applies to." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:77 -msgid "Modify Role Duration" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:85 -msgid "Grant Role on:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:90 -msgid "Expire Role on:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:112 -msgid "Modify Content Date Limits" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:118 -msgid "Min Content Date:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:123 -msgid "Max Content Date:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:135 -msgid "This controls what limits to apply to the User / Group roles you select for creation or modification. Currently stored limits are indicated by a colored background behind the User or Group name. For details, hover over the name or view the User or Group Profile." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:238 -#, php-format -msgid "%1$s%2$s, %3$s @ %4$s : %5$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-bulk_rs.php:266 -msgid "keep current setting" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:393 -msgid "Role Scoper Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:7 -msgid "Role Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Scoper Option Defaults" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib-mu_rs.php:21 -msgid "Role Defaults" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:219 -#, php-format -msgid "[WP %s]" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:222 -msgid "[Anonymous]" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:233 -#, php-format -msgid "All users with the WordPress role of %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_lib_rs.php:236 -msgid "Anonymous users (not logged in)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:114 -#, php-format -msgid "assign role for this %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:115 -#, php-format -msgid "assign role for sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:168 -#, php-format -msgid "%1$s Role Scoper Documentation%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:169 -#, php-format -msgid "%1$s Role Scoper Support Forum%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:254 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:259 -msgid "Role Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "User Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:268 -msgid "Default Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:275 -msgid "Group Members" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:382 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:400 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:405 -msgid "Restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:383 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:401 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:403 -msgid "Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:390 -msgid "Role Restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:417 -msgid "General" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:458 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:530 -#, php-format -msgid "%s Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:470 -#, php-format -msgid "%s restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:539 -#, php-format -msgid "%s Restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About Role Scoper" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:553 -msgid "About" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:569 -msgid "Attachment Utility" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_rs.php:637 -msgid "Object Role Edit" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:152 -#, php-format -msgid "TO START on %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:153 -#, php-format -msgid "started on %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:154 -#, php-format -msgid "EXPIRED on %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:155 -#, php-format -msgid "expire on %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:157 -#, php-format -msgid "(for content %1$s to %2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:158 -#, php-format -msgid "(for content after %1$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:159 -#, php-format -msgid "(for content before %1$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:234 -#, php-format -msgid "Restricted for %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:235 -#, php-format -msgid "Unrestricted for %1$s, Restricted for sub-%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:236 -#, php-format -msgid "Restricted for selected and sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:237 -msgid "Unrestricted by default" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:238 -msgid "Unrestricted" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:241 -#, php-format -msgid "Unrestricted for %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:242 -#, php-format -msgid "Unrestricted for sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:243 -#, php-format -msgid "Unrestricted for selected and sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:244 -msgid "Restricted by default" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:245 -msgid "Restricted" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Groupname" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:263 -msgid "Username" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:269 -msgid "Users / Groups Key" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:276 -#, php-format -msgid "%1$s has role assigned for the specified %2$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:281 -#, php-format -msgid "%1$s has role assigned for the specified %2$s and, by default, for all its sub-%3$s. (Propagated roles can also be explicitly removed)." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:286 -#, php-format -msgid "%1$s does NOT have role assigned for the specified %2$s, but has it by default for sub-%3$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:291 -#, php-format -msgid "%1$s has this role via propagation from parent %2$s, and by default for sub-%3$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:296 -msgid "Role Name" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:297 -#, php-format -msgid "role is restricted for specified %s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:308 -msgid "Scroll to current settings:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:380 -#, php-format -msgid "Category Roles for WordPress pages are disabled for this blog. Object Roles can be assigned to individual pages, and optionally propagated to sub-pages." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:384 -#, php-format -msgid "Another option is to categorise pages via the Page Category Plus plugin." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:435 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/admin_ui_lib_rs.php:438 -msgid "Main Page (no parent)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:28 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:32 -#, php-format -msgid "%1$s define user groups%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:30 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:34 -#, php-format -msgid "Note: To assign roles to user groups, first %1$s define the group(s)%2$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:71 -#, php-format -msgid "Actions: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:81 -msgid "Key:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:90 -msgid "Enter additional Group Names or IDs (comma-separate)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:90 -msgid "Enter additional User Names or IDs (comma-separate)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:96 -msgid "Enter additional Group Names or IDs for Subpages" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:96 -msgid "Enter additional User Names or IDs for Subpages" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:162 -#, php-format -msgid "show current groups (%d)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:162 -#, php-format -msgid "show eligible groups (%d)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:164 -#, php-format -msgid "show current users (%d)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:164 -#, php-format -msgid "show eligible users (%d)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:184 -msgid "filter:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:193 -msgid "select" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:198 -msgid "unselect" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:204 -msgid "propagate" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:209 -msgid "unpropagate" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:218 -#, php-format -msgid "current groups (%d):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:218 -#, php-format -msgid "eligible groups (%d):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:220 -#, php-format -msgid "current users (%d):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:220 -#, php-format -msgid "eligible users (%d):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:229 -msgid "object" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:232 -msgid "objects" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:475 -#, php-format -msgid "inherited from parent %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:479 -msgid "has via other role" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:483 -msgid "has via group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:487 -msgid "has via other scope" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:491 -#, php-format -msgid "propagate to sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/agents_checklist_rs.php:495 -#, php-format -msgid "%1$sEdit date limits%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:17 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because your WP_CONTENT_DIR is not in the WordPress branch." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:19 -msgid "The operation was terminated due to an invalid configuration." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:48 -#, php-format -msgid "checking %s posts / pages..." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:87 -#, php-format -msgid "skipping unfilterable file in %1$s \"%2$s\": %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:129 -#, php-format -msgid "new attachment in %1$s \"%2$s\": %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:135 -#, php-format -msgid "attachment OK in %1$s \"%2$s\": %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:151 -#, php-format -msgid "Operation complete: %s linked uploads were found in your post / page content." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:154 -#, php-format -msgid "%s attachment records were added to the database." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:156 -msgid "All linked uploads are already registered as attachments." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:168 -msgid "Attachments Utility" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:171 -#, php-format -msgid "Back to %1$sRole Scoper Options%2$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:184 -msgid "Role Scoper can limit direct URL access to files linked from your posts and pages, but only if the following requirements are met:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:186 -msgid "Your WP content directory must be a branch of the WordPress directory tree (i.e. wp-config.php must not be customized to separate WP_CONTENT_DIR and WP_CONTENT_URL from the main WordPress folder)." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:192 -msgid "Note that to be detected as attachments, your file references must include www." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:194 -msgid "Note that to be detected as attachments, your file references must NOT include www." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:199 -#, php-format -msgid "Files linked from WP Posts and Pages must be in %1$s (or a subdirectory of it) to be filtered. After moving files, you may use %2$s a search and replace plugin%3$s to conveniently update the URLs stored in your Post / Page content. %4$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:201 -msgid "Files which are already appropriately located and linked must also have their post-file attachment relationship stored to the WP database. This is normally accomplished by clicking the \"Insert into Post\" button in the WP file uploader / Media Library. Files which were instead uploaded manually via FTP or CPanel can receive their attachment record via this utility." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/attachments_utility.php:210 -msgid "Register File Attachments »" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:8 -msgid "see notes" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:30 -#, php-format -msgid "Default Groups Updated: %s groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:44 -msgid "No default groups defined." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:66 -msgid "No groups defined." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:72 -msgid "Notes" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:74 -msgid "Each new user will be added to the default groups. Existing users are not affected." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/default_groups.php:77 -msgid "Use default groups only if you need the ability to manually remove a user from one of the groups later. To affect all users (or all users of a certain WP role), assign roles to the corresponding [WP role] group instead." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:400 -#, php-format -msgid "The page %s was saved, but the new Page Parent setting was discarded. You do not have permission to disassociate it from the Main Page." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:402 -#, php-format -msgid "The Page Parent setting for %s was reverted to the previously stored value. You do not have permission to associate it with the Main Page." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-save_rs.php:416 -#, php-format -msgid "The page %s cannot be published because you do not have permission to associate it with the Main Page. Please select a different Page Parent and try again." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:43 -msgid "Restrict" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:48 -msgid "Term Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:67 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui-listing_rs.php:69 -msgid "Read" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:170 -msgid "Role Scoper Plugin CSS:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Role Scoper" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:193 -msgid "Support Forum" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/filters-admin-ui_rs.php:227 -msgid "Note: Role Manager settings determine each user's default blog-wide capabilities. Since the Role Scoper plugin is also enabled, Term-specific or Object-specific Role Assignments may increase or decrease a user's actual capabilities." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:177 -msgid "Assign" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:177 -msgid "Remove" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:180 -msgid "Assign General Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:184 -msgid "Supplement any user's blog-wide WordPress Role with additional, type-specific role(s). This does not alter the WordPress role." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:210 -msgid "Confirm and Submit" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:264 -msgid "select all roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:291 -msgid "hide empty" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/general_roles.php:333 -#, php-format -msgid "Modify role assignments for %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:42 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:93 -msgid "Please specify a name for the group." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:44 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:96 -#, php-format -msgid "A group with the name %s already exists." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:47 -#, php-format -msgid "Group %s created successfuly." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:64 -msgid "This meta group is automatically populated. You cannot manually edit it." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:101 -#, php-format -msgid "Group %s updated successfuly." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:103 -#, php-format -msgid "Group %s was not updated successfuly." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:119 -msgid "Group Deleted." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:121 -msgid "Invalid group. No groups were deleted." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:130 -msgid "Group edit canceled." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:152 -#, php-format -msgid "%d member deleted." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:157 -#, php-format -msgid "%d member added." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:195 -msgid "add new" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:196 -msgid "set defaults" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:197 -msgid "browse members" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:203 -msgid "By creating User Groups, you can assign RS roles to multiple users. Note that group membership itself has no effect on the users until you assign roles to the group." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:211 -#, php-format -msgid "You are about to delete the group %s. Do you wish to continue?" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:274 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:82 -msgid "No groups available." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:294 -msgid "Create New Group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:310 -#, php-format -msgid "Edit Group: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:371 -#, php-format -msgid "Group Administrators %1$s(via login to %2$s)%3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/groups.php:373 -msgid "Group Administrators" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:22 -#, php-format -msgid "%s group membership updated." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:27 -msgid "Invalid group." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:32 -msgid "Group members edit canceled." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:68 -msgid "(automatic)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:70 -msgid "(no users)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:93 -msgid "This meta group is automatically populated. You cannot manually add members to it." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/group_members.php:96 -#, php-format -msgid "Edit members of %s group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:267 -#, php-format -msgid "Restrict for %1$s (only selected users/groups are %2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:278 -#, php-format -msgid "Restrict for Sub-%1$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:442 -msgid "restricted role" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:446 -#, php-format -msgid "%s user" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:452 -#, php-format -msgid "%s group" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:569 -msgid "Category Restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/item_roles_ui_rs.php:579 -msgid "Category Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:10 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:10 -msgid "Invalid data source" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:66 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and %5$s Role assignments are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:68 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and Section Role assignments are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:70 -#, php-format -msgid "Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General Role assignments are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:85 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:89 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:97 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:101 -#, php-format -msgid "for selected %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:90 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:102 -#, php-format -msgid "for sub-%s of selected" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:91 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:103 -#, php-format -msgid "for selected and sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Restrict selected roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:94 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:106 -msgid "Unrestrict selected roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:202 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:211 -#, php-format -msgid "To edit all roles for any %1$s, click on the %1$s name." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:206 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:215 -#, php-format -msgid "To edit the %s via its default editor, click on the ID link." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_restrictions.php:211 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:220 -#, php-format -msgid "To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:68 -#, php-format -msgid "Expand access to a %2$s, potentially beyond what a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:88 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:120 -#, php-format -msgid "Assign for selected %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:89 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:121 -#, php-format -msgid "Assign for sub-%s of selected" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles.php:90 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:122 -#, php-format -msgid "Assign for selected and sub-%s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles_list.php:206 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles_list.php:208 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:212 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:214 -#, php-format -msgid "%1$s Roles%2$s:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles_list.php:217 -msgid "ID" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_roles_list.php:219 -msgid "Role Assignments" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_role_edit.php:21 -msgid "You do not have permission to assign roles for this object." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_role_edit.php:29 -msgid "Object Roles Updated." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/object_role_edit.php:36 -#, php-format -msgid "Assign Roles for %1$s \"%2$s\"" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:126 -msgid "Role Scoper options were reset to defaults." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:129 -msgid "The persistent cache was flushed." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:131 -msgid "Role Scoper options were updated." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Features" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Advanced" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:155 -msgid "Realm" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "RS Role Definitions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "WP Role Definitions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:156 -msgid "Option Scope" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:161 -msgid "Front End" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:162 -msgid "Pages Listing" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:163 -msgid "Categories Listing" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:164 -msgid "Content Maintenance" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:165 -msgid "File Filtering" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:166 -msgid "Role Date Limits" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:167 -msgid "Internal Cache" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:168 -msgid "Version" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:169 -msgid "RSS Feeds" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:170 -msgid "Hidden Content Teaser" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:173 -msgid "Role Basis" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:174 -msgid "Role Type" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:175 -msgid "Page Structure" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:176 -msgid "User Profile" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:177 -msgid "User Management" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:178 -msgid "Administrator Definition" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:179 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:247 -msgid "Limited Editing Elements" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:180 -msgid "Role Assignment Interface" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:181 -msgid "Custom Columns" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:182 -msgid "Additional Object Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:185 -msgid "Term / Object Scope" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:186 -msgid "Term Scope" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:187 -msgid "Object Scope" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:188 -msgid "Access Types" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:201 -msgid "Cache roles and groups to disk" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:202 -msgid "Enabled" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:203 -msgid "Apply Group Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:204 -msgid "Apply User Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:205 -msgid "Within any scope, each user or group has:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:206 -msgid "Support WP Custom User Caps" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:207 -msgid "Assume No Front-end Admin" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:208 -msgid "Indicate blended roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:209 -msgid "Notify on Version Updates" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:211 -msgid "Suppress \"Private:\" Caption" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:212 -msgid "Display Administrative Hints" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:213 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1430 -msgid "Specified element IDs also require the following blog-wide Role:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:214 -msgid "Roles and Restrictions can be set:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:215 -msgid "HTTP Authentication Request in RSS Feed Links" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:216 -msgid "Display mode for readable private posts" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:217 -msgid "Display mode for readable non-private posts" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:218 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:903 -msgid "Feed Replacement Text (use %permalink% for post URL)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:225 -msgid "Pages can be set or removed from Top Level by:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:226 -msgid "Display User Groups" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:227 -msgid "Display User Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:228 -msgid "Users CSV Entry" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:229 -msgid "Non-editors see other users' unattached uploads" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:230 -msgid "Remap pages to visible ancestor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:231 -msgid "Enforce actual page depth" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:232 -msgid "Remap through excluded page parent" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:233 -msgid "Remap terms to visible ancestor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:234 -msgid "Enforce actual term depth" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:235 -msgid "Remap through excluded term parent" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:236 -msgid "Limit User Edit by Level" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:237 -msgid "Filter Uploaded File Attachments" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:238 -msgid "Share groups site-wide" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:239 -msgid "Enable Role Duration Limits" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:240 -msgid "Enable Content Date Limits" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:241 -msgid "Filter Users Dropdown" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:242 -msgid "Restrictions Column" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:243 -msgid "Term Roles Column" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:244 -msgid "Object Roles Column" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:246 -msgid "Enable" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:248 -msgid "Limit eligible users for object-specific editing roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:249 -msgid "Include Private Pages in listing if user can read them" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:250 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:251 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:253 -msgid "settings" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:347 -msgid "Role Scoper Site Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:349 -msgid "Role Scoper Default Blog Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:351 -msgid "Role Scoper Blog Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:367 -msgid "These settings will be applied to all blogs." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:373 -msgid "These are the default settings for options which can be adjusted per-blog." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:457 -msgid "This page enables optional adjustment of Role Scoper's features. For most installations, the default settings are fine." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:466 -#, php-format -msgid "Note that, depending on your configuration, %1$s blog-specific options%2$s may also be available." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:473 -#, php-format -msgid "Note that, depending on your configuration, %1$s site-wide options%2$s may also be available." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:499 -msgid "If enabled, each user group will be available for role assignment in any blog. Any existing blog-specific groups will be unavailable. Group role assignments are still blog-specific." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:515 -msgid "Remove the \"Private:\" and \"Protected\" prefix from Post, Page titles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:518 -msgid "Reduce memory usage for front-end access by assuming no content, categories or users will be created or edited there. Worst case scenario if you assume wrong: manually assign roles/restrictions to new content or re-sync user roles via plugin re-activation." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:533 -#, php-format -msgid "Include Private %s in listing if user can read them" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:534 -msgid "Determines whether administrators, editors and users who have been granted access to a private page will see it in their sidebar or topbar page listing." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:537 -msgid "If a page's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:542 -msgid "When remapping page parents, apply any depth limits to the actual depth below the requested root page. If disabled, depth limits apply to apparant depth following remap." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:548 -msgid "Remap a page to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_pages / list_pages call." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:566 -msgid "If a category's parent is not visible to the user, it will be listed below a visible grandparent instead." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:571 -msgid "When remapping category parents, apply any depth limits to the actual depth below the requested root category. If disabled, depth limits apply to apparant depth following remap." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:577 -msgid "Remap a category to next visible ancestor even if some hidden ancestors were explicitly excluded in the get_terms / get_categories call." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:598 -#, php-format -msgid "Default new %s to Private visibility" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:599 -msgid "Note: this does not apply to Quickposts or XML-RPC submissions." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:603 -#, php-format -msgid "Auto-set %s to Private visibility if Reader role is restricted" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:604 -msgid "Note: this is only done if the Reader role is restricted via Post/Page edit form." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:620 -msgid "by the Author or Editor of any Post/Category/Page" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:620 -msgid "by blog-wide Editors and Administrators" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:620 -msgid "by Content Administrators only" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:620 -msgid "by User Administrators only" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:632 -msgid "Specify which users can assign and restrict roles for their content - via Post/Page Edit Form or Roles/Restrictions sidebar menu. For a description of Administrator roles, see the Advanced tab." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:639 -msgid "If enabled, users who are not blog-wide Editors will see only their own unattached uploads in the Media Library." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:642 -msgid "If enabled, Post Author and Page Author selection dropdowns will be filtered based on scoped roles." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:665 -msgid "Note: Direct access to uploaded file attachments will not be filtered because DISABLE_ATTACHMENT_FILTERING is defined, perhaps in wp-config.php or role-scoper.php" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:677 -msgid "Note: Direct access to uploaded file attachments will not be filtered due to your nonstandard UPLOADS path." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:682 -msgid "Note: Direct access to uploaded file attachments cannot be filtered because WordPress permalinks are set to default." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:697 -msgid "Block direct URL access to images and other uploaded files in the WordPress uploads folder which are attached to post(s)/page(s) that the user cannot read. A separate RewriteRule will be added to your .htaccess file for each protected file. Non-protected files are returned with no script execution whatsoever." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:702 -msgid "Note: The default WP-MU file request script, wp-content/blogs.php, requires a patch for compatibility with RS file filtering. If you need the advanced cache control provided by blogs.php, review the notes in role-scoper/mu_wp_content_optional/blogs.php and copy it into wp-content if desired. Otherwise, files will be accessed directly via header redirect following RS filtering. If you decide to install the patched blogs.php, add the following line to wp-config.php:
        define( 'SCOPER_MU_FILE_PROCESSING', true);" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:715 -#, php-format -msgid "Note: FTP-uploaded files will not be filtered correctly until you run the %1$sAttachments Utility%2$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:718 -msgid "If WordPress or any plugin output visible PHP warnings during filtering of a protected image request, the image will not be successfully returned." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:734 -msgid "Allow the delay or expiration of roles based on a specified date range." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:737 -msgid "Allow General Roles and Category Roles to be limited to content dated within in a specified range." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:766 -msgid "Group membership, role restrictions, role assignments and some filtered results (including term listings and WP page, category and bookmark listings) will be stored to disk, on a user-specific or group-specific basis where applicable. This does not cache content such as post listings or page views." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:776 -msgid "Note: The internal caching code contains numerous safeguards against corruption. However, if it does become corrupted your site may be inaccessable. For optimal reliability, copy rs_cache_flush.php into your WP root directory so it can be executed directly if needed." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:784 -msgid "Flush Cache" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:804 -#, php-format -msgid "Role Scoper Version: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:806 -#, php-format -msgid "Database Schema Version: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:808 -#, php-format -msgid "PHP Version: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:837 -msgid "never" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:837 -msgid "always" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:837 -msgid "for logged users" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:845 -msgid "Suffix RSS feed links with an extra parameter to trigger required HTTP authentication. Note that anonymous and cookie-based RSS will still be available via the standard feed URL." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:849 -msgid "cannot use HTTP Authentication for RSS Feeds because another plugin has already defined the function \"get_currentuserinfo\"" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:860 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:877 -msgid "Display" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:863 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:880 -msgid "Full Content" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:863 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:880 -msgid "Excerpt Only" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:863 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:880 -msgid "Title Only" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:870 -msgid "for readable private posts" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:887 -msgid "for readable non-private posts" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:892 -msgid "Since some browsers will cache feeds without regard to user login, block RSS content even for qualified users." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:963 -#, php-format -msgid "Enable teaser for %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:985 -#, php-format -msgid "%s:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:989 -msgid "no teaser" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:989 -msgid "fixed teaser (specified below)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:989 -msgid "excerpt as teaser" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:989 -msgid "excerpt or pre-more as teaser" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:989 -#, php-format -msgid "excerpt, pre-more or first %s chars" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1000 -msgid "for:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1005 -msgid "anonymous" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1013 -msgid "logged" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1021 -msgid "both" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1031 -msgid "If content is blocked, display replacement text instead of hiding it completely." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1033 -msgid "Note: the prefix and suffix settings below will always be applied unless the teaser mode is \"no teaser\"." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1055 -#, php-format -msgid "Hide private %s (instead of teasing)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1059 -msgid "Hide private content completely, while still showing a teaser for content which is published with restrictions. Note: Private posts hidden in this way will reduce the total number of posts on their \"page\" of a blog listing." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1072 -msgid "name" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1072 -msgid "content" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1072 -msgid "excerpt" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1073 -msgid "replace with (if using fixed teaser, or no excerpt available):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1073 -msgid "prefix with:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1073 -msgid "suffix with:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1102 -msgid "anonymous users" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1102 -msgid "logged users" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1105 -#, php-format -msgid "%1$s Teaser Text (%2$s):" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1155 -#, php-format -msgid "Idea: For Scheduled Revisions and Pending Revisions functionality that integrates with your RS Roles and Restrictions, install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1178 -msgid "Note: for most installations, the default settings are fine." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1218 -msgid "Multiple RS Roles (type-specific, plugin-defined)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1218 -msgid "Single WP Role (comprehensive, WP-defined)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1227 -msgid "Either role type can be scoped (assigned for specific terms or objects). However, RS roles allow finer control. A user's main WordPress role will be applied by default regardless of this selection." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1234 -msgid "Some users created under older WP versions may have direct-assigned capabilities in addition to their blog-wide role assignment. This setting does not enable or block that feature, but determines whether Role Scoper must account for it. Disable when possible (capabilities unrelated to RS Role Definitions are irrelevant)." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1255 -msgid "Page Authors, Editors and Administrators" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1255 -msgid "Page Editors and Administrators" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1255 -msgid "Administrators" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1268 -msgid "Users who do not meet this blog-wide role requirement may still be able to save and/or publish pages, but will not be able to publish a new page with a Page Parent setting of \"Main Page\". Nor will they be able to move a currently published page from \"Main Page\" to a different Page Parent." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1301 -msgid "If enabled, prevents those with edit_users capability from editing a user with a higher level or assigning a role higher than their own." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1317 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1432 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "Content Administrator" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1318 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "User Administrator" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1319 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "Option Administrator" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1321 -msgid "RS never applies restricting or enabling content filters" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1322 -msgid "RS allows full editing of all user groups and scoped roles / restrictions" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1323 -msgid "Can edit Role Scoper options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1325 -msgid "Role Scoper internally checks the following capabilities for content and role administration. By default, these capabilities are all contained in the Administrator role only. You can use the Capability Manager plugin to split/overlap them among different roles as desired." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1329 -msgid "Administrator Type" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1330 -msgid "Required Capability" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1349 -msgid "Each administrator type's capability can be modified by adding any of the following define statements to your wp-config.php:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1357 -msgid "For example, by using Capability Manager to add a custom capability such as administer_all_content to certain WordPress roles, you could mirror that setting in the SCOPER_CONTENT_ADMIN_CAP definition to ensure that those users are never content-restricted by Role Scoper." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1375 -msgid "Remove Edit Form elements with these html IDs from users who do not have full editing capabilities for the post/page. Separate with ;" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1400 -#, php-format -msgid "%s Edit Form HTML IDs:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1410 -#, php-format -msgid "%1$s sample IDs:%2$s %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "no requirement" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "Contributor / Author / Editor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1434 -msgid "Author / Editor" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1448 -msgid "Note: The above roles are type-specific RS roles (for the object type involved) which must be contained in a user's blog-wide WordPress role." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1467 -#, php-format -msgid "Limit eligible users for %s-specific editing roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1468 -msgid "Role Scoper can enable any user to edit a post or page you specify, regardless of their blog-wide WordPress role. If that's not a good thing, check above options to require basic editing capability blog-wide or category-wide." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1471 -msgid "In the Edit Post/Edit Page roles tabs, decorate user/group name with colors and symbols if they have the role implicitly via group, general role, category role, or a superior post/page role." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1474 -msgid "Display introductory descriptions at the top of various role assignment / definition screens." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1477 -msgid "Accept entry of user names or IDs via comma-separated text instead of individual checkboxes." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1495 -#, php-format -msgid "Restrictions column in Edit %s listing" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1498 -#, php-format -msgid "Term Roles column in Edit %s listing" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1501 -#, php-format -msgid "Object Roles column in Edit %s listing" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1544 -#, php-format -msgid "%1$s (normally equivalent to %2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1551 -msgid "By default, the above roles are not available for object-specific assignment because another role is usually equivalent. However, the distinctions may be useful if you propagate roles to sub-Pages, set Default Roles or customize RS Role Definitions." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1553 -msgid "Note: Under the default configuration, the tabs labeled \"Reader\" in the Post/Page Edit Form actually assign the corresponding Private Reader role." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1586 -msgid "These optional settings allow advanced users to adjust Role Scoper's sphere of influence. For most installations, the default settings are fine." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1609 -msgid "Specify which WordPress taxonomies can have Restrictions and Roles:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1626 -msgid "Specify whether Restrictions and Roles can be set for individual Objects:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1654 -msgid "Section" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1658 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1711 -#, php-format -msgid "%1$s (for %2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1725 -msgid "* = Role Assignment only (no Restrictions)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1745 -msgid "Apply Roles and Restrictions for:" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1762 -msgid "Viewing content (front-end)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1764 -msgid "Editing and administering content (admin)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1786 -msgid "The "Post Tag" taxonomy cannot be used to define restrictions because tags are not mandatory. For most installations, categories are a better mechanism to define roles. Note that Role Scoper does not filter tag storage based on the editing user's access. As with any other custom-defined taxonomy, use this option at your own discretion." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1790 -msgid "By default, WordPress does not support page categories. The corresponding "Role Scopes" option is only meaningful if the WP core or another plugin has added this support." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1826 -msgid "Specify which Role Scoper Options should be applied site-wide." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1833 -#, php-format -msgid "sitewide control of \"%s\"" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1838 -msgid "Selected options will be controlled site-wide via Site Admin > Role Options; unselected options can be set per-blog via Roles > Options" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1847 -#, php-format -msgid "%1$s (%2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1918 -msgid "All settings in this form (including those on undisplayed tabs) will be reset to DEFAULTS. Are you sure?" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1923 -msgid "Revert to Defaults" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/options.php:1949 -#, php-format -msgid "%s data source" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:37 -#, php-format -msgid "Group Roles %1$s(for %2$s)%3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:39 -msgid "Group Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:43 -msgid "Scoped Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:58 -#, php-format -msgid "Assigned WordPress Role: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:66 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:123 -#, php-format -msgid "(contains %s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:113 -#, php-format -msgid "%1$sGeneral Role%2$s%4$s: %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/profile_ui_rs.php:115 -#, php-format -msgid "Additional %1$sGeneral Role%2$s%4$s: %3$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:15 -msgid "These roles are defined by Role Scoper (and possibly other plugins) for your use in designating content-specific access or supplemental blog-wide access. Although the default capabilities are ideal for most installations, you may modify them at your discretion." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:19 -msgid "Since Role Scoper role definitions pertain to a particular object type, available capabilities are defined by the provider of that object type. WordPress core or plugins can add or revise default role definitions based on available capabilities." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:23 -msgid "WordPress Role assignments function as a default which may be supplemented or overriden by blog-wide or content-specific assignment of these RS Roles." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:120 -msgid "Capabilities (defaults are bolded)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:153 -#, php-format -msgid "Warning: Since the WP %1$s role def lacks some caps selected here, it will be treated as a lesser role if Restrictions are applied." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:172 -#, php-format -msgid "sync WP %1$s
    to these selections (currently includes %2$s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:174 -#, php-format -msgid "sync WP %s
    to these selections" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:177 -msgid "note: only the capabilities listed here will be affected" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition.php:224 -msgid "Re-sync with WordPress roles on next Update" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:16 -msgid "Note that only capabilities configured for filtering by Role Scoper are listed here." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:18 -msgid "These WordPress role definitions may be modified via the Capability Manager or Role Manager plugin." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:23 -msgid "To understand how your WordPress roles relate to type-specific RS Roles, see WP/RS Role Equivalence." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:32 -msgid "WordPress Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:38 -msgid "Capabilities" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:78 -msgid "WP / RS Role Equivalence" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:83 -msgid "WP Role" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/role_definition_wp.php:84 -msgid "Contained RS Roles" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:10 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:10 -msgid "Invalid taxonomy" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:63 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s (or %4$s-assigned). Corresponding General Roles (whether assigned by WordPress or Role Scoper) are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:65 -#, php-format -msgid "Reduce access by requiring some role(s) to be %1$s%2$s-assigned%3$s. Corresponding General Role assignments are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:70 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:90 -#, php-format -msgid "Role definition error (taxonomy: %s)." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:76 -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:96 -#, php-format -msgid "Either you do not have permission to administer any %s, or none exist." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_restrictions.php:153 -#, php-format -msgid "Any %1$s Restriction causes the specified role to be granted only via %1$s Role assignment, regardless of these %2$s settings." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:82 -#, php-format -msgid "Grant capabilities within a specific %2$s, potentially more than a user's WP role would allow. To reduce access, define %1$s%2$s Restrictions%3$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:84 -#, php-format -msgid "Grant capabilities within a specific %s, potentially more than a user's WP role would allow." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:173 -msgid "A Role is a collection of capabilities." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:177 -msgid "Capabilities in a user's WordPress Role (and, optionally, RS-assigned General Roles) enable blog-wide operations (read/edit/delete) on some object type (post/page/link), perhaps of a certain status (private/published/draft)." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:182 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s or per-%2$s basis. Useful in fencing off sections your site." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:184 -#, php-format -msgid "Scoped Roles can grant users these same WordPress capabilities on a per-%1$s basis. Useful in fencing off sections your site." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:188 -#, php-format -msgid "Users with a %1$s Role assignment may have capabilities beyond their General Role(s) for %2$s in the specified %1$s." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:193 -#, php-format -msgid "If a role is restricted for some %s, general (blog-wide) assignments of that role are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:197 -#, php-format -msgid "If a %1$s is in multiple %2$s, permission is granted if any %3$s has a qualifying role assignment or permits a qualifying General Role." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:206 -#, php-format -msgid "If a role is restricted for some requested %1$s, %2$s-assignment and General-assignment of that role are ignored." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/section_roles.php:211 -msgid "Administrators are exempted from Role Restrictions." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/update_rs.php:494 -#, php-format -msgid "Pending Revisions were enabled in your previous Role Scoper version. To retain that feature, you need to install %1$s Revisionary%2$s, another %3$s Agapetry Creations%4$s plugin." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:36 -#, php-format -msgid "A new version of Role Scoper is available (%s)" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:57 -msgid "read more..." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:63 -msgid "Read about the update" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:64 -msgid "View full changelog" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:70 -msgid "Download for manual install" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/admin/misc/version_notice_rs.php:115 -#, php-format -msgid "Role Scoper Extensions are available for the following plugins: %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:190 -msgid "The file cache will not operate because ENABLE_PERSISTENT_CACHE is not defined in wp-config.php or role-scoper.php." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:193 -msgid "The file cache will not operate because DISABLE_PERSISTENT_CACHE is defined, possibly in wp-config.php or role-scoper.php." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:196 -#, php-format -msgid "The file cache cannot operate because the cache directory (%s) is not writeable to WordPress." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:199 -msgid "The file cache cannot operate because PHP is running in safe mode." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:207 -#, php-format -msgid "The file cache cannot operate because file creation attempts fail in %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/cache-persistent.php:217 -#, php-format -msgid "The file cache cannot operate because file storage attempts fail in %s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/hardway-admin-legacy_rs.php:105 -#, php-format -msgid "You have %1$s, contained within %2$s and %3$s. %4$s %5$s" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/hardway/hardway-admin_non-administrator_rs.php:59 -msgid "You do not have permission to select that Category Parent" -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:14 -#, php-format -msgid "%1$s attempted to define a configuration item (%2$s) after the collection was locked." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/lib/agapetry_config_items.php:15 -#, php-format -msgid "The calling function probably needs to be registered to a hook. Consult %s developer documentation." -msgstr "" - -#: E:\www\mu28\wp-content\plugins\role-scoper/lib/debug.php:182 -#, php-format -msgid "%1$s queries in %2$s seconds. %3$s MB used." -msgstr "" - diff --git a/blog/wp-content/plugins/role-scoper/lib/agapetry_config_items.php b/blog/wp-content/plugins/role-scoper/lib/agapetry_config_items.php deleted file mode 100644 index 9566f60..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/agapetry_config_items.php +++ /dev/null @@ -1,182 +0,0 @@ -locked) ) { - $notice = sprintf(__('%1$s attempted to define a configuration item (%2$s) after the collection was locked.'), $defining_module_name, $name) - . '

    ' . sprintf(__('The calling function probably needs to be registered to a hook. Consult %s developer documentation.', 'scoper'), $defining_module_name); - rs_notice($notice); - return; - } - - // Restrict characters in member key / object name. A display_name property is available where applicable. - $name = preg_replace( '/[^0-9_a-zA-Z]/', '_', $name ); - - if ( ! isset($this->members[$name]) ) - $this->members[$name] = new AGP_Config_Item($name, $defining_module_name, $args); - - return $this->members[$name]; - } - - function process( &$src ) { - return; - } - - function remove($name) { - if ( isset($this->members[$name]) ) - unset ($this->members[$name]); - } - - function add_member_objects($arr) { - if ( ! is_array($arr) ) - return; - - if ( ! empty($this->locked) ) { - rs_notice('Config items cannot not be added at this time. Maybe the calling function must be registered to a hook. Consult developer documentation.'); - return; - } - - foreach ( array_keys($arr) as $key ) { - // Restrict characters in member key / object name. A display_name property is available where applicable. - $key = preg_replace( '/[^0-9_a-zA-Z]/', '_', $key ); - - if ( ! isset($arr[$key]->name) ) - // copy key into name property - $arr[$key]->name = $key; - else - $arr[$key]->name = preg_replace('/[^0-9_a-zA-Z]/', '_', $arr[$key]->name); - } - - $this->members = array_merge($this->members, $arr); - - $this->process_added_members($arr); - } - - function process_added_members($arr) { - if ( method_exists($this, 'process') ) // call descendant method, if it exists - foreach (array_keys($arr) as $name ) - $this->process($this->members[$name]); - } - - // accepts object or name as argument, returns valid object or null - function get($obj_or_name) { - if ( is_object($obj_or_name) ) - return $obj_or_name; - - // $obj_or_name must actually be the object name - if ( isset($this->members[$obj_or_name]) ) - return $this->members[$obj_or_name]; - } - - // accepts object or name as argument, returns valid object or null - function &get_ref($obj_or_name) { - if ( is_object($obj_or_name) ) - return $obj_or_name; - - // $obj_or_name must actually be the object name - if ( isset($this->members[$obj_or_name]) ) - return $this->members[$obj_or_name]; - } - - function get_all() { - return $this->members; - } - - function get_all_keys() { - return array_keys($this->members); - } - - function is_member($name) { - return isset($this->members[$name]); - } - - // Potential use of alias property in RS Data Source definition to indicate where - // a 3rd party plugin uses a taxonomy->object_type property different from the src_name we define - function is_member_alias($alias) { - foreach ( array_keys($this->members) as $name ) - if ( isset($this->members[$name]->alias) && ( $alias == $this->members[$name]->alias ) ) - return $name; - } - - function member_property() { // $name, $property, $key1 = '', $key2 = '', $key3 = '' ... - $args = func_get_args(); - - if ( ! is_string($args[0]) ) { - // todo: confirm this isn't needed anymore - return; - } - - if ( ! isset( $this->members[$args[0]] ) ) - return; - - if ( ! isset( $this->members[$args[0]]->$args[1] ) ) - return; - - $val = $this->members[$args[0]]->$args[1]; - - // if additional args were passed in, treat them as array or object keys - for ( $i = 2; $i < count($args); $i++ ) { - if ( is_array($val) ) { - if ( isset($val[ $args[$i] ]) ) - $val = $val[ $args[$i] ]; - else - return; - - } elseif ( is_object($val) ) { - if ( isset($val->$args[$i]) ) - $val = $val->$args[$i]; - else - return; - } - } - - return $val; - } - - function remove_members_by_key($disabled, $require_value = false) { - if ( ! is_array($disabled) ) - return; - - if ( $require_value ) { - foreach ( array_keys($disabled) as $key ) - if ( ! $disabled[$key] ) - unset($disabled[$key]); - - if ( ! $disabled ) - return; - } - - $this->members = array_diff_key($this->members, $disabled); - } - - function remove_members($disabled) { - $this->members = array_diff_key($this->members, array_flip($disabled) ); - } - - function lock() { - $this->locked = true; - } -} - -class AGP_Config_Item { - var $name; - var $defining_module_name; - - function AGP_Config_Item ( $name, $defining_module_name, $args = '' ) { - $this->name = $name; - $this->defining_module_name = $defining_module_name; - - if ( is_array($args) ) - foreach($args as $key => $val) - $this->$key = $val; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/agapetry_lib.php b/blog/wp-content/plugins/role-scoper/lib/agapetry_lib.php deleted file mode 100644 index acc0142..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/agapetry_lib.php +++ /dev/null @@ -1,97 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_admin_lib.php b/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_admin_lib.php deleted file mode 100644 index f0e4387..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_admin_lib.php +++ /dev/null @@ -1,41 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_core_lib.php b/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_core_lib.php deleted file mode 100644 index e8b6f0f..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_core_lib.php +++ /dev/null @@ -1,180 +0,0 @@ -') ) { - // If global $wp_version has been wiped by WP Security Scan plugin, temporarily restore it by re-including version.php - if ( file_exists (ABSPATH . WPINC . '/version.php') ) { - include ( ABSPATH . WPINC . '/version.php' ); - $return = version_compare($wp_version, $wp_ver_requirement, '>='); - $wp_version = $cache_wp_ver; // restore previous wp_version setting, assuming it was cleared for security purposes - return $return; - } else - // Must be running a future version of WP which doesn't use version.php - return true; - } - - // normal case - global $wp_version has not been tampered with - return version_compare($cache_wp_ver, $wp_ver_requirement, '>='); -} -} - -// TODO: move these function to core-admin_lib.php, update extensions accordingly -if ( ! function_exists('awp_plugin_info_url') ) { -function awp_plugin_info_url( $plugin_slug ) { - $url = ( awp_ver('2.7') ) ? get_option('siteurl') . "/wp-admin/plugin-install.php?tab=plugin-information&plugin=$plugin_slug" : "http://wordpress.org/extend/plugins/$plugin_slug"; - return $url; -} -} - -if ( ! function_exists('awp_plugin_update_url') ) { -function awp_plugin_update_url( $plugin_file ) { - $url = wp_nonce_url("update.php?action=upgrade-plugin&plugin=$plugin_file", "upgrade-plugin_$plugin_file"); - return $url; -} -} - -if ( ! function_exists('awp_plugin_search_url') ) { -function awp_plugin_search_url( $search, $search_type = 'tag' ) { - $wp_org_dir = 'tags'; - - $url = ( awp_ver('2.7') ) ? get_option('siteurl') . "/wp-admin/plugin-install.php?tab=search&type=$search_type&s=$search" : "http://wordpress.org/extend/plugins/$wp_org_dir/$search"; - return $url; -} -} - - -if ( ! function_exists('awp_is_mu') ) { -function awp_is_mu() { - global $wpdb, $wpmu_version; - - return ( function_exists('get_current_site_name') || ! empty($wpmu_version) || ( ! empty( $wpdb->base_prefix ) && ( $wpdb->base_prefix != $wpdb->prefix ) ) ); -} -} - -// returns true GMT timestamp -if ( ! function_exists('agp_time_gmt') ) { -function agp_time_gmt() { - return strtotime( gmdate("Y-m-d H:i:s") ); -} -} - -// date_i18n does not support pre-1970 dates, as of WP 2.8.4 -if ( ! function_exists('agp_date_i18n') ) { -function agp_date_i18n( $datef, $timestamp ) { - if ( $timestamp >= 0 ) - return date_i18n( $datef, $timestamp ); - else - return date( $datef, $timestamp ); -} -} - - -// equivalent to current_user_can, -// except it supports array of reqd_caps, supports non-current user, and does not support numeric reqd_caps -// -// set object_id to 'blog' to suppress any_object_check and any_term_check -if ( ! function_exists('awp_user_can') ) { -function awp_user_can($reqd_caps, $object_id = 0, $user_id = 0, $args = array() ) { - // $args supports 'skip_revision_allowance'. For now, skip array_merge with defaults, for perf - - if ( function_exists('is_site_admin') && is_site_admin() ) - return true; - - if ( $user_id ) - $user = new WP_User($user_id); // don't need Scoped_User because only using allcaps property (which contain WP blogcaps). flt_user_has_cap will instantiate new WP_Scoped_User based on the user_id we pass - else - $user = wp_get_current_user(); - - if ( empty($user) ) - return false; - - $reqd_caps = (array) $reqd_caps; - $check_caps = $reqd_caps; - foreach ( $check_caps as $cap_name ) { - if ( $meta_caps = map_meta_cap($cap_name, $user->ID, $object_id) ) { - $reqd_caps = array_diff( $reqd_caps, array($cap_name) ); - $reqd_caps = array_unique( array_merge( $reqd_caps, $meta_caps ) ); - } - } - - if ( defined( 'RVY_VERSION' ) && ! empty( $args['skip_revision_allowance'] ) ) { - global $revisionary; - $revisionary->skip_revision_allowance = true; // this will affect the behavior of Role Scoper's user_has_cap filter - } - - if ( 'blog' == $object_id ) { - global $scoper; - if ( isset($scoper) ) { // if this is being called with Scoper loaded, any_object_check won't be called anyway - $scoper->cap_interceptor->skip_any_object_check = true; - $scoper->cap_interceptor->skip_any_term_check = true; - $scoper->cap_interceptor->skip_id_generation = true; - } - } - - $_args = ( 'blog' == $object_id ) ? array( $reqd_caps, $user->ID, 0 ) : array( $reqd_caps, $user->ID, $object_id ); - - $capabilities = apply_filters('user_has_cap', $user->allcaps, $reqd_caps, $_args); - - if ( ('blog' == $object_id) && isset($scoper) ) { - $scoper->cap_interceptor->skip_any_object_check = false; - $scoper->cap_interceptor->skip_any_term_check = false; - $scoper->cap_interceptor->skip_id_generation = false; - } - - if ( ! empty( $args['skip_revision_allowance'] ) ) - $revisionary->skip_revision_allowance = false; - - foreach ($reqd_caps as $cap_name) { - if( empty($capabilities[$cap_name]) || ! $capabilities[$cap_name] ) { - // if we're about to fail due to a missing create_child_pages cap, honor edit_pages cap as equivalent - // TODO: abstract this with cap_defs property - if ( 'create_child_pages' == $cap_name ) { - $alternate_cap_name = 'edit_pages'; - $_args = array( array($alternate_cap_name), $user->ID, $object_id ); - $capabilities = apply_filters('user_has_cap', $user->allcaps, array($alternate_cap_name), $_args); - - if( empty($capabilities[$alternate_cap_name]) || ! $capabilities[$alternate_cap_name] ) - return false; - } else - return false; - } - } - - return true; -} -} - -// WP < 2.8 does not define get_site_option(). This is also a factor for non-mu installations, which will use the blog-specific options table anyway -if ( ! awp_ver( '2.8' ) && ! function_exists('get_site_option') ) { -function get_site_option( $key, $default = false, $use_cache = true ) { - return get_option($key, $default); -} -} - -// WP < 2.8 does not define add_site_option(). This is also a factor for non-mu installations, which will use the blog-specific options table anyway -if ( ! awp_ver( '2.8' ) && ! function_exists('add_site_option') ) { -function add_site_option( $key, $value ) { - return update_option($key, $value); -} -} - -// wrapper for __(), prevents WP strings from being forced into plugin .po -if ( ! function_exists( '__awp' ) ) { -function __awp( $string, $unused = '' ) { - return __( $string ); -} -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_lib.php b/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_lib.php deleted file mode 100644 index c193e9c..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/agapetry_wp_lib.php +++ /dev/null @@ -1,67 +0,0 @@ -query_vars['attachment_id']) || ! empty($wp_query->query_vars['attachment']); -} - -function awp_administrator_roles() { - // WP roles containing the 'activate plugins' capability are always honored regardless of object or term restritions - global $wp_roles; - $admin_roles = array(); - - if ( isset($wp_roles->roles) ) { - $admin_cap_name = ( defined( 'SCOPER_CONTENT_ADMIN_CAP' ) ) ? constant( 'SCOPER_CONTENT_ADMIN_CAP' ) : 'activate_plugins'; - - foreach (array_keys($wp_roles->roles) as $wp_role_name) - if ( ! empty($wp_roles->roles[$wp_role_name]['capabilities']) ) - if ( array_intersect_key($wp_roles->roles[$wp_role_name]['capabilities'], array($admin_cap_name => 1) ) ) { - $role_handle = scoper_get_role_handle( $wp_role_name, 'wp' ); - $admin_roles = array_merge($admin_roles, array($role_handle => $wp_role_name) ); - } - } - - return $admin_roles; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/ancestry_lib_rs.php b/blog/wp-content/plugins/role-scoper/lib/ancestry_lib_rs.php deleted file mode 100644 index 7bbeb33..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/ancestry_lib_rs.php +++ /dev/null @@ -1,130 +0,0 @@ -taxonomies->get($taxonomy) ) - return $option_value; - - if ( empty($tx->source->cols->parent) || empty($tx->source->cols->id) ) - return $option_value; - - $col_id = $tx->source->cols->id; - $col_parent = $tx->source->cols->parent; - - $children = array(); - - $terms = $scoper->get_terms($taxonomy, UNFILTERED_RS); - - foreach ( $terms as $term ) - if ( $term->$col_parent ) - $children[$term->$col_parent][] = $term->$col_id; - - update_option("{$taxonomy}_children_rs", $children); - - return $children; - } - - // note: rs_get_page_children() is no longer used internally by Role scoper - function get_page_children() { - $children = array(); - - global $wpdb; - if ( $pages = scoper_get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type != 'revision'") ) { - foreach ( $pages as $page ) - if ( $page->post_parent ) - $children[$page->post_parent][] = $page->ID; - } - - return $children; - } - - function _walk_ancestors($child_id, $ancestors, $parents) { - if ( isset($parents[$child_id]) ) { - if ( in_array( $parents[$child_id], $ancestors ) ) // prevent infinite recursion if a page has a descendant set as its parent page - return $ancestors; - - $ancestors []= $parents[$child_id]; - $ancestors = ScoperAncestry::_walk_ancestors($parents[$child_id], $ancestors, $parents); - } - return $ancestors; - } - - - function get_page_ancestors() { - $ancestors = get_option("scoper_page_ancestors"); - - if ( is_array($ancestors) ) - return $ancestors; - - $ancestors = array(); - - global $wpdb; - if ( $pages = scoper_get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type != 'revision'") ) { - $parents = array(); - foreach ( $pages as $page ) - if ( $page->post_parent ) - $parents[$page->ID] = $page->post_parent; - - foreach ( $pages as $page ) { - $ancestors[$page->ID] = ScoperAncestry::_walk_ancestors($page->ID, array(), $parents); - if ( empty( $ancestors[$page->ID] ) ) - unset( $ancestors[$page->ID] ); - } - - update_option("scoper_page_ancestors", $ancestors); - } - - return $ancestors; - } - - function get_term_ancestors($taxonomy) { - $ancestors = get_option("{$taxonomy}_ancestors_rs"); - - if ( is_array($ancestors) ) - return $ancestors; - - global $scoper; - - $tx = $scoper->taxonomies->get($taxonomy); - $col_id = $tx->source->cols->id; - $col_parent = $tx->source->cols->parent; - - $terms = $scoper->get_terms($taxonomy, UNFILTERED_RS); - - $ancestors = array(); - - if ( $terms ) { - $parents = array(); - - foreach ( $terms as $term ) - if ( $term->$col_parent ) - $parents[$term->$col_id] = $term->$col_parent; - - foreach ( $terms as $term ) { - $term_id = $term->$col_id; - $ancestors[$term_id] = ScoperAncestry::_walk_ancestors($term_id, array(), $parents); - if ( empty( $ancestors[$term_id] ) ) - unset( $ancestors[$term_id] ); - } - - update_option("{$taxonomy}_ancestors_rs", $ancestors); - } - - return $ancestors; - } - -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/debug.php b/blog/wp-content/plugins/role-scoper/lib/debug.php deleted file mode 100644 index 81ea54d..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/debug.php +++ /dev/null @@ -1,195 +0,0 @@ - $val) if($val === $new) $vname = $key; - $var = $old; - - echo "
    ";
    -    if($info != FALSE) echo "$info:
    "; - do_dump($var, $display_objects, '$'.$vname); - echo "
    "; -} -} - -//////////////////////////////////////////////////////// -// Function: do_dump -// Inspired from: PHP.net Contributions -// Description: Better GI than print_r or var_dump - -if ( ! function_exists('do_dump') ) { -function do_dump(&$var, $display_objects = true, $var_name = NULL, $indent = NULL, $reference = NULL) -{ - $do_dump_indent = "|    "; - $reference = $reference.$var_name; - $keyvar = 'the_do_dump_recursion_protection_scheme'; $keyname = 'referenced_object_name'; - - if (is_array($var) && isset($var[$keyvar])) - { - $real_var = &$var[$keyvar]; - $real_name = &$var[$keyname]; - $type = ucfirst(gettype($real_var)); - echo "$indent$var_name $type = &$real_name
    "; - } - else - { - $var = array($keyvar => $var, $keyname => $reference); - $avar = &$var[$keyvar]; - - $type = ucfirst(gettype($avar)); - if($type == "String") $type_color = ""; - elseif($type == "Integer") $type_color = ""; - elseif($type == "Double"){ $type_color = ""; $type = "Float"; } - elseif($type == "Boolean") $type_color = ""; - elseif($type == "NULL") $type_color = ""; - - if(is_array($avar)) - { - $count = count($avar); - echo "$indent" . ($var_name ? "$var_name => ":"") . "$type ($count)
    $indent(
    "; - $keys = array_keys($avar); - foreach($keys as $name) - { - $value = &$avar[$name]; - do_dump($value, $display_objects, "['$name']", $indent.$do_dump_indent, $reference); - } - echo "$indent)
    "; - } - elseif(is_object($avar)) - { - echo "$indent$var_name $type
    $indent(
    "; - if ( $display_objects ) - foreach($avar as $name=>$value) do_dump($value, $display_objects, "$name", $indent.$do_dump_indent, $reference); - echo "$indent)
    "; - } - elseif(is_int($avar)) echo "$indent$var_name = $type(".strlen($avar).") $type_color$avar

    "; - elseif(is_string($avar)) { - if ( false !== strpos($avar, '<') ) - echo "$indent$var_name = $type(".strlen($avar). ") $type_color\"" . htmlspecialchars($avar) . "\"

    "; - else - echo "$indent$var_name = $type(".strlen($avar).") $type_color\"$avar\"

    "; - } - elseif(is_float($avar)) echo "$indent$var_name = $type(".strlen($avar).") $type_color$avar

    "; - elseif(is_bool($avar)) echo "$indent$var_name = $type(".strlen($avar).") $type_color".($avar == 1 ? "TRUE":"FALSE")."

    "; - elseif(is_null($avar)) echo "$indent$var_name = $type(".strlen($avar).") {$type_color}NULL
    "; - else echo "$indent$var_name = $type(".strlen($avar).") $avar
    "; - - $var = $var[$keyvar]; - } -} -} - -if ( ! function_exists('awp_usage_message') ) { -function awp_usage_message( $translate = true ) { - if ( function_exists('memory_get_usage') ) { - if ( $translate ) - return sprintf( __('%1$s queries in %2$s seconds. %3$s MB used.', 'scoper'), get_num_queries(), round(timer_stop(0), 1), round( memory_get_usage() / (1024 * 1024), 3), 'scoper' ) . ' '; - else - return get_num_queries() . ' queries in ' . round(timer_stop(0), 1) . ' seconds. ' . round( memory_get_usage() / (1024 * 1024), 3) . ' MB used. '; - } -} -} - -if ( ! function_exists('awp_echo_usage_message') ) { -function awp_echo_usage_message( $translate = true ) { - echo awp_usage_message( $translate ); -} -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/debug_shell.php b/blog/wp-content/plugins/role-scoper/lib/debug_shell.php deleted file mode 100644 index 274eccf..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/debug_shell.php +++ /dev/null @@ -1,40 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/php4support_rs.php b/blog/wp-content/plugins/role-scoper/lib/php4support_rs.php deleted file mode 100644 index 8ac891f..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/php4support_rs.php +++ /dev/null @@ -1,83 +0,0 @@ - $v) - if (array_key_exists($key, $array)) - unset($result[$key]); - - return $result; - } -} - -if (!function_exists('array_intersect_key')) { - //http://us.php.net/manual/en/function.array-intersect-key.php#74956 - function array_intersect_key($isec, $keys) { - $argc = func_num_args(); - if ($argc > 2) { - for ($i = 1; !empty($isec) && $i < $argc; $i++) { - $arr = func_get_arg($i); - foreach (array_keys($isec) as $key) - if (!isset($arr[$key])) - unset($isec[$key]); - } - - return $isec; - - } else { - $res = array(); - foreach (array_keys($isec) as $key) - if (isset($keys[$key])) - $res[$key] = $isec[$key]; - - return $res; - } - } -} - -if (! function_exists("array_fill_keys")) { -function array_fill_keys($keys, $fill_val) { - $newarray = array(); - - foreach($keys as $key) - $newarray[$key] = $fill_val; - - return $newarray; -} -} - -if (! function_exists("array_combine")) { -// http://us.php.net/manual/en/function.array-combine.php#74412 -// Combines two associate arrays by making a array with the key being $a1 and the value $a2. - function array_combine($a1,$a2) { - $ra = array(); - - reset($a2); - - foreach ( array_keys($a1) as $a1_key ) { - $ra[ $a1_key ] = $a2[ key($a2) ]; - next( $a2 ); - } - - if(isset($ra)) return $ra; else return false; - } -} - -if (! function_exists("htmlspecialchars_decode")) { -// http://us.php.net/manual/en/function.htmlspecialchars-decode.php#82133 -// thomas at xci[ignore_this]teit dot commm - function htmlspecialchars_decode($string,$style=ENT_COMPAT) - { - $translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS,$style)); - if($style === ENT_QUOTES){ $translation['''] = '\''; } - return strtr($string,$translation); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/lib/revisions_lib_rs.php b/blog/wp-content/plugins/role-scoper/lib/revisions_lib_rs.php deleted file mode 100644 index 1866d8b..0000000 --- a/blog/wp-content/plugins/role-scoper/lib/revisions_lib_rs.php +++ /dev/null @@ -1,43 +0,0 @@ - 'DESC', 'orderby' => 'post_modified_gmt', 'use_memcache' => true, 'fields' => COLS_ALL_RS, 'return_flipped' => false ); - $args = wp_parse_args( $args, $defaults ); - extract( $args ); - - if ( COL_ID_RS == $fields ) { - // performance opt for repeated calls by user_has_cap filter - if ( $use_memcache ) { - static $last_results; - - if ( ! isset($last_results) ) - $last_results = array(); - - elseif ( isset($last_results[$post_id][$status]) ) - return $last_results[$post_id][$status]; - } - - $revisions = scoper_get_col("SELECT $fields FROM $wpdb->posts WHERE post_type = 'revision' AND post_parent = '$post_id' AND post_status = '$status'"); - - if ( $return_flipped ) - $revisions = array_fill_keys( $revisions, true ); - - if ( $use_memcache ) { - if ( ! isset($last_results[$post_id]) ) - $last_results[$post_id] = array(); - - $last_results[$post_id][$status] = $revisions; - } - - } else { - $order_clause = ( $order && $orderby ) ? "ORDER BY $orderby $order" : ''; - $revisions = scoper_get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'revision' AND post_parent = '$post_id' AND post_status = '$status' $order_clause"); - } - - return $revisions; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/mu-init_rs.php b/blog/wp-content/plugins/role-scoper/mu-init_rs.php deleted file mode 100644 index 294a288..0000000 --- a/blog/wp-content/plugins/role-scoper/mu-init_rs.php +++ /dev/null @@ -1,145 +0,0 @@ - true, - 'define_usergroups' => true, - 'enable_group_roles' => true, - 'enable_user_roles' => true, - 'role_type' => true, - 'custom_user_blogcaps' => true, - 'enable_wp_taxonomies' => true, - 'no_frontend_admin' => true, - 'indicate_blended_roles' => true, - 'version_update_notice' => true, - 'version_check_minutes' => true, - - 'rs_page_reader_role_objscope' => true, - 'rs_page_author_role_objscope' => true, - 'rs_post_reader_role_objscope' => true, - 'rs_post_author_role_objscope' => true, - 'rs_page_revisor_role_objscope' => true, - 'rs_post_revisor_role_objscope' => true, - - 'display_user_profile_groups' => true, - 'display_user_profile_roles' => true, - 'user_role_assignment_csv' => true, - 'remap_page_parents' => false, - 'enforce_actual_page_depth' => true, - 'remap_thru_excluded_page_parent' => true, - 'remap_term_parents' => false, - 'enforce_actual_term_depth' => true, - 'remap_thru_excluded_term_parent' => true, - 'mu_sitewide_groups' => true, - 'file_filtering' => true, - 'role_duration_limits' => true, - 'role_content_date_limits' => true, - - 'disabled_access_types' => true, - 'enable_wp_taxonomies' => true, - 'use_term_roles' => true, - 'use_object_roles' => true, - 'disabled_role_caps' => true, - 'user_role_caps' => true, - 'filter_users_dropdown' => true, - 'restrictions_column' => true, - 'term_roles_column' => true, - 'object_roles_column' => true - ); - return $def; -} - - -function scoper_refresh_options_sitewide() { - if ( ! IS_MU_RS ) - return; - - global $scoper_options_sitewide; - $scoper_options_sitewide = apply_filters( 'options_sitewide_rs', array_intersect( scoper_default_options_sitewide(), array( true ) ) ); // establishes which options are set site-wide - - if ( $options_sitewide_reviewed = scoper_get_site_option( 'options_sitewide_reviewed' ) ) { - $custom_options_sitewide = (array) scoper_get_site_option( 'options_sitewide' ); - - $unreviewed_default_sitewide = array_diff( array_keys($scoper_options_sitewide), $options_sitewide_reviewed ); - - $scoper_options_sitewide = array_fill_keys( array_merge( $custom_options_sitewide, $unreviewed_default_sitewide ), true ); - } - - if ( empty( $scoper_options_sitewide['file_filtering'] ) ) - $scoper_options_sitewide['file_filtering'] = true; // file filtering option must be set site-wide (this DOES NOT set the option value itself) - - if ( empty( $scoper_options_sitewide['mu_sitewide_groups'] ) ) - $scoper_options_sitewide['mu_sitewide_groups'] = true; // sitewide_groups option must be set site-wide! -} - - -function scoper_apply_custom_default_options() { - global $wpdb, $scoper_default_options, $scoper_default_otype_options, $scoper_options_sitewide; - - if ( $results = scoper_get_results( "SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE site_id = '$wpdb->siteid' AND meta_key LIKE 'scoper_default_%'" ) ) { - - foreach ( $results as $row ) { - $option_basename = str_replace( 'scoper_default_', '', $row->meta_key ); - - if ( ! empty( $scoper_options_sitewide[$option_basename] ) ) - continue; // custom defaults are only for blog-specific options - - if( isset( $scoper_default_options[$option_basename] ) ) - $scoper_default_options[$option_basename] = maybe_unserialize( $row->meta_value ); - - elseif( isset( $scoper_default_otype_options[$option_basename] ) ) - $scoper_default_otype_options[$option_basename] = maybe_unserialize( $row->meta_value ); - } - } -} - - -function scoper_establish_group_scope() { - // TODO : possibly change this back to scoper_get_option call - $sitewide_groups = get_site_option( 'scoper_mu_sitewide_groups' ); - - $last_sitewide_groups = get_option( 'scoper_mu_last_sitewide_groups' ); // sitewide groups is a sitewide option, but schema update must be run for each blog if that sitewide option changes - - global $scoper_site_options, $scoper_blog_options; - - if ( false === $sitewide_groups ) { - $no_setting = true; - - $last_version = ( isset($scoper_blog_options['scoper_version']) ) ? unserialize($scoper_blog_options['scoper_version']) : array(); - - if ( ! empty($last_version['version']) ) { - // MU installations that ran previous RS version might have existing blog-specific groups; must default to not using site-wide - add_site_option( 'scoper_mu_sitewide_groups', 0 ); - $sitewide_groups = 0; - } else { - // if this is the first RS run (or the installation has been fully wiped), explicitly default to sitewide groups by storing option - add_site_option( 'scoper_mu_sitewide_groups', 1 ); - $sitewide_groups = 1; - } - } else - $no_setting = false; - - $scoper_site_options['mu_sitewide_groups'] = $sitewide_groups; - - if ( ( $sitewide_groups != $last_sitewide_groups ) || $no_setting ) { - update_option( 'scoper_mu_last_sitewide_groups', intval($sitewide_groups) ); - - delete_option( 'scoper_version' ); // force db schema update on sitewide groups change - } - - return $sitewide_groups; -} - - -function scoper_review_file_htaccess() { - $min_date = scoper_get_site_option( 'file_htaccess_min_date' ); - $last_regen = scoper_get_option( 'file_htaccess_date' ); - - if ( ! $last_regen || ( $min_date > $last_regen ) ) - scoper_flush_file_rules(); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/mu_wp_content_optional/blogs.php b/blog/wp-content/plugins/role-scoper/mu_wp_content_optional/blogs.php deleted file mode 100644 index 7ad1ddd..0000000 --- a/blog/wp-content/plugins/role-scoper/mu_wp_content_optional/blogs.php +++ /dev/null @@ -1,153 +0,0 @@ -archived == '1' || $current_blog->spam == '1' || $current_blog->deleted == '1' ) { - status_header( 404 ); - die('404 — File not found.'); -} - -if ( !function_exists('wp_check_filetype') ) : -function wp_check_filetype($filename, $mimes = null) { - // Accepted MIME types are set here as PCRE unless provided. - $mimes = is_array($mimes) ? $mimes : array ( - 'jpg|jpeg|jpe' => 'image/jpeg', - 'gif' => 'image/gif', - 'png' => 'image/png', - 'bmp' => 'image/bmp', - 'tif|tiff' => 'image/tiff', - 'ico' => 'image/x-icon', - 'asf|asx|wax|wmv|wmx' => 'video/asf', - 'avi' => 'video/avi', - 'mov|qt' => 'video/quicktime', - 'mpeg|mpg|mpe' => 'video/mpeg', - 'txt|c|cc|h' => 'text/plain', - 'rtx' => 'text/richtext', - 'css' => 'text/css', - 'htm|html' => 'text/html', - 'mp3|mp4' => 'audio/mpeg', - 'ra|ram' => 'audio/x-realaudio', - 'wav' => 'audio/wav', - 'ogg' => 'audio/ogg', - 'mid|midi' => 'audio/midi', - 'wma' => 'audio/wma', - 'rtf' => 'application/rtf', - 'js' => 'application/javascript', - 'pdf' => 'application/pdf', - 'doc' => 'application/msword', - 'pot|pps|ppt' => 'application/vnd.ms-powerpoint', - 'wri' => 'application/vnd.ms-write', - 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel', - 'mdb' => 'application/vnd.ms-access', - 'mpp' => 'application/vnd.ms-project', - 'swf' => 'application/x-shockwave-flash', - 'class' => 'application/java', - 'tar' => 'application/x-tar', - 'zip' => 'application/zip', - 'gz|gzip' => 'application/x-gzip', - 'exe' => 'application/x-msdownload' - ); - - $type = false; - $ext = false; - - foreach ( (array)$mimes as $ext_preg => $mime_match ) { - $ext_preg = '!\.(' . $ext_preg . ')$!i'; - if ( preg_match($ext_preg, $filename, $ext_matches) ) { - $type = $mime_match; - $ext = $ext_matches[1]; - break; - } - } - - return compact('ext', 'type'); -} -endif; - -$file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] ); - -// --- Begin Modification for Role Scoper file filtering --- -$uploads_blog_dir = str_replace('/', '\/', UPLOADBLOGSDIR ); -$uploads_blog_dir = str_replace('.', '\.', $uploads_blog_dir ); -$match = array(); - -if ( preg_match( "/" . $uploads_blog_dir . "(.*)\/files\/(.*)\?(.*)/", $_SERVER['REQUEST_URI'], $match ) ) - $file = preg_replace( "/" . $uploads_blog_dir . "(.*)\/files/", UPLOADBLOGSDIR . $match[1] . '/files', $file ); - -if ( $pos = strpos( $_SERVER[ 'REQUEST_URI' ], '?' ) ) - $_SERVER[ 'REQUEST_URI' ] = substr( $_SERVER[ 'REQUEST_URI' ], 0, $pos ); // if this is a problem, will have to buffer to a local var and change calls below accordingly -// --- End Role Scoper modification --- - - -if ( !is_file( $file ) ) { - status_header( 404 ); - die('404 — File not found.'); -} - - -$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] ); - -if( $mime[ 'type' ] === false && function_exists( 'mime_content_type' ) ) - $mime[ 'type' ] = mime_content_type( $file ); - -if( $mime[ 'type' ] != false ) { - $mimetype = $mime[ 'type' ]; -} else { - $ext = substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 ); - $mimetype = "image/$ext"; -} -@header( 'Content-type: ' . $mimetype ); // always send this -@header( 'Content-Length: ' . filesize( $file ) ); - -$last_modified = gmdate('D, d M Y H:i:s', filemtime( $file )); -$etag = '"' . md5($last_modified) . '"'; -@header( "Last-Modified: $last_modified GMT" ); -@header( 'ETag: ' . $etag ); -@header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 100000000) . ' GMT' ); - -// Support for Conditional GET -if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) - $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']); -else - $client_etag = false; - -if( !isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) - $_SERVER['HTTP_IF_MODIFIED_SINCE'] = false; -$client_last_modified = trim( $_SERVER['HTTP_IF_MODIFIED_SINCE']); -// If string is empty, return 0. If not, attempt to parse into a timestamp -$client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; - -// Make a timestamp for our most recent modification... -$modified_timestamp = strtotime($last_modified); - -if ( ($client_last_modified && $client_etag) ? - (($client_modified_timestamp >= $modified_timestamp) && ($client_etag == $etag)) : - (($client_modified_timestamp >= $modified_timestamp) || ($client_etag == $etag)) ) { - status_header( 304 ); - exit; -} - -// If we made it this far, just serve the file - -readfile( $file ); - -?> diff --git a/blog/wp-content/plugins/role-scoper/qry-front_non-administrator_rs.php b/blog/wp-content/plugins/role-scoper/qry-front_non-administrator_rs.php deleted file mode 100644 index c4c8cc5..0000000 --- a/blog/wp-content/plugins/role-scoper/qry-front_non-administrator_rs.php +++ /dev/null @@ -1,35 +0,0 @@ -is_tax() ) - add_filter('posts_where', array('QueryInterceptorFront_NonAdmin_RS', 'flt_p2_where'), 1 ); - - -class QueryInterceptorFront_NonAdmin_RS { - - // force scoping filter to process the query a second time, to handle the p2 clause imposed by WP core for custom taxonomy requirements - function flt_p2_where( $where ) { - if ( strpos( $where, 'p2.post_status' ) ) - $where = apply_filters( 'objects_where_rs', $where, 'post', '', array( 'source_alias' => 'p2' ) ); - - return $where; - } - - // Strips comments from teased posts/pages - function flt_comments_results($results) { - global $scoper; - - if ( $results && ! empty($scoper->teaser_ids) ) { - foreach ( $results as $key => $row ) - if ( isset($row->comment_post_ID) && isset($scoper->teaser_ids['post'][$row->comment_post_ID]) ) - unset( $results[$key] ); - } - - return $results; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/query-interceptor-base_rs.php b/blog/wp-content/plugins/role-scoper/query-interceptor-base_rs.php deleted file mode 100644 index 912c498..0000000 --- a/blog/wp-content/plugins/role-scoper/query-interceptor-base_rs.php +++ /dev/null @@ -1,122 +0,0 @@ -data_sources->get_all() as $src_name => $src ) { - if ( isset($src->query_hooks->listing) ) { - // Call our abstract handlers with a lambda function that passes in original hook name - // In effect, make WP pass the hook name so multiple hooks can be registered to a single handler - $rs_args = "'$src_name', '', '' "; - $func = "return apply_filters( 'objects_listing_rs', $arg_str , $rs_args );"; - add_filter( $src->query_hooks->listing, create_function( $arg_str, $func ), 50, 1 ); - //d_echo ("adding filter: $original_hook -> $func
    "); - } - } //foreach data_sources - } - - - // Eliminate a primary plugin incompatibility by replacing front-end status='publish' requirement with scoped equivalent - // (i.e. include private posts/pages that this user has access to via RS role assignment). - // - // Also defeats status requirement imposed by WP core when query includes a custom taxonomy requirement - function flt_defeat_publish_filter($where) { - // don't alter the query if RS query filtering is disabled, or if this maneuver has been disabled via constant - // note: for non-administrators, QueryInterceptor_RS::flt_objects_where will convert the publish requirement to publish OR private, if the user's blog role or RS-assigned roles grant private access - if ( ! is_content_administrator_rs() || defined('SCOPER_RETAIN_PUBLISH_FILTER') || defined('DISABLE_QUERYFILTERS_RS') ) - return $where; - - global $wp_query; - //if ( ! empty( $wp_query->query['post_status'] ) ) - if ( is_admin() && ! empty( $wp_query->query['post_status'] ) ) - return $where; - - // don't alter the where clause if in wp-admin and not filtering by taxonomy - if ( is_admin() ) { - global $wp_query; - - if ( empty($wp_query) && empty($wp_query->is_tax) ) - return $where; - } - - global $wpdb, $current_user; - - // don't alter the where clause for anonymous users - if ( empty( $current_user->ID ) ) - return $where; - - //if ( is_admin() && is_content_administrator_rs() ) { // for non-administrators in wp-admin, this is handled by posts_request / posts_where filter - // TODO: is this necessary when filtering Edit Posts / Pages listing by custom taxonomy? - // $where = preg_replace( "/$wpdb->posts.post_status\s*=\s*'publish'/", "($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'private' OR $wpdb->posts.post_status = 'draft' OR $wpdb->posts.post_status = 'pending' OR $wpdb->posts.post_status = 'future')", $where); - // $where = preg_replace( "/p2.post_status\s*=\s*'publish'/", "(p2.post_status = 'publish' OR p2.post_status = 'private' OR p2.post_status = 'draft' OR p2.post_status = 'pending' OR p2.post_status = 'future')", $where); - // $where = preg_replace( "/p.post_status\s*=\s*'publish'/", "(p.post_status = 'publish' OR p.post_status = 'private' OR p.post_status = 'draft' OR p.post_status = 'pending' OR p.post_status = 'future')", $where); - //} else { - $where = preg_replace( "/$wpdb->posts.post_status\s*=\s*'publish'/", "($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'private')", $where); - $where = preg_replace( "/p2.post_status\s*=\s*'publish'/", "(p2.post_status = 'publish' OR p2.post_status = 'private')", $where); - $where = preg_replace( "/p.post_status\s*=\s*'publish'/", "(p.post_status = 'publish' OR p.post_status = 'private')", $where); - //} - - return $where; - } - - // can't do this from posts_results or it will throw off found_rows used for admin paging - function flt_objects_listing($results, $src_name, $object_types, $args = '') { - global $wpdb; - global $scoper; - - // it's not currently necessary or possible to log listed revisions from here - //if ( isset($wpdb->last_query) && strpos( $wpdb->last_query, "post_type = 'revision'") ) - // return $results; - - // if currently listed IDs are not already in post_cache, make our own equivalent memcache - // ( create this cache for any data source, front end or admin ) - if ( 'post' == $src_name ) - global $wp_object_cache; - - $listed_ids = array(); - - if ( ('post' != $src_name) || empty($wp_object_cache->cache['posts']) ) { - if ( empty($scoper->listed_ids[$src_name]) ) { - - if ( $col_id = $scoper->data_sources->member_property( $src_name, 'cols', 'id' ) ) { - $listed_ids = array(); - foreach ( $results as $row ) { - if ( isset($row->$col_id) ) - $listed_ids [$row->$col_id] = true; - } - if ( empty($scoper->listed_ids) ) - $scoper->listed_ids = array(); - - $scoper->listed_ids[$src_name] = $listed_ids; - } - } else - return $results; - } - - // now determine what restrictions were in place on these results - // (currently only for RS role type, post data source, front end or manage posts/pages) - // - // possible todo: support other data sources, WP role type - if ( is_admin() && ( strpos($_SERVER['SCRIPT_NAME'], 'p-admin/edit.php') || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/edit-pages.php') ) ) { - - if ( scoper_get_otype_option('restrictions_column', 'post') || scoper_get_otype_option('term_roles_column', 'post') || scoper_get_otype_option('object_roles_column', 'post') ) { - require_once( 'role_usage_rs.php' ); - $role_usage = new Role_Usage_RS(); - $role_usage->determine_role_usage_rs( 'post', $listed_ids ); - } - } - - return $results; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/query-interceptor-front_rs.php b/blog/wp-content/plugins/role-scoper/query-interceptor-front_rs.php deleted file mode 100644 index ab874a8..0000000 --- a/blog/wp-content/plugins/role-scoper/query-interceptor-front_rs.php +++ /dev/null @@ -1,48 +0,0 @@ -ID) ) - $where = str_replace( " AND p.post_status = 'publish'", '', $where); - - // get_adjacent_post() function includes 'WHERE ' at beginning of $where - $where = str_replace( 'WHERE ', 'AND ', $where ); - - $args = array( 'source_alias' => 'p', 'skip_teaser' => true ); // skip_teaser arg ensures unreadable posts will not be linked - $where = 'WHERE 1=1 ' . $scoper->query_interceptor->flt_objects_where( $where, 'post', 'post', $args ); - return $where; - } - - // custom wrapper to clean up after get_archives() nonstandard arg syntax (passes "WHERE post_type=...) - function flt_getarchives_where ( $where ) { - global $current_user, $wpdb; - - $where = str_replace( "WHERE ", "WHERE $wpdb->posts.post_date > 0 AND ", $where ); - - if ( ! empty($current_user->ID) ) - $where = str_replace( "AND post_status = 'publish'", "AND post_status IN ('publish', 'private')", $where ); - - $where = str_replace( "WHERE ", "AND ", $where ); - - // pass force arg to ignore teaser setting - $where = apply_filters('objects_where_rs', $where, 'post', '', array('skip_teaser' => true) ); - - $where = 'WHERE 1=1 ' . $where; - - return $where; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/query-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/query-interceptor_rs.php deleted file mode 100644 index 1170858..0000000 --- a/blog/wp-content/plugins/role-scoper/query-interceptor_rs.php +++ /dev/null @@ -1,1464 +0,0 @@ -scoper =& $scoper; - - $is_administrator = is_content_administrator_rs(); - - // ---- ABSTRACT ROLE SCOPER HOOKS - wrap around source-specific hooks based on DataSources config ------ - // - // Request / Where Filter: - // Support filtering of any query request (WP or plugin-defined) based on scoped roles. - // Resulting content may be narrowed or expanded from WP core results. - // (currently require request/where/join string as first hook arg, ignore other args) - // - // Results Teaser: - // Alternately, if a results hook is defined, unqualified records can - // be left in the result set, but with the content stripped and the excerpt - // replaced or appended with a teaser message. - // (currently require results as array of objects in first hook arg, ignore other args) - // - // suported filter interface: - // request hooks: $arg1 = full request query - // results hooks: $arg1 = results set - - // filter args: $item, $src_name, $object_type, $args (note: to customize other args, filter must be called directly) - - //add_filter('objects_distinct_rs', array($this, 'flt_objects_distinct'), 50); - //add_filter('objects_join_rs', array($this, 'flt_objects_join'), 2, 4); - add_filter('objects_where_rs', array(&$this, 'flt_objects_where'), 2, 4); - add_filter('objects_request_rs', array(&$this, 'flt_objects_request'), 2, 4); - add_filter('objects_results_rs', array(&$this, 'flt_objects_results'), 50, 4); - add_filter('objects_teaser_rs', array(&$this, 'flt_objects_teaser'), 50, 4); - - if ( ! $scoper->direct_file_access ) { - // Append any limiting clauses to WHERE clause for taxonomy query - // args: ($where, $taxonomy, $object_type = '', $reqd_op = '') e.g. ($where, 'categories', 'post', 'edit') - // Note: If any of the optional args are missing or nullstring, an attempt is made - // to determine them from URI based on Scoped_Taxonomy properties - add_filter('terms_request_rs', array(&$this, 'flt_terms_request'), 50, 4); - } - - // note: If DISABLE_QUERYFILTERS_RS is set, the RS filters are still defined above for selective internal use, - // but in that case are not mapped to the defined data source hooks ('posts_where', etc.) below - if ( ! defined('DISABLE_QUERYFILTERS_RS') ) { - //in effect, make WP pass the hook name so multiple hooks can be registered to a single handler - $rs_hooks = array(); - - foreach ( $scoper->data_sources->get_all() as $src_name => $src ) { - if ( empty($src->query_hooks) ) - continue; - - if ( ! $is_administrator ) { - //if ( isset($src->query_hooks->where) && isset($src->query_hooks->join) ) { - if ( isset($src->query_hooks->where) ) { - $rs_hooks[$src->query_hooks->where] = (object) array( 'name' => 'objects_where_rs', 'rs_args' => "'$src_name', '', '' "); - //$rs_hooks[$src->query_hooks->join] = (object) array( 'name' => 'objects_join_rs', 'rs_args' => "'$src_name', '', '' "); - - } elseif ( isset($src->query_hooks->request) ) - $rs_hooks[$src->query_hooks->request] = (object) array( 'name' => 'objects_request_rs', 'rs_args' => "'$src_name', '', '' "); - } - - // log results (to identify restricted posts) even for admin. Also, possibly apply front end teaser - if ( isset($src->query_hooks->results) ) - $rs_hooks[$src->query_hooks->results] = (object) array( 'name' => 'objects_results_rs', 'rs_args' => "'$src_name', '', '' "); - - //if ( isset($src->query_hooks->distinct) ) - // $rs_hooks[$src->query_hooks->distinct] = (object) array( 'name' => 'objects_distinct_rs','rs_args' => ''); - } //foreach data_sources - - // call our abstract handlers with a lambda function that passes in original hook name - foreach ( $rs_hooks as $original_hook => $rs_hook ) { - if ( ! $original_hook ) - continue; - - $orig_hook_numargs = 1; - $arg_str = agp_get_lambda_argstring($orig_hook_numargs); - $comma = ( $rs_hook->rs_args ) ? ',' : ''; - $func = "return apply_filters( '$rs_hook->name', $arg_str $comma $rs_hook->rs_args );"; - add_filter( $original_hook, create_function( $arg_str, $func ), 50, $orig_hook_numargs ); - - //d_echo ("adding filter: $original_hook -> $func
    "); - } - } - - //add_filter( 'posts_request', array( &$this, 'flt_debug_query'), 999 ); - } - - - //function flt_debug_query( $query ) { - // d_echo( $query . '

    ' ); - // return $query; - //} - - - - // Append any limiting clauses to WHERE clause for taxonomy query - //$reqd_caps_by_taxonomy[tx_name][op_type] = array of cap names - function flt_terms_request($request, $taxonomies, $reqd_caps = '', $args = '') { - $defaults = array( 'use_object_roles' => -1, 'reqd_caps_by_otype' => array(), 'skip_teaser' => true ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( ! $taxonomies ) - return $request; - - if ( ! strpos($request, ' WHERE 1=1 ') ) - $request = str_replace(' WHERE ', ' WHERE 1=1 AND ', $request); - - $pos_where = 0; - $pos_suffix = 0; - $where = agp_parse_after_WHERE_11( $request, $pos_where, $pos_suffix ); // any existing where, orderby or group by clauses remain in $where - if ( ! $pos_where && $pos_suffix ) { - $request = substr($request, 0, $pos_suffix) . ' WHERE 1=1 ' . substr($request, $pos_suffix); - $pos_where = $pos_suffix; - } - $args['request'] = $request; - - if ( ! is_array($taxonomies) ) - $taxonomies = array($taxonomies); - - // currently support multiple taxonomies, but only if they all use the same data source - $taxonomy_sources = array(); - foreach ( $taxonomies as $key => $taxonomy ) { - $src = $scoper->taxonomies->member_property($taxonomy, 'object_source'); - $src_name = $src->name; - $taxonomy_sources[$src_name] = true; - } - if ( count($taxonomy_sources) != 1 ) - return $request; - - if ( $reqd_caps && ! $reqd_caps_by_otype ) { - $reqd_caps_by_src = $scoper->cap_defs->organize_caps_by_otype($reqd_caps); - if ( ! isset($reqd_caps_by_src[$src_name]) ) - return $request; - - $reqd_caps_by_otype = $reqd_caps_by_src[$src_name]; - } - - // if the filter call did not specify required caps... - if ( ! $reqd_caps_by_otype ) { - $object_src_name = $scoper->taxonomies->member_property($taxonomy, 'object_source', 'name'); - - // try to determine context from URI (if taxonomy definition includes such clues) - $reqd_caps_by_otype = $scoper->get_terms_reqd_caps($object_src_name); - - //TODO: can this be safely put right in default_rs.php? - if ( $reqd_caps_by_otype == array( 'post' => array('read') ) ) - if ( scoper_get_otype_option('use_term_roles', 'post', 'page') ) - $reqd_caps_by_otype ['page'] = array('read'); - - // if required operation still unknown, default based on access type - if ( ! $reqd_caps_by_otype ) - return $request; - } - - // object_types never passed in as of RC9 - //if ( ! empty($object_types) && is_array($reqd_caps_by_otype) & (count($reqd_caps_by_otype) > 1) ) - // $reqd_caps_by_otype = array_intersect_key($reqd_caps_by_otype, array_flip( (array) $object_types)); - - - // Note that capabilities (i.e. "manage_categories") a user/group has on a particular - // term are implemented as Term Roles on the taxonomy data source. - // - // Call objects_where_role_clauses() with src_name of the taxonomy source - // This works as a slight subversion of the normal flt_objects_where query building - // because we are also forcing taxonomies explicitly and passing the terms_query arg - - $args['terms_query'] = true; - $args['use_object_roles'] = false; - - $args['skip_owner_clause'] = true; - $args['terms_reqd_caps'] = $reqd_caps_by_otype; - $args['taxonomies'] = $taxonomies; - - // As of RS 1.1, using subselects in where clause instead - //$rs_join = $this->flt_objects_join('', $src_name, '', $args); - - $where = $this->flt_objects_where($where, $src_name, '', $args); - - if ( $pos_where === false ) - $request = $request . ' WHERE 1=1 ' . $where; - else - $request = substr($request, 0, $pos_where) . ' WHERE 1=1 ' . $where; // any pre-exising join clauses remain in $request - - /* - if ( $pos_where === false ) - $request = $request . ' ' . $rs_join . ' WHERE 1=1 ' . $where; - else - $request = substr($request, 0, $pos_where) . ' ' . $rs_join . 'WHERE 1=1 ' . $where; // any pre-exising join clauses remain in $request - */ - - //d_echo ("

    terms_request output:$request

    "); - - return $request; - } - - function flt_objects_request($request, $src_name, $object_types = '', $args = '') { - if ( $args ) { - $defaults = array( 'skip_teaser' => false ); - $args = array_diff_key($args, array_flip( array('request', 'src_name', 'object_types' ) ) ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - } - - global $scoper; - - // Filtering in user_has_cap sufficiently controls revision access; a match here should be for internal, pre-validation purposes - if ( strpos( $request, "post_type = 'revision'") ) - return $request; - - if ( empty($skip_teaser) ) { - $scoper->last_request[$src_name] = $request; // Store for potential use by subsequent teaser filter - } - - //$request = agp_force_distinct($request); // in case data source didn't provide a hook for objects_distinct - - if ( ! strpos($request, ' WHERE 1=1 ') ) - $request = str_replace(' WHERE ', ' WHERE 1=1 AND ', $request); - - $pos_where = 0; - $pos_suffix = 0; - $where = agp_parse_after_WHERE_11( $request, $pos_where, $pos_suffix ); // any existing where, orderby or group by clauses remain in $where - if ( ! $pos_where && $pos_suffix ) { - $request = substr($request, 0, $pos_suffix) . ' WHERE 1=1' . substr($request, $pos_suffix); - $pos_where = $pos_suffix; - } - - // As of RS 1.1, using subselects in where clause instead - //$args['request'] = $request; - //$rs_join = $this->flt_objects_join('', $src_name, $object_types, $args); - - // TODO: abstract this - if ( strpos( $request, "post_type = 'attachment'" ) ) { - // The listed objects are attachments, so query filter is based on objects they inherit from - global $wpdb; - // filter attachments on upload page by inserting a scoped subquery based on user roles on the post/page attachment is tied to - $rs_where = $this->flt_objects_where('', $src_name, $object_types, $args); - $subqry = "SELECT ID FROM $wpdb->posts WHERE 1=1 $rs_where"; - - if ( ! defined('SCOPER_BLOCK_UNATTACHED_UPLOADS') || ! SCOPER_BLOCK_UNATTACHED_UPLOADS ) { - $author_clause = ''; - - if ( is_admin() ) { - // optionally hide other users' unattached uploads, but not from blog-wide Editors - global $current_user; - if ( ( empty( $current_user->allcaps['edit_others_posts'] ) && empty( $current_user->allcaps['edit_others_pages'] ) ) && ! scoper_get_option( 'admin_others_unattached_files' ) ) - $author_clause = "AND $wpdb->posts.post_author = '{$current_user->ID}'"; - } - - $unattached_clause = "( $wpdb->posts.post_parent = 0 $author_clause ) OR"; - } else - $unattached_clause = ''; - - $request = str_replace( "$wpdb->posts.post_type = 'attachment'", "( $wpdb->posts.post_type = 'attachment' AND ( $unattached_clause $wpdb->posts.post_parent IN ($subqry) ) )", $request); - - } else { - // used by objects_where_scope_clauses() to determine whether to add a subselect or make use of existing JOIN - $args['join'] = ( $pos_where ) ? substr( $request, 0, $pos_where + 1 ) : ''; - - // Generate a query filter based on roles for the listed objects - $rs_where = $this->flt_objects_where($where, $src_name, $object_types, $args); - - if ( $pos_where === false ) - $request = $request . ' WHERE 1=1 ' . $where; - else - $request = substr($request, 0, $pos_where) . ' WHERE 1=1 ' . $rs_where; // any pre-exising join clauses remain in $request - - /* - if ( $pos_where === false ) - $request = $request . ' ' . $rs_join . ' WHERE 1=1 ' . $where; - else - $request = substr($request, 0, $pos_where) . ' ' . $rs_join . ' WHERE 1=1 ' . $rs_where; // any pre-exising join clauses remain in $request - */ - } - - return $request; - } - - function is_term_table_joined( $request, $taxonomy ) { - global $scoper; - - if ( $qvars = $scoper->taxonomies->get_terms_query_vars($taxonomy) ) - if ( false !== strpos($request, " {$qvars->term->table} {$qvars->term->as} ") ) - return true; - } - - // called by flt_objects_where, flt_objects_results - function _get_object_types($src, $object_types = '') { - global $scoper; - - if ( ! is_object($src) ) - if ( ! $src = $scoper->data_sources->get($src) ) - return array(); - - if ( ! $object_types ) { - /* - // TODO: test this (it would eliminate unnecessary clauses in some queries where object type can be determined) - if ( 'post' == $src->name ) { - // special case for detecting page type by presence of page_id arg - global $wp_query; - if ( ! empty($wp_query->query) ) - if ( $object_type = $scoper->data_sources->get_from_queryvars('type', $src, $wp_query->query) ) - $object_types = array($object_type); - } - - if ( ! $object_types ) - */ - $object_types = array_keys($src->object_types); // include all defined otypes in the query if none were specified - } - if ( ! is_array($object_types) ) - $object_types = array($object_types); - - return $object_types; - } - - // called by flt_objects_where, flt_objects_results - function _get_teaser_object_types($src_name, $object_types, $args = '') { - if ( ! is_array($args) ) - $args = array(); - - if ( ! empty($args['skip_teaser']) || is_admin() || is_content_administrator_rs() || is_attachment_rs() || defined('XMLRPC_REQUEST') || ! empty($this->skip_teaser) ) - return array(); - - if ( is_feed() && defined( 'SCOPER_NO_FEED_TEASER' ) ) - return array(); - - if ( empty($object_types) ) - $object_types = $this->_get_object_types($src_name); - - $tease_otypes = array(); - - if ( scoper_get_otype_option('do_teaser', $src_name) ) { - global $current_user; - - foreach ( $object_types as $object_type ) - if ( scoper_get_otype_option('use_teaser', $src_name, $object_type) ) { - $teased_users = scoper_get_otype_option('teaser_logged_only', $src_name, $object_type); - if ( empty( $teased_users ) - || ( ( 'anon' == $teased_users ) && empty($current_user->ID) ) - || ( ( 'anon' != $teased_users ) && ! empty($current_user->ID) ) ) - $tease_otypes []= $object_type; - } - } - - return $tease_otypes; - } - - function flt_objects_where($where, $src_name, $object_types = '', $args = '' ) { - $defaults = array( 'user' => '', 'use_object_roles' => -1, 'use_term_roles' => -1, - 'taxonomies' => array(), 'request' => '', 'terms_query' => 0, 'force_statuses' => '', - 'force_reqd_caps' => '', 'alternate_reqd_caps' => '', 'source_alias' => '', - 'required_operation' => '', 'terms_reqd_caps' => '', 'skip_teaser' => false, - 'join' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - // filtering in user_has_cap sufficiently controls revision access; a match here should be for internal, pre-validation purposes - if ( strpos( $where, "post_type = 'revision'") ) - return $where; - - $where_prepend = ''; - - //d_echo ("
    object_where input: $where
    "); - //echo "
    $where
    "; - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - $args['user'] = $user; - } - - // TODO: why is this necessary with Facebook Connect plugin? blog_roles property is somehow cleared. - if ( empty($user->blog_roles) ) { - foreach ($scoper->role_defs->get_anon_role_handles() as $role_handle) { - $user->assigned_blog_roles[ANY_CONTENT_DATE_RS][$role_handle] = true; - $user->blog_roles[ANY_CONTENT_DATE_RS][$role_handle] = true; - } - } - - if ( ! $src = $scoper->data_sources->get($src_name) ) - return $where; // the specified data source is not know to Role Scoper - - $src_table = ( ! empty($source_alias) ) ? $source_alias : $src->table; - - // verify table name and id col definition (the actual existance checked at time of admin entry) - if ( ! ($src->table && $src->cols->id) ) - rs_notice( sprintf( 'Role Scoper Configuration Error: table_basename or col_id are undefined for the %s data source.', $src_name) ); - - // need to allow ambiguous object type for custom cap requirements like comment filtering - $object_types = $this->_get_object_types($src, $object_types); - - $tease_otypes = $this->_get_teaser_object_types($src_name, $object_types, $args); - $tease_otypes = array_intersect($object_types, $tease_otypes); - - if ( empty($src->uses_taxonomies) ) - $use_term_roles = false; - - if ( ! empty($src->no_object_roles) ) - $use_object_roles = false; - - if ( $terms_query && $terms_reqd_caps ) { - foreach ( array_keys($terms_reqd_caps) as $object_type ) - $otype_status_reqd_caps[$object_type][''] = $terms_reqd_caps[$object_type]; // terms request does not support multiple statuses - - } else { - if ( $force_reqd_caps && is_array($force_reqd_caps) ) - $otype_status_reqd_caps = $force_reqd_caps; - else { - if ( ! $required_operation ) - $required_operation = ( 'front' == CURRENT_ACCESS_NAME_RS ) ? OP_READ_RS : OP_EDIT_RS; - - if ( isset( $src->reqd_caps[$required_operation] ) ) - $otype_status_reqd_caps = $src->reqd_caps[$required_operation]; - else - return $where; - } - - $otype_status_reqd_caps = array_intersect_key($otype_status_reqd_caps, array_flip($object_types) ); - } - - // accomodate editing of published posts/pages to revision - $script_name = $_SERVER['SCRIPT_NAME']; - $revision_uris = apply_filters( 'scoper_revision_uris', array( 'p-admin/edit.php', 'p-admin/edit-pages.php', 'p-admin/widgets.php' ) ); - - if ( strpos($script_name, 'p-admin/index.php') || agp_strpos_any($script_name, $revision_uris) ) { - if ( defined( 'RVY_VERSION' ) && rvy_get_option('pending_revisions') ) { - $strip_capreqs = array('edit_published_posts', 'edit_private_posts', 'edit_published_pages', 'edit_private_pages'); - - foreach ( array_keys($otype_status_reqd_caps) as $listing_otype ) - foreach ( array_keys($otype_status_reqd_caps[$listing_otype]) as $status ) - $otype_status_reqd_caps[$listing_otype][$status] = array_diff($otype_status_reqd_caps[$listing_otype][$status], $strip_capreqs); - } - } - - // Since Role Scoper can restrict or expand access regardless of post_status, query must be modified such that - // * the default owner inclusion clause "OR post_author = [user_id] AND post_status = 'private'" is removed - // * all statuses are listed apart from owner inclusion clause (and each of these status clauses is subsequently replaced with a scoped equivalent which imposes any necessary access limits) - // * a new scoped owner clause is constructed where appropriate (see $where[$cap_name]['owner'] in function objects_where_role_clauses() - // - if ( $src->cols->owner && $user->ID ) { - // force standard query padding - $where = preg_replace("/{$src->cols->owner}\s*=\s*/", "{$src->cols->owner} = ", $where); - - $where = str_replace( " {$src->cols->owner} =", " $src_table.{$src->cols->owner} =", $where); - $where = str_replace( " {$src->cols->owner} IN", " $src_table.{$src->cols->owner} IN", $where); - } - - if ( ! empty($src->query_replacements) ) { - foreach ( $src->query_replacements as $find => $replace ) { - // for posts_request, remove the owner inclusion clause "OR post_author = [user_id] AND post_status = 'private'" because we'll account for that for each status based on properties of required caps - $find_ = str_replace('[user_id]', $user->ID, $find); - if ( false !== strpos($find_, '[') || false !== strpos($find_, ']') ) { - rs_notice( sprintf( 'Role Scoper Config Error: invalid query clause search criteria for %1$s (%2$s).

    Valid placeholders are:
    ', $src_name, $find) . print_r(array_keys($map)) ); - return ' AND 1=2 '; - } - - $replace_ = str_replace('[user_id]', $user->ID, $replace); - if ( false !== strpos($replace_, '[') || false !== strpos($replace_, ']') ) { - rs_notice( sprintf( 'Role Scoper Config Error: invalid query clause replacement criteria for %1$s (%2$s).

    Valid placeholders are:
    ', $src_name, $replace) . print_r(array_keys($map)) ); - return ' AND 1=2 '; - } - - $where = str_replace($find_, $replace_, $where); - } - } - - $basic_status_clause = array(); - $force_single_status = false; - $status_clause_pos = 0; - - if ( $col_status = $src->cols->status ) { - if ( isset( $src->usage->statuses->access_type[CURRENT_ACCESS_NAME_RS] ) ) { - $use_statuses = ( $force_statuses ) ? $force_statuses : $src->usage->statuses->access_type[CURRENT_ACCESS_NAME_RS]; - $status_vals = array_intersect_key( $src->statuses, array_flip($use_statuses) ); - } else - $status_vals = $src->statuses->access_type[CURRENT_ACCESS_NAME_RS]; - - if ( ! $status_vals ) - return $where; - - // force standard query padding - $where = preg_replace("/$col_status\s*=\s*'/", "$col_status = '", $where); - - if ( ! $status_col_with_table = ( strpos($where, "{$src_table}.$col_status") ) ) { - $where = str_replace(" $col_status =", " {$src_table}.$col_status =", $where); - $where = str_replace(" $col_status IN", " {$src_table}.$col_status IN", $where); - } - - // make sure our status clause expansion is parenthetical - foreach ($status_vals as $status_name => $status_val) { - //if ( $status_col_with_table ) { - $search = "{$src_table}.$col_status = '"; - $basic_status_clause[$status_name] = "{$src_table}.$col_status = '$status_val'"; - //} else { - // $search = "$col_status = '"; - // $basic_status_clause[$status_name] = "$col_status = '$status_val'"; - //} - } - - //$search = ( $status_col_with_table ) ? "{$src_table}.$col_status = '" : "$col_status = '"; - $search = "{$src_table}.$col_status = '"; - - // If the passed request contains a single status criteria, maintain that status exclusively (otherwise include status-specific conditions for each available status) - // (But not if user is anon and hidden content teaser is enabled. In that case, we need to replace the default "status=published" clause) - - $status_clause_pos = strpos($where, $search); // TODO: slim down this parsing code with preg_match - if ( false !== $status_clause_pos ) { - // wrap first existing status clause in parenthesis so additional clauses can be ORed to it if necessary - $endpos = strpos( $where, "'", $status_clause_pos + strlen($search) ); - $where = substr( $where, 0, $status_clause_pos ) . ' ( ' . substr( $where, $status_clause_pos, $endpos - $status_clause_pos + 1 ) . ' ) ' . substr( $where, $endpos + 1 ); - $status_clause_pos = $status_clause_pos + 3; - - $startpos = $status_clause_pos + strlen($search); - $endpos = strpos($where, "'", $startpos + 1 ); - if ( $endpos > $startpos ) - $first_status_val = substr($where, $startpos, $endpos - $startpos ); - - // if col_status appears again, query will include all statuses defined for this access type - $pos_second = strpos($where, $search, $status_clause_pos + 1); - if ( ! $pos_second ) { - // Eliminate a primary plugin incompatibility by skipping this preservation of existing single status requirements if we're on the front end and the requirement is 'publish'. - // (i.e. include private posts/pages that this user has access to via RS role assignment). - if ( ! $scoper->is_front() || ( 'publish' != $first_status_val ) || empty( $args['user']->ID ) || defined('SCOPER_RETAIN_PUBLISH_FILTER') ) { - $force_single_status = true; - - $startpos = $status_clause_pos + strlen($search); - $endpos = strpos($where, "'", $startpos + 1 ); - if ( $endpos > $startpos ) { - $this_status_val = substr($where, $startpos, $endpos - $startpos ); - - foreach ($otype_status_reqd_caps as $object_type => $status_reqd_caps) - foreach (array_keys($status_reqd_caps) as $status_name) - if ( $this_status_val != $status_vals[$status_name] ) - unset($otype_status_reqd_caps[$object_type][$status_name]); - } - } - } - } // endif passed-in where clause has a status clause - - } else { - // this source doesn't define statuses - $status_vals = array ( '' => ''); - } - - if ( $col_type = $src->cols->type ) { - // If the passed request contains a single object type criteria, - // don't bother including other object types in our own clauses - $search = "$col_type = '"; - $type_clause_pos = strpos($where, $search); // TODO: slim down this parsing code with preg_match - if ( false !== $type_clause_pos ) { - $startpos = $type_clause_pos + strlen($search); - $endpos = strpos($where, "'", $startpos + 1 ); - if ( $endpos > $startpos ) - $first_type_val = substr($where, $startpos, $endpos - $startpos ); - - // if col_type appears again, RS where clauses will include all object types defined for this access type - $pos_second = strpos($where, $search, $type_clause_pos + 1); - if ( ! $pos_second ) { - $force_single_type = true; - - $startpos = $type_clause_pos + strlen($search); - $endpos = strpos($where, "'", $startpos + 1 ); - if ( $endpos > $startpos ) { - $this_type_val = substr($where, $startpos, $endpos - $startpos ); - - foreach ( array_keys($otype_status_reqd_caps) as $object_type ) - if ( $this_type_val != $object_type ) - unset($otype_status_reqd_caps[$object_type]); - else - $object_types = array( $object_type ); - } - } - } // endif passed-in where clause has a status clause - } - - if ( empty($skip_teaser) && ! array_diff($object_types, $tease_otypes) ) { - if ( empty($user->ID) && $status_clause_pos && ! $pos_second ) { - - // Since we're dropping out of this function early in advance of teaser filtering, - // must take this opportunity to add private status to the query (otherwise WP excludes private for anon user) - // (But don't do this if the query is for a specific status, or if teaser is configured to hide private content) - $check_otype = ( count($tease_otypes) && in_array('post', $tease_otypes) ) ? 'post' : $tease_otypes[0]; - - if ( ! scoper_get_otype_option('teaser_hide_private', $src_name, $check_otype) ) { - if ( count($status_vals) == count($src->statuses) ) { - $where = str_replace( $basic_status_clause['published'], "1=1", $where); - } else { - $in_statuses = "'" . implode("', '", $status_vals ) . "'"; - $use_status_col = ( $status_col_with_table ) ? "{$src_table}.$col_status" : $col_status; - $where = str_replace( $basic_status_clause['published'], "$use_status_col IN ($in_statuses)", $where); - } - } - } - - return $where; // all object types potentially returned by this query will have a teaser filter applied to results - } - - - $is_administrator = is_content_administrator_rs(); // make sure administrators never have content limited - - $status_or = ''; - $status_where = array(); - - foreach ($otype_status_reqd_caps as $object_type => $status_reqd_caps) { - if ( ! is_array($status_reqd_caps) ) { - rs_notice( sprintf( 'Role Scoper Configuration Error: reqd_caps for the %s data source must be array[operation][object_type][status] where operation is "read", "edit" or "admin".', $src_name) ); - return $where; - } - - // don't bother generating these parameters if we're just going to pass the object type through for teaser filtering - if ( ! in_array($object_type, $tease_otypes) ) { - if ( $terms_query && ! $object_type ) - $otype_use_term_roles = true; - else { - $otype_use_term_roles = ( -1 == $use_term_roles ) ? scoper_get_otype_option('use_term_roles', $src_name, $object_type) : $use_term_roles; - if ( ( ! $otype_use_term_roles ) && ( $terms_query ) ) - continue; - } - - $otype_use_object_roles = ( -1 == $use_object_roles ) ? scoper_get_otype_option('use_object_roles', $src_name, $object_type) : $use_object_roles; - - $args['use_term_roles'] = $otype_use_term_roles; - $args['use_object_roles'] = $otype_use_object_roles; - $args['object_type'] = $object_type; - } - - $otype_val = $scoper->data_sources->member_property($src_name, 'object_types', $object_type, 'val'); - if ( ! $otype_val ) $otype_val = $object_type; - - //now step through all statuses and corresponding cap requirements for this otype and access type - // (will replace "col_status = status_name" with "col_status = status_name AND ( [scoper requirements] ) - foreach ($status_reqd_caps as $status_name => $reqd_caps) { - if ( 'trash' == $status_name ) // in wp-admin, we need to include trash posts for the count query, but not for the listing query unless trash status is requested - if ( ! strpos($scoper->last_request[$src_name], 'COUNT') && ( empty( $_GET['post_status'] ) || ( 'trash' != $_GET['post_status'] ) ) ) - continue; - - if ( $is_administrator ) - $status_where[$status_name][$object_type] = '1=1'; - elseif ( empty($skip_teaser) && in_array($object_type, $tease_otypes) ) - if ( $terms_query && ! $use_object_roles ) - $status_where[$status_name][$object_type] = '1=1'; - else - $status_where[$status_name][$object_type] = "{$src_table}.{$src->cols->type} = '$otype_val'"; // this object type will be teaser-filtered - else { - // filter defs for otypes which don't define a status will still have a single status element with value '' - $clause = $this->objects_where_role_clauses($src_name, $reqd_caps, $args); - - //dump($clause); - - if ( empty($clause) || ( '1=2' == $clause ) ) // this means no qualifying roles are available - $status_where[$status_name][$object_type] = '1=2'; - - // array key order status/object is reversed intentionally for subsequent processing - elseif ( (count($otype_status_reqd_caps) > 1) && ( ! $terms_query || $use_object_roles) ) // more than 1 object type - $status_where[$status_name][$object_type] = "( {$src_table}.{$src->cols->type} = '$otype_val' AND ( $clause ) )"; - else - $status_where[$status_name][$object_type] = $clause; - } - } - } - - // all otype clauses concat: object_type1 clause [OR] [object_type2 clause] [OR] ... - foreach ( array_keys($status_where) as $status_name ) { - if ( isset($preserve_or_clause[$status_name]) ) - $status_where[$status_name][] = $preserve_or_clause[$status_name]; - - if ( $tease_otypes ) - $check_otype = ( count($tease_otypes) && in_array('post', $tease_otypes) ) ? 'post' : $tease_otypes[0]; - - // extra line of defense: even if upstream logic goes wrong, never disclose a private item to anon user (but if the where clause was passed in with explicit status=private, must include our condition) - if ( ('private' == $status_name) && ! $force_single_status && empty($current_user->ID) && ( ! $tease_otypes || scoper_get_otype_option('teaser_hide_private', $src_name, $check_otype) ) ) - unset( $status_where[$status_name] ); - else - $status_where[$status_name] = agp_implode(' ) OR ( ', $status_where[$status_name], ' ( ', ' ) '); - } - - // combine identical status clauses - $duplicate_clause = array(); - $replace_clause = array(); - if ( $col_status && count($status_where) > 1 ) { // more than one status clause - foreach ( $status_where as $status_name => $status_clause) { - if ( isset($duplicate_clause[$status_name]) ) - continue; - - reset($status_where); - if ( $other_name = array_search($status_clause, $status_where) ) { - if ( $other_name == $status_name ) $other_name = array_search($status_clause, $status_where); - if ( $other_name && $other_name != $status_name ) { - $duplicate_clause[$other_name][$status_name] = true; - $replace_clause[$status_name] = true; - } - } - } - } - - $status_where = array_diff_key($status_where, $replace_clause); - - foreach ( $status_where as $status_name => $this_status_where) { - - if ( $status_clause_pos && $force_single_status ) { - //We are maintaining the single status which was specified in original query - - if ( ! $this_status_where || ( $this_status_where == '1=2' ) ) - $where_prepend = '1=2'; - - elseif ( $this_status_where == '1=1' ) - $where_prepend = ''; - - else { - //insert at original status clause position - $where_prepend = ''; - $where = substr($where, 0, $status_clause_pos) . "( $this_status_where ) AND " . substr($where, $status_clause_pos); - } - - break; - } - - // We may be replacing or inserting status clauses - - if ( ! empty($duplicate_clause[$status_name]) ) { - // We generated duplicate clauses for some statuses - foreach ( array_keys($duplicate_clause[$status_name]) as $other_name ) { - $where = str_replace($basic_status_clause[$other_name], '1=2', $where); - } - - $duplicate_clause[$status_name] = array_merge($duplicate_clause[$status_name], array($status_name=>1) ); - - // convert status names to status values to revise sql clause - $clause_status_vals = array(); - foreach ( array_keys($duplicate_clause[$status_name]) as $other_name ) - $clause_status_vals[$status_vals[$other_name]] = true; - - if ( count($clause_status_vals) == count($src->statuses) ) { - $status_prefix = "1=1"; - } else { - $name_in = "'" . implode("', '", array_keys($clause_status_vals)) . "'"; - $status_prefix = "$col_status IN ($name_in)"; - } - } elseif ( $col_status && $status_name ) { - $status_prefix = $basic_status_clause[$status_name]; - } else - $status_prefix = ''; - - if ( $this_status_where && ( $this_status_where != '1=2' || count($status_where) > 1 ) ) { //todo: confirm we can OR the 1=2 even if only one status clause - if ( '1=1' == $this_status_where ) - $status_clause = ( $status_prefix ) ? "$status_prefix " : ''; - else { - $status_clause = ( $col_status && $status_prefix ) ? "$status_prefix AND " : ''; - $status_clause .= "( $this_status_where )"; - $status_clause = "( $status_clause )"; - } - } else - $status_clause = '1=2'; - - if ( $status_clause ) { - if ( $col_status && $status_name && strpos($where, $basic_status_clause[$status_name]) ) { - // Replace existing status clause with our scoped equivalent - $where = str_replace($basic_status_clause[$status_name], "$status_clause", $where); - - } elseif ( $status_clause_pos && ( $status_clause != '1=2' ) ) { - // This status was not in the original query, but we now insert it with scoping clause at the position of another existing status clause - $where = substr($where, 0, $status_clause_pos) . "$status_clause OR " . substr($where, $status_clause_pos); - - } else { - // Default query makes no mention of status (perhaps because this data source doesn't define statuses), - // so prepend this clause to front of where clause - $where_prepend .= "$status_or $status_clause"; - $status_or = ' OR'; - } - } - } - - // Existance of this variable means no status clause exists in default WHERE. AND away we go. - // Prepend so we don't disturb any orderby/groupby/limit clauses which are along for the ride - if ( $where_prepend ) { - if ( $where ) - $where = " AND ( $where_prepend ) $where"; - else - $where = " AND ( $where_prepend )"; - } - - //d_echo ("

    objects_where output: $where

    "); - //echo "
    $where
    "; - - return $where; - } - - - // core Role Scoper where clause concatenation called by listing filter (flt_objects_request) and single access filter (flt_user_has_cap) - // $reqd_caps[cap_name] = min scope - function objects_where_role_clauses($src_name, $reqd_caps, $args = '' ) { - $defaults = array('user' => '', 'taxonomies' => array(), 'use_term_roles' => true, - 'use_object_roles' => -1, 'terms_query' => false, 'alternate_reqd_caps' => '', - 'custom_user_blogcaps' => '', 'skip_owner_clause' => false, 'object_type' => '', - 'require_full_object_role' => false, 'join' => '' ); - - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( '' === $custom_user_blogcaps ) - $custom_user_blogcaps = SCOPER_CUSTOM_USER_BLOGCAPS; - - if ( ! is_array($reqd_caps) ) - $reqd_caps = ($reqd_caps) ? array($reqd_caps) : array(); - - $reqd_caps = $scoper->role_defs->role_handles_to_caps($reqd_caps); - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - if ( ! $src = $scoper->data_sources->get($src_name) ) { - rs_notice ( sprintf( 'Role Scoper Config Error (%1$s): Data source (%2$s) is not defined.', 'objects_where_role_clauses', $src_name) ); - return ' 1=2 '; - } - - // special case to include pending / scheduled revisions by object role - if ( ! isset( $args['objrole_revisions_clause'] ) ) { - $args['objrole_revisions_clause'] = strpos( $_SERVER['REQUEST_URI'], 'p-admin/edit.php' ) || strpos( $_SERVER['REQUEST_URI'], 'p-admin/edit-pages.php' ); - } - - - if ( 'group' == $src_name ) { - $use_object_roles = true; - } elseif ( ! empty($src->no_object_roles) ) - $use_object_roles = false; - elseif ( $object_type && ! is_array($object_type) && (-1 == $use_object_roles) ) - $use_object_roles = scoper_get_otype_option('use_object_roles', $src_name, $object_type); - - $args['use_object_roles'] = $use_object_roles; - - if ( $use_object_roles ) { - $applied_object_roles = $scoper->role_defs->get_applied_object_roles($user); // no content date limits involved for object roles - - // Return all object_ids that require any role to be object-assigned - // We will use an ID NOT IN clause so these are not satisfied by blog/term role assignment - $objscope_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name); - } else { - $applied_object_roles = ''; - $objscope_objects = ''; - } - - $where = array(); - - foreach ( $reqd_caps as $cap_name ) { - // If supporting custom user blogcaps, a separate role clause for each cap - // Otherwise (default) all reqd_caps from one role assignment (whatever scope it may be) - if ( $custom_user_blogcaps ) { - $reqd_caps_arg = array($cap_name); - } else { - $reqd_caps_arg = $reqd_caps; - $cap_name = ''; - } - - if ( $terms_query && ('rs' == SCOPER_ROLE_TYPE) ) { - $exclude_object_types = array(); - // Terms query may not specify a single object type. - // Need to exclude roles which don't apply because their object type has term roles disabled - // This is a complication created by the otype-ambiguous 'read' cap - foreach ( array_keys($src->object_types) as $this_otype ) { - if ( ! scoper_get_otype_option('use_term_roles', $src_name, $this_otype) ) - $exclude_object_types [] = $this_otype; - } - } else - $exclude_object_types = array(); - - - $qualifying_roles = $scoper->role_defs->qualify_roles($reqd_caps_arg, '', $object_type, array('exclude_object_types' => $exclude_object_types) ); // 'blog' arg: Account for WP blog_roles even if scoping with RS roles - - // For object assignment, replace any "others" reqd_caps array. - // Also exclude any roles which have never been assigned to any object - if ( $use_object_roles ) { - $base_caps_only = ! $require_full_object_role && ! $this->require_full_object_role; - - $qualifying_object_roles = $scoper->role_defs->qualify_object_roles($reqd_caps_arg, $object_type, $applied_object_roles, $base_caps_only); - } - - if ( $alternate_reqd_caps ) { // $alternate_reqd_caps[setnum] = array of cap_names - foreach ( $alternate_reqd_caps as $alternate_capset ) { - foreach ( $alternate_capset as $alternate_reqd_caps ) { - if ( $alternate_roles = $scoper->role_defs->qualify_roles($alternate_reqd_caps) ) - $qualifying_roles = array_merge($qualifying_roles, $alternate_roles); - - if ( $use_object_roles ) - if ( $alternate_object_roles = $scoper->role_defs->qualify_object_roles($alternate_reqd_caps, '', $applied_object_roles, $base_caps_only) ) - $qualifying_object_roles = array_merge($qualifying_object_roles, $alternate_object_roles); - } - } - } - - // this is needed mainly for the chicken-egg situation of uploading a file prior into a post before a category is stored, when editing rights are based on category - $ignore_restrictions = ( 1 == count($reqd_caps_arg) ) && $scoper->cap_defs->member_property( reset($reqd_caps_arg), 'ignore_restrictions' ); - - if ( $qualifying_roles ) { - $args = array_merge($args, array( 'qualifying_roles' => $qualifying_roles) ); - - if ( $use_object_roles ) - $args = array_merge($args, array ('qualifying_object_roles' => $qualifying_object_roles, 'objscope_objects' => $objscope_objects, 'applied_object_roles' => $applied_object_roles, 'ignore_restrictions' => $ignore_restrictions ) ); - - $where[$cap_name]['user'] = $this->objects_where_scope_clauses($src_name, $reqd_caps_arg, $args ); - } - - if ( ! empty($src->cols->owner) && ! $skip_owner_clause && $user->ID ) { - if ( ! $require_full_object_role && ! $this->require_full_object_role ) { - - // if owner qualifies for the operation by any different roles than other users, add separate owner clause - $owner_reqd_caps = $scoper->cap_defs->remove_owner_caps($reqd_caps_arg); - - $src_table = ( ! empty($source_alias) ) ? $source_alias : $src->table; - - if ( ! $owner_reqd_caps ) { - // all reqd_caps are granted to owner automatically - $where[$cap_name]['owner'] = "$src_table.{$src->cols->owner} = '$user->ID'"; - } elseif ( $owner_reqd_caps != $reqd_caps_arg ) { - $owner_roles = $scoper->role_defs->qualify_roles($owner_reqd_caps, '', $object_type); - - if ( $owner_roles ) { - $args = array_merge($args, array( 'qualifying_roles' => $owner_roles, 'applied_object_roles' => $applied_object_roles, 'ignore_restrictions' => $ignore_restrictions ) ); //TODO: test whether we should just pass existing $objscope_objects, $applied_object_roles here - - $scope_temp = $this->objects_where_scope_clauses($src_name, $owner_reqd_caps, $args ); - - if ( ( $scope_temp != $where[$cap_name]['user'] ) && ! is_null($scope_temp) ) // TODO: why is null ever returned? - $where[$cap_name]['owner'] = '( ' . $scope_temp . " ) AND $src_table.{$src->cols->owner} = '$user->ID'"; - } - } - } - } - - // all role clauses concat: user clauses [OR] [owner clauses] - if ( ! empty($where[$cap_name]) ) - $where[$cap_name] = agp_implode(' ) OR ( ', $where[$cap_name], ' ( ', ' ) '); - - // if not supporting custom caps, we actually passed all reqd_caps in first iteration - if ( ! $custom_user_blogcaps ) - break; - } - - // all reqd caps concat: cap1 clauses [AND] [cap2 clauses] [AND] ... - if ( ! empty($where) ) - $where = agp_implode(' ) AND ( ', $where, ' ( ', ' ) '); - - return $where; - } - - function objects_where_scope_clauses($src_name, $reqd_caps, $args ) { - $defaults = array( 'user' => '', 'qualifying_roles' => array(), 'qualifying_object_roles' => array(), 'taxonomies' => '', - 'use_blog_roles' => true, 'use_term_roles' => true, 'use_object_roles' => true, 'terms_query' => false, - 'objscope_objects' => '', 'skip_objscope_check' => false, 'applied_object_roles' => '', 'object_type' => '', - 'require_full_object_role' => false, 'objrole_revisions_clause' => false, 'join' => '', - 'ignore_restrictions' => false ); - - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( ! $src = $scoper->data_sources->get($src_name) ) { - rs_notice ( sprintf( 'Role Scoper Config Error (%1$s): Data source (%2$s) is not defined.', 'objects_where_scope_clauses', $src_name ) ); - return ' 1=2 '; - } - - $src_table = ( ! empty($source_alias) ) ? $source_alias : $src->table; - - if ( 'group' == $src_name ) - $use_object_roles = true; - elseif ( ! empty($src->no_object_roles) ) - $use_object_roles = false; - - if ( ! $object_type ) - $object_type = $scoper->data_sources->detect('type', $src); - - // ---- The following default argument generation is included to support potential direct usage of this function - // (not needed by call from flt_objects_where / objects_where_role_clauses) ----------------- - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - if ( empty($user) ) - return '1=2'; - - if ( ! $qualifying_roles ) - $qualifying_roles = $scoper->role_defs->qualify_roles($reqd_caps, SCOPER_ROLE_TYPE, $object_type); - else - $qualifying_roles = $scoper->role_defs->filter_roles_by_type($qualifying_roles, SCOPER_ROLE_TYPE); - - if ( $skip_objscope_check ) - $objscope_objects = array(); - else { - if ( ! $terms_query || $use_object_roles ) - if ( ! $objscope_objects ) - $objscope_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name); - } - - if ( $use_object_roles && ! $qualifying_object_roles ) { - // For object assignment, replace any "others" reqd_caps array. - // Also exclude any roles which have never been assigned to any object - $base_caps_only = ! $require_full_object_role && ! $this->require_full_object_role; - $qualifying_object_roles = $scoper->role_defs->qualify_object_roles($reqd_caps, $object_type, $applied_object_roles, $base_caps_only); - } - //--------------------------------------------------------------------------------- - - - //d_echo ("qualifying obj roles"); - - // for term admin query, object source type is passed in, but rs qualifying roles are by taxonomy - if ( ! $qualifying_roles && $object_type && ( 'rs' == SCOPER_ROLE_TYPE) ) { - $caps_by_src = $scoper->cap_defs->organize_caps_by_otype($reqd_caps); - if ( ! empty($caps_by_src[$src_name]) && is_array($caps_by_src[$src_name]) ) - if ( ! isset($caps_by_src[$src_name][$object_type]) ) { - $object_type = key($caps_by_src[$src_name]); // setting taxonomy as the object type - $qualifying_roles = $scoper->role_defs->qualify_roles($reqd_caps, SCOPER_ROLE_TYPE, $object_type); - } - } - - if ( -1 === $use_object_roles ) - $use_object_roles = scoper_get_otype_option('use_object_roles', $src_name, $object_type); - - if ( $use_object_roles ) - $user_qualifies_for_obj_roles = ( $user->ID || defined( 'SCOPER_ANON_METAGROUP' ) ); - - $where = array(); - - if ( 'wp' == SCOPER_ROLE_TYPE ) { - // TODO: confirm that this is no longer needed - if ( ! $user->ID && isset($scoper->role_defs->role_caps[ANON_ROLEHANDLE_RS]) ) - if ( array_intersect_key($scoper->role_defs->role_caps[ANON_ROLEHANDLE_RS], array_flip($reqd_caps) ) ) - $qualifying_roles = array_merge($qualifying_roles, array(ANON_ROLEHANDLE_RS => 1)); - } - - if ( $use_term_roles ) { - // taxonomies arg is for limiting; default is to include all associated taxonomies in where clause - if ( $taxonomies ) - $taxonomies = (array) $taxonomies; // don't do array_intersect with uses_taxonomies here because flt_terms_where will call with src_name=taxonomy source (which does not itself have a uses_taxonomies property) - else - $taxonomies = $src->uses_taxonomies; - } - - $user_blog_roles = array( '' => array() ); - - if ( $use_blog_roles ) { - foreach( array_keys($user->blog_roles) as $date_key ) - $user_blog_roles[$date_key] = array_intersect_key( $user->blog_roles[$date_key], $qualifying_roles ); - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - // Also include user's WP blogrole(s), - // but via equivalent RS role(s) to support scoping requirements (strict (i.e. restricted) terms, objects) - if ( $wp_qualifying_roles = $scoper->role_defs->qualify_roles($reqd_caps, 'wp') ) { - if ( $user_blog_roles_wp = array_intersect_key( $user->blog_roles[ANY_CONTENT_DATE_RS], $wp_qualifying_roles ) ) { - // Credit user's qualifying WP blogrole via contained RS role(s) - // so we can also enforce "term restrictions", which are based on RS roles - $user_blog_roles_via_wp = $scoper->role_defs->get_contained_roles( array_keys($user_blog_roles_wp), false, 'rs'); - $user_blog_roles_via_wp = array_intersect_key($user_blog_roles_via_wp, $qualifying_roles); - - $user_blog_roles[ANY_CONTENT_DATE_RS] = array_merge( $user_blog_roles[ANY_CONTENT_DATE_RS], $user_blog_roles_via_wp); - } - } - } - } - - //dump($objscope_objects); - - /* - // --- optional hack to require read_private cap via blog role AND object role - // if the required capabilities include a read_private cap but no edit caps - $require_blog_and_obj_role = - ( in_array('read_private_posts', $reqd_caps) || in_array('read_private_pages', $reqd_caps) ) - && ( ! array_diff( $reqd_caps, array('read_private_posts', 'read_private_pages', 'read') ) ); - // --- end hack --- - */ - - foreach ( array_keys($qualifying_roles) as $role_handle ) { - - if ( $use_object_roles && empty($require_blog_and_obj_role) ) { - if ( ! empty($objscope_objects['restrictions'][$role_handle]) ) { - $objscope_clause = " AND $src_table.{$src->cols->id} NOT IN ('" . implode("', '", array_keys($objscope_objects['restrictions'][$role_handle])) . "')"; - } - elseif ( isset($objscope_objects['unrestrictions'][$role_handle]) ) { - if ( ! empty($objscope_objects['unrestrictions'][$role_handle]) ) - $objscope_clause = " AND $src_table.{$src->cols->id} IN ('" . implode("', '", array_keys($objscope_objects['unrestrictions'][$role_handle])) . "')"; - else - $objscope_clause = " AND 1=2"; // role is default-restricted for this object type, but objects are unrestrictions are set - } else - $objscope_clause = ''; - } else - $objscope_clause = ''; - - - $all_terms_qualified = array(); - $all_taxonomies_qualified = array(); - - if ( $use_term_roles ) { - $args['return_id_type'] = COL_TAXONOMY_ID_RS; - - $strict_taxonomies = array(); - - foreach ($taxonomies as $taxonomy) - if ( $scoper->taxonomies->member_property($taxonomy, 'requires_term') ) - $strict_taxonomies[$taxonomy] = true; - - foreach ($taxonomies as $taxonomy) { - // we only need a separate clause for each role if considering object roles (and therefore considering that some objects might require some roles to be object-assigned) - if ( ! $use_object_roles ) - $role_handle_arg = $qualifying_roles; - else - $role_handle_arg = array( $role_handle => 1 ); - - // If a taxonomy does not require objects to have a term, its term role assignments - // will be purely supplemental; there is no basis for ignoring blogrole assignments. - // - // So if none of the taxonomies require each object to have a term - // AND the user has a qualifying role via blog assignment, we can skip the taxonomies clause altogether. - // Otherwise, will consider current user's termroles - if ( ! $strict_taxonomies ) { - if ( array_intersect_key($role_handle_arg, $user->blog_roles[ANY_CONTENT_DATE_RS]) ) { - // User has a qualifying role by blog assignment, so term_id clause is not required - $all_taxonomies_qualified[ANY_CONTENT_DATE_RS] = true; - break; - } - } - - // qualify_terms returns: - // terms for which current user has a qualifying role - // - AND - - // which are non-restricted (i.e. blend in blog assignments) for a qualifying role which the user has blog-wide - // - // note: $reqd_caps function arg is used; qualify_terms will ignore reqd_caps element in args array - $args['src_name'] = $src_name; - $args['object_type'] = $object_type; - - - if ( $user_terms = $scoper->qualify_terms_daterange($reqd_caps, $taxonomy, $role_handle_arg, $args) ) { - - if ( ! isset($term_count[$taxonomy]) ) - $term_count[$taxonomy] = $scoper->get_terms($taxonomy, UNFILTERED_RS, COL_COUNT_RS); - - foreach ( array_keys($user_terms) as $date_key ) { - if ( count($user_terms[$date_key]) ) { - // don't bother applying term requirements if user has cap for all terms in this taxonomy - if ( (count($user_terms[$date_key]) >= $term_count[$taxonomy]) && $scoper->taxonomies->member_property($taxonomy, 'requires_term') ) { - - // User is qualified for all terms in this taxonomy; no need for any term_id clauses - $all_terms_qualified[$date_key][$taxonomy] = true; - } else { - $where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy] = ( isset($where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy]) ) ? array_unique( array_merge($where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy], $user_terms[$date_key]) ) : $user_terms[$date_key]; - } - } - - $all_taxonomies_qualified[$date_key] = ! empty( $all_terms_qualified[$date_key] ) && ( count($all_terms_qualified[$date_key]) == count($strict_taxonomies) ); - } - } - } // end foreach taxonomy - } - - foreach ( array_keys($user_blog_roles) as $date_key ) { - if ( ! empty($all_taxonomies_qualified[$date_key]) || ( ! $use_term_roles && ! empty($user_blog_roles[$date_key][$role_handle]) ) ) { - if ( $date_key || $objscope_clause || ! empty($require_blog_and_obj_role) ) - $where[$date_key][$objscope_clause][BLOG_SCOPE_RS] = "1=1"; - else { - return "1=1"; // no need to include other clause if user has a qualifying role blog-wide or in all terms, it is not date-limited, and that role does not require object assignment for any objects - } - } - } - - // if object roles should be applied, populatate array key to force inclusion of OBJECT_SCOPE_RS query clauses below - if ( $use_object_roles && isset($qualifying_object_roles[$role_handle]) && $user_qualifies_for_obj_roles ) { // want to apply objscope requirements for anon user, but not apply any obj roles - if ( $role_spec = scoper_explode_role_handle($role_handle) ) - $where[ANY_CONTENT_DATE_RS][NO_OBJSCOPE_CLAUSE_RS][OBJECT_SCOPE_RS][$role_spec->role_type][$role_spec->role_name] = true; - } - - // we only need a separate clause for each role if considering object roles (and therefore considering that some objects might require some roles to be object-assigned) - if ( ! $use_object_roles && ! empty($where[ANY_CONTENT_DATE_RS]) ) - break; - } // end foreach role - - - // also include object scope clauses for any roles which qualify only for object-assignment - if ( $use_object_roles && isset( $qualifying_object_roles ) && $user_qualifies_for_obj_roles ) { // want to apply objscope requirements for anon user, but not apply any obj roles - if ( $obj_only_roles = array_diff_key( $qualifying_object_roles, $qualifying_roles ) ) { - foreach ( array_keys($obj_only_roles) as $role_handle ) - if ( $role_spec = scoper_explode_role_handle($role_handle) ) - $where[ANY_CONTENT_DATE_RS][NO_OBJSCOPE_CLAUSE_RS][OBJECT_SCOPE_RS][$role_spec->role_type][$role_spec->role_name] = true; - } - } - - // DB query perf enhancement: if any terms are included regardless of post ID, don't also include those terms in ID-specific clause - foreach ( array_keys($where) as $date_key ) { - foreach ( array_keys($where[$date_key]) as $objscope_clause ) { - if ( $objscope_clause && isset($where[$date_key][$objscope_clause][TERM_SCOPE_RS]) ) { - foreach ( $where[$date_key][$objscope_clause][TERM_SCOPE_RS] as $taxonomy => $terms ) { - - if ( ! empty($terms) && ! empty($where[$date_key][NO_OBJSCOPE_CLAUSE_RS][TERM_SCOPE_RS][$taxonomy]) ) { - $where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy] = array_diff( $where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy], $where[$date_key][NO_OBJSCOPE_CLAUSE_RS][TERM_SCOPE_RS][$taxonomy] ); - - if ( empty( $where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy] ) ) { - unset( $where[$date_key][$objscope_clause][TERM_SCOPE_RS][$taxonomy] ); - - // if we removed a taxonomy array, don't leave behind a term scope array with no taxonomies - if ( empty( $where[$date_key][$objscope_clause][TERM_SCOPE_RS] ) ) { - unset( $where[$date_key][$objscope_clause][TERM_SCOPE_RS] ); - - // if we removed a term scope array, don't leave behind an objscope array with no scopes - if ( empty( $where[$date_key][$objscope_clause] ) ) - unset( $where[$date_key][$objscope_clause] ); - } - } - } - } - } - } - } - - //d_echo ("where_scope_clauses where array"); - - // since object roles are not pre-loaded prior to this call, role date limits are handled via subselect, within the date_key = '' iteration - $object_roles_duration_clause = scoper_get_duration_clause(); - - // support mirroring of inconveniently stored 3rd party plugin data into data_rs table (by RS Extension plugins) - $rs_data_clause = ( ! empty($src->uses_rs_data_table) ) ? "AND $src_table.topic = 'object' AND $src_table.src_or_tx_name = '$src_name' AND $src_table.object_type IN ('" . implode("', '", $object_types) . "')" : ''; - - - // implode the array of where criteria into a query as concisely as possible - foreach ( $where as $date_key => $objscope_clauses ) { - - foreach ( $objscope_clauses as $objscope_clause => $scope_criteria ) { - - foreach ( array_keys($scope_criteria) as $scope ) { - - switch ($scope) { - case BLOG_SCOPE_RS: - $where[$date_key][$objscope_clause][BLOG_SCOPE_RS] = $where[$date_key][$objscope_clause][BLOG_SCOPE_RS] . " $objscope_clause"; - break; - - case TERM_SCOPE_RS: - $taxonomy_clauses = array(); - - foreach ( $scope_criteria[TERM_SCOPE_RS] as $taxonomy => $terms ) { - $is_strict = ! empty( $strict_taxonomies[$taxonomy] ); - - if ( $objscope_clause ) - // Avoid " term_id IN (5) OR ( term_id IN (5) AND ID NOT IN (100) ) - // Otherwise this redundancy can occur when various qualifying roles require object role assignment for different objects - if ( ! empty($where[$date_key][NO_OBJSCOPE_CLAUSE_RS][TERM_SCOPE_RS][$taxonomy]) ) - if ( ! $terms = array_diff($terms, $where[$date_key][NO_OBJSCOPE_CLAUSE_RS][TERM_SCOPE_RS][$taxonomy]) ) { - //unset($scope_criteria[TERM_SCOPE_RS][$taxonomy]); // this doesn't affect anything (removed in v1.1) - continue; - } - - $terms = array_unique($terms); - if ( $qvars = $scoper->taxonomies->get_terms_query_vars($taxonomy) ) - if ( $terms_query && ! $use_object_roles ) { - $qtv = $scoper->taxonomies->get_terms_query_vars($taxonomy, true); - $taxonomy_clauses[$is_strict] []= "{$qtv->term->alias}.{$qtv->term->col_id} IN ('" . implode("', '", $terms) . "') $objscope_clause"; - } else { - $this_tx_clause = "{$qvars->term->alias}.{$qvars->term->col_id} IN ('" . implode("', '", $terms) . "')"; - - // If the request already has a corresponding join on the object2term (term_relationships) table, use it. Otherwise, use a subselect rather than adding our own LEFT JOIN. - // (But if this taxonomy is strict and uses the WP term_relationships table, we cannot add an AND clause referencing the same INNER JOIN as aliases as those used for categories.) - //if( $this->is_term_table_joined( $join, $taxonomy ) && ( ! $is_strict || ( 'category' == $taxonomy ) || ! $scoper->taxonomies->member_property( $taxonomy, 'uses_standard_schema' ) ) ) - // $taxonomy_clauses[$is_strict] []= "$this_tx_clause $objscope_clause"; - //else { - $terms_subselect = "SELECT {$qvars->term->alias}.{$qvars->term->col_obj_id} FROM {$qvars->term->table} {$qvars->term->as} WHERE $this_tx_clause $rs_data_clause"; - $taxonomy_clauses[$is_strict] []= "$src_table.{$src->cols->id} IN ( $terms_subselect ) $objscope_clause"; - //} - } - } - - if ( $taxonomy_clauses ) { - // all taxonomy clauses concat: [taxonomy 1 clauses] [OR] [taxonomy 2 clauses] [OR] ... - //$where[$date_key][$objscope_clause][TERM_SCOPE_RS] = agp_implode(' ) OR ( ', $taxonomy_clauses, ' ( ', ' ) '); - - // strict taxonomy clauses - if ( ! empty( $taxonomy_clauses[true] ) ) - $taxonomy_clauses[true] = agp_implode(' ) AND ( ', $taxonomy_clauses[true], ' ( ', ' ) '); - - // non-strict taxonomy clauses - if ( ! empty( $taxonomy_clauses[false] ) ) - $taxonomy_clauses[false] = agp_implode(' ) OR ( ', $taxonomy_clauses[false], ' ( ', ' ) '); - - // all taxonomy clauses concat: ( [strict taxonomy clause 1] [AND] [strict taxonomy clause 2]... ) [OR] [taxonomy 3 clauses] [OR] ... - $where[$date_key][$objscope_clause][TERM_SCOPE_RS] = agp_implode(' ) OR ( ', $taxonomy_clauses, ' ( ', ' ) '); - } - - break; - - case OBJECT_SCOPE_RS: // should only exist with nullstring objscope_clause - if ( $user_qualifies_for_obj_roles ) { - global $wpdb; - $u_g_clause = $user->get_user_clause('uro'); - - foreach ( array_keys($scope_criteria[OBJECT_SCOPE_RS]) as $role_type ) { //should be only one - // Combine all qualifying (and applied) object roles into a single OR clause - $role_in = "'" . implode("', '", array_keys($scope_criteria[OBJECT_SCOPE_RS][$role_type])) . "'"; - //$where[$date_key][$objscope_clause][OBJECT_SCOPE_RS] = "uro.role_type = '$role_spec->role_type' AND uro.role_name IN ($role_in) "; - - $objrole_subselect = "SELECT uro.obj_or_term_id FROM $wpdb->user2role2object_rs AS uro WHERE uro.role_type = '$role_spec->role_type' AND uro.scope = 'object' AND uro.assign_for IN ('entity', 'both') AND uro.role_name IN ($role_in) AND uro.src_or_tx_name = '$src_name' $object_roles_duration_clause $u_g_clause $rs_data_clause"; - $where[$date_key][$objscope_clause][OBJECT_SCOPE_RS] = "$src_table.{$src->cols->id} IN ( $objrole_subselect )"; - - if ( $objrole_revisions_clause ) - $where[$date_key][$objscope_clause][OBJECT_SCOPE_RS] = "( {$where[$date_key][$objscope_clause]['object']} OR ( $src_table.{$src->cols->type} = 'revision' AND $src_table.{$src->cols->parent} IN ( $objrole_subselect ) ) )"; - } - } - - break; - } // end scope switch - } // end foreach scope - - /* - // --- optional hack to require read_private cap via blog role AND object role - if ( ! empty($require_blog_and_obj_role) ) { - if ( ! isset($where[$date_key][''][BLOG_SCOPE_RS]) ) - $where[$date_key][''][BLOG_SCOPE_RS] = '1=2'; - - if ( ! isset($where[$date_key][''][TERM_SCOPE_RS]) ) - $where[$date_key][''][TERM_SCOPE_RS] = '1=2'; - - if ( ! isset($where[$date_key][''][OBJECT_SCOPE_RS]) ) - $where[$date_key][''][OBJECT_SCOPE_RS] = '1=2'; - - $where[$date_key][''] = "( ( {$where[$date_key]['']['blog']} ) OR ( {$where[$date_key]['']['term']} ) ) AND ( {$where[$date_key]['']['object']} )"; - } - else - // --- end hack - */ - // all scope clauses concat: [object roles] OR [term ids] OR [blogrole1 clause] [OR] [blogrole2 clause] [OR] ... - // Collapse the array to a string even if it's empty - $where[$date_key][$objscope_clause] = agp_implode(' ) OR ( ', $where[$date_key][$objscope_clause], ' ( ', ' ) '); - } // end foreach objscope clause - - $date_clause = ''; - - if ( $date_key && is_serialized($date_key) ) { - $content_date_limits = unserialize($date_key); - - if ( $content_date_limits->content_min_date_gmt ) - $date_clause .= " AND $src_table.{$src->cols->date} >= '" . $content_date_limits->content_min_date_gmt . "'"; - - if ( $content_date_limits->content_max_date_gmt ) - $date_clause .= " AND $src_table.{$src->cols->date} <= '" . $content_date_limits->content_max_date_gmt . "'"; - } - - foreach ( array_keys($where[$date_key]) as $objscope_clause ) - if ( empty ($where[$date_key][$objscope_clause]) ) - unset($where[$date_key][$objscope_clause]); - - // all objscope clauses concat: [clauses w/o objscope] [OR] [objscope 1 clauses] [OR] [objscope 2 clauses] - $where[$date_key] = agp_implode(' ) OR ( ', $where[$date_key], ' ( ', ' ) '); - - if ( $date_clause && $where[$date_key] ) - $where[$date_key] = "( $where[$date_key]{$date_clause} )"; - - } // end foreach datekey (set of content date limits for which role(s) apply) - - - foreach ( array_keys($where) as $date_key ) - if ( empty ($where[$date_key]) ) - unset($where[$date_key]); - - // all date clauses concat: [clauses w/o content date limits] [OR] [content date range 1 clauses] [OR] [content date range 2 clauses] - $where = agp_implode(' ) OR ( ', $where, ' ( ', ' ) '); - - if ( empty($where) ) - $where = '1=2'; - - return $where; - } - - // currently only used to conditionally launch teaser filtering - function flt_objects_results($results, $src_name, $object_types, $args = '') { - - if ( strpos($_SERVER['SCRIPT_NAME'], 'p-admin/edit-pages.php') && ! is_content_administrator_rs() ) { - // ScoperAncestry class is loaded by hardway_rs.php - $ancestors = ScoperAncestry::get_page_ancestors(); // array of all ancestor IDs for keyed page_id, with direct parent first - - $args = array( 'remap_parents' => false ); - ScoperHardway::remap_tree( $results, $ancestors, 'ID', 'post_parent', $args ); - } - - if ( empty($this->skip_teaser) ) - // won't do anything unless teaser is enabled for object type(s) - $results = apply_filters('objects_teaser_rs', $results, $src_name, $object_types, array('force_teaser' => true)); - - return $results; - } - - function flt_objects_teaser($results, $src_name, $object_types = '', $args = '') { - $defaults = array('user' => '', 'use_object_roles' => -1, 'use_term_roles' => -1, 'request' => '', 'force_teaser' => false); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb; - global $scoper; - - if ( is_admin() || defined('XMLRPC_REQUEST') ) - return $results; - - // don't risk exposing hidden content if there is a problem with data source definition - if ( ! $src = $scoper->data_sources->get($src_name) ) - return array(); - - if ( ! isset($src->cols->id) || ! isset($src->cols->content) || ! isset($src->cols->type) ) - return array(); - - $object_types = $this->_get_object_types($src, $object_types); - $tease_otypes = $this->_get_teaser_object_types($src_name, $object_types, $args); - - if ( empty($tease_otypes) || ( empty($force_teaser) && ! array_intersect($object_types, $tease_otypes) ) ) - return $results; - - require_once('teaser_rs.php'); - return ScoperTeaser::objects_teaser($results, $src_name, $object_types, $tease_otypes, $args); - } - -} // end class - - -function agp_parse_after_WHERE_11( $request, &$pos_where, &$pos_suffix ) { - $request_u = strtoupper($request); - $pos_where = strpos( $request_u, ' WHERE 1=1 '); - - if ( ! $pos_where ) { - $suffix_terms = array(' ORDER BY ', ' GROUP BY ', ' LIMIT '); - $pos_suffix = strlen($request) + 1; - foreach ( $suffix_terms as $suffix_term ) - if ( $pos = strrpos($request_u, $suffix_term) ) - if ( $pos < $pos_suffix ) - $pos_suffix = $pos; - - if ( $pos_suffix ) - $where = substr($request, $pos_suffix); - - } else { - // note: this will still also contain any orderby/limit/groupby clauses ( okay since we won't append anything to the end ) - $where = substr($request, $pos_where + strlen(' WHERE 1=1 ')); - } - - return $where; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/readme.txt b/blog/wp-content/plugins/role-scoper/readme.txt deleted file mode 100644 index 5fea4ce..0000000 --- a/blog/wp-content/plugins/role-scoper/readme.txt +++ /dev/null @@ -1,594 +0,0 @@ -=== Plugin Name === -Contributors: kevinB -Donate link: http://agapetry.net/news/introducing-role-scoper/#role-scoper-download -Tags: restrict, access, permissions, cms, user, groups, members, admin, category, categories, pages, posts, page, Post, privacy, private, attachment, upload, files, rss, feed, feeds -Requires at least: 2.5 -Tested up to: 2.9.2 -Stable Tag: 1.1.7 - -CMS-like permissions for reading and editing. Content-specific restrictions and roles supplement/override WordPress roles. User groups optional. - -== Description == -Role Scoper is a comprehensive access control solution, giving you CMS-like control of reading and editing permissions. Assign restrictions and roles to specific pages, posts or categories. - -= How it works: = -Your WordPress core role definitions remain unchanged, and continue to function as default permissions. User access is altered only as you expand it by assigning content-specific roles, or reduce it by setting content-specific restrictions. - -Users of any level can be elevated to read or edit content of your choice. Restricted content can be withheld from users lacking a content-specific role, regardless of their WP role. Deactivation or removal of Role Scoper will return each user to their standard WordPress access (but all RS settings remain harmlessly in the database in case you change your mind). - -Scoped role restrictions and assignments are reflected in every aspect of the WordPress interface, from front end content and navigation to administrative post and comment totals. Although Role Scoper provides extreme flexibility and powerful bulk administration forms, basic usage is just a set of user checkboxes in the Post/Page Edit Form. - -= Partial Feature List = -* Customize access for specific Pages, Posts, Categories -* Control Read and/or Edit access -* WP roles work as is but can be limited by content-specific restrictions -* Assign additional content-specific roles to Users or User Groups -* Assign additional blog-wide role for a specific object type -* Can elevate Subscribers to edit desired content (ensures safe failure mode) -* Control which categories users can post to -* Control which pages users can associate sub-pages to -* Specify element(s) in Edit Form to withhold from non-Editors -* Limit the duration of role assignments -* Limit the content dates which a role assignment applies to -* Front-end Page, Category and Tag listings match modified access -* Customizable Hidden Content Teaser (or hide posts/pages completely) -* RSS Feed Filter with HTTP authentication option -* File Attachment filter blocks direct URL requests if user can't read corresponding post/page -* Inheritance of Restrictions and Roles to sub-categories / sub-pages -* Default Restrictions and Roles for new content -* Un-editable posts/pages are excluded from the editing list -* Optimized to limit additional database queries -* XML-RPC support -* Integrates with the Revisionary plugin for moderated revisioning of published content. -* Extensive WP-mu support - -= Plugin API = -* Apply restrictions and roles for any custom taxonomy -* Abstract architecture and API allow other plugins to define their own role definitions for scoping -* Author provides some extensions to support integration with other plugins - -= Template Functions = -Theme code can utilize the is_restricted_rs() and is_teaser_rs() functions to customize front-end styling. - -Other useful functions include users_who_can(), which accounts for all content-specific roles and restrictions. - -For more information, see the Usage Guide or Support Forum. - -= Support = -* Most Bug Reports and Plugin Compatibility issues addressed promptly following your support forum submission. -* Author is available for professional consulting to meet your configuration, troubleshooting and customization needs. - - -== Installation == -Role Scoper can be installed automatically via the Plugins tab in your blog administration panel. - -= To install manually instead: = -1. Upload `role-scoper_?.zip` to the `/wp-content/plugins/` directory -1. Extract `role-scoper_?.zip` into the `/wp-content/plugins/` directory -1. Activate the plugin through the 'Plugins' menu in WordPress - - -== Frequently Asked Questions == -How can I prevent low-level users from seeing the Roles/Restrictions menus and Edit boxes? -In your blog admin, navigate to Roles > Options. In the "Content Maintenance" section, set the option "Roles and Restrictions can be set" to "by blog-wide Editors and Administrators" or "by Administrators only". Click the Update button. - - -How does Role Scoper compare to Role Manager or Capability Manager? -Role Scoper's functionality is entirely different and complementary to RM and CM. RM/CM do little more than alter WordPress' definition of the capabilities included in each role. That's a valuable task, and in many cases will be all the role customization you need. Since RM/CM modifications are stored in the main WordPress database, they remain even if RM/CM is deactivated. - -Role Scoper is useful when you want to customize access to specific content, not just blog-wide. It will work with the WP roles as a starting point, whether customized by RM/CM or not. To see how Role Scoper's role definitions correlate to your WordPress roles, navigate to Roles > Options > RS Role Definitions in your blog admin. Role Scoper's modifications remain only while it stays active. - - -Why are there so many options? Do I really need Role Scoper? -It depends on what you're trying to accomplish with your WordPress installation. Role Scoper is designed to be functionally comprehensive and flexible. Great pains were taken to maintain performance and user-friendliness. Yet there are simpler permission plugins out there, particularly if you only care about read access. Review Role Scoper's feature list and decide what's important to you. - -Why doesn't Role Scoper limit direct access to files that I've uploaded via FTP? -Role Scoper only filters files in the WP uploads folder (or a subfolder). The uploads folder must be a branch of the WordPress directory tree. The files must be formally attached to a post / page via the WordPress uploader or via the RS Attachments Utility. - -In your blog admin, navigate to Roles > Options > Features > Attachments > Attachments Utility. - -Where does Role Scoper store its settings? How can I completely remove it from my database? -Role Scoper creates and uses the following tables: groups_rs, user2group_rs, role_scope_rs, user2role2object_rs. All RS-specific options stored to the WordPress options table have an option name prefixed with "scoper_". - -Due to the potential damage incurred by accidental deletion, no automatic removal is currently available. You can use a SQL editing tool such as phpMyAdmin to drop the tables and delete the scoper options. - - -== Screenshots == - -1. Admin menus -2. Role boxes in Edit Post Form -3. Role boxes in Edit Page Form -4. Category Restrictions -5. Category Roles -6. View an html sample of the Category Roles bulk admin form -7. View an html sample of Role Scoper Options -8. View more screenshots - - -== Changelog == - -= 1.1.7 - 15 Feb 2010 = -* BugFix : In Post/Page Edit Form, user checkboxes for role assignment were not sorted alphabetically (since 1.1.RC1) -* Feature : Omit other users' trashed posts from Edit Posts / Edit Pages listing if not editable by logged user -* Compat : Initial WP 3.0 compat (fixing errors related to custom post type and changes to contextual help API) -* Change : Widen Page Parent dropdown on Edit Page Form to full width of Attributes box - - -**1.1.6 - 13 Feb 2010** - -= File Filtering Fixes = -* BugFix : File Filtering failed on some installations, possibly causing an Internal Server Error -* BugFix : In WP-MU with File Filtering enabled, .htaccess file in uploads folders was regenerated on each site access (since 1.1.2) -* BugFix : In non-MU installations, .htaccess file was not immediately updated on activation / deactivation of File Filtering - -= Other Changes = -* BugFix : Non-Administrators could not modify any Roles or Restrictions via bulk admin forms, even if some are delegated to them -* Lang : Added Spanish translation (Rafael Pérez Gana - http://www.rafo.cl/) -* Change : Use https link for Role Scoper css and js files if ssl is being used / forced for the current uri -* BugFix : Archives listing using postbypost listing type did not display private posts to logged Administrator -* BugFix : Template function is_protected() / is_restricted() did not work with secondary queries -* BugFix : Private posts / pages not sometimes hidden from logged Administrators in front-end custom query results -* BugFix : PHP warnings on Edit Post / Page form (if WordPress debug mode enabled) -* BugFix : PHP notice for undefined constant (SCOPER_FORCE_FILE_INCLUSIONS) -* Feature : Support SCOPER_TEASER_HIDE_PAGE_LISTING definition, to suppress teased pages from front-end listing (while still applying teaser on direct access) - - -= 1.1.5 - 28 Jan 2010 = -* BugFix : Fatal error under some configurations: Call to undefined function is_site_admin() -* Change : Don't create a blank .htaccess file in uploads folder if there are no restricted attachments to filter -* Feature : Observe SCOPER_DEFAULT_MONITOR_GROUPS definition to disable custom editing of Pending Revision Monitors, Scheduled Revision Monitors groups - - -= 1.1.4 - 27 Jan 2010 = -* BugFix : Fatal error on activation with wp-MU if File Filtering enabled -* BugFix : File Filtering was ineffective with wp-MU under some configurations -* BugFix : Updates to Role assignments fail if MySQL does not convert nullstring to zero value for datetime storage -* Lang : Reverted _x() translation calls to __(), due to issues with poEdit support - - -**1.1.3 - 22 Jan 2010** - -= WP-mu Fatal Error = -* BugFix : Fatal error on wp-MU version upgrade, due to failed get_home_path() call (since 1.1.RC1) - -= File Filtering = -* BugFix : .htaccess file was not regenerated when File Filtering is re-enabled following a disable (since 1.1.RC1) -* BugFix : File Filtering was not imposed for new attachments to private / restricted posts (since 1.1.RC1) - -= WP 2.9 Trash Function = -* WP Compat : Trashed posts / pages were included in edit listing when status filter set to default "All" -* WP Compat : Trashed pages were included in Page Parent dropdown - -= Significant, Prevalent Bugs (new in 1.1 code base) = -* BugFix : Main Page was not selectable when Quick Editing a Page -* BugFix : Posts were included in get_pages listing if "Include private pages in listing" option was disabled and Hidden Content Teaser turned off -* BugFix : When Contributor / Author category selection is limited, valid default category was not automatically selected -* BugFix : Some Category Roles were inappropriately auto-deleted on blogs which originated with WP < 2.3 (and have cats with term_taxonomy_id != term_id) -* BugFix : With Limited Editing Elements option enabled, some Post/Page Edit Form elements were inappropriately hidden from Editors / Authors / Contributors - -= Significant but Obscure 1.1 Bugs (only affect nonstandard config) = -* BugFix : "Not valid" error message when a non-administrator saves a post/page with Role Type option set to "WP" -* BugFix : If RS Realm was customized for Page Roles only, the Restrictions menu included an invalid link to Category Restrictions -* BugFix : Some custom taxonomy queries were not filtered correctly -* BugFix : If "Remap terms" option was disabled, Category Edit Form did not list editable categories whose parent is uneditable - -= Significant but Rare 1.1 Bugs (only affect some installations) = -* BugFix : New Pages / Posts did not inherit parent restrictions, in some installations -* BugFix : New Role assignments fail if MySQL does not convert nullstring to zero value for datetime storage -* BugFix : If Additional Object Roles option was enabled for some role, Page/Post assignments of that role could not be removed -* BugFix : PHP Warning on Group creation, in some installations - -= Hidden Content Teaser = -* BugFix : Template function is_teaser_rs() did not work unless post ID was explicitly passed in (should default to ID of global $post) -* BugFix : Hidden Content Teaser, when applying "first x chars" teaser, stripped out img tag but not image caption -* Feature : Support SCOPER_NO_FEED_TEASER constant definition to prevent teasing of feed items even if teaser is enabled for main posts/pages listing - -= Nuisance Bugs = -* BugFix : Convenience links to Category / Page Restrictions and Roles (within caption text) were invalid -* BugFix : "Browse Members" link on User Groups management page was broken -* BugFix : On General Roles assignment attempt, role selections were not preserved if user/group selection is missing - -= Plugin Compatibility = -* Compat : PHP Warnings with WP Facebook Connect plugin - - -= 1.1.2 - 31 Dec 2009 = -* Change : Disable File Filtering by default, due to undiagnosed errors on some installations - - -= 1.1.1 - 30 Dec 2009 = -* BugFix : Recursive execution of category filter caused memory error in some installations - - -= 1.1 - 30 Dec 2009 = -* Feature : Additional "Lock Top Pages" option to allow any Page Author to set or remove top-level pages -* Feature : If HTTP authentication is enabled, append the http_auth argument to Category, Tag, Author and Comment feed links also -* BugFix : Changes to restrictions, roles did not clear internal cache for anonymous user (since 1.1.RC1) -* BugFix : Contributors could not upload an image before a category is set, if editing rights are based on category -* BugFix : Edit Posts listing for Published status included non-published posts (since 1.1.RC1) -* BugFix : Edit Pages listing for Published status included non-published pages (since 1.1.RC1) -* BugFix : Category Restrictions were not correctly noted in Edit Posts listing or front-end template functions (since 1.1.RC1) -* BugFix : In WP-mu dashboard, PHP warnings on first execution (since 1.1.RC1) -* BugFix : Attachments Utility did not load (since 1.1.RC1) -* Compat : Simple Section Nav: page selection list in Widget setup was broken with latest SSN version - - -= 1.1.RC3 - 18 Dec 2009 = -* BugFix : Categories listing filter was inactive for new installations and following RS Options re-save (since 1.1.RC1) -* BugFix : Invalid HTML formatting of Page Parent dropdown if no published pages exist - - -= 1.1.RC2 - 17 Dec 2009 = -* BugFix : Custom Taxonomy Restrictions were not applied correctly (since 1.1.RC1) -* BugFix : Activation Error (since 1.1.RC1) - - -**1.1.RC1 - 12 Dec 2009** - -= WP-mu: = -* Feature : Option for site-wide groups when running on WP-mu -* Feature : Most RS options can be applied either site-wide or blog-specific -* Feature : Default settings for per-blog options can be customized via Site Admin > Role Defaults -* BugFix : User RS Blog Roles were not added / removed appropriately with mu user addition / removal for specific blogs -* BugFix : RS General Role assignments were not effective; attempt to add post/page caused redirect to profile page of main blog -* BugFix : Internal cache returned categories from other blogs in some situations - -= Date Limits: = -* Feature : Roles can be assigned with limited duration (grant and expire dates) -* Feature : General Roles and Category Roles can be assigned with content date limits (role only applies for posts/pages dated within specified range) - -= File Filtering: = -* Feature : New filtering scheme eliminates many quirks by using header redirect rather than opening and sending file contents directly -* BugFix : Attachment filtering blocked some unattached files or public files. New scheme uses per-file RewriteRules, does not filter unprotected files at all. -* Feature : File filtering can be disabled / enabled via RS Option. -* Feature : Definition / removal of DISABLE_ATTACHMENT_FILTERING constant definition now forces automatic .htaccess regeneration / restoration -* BugFix : Fatal error due to failed flush_rules call on initialization, in some upgrade scenarios -* BugFix : Auto-regenerate .htaccess if it gets out of sync with DB-stored file access key(s) -* Perf : Reduce unnecessary script loading / execution when applying file filtering - -= Performance Enhacement Results: = -* Default memory usage is lower than v 1.0.8 despite feature additions. -* Further memory savings possible by disabling various features (see below). -* Decreased database execution time in several areas. - -= Performance Enhancements Details: = -* Perf : User role sync at activation (for WP role assignments) was executing a separate query for each user (leading to long delays on some installations) -* Perf : Do not resync all users on each user registration / profile update -* Perf : Extensive optimization of code structure and inclusion logic to prevent unnecessary memory usage. -* Change : Require MySQL >= 4.1 so LEFT JOINs can be replaced by subqueries -* Perf : Converted LEFT JOIN in posts query to subselect -* Perf : Eliminated unnecessary LEFT JOIN in terms query -* Perf : Further wp-admin memory savings via option to disable filtering of Post Author dropdown (if "Indicate Blended Roles" and "Limit eligible users" also disabled) -* Perf : Further front-end memory savings if you define SCOPER_GET_PAGES_LEAN (don't retrieve page content just to list page titles) -* Perf : Further wp-admin memory savings if you define SCOPER_EDIT_POSTS_LEAN, SCOPER_EDIT_PAGES_LEAN -* Perf : Eliminated redundant filtering for page parent dropdown -* Perf : Eliminated unnecessary RS queries in Media Library -* Perf : Eliminated unnecessary RS-initiated post/page retrieval queries -* Perf : No construction / translation of role names in wp-admin until they are needed -* Perf : set RS option records to autoload = no, since RS does its own buffering -* Perf : Eliminated lots of PHP warnings for unset variables / array keys -* Change : Stop storing postmeta last_parent entry for pages / posts that have no Parent setting - -= User Editing / Role Assignment: = -* Feature : support distinction between Content Administrator, User Administrator and Option Administrator. Currently designate cap for each via define( 'SCOPER_CONTENT_ADMIN_CAP', 'cap_name' ); -* Feature : Option to allow role assignment only by Content Administrators / User Administrators -* Feature : Don't allow the editing of users with a higher level than logged user (can disable via RS Option) -* Feature : Don't allow the assignment of a WP role with a higher level than logged user's level (can disable via RS Option) - -= Role Definition: = -* Feature : Synchronize RS Role Defs to WP Role Defs at installation (eliminates unexpected results when WP roles are customized) -* Feature : On RS Role Defs tab, warn if WP Roles do not have normal RS role containment (WP Author contains RS Post Author, etc.) due to extra caps in RS Role def -* Feature : On RS Role Defs tab, option to synchronize WP Contributor / Author / Editor role def with current RS Post Contributor / Post Author / Post Editor / Page Editor role def -* BugFix : WP Role Definitions tab empty on reload after updating RS Options -* Change : Post Editor / Page Editor role assignment also grants unfiltered_html capability for that content. Can be disabled via Roles > RS Role Defs. - -= Group Roles: = -* Feature : Metagroup for anonymous users - define SCOPER_ANON_METAGROUP. Only to be used when some content should be seen by anon users but not all logged users. -* BugFix : WordPress roles with name longer than 25 characters caused RS metagroup record to be perpetually regenerated with new group_id, leaving orphaned role assignments -* BugFix : Group deletion did not always delete all associated roles -* BugFix : Incorrect eligible groups count if orphaned Group Role assignments are stored -* Change : Delete all orphaned group role assignments on plugin re-activation - -= Media Library: = -* BugFix : non-administrators could not view unattached uploads via View link in Media Library -* BugFix : non-administrators could not see unattached uploads in Library tab of uploader -* BugFix : Authors were not allowed to edit or delete their unattached uploads in Media Library - -= Post / Page Edit Form: = -* Feature : Option to default new posts and/or pages to Private visibility -* Feature : Option to auto-select Private visibility when the Reader role is restricted in Page/Post Edit Form -* BugFix : On post creation, default category was not applied in some situations when author had save / publish capability for it -* BugFix : On post creation, first available category was not applied in some situations when author did not select any categories (and does not have save/publish capability for default cat) -* BugFix : Authors could not edit their own private posts / pages in some configurations -* BugFix : Non-editors were sometimes unable to save subpages of pages based on their Page Associate role; received a "cannot associate with the Main Page" error message -* BugFix : WP Metagroup Category/General Role assignments were not indicated by color coding in Post/Page Edit Form role metaboxes -* BugFix : "Attempt has failed" error when submitting post with some certain WP/RS Role Definitions and editing roles restricted in all categories -* BugFix : Out of memory / timeout error on some servers when non-Administrator views Edit Posts listing -* BugFix : In some configurations where user can edit a subpage based on propagated Page Editor role, that role assignment was lost when they saved a change to the page content. -* Change : Implicit role ownership via Category/General Role assignment is indicated by slashes around user/group name. Previous versions used square brackets. - -= Post / Page Edit Form - Limited Editing Elements: = -* Feature : Option to require blog-wide Administrator / Editor / Author / Contributor role for specified Limited Editing Element IDs -* BugFix : Comment and Trackbacks status turned off when a post was edited with Discussion metabox (commentstatusdiv) hidden via Limited Editing Elements -* BugFix : Custom Post Excerpt cleared when a post was edited with Post Excerpt metabox hidden via Limited Editing Elements setting -* Change : If a specified Limited Editing Element is not a metabox, hide it via CSS -* Change : "Limited Editing Elements" includes customdiv, pagecustomdiv, revisionsdiv by default - -= Edit Posts / Pages Listing: = -* Feature : Custom Role / Restriction indicator columns in Edit Posts and Edit Pages listing can be selectively disabled -* Feature : Custom columns are suppressed if logged user does not satisfy RS Option requirement for "Roles and Restrictions can be set by" -* BugFix : Custom Roles / Restriction indicator columns were sometimes displayed even if none of the listed posts used them -* BugFix : Edit Posts column indicated some false positives for Category Restrictions -* BugFix : Edit Posts listing included Term Roles column even if none of the listed posts had Term Roles - -= Page / Category Listing (Front End): = -* Feature : When remapping a page to visible ancestor, Option for whether remap can bypass an explictly excluded ancestor -* Feature : When remapping a term to visible ancestor, Option for whether remap can bypass an explictly excluded ancestor -* Feature : Support remap_parents, enforce_actual_depth, remap_thru_excluded_parent args to override defaults in a get_pages() / get_terms() call -* Compat : Never remap pages if get_pages called without hierarchical arg (unnecessary, caused conflict with Flexi Pages plugin) -* Compat : Never remap terms if get_terms called without hierarchical arg -* Change : RS Option "Remap Hiden Pages to Visible Ancestor" disabled by default, to avoid conflict with template code that relies on exclude+depth arguments being treated as exclude_tree -* Change : RS Option "Remap Hiden Terms to Visible Ancestor" disabled by default, to avoid conflict with template code that relies on exclude+depth arguments being treated as exclude_tree - -= XML-RPC: = -* BugFix : XML-RPC post submissions created without category selection for users without less than blog-wide Editor role -* BugFix : With some XML-RPC clients, non-administrators can publish new posts but cannot edit them following publish -* BugFix : XML-RPC retrieval of recent posts only returned one post - -= Custom Taxonomies: = -* Feature : Support Restrictions on custom taxonomies -* BugFix : When custom taxonomies are enabled for use with RS, "Category Restrictions and Roles for Posts" checkbox caption was not modified accordingly -* BugFix : Invalid edit URL from bulk role administration form for Post Tags, Custom Taxonomies -* Workaround : WP core forces display of published posts only in Edit Posts listing when filtering by a custom taxonomy term - -= Front-End Misc: = -* BugFix : get_comments() function did not include comments on attachments to private posts -* BugFix : In some installations with a language defined and "suppress private caption" option enabled, fatal error from translate call in template-interceptor -* BugFix : template function is_restricted_rs() indicated some false positives for category restrictions -* BugFix : Tags filter defaulted to limiting number of displayed tags to 45 -* BugFix : tag__not_in argument was not supported for manual calls to WP_Query - -= Admin Misc: = -* Feature : Add pending posts and pages total to Dashboard Right Now list -* BugFix : Cannot approve / unapprove comments when capability is granted via Category Role or Page/Post Role -* BugFix : Roles, Restrictions menu icons were not displayed if custom WP_CONTENT_DIR set -* BugFix : PHP Warning on installation / version update due to DB key name conflicting with an existing WP key name -* BugFix : In User Profile, link to edit individual Object Role yielded "insufficient permissions" message -* BugFix : RS roles were hidden from User Profile for users who cannot assign roles due to blogwide role requirement set in RS Options -* Change : Prevent activation (with helpful error message) if another copy of RS is already active -* Change : If RS_DEBUG is defined and the script is plugins.php or edit-plugins.php, don't initialize the plugin (prevents hung server on bad edits via Plugin Editor) -* Change : On RS Options form, rearranged and recaptioned "Realm" options for clarity -* Change : Popup confirmation box before reverting RS Options to defaults -* Change : Update button in all RS forms styled the same as WordPress Update buttons - -= Misc: = -* BugFix : Warning messages on servers with open_basedir restriction -* BugFix : RS Internal Cache did not work if custom WP_CONTENT_DIR set - -= API: = -* API : ScoperAdminLib::create_group($name, $desript), returns group_id -* API : ScoperAdminLib::get_group_by_name($name), returns group object -* API : ScoperAdminLib::get_group($group_id), returns group object - -= Plugin Compatibility: = -* Compat : Formatting of table header in Role / Restriction bulk admin forms was thrown off by BuddyPress -* Compat : Pages listing was broken when Theme My Login active with option to exclude login page from listing -* Compat : Automatically switch Roles, Restrictions tabs to default(bottom) positioning if some other plugin has moved the Users tab -* Compat : Support nonstandard usage of wp_dropdown_pages filter by Simple Section Nav plugin -* Compat : PHP Warning after AMember creates a role with no capabilities -* Compat : Apply RS restrictions and roles to Snazzy Archives plugin listing -* Compat : PHP Warning "Missing argument 2" with WMPL plugin -* Compat : Suppress RS filtering when another plugin has initiated a scheduled operation via WP Cron (conflict with WP Robot, Twitter News Feeds) -* Compat : Tiny MCE Advanced (conflict was present in RS 1.1 beta versions) -* Compat : Flutter (may require Flutter code patch, see Notes) -* Compat : Use display names and plural display names defined by Custom Taxonomies plugin - -= Browser Compat (wp-admin): = -* BugFix : Background color not applied to RS Options form in some versions of IE -* BugFix : IE8 tab, checkbox positioning in Post/Page Edit Form role metaboxes - -= Translation: = -* Lang : Added Italian translation (Alberto Ramacciotti - http://obertfsp.com) -* Feature : Default teaser strings included in .po file for translation. Must add this to wp-config.php: define( 'SCOPER_TRANSLATE_TEASER', true ); - - - -= 1.0.8 - 18 Aug 2009 = -* Feature : Option to prevent non-Administrators from assigning or viewing content-specific roles -* Feature : For front-end Page and Category listings, parent remapping behavior is now adjustable via RS Options -* Change : When a depth limit is specified for pages/categories listing, default to enforcing that limit based on actual depth prior to parent remap -* Bugfix : Fix compatibility with various custom child_of / depth / exclude / order combinations in pages, categories listing -* BugFix : Pages listing filter did not honor number, offset arguments -* BugFix : Terms (categories) listing filter did not apply custom ordering filter with WP 2.8 -* Change : Work around WP bug when page / category listing is generated with child_of arg, but first element in result array is not a direct child -* Compat : Simple Section Navigation plugin displayed misplaced subpages in some situations -* Compat : My Category Order plugin -* Compat : Flutter/FreshPage plugin (disable custom menu indexing if plugin is active) -* Compat : Capability Manager plugin (automatically re-sync role defs on role creation / deletion) -* BugFix : When hiding other users' unattached uploads in Media Library, attachment count did not match -* Change : Blog-wide Editors always see all unattached uploads in Media Library, regardless of option setting -* Doc : Replaced standalone change log and plugin compat documents with readme.txt sections - - -= 1.0.7 - 10 August 2009 = -* BugFix : With WP 2.8, new users were not assigned membership in WP Role metagroup until cache flush -* Change : Exclude role metagroups from groups column in users list (to reduce clutter) -* Feature : Option for whether non-administrators can see unattached uploads from other users -* Change : By default, non-administrators see only their own unattached uploads in Media Library -* Compat : Disable caching of pages, categories listing if QTranslate plugin is active -* Change : remap get_pages exclude argument to exclude_tree if called with depth=1 -* Change : remap get_terms exclude argument to exclude_tree if called with depth=1 -* Change : more descriptive error message when another plugin prevents RS initialization - - -= 1.0.6 - 6 August 2009 = -* BugFix : Failed to re-activate after WordPress auto-update -* BugFix : In WP-mu, Category Roles not inherited from parent on new category creation -* BugFix : Users with Category Manager role for a limited no. of cats could change Cat Parent to None -* BugFix : Users with Category Manager role for a limited no. of cats could create new top-level cats -* BugFix : Category Edit Form offered selection of a category as its own parent (though not stored) -* BugFix : In Bulk Roles / Restrictions form, "Collapse All" script hid some Categories / Pages inappropriately - - -= 1.0.5.1 - 5 August 2009 = -* Bump up version number to force wordpress.org to regenerate .zip. The 1.0.5 zip was missing many files. - - -= 1.0.5 - 5 August 2009 = -* Change : Hidden Editing Elements now hidden securely on server side, not via CSS. -* Change : In RS Options, recaption "Hidden Editing Elements" as "Limited Editing Elements" -* Change : Updated sample IDs displayed on Role Scoper Options form for Hidden Editing Elements -* Change : Updated default IDs for Hidden Editing Elements -* Compat : Conflict with QTranslation plugin - translation of page titles, term names, bulk admin post titles -* Compat : Support SCOPER_DISABLE_MENU_TWEAK definition for compat with Flutter plugin -* BugFix : New pages by non-Editors initially saved as Pending even if Publish was clicked -* BugFix : Administrator could not modify default category with WP 2.8 -* BugFix : Default Groups could not be edited with WP 2.8 -* BugFix : Attachments Utility (in RS Options) was not accessible under WP 2.8 -* BugFix : In some configurations, fatal error when unavailable user_can_for_any_object() function called with administrator logged in -* BugFix : When editing group, could not remove last group administrator -* BugFix : Group roles were not displayed in group edit form if no members in group -* BugFix : Eliminated orphaned role deletion (no longer needed and deleted non-orphan group roles in some situations) -* BugFix : Object Roles, Blog Roles cache was not flushed following group membership change -* BugFix : On some server, the internal cache did not update following user profile edit -* BugFix : RS menu links were broken if role scoper activated within custom-named directory - - -= 1.0.4.1 - 28 June 2009 = -* BugFix : Roles, Restrictions menu links were broken for administrators (since 1.0.4) - - -= 1.0.4 - 26 June 2009 = -* Change : Deny implicit comment moderation rights to Authors if they lack moderate_comments cap -* BugFix : In Edit Post form, non-editors could see / select other users as "author" -* BugFix : Option "role assignment requires blog-wide editor role" was only requiring blog-wide contributor role -* BugFix : Page Parent filtering was broken for Quick Edit -* BugFix : Category Restrictions were not inherited upon new category creation -* BugFix : Option "role assignment requires blog-wide editor role" did not suppress Roles, Restrictions sidebar menu -* BugFix : XML-RPC support (ScribeFire, WLW) was broken for non-administrators -* BugFix : User groups were unusable on DB servers that do not support default value on text columns -* BugFix : exclude_tree argument was ineffective in get_terms / wp_list_categories call -* BugFix : invalid Category / Object role edit links displayed in user profile for non-editors in some configurations -* BugFix : Role Scoper Options inaccessable to administrator with WP 2.8.1 -* Change : Moved option "Role administration requires a blog-wide Editor role" to main Options tab - - -= 1.0.3.4 - 8 May 2009 = -* BugFix : Fifth attempt to prevent re-activation failure following Role Scoper update via WP auto-updater -* BugFix : WP 2.8 Compat: Moved Restrictions, Roles menus back to familiar location unders Users menu - - -= 1.0.3.3 - 8 May 2009 = -* BugFix : Fourth attempt to prevent plugin activity during WordPress update operation, to prevent re-activation failure - - -= 1.0.3.2 - 8 May 2009 = -* BugFix : Third attempt to prevent plugin activity during WordPress update operation, to prevent re-activation failure - - -= 1.0.3.1 - 8 May 2009 = -* BugFix : Second attempt to prevent plugin activity during WordPress update operation, to prevent re-activation failure - - -= 1.0.3 - 8 May 2009 = -* BugFix : Prevent plugin activity during WordPress update operation, to prevent re-activation failure - - -= 1.0.2 - 7 May 2009 = -* BugFix : Template function is_restricted_rs / is_exclusive_rs was non-functional on home page (since rc9.9311) -* BugFix : With Attachments Filter enabled, attachments larger than 10MB fail to download on some installations -* BugFix : Fatal Error when viewing a single post entry after RS Options modified to disable front-end filtering -* BugFix : Auto-delete orphaned role assignments left in DB by previous versions following category / group deletion -* BugFix : After an empty group was deleted, its role assignments were left in the database -* BugFix : Event Calendar events without an associated post were not displayed without calendar refresh -* BugFix : Post Restrictions and Post Roles did not display on PHP 4 servers -* BugFix : In Post/Page Edit Form, Author selection was inappropriately available to non-editors -* BugFix : Orphaned role assignments already stored to database will be autodeleted on RS version update -* BugFix : If the object type of a requested attachment parent cannot be determined, assume post -* BugFix : Teaser message displayed in header with some themes -* BugFix : http authentication prompt for RSS feeds with logged administrators on some installations -* BugFix : Hidden Editing Elements settings were not effective for unpublished posts/pages -* BugFix : If a memberless group was deleted, any assigned roles were left (orphaned) in the database -* Plugin : Conflict with WP-Wall plugin caused non-listing or double-listing of wall comments -* Feature : Option to accept CSV entry for user role assignment -* Feature : Bottom-right submit button on bulk admin forms if SCOPER_EXTRA_SUBMIT_BUTTON is defined - - -= 1.0.1 - 27 March 2009 = -* BugFix : In some situations, non-attachments were included in Media Library listing -* BugFix : Low level users could not edit uploads from Media Library based on a Post/Page/Category role assignment -* BugFix : Cannot set static front page with Role Scoper activated -* BugFix : Users with editing role via Page / Category assignment could not bulk-delete posts/pages -* BugFix : Post/Page Edit divs configured as Hidden Editing Elements were not hidden for draft posts/pages -* BugFix : After a group was deleted, its role assignments were left in the database -* BugFix : PHP warnings viewing users list with WP < 2.8 -* Change : WP 2.7 users with hacked WP template.php user_row code must define("scoper_users_custom_column", "true"); -* BugFix : Failed to return results for manual WP_Query calls which include category exclusion argument -* BugFix : Role Scoper error messages were formatted with unreadable colors with WP 2.7 -* BugFix : Conflict with ozhAdminMenus plugin - Page menus missing in some configurations -* BugFix : Conflict with WP-Wall plugin caused fatal error -* Feature : Options to hide User Groups, Scoped Roles from user profile - - -= 1.0.0 - 21 March 2009 = -* BugFix : In some installations, DB error for anonymous user front-end access (since rc9.9220) - - -== Other Notes == - -= Documentation = -* A slightly outdated Usage Guide is available. It includes both an overview of the permissions model and a How-To section with step by step directions. Volunteer contributions to expand, revise or reformat this document are welcome. -* Role Scoper's menus, onscreen captions and inline descriptive footnotes can be translated using poEdit. I will gladly include any user-contributed languages!. - -= General Plugin Compatibility Requirements = -* No other plugin or theme shall define function wp_set_current_user() or function set_current_user(). A custom merge of the code may be possible in some situations. -* No other plugin or theme shall make an include or require call to force early execution of the file pluggable.php (for the reason listed above). - -= Specific Plugin Compatibility Issues = -* WP Super Cache : set WPSC option to disable caching for logged users (unless you only use Role Scoper to customize editing access). -* QTranslate : use Role Scoper 1.0.7 or later, which disables caching of pages, terms listing. To enable caching, change QTranslate get_pages and get_terms filter priority to 2 or higher, then add the following line to wp-config.php: `define('SCOPER_QTRANSLATE_COMPAT', true);` -* Get Recent Comments : not compatible due to direct database query. Use WP Recent Comments widget or Snazzy Archives instead. -* Maintenance Mode : not compatible due to forced early login check. To resolve conflict, disable front-end access by administrators during maintenance. Comment out the following line in maintenance-mode.php: `&& !mw_current_user_can_access_on_maintenance()` -* Flutter : As of Nov 2009, RS filtering of Flutter categories requires that the Flutter function GetCustomWritePanels (in the RCCWP_CustomWritePanel class, file plugins/fresh-page/RCCWP_CustomWritePanel.php) be modified to the following: - - function GetCustomWritePanels() - { - global $wpdb; - - $sql = "SELECT id, name, description, display_order, capability_name, -type, single FROM " . RC_CWP_TABLE_PANELS; - - $join = apply_filters( 'panels_join_fp', '' ); - $where = apply_filters( 'panels_where_fp', '' ); - - $sql .= " $join WHERE 1=1 $where ORDER BY display_order ASC"; - $results = $wpdb->get_results($sql); - if (!isset($results)) - $results = array(); - - return $results; - } - - -**Attachment Filtering** - -Read access to uploaded file attachments is normally filtered to match post/page access. - -To disable this attachment filtering, disable the option in Roles > Options or copy the following line to wp-config.php: - define('DISABLE_ATTACHMENT_FILTERING', true); - -To reinstate attachment filtering, remove the definition from wp-config.php and re-enable File Filtering via Roles > Options. - -To fail with a null response when file access is denied (no WP 404 screen, but still includes a 404 in response header), copy the folling line to wp-config.php: - define ('SCOPER_QUIET_FILE_404', true); - -Normally, files which are in the uploads directory but have no post/page attachment will not be blocked. To block such files, copy the following line to wp-config.php: - define('SCOPER_BLOCK_UNATTACHED_UPLOADS', true); - - -**Hidden Content Teaser** - -The Hidden Content Teaser may be configured to display the first X characters of a post/page if no excerpt or more tag is available. - -To specify the number of characters (default is 50), copy the following line to wp-config.php: - define('SCOPER_TEASER_NUM_CHARS', 100); // set to any number of your choice \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/rewrite-mu_rs.php b/blog/wp-content/plugins/role-scoper/rewrite-mu_rs.php deleted file mode 100644 index 060fd76..0000000 --- a/blog/wp-content/plugins/role-scoper/rewrite-mu_rs.php +++ /dev/null @@ -1,136 +0,0 @@ -blogs ORDER BY blog_id" ); - - foreach ( $results as $row ) { - switch_to_blog( $row->blog_id ); - - if ( $results = ScoperAnalyst::identify_protected_attachments() ) { - // WP-mu content rules are only inserted if defined uploads path matches this default structure - $dir = ABSPATH . UPLOADBLOGSDIR . "/{$row->blog_id}/files/"; - $url = trailingslashit( $siteurl ) . UPLOADBLOGSDIR . "/{$row->blog_id}/files/"; - - $uploads = apply_filters( 'upload_dir', array( 'path' => $dir, 'url' => $url, 'subdir' => '', 'basedir' => $dir, 'baseurl' => $url, 'error' => false ) ); - - $content_base = str_replace( $strip_path, '', str_replace( '\\', '/', $uploads['basedir'] ) ); - - $path = trailingslashit($row->path); - - if ( $base && ( '/' != $base ) ) - if ( 0 === strpos( $path, $base ) ) - $path = substr( $path, strlen($base) ); - - // If a filter has changed basedir, don't filter file attachments for this blog - if ( strpos( $content_base, "/blogs.dir/{$row->blog_id}/files/" ) ) - $new_rules .= "RewriteRule ^{$path}files/(.*) {$content_base}$1 [L]\n"; //RewriteRule ^blog1/files/(.*) wp-content/blogs.dir/2/files/$1 [L] - } - } - - switch_to_blog( $orig_blog_id ); - - return $new_rules; - } - - - // remove RS rules from every .htaccess file in the wp-MU "files" folders - function clear_all_file_rules() { - global $wpdb, $blog_id; - $blog_ids = scoper_get_col( "SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id" ); - $orig_blog_id = $blog_id; - - $siteurl = get_option( 'siteurl' ); - - - foreach ( $blog_ids as $id ) { - switch_to_blog( $id ); - - // WP-mu content rules are only inserted if uploads path matches this default structure - $dir = ABSPATH . UPLOADBLOGSDIR . "/$id/files/"; - $url = trailingslashit( $siteurl ) . UPLOADBLOGSDIR . "/$id/files/"; - - $uploads = apply_filters( 'upload_dir', array( 'path' => $dir, 'url' => $url, 'subdir' => '', 'basedir' => $dir, 'baseurl' => $url, 'error' => false ) ); - - $htaccess_path = trailingslashit($uploads['basedir']) . '.htaccess'; - - ScoperRewrite::insert_with_markers( $htaccess_path, 'Role Scoper', '' ); - } - - switch_to_blog( $orig_blog_id ); - } - -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/rewrite-rules_rs.php b/blog/wp-content/plugins/role-scoper/rewrite-rules_rs.php deleted file mode 100644 index f515cb8..0000000 --- a/blog/wp-content/plugins/role-scoper/rewrite-rules_rs.php +++ /dev/null @@ -1,208 +0,0 @@ -flush_rules(true); }' ) ); - } - } - - function build_site_rules() { - $new_rules = ''; - - require_once( 'uploads_rs.php' ); - - $new_rules .= "\n# BEGIN Role Scoper\n"; - - $new_rules .= "RewriteEngine On\n\n"; - - if ( scoper_get_option( 'feed_link_http_auth' ) ) { - // workaround for HTTP Authentication with PHP running as CGI - $new_rules .= "RewriteCond %{HTTP:Authorization} ^(.*)\n"; - $new_rules .= "RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]\n"; - } - - if ( IS_MU_RS && scoper_get_option( 'file_filtering' ) ) - $new_rules .= ScoperRewriteMU::build_blog_file_redirects(); - - $new_rules .= "\n# END Role Scoper\n\n"; - - return $new_rules; - } - - - function site_config_supports_rewrite() { - require_once( 'uploads_rs.php' ); - $uploads = scoper_get_upload_info(); - - if ( false === strpos( $uploads['baseurl'], untrailingslashit( get_option('siteurl') ) ) ) - return false; - - // don't risk leaving custom .htaccess files in content folder at deactivation due to difficulty of reconstructing custom path for each blog - if ( IS_MU_RS ) { - global $blog_id; - - if ( UPLOADS != UPLOADBLOGSDIR . "/$blog_id/files/" ) - return false; - - if ( BLOGUPLOADDIR != WP_CONTENT_DIR . "/blogs.dir/$blog_id/files/" ) - return false; - } - - return true; - } - - function update_blog_file_rules( $include_rs_rules = true ) { - global $blog_id; - - scoper_update_option( 'file_htaccess_date', agp_time_gmt() ); - - $include_rs_rules = $include_rs_rules && scoper_get_option( 'file_filtering' ); - - if ( ! ScoperRewrite::site_config_supports_rewrite() ) - return; - elseif ( ! $include_rs_rules ) - $rules = ''; - else - $rules = ScoperRewrite::build_blog_file_rules(); - - require_once( 'uploads_rs.php' ); - $uploads = scoper_get_upload_info(); - - // If a filter has changed MU basedir, don't filter file attachments for this blog because we might not be able to regenerate the basedir for rule removal at RS deactivation - if ( ! IS_MU_RS || strpos( $uploads['basedir'], "/blogs.dir/$blog_id/files/" ) ) { - $htaccess_path = trailingslashit($uploads['basedir']) . '.htaccess'; - - ScoperRewrite::insert_with_markers( $htaccess_path, 'Role Scoper', $rules ); - } - } - - function &build_blog_file_rules() { - $new_rules = ''; - - require_once( 'analyst_rs.php' ); - if ( ! $attachment_results = ScoperAnalyst::identify_protected_attachments() ) - return $new_rules; - - global $wpdb; - - require_once( 'uploads_rs.php' ); - - $home_root = parse_url(get_option('home')); - $home_root = trailingslashit( $home_root['path'] ); - - $uploads = scoper_get_upload_info(); - - $baseurl = trailingslashit( $uploads['baseurl'] ); - - $arr_url = parse_url( $baseurl ); - $rewrite_base = $arr_url['path']; - - $file_keys = array(); - - if ( $key_results = scoper_get_results( "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = '_rs_file_key'" ) ) { - foreach ( $key_results as $row ) - $file_keys[$row->post_id] = $row->meta_value; - } - - $new_rules = "\n"; - $new_rules .= "RewriteEngine On\n"; - $new_rules .= "RewriteBase $rewrite_base\n\n"; - - $main_rewrite_rule = "RewriteRule ^(.*) {$home_root}index.php?attachment=$1&rs_rewrite=1 [NC,L]\n"; - - foreach ( $attachment_results as $row ) { - if ( isset($file_keys[ $row->ID ] ) ) { - $key = $file_keys[ $row->ID ]; - } else { - $key = urlencode( str_replace( '.', '', uniqid( strval( rand() ), true ) ) ); - update_post_meta( $row->ID, "_rs_file_key", $key ); - } - - //dump($row->guid); - - if ( false !== strpos( $row->guid, $baseurl ) ) { // no need to include any attachments which are not in the uploads folder - $file_path = str_replace( $baseurl, '', $row->guid ); - $file_path = str_replace('.', '\.', $file_path ); - - $new_rules .= "RewriteCond %{REQUEST_URI} ^(.*)/$file_path" . "$ [NC]\n"; - $new_rules .= "RewriteCond %{QUERY_STRING} !^(.*)rs_file_key=$key(.*)\n"; - $new_rules .= $main_rewrite_rule; - - if ( $pos_ext = strrpos( $file_path, '\.' ) ) { - $thumb_path = substr( $file_path, 0, $pos_ext ); - $ext = substr( $file_path, $pos_ext + 2 ); - - $new_rules .= "RewriteCond %{REQUEST_URI} ^(.*)/$thumb_path" . '-[0-9]{2,4}x[0-9]{2,4}\.' . $ext . "$ [NC]\n"; - $new_rules .= "RewriteCond %{QUERY_STRING} !^(.*)rs_file_key=$key(.*)\n"; - $new_rules .= $main_rewrite_rule; - } - - } - } // end foreach protected attachment - - - if ( IS_MU_RS && defined('SCOPER_MU_FILE_PROCESSING') ) { // unless SCOPER_MU_FILE_PROCESSING is defined (indicating blogs.php has been modified for compatibility), blogs.php processing will be bypassed for all files - $content_path = trailingslashit( str_replace( $strip_path, '', str_replace( '\\', '/', WP_CONTENT_DIR ) ) ); - - $new_rules .= "\n# Default WordPress cache handling\n"; - $new_rules .= "RewriteRule ^(.*) {$content_path}blogs.php?file=$1 [L]\n"; - } - - $new_rules .= "\n"; - - return $new_rules; - } - - // called by agp_return_file() in abnormal cases where file access is approved, but key for protected file is lost/corrupted in postmeta record or .htaccess file - function resync_file_rules() { - // Don't allow this to execute too frequently, to prevent abuse or accidental recursion - if ( agp_time_gmt() - get_option( 'last_htaccess_resync_rs' ) > 30 ) { - update_option( 'last_htaccess_resync_rs', agp_time_gmt() ); - - // Only the files / uploads .htaccess for current blog is regenerated - scoper_flush_file_rules(); - - usleep(10000); // Allow 10 milliseconds for server to regather itself following .htaccess update - } - } -} // end class ScoperRewrite -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/role-scoper.php b/blog/wp-content/plugins/role-scoper/role-scoper.php deleted file mode 100644 index 660a5fc..0000000 --- a/blog/wp-content/plugins/role-scoper/role-scoper.php +++ /dev/null @@ -1,240 +0,0 @@ -Error:
    Multiple copies of Role Scoper activated. Only version %1$s (in folder "%2$s") is functional.', 'scoper' ), SCOPER_VERSION, SCOPER_FOLDER ); - - add_action('admin_notices', create_function('', 'echo \'
    ' . $message . '
    \';')); - } - - return; -} - - -define ('SCOPER_VERSION', '1.1.7'); -define ('SCOPER_DB_VERSION', '1.1.1'); - -define( 'ENABLE_PERSISTENT_CACHE', true ); - -/* --- ATTACHMENT FILTERING NOTE --- -Read access to uploaded file attachments is normally filtered (via .htaccess RewriteRules) to match post/page access. -To disable this attachment filtering, copy the following line to wp-config.php: - define('DISABLE_ATTACHMENT_FILTERING', true); - -To fail with a null response (no WP 404 screen, but still includes a 404 in response header), copy the folling line to wp-config.php: - define ('SCOPER_QUIET_FILE_404', true); - -Normally, files which are in the uploads directory but have no post/page attachment will not be blocked. -To block such files, copy the following line to wp-config.php: - define('SCOPER_BLOCK_UNATTACHED_UPLOADS', true); - -The Hidden Content Teaser may be configured to display the first X characters of a post/page if no excerpt or more tag is available. -To specify the number of characters (default is 50), copy the following line to wp-config.php: - define('SCOPER_TEASER_NUM_CHARS', 100); // set to any number of your choice - -To prevent teasing of feed items even if teaser is enabled for main posts/pages listing, copy the following line to wp-config.php: - define( 'SCOPER_NO_FEED_TEASER', true ); - -To disable caching of the pages / categories listing, add the following lines to wp-config.php: - define( 'SCOPER_NO_PAGES_CACHE', true ); - define( 'SCOPER_NO_TERMS_CACHE', true ); -*/ - - -// avoid lockout in case of editing plugin via wp-admin -if ( defined('RS_DEBUG') && is_admin() && ( strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugin-editor.php' ) || strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugins.php' ) ) && false === strpos( $_SERVER['REQUEST_URI'], 'activate' ) ) - return; - -define ('COLS_ALL_RS', 0); -define ('COL_ID_RS', 1); -define ('COLS_ID_DISPLAYNAME_RS', 2); -define ('COL_TAXONOMY_ID_RS', 3); -define ('COL_COUNT_RS', 4); - -define ('UNFILTERED_RS', 0); -define ('FILTERED_RS', 1); -define ('ADMIN_TERMS_FILTER_RS', 2); - -define ('BASE_CAPS_RS', 1); - -define ('STATUS_ANY_RS', -1); - -define ('ORDERBY_HIERARCHY_RS', 'hierarchy'); - -define( 'SCOPER_MIN_DATE_STRING', '0000-00-00 00:00:00' ); -define( 'SCOPER_MAX_DATE_STRING', '2035-01-01 00:00:00' ); -define( 'SCOPER_MAX_DATE_VALUE', strtotime( constant('SCOPER_MAX_DATE_STRING') ) ); - -if ( defined('RS_DEBUG') ) { - include_once('lib/debug.php'); - add_action( 'admin_footer', 'awp_echo_usage_message' ); -} else - include_once('lib/debug_shell.php'); - -//log_mem_usage_rs( 'plugin load' ); - -//if ( version_compare( phpversion(), '5.2', '<' ) ) // some servers (Ubuntu) return irregular version string format -if ( ! function_exists("array_fill_keys") ) - require_once('lib/php4support_rs.php'); - -require_once('lib/agapetry_lib.php'); - -// === awp_is_mu() function definition and usage: must be executed in this order, and before any checks of IS_MU_RS constant (such as in role-scoper_init.php) === -require_once('lib/agapetry_wp_lib.php'); -define( 'IS_MU_RS', awp_is_mu() ); -// ---------------------------------------- - -require_once('role-scoper_init.php'); // Contains activate, deactivate, init functions. Adds mod_rewrite_rules. - - -// register these functions before any early exits so normal activation/deactivation can still run with RS_DEBUG -require_once('role-scoper_activation.php'); // Contains activate, deactivate, init functions (and also awp_plugin_is_active) -register_activation_hook(__FILE__, 'scoper_activate'); -register_deactivation_hook(__FILE__, 'scoper_deactivate'); - - -// define URL -define ('SCOPER_BASENAME', plugin_basename(__FILE__) ); -define ('SCOPER_FOLDER', dirname( plugin_basename(__FILE__) ) ); - -if ( ! defined('WP_CONTENT_URL') ) - define( 'WP_CONTENT_URL', site_url( 'wp-content' ) ); - -if ( ! defined('WP_CONTENT_DIR') ) - define( 'WP_CONTENT_DIR', str_replace('\\', '/', ABSPATH) . 'wp-content' ); - -define ('SCOPER_ABSPATH', WP_CONTENT_DIR . '/plugins/' . SCOPER_FOLDER); - -define ('ANON_ROLEHANDLE_RS', 'wp_public_reader'); - -define ('BLOG_SCOPE_RS', 'blog'); -define ('TERM_SCOPE_RS', 'term'); -define ('OBJECT_SCOPE_RS', 'object'); - -define ('OP_READ_RS', 'read'); -define ('OP_ASSOCIATE_RS', 'associate'); -define ('OP_EDIT_RS', 'edit'); -define ('OP_PUBLISH_RS', 'publish'); -define ('OP_DELETE_RS', 'delete'); -define ('OP_ADMIN_RS', 'admin'); - -define ('ROLE_BASIS_GROUPS', 'groups'); -define ('ROLE_BASIS_USER', 'user'); -define ('ROLE_BASIS_USER_AND_GROUPS', 'ug'); - -define ('ANY_CONTENT_DATE_RS', ''); -define ('NO_OBJSCOPE_CLAUSE_RS', ''); - -global $wpdb; - -global $scoper_role_types; -$scoper_role_types = array('rs', 'wp', 'wp_cap'); - -if ( is_admin() || defined('XMLRPC_REQUEST') ) { - // Early bailout for problematic 3rd party plugin ajax calls - if ( strpos($_SERVER['SCRIPT_NAME'], 'wp-wall-ajax.php') ) - return; - - // skip WP version check and init operations when a WP plugin auto-update is in progress - if ( false !== strpos($_SERVER['SCRIPT_NAME'], 'update.php') ) - return; -} else { - require_once('feed-interceptor_rs.php'); // must define get_currentuserinfo early -} - -//log_mem_usage_rs( 'initial requires' ); - -$bail = 0; - -if ( ! $wpdb->has_cap( 'subqueries' ) ) { - rs_notice('Sorry, this version of Role Scoper requires a database server that supports subqueries (such as MySQL 4.1+). Please upgrade your server or deactivate Role Scoper.'); - $bail = 1; -} - -if ( ! awp_ver('2.5') ) { - rs_notice('Sorry, this version of Role Scoper requires WordPress 2.5.0 or higher. Please upgrade Wordpress or deactivate Role Scoper. If you must run WP 2.2 or 2.3, try Role Scoper 0.9.'); - $bail = 1; -} - -// If someone else plugs set_current_user, we're going to take our marbles and go home - but first make sure they can't play either. -// set_current_user() is a crucial entry point to instantiate extended class WP_Scoped_User and set it as global current_user. -// There's no way to know that another set_current_user replacement will retain the set_current_user hook. -if ( function_exists('wp_set_current_user') || function_exists('set_current_user') ) { //if is_administrator_rs exists, then these functions scoped_user.php somehow already executed (and plugged set_current_user) - require_once( 'error_rs.php' ); - scoper_startup_error(); - - $bail = 1; -} - -if ( ! $bail ) { - require_once('defaults_rs.php'); - - //log_mem_usage_rs( 'defaults_rs' ); - - if ( IS_MU_RS ) - scoper_refresh_options_sitewide(); - - //log_mem_usage_rs( 'refresh_options_sitewide' ); - - //scoper_refresh_default_options(); - - // if role options were just updated via http POST, use new values rather than loading old option values from DB - // These option values are used in WP_Scoped_User constructor - if ( is_admin() && isset( $_POST['role_type'] ) && strpos( urldecode($_SERVER['REQUEST_URI']), 'admin.php?page=rs-' ) ) { - scoper_use_posted_init_options(); - } else - scoper_get_init_options(); - - if ( IS_MU_RS ) { - // If groups are sitewide, default groups must also be defined/applied sitewide (and vice versa) - global $scoper_sitewide_groups, $scoper_options_sitewide; - if ( $scoper_sitewide_groups = scoper_get_site_option( 'mu_sitewide_groups' ) ) - $scoper_options_sitewide['default_groups'] = true; - - elseif( isset( $scoper_options_sitewide['default_groups'] ) ) - unset( $scoper_options_sitewide['default_groups'] ); - } - - // rs_blog_roles option has never been active in any RS release; leave commented here in case need arises - //define ( 'RS_BLOG_ROLES', scoper_get_option('rs_blog_roles') ); - require_once('user-plug_rs.php'); - - //log_mem_usage_rs( 'user-plug_rs' ); - - // since sequence of set_current_user and init actions seems unreliable, make sure our current_user is loaded first - add_action('set_current_user', 'scoper_maybe_init', 2); - add_action('init', 'scoper_log_init_action', 1); -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/role-scoper_activation.php b/blog/wp-content/plugins/role-scoper/role-scoper_activation.php deleted file mode 100644 index 87bd0ab..0000000 --- a/blog/wp-content/plugins/role-scoper/role-scoper_activation.php +++ /dev/null @@ -1,41 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/role-scoper_init.php b/blog/wp-content/plugins/role-scoper/role-scoper_init.php deleted file mode 100644 index 7941aed..0000000 --- a/blog/wp-content/plugins/role-scoper/role-scoper_init.php +++ /dev/null @@ -1,695 +0,0 @@ -' ) ) - $rules = substr( $rules, 0, $pos_endif ) . $rs_rules . substr($rules, $pos_endif); - else - $rules .= $rs_rules; - } - - return $rules; -} - -function scoper_flush_site_rules() { - require_once( 'rewrite-rules_rs.php' ); - ScoperRewrite::update_site_rules( true ); -} - -function scoper_clear_site_rules() { - require_once( 'rewrite-rules_rs.php' ); - remove_filter('mod_rewrite_rules', 'scoper_mod_rewrite_rules'); - ScoperRewrite::update_site_rules( false ); -} - -function scoper_flush_file_rules() { - require_once( 'rewrite-rules_rs.php' ); - ScoperRewrite::update_blog_file_rules(); -} - - -function scoper_clear_all_file_rules() { - if ( IS_MU_RS ) { - require_once( 'rewrite-mu_rs.php' ); - ScoperRewriteMU::clear_all_file_rules(); - } else { - require_once( 'rewrite-rules_rs.php' ); - ScoperRewrite::update_blog_file_rules( false ); - } -} - - -// forces content rules to be regenerated in every MU blog at next access -function scoper_expire_file_rules() { - if ( IS_MU_RS ) - scoper_update_option( 'file_htaccess_min_date', agp_time_gmt(), true ); - else { - if ( did_action( 'scoper_init' ) ) - scoper_flush_file_rules(); // for non-MU, just regenerate the file rules (for uploads folder) now - else - add_action( 'scoper_init', 'scoper_flush_file_rules' ); - } -} - - -function scoper_version_check() { - $ver_change = false; - - $ver = get_option('scoper_version'); - - if ( empty($ver['db_version']) || version_compare( SCOPER_DB_VERSION, $ver['db_version'], '!=') ) { - $ver_change = true; - - require_once('db-setup_rs.php'); - scoper_db_setup($ver['db_version']); - } - - // temp debug - //if ( defined('RS_DEBUG') ) - // $ver['version'] = '1.0.8'; - - // These maintenance operations only apply when a previous version of RS was installed - if ( ! empty($ver['version']) ) { - - if ( version_compare( SCOPER_VERSION, $ver['version'], '!=') ) { - $ver_change = true; - - require_once('admin/update_rs.php'); - scoper_version_updated( $ver['version'] ); - - scoper_check_revision_settings(); - } - - } else { - // first-time install (or previous install was totally wiped) - require_once( 'admin/update_rs.php'); - scoper_set_default_rs_roledefs(); - } - - if ( $ver_change ) { - $ver = array( - 'version' => SCOPER_VERSION, - 'db_version' => SCOPER_DB_VERSION - ); - - update_option( 'scoper_version', $ver ); - } -} - -function scoper_load_textdomain() { - if ( defined( 'SCOPER_TEXTDOMAIN_LOADED' ) ) - return; - - load_plugin_textdomain( 'scoper', '', SCOPER_FOLDER . '/languages' ); - - define('SCOPER_TEXTDOMAIN_LOADED', true); -} - -function scoper_log_init_action() { - define ( 'SCOPER_INIT_ACTION_DONE', true ); - - require_once('db-config_rs.php'); - - $func = "require('db-config_rs.php');"; - add_action( 'switch_blog', create_function( '', $func ) ); - - if ( is_admin() ) - scoper_load_textdomain(); - - elseif ( defined('XMLRPC_REQUEST') ) - require_once('xmlrpc_rs.php'); -} - -// since sequence of set_current_user and init actions seems unreliable, make sure our current_user is loaded first -function scoper_maybe_init() { - if ( defined('SCOPER_INIT_ACTION_DONE') ) - scoper_init(); - else - add_action('init', 'scoper_init', 2); -} - -function scoper_init() { - global $scoper; - - if ( IS_MU_RS ) { - global $scoper_sitewide_options; - $scoper_sitewide_options = apply_filters( 'sitewide_options_rs' , $scoper_sitewide_options ); - } - - if ( is_admin() ) { - require_once( 'admin/admin-init_rs.php' ); - scoper_admin_init(); - } - - log_mem_usage_rs( 'scoper_admin_init done' ); - - require_once('scoped-user.php'); - require_once('role-scoper_main.php'); // ensure that is_administrator() functions are defined if $scoper is used prior to get_current_user() - - log_mem_usage_rs( 'require role-scoper_main' ); - - if ( empty($scoper) ) // set_current_user may have already triggered scoper creation and role_cap load - $scoper = new Scoper(); - - log_mem_usage_rs( 'new Scoper done' ); - - $scoper->init(); - - log_mem_usage_rs( 'scoper->init() done' ); -} - -// called by Extension plugins if data_rs table is required -function scoper_db_setup_data_table() { - require_once('db-setup_rs.php'); - return scoper_update_supplemental_schema('data_rs'); -} - -function scoper_get_init_options() { - define ( 'SCOPER_ROLE_TYPE', scoper_get_option('role_type') ); - define ( 'SCOPER_CUSTOM_USER_BLOGCAPS', scoper_get_option('custom_user_blogcaps') ); - - $define_groups = scoper_get_option('define_usergroups'); - define ( 'DEFINE_GROUPS_RS', $define_groups ); - define ( 'GROUP_ROLES_RS', $define_groups && scoper_get_option('enable_group_roles') ); - define ( 'USER_ROLES_RS', scoper_get_option('enable_user_roles') ); - - if ( ! defined('DISABLE_PERSISTENT_CACHE') && ! scoper_get_option('persistent_cache') ) - define ( 'DISABLE_PERSISTENT_CACHE', true ); - - wpp_cache_init( IS_MU_RS && scoper_establish_group_scope() ); -} - -function scoper_refresh_options() { - if ( IS_MU_RS ) { - scoper_retrieve_options(true); - scoper_refresh_options_sitewide(); - } - - scoper_retrieve_options(false); - - scoper_refresh_default_options(); -} - -function scoper_set_conditional_defaults() { - // if the WP installation has 100 or more users at initial Role Scoper installation, default to CSV input of username for role assignment - global $wpdb; - $num_users = $wpdb->get_var( "SELECT COUNT(ID) FROM $wpdb->users" ); - if ( $num_users > 99 ) - update_option( 'scoper_user_role_assignment_csv', 1 ); -} - -function scoper_refresh_default_options() { - global $scoper_default_options; - - $scoper_default_options = apply_filters( 'default_options_rs', scoper_default_options() ); - - if ( IS_MU_RS ) - scoper_apply_custom_default_options(); -} - -function scoper_refresh_default_otype_options() { - global $scoper_default_otype_options; - - $scoper_default_otype_options = apply_filters( 'default_otype_options_rs', scoper_default_otype_options() ); -} - -function scoper_get_default_otype_options() { - if ( did_action( 'scoper_init') ) { - global $scoper_default_otype_options; - - if ( ! isset( $scoper_default_otype_options ) ) - scoper_refresh_default_otype_options(); - - return $scoper_default_otype_options; - } else - return scoper_default_otype_options(); -} - -function scoper_delete_option( $option_basename, $sitewide = -1 ) { - - // allow explicit selection of sitewide / non-sitewide scope for better performance and update security - if ( -1 === $sitewide ) { - global $scoper_options_sitewide; - $sitewide = isset( $scoper_options_sitewide ) && ! empty( $scoper_options_sitewide[$option_basename] ); - } - - if ( $sitewide ) { - global $wpdb; - scoper_query( "DELETE FROM {$wpdb->sitemeta} WHERE site_id = '$wpdb->siteid' AND meta_key = 'scoper_$option_basename'" ); - } else - delete_option( "scoper_$option_basename" ); -} - -function scoper_update_option( $option_basename, $option_val, $sitewide = -1 ) { - - // allow explicit selection of sitewide / non-sitewide scope for better performance and update security - if ( -1 === $sitewide ) { - global $scoper_options_sitewide; - $sitewide = isset( $scoper_options_sitewide ) && ! empty( $scoper_options_sitewide[$option_basename] ); - } - - if ( $sitewide ) { - global $scoper_site_options; - $scoper_site_options[$option_basename] = $option_val; - - //d_echo("

    sitewide: $option_basename, value '$option_val'" ); - update_site_option( "scoper_$option_basename", $option_val ); - } else { - //d_echo("
    blogwide: $option_basename" ); - global $scoper_blog_options; - $scoper_blog_options[$option_basename] = $option_val; - - update_option( "scoper_$option_basename", $option_val ); - } -} - -function scoper_apply_constants($stored_options) { - // If file filtering option is on but the DISABLE constant has been set, turn the option off and regenerate .htaccess - if ( defined( 'DISABLE_ATTACHMENT_FILTERING' ) && DISABLE_ATTACHMENT_FILTERING ) { - if ( ! empty( $stored_options['scoper_file_filtering'] ) ) { - // in this case, we need to both convert the option value to constant value AND trigger .htaccess regeneration - $stored_options['file_filtering'] = 0; - update_option( 'scoper_file_filtering', 0 ); - scoper_flush_site_rules(); - scoper_expire_file_rules(); - } - } - - return $stored_options; -} - -function scoper_retrieve_options( $sitewide = false ) { - global $wpdb; - - if ( $sitewide ) { - global $scoper_site_options; - - $scoper_site_options = array(); - - if ( $results = scoper_get_results( "SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE site_id = '$wpdb->siteid' AND meta_key LIKE 'scoper_%'" ) ) - foreach ( $results as $row ) - $scoper_site_options[$row->meta_key] = $row->meta_value; - - $scoper_site_options = apply_filters( 'site_options_rs', $scoper_site_options ); - return $scoper_site_options; - - } else { - global $scoper_blog_options; - - $scoper_blog_options = array(); - - if ( $results = scoper_get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE 'scoper_%'") ) - foreach ( $results as $row ) - $scoper_blog_options[$row->option_name] = $row->option_value; - - $scoper_blog_options = apply_filters( 'options_rs', $scoper_blog_options ); - return $scoper_blog_options; - } -} - - -function scoper_get_site_option( $option_basename ) { - return scoper_get_option( $option_basename, true ); -} - -function scoper_get_option($option_basename, $sitewide = -1, $get_default = false) { - if ( ! $get_default ) { - // allow explicit selection of sitewide / non-sitewide scope for better performance and update security - if ( -1 === $sitewide ) { - global $scoper_options_sitewide; - $sitewide = isset( $scoper_options_sitewide ) && ! empty( $scoper_options_sitewide[$option_basename] ); - } - - //dump($scoper_options_sitewide); - - if ( $sitewide ) { - // this option is set site-wide - global $scoper_site_options; - - if ( ! isset($scoper_site_options) || is_null($scoper_site_options) ) - $scoper_site_options = scoper_retrieve_options( true ); - - if ( isset($scoper_site_options["scoper_{$option_basename}"]) ) - $optval = $scoper_site_options["scoper_{$option_basename}"]; - - } else { - //dump($option_basename); - global $scoper_blog_options; - - if ( ! isset($scoper_blog_options) || is_null($scoper_blog_options) ) - $scoper_blog_options = scoper_retrieve_options( false ); - - if ( isset($scoper_blog_options["scoper_$option_basename"]) ) - $optval = $scoper_blog_options["scoper_$option_basename"]; - } - } - - //dump($get_default); - //dump($scoper_blog_options); - - if ( ! isset( $optval ) ) { - global $scoper_default_options; - - if ( empty( $scoper_default_options ) ) { - if ( did_action( 'scoper_init' ) ) // Make sure other plugins have had a chance to apply any filters to default options - scoper_refresh_default_options(); - else { - $hardcode_defaults = scoper_default_options(); - if ( isset($hardcode_defaults[$option_basename]) ) - $optval = $hardcode_defaults[$option_basename]; - } - } - - if ( ! empty($scoper_default_options) && ! empty( $scoper_default_options[$option_basename] ) ) - $optval = $scoper_default_options[$option_basename]; - - if ( ! isset($optval) ) - return ''; - } - - return maybe_unserialize($optval); -} - -function scoper_get_otype_option( $option_main_key, $src_name, $object_type = '', $access_name = '') { - static $otype_options; - - $key = "$option_main_key,$src_name,$object_type,$access_name"; - - if ( empty($otype_options) ) - $otype_options = array(); - elseif ( isset($otype_options[$key]) ) - return $otype_options[$key]; - - $stored_option = scoper_get_option($option_main_key); - - $default_otype_options = scoper_get_default_otype_options(); - - // RS stores all portions of the otype option array are always set together, but blending is needed because RS Extensions or other plugins can filter the default otype options array for specific taxonomies / object types - $optval = awp_blend_option_array( 'scoper_', $option_main_key, $default_otype_options, 1, $stored_option ); - - // note: access_name-specific entries are not valid for most otype options (but possibly for teaser text front vs. rss) - if ( isset ( $optval[$src_name] ) ) - $retval = $optval[$src_name]; - - if ( $object_type && isset( $optval["$src_name:$object_type"] ) ) - $retval = $optval["$src_name:$object_type"]; - - if ( $object_type && $access_name && isset( $optval["$src_name:$object_type:$access_name"] ) ) - $retval = $optval["$src_name:$object_type:$access_name"]; - - - // if no match was found for a source request, accept any non-empty otype match - if ( ! $object_type && ! isset($retval) ) - foreach ( $optval as $src_otype => $val ) - if ( $val && ( 0 === strpos( $src_otype, "$src_name:" ) ) ) - $retval = $val; - - if ( ! isset($retval) ) - $retval = array(); - - $otype_options[$key] = $retval; - return $retval; -} - -function scoper_get_role_handle($role_name, $role_type) { - return $role_type . '_' . str_replace(' ', '_', $role_name); -} - -function scoper_role_names_to_handles($role_names, $role_type, $fill_keys = false) { - if ( ! is_array($role_names) ) - $role_names = array($role_names); - - $role_handles = array(); - foreach ( $role_names as $role_name ) - if ( $fill_keys ) - $role_handles[ $role_type . '_' . str_replace(' ', '_', $role_name) ] = 1; - else - $role_handles[]= $role_type . '_' . str_replace(' ', '_', $role_name); - - return $role_handles; -} - -function scoper_explode_role_handle($role_handle) { - global $scoper_role_types; - $arr = (object) array(); - - foreach ( $scoper_role_types as $role_type ) { - if ( 0 === strpos($role_handle, $role_type . '_') ) { - $arr->role_type = $role_type; - $arr->role_name = substr($role_handle, strlen($role_type) + 1); - break; - } - } - - return $arr; -} - -function scoper_role_handles_to_names($role_handles) { - global $scoper_role_types; - - $role_names = array(); - foreach ( $role_handles as $role_handle ) { - foreach ( $scoper_role_types as $role_type ) - $role_handle = str_replace( $role_type . '_', '', $role_handle); - - $role_names[] = $role_handle; - } - - return $role_names; -} - -function rs_notice($message) { - require_once( 'error_rs.php' ); - awp_notice( $message, 'Role Scoper' ); -} - - -// db wrapper methods allow us to easily avoid re-filtering our own query -function scoper_db_method($method_name, $query) { - global $wpdb; - //static $buffer; - - if ( is_admin() ) { // Low-level query filtering is necessary due to WP API limitations pertaining to admin GUI. - // But make sure we don't chew our own cud (currently not an issue for front end) - global $scoper_status; - - if ( empty($scoper_status) ) - $scoper_status = (object) array(); - - /* - $use_buffer = ('query' != $method_name ) && empty($_POST); - - if ( $use_buffer ) { - $key = md5($query); - if ( isset($buffer[$key]) ) - return $buffer[$key]; - } - */ - - $scoper_status->querying_db = true; - $results = call_user_func( array(&$wpdb, $method_name), $query ); - $scoper_status->querying_db = false; - - //if ( $use_buffer ) - // $buffer[$key] = $results; - - return $results; - } else - return call_user_func( array(&$wpdb, $method_name), $query ); -} - -function scoper_get_results($query) { - return scoper_db_method('get_results', $query); -} - -function scoper_get_row($query) { - return scoper_db_method('get_row', $query); -} - -function scoper_get_col($query) { - return scoper_db_method('get_col', $query); -} - -function scoper_get_var($query) { - return scoper_db_method('get_var', $query); -} - -function scoper_query($query) { - return scoper_db_method('query', $query); -} - -function scoper_querying_db() { - global $scoper_status; - if ( isset($scoper_status) ) - return ! empty($scoper_status->querying_db); -} - -function scoper_any_role_limits() { - global $wpdb; - - $any_limits = (object) array( 'date_limited' => false, 'start_date_gmt' => false, 'end_date_gmt' => false, 'content_date_limited' => false, 'content_min_date_gmt' => false, 'content_max_date_gmt' => false ); - - if ( $row = scoper_get_row( "SELECT MAX(date_limited) AS date_limited, MAX(start_date_gmt) AS start_date_gmt, MIN(end_date_gmt) AS end_date_gmt, MAX(content_date_limited) AS content_date_limited, MAX(content_min_date_gmt) AS content_min_date_gmt, MIN(content_max_date_gmt) AS content_max_date_gmt FROM $wpdb->user2role2object_rs" ) ) { - if ( $row->date_limited ) { - $any_limits->date_limited = true; - - if ( strtotime( $row->start_date_gmt ) ) - $any_limits->start_date_gmt = true; - - if ( $row->end_date_gmt != SCOPER_MAX_DATE_STRING ) - $any_limits->end_date_gmt = true; - } - - if ( $row->content_date_limited ) { - $any_limits->content_date_limited = true; - - if ( strtotime( $row->content_min_date_gmt ) ) - $any_limits->content_min_date_gmt = true; - - if ( $row->content_max_date_gmt != SCOPER_MAX_DATE_STRING ) - $any_limits->content_max_date_gmt = true; - } - } - - return $any_limits; - -} - -function scoper_get_duration_clause( $content_date_comparison = '', $table_prefix = 'uro', $enforce_duration_limits = true ) { - static $any_role_limits; - - $clause = ''; - - if ( $enforce_duration_limits && scoper_get_option( 'role_duration_limits' ) ) { - if ( ! isset($any_role_limits) ) - $any_role_limits = scoper_any_role_limits(); - - if ( $any_role_limits->date_limited ) { - $current_time = current_time( 'mysql', 1 ); - - $subclauses = array(); - - if ( $any_role_limits->start_date_gmt ) - $subclauses []= "$table_prefix.start_date_gmt <= '$current_time'"; - - if ( $any_role_limits->end_date_gmt ) - $subclauses []= "$table_prefix.end_date_gmt >= '$current_time'"; - - $role_duration_clause = implode( " AND ", $subclauses ); - - $clause = " AND ( $table_prefix.date_limited = '0' OR ( $role_duration_clause ) ) "; - } - } - - if ( $content_date_comparison && scoper_get_option( 'role_content_date_limits' ) ) { - - if ( ! isset($any_role_limits) ) - $any_role_limits = scoper_any_role_limits(); - - if ( $any_role_limits->content_date_limited ) { - $current_time = current_time( 'mysql', 1 ); - - $subclauses = array(); - - if ( $any_role_limits->content_min_date_gmt ) - $subclauses []= "$content_date_comparison >= $table_prefix.content_min_date_gmt"; - - if ( $any_role_limits->content_max_date_gmt ) - $subclauses []= "$content_date_comparison <= $table_prefix.content_max_date_gmt"; - - $content_date_clause = implode( " AND ", $subclauses ); - - $clause .= " AND ( $table_prefix.content_date_limited = '0' OR ( $content_date_clause ) ) "; - } - } - - return $clause; -} - -function scoper_get_property_array( &$arr, $id_prop, $buffer_prop ) { - if ( ! is_array($arr) ) - return; - - $buffer = array(); - - foreach ( array_keys($arr) as $key ) - $buffer[ $arr[$key]->$id_prop ] = $arr[$key]->$buffer_prop; - - return $buffer; -} - -function scoper_restore_property_array( &$target_arr, $buffer_arr, $id_prop, $buffer_prop ) { - if ( ! is_array($target_arr) || ! is_array($buffer_arr) ) - return; - - foreach ( array_keys($target_arr) as $key ) - if ( isset( $buffer_arr[ $target_arr[$key]->$id_prop ] ) ) - $target_arr[$key]->$buffer_prop = $buffer_arr[ $target_arr[$key]->$id_prop ]; -} - -if ( ! awp_ver( '2.8' ) && ! function_exists('_x') ) { - function _x( $text, $context, $domain ) { - return _c( "$text|$context", $domain ); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/role-scoper_main.php b/blog/wp-content/plugins/role-scoper/role-scoper_main.php deleted file mode 100644 index 63251f0..0000000 --- a/blog/wp-content/plugins/role-scoper/role-scoper_main.php +++ /dev/null @@ -1,974 +0,0 @@ -value : general purpose memory cache - // If a 3rd party loads it with listing results for a scoper-defined otype, those will be used to buffer subsequent current_user_can/flt_user_has_cap queries - - var $default_restrictions = array(); - - // minimal config retrieval to support pre-init usage by WP_Scoped_User before text domain is loaded - function Scoper() { - //log_mem_usage_rs( 'new Scoper' ); - - require_once('defaults_rs.php'); - require_once('capabilities_rs.php'); - require_once('roles_rs.php'); - - //log_mem_usage_rs( 'initial Scoper require_once' ); - - $this->cap_defs = new WP_Scoped_Capabilities(); - $this->cap_defs = apply_filters('define_capabilities_rs', $this->cap_defs); - $this->cap_defs->add_member_objects( scoper_core_cap_defs() ); // core capdefs (and other core config) are not intended to be altered by other plugins - $this->cap_defs->lock(); // prevent inadvertant improper API usage - - //log_mem_usage_rs( 'cap_defs' ); - - global $scoper_role_types; - $this->role_defs = new WP_Scoped_Roles($this->cap_defs, $scoper_role_types); - - //log_mem_usage_rs( 'roles' ); - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - $this->load_role_caps(); - $this->role_defs->add_member_objects( scoper_core_role_defs() ); - - //log_mem_usage_rs( 'role_defs->add_member_objects' ); - - foreach ( $this->role_defs->get_all_keys() as $role_handle ) { - if ( ! empty($this->role_defs->members[$role_handle]->objscope_equivalents) ) { - foreach( $this->role_defs->members[$role_handle]->objscope_equivalents as $equiv_key => $equiv_role_handle ) { - if ( scoper_get_option( "{$equiv_role_handle}_role_objscope" ) ) { // If "Additional Object Role" option is set for this role, treat it as a regular direct-assigned Object Role - - if ( isset($this->role_defs->members[$equiv_role_handle]->valid_scopes) ) - $this->role_defs->members[$equiv_role_handle]->valid_scopes = array('blog' => 1, 'term' => 1, 'object' => 1); - - unset( $this->role_defs->members[$role_handle]->objscope_equivalents[$equiv_key] ); - - if ( ! defined( 'DISABLE_OBJSCOPE_EQUIV_' . $equiv_role_handle ) ) - define( 'DISABLE_OBJSCOPE_EQUIV_' . $equiv_role_handle, true ); // prevent Role Caption / Abbrev from being substituted from equivalent role - } - } - } - - } - - $this->role_defs = apply_filters('define_roles_rs', $this->role_defs); - $this->role_defs->remove_invalid(); // currently don't allow additional custom-defined post, page or link roles - } - - // To support merging in of WP role assignments, always note actual WP-defined roles - // regardless of which role type we are scoping with. - $this->role_defs->populate_with_wp_roles(); - $this->role_defs->lock(); // prevent inadvertant improper API usage - - //log_mem_usage_rs( 'role_defs - WP roles' ); - } - - function load_role_caps() { - $this->role_defs->role_caps = apply_filters('define_role_caps_rs', scoper_core_role_caps() ); - - //if ( ! is_admin() || ! defined('SCOPER_REALM_ADMIN_RS') ) { // don't remove items if the "disabled" settings are being editied - if ( $user_role_caps = scoper_get_option('user_role_caps') ) - $this->role_defs->add_role_caps( $user_role_caps ); - - if ( $disabled_role_caps = scoper_get_option('disabled_role_caps') ) - $this->role_defs->remove_role_caps( $disabled_role_caps ); - } - - function init_users_interceptor() { - if ( ! isset($this->users_interceptor) ) { - require_once('users-interceptor_rs.php'); - - //log_mem_usage_rs( 'require users-interceptor_rs' ); - - $this->users_interceptor = new UsersInterceptor_RS(); - - //log_mem_usage_rs( 'init Users Interceptor' ); - } - - return $this->users_interceptor; - } - - // potential usage during plugin activate / deactivate ( filtered config data without loading filters ) - function load_config() { - //log_mem_usage_rs( 'Scoper load_config' ); - - require_once('lib/agapetry_config_items.php'); - $this->access_types = new AGP_Config_Items(); - $this->access_types->add_member_objects( scoper_core_access_types() ); // 'front' and 'admin' are the hardcoded access types - $this->access_types->lock(); // prevent inadvertant improper API usage - - //log_mem_usage_rs( 'access types' ); - - $access_name = ( is_admin() || defined('XMLRPC_REQUEST') ) ? 'admin' : 'front'; - if ( ! defined('CURRENT_ACCESS_NAME_RS') ) - define('CURRENT_ACCESS_NAME_RS', $access_name); - - if ( ! is_admin() || ! defined('SCOPER_REALM_ADMIN_RS') ) { // don't remove items if the "disabled" settings are being editied - if ( $disabled_access_types = scoper_get_option('disabled_access_types') ) - $this->access_types->remove_members_by_key($disabled_access_types, true); - } - - // If the detected access type (admin, front or custom) were "disabled", - // they are still detected, but we note that query filters should not be applied - if ( ! $this->access_types->is_member($access_name) ) - define('DISABLE_QUERYFILTERS_RS', true); - - - global $current_user; - - if ( empty($current_user->assigned_blog_roles) ) { - foreach ($this->role_defs->get_anon_role_handles() as $role_handle) { - $current_user->assigned_blog_roles[ANY_CONTENT_DATE_RS][$role_handle] = true; - $current_user->blog_roles[ANY_CONTENT_DATE_RS][$role_handle] = true; - } - } - - require_once('data_sources_rs.php'); - $this->data_sources = new WP_Scoped_Data_Sources(); - $this->data_sources->add_member_objects( scoper_core_data_sources() ); - $this->data_sources = apply_filters('define_data_sources_rs', $this->data_sources); - $this->data_sources->lock(); // prevent inadvertant improper API usage - - //log_mem_usage_rs( 'data sources' ); - - require_once('taxonomies_rs.php'); - - //log_mem_usage_rs( 'require taxonomies' ); - - $this->taxonomies = new WP_Scoped_Taxonomies( $this->data_sources, scoper_get_option('enable_wp_taxonomies') ); - $this->taxonomies->add_member_objects( scoper_core_taxonomies() ); - $this->taxonomies = apply_filters('define_taxonomies_rs', $this->taxonomies); - $this->taxonomies->lock(); - - //log_mem_usage_rs( 'new WP_Scoped_Taxonomies' ); - - $this->role_defs->lock(); - - do_action('config_loaded_rs'); - } - - function init() { - //log_mem_usage_rs( 'Scoper->init() start' ); - - scoper_version_check(); - - if ( ! isset($this->data_sources) ) - $this->load_config(); - - $is_administrator = is_content_administrator_rs(); - - if ( $doing_cron = defined('DOING_CRON') ) - if ( ! defined('DISABLE_QUERYFILTERS_RS') ) - define('DISABLE_QUERYFILTERS_RS', true); - - $direct_file_access = strpos($_SERVER['QUERY_STRING'], 'rs_rewrite'); - $this->direct_file_access = $direct_file_access; - $frontend_admin = false; - - //log_mem_usage_rs( 'before new Scoper Admin' ); - - if ( $is_admin = is_admin() ) { - $script_name = $_SERVER['SCRIPT_NAME']; - - // ===== Admin filters (menu and other basics) which are (almost) always loaded - require_once('admin/admin_rs.php'); - - //log_mem_usage_rs( 'require admin_rs.php' ); - - $this->admin = new ScoperAdmin(); - - //log_mem_usage_rs( 'new Scoper Admin done' ); - - if ( ! strpos($script_name, 'p-admin/async-upload.php' ) ) { - if ( ! defined('DISABLE_QUERYFILTERS_RS') || $is_administrator ) { - require_once( 'admin/filters-admin-ui_rs.php' ); - - //log_mem_usage_rs( 'require filters-admin-ui_rs.php' ); - - $this->filters_admin_ui = new ScoperAdminFiltersUI(); - - //log_mem_usage_rs( 'new Scoper Admin FiltersUI done' ); - } - } - // ===== - - // ===== Script-specific Admin filters - if ( strpos($script_name, 'p-admin/users.php') ) { - require_once( 'admin/filters-admin-users_rs.php' ); - - //log_mem_usage_rs( 'require filters-admin-users' ); - - } elseif ( strpos($script_name, 'p-admin/edit.php') || strpos($script_name, 'p-admin/edit-pages.php') ) { - if ( ! defined('DISABLE_QUERYFILTERS_RS') || $is_administrator ) - require_once( 'admin/filters-admin-ui-listing_rs.php' ); - - //log_mem_usage_rs( 'required filters-admin-ui-listing_rs.php' ); - } - // ===== - - } elseif ( ! $direct_file_access && ! $doing_cron && $this->is_front() ) { - // ===== Front-end-only filters which are always loaded - if ( ! defined('DISABLE_QUERYFILTERS_RS') ) { - require_once('query-interceptor-front_rs.php'); - - //log_mem_usage_rs( 'required query-interceptor-front_rs.php' ); - } - - if ( ! $is_administrator ) { - require_once('qry-front_non-administrator_rs.php'); - - //log_mem_usage_rs( 'require qry-front_non-administrator_rs.php' ); - - $this->feed_interceptor = new FeedInterceptor_RS(); // file already required in role-scoper.php - - //log_mem_usage_rs( 'new feed-interceptor' ); - } - - require_once('template-interceptor_rs.php'); - $this->template_interceptor = new TemplateInterceptor_RS(); - - //log_mem_usage_rs( 'new template_interceptor' ); - - $frontend_admin = ! scoper_get_option('no_frontend_admin'); // potential performance enhancement - // ===== - } - - // ===== Filters which support automated role maintenance following content creation/update - // Require an explicitly set option to skip these for front end access, just in case other plugins modify content from the front end. - if ( ( $is_admin || defined('XMLRPC_REQUEST') || ( ( $frontend_admin || $doing_cron ) && ! $direct_file_access ) ) ) { - require_once( 'admin/cache_flush_rs.php' ); - require_once( 'admin/filters-admin_rs.php' ); - - //log_mem_usage_rs( 'require filters-admin' ); - - $this->filters_admin = new ScoperAdminFilters(); - - //log_mem_usage_rs( 'new ScoperAdminFilters' ); - } - // ===== - - if ( $is_admin ) { - // ===== Special early exit if this is a plugin install script - if ( strpos($script_name, 'p-admin/plugins.php') || strpos($script_name, 'p-admin/plugin-install.php') || strpos($script_name, 'p-admin/plugin-editor.php') ) { - // flush cache on activation of any plugin, in case we cached results based on its presence / absence - if ( ! empty($_POST) || ! empty($_REQUEST['action']) ) { - wpp_cache_flush(); - } - - do_action( 'scoper_init' ); - return; // no further filtering on WP plugin maintenance scripts - } - // ===== - } - - - // ===== Filters which are always loaded (except on plugin scripts), for any access type - if ( ! $direct_file_access && ! $doing_cron ) { - include_once( 'hardway/wp-patches_agp.php' ); // simple patches for WP - - if ( $this->is_front() || strpos($script_name, 'p-admin/edit.php') || strpos($script_name, 'p-admin/edit-pages.php') ) { - - require_once('query-interceptor-base_rs.php'); - - //log_mem_usage_rs( 'require query-interceptor-base_rs' ); - - $this->query_interceptor_base = new QueryInterceptorBase_RS(); // listing filter used for role status indication in edit posts/pages and on front end by template functions - - //log_mem_usage_rs( 'new QueryInterceptorBase_RS' ); - } - } - - require_once('attachment-interceptor_rs.php'); - $this->attachment_interceptor = new AttachmentInterceptor_RS(); // .htaccess file is always there, so we always need to handle its rewrites - - //log_mem_usage_rs( 'new AttachmentInterceptor_RS' ); - // ===== - - - // ===== Content Filters to limit/enable the current user - $disable_queryfilters = defined('DISABLE_QUERYFILTERS_RS'); - - if ( $disable_queryfilters && ! $direct_file_access ) { - // need to always load filers for profile.php to support filtering of subscribe2 categories based on category read access - // (potential for other plugins to make similar use of profile.php) - $always_filter_uris = apply_filters('scoper_always_filter_uris', array( 'p-admin/profile.php' ) ); - foreach ( $always_filter_uris as $uri_sub ) { - if ( strpos(urldecode($_SERVER['REQUEST_URI']), $uri_sub) ) { - $disable_queryfilters = false; - break; - } - } - } - - if ( ! $disable_queryfilters ) { - if ( ! $is_administrator ) { - if ( $direct_file_access ) { - require_once('cap-interceptor-basic_rs.php'); // only need to support basic read_post / read_page check for direct file access - add_filter('user_has_cap', array('CapInterceptorBasic_RS', 'flt_user_has_cap'), 99, 3); - - //log_mem_usage_rs( 'new CapInterceptorBasic_RS' ); - - } else { - require_once('cap-interceptor_rs.php'); - - $this->cap_interceptor = new CapInterceptor_RS(); - - //log_mem_usage_rs( 'new CapInterceptor_RS' ); - } - } - - // (also use content filters on front end to FILTER IN private content which WP inappropriately hides from administrators) - if ( $this->is_front() || ! $is_administrator ) { - require_once('query-interceptor_rs.php'); - - //log_mem_usage_rs( 'require query-interceptor_rs' ); - - $this->query_interceptor = new QueryInterceptor_RS(); - - //log_mem_usage_rs( 'new QueryInterceptor_RS' ); - } - - - if ( ! $direct_file_access ) { - // port or low-level query filters to work around limitations in WP core API - require_once('hardway/hardway_rs.php'); // need get_pages() filtering to include private pages for some 3rd party plugin config UI (Simple Section Nav) - - //log_mem_usage_rs( 'required hardway_rs' ); - - // buffering of taxonomy children is disabled with non-admin user logged in - // But that non-admin user may add cats. Don't allow unfiltered admin to rely on an old copy of children - global $wp_taxonomies; - if ( ! empty($wp_taxonomies) ) { - foreach ( array_keys($wp_taxonomies) as $taxonomy ) - add_filter ( "option_{$taxonomy}_children", create_function( '$option_value', "return rs_get_terms_children('$taxonomy', " . '$option_value );') ); - //add_filter("option_{$taxonomy}_children", create_function( '', "return rs_get_terms_children('$taxonomy');") ); - } - } - - if ( $is_admin || defined('XMLRPC_REQUEST') ) { - if ( ! strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugin-editor.php' ) && ! strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugins.php' ) ) { - // low-level filtering for miscellaneous admin operations which are not well supported by the WP API - $hardway_uris = array( - 'p-admin/index.php', 'p-admin/revision.php', 'admin.php?page=rvy-revisions', - 'p-admin/post.php', 'p-admin/post-new.php', 'p-admin/page.php', 'p-admin/page-new.php', - 'p-admin/link-manager.php', 'p-admin/edit.php', 'p-admin/edit-pages.php', 'p-admin/edit-comments.php', - 'p-admin/categories.php', 'p-admin/link-category.php', 'p-admin/edit-link-categories.php', 'p-admin/upload.php', - 'p-admin/edit-tags.php', 'p-admin/profile.php', 'p-admin/link-add.php', 'p-admin/admin-ajax.php' ); - - $hardway_uris = apply_filters('scoper_admin_hardway_uris', $hardway_uris); - - $uri = urldecode($_SERVER['REQUEST_URI']); - foreach ( $hardway_uris as $uri_sub ) { // index.php can only be detected by index.php, but 3rd party-defined hooks may include arguments only present in REQUEST_URI - if ( defined('XMLRPC_REQUEST') || strpos($script_name, $uri_sub) || strpos($uri, $uri_sub) ) { - require_once('hardway/hardway-admin_rs.php'); - - //log_mem_usage_rs( 'required hardway-admin_rs' ); - - break; - } - } - } - } // endif is_admin or xmlrpc - - } // endif query filtering not disabled for this access type - - do_action( 'scoper_init' ); - - // ===== end Content Filters - - } // end function init - - - - // Primarily for internal use. Drops some features of WP core get_terms while adding the following versatility: - // - supports any RS-defined taxonomy, with or without WP taxonomy schema - // - optionally return term_id OR term_taxonomy_id as single column - // - specify filtered or unfiltered via argument - // - optionally get terms for a specific object - // - option to order by term hierarchy (but structure as flat array) - function get_terms($taxonomy, $filtering = true, $cols = COLS_ALL_RS, $object_id = 0, $args = array()) { - if ( ! $tx = $this->taxonomies->get($taxonomy) ) - return array(); - - global $wpdb; - - $defaults = array( 'order_by' => '', 'use_object_roles' => false, 'access_name' => '' ); // IMPORTANT to default access_name to nullstring - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( $filtering && is_administrator_rs($tx->source) ) - $filtering = 0; - - // try to pull it out of wpcache - $ckey = md5( $taxonomy . $cols . $object_id . serialize($args) . $order_by ); - - if ( $filtering ) { - $src_name = $this->taxonomies->member_property($taxonomy, 'object_source', 'name'); - - if ( ADMIN_TERMS_FILTER_RS === $filtering ) { - if ( $reqd_caps = $this->cap_defs->get_matching($src_name, $taxonomy, OP_ADMIN_RS) ) { - $args['reqd_caps_by_otype'] = array(); - $args['reqd_caps_by_otype'][$src_name] = array_keys($reqd_caps); - } - } else { - $args['reqd_caps_by_otype'] = $this->get_terms_reqd_caps($src_name, $access_name); - } - - $ckey = md5( $ckey . serialize($reqd_caps) ); ; // can vary based on request URI - - global $current_user; - $cache_flag = SCOPER_ROLE_TYPE . '_scoper_get_terms'; - $cache = $current_user->cache_get($cache_flag); - } else { - $cache_flag = "all_terms"; - $cache_id = 'all'; - $cache = wpp_cache_get( $cache_id, $cache_flag ); - } - - if ( isset( $cache[ $ckey ] ) ) { - return $cache[ $ckey ]; - } - - // call base class method to build query - $terms_only = ( ! $filtering || empty($use_object_roles) ); - - $query_base = $this->taxonomies->get_terms_query($taxonomy, $cols, $object_id, $terms_only ); - - if ( ! $query_base ) - return array(); - - $query = ( $filtering ) ? apply_filters('terms_request_rs', $query_base, $taxonomy, '', $args) : $query_base; - - // avoid sending alarms to SQL purists if this query was not modified by RS filter - if ( $query_base == $query ) - $query = str_replace( 'WHERE 1=1 AND', 'WHERE', $query ); - - if ( COL_ID_RS == $cols ) - $results = scoper_get_col($query); - elseif ( COL_COUNT_RS == $cols ) - $results = intval( scoper_get_var($query) ); - else { - // TODO: why is this still causing an extra (and costly) scoped query? - /* - // for COLS_ALL query, need to call core get_terms call in case another plugin is translating term names - if ( has_filter( 'get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms') ) ) { - remove_filter( 'get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3 ); - $all_terms = get_terms('category'); - add_filter( 'get_terms', array('ScoperHardwayTaxonomy', 'flt_get_terms'), 1, 3 ); - - $term_names = scoper_get_property_array( $all_terms, 'term_id', 'name' ); - } - */ - - $results = scoper_get_results($query); - - //scoper_restore_property_array( $results, $term_names, 'term_id', 'name' ); - - if ( ORDERBY_HIERARCHY_RS == $order_by ) { - require_once('admin/admin_lib_rs.php'); - if ( $src = $this->taxonomies->member_property($taxonomy, 'source') ) { - if ( ! empty($src->cols->id) && ! empty($src->cols->parent) ) { - require_once('admin/admin_ui_lib_rs.php'); - $results = ScoperAdminUI::order_by_hierarchy($results, $src->cols->id, $src->cols->parent); - } - } - } - } - - $cache[ $ckey ] = $results; - - if ( $results || empty( $_POST ) ) { // todo: why do we get an empty array for unfiltered request for object terms early in POST processing? (on submission of a new post by a contributor) - if ( $filtering ) - $current_user->cache_set( $cache, $cache_flag ); - else - wpp_cache_set( $cache_id, $cache, $cache_flag ); - } - - return $results; - } - - function get_default_restrictions($scope, $args = '') { - $defaults = array( 'force_refresh' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( isset($this->default_restrictions[$scope]) && ! $force_refresh ) - return $this->default_restrictions[$scope]; - - $role_type = SCOPER_ROLE_TYPE; - - if ( empty($force_refresh) ) { - $role_type = SCOPER_ROLE_TYPE; - $cache_flag = "{$role_type}_{$scope}_def_restrictions"; - $cache_id = md5(''); // maintain default id generation from previous versions - - $default_strict = wpp_cache_get($cache_id, $cache_flag); - } - - if ( $force_refresh || ! is_array($default_strict) ) { - global $wpdb; - - $qry = "SELECT src_or_tx_name, role_name FROM $wpdb->role_scope_rs WHERE role_type = '$role_type' AND topic = '$scope' AND max_scope = '$scope' AND obj_or_term_id = '0'"; - - $default_strict = array(); - if ( $results = scoper_get_results($qry) ) { - foreach ( $results as $row ) { - $role_handle = scoper_get_role_handle($row->role_name, $role_type); - $default_strict[$row->src_or_tx_name][$role_handle] = true; - - if (OBJECT_SCOPE_RS == $scope) { - if ( $objscope_equivalents = $this->role_defs->member_property($role_handle, 'objscope_equivalents') ) - foreach ( $objscope_equivalents as $equiv_role_handle ) - $default_strict[$row->src_or_tx_name][$equiv_role_handle] = true; - } - - } - } - } - - $this->default_restrictions[$scope] = $default_strict; - - wpp_cache_set($cache_id, $default_strict, $cache_flag); - - return $default_strict; - } - - // for any given role requirement, a strict term is one which won't blend in blog role assignments - // (i.e. a term which requires the specified role to be assigned as a term role or object role) - // - // returns $arr['restrictions'][role_handle][obj_or_term_id] = array( 'assign_for' => $row->assign_for, 'inherited_from' => $row->inherited_from ), - // ['unrestrictions'][role_handle][obj_or_term_id] = array( 'assign_for' => $row->assign_for, 'inherited_from' => $row->inherited_from ) - function get_restrictions($scope, $src_or_tx_name, $args = '') { - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - $def_cols = COL_ID_RS; - - // Note: propogating child restrictions are always directly assigned to the child term(s). - // Use include_child_restrictions to force inclusion of restrictions that are set for child items only, - // for direct admin of these restrictions and for propagation on term/object creation. - $defaults = array( 'id' => 0, 'include_child_restrictions' => false, - 'force_refresh' => false, 'role_type' => $SCOPER_ROLE_TYPE, - 'cols' => $def_cols, 'return_array' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - //if ( $return_array ) - // $force_refresh = true; // wpcache contains require_for value only - - $cache_flag = "{$role_type}_{$scope}_restrictions_{$src_or_tx_name}"; - $cache_id = md5($src_or_tx_name . $cols . strval($return_array) . strval($include_child_restrictions) ); - - if ( ! $force_refresh ) { - $items = wpp_cache_get($cache_id, $cache_flag); - - if ( is_array($items) ) { - if ( $id ) { - foreach ( $items as $setting_type => $roles ) - foreach ( array_keys($roles) as $role_handle ) - $items[$setting_type][$role_handle] = array_intersect_key( $items[$setting_type][$role_handle], array( $id => true ) ); - } - - return $items; - } - } - - if ( ! isset($this->default_restrictions[$scope]) ) - $this->default_restrictions[$scope] = $this->get_default_restrictions($scope); - - global $wpdb; - - if ( ! empty($this->default_restrictions[$scope][$src_or_tx_name]) ) { - if ( $strict_roles = array_keys($this->default_restrictions[$scope][$src_or_tx_name]) ) { - if ( OBJECT_SCOPE_RS == $scope ) { - // apply default_strict handling to objscope equivalents of each strict role - foreach ( $strict_roles as $role_handle ) - if ( $objscope_equivalents = $this->role_defs->member_property($role_handle, 'objscope_equivalents') ) - $strict_roles = array_merge($strict_roles, $objscope_equivalents); - - $strict_roles = array_unique($strict_roles); - } - } - - $strict_role_in = "'" . implode("', '", scoper_role_handles_to_names($strict_roles) ) . "'"; - } else - $strict_role_in = ''; - - $items = array(); - if ( ! empty($strict_roles) ) { - foreach ( $strict_roles as $role_handle ) - $items['unrestrictions'][$role_handle] = array(); // calling code will use this as an indication that the role is default strict - } - - $default_strict_modes = array( false ); - - if ( $strict_role_in ) - $default_strict_modes []= true; - - foreach ( $default_strict_modes as $default_strict ) { - $setting_type = ( $default_strict ) ? 'unrestrictions' : 'restrictions'; - - if ( TERM_SCOPE_RS == $scope ) - $max_scope = ( $default_strict ) ? 'blog' : 'term'; // note: max_scope='object' entries are treated as separate, overriding requirements - else - $max_scope = ( $default_strict ) ? 'blog' : 'object'; // Storage of 'blog' max_scope as object restriction does not eliminate any term restrictions. It merely indicates, for data sources that are default strict, that this object does not restrict roles - - if ( $default_strict ) - $role_clause = "AND role_name IN ($strict_role_in)"; - elseif ($strict_role_in) - $role_clause = "AND role_name NOT IN ($strict_role_in)"; - else - $role_clause = ''; - - $for_clause = ( $include_child_restrictions ) ? '' : "AND require_for IN ('entity', 'both')"; - - $qry_base = "FROM $wpdb->role_scope_rs WHERE role_type = '$role_type' AND topic = '$scope' AND max_scope = '$max_scope' AND src_or_tx_name = '$src_or_tx_name' $for_clause $role_clause"; - - if ( COL_COUNT_RS == $cols ) - $qry = "SELECT role_name, count(obj_or_term_id) AS item_count, require_for $qry_base GROUP BY role_name"; - else - $qry = "SELECT role_name, obj_or_term_id, require_for AS assign_for, inherited_from $qry_base"; - - if ( $results = scoper_get_results($qry) ) { - foreach( $results as $row) { - $role_handle = scoper_get_role_handle($row->role_name, $role_type); - - if ( COL_COUNT_RS == $cols ) - $items[$setting_type][$role_handle] = $row->item_count; - elseif ( $return_array ) - $items[$setting_type][$role_handle][$row->obj_or_term_id] = array( 'assign_for' => $row->assign_for, 'inherited_from' => $row->inherited_from ); - else - $items[$setting_type][$role_handle][$row->obj_or_term_id] = $row->assign_for; - } - } - - } // end foreach default_strict_mode - - wpp_cache_set($cache_id, $items, $cache_flag); - - if ( $id ) { - foreach ( $items as $setting_type => $roles ) - foreach ( array_keys($roles) as $role_handle ) - $items[$setting_type][$role_handle] = array_intersect_key( $items[$setting_type][$role_handle], array( $id => true ) ); - } - - return $items; - } - - - // wrapper for back-compat with calling code expecting array without date limit dimension - function qualify_terms($reqd_caps, $taxonomy = 'category', $qualifying_roles = '', $args = '') { - $terms = $this->qualify_terms_daterange( $reqd_caps, $taxonomy, $qualifying_roles, $args ); - - if ( isset($terms['']) && is_array($terms['']) ) - return $terms['']; - else - return array(); - } - - // $qualifying_roles = array[role_handle] = 1 : qualifying roles - // returns array of term_ids (terms which have at least one of the qualifying roles assigned) - function qualify_terms_daterange($reqd_caps, $taxonomy = 'category', $qualifying_roles = '', $args = '') { - $defaults = array( 'src_name' => '', 'object_type' => '', 'user' => '', - 'return_id_type' => COL_ID_RS, 'use_blog_roles' => true, - 'alternate_roles' => '', 'override_roles' => '', 'object_type' => '', 'ignore_restrictions' => false ); - - if ( isset($args['qualifying_roles']) ) - unset($args['qualifying_roles']); - - if ( isset($args['reqd_caps']) ) - unset($args['reqd_caps']); - - $args = array_merge( $defaults, (array) $args ); - extract($args); - - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - if ( ! $src_name || ! $object_type ) { - $object_types = $this->cap_defs->object_types_from_caps($reqd_caps); - - if ( count($object_types) == 1 ) { - $src_name = key($object_types); - - if ( (count($object_types[$src_name]) == 1) && key($object_types[$src_name]) ) - $object_type = key($object_types[$src_name]); - else - $object_type = $this->data_sources->detect('type', $src_name); - } - } - - if ( ! $qualifying_roles ) // calling function might save a little work or limit to a subset of qualifying roles - $qualifying_roles = $this->role_defs->qualify_roles($reqd_caps); - - if ( ! $this->taxonomies->is_member($taxonomy) ) - return array( '' => array() ); - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - // If the taxonomy does not require objects to have at least one term, there are no strict terms. - // Therefore, blogrole blending is not per-term and is handled in the calling function rather than here. - if ( ! $this->taxonomies->member_property($taxonomy, 'requires_term') ) - $use_blog_roles = false; - - if ( $override_roles ) - $qualifying_roles = $override_roles; - - if ( ! is_array($qualifying_roles) ) - $qualifying_roles = array($qualifying_roles => 1); - - if ( $alternate_roles ) - $qualifying_roles = array_unique( array_merge($qualifying_roles, $alternate_roles) ); - - // no need to serialize and md5 the whole user object - if ( ! empty($user) ) - $args['user'] = $user->ID; - - // try to pull previous result out of memcache - ksort($qualifying_roles); - $rolereq_key = md5( serialize($reqd_caps) . serialize( array_keys($qualifying_roles) ) . serialize($args) ); - - if ( isset($user->qualified_terms[$taxonomy][$rolereq_key]) ) - return $user->qualified_terms[$taxonomy][$rolereq_key]; - - if ( ! $qualifying_roles ) - return array( '' => array() ); - - $all_terms = $this->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS); // returns term_id, even for WP > 2.3 - - if ( ! isset($user->term_roles[$taxonomy]) ) - $user->get_term_roles_daterange($taxonomy); // returns term_id for categories - - $good_terms = array( '' => array() ); - - if ( $user->term_roles[$taxonomy] ) { - foreach ( array_keys($user->term_roles[$taxonomy]) as $date_key ) { - //narrow down to roles which satisfy this call AND are owned by current user - if ( $good_terms[$date_key] = array_intersect_key( $user->term_roles[$taxonomy][$date_key], $qualifying_roles ) ) - // flatten from term_roles_terms[role_handle] = array of term_ids - // to term_roles_terms = array of term_ids - $good_terms[$date_key] = agp_array_flatten( $good_terms[$date_key] ); - } - } - - if ( $use_blog_roles ) { - foreach ( array_keys($user->blog_roles) as $date_key ) { - $user_blog_roles = array_intersect_key( $user->blog_roles[$date_key], $qualifying_roles ); - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - // Also include user's WP blogrole(s) which correspond to the qualifying RS role(s) - if ( $wp_qualifying_roles = $this->role_defs->qualify_roles($reqd_caps, 'wp') ) { - - if ( $user_blog_roles_wp = array_intersect_key( $user->blog_roles[$date_key], $wp_qualifying_roles ) ) { - - // Credit user's qualifying WP blogrole via equivalent RS role(s) - // so we can also enforce "term restrictions", which are based on RS roles - $user_blog_roles_via_wp = $this->role_defs->get_contained_roles( array_keys($user_blog_roles_wp), false, 'rs' ); - $user_blog_roles_via_wp = array_intersect_key( $user_blog_roles_via_wp, $qualifying_roles ); - $user_blog_roles = array_merge( $user_blog_roles, $user_blog_roles_via_wp ); - } - } - } - - if ( $user_blog_roles ) { - if ( empty($ignore_restrictions) ) { - // array of term_ids that require the specified role to be assigned via taxonomy or blog role (user blog caps ignored) - $strict_terms = $this->get_restrictions(TERM_SCOPE_RS, $taxonomy); - } else - $strict_terms = array(); - - foreach ( array_keys($user_blog_roles) as $role_handle ) { - if ( isset($strict_terms['restrictions'][$role_handle]) && is_array($strict_terms['restrictions'][$role_handle]) ) - $terms_via_this_role = array_diff( $all_terms, array_keys($strict_terms['restrictions'][$role_handle]) ); - - elseif ( isset($strict_terms['unrestrictions'][$role_handle]) && is_array($strict_terms['unrestrictions'][$role_handle]) ) - $terms_via_this_role = array_intersect( $all_terms, array_keys( $strict_terms['unrestrictions'][$role_handle] ) ); - - else - $terms_via_this_role = $all_terms; - - if( $good_terms[$date_key] ) - $good_terms[$date_key] = array_merge( $good_terms[$date_key], $terms_via_this_role ); - else - $good_terms[$date_key] = $terms_via_this_role; - } - } - } - } - - foreach ( array_keys($good_terms) as $date_key ) { - if ( $good_terms[$date_key] = array_intersect( $good_terms[$date_key], $all_terms ) ) // prevent orphaned category roles from skewing access - $good_terms[$date_key] = array_unique( $good_terms[$date_key] ); - - // if COL_TAXONOMY_ID_RS, return a term_taxonomy_id instead of term_id - if ( $good_terms[$date_key] && (COL_TAXONOMY_ID_RS == $return_id_type) && is_taxonomy($taxonomy) ) { - $all_terms_cols = $this->get_terms( $taxonomy, UNFILTERED_RS ); - $good_tt_ids = array(); - foreach ( $good_terms[$date_key] as $term_id ) - foreach (array_keys($all_terms_cols) as $termkey) - if ( $all_terms_cols[$termkey]->term_id == $term_id ) { - $good_tt_ids []= $all_terms_cols[$termkey]->term_taxonomy_id; - break; - } - - $good_terms[$date_key] = $good_tt_ids; - } - } - - $user->qualified_terms[$taxonomy][$rolereq_key] = $good_terms; - - return $good_terms; - } - - // account for different contexts of get_terms calls - // (Scoped roles can dictate different results for front end, edit page/post, manage categories) - function get_terms_reqd_caps($src_name, $access_name = '') { - global $current_user; - - if ( ! $this->data_sources->is_member($src_name) ) - return; - - if ( empty($access_name) ) - $access_name = ( is_admin() && strpos($_SERVER['SCRIPT_NAME'], 'p-admin/profile.php') ) ? 'front' : CURRENT_ACCESS_NAME_RS; // hack to support subscribe2 categories checklist - - if ( ! $arr = $this->data_sources->member_property($src_name, 'terms_where_reqd_caps', $access_name ) ) - return; - - if ( ! is_array($arr) ) - $arr = array($arr); - - $full_uri = urldecode($_SERVER['REQUEST_URI']); - - $matched = array(); - foreach ( $arr as $uri_sub => $reqd_caps ) // if no uri substrings match, use default (nullstring key) - if ( ( $uri_sub && strpos($full_uri, $uri_sub) ) || ( ! $uri_sub && ! $matched ) ) - $matched = $reqd_caps; - - // replace matched caps with status-specific equivalent if applicable - if ( $matched ) { - if ( $object_id = $this->data_sources->detect('id', $src_name) ) { - $owner_id = $this->data_sources->get_from_db('owner', $src_name, $object_id); - $cap_attribs = ( $owner_id == $current_user->ID ) ? '' : array('others'); - - $status = $this->data_sources->detect('status', $src_name, $object_id); - - if ( $status || $cap_attribs ) - foreach ( $matched as $object_type => $otype_caps ) - foreach ( $otype_caps as $cap_name ) - if ( $cap_def = $this->cap_defs->get($cap_name) ) - if ( $other_defs = $this->cap_defs->get_matching($src_name, $cap_def->object_type, $cap_def->op_type, STATUS_ANY_RS) ) - - foreach ( $other_defs as $other_cap_name => $other_def ) - if ( $other_cap_name != $cap_name ) - - if ( ( ! $other_def->status || ( $other_def->status == $status ) ) - && ( empty($other_def->attributes) || ( $other_def->attributes == $cap_attribs ) ) ) - $matched[] = $other_cap_name; - } - } - - return $matched; - } - - function users_who_can($reqd_caps, $cols = COLS_ALL_RS, $object_src_name = '', $object_id = 0, $args = '' ) { - // if there are not capability requirements, no need to load Users_Interceptor filtering class - if ( ! $reqd_caps ) { - if ( COL_ID_RS == $cols ) - $qcols = 'ID'; - elseif ( COLS_ID_DISPLAYNAME_RS == $cols ) - $qcols = "ID, display_name"; - elseif ( COLS_ALL_RS == $cols ) - $qcols = "*"; - else - $qcols = $cols; - - global $wpdb; - - $orderby = ( $cols == COL_ID_RS ) ? '' : 'ORDER BY display_name'; - - $qry = "SELECT $qcols FROM $wpdb->users $orderby"; - - if ( COL_ID_RS == $cols ) - return scoper_get_col( $qry ); - else - return scoper_get_results( $qry ); - - } else { - $defaults = array( 'where' => '', 'orderby' => '', 'disable_memcache' => false, 'group_ids' => '', 'force_refresh' => false, 'force_all_users' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - $role_type = SCOPER_ROLE_TYPE; - $cache_flag = "{$role_type}_users_who_can"; - $cache_id = md5(serialize($reqd_caps) . $cols . 'src' . $object_src_name . 'id' . $object_id . serialize($args) ); - - if ( ! $force_refresh ) { - // if we already have the results cached, no need to load Users_Interceptor filtering class - $users = wpp_cache_get($cache_id, $cache_flag); - - if ( is_array($users) ) - return $users; - } - - $this->init_users_interceptor(); - $users = $this->users_interceptor->users_who_can($reqd_caps, $cols, $object_src_name, $object_id, $args ); - - wpp_cache_set($cache_id, $users, $cache_flag); - return $users; - } - } - - function groups_who_can($reqd_caps, $cols = COLS_ALL_RS, $object_src_name = '', $object_id = 0, $args = '' ) { - $this->init_users_interceptor(); - return $this->users_interceptor->groups_who_can($reqd_caps, $cols, $object_src_name, $object_id, $args ); - } - - function is_front() { - return ( defined('CURRENT_ACCESS_NAME_RS') && ( 'front' == CURRENT_ACCESS_NAME_RS ) ); - } -} // end Scoper class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/role_usage_rs.php b/blog/wp-content/plugins/role-scoper/role_usage_rs.php deleted file mode 100644 index 5c6b20f..0000000 --- a/blog/wp-content/plugins/role-scoper/role_usage_rs.php +++ /dev/null @@ -1,233 +0,0 @@ -checked_ids = array(); - return $query; - } - - function determine_role_usage_rs( $src_name = 'post', $listed_ids = '' ) { - global $scoper, $wpdb; - - if ( 'post' != $src_name ) - return; - - if ( empty($listed_ids) ) { - if ( ! empty($scoper->listed_ids[$src_name]) ) - $listed_ids = $scoper->listed_ids[$src_name]; - else - return; - } - - if ( empty($this->checked_ids[$src_name]) ) - $this->checked_ids[$src_name] = array(); - else { - if ( ! array_diff_key( $this->checked_ids[$src_name], $listed_ids ) ) - return; - } - - $this->checked_ids[$src_name] = $this->checked_ids[$src_name] + $listed_ids; - - $src = $scoper->data_sources->get($src_name); - $col_id = $src->cols->id; - $col_type = ( isset($src->cols->type) ) ? $src->cols->type : ''; - - $role_type = SCOPER_ROLE_TYPE; - - // temp hardcode - if ( is_admin() ) { - if ( strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/edit-pages.php' ) ) - $object_types = array( 'page' ); - else - $object_types = array( 'post' ); - - } else - $object_types = array('post', 'page'); - - // For now, only determine restricted posts if using RS role type. - // Backing this out will be more convoluted for WP role type; may need to just list which roles are restricted rather than trying to give an Restricted Read/Edit summary - if ( 'rs' == SCOPER_ROLE_TYPE) { - $roles = array(); - if ( is_admin() ) { - $roles['edit']['post'] = array( 'publish' => 'rs_post_editor', 'private' => 'rs_post_editor', 'draft' => 'rs_post_contributor', 'pending' => 'rs_post_contributor', 'future' => 'rs_post_editor', 'trash' => 'rs_post_editor' ); - $roles['edit']['page'] = array( 'publish' => 'rs_page_editor', 'private' => 'rs_page_editor', 'draft' => 'rs_page_contributor', 'pending' => 'rs_page_contributor', 'future' => 'rs_page_editor', 'trash' => 'rs_page_editor' ); - - $roles['read']['post'] = array( 'publish' => 'rs_post_reader', 'private' => 'rs_private_post_reader', 'draft' => 'rs_post_reader', 'pending' => 'rs_post_reader', 'future' => 'rs_post_reader', 'trash' => 'rs_post_editor' ); - $roles['read']['page'] = array( 'publish' => 'rs_page_reader', 'private' => 'rs_private_page_reader', 'draft' => 'rs_page_reader', 'pending' => 'rs_page_reader', 'future' => 'rs_page_reader', 'trash' => 'rs_page_editor' ); - } else { - $roles['read']['post'] = array( 'publish' => 'rs_post_reader', 'private' => 'rs_private_post_reader' ); - $roles['read']['page'] = array( 'publish' => 'rs_page_reader', 'private' => 'rs_private_page_reader' ); - } - } - - // which of these results ignore blog role assignments? - if ( ! empty( $src->uses_taxonomies ) ) { - - foreach ($src->uses_taxonomies as $taxonomy) { - - $tx_object_types = $object_types; - - foreach ( $tx_object_types as $key => $object_type ) // ignore term restrictions / roles for object types which have them disabled - if( ! scoper_get_otype_option( 'use_term_roles', $src_name, $object_type ) ) - unset( $tx_object_types[$key] ); - - if ( ! $tx_object_types ) - continue; - - $qvars = $scoper->taxonomies->get_terms_query_vars($taxonomy); - $term_join = " INNER JOIN {$qvars->term->table} {$qvars->term->as} ON {$src->table}.{$src->cols->id} = {$qvars->term->alias}.{$qvars->term->col_obj_id} "; - - // ======== Log term restrictions ======== - // - if ( $scoper->taxonomies->member_property($taxonomy, 'requires_term') && ( 'rs' == SCOPER_ROLE_TYPE ) ) { - - if ( $strict_terms = $scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy ) ) - $scoper->any_restricted_terms = true; - - $all_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS); - - foreach ( array_keys($roles) as $op_type ) { - $status_where = array(); - - foreach ( $tx_object_types as $object_type) { - $term_clauses = array(); - - foreach ( $roles[$op_type][$object_type] as $status => $check_role ) { - if ( isset($strict_terms['restrictions'][$check_role]) && is_array($strict_terms['restrictions'][$check_role]) ) - $this_strict_terms = array_keys( $strict_terms['restrictions'][$check_role] ); - - elseif ( isset($strict_terms['unrestrictions'][$check_role]) && is_array($strict_terms['unrestrictions'][$check_role]) ) - $this_strict_terms = array_diff($all_terms, array_keys( $strict_terms['unrestrictions'][$check_role] ) ); - else - $this_strict_terms = array(); - - if ( ! $this_strict_terms ) { // no terms in this taxonomy have restricted roles - $term_clauses[$status] = '1=2'; - - } elseif ( count($this_strict_terms) < count($all_terms) ) { // some (but not all) terms in this taxonomy honor blog-wide assignment of the pertinent role - $term_clauses[$status] = " {$qvars->term->alias}.{$qvars->term->col_id} IN ('" . implode("', '", $this_strict_terms) . "')"; - } else - $term_clauses[$status] = '1=1'; - - if ( isset($term_clauses[$status]) ) - $status_where[$object_type][$status] = " {$src->cols->status} = '$status' AND ( $term_clauses[$status] ) "; - - } // end foreach statuses - - if ( isset($status_where[$object_type]) ) // object_type='type_val' AND ( (status 1 clause) OR (status 2 clause) ... - $status_where[$object_type] = " {$src->cols->type} = '$object_type' AND ( " . agp_implode(' ) OR ( ', $status_where[$object_type], ' ( ', ' ) ') . " )"; - } // end foreach tx_object_types - - // NOTE: we are querying for posts/pages which HAVE restrictions that apply to their current post_status - // - if ( $status_where ) { // (object type 1 clause) OR (object type 2 clause) ... - $where = ' AND (' . agp_implode(' ) OR ( ', $status_where, ' ( ', ' ) ') . ' )'; - $where .= " AND {$src->table}.$col_id IN ('" . implode( "', '", array_keys($listed_ids) ) . "')"; - - $query = "SELECT DISTINCT $col_id FROM $src->table $term_join WHERE 1=1 $where"; - - if ( $restricted_ids = scoper_get_col($query) ) { - - foreach ( $restricted_ids as $id ) { - $scoper->termscoped_ids[$src_name][$id][$op_type] = true; - $scoper->restricted_ids[$src_name][$id][$op_type] = true; - } - } - } - - } // end foreach op_type (read/edit) - } // end term restrictions logging - - - // ======== Log term roles ======== - // - if ( is_admin() && ! empty($qvars) ) { - if ( $src_roles = $scoper->role_defs->get_matching($role_type, 'post', $tx_object_types) ) { - $otype_role_names = array(); - foreach ( array_keys($src_roles) as $role_handle ) - $otype_role_names []= $src_roles[$role_handle]->name; - - $role_clause = "AND uro.role_name IN ('" . implode("', '", $otype_role_names) . "')"; - - $join_assigned = $term_join . " INNER JOIN $wpdb->user2role2object_rs AS uro ON uro.obj_or_term_id = {$qvars->term->alias}.{$qvars->term->col_id}" - . " AND uro.scope = 'term' AND uro.role_type = '$role_type' $role_clause AND uro.src_or_tx_name = '$taxonomy'"; - - $where = " AND {$src->table}.$col_id IN ('" . implode("', '", array_keys($listed_ids)) . "')"; - - $query = "SELECT DISTINCT $col_id, uro.role_name FROM $src->table $join_assigned WHERE 1=1 $where"; - - $role_results = scoper_get_results($query); - - foreach ( $role_results as $row ) { - $role_handle = scoper_get_role_handle($row->role_name, $role_type); - $scoper->have_termrole_ids[$src_name][$row->$col_id][$role_handle] = true; - } - } - } // end term roles logging - - } // end foreach of this data source's taxonomies - } // endif this data source uses taxonomies - - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - // which of these results ignore blog AND term role assignments? - if ( $objscope_objects = $scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name) ) - $scoper->any_restricted_objects = true; - - foreach ( array_keys($roles) as $op_type ) { - - foreach ( $object_types as $object_type) { - if ( ! scoper_get_otype_option('use_object_roles', $src_name, $object_type) ) - continue; - - if ( is_array($roles[$op_type][$object_type]) ) { - foreach ( array_keys($listed_ids) as $id ) { - foreach ( $roles[$op_type][$object_type] as $check_role ) { - // If a restriction is set for this object and role, - // OR if the role is default-restricted with no unrestriction for this object... - if ( isset($objscope_objects['restrictions'][$check_role][$id]) - || ( isset($objscope_objects['unrestrictions'][$check_role]) && is_array($objscope_objects['unrestrictions'][$check_role]) && ! isset($objscope_objects['unrestrictions'][$check_role][$id]) ) ) { - $scoper->objscoped_ids[$src_name][$id][$op_type] = true; - $scoper->restricted_ids[$src_name][$id][$op_type] = true; - } - } - } //end foreach listed ids - } // endif any applicable roles defined - - } // end forach object type - } // end foreach op_type (read/edit) - } - - // query for object role assignments - if ( is_admin() ) { - if ( $scoper->role_defs->get_applied_object_roles() ) { - $scoper->any_object_roles = true; - - $join_assigned = " INNER JOIN $wpdb->user2role2object_rs AS uro ON uro.obj_or_term_id = {$src->table}.$col_id" - . " AND uro.src_or_tx_name = '$src_name' AND uro.scope = 'object' AND uro.role_type = '$role_type'"; - - $where = " AND {$src->table}.$col_id IN ('" . implode("', '", array_keys($listed_ids)) . "')"; - - $query = "SELECT DISTINCT $col_id, uro.role_name FROM $src->table $join_assigned WHERE 1=1 $where"; - - $role_results = scoper_get_results($query); - - foreach ( $role_results as $row ) { - $role_handle = scoper_get_role_handle($row->role_name, $role_type); - $scoper->have_objrole_ids[$src_name][$row->$col_id][$role_handle] = true; - $scoper->any_object_roles = true; - } - } - } - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/roles-strings_rs.php b/blog/wp-content/plugins/role-scoper/roles-strings_rs.php deleted file mode 100644 index b60b470..0000000 --- a/blog/wp-content/plugins/role-scoper/roles-strings_rs.php +++ /dev/null @@ -1,165 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/roles_rs.php b/blog/wp-content/plugins/role-scoper/roles_rs.php deleted file mode 100644 index d7039ff..0000000 --- a/blog/wp-content/plugins/role-scoper/roles_rs.php +++ /dev/null @@ -1,638 +0,0 @@ -cap_defs =& $cap_defs; - $this->role_types = $role_types; - - foreach ( $cap_defs->get_all() as $cap_name => $cap ) - if ( ! empty($cap->anon_user_has) ) - $this->role_caps_anon[$cap_name] = 1; - } - - function get_display_name( $role_handle, $context = '' ) { - if ( isset( $this->display_names[$role_handle] ) ) - return $this->display_names[$role_handle]; - - require_once( 'roles-strings_rs.php' ); - return ScoperRoleStrings::get_display_name( $role_handle, $context ); - } - - function get_abbrev( $role_handle, $context = '' ) { - if ( isset( $this->abbrevs[$role_handle] ) ) - return $this->abbrevs[$role_handle]; - - require_once( 'roles-strings_rs.php' ); - return ScoperRoleStrings::get_abbrev( $role_handle, $context ); - } - - function get_micro_abbrev( $role_handle, $context = '' ) { - if ( isset( $this->micro_abbrevs[$role_handle] ) ) - return $this->micro_abbrevs[$role_handle]; - - require_once( 'roles-strings_rs.php' ); - - if( ! $return = ScoperRoleStrings::get_micro_abbrev( $role_handle, $context ) ) - $return = ScoperRoleStrings::get_abbrev( $role_handle, $context ); - - return $return; - } - - function &add($name, $defining_module_name, $display_name = '', $abbrev = '', $role_type = 'rs', $args = '') { - if ( $this->locked ) { - $notice = sprintf('A plugin or theme (%1$s) is too late in its attempt to define a role (%2$s).', $defining_module_name, $name) - . '

    ' . 'This must be done via the define_data_sources_rs hook.'; - rs_notice($notice); - return; - } - - $key = ( $name == ANON_ROLEHANDLE_RS ) ? $name : scoper_get_role_handle($name, $role_type); - - if ( 'wp' == $role_type ) { - if ( ! $display_name ) - $display_name = ucwords( str_replace('_', ' ', $name) ); - - if ( ! $abbrev ) - $abbrev = $display_name; - } - - if ( $display_name ) - $this->display_names[$key] = $display_name; - - if ( $abbrev ) - $this->abbrevs[$key] = $abbrev; - - - if ( isset($this->members[$key]) ) - unset($this->members[$key]); - - $this->members[$key] = new WP_Scoped_Role($name, $defining_module_name, $role_type, $args); - $this->process($this->members[$key]); - - return $this->members[$key]; - } - - function add_role_capability($name, $cap_name, $restricted_object_assignment = 0) { - if ( $this->locked ) { - rs_notice('A plugin or theme is too late in its attempt to add a capability for the following role' . ': ' . $name . '
    ' . 'This must be done via the define_roles_rs hook.'); - return; - } - - $assignment_type = ( $restricted_object_assignment ) ? EXCLUSIVE_OBJECT_ASSIGNMENT_RS : SUPPLEMENTAL_OBJECT_ASSIGNMENT_RS; - - $this->role_caps[$name][$cap_name] = $assignment_type; - $this->process($this->members[$name]); - } - - function process( &$role_def ) { - // role type was prefixed for array key, but should remove for name property - foreach ( $this->role_types as $role_type ) - $role_def->name = str_replace("{$role_type}_", '', $role_def->name); - - if ( ! isset($role_def->valid_scopes) ) - $role_def->valid_scopes = array('blog' => 1, 'term' => 1, 'object' => 1); - - if ( ! isset($role_def->object_type) ) - $role_def->object_type = ''; - } - - function add_role_caps( $user_role_caps ) { - if ( ! is_array( $user_role_caps ) ) - return; - - foreach ( array_keys($this->role_caps) as $role_handle ) - if ( ! empty($user_role_caps[$role_handle]) ) - $this->role_caps[$role_handle] = array_merge($this->role_caps[$role_handle], $user_role_caps[$role_handle]); - } - - function remove_role_caps( $disabled_role_caps ) { - if ( ! is_array( $disabled_role_caps ) ) - return; - - foreach ( array_keys($this->role_caps) as $role_handle ) - if ( ! empty($disabled_role_caps[$role_handle]) ) - $this->role_caps[$role_handle] = array_diff_key($this->role_caps[$role_handle], $disabled_role_caps[$role_handle]); - } - - function filter_role_handles_by_type($role_handles, $role_type) { - $qualifying_handles = array(); - - foreach ( array_keys($this->members) as $role_handle) - if ( $role_type == $this->members[$role_handle]->role_type ) - $qualifying_handles []= $role_handle; - - return array_intersect($role_handles, $qualifying_handles); - } - - function filter_roles_by_type($roles, $role_type) { - $qualifying_handles = array(); - - if ( ! $roles ) - return array(); - - foreach ( array_keys($this->members) as $role_handle) - if ( $role_type == $this->members[$role_handle]->role_type ) - $qualifying_handles [$role_handle] = 1; - - return array_intersect_key($roles, $qualifying_handles); - } - - // return roledefs which match the specified parameters - function get_matching($role_types = '', $src_names = '', $object_types = '', $op_types = '') { - $arr = array(); - - if ( $role_types && ! is_array($role_types) ) - $role_types = array($role_types); - - if ( $src_names && ! is_array($src_names) ) - $src_names = array($src_names); - - if ( $object_types && ! is_array($object_types) ) - $object_types = array($object_types); - - foreach ( $this->members as $role_handle => $role_def ) { - if ( ! $role_types || in_array($role_def->role_type, $role_types) ) { - if ( ! $src_names ) { - $arr[$role_handle] = $role_def; - continue; - } - - if ( isset($this->role_caps[$role_handle]) ) { - foreach ( array_keys($this->role_caps[$role_handle]) as $cap_name ) { - if ( ! $cap_def = $this->cap_defs->get($cap_name) ) - continue; - - if ( - ( ! $src_names || in_array($cap_def->src_name, $src_names) ) - && ( ! $op_types || in_array($cap_def->op_type, $op_types) ) - && ( ! $object_types || in_array($cap_def->object_type, $object_types) - // special provision for 'read' cap and any others which apply to multiple object types - || ( ! $cap_def->object_type && isset($role_def->object_type) && in_array($role_def->object_type, $object_types) ) - ) - ) { - $arr[$role_handle] = $role_def; - continue 2; - } // endif cap properties match this function call args - } // end foreach role_cap - } // endif role_caps isset - - // special provision for 'read' cap with WP-defined roles - if ( ('wp' == SCOPER_ROLE_TYPE) && isset($this->role_caps[$role_handle]['read']) && in_array('post', $src_names) ) { - $arr[$role_handle] = $role_def; - } - } // endif role_type - } // end foreach members - - return $arr; - } - - function get_for_taxonomy($src, $taxonomy = '', $args = '') { - $defaults = array( 'one_otype_per_role' => true, 'ignore_usage_settings' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( ! $src) - return; - - $otype_roles = array(); - - foreach ( array_keys($src->object_types) as $object_type ) { - if ( ! $ignore_usage_settings && ! scoper_get_otype_option('use_term_roles', $src->name, $object_type) ) - continue; - - if ( $roles = $this->get_matching( SCOPER_ROLE_TYPE, $src->name, $object_type ) ) { - if ( $one_otype_per_role ) - foreach ( array_keys($otype_roles) as $existing_object_type ) - $roles = array_diff_key($roles, $otype_roles[$existing_object_type]); - - $otype_roles[$object_type] = $roles; - } - } - - //note: term roles are defined with src_name property corresponding to their object source (i.e. manage_categories has src_name 'post') - if ( $taxonomy ) { - if ( $roles = $this->get_matching( SCOPER_ROLE_TYPE, $src->name, $taxonomy, array(OP_ADMIN_RS) ) ) { - if ( $one_otype_per_role ) - foreach ( array_keys($otype_roles) as $object_type ) - $roles = array_diff_key($roles, $otype_roles[$object_type]); - - if ( $roles ) - $otype_roles[$taxonomy] = $roles; - } - } - - return $otype_roles; - } - - function add_contained_roles($assigned, $term_array = false) { - if ( empty($assigned) ) - return array(); - - if ( ! is_array($assigned) ) - $assigned = array($assigned); - - if ( $term_array ) { - $role_terms = $assigned; - - // $assigned roles[role_key] = array of terms for which the role is assigned. - // Add contained roles directly into the provided assigned_roles array - foreach ( $assigned as $assigned_role_handle => $terms ) { - - // if a user has role assigned for term(s), he also effectively has all its contained roles assigned for same term(s) - foreach ( array_keys( $this->get_contained_roles($assigned_role_handle, true) ) as $contained_role_handle ) { - - // may or may not already have roles assigned explicitly or via containment in another assigned role - if ( ! isset($role_terms[$contained_role_handle]) ) - $role_terms[$contained_role_handle] = $terms; - else - $role_terms[$contained_role_handle] = array_unique( array_merge($role_terms[$contained_role_handle], $terms) ); - } - } - - return $role_terms; - - } else { - $roles = $assigned; - foreach ( array_keys($assigned) as $assigned_role_handle ) { - if ( $contained_roles = $this->get_contained_roles($assigned_role_handle) ) - $roles = array_merge( $roles, $contained_roles ); - } - return $roles; - } - } - - function add_containing_roles($roles, $role_type = '') { - $return_roles = $roles; - - foreach ( array_keys($roles) as $role_handle ) - if ( $containing = $this->get_containing_roles($role_handle, $role_type) ) - $return_roles = array_merge($return_roles, $containing); - - return $return_roles; - } - - function get_containing_roles($role_handle, $role_type = '') { - if ( ! isset($this->role_caps[$role_handle]) ) - return array(); - - $containing_roles = array(); - foreach ( array_keys($this->role_caps) as $other_role_handle ) - if ( $other_role_handle != $role_handle ) - if ( ! array_diff_key($this->role_caps[$role_handle], $this->role_caps[$other_role_handle]) ) - $containing_roles[$other_role_handle] = 1; - - if ( $role_type ) { - if ( $containing_roles = $this->filter_role_handles_by_type(array_keys($containing_roles), $role_type) ) - $containing_roles = array_flip($containing_roles); - } - - return $containing_roles; - } - - function get_contained_roles($role_handles, $include_this_role = false, $role_type = '') { - if ( ! $role_handles ) - return array(); - - if ( ! is_array($role_handles) ) - $role_handles = array($role_handles); - - $contained_roles = array(); - - foreach ( $role_handles as $role_handle ) { - if ( ! isset($this->role_caps[$role_handle]) ) - continue; - - foreach ( array_keys($this->role_caps) as $other_role_handle ) { - if ( ($other_role_handle != $role_handle) || $include_this_role ) - if ( ! array_diff_key($this->role_caps[$other_role_handle], $this->role_caps[$role_handle]) ) - if ( $this->role_caps[$other_role_handle] ) { // don't take credit for including roles that have no pertinent caps - - // don't count Post Reader as being contained by Page roles, and vice versa - $ambiguous_roles = array( 'post' => 'rs_post_reader', 'page' => 'rs_page_reader' ); - if ( in_array( $other_role_handle, $ambiguous_roles ) ) { - - $role_info = scoper_explode_role_handle( $role_handle ); - if ( 'rs' == $role_info->role_type ) { - foreach ( $ambiguous_roles as $a_object_type => $a_role_handle ) { - if ( $a_role_handle == $other_role_handle ) { - $a_role_attrib = $this->get_role_attributes( $role_handle ); - if ( ! in_array( $a_object_type, $a_role_attrib->object_types ) ) - continue 2; - } - } - } - } - - $contained_roles[$other_role_handle] = 1; - } - } - } - - if ( $role_type ) { - $filtered_role_handles = $this->filter_role_handles_by_type( array_keys($this->members), $role_type ); - $contained_roles = array_intersect_key($contained_roles, array_flip($filtered_role_handles) ); - } - - if ( $contained_roles && ! $include_this_role ) - $contained_roles = array_diff_key( $contained_roles, array_flip($role_handles) ); - - return $contained_roles; - } - - function get_role_attributes($role_handle) { - if ( ! isset($this->role_caps[$role_handle]) ) - return array(); - - $arr = array( 'src_names' => array(), 'object_types' => array() ); - - if ( $src_otypes = $this->cap_defs->organize_caps_by_otype( array_keys($this->role_caps[$role_handle]) ) ) { - foreach ( $src_otypes as $src_name => $otypes ) { - $arr['src_names'] []= $src_name; - $arr['object_types'] = array_unique( array_merge($arr['object_types'], array_keys($otypes) ) ); - } - } - - if ( ! $arr['object_types'] || ( ( 1 == count($arr['object_types']) ) && ! $arr['object_types'][0] ) ) { - if ( $role_def = $this->get($role_handle) ) { - // special provision for 'read' cap and any others which apply to multiple object types - if ( isset($role_def->object_type) ) - $arr['object_types'] = array($role_def->object_type); - } - } - - return (object) $arr; - } - - function populate_with_wp_roles() { - global $wp_roles; - if ( ! isset($wp_roles) ) - $wp_roles = new WP_Roles(); - - if ( ('wp' == SCOPER_ROLE_TYPE) && ! empty($this->role_caps_anon) ) { - scoper_load_textdomain(); // otherwise this is only loaded for wp-admin - - $args = array( 'anon_user_blogrole' => true, 'anon_only' => true, 'valid_scopes' => array('blog' => true, 'term' => true, 'object'=> true) ); - $this->add( 'public_reader', 'wordpress', __('Anonymous Reader', 'scoper'), __('Anonymous Reader', 'scoper'), 'wp', $args); - - $this->role_caps['wp_public_reader'] = $this->role_caps_anon; - } - - // populate WP roles least-role-first to match RS roles - $keys = array_keys($wp_roles->role_objects); - $keys = array_reverse($keys); - - foreach ( $keys as $role_name ) { - $role = $wp_roles->role_objects[$role_name]; - - // remove any WP caps which are in array, but have value = false - $caps = array_intersect($role->capabilities, array(true) ); - - // we only care about WP caps that are RS-defined - if ( $caps && is_array($caps) ) - $caps = array_intersect_key($caps, array_flip($this->cap_defs->get_all_keys()) ); - - $this->add( $role_name, 'wordpress', '', '', 'wp' ); - - $this->role_caps['wp_' . $role_name] = $caps; - } - } - - function get_anon_role_handles() { - $arr = array(); - - foreach ( $this->members as $role_handle => $role ) - if ( ! empty($role->anon_user_blogrole) ) - $arr[] = $role_handle; - - return $arr; - } - - // reqd_caps: array of cap names and/or role handles. Role handle format is {$role_type}_{role_name} - function role_handles_to_caps($reqd_caps, $find_unprefixed_wproles = false) { - foreach ( $reqd_caps as $role_handle ) { - if ( isset($this->role_caps[$role_handle]) ) { - $reqd_caps = array_merge( $reqd_caps, array_keys($this->role_caps[$role_handle]) ); - $reqd_caps = array_diff( $reqd_caps, array($role_handle) ); - } - } - - if ( $find_unprefixed_wproles ) { - global $wp_roles; - foreach ( $reqd_caps as $role_name ) { - if ( isset($wp_roles->role_objects[$role_name]->capabilities ) ) { - $reqd_caps = array_merge( $reqd_caps, array_keys($wp_roles->role_objects[$role_name]->capabilities) ); - $reqd_caps = array_diff( $reqd_caps, array($role_name) ); - } - } - } - - return array_unique($reqd_caps); - } - - function get_role_ops($role_handle, $src_name = '', $object_type = '') { - if ( ! isset($this->role_caps[$role_handle]) ) - return array(); - - $ops = array(); - foreach (array_keys($this->role_caps[$role_handle]) as $cap_name) { - if ( $cap_def = $this->cap_defs->get($cap_name) ) - if ( ! empty($cap_def->op_type) ) - $ops[$cap_def->op_type] = 1; - } - - return $ops; - } - - //$reqd_caps = single cap name string OR array of cap name strings - //$rolecaps[role_handle] = array of cap names - // returns array of role_handles - function qualify_roles($reqd_caps, $role_type = SCOPER_ROLE_TYPE, $object_type = '', $args = '') { - $defaults = array( 'exclude_object_types' => array(), 'all_wp_caps' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( 'wp' == SCOPER_ROLE_TYPE ) - $object_type = ''; - - if ( ! is_array($reqd_caps) ) - $reqd_caps = ($reqd_caps) ? array($reqd_caps) : ''; - - $reqd_caps = $this->role_handles_to_caps($reqd_caps, true); // arg: also check for unprefixed WP rolenames - - extract($args); - - if ( is_array($role_type) ) { - if ( count($role_type) == 1 ) - $role_type = current($role_type); - elseif ( in_array(SCOPER_ROLE_TYPE, $role_type) && in_array('wp', $role_type) ) - $role_type = ''; - else - $role_type = SCOPER_ROLE_TYPE; - } - - // WP roles are always defined. Skip them if scoping with RS roles and this request is for taxonomy/object scope - if ( $role_type ) - $role_handles = $this->filter_role_handles_by_type( array_keys($this->members), $role_type ); - else - $role_handles = array_keys($this->members); - - $good_roles = array(); - foreach ( $role_handles as $role_handle ) - if ( isset($this->role_caps[$role_handle]) ) { - - if ( $all_wp_caps && ( 0 === strpos( $role_handle, 'wp_' ) ) ) { - global $wp_roles; - if ( isset( $wp_roles->roles[ substr($role_handle, 3) ]['capabilities'] ) ) - $role_caps = $wp_roles->roles[ substr($role_handle, 3) ]['capabilities']; - else - $role_caps = $this->role_caps[$role_handle]; - } else - $role_caps = $this->role_caps[$role_handle]; - - if ( ! array_diff($reqd_caps, array_keys($role_caps) ) ) { - - // the role qualifies unless its object type is a mismatch - if ( $object_type && ($object_type != $this->members[$role_handle]->object_type) ) { - $matched = false; - foreach ( array_keys($this->role_caps[$role_handle]) as $cap_name ) { - if ( $object_type == $this->cap_defs->member_property($cap_name, 'object_type') ) { - $matched = true; - break; - } - } - if ( ! $matched ) - continue; // don't add the role unless it or one of its caps matches objtype - } - - // complication due to ambiguous 'read' cap (otherwise blog-ownership of page roles circumvents exclusivity check for get_terms display) - if ( $exclude_object_types && ( 0 !== strpos($role_handle, 'wp_') ) ) { // but wp roles are not type-specific, so don't exclude them by type - foreach ( $exclude_object_types as $exclude_type ) { - if ( $exclude_type == $this->member_property($role_handle, 'object_type') ) - continue 2; - - foreach ( array_keys($this->role_caps[$role_handle]) as $cap_name ) - if ( $exclude_type == $this->cap_defs->member_property($cap_name, 'object_type') ) - continue 3; - } - } - - $good_roles[$role_handle] = 1; - } - } - - return $good_roles; - } - - // returns array of role names which have the required caps (or their basecap equivalent) - // AND have been applied to at least one object, for any user or group - function qualify_object_roles($reqd_caps, $object_type = '', $applied_obj_roles = '', $base_caps_only = true) { - $roles = array(); - - if ( $base_caps_only ) - $reqd_caps = $this->cap_defs->get_base_caps($reqd_caps); - - $roles = $this->qualify_roles($reqd_caps, SCOPER_ROLE_TYPE, $object_type); - - if ( ! $applied_obj_roles ) - $applied_obj_roles = $this->get_applied_object_roles(); - - return array_intersect_key( $roles, $applied_obj_roles ); - } - - - // returns array of role_handles which have been applied to any object - // if $user arg is supplied, returns only roles applied for that user (or that user's groups) - function get_applied_object_roles( $user = '' ) { - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - if ( is_object( $user ) ) { - $cache_flag = SCOPER_ROLE_TYPE . '_object-roles'; // v 1.1: changed cache key from "object_roles" to "object-roles" to match new key format for blog, term roles - $cache = $user->cache_get($cache_flag); - - $limit = ''; - $u_g_clause = $user->get_user_clause(''); - - } else { - $cache_flag = SCOPER_ROLE_TYPE . '_applied_object-roles'; // v 1.1: changed cache key from "object_roles" to "object-roles" to match new key format for blog, term roles - $cache_id = 'all'; - $cache = wpp_cache_get($cache_id, $cache_flag); - - $u_g_clause = ''; - } - - if ( is_array($cache) ) - return $cache; - - $role_handles = array(); - - global $wpdb; - - // object roles support date limits, but content date limits (would be redundant and a needless performance hit) - $duration_clause = scoper_get_duration_clause( '', $wpdb->user2role2object_rs ); - - if ( $role_names = scoper_get_col("SELECT DISTINCT role_name FROM $wpdb->user2role2object_rs WHERE role_type='$SCOPER_ROLE_TYPE' AND scope='object' $duration_clause $u_g_clause") ) { - - $role_handles = scoper_role_names_to_handles($role_names, SCOPER_ROLE_TYPE, true); //arg: return role keys as array key - - //$role_handles = array_intersect_key($role_handles, $this->members); - } - - if ( is_object($user) ) - $user->cache_set($role_handles, $cache_flag); - else - wpp_cache_set($cache_id, $role_handles, $cache_flag); - - return $role_handles; - } - - - // Currently, new custom-defined post, page or link roles are problematic because objects or categories with all roles restricted - // will suddenly be non-restricted to users whose WP role contains the newly defined RS role. - // - // TODO: make all custom-defined roles default restricted - function remove_invalid() { - if ( 'rs' == SCOPER_ROLE_TYPE ) { - if ( $custom_members = array_diff( array_keys($this->members), array( 'rs_post_reader', 'rs_private_post_reader', 'rs_post_contributor', 'rs_post_author', 'rs_post_revisor', 'rs_post_editor', 'rs_page_reader', 'rs_private_page_reader', 'rs_page_contributor', 'rs_page_author', 'rs_page_revisor', 'rs_page_editor', 'rs_page_associate', 'rs_link_editor', 'rs_category_manager', 'rs_group_manager' ) ) ) { - foreach ( $custom_members as $role_handle ) { - if ( $role_attrib = $this->get_role_attributes($role_handle) ) { - if ( in_array( 'post', $role_attrib->src_names ) ) { - if ( array_intersect( $role_attrib->object_types, array( 'post', 'page' ) ) ) { - unset( $this->members[$role_handle] ); - continue; - } - } - - if ( in_array('link', $role_attrib->src_names) && in_array('link', $role_attrib->object_types) ) - unset( $this->members[$role_handle] ); - } - } - } - } - } -} // end class WP_Scoped_Roles - -class WP_Scoped_Role extends AGP_Config_Item { - var $valid_scopes; - var $role_type; - var $objscope_equivalents; - var $anon_user_has; - - function WP_Scoped_Role($name, $defining_module_name, $role_type = 'rs', $args = '' ) { - $this->AGP_Config_Item($name, $defining_module_name, $args); - - $this->role_type = $role_type; - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/scoped-user.php b/blog/wp-content/plugins/role-scoper/scoped-user.php deleted file mode 100644 index 4d7e654..0000000 --- a/blog/wp-content/plugins/role-scoper/scoped-user.php +++ /dev/null @@ -1,442 +0,0 @@ -WP_User($id, $name); - - // initialize blog_roles arrays - $this->assigned_blog_roles[ANY_CONTENT_DATE_RS] = array(); - $this->blog_roles[ANY_CONTENT_DATE_RS] = array(); - - //dump($id); - //dump($this); - - //log_mem_usage_rs( 'called this->WP_User' ); - - $defaults = array( 'disable_user_roles' => false, 'disable_group_roles' => false, 'disable_wp_roles' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( empty($scoper) || empty($scoper->role_defs) ) { - require_once('role-scoper_main.php'); - - //log_mem_usage_rs( 'Scoped User: require role-scoper_main.php' ); - - // todo: review this - //$temp = new Scoper(); - //$scoper =& $temp; - - $scoper = new Scoper(); - - //log_mem_usage_rs( 'Scoped User: new Scoper' ); - } - - if ( $this->ID ) { - if ( ! $disable_wp_roles ) { - // include both WP roles and custom caps, which are treated as a hidden single-cap role capable of satisfying single-cap current_user_can calls - $this->assigned_blog_roles[ANY_CONTENT_DATE_RS] = $this->caps; - - // prepend role_type prefix to wp rolenames - global $wp_roles; - foreach ( array_keys($this->assigned_blog_roles[ANY_CONTENT_DATE_RS]) as $name) { - if ( isset($wp_roles->role_objects[$name]) ) { - $this->assigned_blog_roles[ANY_CONTENT_DATE_RS]['wp_' . $name] = $this->assigned_blog_roles[ANY_CONTENT_DATE_RS][$name]; - unset($this->assigned_blog_roles[ANY_CONTENT_DATE_RS][$name]); - } - } - } - - if ( defined('DEFINE_GROUPS_RS') && ! $disable_group_roles ) { - $this->groups = $this->_get_usergroups(); - - if ( ! empty($args['filter_usergroups']) ) // assist group admin - $this->groups = array_intersect_key($this->groups, $args['filter_usergroups']); - } - - if ( 'rs' == SCOPER_ROLE_TYPE ) { // && RS_BLOG_ROLES ) { // rs_blog_roles option has never been active in any RS release; leave commented here in case need arises - if ( $rs_blogroles = $this->get_blog_roles_daterange( SCOPER_ROLE_TYPE ) ) { - foreach ( array_keys($rs_blogroles) as $date_key ) { - if ( isset($this->assigned_blog_roles[$date_key]) ) - $this->assigned_blog_roles[$date_key] = array_merge($this->assigned_blog_roles[$date_key], $rs_blogroles[$date_key]); - else - $this->assigned_blog_roles[$date_key] = $rs_blogroles[$date_key]; - } - } - - $this->merge_scoped_blogcaps(); - } - - foreach ( array_keys($this->assigned_blog_roles) as $date_key ) - $this->blog_roles[$date_key] = $scoper->role_defs->add_contained_roles( $this->assigned_blog_roles[$date_key] ); - - // note: The allcaps property still governs current_user_can calls when the cap requirements do not pertain to a specific object. - // If WP roles fail to provide all required caps, the Role Scoper has_cap filter validate the current_user_can check - // if any RS blogrole has all the required caps. - // - // The blog_roles array also comes into play for object permission checks such as page or post listing / edit. - // In such cases, roles in the Scoper_User::blog_roles array supplement any pertinent taxonomy or role assignments, - // as long as the object or its terms are not configured to require that role to be term-assigned or object-assigned. - - //log_mem_usage_rs( 'new Scoped User done' ); - } - } - - function check_for_user_roles() { - if ( IS_MU_RS ) - return true; // this function is only for performance; not currently dealing with multiple uro tables - - global $wpdb; - - $role_type = SCOPER_ROLE_TYPE; - return scoper_get_var("SELECT assignment_id FROM $wpdb->user2role2object_rs WHERE role_type = '$role_type' AND user_id = '$this->ID' LIMIT 1"); - } - - function get_user_clause($table_alias) { - $table_alias = ( $table_alias ) ? "$table_alias." : ''; - - $arr = array(); - - if ( GROUP_ROLES_RS && $this->groups ) - $arr []= "{$table_alias}group_id IN ('" . implode("', '", array_keys($this->groups) ) . "')"; - - if ( USER_ROLES_RS || empty($arr) ) // too risky to allow query with no user or group clause - $arr []= "{$table_alias}user_id = '$this->ID'"; - - $clause = implode( ' OR ', $arr ); - - if ( count($arr) > 1 ) - $clause = "( $clause )"; - - if ( $clause ) - return " AND $clause"; - } - - function cache_get($cache_flag, $append_blog_suffix = true ) { - if ( GROUP_ROLES_RS && $this->groups ) { - $cache_id = $this->ID; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER_AND_GROUPS; - } else { - $cache_id = $this->ID; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER; - } - - return wpp_cache_get($cache_id, $cache_flag, $append_blog_suffix); - } - - function cache_set($entry, $cache_flag, $append_blog_suffix = true ) { - if ( GROUP_ROLES_RS && $this->groups ) { - $cache_id = $this->ID; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER_AND_GROUPS; - } else { - $cache_id = $this->ID; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER; - } - - return wpp_cache_set($cache_id, $entry, $cache_flag, $append_blog_suffix); - } - - - // can be called statically by external modules - function get_groups_for_user( $user_id, $args = '' ) { - if ( empty($args['no_cache']) ) { - $cache = wpp_cache_get($user_id, 'group_membership_for_user'); - if ( is_array($cache) ) - return $cache; - } - - global $wpdb; - - if ( ! $wpdb->user2group_rs ) - return array(); - - $query = "SELECT $wpdb->user2group_gid_col FROM $wpdb->user2group_rs WHERE $wpdb->user2group_uid_col = '$user_id' ORDER BY $wpdb->user2group_gid_col"; - if ( ! $user_groups = scoper_get_col($query) ) - $user_groups = array(); - - // include WP metagroup(s) for WP blogrole(s) - $metagroup_ids = array(); - if ( ! empty($args['metagroup_roles']) ) { - foreach ( array_keys($args['metagroup_roles']) as $role_handle ) - $metagroup_ids []= 'wp_role_' . str_replace( 'wp_', '', $role_handle ); - } - - if ( $metagroup_ids ) { - $meta_id_in = "'" . implode("', '", $metagroup_ids) . "'"; - - $query = "SELECT $wpdb->groups_id_col FROM $wpdb->groups_rs" - . " WHERE {$wpdb->groups_rs}.{$wpdb->groups_meta_id_col} IN ($meta_id_in)" - . " ORDER BY $wpdb->groups_id_col"; - - if ( $meta_groups = scoper_get_col($query) ) - $user_groups = array_merge( $user_groups, $meta_groups ); - } - - if ( $user_groups && empty($args['no_cache']) ) { // users should always be in at least a metagroup. Problem with caching empty result on user creation beginning with WP 2.8 - $user_groups = array_fill_keys($user_groups, 1); - - wpp_cache_set($user_id, $user_groups, 'group_membership_for_user'); - } - - return $user_groups; - } - - // return group_id as array keys - function _get_usergroups($args = '') { - if ( ! $this->ID ) - return array(); - - if ( ! is_array($args) ) - $args = array(); - - if ( ! empty($this->assigned_blog_roles) ) - $args['metagroup_roles'] = $this->assigned_blog_roles[ANY_CONTENT_DATE_RS]; - - $user_groups = WP_Scoped_User::get_groups_for_user( $this->ID, $args ); - - return $user_groups; - } - - // wrapper for back compat with callin code that does not expect date_key dimension - function get_blog_roles( $role_type = 'rs' ) { - $blog_roles = $this->get_blog_roles_daterange( $role_type ); - - if ( isset($blog_roles[ANY_CONTENT_DATE_RS]) && is_array($blog_roles[ANY_CONTENT_DATE_RS]) ) - return $blog_roles[ANY_CONTENT_DATE_RS]; - else - return array(); - } - - function get_blog_roles_daterange( $role_type = 'rs', $args = '' ) { - $defaults = array( 'enforce_duration_limits' => true, 'retrieve_content_date_limits' => true, 'include_role_duration_key' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( $enforce_duration_limits && $retrieve_content_date_limits && ! $include_role_duration_key ) { - $cache_flag = "{$role_type}_blog-roles"; // changed cache key from "blog_roles" to "blog-roles" to prevent retrieval of arrays stored without date_key dimension - $cache = $this->cache_get( $cache_flag ); - if ( is_array($cache) ) - return $cache; - } - - global $wpdb; - - $u_g_clause = $this->get_user_clause('uro'); - - $duration_clause = ( $enforce_duration_limits ) ? scoper_get_duration_clause() : ''; - - $extra_cols = ( $include_role_duration_key ) ? ", uro.date_limited, uro.start_date_gmt, uro.end_date_gmt" : ''; - - $qry = "SELECT uro.role_name, uro.content_date_limited, uro.content_min_date_gmt, uro.content_max_date_gmt $extra_cols FROM $wpdb->user2role2object_rs AS uro WHERE uro.scope = 'blog' AND uro.role_type = '$role_type' $duration_clause $u_g_clause"; - $results = scoper_get_results($qry); - - $role_handles = array( '' => array() ); - - foreach ( $results as $row ) { - $date_key = ( $retrieve_content_date_limits && $row->content_date_limited ) ? serialize( (object) array( 'content_min_date_gmt' => $row->content_min_date_gmt, 'content_max_date_gmt' => $row->content_max_date_gmt ) ) : ''; - - if ( $include_role_duration_key ) { - $role_duration_key = ( $row->date_limited ) ? serialize( (object) array( 'start_date_gmt' => $row->start_date_gmt, 'end_date_gmt' => $row->end_date_gmt ) ) : ''; - $role_handles[$role_duration_key][$date_key] [ scoper_get_role_handle( $row->role_name, $role_type ) ] = true; - } else - $role_handles[$date_key] [ scoper_get_role_handle( $row->role_name, $role_type ) ] = true; - } - - if ( $enforce_duration_limits && $retrieve_content_date_limits && ! $include_role_duration_key ) - $this->cache_set($role_handles, $cache_flag); - - return $role_handles; - } - - // wrapper for back compat with callin code that does not expect date_key dimension - function get_term_roles( $taxonomy = 'category', $role_type = 'rs' ) { - $term_roles = $this->get_term_roles_daterange( $taxonomy, $role_type ); - - if ( isset($term_roles[ANY_CONTENT_DATE_RS]) && is_array($term_roles[ANY_CONTENT_DATE_RS]) ) - return $term_roles[ANY_CONTENT_DATE_RS]; - else - return array(); - } - - // returns array[role name] = array of term ids for which user has the role assigned (based on current role basis) - function get_term_roles_daterange( $taxonomy = 'category', $role_type = 'rs', $args = '' ) { - $defaults = array( 'enforce_duration_limits' => true, 'retrieve_content_date_limits' => true, 'include_role_duration_key' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb; - - if ( $enforce_duration_limits && $retrieve_content_date_limits && ! $include_role_duration_key ) { - $cache_flag = "{$role_type}_term-roles_{$taxonomy}"; // changed cache key from "term_roles" to "term-roles" to prevent retrieval of arrays stored without date_key dimension - - $tx_term_roles = $this->cache_get($cache_flag); - } else - $tx_term_roles = ''; - - if ( ! is_array($tx_term_roles) ) { - // no need to check for this on cache retrieval, since a role_type change results in a rol_defs change, which triggers a full scoper cache flush - $role_type = SCOPER_ROLE_TYPE; - - $tx_term_roles = array( '' => array() ); - - $duration_clause = ( $enforce_duration_limits ) ? scoper_get_duration_clause() : ''; - - $u_g_clause = $this->get_user_clause('uro'); - - $extra_cols = ( $include_role_duration_key ) ? ", uro.date_limited, uro.start_date_gmt, uro.end_date_gmt" : ''; - - $qry = "SELECT uro.obj_or_term_id, uro.role_name, uro.assignment_id, uro.content_date_limited, uro.content_min_date_gmt, uro.content_max_date_gmt $extra_cols FROM $wpdb->user2role2object_rs AS uro "; - $qry .= "WHERE uro.scope = 'term' AND uro.assign_for IN ('entity', 'both') AND uro.role_type = '$role_type' AND uro.src_or_tx_name = '$taxonomy' $duration_clause $u_g_clause"; - - if ( $results = scoper_get_results($qry) ) { - foreach($results as $termrole) { - $date_key = ( $retrieve_content_date_limits && $termrole->content_date_limited ) ? serialize( (object) array( 'content_min_date_gmt' => $termrole->content_min_date_gmt, 'content_max_date_gmt' => $termrole->content_max_date_gmt ) ) : ''; - - $role_handle = SCOPER_ROLE_TYPE . '_' . $termrole->role_name; - - if ( $include_role_duration_key ) { - $role_duration_key = ( $termrole->date_limited ) ? serialize( (object) array( 'start_date_gmt' => $termrole->start_date_gmt, 'end_date_gmt' => $termrole->end_date_gmt ) ) : ''; - $tx_term_roles[$role_duration_key][$date_key][$role_handle][] = $termrole->obj_or_term_id; - } else - $tx_term_roles[$date_key][$role_handle][] = $termrole->obj_or_term_id; - } - } - - if ( $enforce_duration_limits && $retrieve_content_date_limits && ! $include_role_duration_key ) - $this->cache_set($tx_term_roles, $cache_flag); - } - - if ( $enforce_duration_limits && $retrieve_content_date_limits && ! $include_role_duration_key ) { - $this->assigned_term_roles[$taxonomy] = $tx_term_roles; - - global $scoper; - foreach( array_keys($this->assigned_term_roles[$taxonomy]) as $date_key ) - $this->term_roles[$taxonomy][$date_key] = $scoper->role_defs->add_contained_roles( $this->assigned_term_roles[$taxonomy][$date_key], true ); //arg: is term array - } - - return $tx_term_roles; - } - - - function merge_scoped_blogcaps() { - global $scoper; - - foreach( array_keys($this->assigned_blog_roles[ANY_CONTENT_DATE_RS]) as $role_handle ) { - $role_spec = scoper_explode_role_handle($role_handle); - - if ( ! empty($role_spec->role_type) && ( 'rs' == $role_spec->role_type ) && $scoper->role_defs->is_member($role_handle) ) - $this->allcaps = array_merge($this->allcaps, $scoper->role_defs->role_caps[$role_handle]); - } - - $this->allcaps['is_scoped_user'] = true; // use this to detect when something tampers with scoped allcaps array - } -} // end class WP_Scoped_User -} - -if ( ! function_exists('is_administrator_rs') ) { -function is_administrator_rs( $src_or_tx = '', $admin_type = 'content', $user = '' ) { - if ( ! $user ) { - global $current_user; - $user = $current_user; - - if ( IS_MU_RS && function_exists('is_site_admin') && is_site_admin() ) - return true; - } - - if ( empty($user->ID) ) - return false; - - $return = ''; - - $admin_cap_name = scoper_get_administrator_cap( $admin_type ); - $return = ! empty( $user->allcaps[$admin_cap_name] ); - - if ( ! $return && $src_or_tx ) { - // user is not a universal administrator, but are they an administrator for the specified source / taxonomy ? - - if ( ! is_object($src_or_tx) ) { - global $scoper; - if ( ! $obj = $scoper->data_sources->get($src_or_tx) ) - $obj = $scoper->taxonomies->get($src_or_tx); - - if ( $obj ) - $src_or_tx = $obj; - } - - if ( ! in_array( $src_or_tx->name, array( 'post', 'category', 'term', 'link', 'group' ) ) ) { - - if ( ! empty($src_or_tx->defining_module_name) ) { - $defining_module_name = $src_or_tx->defining_module_name; - if ( ('wordpress' != $defining_module_name) && ('role-scoper' != $defining_module_name) ) { - static $admin_caps; - - if ( ! isset($admin_caps) ) - $admin_caps = apply_filters( 'define_administrator_caps_rs', array() ); - - if ( ! empty( $admin_caps[$defining_module_name] ) ) { - $module_admin_cap = $admin_caps[$defining_module_name]; - $return = ! empty( $user->allcaps[$module_admin_cap] ); - } - } - } - } - } - - return $return; -} - -function is_option_administrator_rs( $user = '' ) { - return is_administrator_rs( '', 'option', $user ); -} - -function is_user_administrator_rs( $user = '' ) { - return is_administrator_rs( '', 'user', $user ); -} - -function is_content_administrator_rs( $user = '' ) { - return is_administrator_rs( '', 'content', $user ); -} - -function scoper_get_administrator_cap( $admin_type ) { - if ( ! $admin_type ) - $admin_type = 'content'; - - // Note: to differentiate content administrator role, define a custom cap such as "administer_all_content", add it to a custom Role, and add the following line to wp-config.php: define( 'SCOPER_CONTENT_ADMIN_CAP', 'cap_name' ); - $default_cap = array( 'option' => 'manage_options', 'user' => 'edit_users', 'content' => 'activate_plugins' ); - - $constant_name = 'SCOPER_' . strtoupper($admin_type) . '_ADMIN_CAP'; - $cap_name = ( defined( $constant_name ) ) ? constant( $constant_name ) : $default_cap[$admin_type]; - - if ( 'read' == $cap_name ) // avoid catostrophic mistakes - $cap_name = $default_cap[$admin_type]; - - return $cap_name; -} - -} // endif is_administrator_rs function not defined - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/scoped-user_anon.php b/blog/wp-content/plugins/role-scoper/scoped-user_anon.php deleted file mode 100644 index 7f5f624..0000000 --- a/blog/wp-content/plugins/role-scoper/scoped-user_anon.php +++ /dev/null @@ -1,149 +0,0 @@ -WP_User($id, $name); - - // initialize blog_roles arrays - //$this->assigned_blog_roles[ANY_CONTENT_DATE_RS] = array(); - $this->blog_roles[ANY_CONTENT_DATE_RS] = array(); - - global $scoper; - if ( empty($scoper) || empty($scoper->role_defs) ) { - require_once('role-scoper_main.php'); - - $temp = new Scoper(); - $scoper =& $temp; - } - - if ( defined('DEFINE_GROUPS_RS') && defined( 'SCOPER_ANON_METAGROUP' ) ) - $this->groups = $this->_get_usergroups(); - } - - // should not be used for anon user, but leave to maintain API - function get_user_clause($table_alias) { - $table_alias = ( $table_alias ) ? "$table_alias." : ''; - - if ( GROUP_ROLES_RS && defined( 'SCOPER_ANON_METAGROUP' ) ) - return " AND {$table_alias}group_id IN ('" . implode("', '", array_keys($this->groups) ) . "')"; - else - return " AND {$table_alias}user_id = '-1'"; // use -1 here to ignore accidental storage of other groups for zero user_id - } - - function cache_get($cache_flag) { - $cache_id = -1; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER; - - return wpp_cache_get($cache_id, $cache_flag); - } - - function cache_set($entry, $cache_flag) { - $cache_id = -1; - $cache_flag = $cache_flag . '_for_' . ROLE_BASIS_USER; - - return wpp_cache_set($cache_id, $entry, $cache_flag); - } - - function get_groups_for_user( $user_id, $args = '' ) { - if ( ! defined( 'SCOPER_ANON_METAGROUP' ) ) - return array(); - - if ( empty($args['no_cache']) ) { - // use -1 here to ignore accidental storage of other groups for zero user_id - $cache = wpp_cache_get( -1, 'group_membership_user' ); - if ( is_array($cache) ) - return $cache; - } - - global $wpdb; - - if ( ! $wpdb->groups_rs ) - return array(); - - // include WP metagroup for anonymous user - $user_groups = scoper_get_col( "SELECT $wpdb->groups_id_col FROM $wpdb->groups_rs WHERE {$wpdb->groups_rs}.{$wpdb->groups_meta_id_col} = 'wp_anon'" ); - - if ( $user_groups && empty($args['no_cache']) ) { // users should always be in at least a metagroup. Problem with caching empty result on user creation beginning with WP 2.8 - $user_groups = array_fill_keys($user_groups, 1); - - wpp_cache_set( -1, $user_groups, 'group_membership_user' ); - } - - return $user_groups; - } - - // return group_id as array keys - function _get_usergroups($args = '') { - return WP_Scoped_User::get_groups_for_user( -1 ); - } - - function get_blog_roles( $role_type = 'rs' ) { - return array(); - } - - function get_blog_roles_daterange( $role_type = 'rs', $include_role_duration_key = false ) { - return array( '' => array() ); - } - - // returns array[role name] = array of term ids for which user has the role assigned (based on current role basis) - function get_term_roles( $taxonomy = 'category', $role_type = 'rs' ) { - return array(); - } - - function get_term_roles_daterange( $taxonomy = 'category', $role_type = 'rs', $include_role_duration_key = false ) { - $this->term_roles[$taxonomy] = array( '' => array() ); - return array( '' => array() ); - } - - function merge_scoped_blogcaps() { - } - -} // end class WP_Scoped_User -} - - -if ( ! function_exists('is_administrator_rs') ) { -function is_administrator_rs( $src_or_tx = '' ) { - return false; -} - -function is_option_administrator_rs() { - return false; -} - -function is_user_administrator_rs() { - return false; -} - -function is_content_administrator_rs() { - return false; -} -} //endif function exists - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/screenshot-1.png b/blog/wp-content/plugins/role-scoper/screenshot-1.png deleted file mode 100644 index f3d30f0..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-1.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-2.png b/blog/wp-content/plugins/role-scoper/screenshot-2.png deleted file mode 100644 index b3e1ba8..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-2.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-3.png b/blog/wp-content/plugins/role-scoper/screenshot-3.png deleted file mode 100644 index 9c778e8..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-3.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-4.png b/blog/wp-content/plugins/role-scoper/screenshot-4.png deleted file mode 100644 index 7e625b6..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-4.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-5.png b/blog/wp-content/plugins/role-scoper/screenshot-5.png deleted file mode 100644 index 671a3bf..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-5.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-6.png b/blog/wp-content/plugins/role-scoper/screenshot-6.png deleted file mode 100644 index f18cb1e..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-6.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-7.png b/blog/wp-content/plugins/role-scoper/screenshot-7.png deleted file mode 100644 index f18cb1e..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-7.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/screenshot-8.png b/blog/wp-content/plugins/role-scoper/screenshot-8.png deleted file mode 100644 index f18cb1e..0000000 Binary files a/blog/wp-content/plugins/role-scoper/screenshot-8.png and /dev/null differ diff --git a/blog/wp-content/plugins/role-scoper/submittee_rs.php b/blog/wp-content/plugins/role-scoper/submittee_rs.php deleted file mode 100644 index 7d7e29a..0000000 --- a/blog/wp-content/plugins/role-scoper/submittee_rs.php +++ /dev/null @@ -1,400 +0,0 @@ -update_page_options( $sitewide, $customize_defaults ); - $this->update_page_otype_options( $sitewide, $customize_defaults ); - - global $wpdb; - $wpdb->query( "UPDATE $wpdb->options SET autoload = 'no' WHERE option_name LIKE 'scoper_%' AND option_name != 'scoper_version'" ); - } - - function default_options( $sitewide = false, $customize_defaults = false ) { - check_admin_referer( 'scoper-update-options' ); - - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - $reviewed_options = explode(',', $_POST['all_options']); - foreach ( $reviewed_options as $option_name ) - scoper_delete_option($default_prefix . $option_name, $sitewide ); - - $reviewed_otype_options = explode(',', $_POST['all_otype_options']); - foreach ( $reviewed_otype_options as $option_name ) - scoper_delete_option($default_prefix . $option_name, $sitewide ); - - scoper_delete_option($default_prefix . 'disabled_role_caps', $sitewide ); - scoper_delete_option($default_prefix . 'user_role_caps', $sitewide ); - - scoper_set_conditional_defaults(); - } - - function update_realm( $sitewide = false, $customize_defaults = false ) { - check_admin_referer( 'scoper-update-options' ); - - // changes to these options will trigger .htaccess regen - if ( $sitewide ) { - add_action( 'add_site_option_scoper_disabled_access_types', 'scoper_expire_file_rules' ); - add_action( 'update_site_option_scoper_disabled_access_types', 'scoper_expire_file_rules' ); - } else - add_action( 'update_option_scoper_disabled_access_types', 'scoper_maybe_expire_file_rules', 10, 2 ); - - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - $disabled = array(); - $access_names = explode(',', $_POST['all_access_types'] ); - foreach ( $access_names as $access_name ) - $disabled[$access_name] = empty( $_POST['access_types-' . $access_name ] ); - scoper_update_option($default_prefix . 'disabled_access_types', $disabled, $sitewide ); - - $enable_taxonomies = array(); - - //$reviewed_wp_taxonomies = explode( ',', $_POST['all_wp_taxonomies'] ); - $selected_wp_taxonomies = isset($_POST['enable_wp_taxonomies']) ? $_POST['enable_wp_taxonomies'] : array(); - - if ( isset($_POST['locked_wp_taxonomies']) ) { - $locked_wp_taxonomies = explode( ',', $_POST['locked_wp_taxonomies'] ); - $selected_wp_taxonomies = array_merge( $selected_wp_taxonomies, $locked_wp_taxonomies); - } - - $selected_wp_taxonomies = array_fill_keys($selected_wp_taxonomies, 1); - scoper_update_option($default_prefix . 'enable_wp_taxonomies', $selected_wp_taxonomies, $sitewide ); - - $this->update_page_otype_options( $sitewide, $customize_defaults ); - } - - function default_realm( $sitewide = false, $customize_defaults = false ) { - check_admin_referer( 'scoper-update-options' ); - - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - scoper_delete_option( $default_prefix . 'enable_wp_taxonomies', $sitewide ); - scoper_delete_option( $default_prefix . 'disabled_access_types', $sitewide ); - - $reviewed_otype_options = explode(',', $_POST['all_otype_options']); - foreach ( $reviewed_otype_options as $option_name ) - scoper_delete_option($default_prefix . $option_name, $sitewide ); - } - - function update_sitewide() { - check_admin_referer( 'scoper-update-options' ); - - $reviewed_options = isset($_POST['rs_all_movable_options']) ? explode(',', $_POST['rs_all_movable_options']) : array(); - - $options_sitewide = isset($_POST['rs_options_sitewide']) ? (array) $_POST['rs_options_sitewide'] : array(); - - - // must force disabled_role_caps scope setting to follow user_role_caps - $reviewed_options []= 'disabled_role_caps'; - - if ( in_array( 'user_role_caps', $options_sitewide ) ) - $options_sitewide = array_merge( $options_sitewide, array( 'disabled_role_caps' ) ); - - - // must force use_term_roles and use_object_roles scope setting to follow enable_wp_taxonomies - $reviewed_options []= 'use_term_roles'; - $reviewed_options []= 'use_object_roles'; - - if ( in_array( 'enable_wp_taxonomies', $options_sitewide ) ) - $options_sitewide = array_merge( $options_sitewide, array( 'use_term_roles', 'use_object_roles' ) ); - - - // must force all teaser option to follow scope of do_teaser - $teaser_options = array( 'use_teaser' ); - - global $scoper_default_otype_options; - foreach ( array_keys($scoper_default_otype_options) as $option_name ) { - if ( 0 === strpos( $option_name, 'teaser_' ) ) - $teaser_options []= $option_name; - } - - $reviewed_options = array_merge( $reviewed_options, $teaser_options ); - - if ( in_array( 'do_teaser', $options_sitewide ) ) - $options_sitewide = array_merge( $options_sitewide, $teaser_options ); - - - add_site_option( "scoper_options_sitewide_reviewed", $reviewed_options ); - add_site_option( "scoper_options_sitewide", $options_sitewide ); - } - - function default_sitewide() { - check_admin_referer( 'scoper-update-options' ); - - scoper_delete_option( 'options_sitewide', true ); - scoper_delete_option( 'options_sitewide_reviewed', true ); - } - - function update_page_options( $sitewide = false, $customize_defaults = false ) { - global $scoper_role_types; - - // changes to these options will trigger .htaccess regen - if ( $sitewide ) { - add_action( 'update_site_option_scoper_file_filtering', 'scoper_flush_site_rules' ); - add_action( 'add_site_option_scoper_file_filtering', 'scoper_flush_site_rules' ); - add_action( 'update_site_option_scoper_file_filtering', 'scoper_expire_file_rules' ); - add_action( 'add_site_option_scoper_file_filtering', 'scoper_expire_file_rules' ); - } else { - add_action( 'update_option_scoper_file_filtering', 'scoper_maybe_expire_file_rules', 10, 2 ); - add_action( 'update_option_scoper_feed_link_http_auth', 'scoper_maybe_flush_site_rules', 10, 2 ); - } - - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - $reviewed_options = explode(',', $_POST['all_options']); - - foreach ( $reviewed_options as $option_basename ) { - $value = isset($_POST[$option_basename]) ? $_POST[$option_basename] : ''; - - if ( 'role_type' == $option_basename ) - $value = $scoper_role_types[$value]; - elseif ( 'mu_sitewide_groups' == $option_basename ) { - $current_setting = get_site_option( 'scoper_mu_sitewide_groups' ); - if ( $current_setting != $value ) { - //delete_option( 'scoper_version' ); // this forces DB schema update on next access (to create site-wide / blog-specific groups table) - $ver = get_option( 'scoper_version' ); - require_once( 'db-setup_rs.php' ); - scoper_db_setup( $ver['db_version'] ); - } - - $value = intval( $value ); - } - - if ( ! is_array($value) ) - $value = trim($value); - $value = stripslashes_deep($value); - - scoper_update_option( $default_prefix . $option_basename, $value, $sitewide ); - } - - //dump($_POST); - //die; - } - - function update_page_otype_options( $sitewide = false, $customize_defaults = false ) { - global $scoper_default_otype_options; - - // changes to these options will trigger .htaccess regen - if ( $sitewide ) { - add_action( 'add_site_option_scoper_use_term_roles', 'scoper_expire_file_rules' ); - add_action( 'add_site_option_scoper_use_object_roles', 'scoper_expire_file_rules' ); - add_action( 'pre_update_site_option_scoper_use_term_roles', 'scoper_expire_file_rules' ); - add_action( 'pre_update_site_option_scoper_use_object_roles', 'scoper_expire_file_rules' ); - } else { - add_action( 'update_option_scoper_use_term_roles', 'scoper_maybe_expire_file_rules', 10, 2 ); - add_action( 'update_option_scoper_use_object_roles', 'scoper_maybe_expire_file_rules', 10, 2 ); - } - - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - $reviewed_otype_options = explode(',', $_POST['all_otype_options']); - $otype_option_vals = array(); - foreach ( $reviewed_otype_options as $option_basename ) { - if ( isset( $scoper_default_otype_options[$option_basename] ) ) { - if ( $opt = $scoper_default_otype_options[$option_basename] ) { - foreach ( array_keys($opt) as $src_otype ) { - $postvar = $option_basename . '-' . str_replace(':', '_', $src_otype); - $value = isset($_POST[$postvar]) ? $_POST[$postvar] : ''; - if ( ! is_array($value) ) - $value = trim($value); - - $otype_option_vals[ $option_basename ] [ $src_otype ] = stripslashes_deep($value); - } - } - } - } - - foreach ( $otype_option_vals as $option_basename => $value ) - scoper_update_option( $default_prefix . $option_basename , $value, $sitewide); - } - - function update_rs_role_defs_customize_defaults () { - $this->update_rs_role_defs( true, true ); - } - - function update_rs_role_defs_sitewide () { - $this->update_rs_role_defs( true, false ); - } - - function update_rs_role_defs( $sitewide = false, $customize_defaults = false ) { - $default_prefix = ( $customize_defaults ) ? 'default_' : ''; - - $default_role_caps = apply_filters('define_role_caps_rs', scoper_core_role_caps() ); - - $cap_defs = new WP_Scoped_Capabilities(); - $cap_defs = apply_filters('define_capabilities_rs', $cap_defs); - $cap_defs->add_member_objects( scoper_core_cap_defs() ); - - global $scoper, $scoper_role_types; - $role_defs = new WP_Scoped_Roles($cap_defs, $scoper_role_types); - $role_defs->add_member_objects( scoper_core_role_defs() ); - $role_defs = apply_filters('define_roles_rs', $role_defs); - - $disable_caps = array(); - $add_caps = array(); - - foreach ( $default_role_caps as $role_handle => $default_caps ) { - if ( $role_defs->member_property($role_handle, 'no_custom_caps') || $role_defs->member_property($role_handle, 'anon_user_blogrole') ) - continue; - - $posted_set_caps = ( empty($_POST["{$role_handle}_caps"]) ) ? array() : $_POST["{$role_handle}_caps"]; - - // html IDs have any spaces stripped out of cap names. Replace them for processing. - $set_caps = array(); - foreach ( $posted_set_caps as $cap_name ) { - if ( strpos( $cap_name, ' ' ) ) - $set_caps []= str_replace( '_', ' ', $cap_name ); - else - $set_caps []= $cap_name; - } - - // deal with caps which are locked into role, therefore displayed as a disabled checkbox and not included in $_POST - foreach ( array_keys($default_caps) as $cap_name ) { - if ( ! in_array($cap_name, $set_caps) && $cap_defs->member_property($cap_name, 'no_custom_remove') ) - $set_caps []= $cap_name; - } - - $disable_caps[$role_handle] = array_fill_keys( array_diff( array_keys($default_caps), $set_caps ), true); - $add_caps[$role_handle] = array_fill_keys( array_diff( $set_caps, array_keys($default_caps) ), true); - } - - scoper_update_option( $default_prefix . 'disabled_role_caps', $disable_caps, $sitewide); - scoper_update_option( $default_prefix . 'user_role_caps', $add_caps, $sitewide); - - scoper_refresh_options(); - $scoper->load_role_caps(); - - global $wp_roles; - - // synchronize WP roles as requested - if ( ! empty( $_POST['sync_wp_roles'] ) ) { - foreach ( $_POST['sync_wp_roles'] as $sync_request ) { - $sync_handles = explode( ':', $sync_request ); - $rs_role_handle = $sync_handles[0]; - $wp_role_handle = $sync_handles[1]; - - $wp_role_name = str_replace( 'wp_', '', $wp_role_handle ); - - // only remove caps which are defined for this RS role's data source and object type - $role_attributes = $scoper->role_defs->get_role_attributes( $rs_role_handle ); - $src_name = $role_attributes->src_names[0]; - $object_type = $role_attributes->object_types[0]; - $otype_caps = $scoper->cap_defs->get_matching( $src_name, $object_type, '', STATUS_ANY_RS ); - - // make the roledef change for all blogs if RS role def is sitewide - if ( IS_MU_RS && $sitewide ) { - global $wpdb, $blog_id; - $blog_ids = scoper_get_col( "SELECT blog_id FROM $wpdb->blogs" ); - $orig_blog_id = $blog_id; - } else - $blog_ids = array( '' ); - - foreach ( $blog_ids as $id ) { - if ( count($blog_ids) > 1 ) - switch_to_blog( $id ); - - if ( ! isset( $wp_roles->role_objects[$wp_role_name] ) ) - continue; - - if ( $wp_missing_caps = array_diff_key( $scoper->role_defs->role_caps[$rs_role_handle], $wp_roles->role_objects[$wp_role_name]->capabilities ) ) - foreach ( array_keys($wp_missing_caps) as $cap_name ) - $wp_roles->add_cap( $wp_role_name, $cap_name ); - - $wp_defined_caps = array_intersect_key( $wp_roles->role_objects[$wp_role_name]->capabilities, $otype_caps ); - - if ( $wp_extra_caps = array_diff_key( $wp_defined_caps, $scoper->role_defs->role_caps[$rs_role_handle] ) ) - foreach ( array_keys($wp_extra_caps) as $cap_name ) - $wp_roles->remove_cap( $wp_role_name, $cap_name ); - } - - if ( count($blog_ids) > 1 ) - switch_to_blog( $orig_blog_id ); - - $wp_roles = new WP_Roles(); - } - } - - $scoper->role_defs->locked = false; - $scoper->role_defs->populate_with_wp_roles(); - $scoper->role_defs->lock(); - } -} - - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/taxonomies-custom_rs.php b/blog/wp-content/plugins/role-scoper/taxonomies-custom_rs.php deleted file mode 100644 index 6c95e81..0000000 --- a/blog/wp-content/plugins/role-scoper/taxonomies-custom_rs.php +++ /dev/null @@ -1,102 +0,0 @@ -source->table; - $tmp['alias'] = ($tx->source->table_alias) ? $tx->source->table_alias : $tmp['table']; - $tmp['as'] = ( $tx->source->table_alias && ($tx->source->table_alias != $tx->source->table) ) ? "AS {$tmp['alias']}" : ''; - $tmp['col_id'] = $tx->source->cols->id; - $arr['term'] = (object) $tmp; - - // this corresponds to 'category_id' in wp_post2cat (WP < 2.3), or some equivalent custom table - } elseif ( ! empty($tx->cols->term2obj_tid) ) { - $tmp = array(); - $tmp['table'] = $tx->table_term2obj; - $tmp['alias'] = ($tx->table_term2obj_alias) ? $tx->table_term2obj_alias : $tmp['table']; - $tmp['as'] = ( $tmp['alias'] && ($tmp['alias'] != $tmp['table']) ) ? "AS {$tmp['alias']}" : ''; - $tmp['col_id'] = $tx->cols->term2obj_tid; - $tmp['col_obj_id'] = $tx->cols->term2obj_oid; - $arr['term'] = (object) $tmp; - - $tmp = array(); - $tmp['table'] = $tx->object_source->table; - $tmp['alias'] = ($tx->object_source->table_alias) ? $tx->object_source->table_alias : $tmp['table']; - $tmp['as'] = ( $tmp['alias'] && ($tmp['alias'] != $tmp['table']) ) ? "AS {$tmp['alias']}" : ''; - $tmp['col_id'] = $tx->object_source->cols->id; - $arr['obj'] = (object) $tmp; - - // also support custom taxonomies which store a single term_id right in object table - } elseif ( ! empty($tx->cols->objtable_tid) ) { - $tmp = array(); - $tmp['table'] = $tx->object_source->table; - $tmp['alias'] = ($tx->object_source->table_alias) ? $tx->object_source->table_alias : $tmp['table']; - $tmp['as'] = ( $tmp['alias'] && ($tmp['alias'] != $tmp['table']) ) ? "AS {$tmp['alias']}" : ''; - $tmp['col_id'] = $tx->cols->objtable_tid; - $tmp['col_obj_id'] = $tx->object_source->cols->id; - $arr['term'] = (object) $tmp; - - $tmp = array(); - $tmp['table'] = $tmp['table']; - $tmp['alias'] = $tmp['alias']; - $tmp['as'] = $tmp['as']; - $tmp['col_id'] = $tmp['col_obj_id']; - $arr['obj'] = (object) $tmp; - } else { - rs_notice( sprintf( 'Role Scoper Config Error: the specified taxonomy (%s) has not defined its relation to the object data source. A col_term2obj_tid or col_objtable_tid setting is required.', $tx->name) ); - return; - } - - return (object) $arr; - } - - // This function is only used for custom taxonomies that don't use wp_term_taxonomy - function get_terms_query($tx, $cols = COLS_ALL_RS, $object_id = 0, $terms_only = true) { - $join = $where = $orderby = ''; - - // this taxonomy uses a custom schema - $table = $tx->source->table; - - // table alias - $t = ($tx->source->table_alias) ? $tx->source->table_alias : $table; - - $as = ( $t != $tx->source->table ) ? "AS $t" : ''; - - if ( ! empty($object_id) ) { - $qv = ScoperCustomTaxonomyHelper::get_terms_query_vars($tx, $terms_only); - - if ( ! $terms_only ) - $join = " INNER JOIN {$qv->obj->table} {$qv->obj->as} ON {$qv->obj->alias}.{$qv->obj->col_id} = $t.{$qv->term->col_obj_id} AND {$qv->obj->alias}.{$qv->obj->col_id} = '$object_id'"; - } - - if ( COL_TAXONOMY_ID_RS == $cols ) // term_id / tt_id in separate tables is only supported for taxonomies using standard WP schema - $cols = COL_ID_RS; - - switch ( $cols ) { - case COL_ID_RS: - $qcols = "$t.{$tx->source->cols->id}"; - break; - case COL_COUNT_RS: - $qcols = "COUNT($t.{$tx->source->cols->id})"; - break; - default: // COLS_ALL { - $qcols = "$t.*"; - $orderby = "ORDER BY $t.{$tx->source->cols->name}"; - } - - if ( ! empty($tx->cols->require_zero) ) - $where .= " AND {$tx->cols->require_zero} = '0'"; - - if ( ! empty($tx->cols->require_nonzero) ) - $where .= " AND {$tx->cols->require_nonzero} > '0'"; - - return "SELECT DISTINCT $qcols FROM $table $as $join WHERE 1=1 $where $orderby"; - } - -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/taxonomies_rs.php b/blog/wp-content/plugins/role-scoper/taxonomies_rs.php deleted file mode 100644 index 7e116c8..0000000 --- a/blog/wp-content/plugins/role-scoper/taxonomies_rs.php +++ /dev/null @@ -1,317 +0,0 @@ -data_sources =& $data_sources; - - if ( ! is_array( $arr_use_wp_taxonomies ) ) - $arr_use_wp_taxonomies = array(); - - // don't allow category or link category to be disabled via enable_wp_taxonomies option - $arr_use_wp_taxonomies = array_merge( $arr_use_wp_taxonomies, array( 'category' => 1, 'link_category' => 1 ) ); - - // Detect and support additional WP taxonomies (just require activation via Role Scoper options panel) - if ( ! empty($arr_use_wp_taxonomies) ) { - global $wp_taxonomies; - - if ( defined( 'CUSTAX_DB_VERSION' ) ) { // Extra support for Custom Taxonomies plugin - global $wpdb; - if ( ! empty($wpdb->custom_taxonomies) ) { - $custom_taxonomies = array(); - $results = $wpdb->get_results( "SELECT * FROM $wpdb->custom_taxonomies" ); // * to support possible future columns - foreach ( $results as $row ) - $custom_taxonomies[$row->slug] = $row; - } - } else - $custom_taxonomies = array(); - - foreach ( $wp_taxonomies as $taxonomy => $wp_tax ) { - // taxonomy must be approved for scoping and have a Scoper-defined object type - if ( isset($arr_use_wp_taxonomies[$taxonomy]) ) { - $tx_otypes = (array) $wp_tax->object_type; - - foreach ( $tx_otypes as $wp_tax_object_type ) { - - if ( $data_sources->is_member($wp_tax_object_type) ) - $src_name = $wp_tax_object_type; - elseif ( ! $src_name = $data_sources->is_member_alias($wp_tax_object_type) ) // in case the 3rd party plugin uses a taxonomy->object_type property different from the src_name we use for RS data source definition - continue; - - if ( ( 'post' != $wp_tax_object_type ) && ( 'link_category' != $taxonomy ) ) - $taxonomy = $wp_tax_object_type . '_' . $taxonomy; - - // create taxonomies definition if necessary (additional properties will be set later) - $this->members[$taxonomy] = (object) array( - 'name' => $taxonomy, - 'uses_standard_schema' => 1, 'autodetected_wp_taxonomy' => 1, - 'hierarchical' => $wp_tax->hierarchical, - 'object_source' => $src_name - ); - - $this->members[$taxonomy]->requires_term = $wp_tax->hierarchical; // default all hierarchical taxonomies to strict, non-hierarchical to non-strict - - if ( isset( $custom_taxonomies[$taxonomy] ) && ! empty( $custom_taxonomies[$taxonomy]->plural ) ) { - $this->members[$taxonomy]->display_name = $custom_taxonomies[$taxonomy]->name; - $this->members[$taxonomy]->display_name_plural = $custom_taxonomies[$taxonomy]->plural; - - // possible future extension to Custom Taxonomies plugin: ability to specify "required" property apart from hierarchical property (and enforce it in Edit Forms) - if ( isset( $custom_taxonomies[$taxonomy]->required ) ) - $this->members[$taxonomy]->requires_term = $custom_taxonomies[$taxonomy]->required; - } else { - $this->members[$taxonomy]->display_name = ucwords( __( preg_replace('/[_-]/', ' ', $taxonomy) ) ); - $this->members[$taxonomy]->display_name_plural = $this->members[$taxonomy]->display_name; - } - - if ( ! in_array($taxonomy, $data_sources->member_property($src_name, 'uses_taxonomies') ) ) { - $obj_src =& $data_sources->get_ref($src_name); - $obj_src->uses_taxonomies []= $taxonomy; - } - - $this->process( $this->members[$taxonomy], $this->data_sources ); - } - - } // endif scoping is enabled for this taxonomy - } // end foreach taxonomy know to WP core - } // endif any taxonomies have scoping enabled - } // end function - - // creates related data source and taxonomy objects - function &add( $name, $defining_module_name, $display_name, $display_name_plural, $uses_standard_schema = true, $default_strict = true, $args = '' ) { - if ( $this->locked ) { - $notice = sprintf('A plugin or theme (%1$s) is too late in its attempt to define a role (%2$s).', $defining_module_name, $name) - . '

    ' . 'This must be done via the define_data_sources_rs hook.'; - rs_notice($notice); - return; - } - - if ( isset($this->members[$name]) ) - unset($this->members[$name]); - - $this->members[$name] = new WP_Scoped_Taxonomy($name, $defining_module_name, $display_name, $display_name_plural, $uses_standard_schema, $default_strict, $args); - - $this->process( $this->members[$name], $this->data_sources ); - return $this->members[$name]; - } - - // $tx = reference to WP_Scoped_Taxonomy object (must pass object so we can call base class function statically) - // $data_sources = reference to WP_Scoped_Data_Sources object - function process( &$tx, &$data_sources ) { - global $wpdb; - - $taxonomy = $tx->name; - - // scoper_core_taxonomies sets source prop to data source name. Convert it to object reference - if ( isset($tx->source) && ! is_object($tx->source) ) - $tx->source =& $data_sources->get_ref($tx->source); - - // Establish reference to object source - if ( isset($tx->object_source) && ! is_object($tx->object_source) ) - // auto-added custom WP taxonomies set object_source to name provided by wp_taxonomies - $tx->object_source =& $data_sources->get_ref($tx->object_source); - else { - // scoper-defined taxonomies set object source by uses_taxonomies property of WP_Scoped_Data_Source object - foreach ($data_sources->get_all_keys() as $src_name) { - $uses_taxonomies = $data_sources->member_property($src_name, 'uses_taxonomies'); - if ( is_array( $uses_taxonomies) ) - foreach ( $uses_taxonomies as $uses_taxonomy ) - if ( $uses_taxonomy == $taxonomy ) { - $tx->object_source =& $data_sources->get_ref($src_name); - break 2; - } - } - } - - // Apply default / derived properties to Taxonomy definitions - if ( $tx->uses_standard_schema ) { - $tx->source = $data_sources->get_ref('term'); - - // default WP schema properties - $tx->cols->count = 'count'; - - $tx->table_term2obj_basename = 'term_relationships'; - $tx->table_term2obj_alias = 'tr'; - $tx->cols->term2obj_oid = 'object_id'; - $tx->cols->term2obj_tid = 'term_taxonomy_id'; - - if ( 'category' == $tx->name ) - $tx->edit_url = 'categories.php?action=edit&cat_ID=%d'; - else { - $tx->edit_url = "edit-tags.php?action=edit&taxonomy={$tx->name}&tag_ID=%d"; - $tx->uri_vars = (object) array( 'id' => $tx->name ); - $tx->http_post_vars = (object) array( 'id' => 'term_ID', 'parent' => 'parent' ); - } - } - - // term2obj table: add prefix - $pfx = ( empty($tx->table_term2obj_noprefix) ) ? $wpdb->prefix : ''; - $tx->table_term2obj = $pfx . $tx->table_term2obj_basename; - - // term2obj taxonomy table: if no alias, set alias property to tablename - if ( empty($tx->table_term2obj_alias) ) - $tx->table_term2obj_alias = $tx->table_term2obj; - - if ( is_admin() ) { - $taxonomy = $tx->name; - - // note: this defaults to source hook names save_[taxonomyname], edit_[taxonomyname], create_[taxonomyname], delete_[taxonomyname] - // unless otherwise specified in data source definition. Better to support a logical default even if it means registering hooks that are never used. - // (since WP core uses create_category, edit_category, delete_category only, the save_category registration is suppressed in default_taxonoimies() by admin_hooks 'save_term' => '') - $defaults = array( 'save_term' => "save_$taxonomy", 'edit_term' => "edit_$taxonomy", - 'create_term' => "create_$taxonomy", 'delete_term' => "delete_$taxonomy", - 'term_edit_ui' => '' ); - if ( isset($tx->admin_actions) ) - // array_intersect_key rejects custom keys not in defaults, array_merge adds defaults not in custom - $tx->admin_actions = (object) array_merge($defaults, array_intersect_key((array) $tx->admin_actions, $defaults ) ); - else - $tx->admin_actions = (object) $defaults; - - $defaults = array( 'pre_object_terms' => "pre_{$taxonomy}" ); - if ( isset($tx->admin_filters) ) - // array_intersect_key rejects custom keys not in defaults, array_merge adds defaults not in custom - $tx->admin_filters = (object) array_merge($defaults, array_intersect_key((array) $tx->admin_filters, $defaults ) ); - else - $tx->admin_filters = (object) $defaults; - } - } - - // override base class method because process function for this subclass takes data_sources reference as 2nd arg - function process_added_members($arr) { - foreach (array_keys($arr) as $name ) - $this->process($this->members[$name], $this->data_sources); - } - - // standard taxonomy query variables using WP taxonomy schema with objects filtering or term id filtering - function standard_query_vars($terms_only = false) { - global $wpdb; - $arr = array(); - - if ( $terms_only ) { - $tmp = array(); - $tmp['table'] = $wpdb->term_taxonomy; - $tmp['alias'] = 'tt'; - $tmp['as'] = 'AS tt'; - $tmp['col_id'] = 'term_taxonomy_id'; - $arr['term'] = (object) $tmp; - } else { - $tmp = array(); - $tmp['table'] = $wpdb->term_relationships; - $tmp['alias'] = 'tr'; - $tmp['as'] = 'AS tr'; - $tmp['col_id'] = 'term_taxonomy_id'; - $tmp['col_obj_id'] = 'object_id'; - $arr['term'] = (object) $tmp; - - $tmp = array(); - $tmp['table'] = $wpdb->posts; - $tmp['alias'] = $tmp['table']; - $tmp['as'] = ''; - $tmp['col_id'] = 'ID'; // posts ID column - $arr['obj'] = (object) $tmp; - } - - return (object) $arr; - } - - // standard get_terms query using WP taxonomy schema - function standard_query( $taxonomy, $cols, $object_id, $terms_only ) { - global $wpdb; - - $join = $orderby = ''; - - if ( $object_id || ! $terms_only ) { - $join = " INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id"; - if ( $object_id ) - $join .= " AND tr.object_id = '$object_id'"; - } - - switch ( $cols ) { - case COL_ID_RS: - $qcols = 'tt.term_id'; - break; - case COL_TAXONOMY_ID_RS: - $qcols = 'tt.term_taxonomy_id'; - break; - case COL_COUNT_RS: - $qcols = 'COUNT(tt.term_id)'; - break; - default: // COLS_ALL - $qcols = 't.*, tt.*'; - - $orderby = 'ORDER BY t.name'; - $join .= " INNER JOIN $wpdb->terms AS t ON t.term_id = tt.term_id"; - } - - $distinct = ( $join ) ? 'DISTINCT ' : ''; - - return "SELECT {$distinct}$qcols FROM $wpdb->term_taxonomy AS tt $join WHERE 1=1 AND tt.taxonomy = '$taxonomy' $orderby"; - } - - // taxonomy query variables for use with objects filtering or term id filtering - function get_terms_query_vars($tx, $terms_only = false) { - if ( ! is_object($tx) ) - $tx = $this->get($tx); - - $arr = array(); - - if ( ! empty($tx->uses_standard_schema) ) - return $this->standard_query_vars($terms_only); - - require_once('taxonomies-custom_rs.php'); - return ScoperCustomTaxonomyHelper::get_terms_query_vars($tx, $terms_only); - } - - // called by Scoper::get_terms - function get_terms_query($taxonomy, $cols = COLS_ALL_RS, $object_id = 0, $terms_only = true) { - if ( ! isset($this->members[$taxonomy]) ) - return; - - $tx = $this->members[$taxonomy]; - - if ( ! empty($tx->uses_standard_schema) ) - return $this->standard_query($taxonomy, $cols, $object_id, $terms_only); //this is a required child method - - require_once('taxonomies-custom_rs.php'); - return ScoperCustomTaxonomyHelper::get_terms_query($tx, $cols, $object_id, $terms_only); - } -} - -// usage: $src = new WP_Scoped_Taxonomy, then set additional properties on $src -class WP_Scoped_Taxonomy extends AGP_Config_Item { - var $display_name; // REQUIRED: // proper case display name (singular) - var $display_name_plural; // REQUIRED: proper case display name (plural) - var $source; // object reference to a Scoped_DataSource (REQUIRED but auto-set for WP taxonomies) - var $object_source; // auto-generated upon ScoperConfig::load_config - - var $requires_term = 0; // must every object type using this category relate every object to at least one term? - var $uses_standard_schema = 0; // child classes may set this true if corresponding _Taxonomies class has standard_query_vars, standard_query methods - - var $cols = array(); - - // Term to Object schema properties ( i.e. post2cat for WP < 2.3, term_relationships for WP > 2.3 ) - var $table_term2obj_basename = ''; // table basename (without prefix) for table relating terms to objects (and taxonomies, if multiple taxonomies are sharing the same DB schema) - var $table_term2obj_noprefix = 0; - var $table_term2obj; // auto-generated upon ScoperConfig::load_config - var $table_term2obj_alias = ''; - - // Note: Term to Taxonomy schema (such as term_taxonomies in WP 2.3+) - // is supported, but cannot be custom-defined for individual taxonomies. - // Instead, define it in via standard_query, standard_query_vars methods - // as in WP_Scoped_Taxonomies, then set the uses_standard_schema property of pertinent Taxonomy objects - - function WP_Scoped_Taxonomy($name, $defining_module_name, $display_name, $display_name_plural, $uses_standard_schema = true, $requires_term = false, $args = '' ) { - $this->AGP_Config_Item($name, $defining_module_name, $args); - - $this->display_name = $display_name; - $this->display_name_plural = $display_name_plural; - $this->uses_standard_schema = $uses_standard_schema; - $this->requires_term = $requires_term; - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/teaser_rs.php b/blog/wp-content/plugins/role-scoper/teaser_rs.php deleted file mode 100644 index 67e861f..0000000 --- a/blog/wp-content/plugins/role-scoper/teaser_rs.php +++ /dev/null @@ -1,299 +0,0 @@ - '', 'use_object_roles' => -1, 'use_term_roles' => -1, 'request' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $wpdb, $scoper, $wp_query; - - if ( did_action('wp_meta') && ! did_action('wp_head') ) - return $results; - - if ( ! $src = $scoper->data_sources->get($src_name) ) - return array(); - - if ( empty($request) ) { - if ( empty ($scoper->last_request[$src_name]) ) { - // try to get it from wpdb instead - if ( ! empty($wpdb->last_query) ) - $request = $wpdb->last_query; - else { - // don't risk exposing hidden content if something goes wrong with query logging - return array(); - } - } else - $request = $scoper->last_request[$src_name]; - } - - if ( count($results) >= $wp_query->query_vars['posts_per_page'] ) { - // pagination could be broken by subsequent query for filtered ids, so buffer current paging parameters - $restore_pagination = true; - - // this code mimics WP_Query::get_posts(). - $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' ); - $buffer_found_posts = $wpdb->get_var( $found_posts_query ); - $buffer_found_posts = apply_filters( 'found_posts', $buffer_found_posts ); - } else - $restore_pagination = false; - - $col_id = $src->cols->id; - $col_content = $src->cols->content; - $col_type = $src->cols->type; - - if ( isset($src->cols->excerpt) ) - $col_excerpt = $src->cols->excerpt; - - if ( isset($src->cols->name) ) - $col_name = $src->cols->name; - - if ( isset($src->cols->status) && isset($src->statuses['private']) && isset($src->statuses['published']) ) { - $list_private = array(); - $col_status = $src->cols->status; - $status_private = $src->statuses['private']; - $status_published = $src->statuses['published']; - - if ( is_single() || is_page() ) - $maybe_fudge_private = true; - else - $maybe_strip_private = true; - } - - if ( ! is_object($user) ) { - global $current_user; - $user = $current_user; - } - - $teaser_replace = array(); - $teaser_prepend = array(); - $teaser_append = array(); - - foreach ( $tease_otypes as $object_type ) { - if ( isset($src->cols->content) ) { - $teaser_replace[$object_type][$col_content] = ScoperTeaser::get_teaser_text( 'replace', 'content', $src_name, $object_type, $user ); - $teaser_prepend[$object_type][$col_content] = ScoperTeaser::get_teaser_text( 'prepend', 'content', $src_name, $object_type, $user ); - $teaser_append[$object_type][$col_content] = ScoperTeaser::get_teaser_text( 'append', 'content', $src_name, $object_type, $user ); - } - - if ( isset($src->cols->excerpt) ) { - $teaser_replace[$object_type][$col_excerpt] = ScoperTeaser::get_teaser_text( 'replace', 'excerpt', $src_name, $object_type, $user ); - $teaser_prepend[$object_type][$col_excerpt] = ScoperTeaser::get_teaser_text( 'prepend', 'excerpt', $src_name, $object_type, $user ); - $teaser_append[$object_type][$col_excerpt] = ScoperTeaser::get_teaser_text( 'append', 'excerpt', $src_name, $object_type, $user ); - } - - if ( isset($src->cols->name) ) { - $teaser_prepend[$object_type][$col_name] = ScoperTeaser::get_teaser_text( 'prepend', 'name', $src_name, $object_type, $user ); - $teaser_append[$object_type][$col_name] = ScoperTeaser::get_teaser_text( 'append', 'name', $src_name, $object_type, $user ); - } - } - - // don't risk exposing hidden content if there is a problem with query parsing - if ( ! $pos = strpos(strtoupper($request), " FROM") ) - return array(); - - $distinct = ( stripos( $request, " DISTINCT " ) ) ? 'DISTINCT' : ''; // RS does not add any joins, but if DISTINCT clause exists in query, retain it - $request = "SELECT $distinct {$src->table}.$col_id " . substr($request, $pos); - - if ( $limitpos = strpos($request, ' LIMIT ') ) - $request = substr($request, 0, $limitpos); - - $args['skip_teaser'] = true; - $filtered_request = $scoper->query_interceptor->flt_objects_request($request, $src_name, '', $args); - - $filtered_ids = scoper_get_col($filtered_request); - - if ( ! isset($scoper->teaser_ids) ) - $scoper->teaser_ids = array(); - - $excerpt_teaser = array(); - $more_teaser = array(); - $x_chars_teaser = array(); - $hide_ungranted_private = array(); - foreach ( $tease_otypes as $object_type ) { - $teaser_type = scoper_get_otype_option( 'use_teaser', $src_name, $object_type ); - if ( 'excerpt' == $teaser_type ) - $excerpt_teaser[$object_type] = true; - elseif ( 'more' == $teaser_type ) { - $excerpt_teaser[$object_type] = true; - $more_teaser[$object_type] = true; - } elseif ( 'x_chars' == $teaser_type ) { - $excerpt_teaser[$object_type] = true; - $more_teaser[$object_type] = true; - $x_chars_teaser[$object_type] = true; - } - - $hide_ungranted_private[$object_type] = scoper_get_otype_option('teaser_hide_private', $src_name, $object_type); - } - - // strip content from all $results rows not in $items - $args = array( 'col_excerpt' => $col_excerpt, 'col_content' => $col_content, 'col_id' => $col_id, - 'teaser_prepend' => $teaser_prepend, 'teaser_append' => $teaser_append, 'teaser_replace' => $teaser_replace, - 'excerpt_teaser' => $excerpt_teaser, 'more_teaser' => $more_teaser, 'x_chars_teaser' => $x_chars_teaser ); - - foreach ( array_keys($results) as $key ) { - if ( is_array($results[$key]) ) - $id = $results[$key][$col_id]; - else - $id = $results[$key]->$col_id; - - if ( ! $filtered_ids || ! in_array($id, $filtered_ids) ) { - if ( isset($results[$key]->$col_type) ) - $object_type = $results[$key]->$col_type; - else - $object_type = $scoper->data_sources->get_from_db('type', $src_name, $id); - - if ( ! in_array($object_type, $tease_otypes) ) - continue; - - ScoperTeaser::apply_teaser( $results[$key], $src_name, $object_type, $args ); - - // Defeat a WP core secondary safeguard so we can apply the teaser message rather than 404 - if ( ! empty($status_private) && ( $results[$key]->$col_status == $status_private ) ) { - // don't want the teaser message (or presence in category archive listing) if we're hiding a page from listing - // (not ready to abstract this yet) - if ( 'page' == $object_type ) { - if ( ! isset($list_private[$object_type]) ) - $list_private[$object_type] = scoper_get_otype_option('private_items_listable', $src_name, $object_type); - } else - $list_private[$object_type] = true; - - if ( ! empty($maybe_fudge_private) && $list_private[$object_type] ) { - $results[$key]->$col_status = $status_published; - } elseif ( $hide_ungranted_private[$object_type] || ( $maybe_strip_private && ! $list_private[$object_type] ) ) { - $need_reindex = true; - unset ($results[$key]); - - // Actually, don't do this because the current method of removing private items from the paged result set will not move items from one result page to another - //$buffer_found_posts--; // since we're removing this item from the teased results, decrement the paging total - - continue; - } - } - } - } - - if ( ! empty($need_reindex) ) // re-index the array so paging isn't confused - $results = array_values($results); - - // pagination could be broken by the filtered ids query performed in this function, so original paging parameters were buffered - if ( $restore_pagination ) { - // WP query will apply found_posts filter shortly after this function returns. Feed it the buffered value from original unfiltered results. - // Static flag in created function ensures it is only applied once. - $func_name = create_function( '$a', 'static $been_here; if ( ! empty($been_here) ) return $a; else {$been_here = true; ' . "return $buffer_found_posts;}" ); - add_filter( 'found_posts', $func_name, 99); - } - - return $results; - } - - function get_teaser_text( $teaser_operation, $variable, $src_name, $object_type, $user = '' ) { - if ( ! is_object($user) ) - $user = $current_user; - - $anon = ( $user->ID == 0 ) ? '_anon' : ''; - - if ( $msg = scoper_get_otype_option( "teaser_{$teaser_operation}_{$variable}{$anon}", $src_name, $object_type, CURRENT_ACCESS_NAME_RS) ) { - if ( defined('SCOPER_TRANSLATE_TEASER') ) { - scoper_load_textdomain(); // otherwise this is only loaded for wp-admin - - $msg = translate( $msg, 'scoper'); - - if ( ! empty($msg) && ! is_null($msg) && is_string($msg) ) - $msg = htmlspecialchars_decode( $msg ); - } - return $msg; - } - } - - function apply_teaser( &$object, $src_name, $object_type, $args = '' ) { - $defaults = array( 'col_excerpt' => '', 'col_content' => '', 'excerpt_teaser' => '', 'col_id' => '', - 'teaser_prepend' => '', 'teaser_append' => '', 'teaser_replace' => '', 'more_teaser' => '', - 'x_chars_teaser' => '' ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - global $scoper; - - if ( is_array($object) ) - $id = $object[$col_id]; - else - $id = $object->$col_id; - - $object->scoper_teaser = true; - $scoper->teaser_ids[$src_name][$id] = true; - - if ( ! empty( $object->post_password ) ) { - $excerpt_teaser[$object_type] = false; - $more_teaser[$object_type] = false; - $x_chars_teaser[$object_type] = false; - } - - if ( ! empty($x_chars_teaser[$object_type]) ) - $num_chars = ( defined('SCOPER_TEASER_NUM_CHARS') ) ? SCOPER_TEASER_NUM_CHARS : 50; - - // Content replacement mode is applied in the following preference order: - // 1. Custom excerpt, if available and if selected teaser mode is "excerpt", "excerpt or more", or "excerpt, pre-more or first x chars" - // 2. Pre-more content, if applicable and if selected teaser mode is "excerpt or more", or "excerpt, pre-more or first x chars" - // 3. First X Characters (defined by SCOPER_TEASER_NUM_CHARS), if total content is longer than that and selected teaser mode is "excerpt, pre-more or first x chars" - - $teaser_set = false; - - // optionally, use post excerpt as the hidden content teaser instead of a fixed replacement - if ( ! empty($excerpt_teaser[$object_type]) && isset($col_content) && isset($col_excerpt) && ! empty($object->$col_excerpt) ) { - $object->$col_content = $object->$col_excerpt; - - } elseif ( ! empty($more_teaser[$object_type]) && isset($col_content) && ( $more_pos = strpos($object->$col_content, '') ) ) { - $object->$col_content = substr( $object->$col_content, 0, $more_pos + 11 ); - $object->$col_excerpt = $object->$col_content; - if ( is_single() || is_page() ) - $object->$col_content .= '

    ' . $teaser_replace[$object_type][$col_content] . '

    '; - - // since no custom excerpt or more tag is stored, use first X characters as teaser - but only if the total length is more than that - } elseif ( ! empty($x_chars_teaser[$object_type]) && ! empty($object->$col_content) && ( strlen( strip_tags($object->$col_content) ) > $num_chars ) ) { - scoper_load_textdomain(); // otherwise this is only loaded for wp-admin - - // since we are stripping out img tag, also strip out image caption applied by WP - $object->$col_content = preg_replace( "/\[caption.*\]/", '', $object->$col_content ); - $object->$col_content = str_replace( "[/caption]", '', $object->$col_content ); - - $object->$col_content = sprintf(_x('%s...', 'teaser suffix', 'scoper'), substr( strip_tags($object->$col_content), 0, $num_chars ) ); - $object->$col_excerpt = $object->$col_content; - - if ( is_single() || is_page() ) - $object->$col_content .= '

    ' . $teaser_replace[$object_type][$col_content] . '

    '; - - } else { - if ( isset($teaser_replace[$object_type][$col_content]) ) - $object->$col_content = $teaser_replace[$object_type][$col_content]; - else - $object->$col_content = ''; - - // Replace excerpt with a user-specified fixed teaser message, - // but only if since no custom excerpt exists or teaser options aren't set to some variation of "use excerpt as teaser" - if ( ! empty($teaser_replace[$object_type][$col_excerpt]) ) - $object->$col_excerpt = $teaser_replace[$object_type][$col_excerpt]; - } - - - // NOTE: fixed teaser prepends / appends are always applied to the specified entity regardless of what the content / excerpt was replaced with. - // (i.e. the fixed excerpt suffix is NOT applied to the teaser content due to an "excerpt as teaser" setting) - // Likewise, we don't suppress a fixed content suffix because the content was replaced with pre-more_tag content - foreach ( $teaser_prepend[$object_type] as $col => $entry ) - if ( isset($object->$col) ) - $object->$col = $entry . $object->$col; - - foreach ( $teaser_append[$object_type] as $col => $entry ) - if ( isset($object->$col) ) - $object->$col .= $entry; - - // no need to display password form if we're blocking content anyway - if ( 'post' == $src_name ) - if ( ! empty( $object->post_password ) ) - $object->post_password = ''; - } -} // end class -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/template-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/template-interceptor_rs.php deleted file mode 100644 index 3d8b5cc..0000000 --- a/blog/wp-content/plugins/role-scoper/template-interceptor_rs.php +++ /dev/null @@ -1,202 +0,0 @@ -scoper =& $scoper; - - if ( scoper_get_option( 'strip_private_caption' ) ) { - add_filter('the_title', array(&$this, 'flt_title'), 10, 3); - - if ( defined ('WPLANG') && WPLANG ) - add_filter('gettext', array(&$this, 'flt_gettext'), 10, 3); - } - - if ( defined('SCOPER_FILTER_COMMENT_COUNT') ) - add_filter('get_comments_number', array(&$this, 'flt_get_comments_number') ); // this filter should pass post_id as 2nd arg, but does not as of WP 2.7 - - if ( awp_is_plugin_active('events-calendar') ) - add_filter( 'query', array(&$this, 'ec_getDaysEvents') ); - - if ( awp_is_plugin_active('eventcalendar3') ) - add_filter( 'query', array(&$this, 'ec3_query') ); - } - - function ec_getDaysEvents( $query ) { - if ( strpos( $query, 'eventscalendar_main') ) { - static $busy; - - // IMPORTANT: don't execute recursively on db calls below - if ( empty($busy) ) { - $busy = true; - - global $wpdb; - static $post_id_in; // local buffer of readable post IDs which are related to any event - - if ( ! isset($post_id_in) ) { - $qry = "SELECT postID FROM {$wpdb->prefix}eventscalendar_main"; - $event_ids = scoper_get_col($qry); - $event_id_in = "'" . implode("','", $event_ids) . "'"; - - // now generate and execute a scoped query for readable/unpublished posts - $post_qry = "SELECT ID from $wpdb->posts WHERE 1=1 AND $wpdb->posts.ID IN ($event_id_in)"; - - // custom arguments to force inclusion of unpublished posts (only relationship to an unreadable published/private posts can make an event unreadable) - $force_statuses = array( 'published', 'private', 'draft', 'future', 'pending' ); - $reqd_caps = array(); - $reqd_caps['post'] = array( 'published' => array('read'), 'private' => array('read_private_posts'), 'draft' => array('read'), 'pending' => array('read'), 'future' => array('read') ); - - $post_qry = apply_filters( 'objects_request_rs', $post_qry, 'post', 'post', array('skip_teaser' => true, 'force_statuses' => $force_statuses, 'force_reqd_caps' => $reqd_caps) ); - $post_ids = scoper_get_col($post_qry); - $post_id_in = "'" . implode("','", $post_ids) . "'"; - } - - $id_clause = "( `postID` IS NULL OR `postID` IN ( $post_id_in ) ) AND"; - $table_name = $wpdb->prefix . 'eventscalendar_main'; - $query = str_replace("SELECT * FROM `$table_name` WHERE ", "SELECT * FROM `$table_name` WHERE $id_clause ", $query); - - $busy = false; - } - } - - return $query; - } - - function ec3_query( $query ) { - if ( strpos( $query, 'ec3_schedule') ) { - global $wpdb; - - // filter calendar item query from ec3_util_calendar_days() - if ( strpos( $query, "FROM $wpdb->posts,{$wpdb->prefix}ec3_schedule") ) { - $where = apply_filters( 'objects_where_rs', '', 'post', 'post', array('skip_teaser' => true) ); - - $query = str_replace( "AND post_type='post'", '', $query ); - $query = str_replace( "WHERE post_status='publish'", "WHERE 1=1 $where", $query ); - } - - // filter event listing query from ec3_get_events() - if ( strpos( $query, "FROM {$wpdb->prefix}ec3_schedule s" ) && strpos( $query, "LEFT JOIN $wpdb->posts p") ) { - $where = apply_filters( 'objects_where_rs', '', 'post', 'post', array( 'source_alias' => 'p', 'skip_teaser' => true) ); - $query = str_replace( "WHERE p.post_status='publish'", "WHERE 1=1 $where", $query ); - } - } - - return $query; - } - - function flt_title($title) { - if ( 0 === strpos( $title, 'Private: ' ) || 0 === strpos( $title, 'Protected: ' ) ) - $title = substr( $title, strpos( $title, ':' ) + 2 ); - - return $title; - } - - function flt_gettext($translated_text, $orig_text) { - if ( ( 'Private: %s' == $orig_text ) || ( 'Protected: %s' == $orig_text ) ) - $translated_text = '%s'; - - return $translated_text; - } - - /* note: This should not be necessary unless the stored comment count is invalid. - - Front-end comment count will not be run through this filter unless the following line is added to wp-config.php: - define( 'SCOPER_FILTER_COMMENT_COUNT', true ); - */ - function flt_get_comments_number($count) { - global $wpdb; - global $id; // get_comments_number should pass post_id as 2nd arg, but does not as of WP 2.7 - static $last_id; - static $last_count; - - if ( isset($last_count) && ( $id == $last_id ) ) - return $last_count; - - $query = "SELECT COUNT( DISTINCT(comment_ID) ) FROM $wpdb->comments" - . " INNER JOIN $wpdb->posts ON {$wpdb->posts}.ID = {$wpdb->comments}.comment_post_ID" - . " WHERE comment_approved = '1' AND comment_post_ID = '$id'"; - - $count = scoper_get_var( $query ); - - $last_id = $id; - $last_count = $count; - - return $count; - } -} - -function is_teaser_rs( $id = '' , $src_name = 'post' ) { - global $scoper; - - if ( empty($scoper) || ( is_home() && is_single() ) ) - return false; - - if ( ! $id && ( 'post' == $src_name ) ) { - global $post; - - if ( empty($post->ID) ) - return false; - - $id = $post->ID; - } - - return ( isset( $scoper->teaser_ids[$src_name][$id] ) ); -} - - -function is_restricted_rs( $id = '', $src_name = 'post', $op_type = 'read', $scope_criteria = '' ) { - global $scoper; - - if ( empty($scoper) || ( is_home() && is_single() && ! $id ) ) - return false; - - if ( ( 'post' == $src_name ) && ! $id ) { - global $post; - - if ( ! isset($post->ID) ) - return false; - - $id = $post->ID; - } - - $listed_ids = ( is_single() || is_page() ) ? array( $id => true ) : array(); - - require_once('role_usage_rs.php'); - $role_usage = new Role_Usage_RS(); - $role_usage->determine_role_usage_rs($src_name, $listed_ids); - - if ( 'object' == $scope_criteria ) - return ( isset( $scoper->objscoped_ids[$src_name][$id][$op_type] ) ); - elseif ( 'term' == $scope_criteria ) - return ( isset( $scoper->termscoped_ids[$src_name][$id][$op_type] ) ); - else - return ( isset( $scoper->restricted_ids[$src_name][$id][$op_type] ) ); -} - -// legacy -function is_exclusive_rs( $id = '', $src_name = 'post', $op_type = 'read', $scope_criteria = '' ) { - return is_restricted_rs( $id, $src_name, $op_type, $scope_criteria ); -} - - -if ( ! function_exists( 'is_protected') ) { - // wrapper to support existing themes which used the Disclose Secret plugin - function is_protected($post_id = NULL) { - return is_restricted_rs($post_id); - } -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/templates/teaser_login.php b/blog/wp-content/plugins/role-scoper/templates/teaser_login.php deleted file mode 100644 index 03db497..0000000 --- a/blog/wp-content/plugins/role-scoper/templates/teaser_login.php +++ /dev/null @@ -1,29 +0,0 @@ -'; - $output .= '

    '; - $output .= '

    '; - $output .= '

    '; - $output .= '

    '; - $output .= ''; -$output .= ''; - -$output .= '

    '; - if (get_option('users_can_register')) - $output .= ''.__('Register', 'user-access-manager').'
    '; - $output .= ''. __('Lost your password?', 'user-access-manager').''; -$output .= '

    '; - - - return $content; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/uploads_rs.php b/blog/wp-content/plugins/role-scoper/uploads_rs.php deleted file mode 100644 index 1c50947..0000000 --- a/blog/wp-content/plugins/role-scoper/uploads_rs.php +++ /dev/null @@ -1,40 +0,0 @@ - $dir, 'url' => $url, 'subdir' => '', 'basedir' => $dir, 'baseurl' => $url, 'error' => false ) ); - - $upload_info = array_intersect_key( $uploads, array( 'basedir' => true, 'baseurl' => true ) ); - - return $upload_info; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/user-plug_rs.php b/blog/wp-content/plugins/role-scoper/user-plug_rs.php deleted file mode 100644 index acaa139..0000000 --- a/blog/wp-content/plugins/role-scoper/user-plug_rs.php +++ /dev/null @@ -1,68 +0,0 @@ -ID) ) - return $current_user; - - // As of WP 2.5, wp_set_current_user fires once (with user_id 0) before global $wp_roles is set, - // then again with $wp_roles and user_id set - if ( ! $id && ! $name && is_admin() ) - return $current_user; - - scoper_version_check(); - - if ( $id || ( $name && get_userdatabylogin($name) ) ) - require_once('scoped-user.php'); - else - require_once('scoped-user_anon.php'); - - //log_mem_usage_rs( 'required scoped-user.php' ); - - $current_user = new WP_Scoped_User($id, $name); - - //log_mem_usage_rs( 'new WP_Scoped_User' ); - - // from default wp_set_current_user: Setup global user vars. Used by WP set_current_user() for back compat. - global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; - - if ( ! empty($current_user->ID) ) { - $userdata = $current_user->data; - $user_login = $current_user->user_login; - $user_level = (int) isset($current_user->user_level) ? $current_user->user_level : 0; - $user_ID = (int) $current_user->ID; - $user_email = $current_user->user_email; - $user_url = $current_user->user_url; - $user_pass_md5 = md5($current_user->user_pass); - $user_identity = $current_user->display_name; - } - - do_action('set_current_user'); - do_action('set_current_scoped_user'); - - return $current_user; -} -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/users-interceptor_rs.php b/blog/wp-content/plugins/role-scoper/users-interceptor_rs.php deleted file mode 100644 index 38a752d..0000000 --- a/blog/wp-content/plugins/role-scoper/users-interceptor_rs.php +++ /dev/null @@ -1,983 +0,0 @@ -scoper =& $scoper; - - // ---------------- HANDLERS for ROLE SCOPER HOOKS --------------- - // - // args: ($where, $reqd_caps='', $object_src_name, $object_id='') - // Note: If any of the optional args are missing or nullstring, an attempt is made - // to determine them from URI based on Scoped_DataSource properties - add_filter('users_request_rs', array(&$this, 'flt_users_request'), 50, 5); - } - - function get_all_terms_count($taxonomy) { - if ( ! isset($this->scoper->all_terms_count[$taxonomy]) ) - $this->scoper->all_terms_count[$taxonomy] = $this->scoper->get_terms($taxonomy, UNFILTERED_RS, COL_COUNT_RS); - - return $this->scoper->all_terms_count[$taxonomy]; - } - - // if an src_name and object_id are provided, returns all roles which require object assignment for that object - // otherwise, returns all roles which require object assignment for any object - // - // returns array[rolename] = 1 - // OR (if rolename specified) - // returns boolean - function get_objscope_roles($src_name, $object_id, $role_handle = '') { - static $objscope_objects; - - if ( ! isset($objscope_objects) ) - $objscope_objects = array(); - - $objscope_roles = array(); - $args = array( 'id' => $object_id ); - - if ( $objscope_objects = $this->scoper->get_restrictions(OBJECT_SCOPE_RS, $src_name, $args) ) { - - if ( $role_handle ) - $role_handles = (array) $role_handle; - else { - $role_handles = array(); - if ( isset($objscope_objects['restrictions']) ) - $role_handles = array_keys($objscope_objects['restrictions']); - - if ( isset($objscope_objects['unrestrictions']) ) - $role_handles = array_merge( $role_handles, array_keys($objscope_objects['unrestrictions']) ); - } - - foreach ( $role_handles as $this_role_handle ) - // If a restriction is set for this object and role, - // OR if the role is default-restricted with no unrestriction for this object... - if ( isset($objscope_objects['restrictions'][$this_role_handle][$object_id]) - || ( isset($objscope_objects['unrestrictions'][$this_role_handle]) && is_array($objscope_objects['unrestrictions'][$this_role_handle]) && ! isset($objscope_objects['unrestrictions'][$this_role_handle][$object_id]) ) ) { - $objscope_roles[$this_role_handle] = 1; - } - } - - return $objscope_roles; - } - - // $term_roles[role_handle] = 1 - // $taxonomies = array of taxonomy_names - // $object_terms[taxonomy_name] = array of term_ids - function get_unrestricted_term_roles($term_roles, $taxonomies, $object_id, $object_terms = '') { - $taxonomies = array_intersect($taxonomies, $this->scoper->taxonomies->get_all_keys()); - - if ( ! $taxonomies ) - return false; - - if ( $object_id && ! is_array($object_terms) ) - $object_terms = array(); - - $loose_terms = array(); - $all_terms_count = array(); - - $any_strict_taxonomy = false; - foreach ($taxonomies as $taxonomy) - if ( $this->scoper->taxonomies->member_property($taxonomy, 'requires_term') ) { - $any_strict_taxonomy = true; - break; - } - - if ( ! $any_strict_taxonomy ) - return $term_roles; - - foreach ( $taxonomies as $taxonomy ) { - - if ( $object_id ) { - // Determine whether any of this object's terms blend in blog_roles - if ( ! isset($object_terms[$taxonomy]) ) - $object_terms[$taxonomy] = $this->scoper->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS, $object_id); - - $strict_terms = $this->scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy ); - - //dump($object_terms[$taxonomy]); - //dump($strict_terms); - - foreach ( array_keys($term_roles) as $role_handle ) { - if ( isset($strict_terms['unrestrictions'][$role_handle]) ) { - // role is default restricted, so note if any of its terms have an unrestriction set - if ( array_intersect($object_terms[$taxonomy], array_keys($strict_terms['unrestrictions'][$role_handle]) ) ) - $loose_terms[$role_handle] = 1; - - } else { - // role is default unrestricted, so note if none of its terms have a restriction set - if ( empty($strict_terms['restrictions'][$role_handle]) - || ! array_intersect($object_terms[$taxonomy], array_keys($strict_terms['restrictions'][$role_handle]) ) ) - $loose_terms[$role_handle] = 1; - } - } - - //dump($loose_terms); - - } else { - // Request is not object-specific. Determine whether any terms blend in blog_roles - $args = array(); - $args['cols'] = COL_COUNT_RS; - $strict_count = $this->scoper->get_restrictions(TERM_SCOPE_RS, $taxonomy, $args); - $all_terms_count = $this->get_all_terms_count($taxonomy); - - foreach ( array_keys($term_roles) as $role_handle ) { - if ( ! empty($strict_count['unrestrictions'][$role_handle]) - || empty($strict_count['restrictions'][$role_handle]) || ( $strict_count['restrictions'][$role_handle] < $all_terms_count ) ) - $loose_terms[$role_handle] = 1; - } - } - - // if all term_roles are already known loose, no need to check any other taxonomies - if ( $loose_terms ) - if ( ! array_diff_key($term_roles, $loose_terms) ) - return $term_roles; - } // end foreach taxonomies - - return $loose_terms; - } - - // if an object_id is provided, object_src_name must also be included - function flt_users_where($where, $reqd_caps = '', $object_src_name = '', $object_id = '', $args = '') { - if ( ! USER_ROLES_RS && ! GROUP_ROLES_RS ) - return $where; - - global $wpdb; - static $stored_owner_id; - - if ( ! isset($stored_owner_id) ) - $stored_owner_id = array(); - - $defaults = array('use_term_roles' => 1, 'use_blog_roles' => 1, 'skip_object_roles' => 0, 'querying_groups' => 0, - 'ignore_group_roles' => false, 'ignore_user_roles' => false, 'object_type' => '', - 'objscope_roles' => '', 'preserve_or_clause' => '', 'enforce_duration_limits' => true, 'enforce_content_date_limits' => true ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - // Default to not honoring custom user caps, but support option - $custom_user_blogcaps = SCOPER_CUSTOM_USER_BLOGCAPS; - - // if reqd_caps are missing, try to determine context from URI - if ( ! $reqd_caps ) - return $where; // no basis for filtering without required caps - - if ( ! is_array($reqd_caps) ) - $reqd_caps = array($reqd_caps); - - // if rolenames are intermingled with caps in reqd_caps array, convert them to caps - $reqd_caps = $this->scoper->role_defs->role_handles_to_caps($reqd_caps, true); //arg: also check for unprefixed WP rolenames - - if ( $object_id && ! $object_src_name ) - $object_id = 0; - - if ( $object_id ) { - foreach ( $reqd_caps as $cap_name ) { - if ( $meta_caps = map_meta_cap_rs($cap_name, -1, $object_id) ) { - $reqd_caps = array_diff( $reqd_caps, array($cap_name) ); - $reqd_caps = array_unique( array_merge( $reqd_caps, $meta_caps ) ); - } - } - - if ( 'post' == $object_src_name && ( $use_term_roles || $use_blog_roles ) ) { - if ( $post = get_post( $object_id ) ) - $object_date_gmt = $post->post_date_gmt; - } else - $object_date_gmt = ''; - } - - $owner_has_all_caps = true; // IMPORTANT: set this false downstream as appropriate - $rs_where = array(); - - // Group the required caps by object type (as defined by $scoper->cap_defs). - // The 2nd arg causes caps without an otype association to be included with a nullstring src_name key - // The 3rd arg forces caps with a data source other than $object_src to be also lumped in with sourceless caps - // $caps_by_otype[src_name][object_type] = array of cap names - $caps_by_otype = $this->scoper->cap_defs->organize_caps_by_otype($reqd_caps, true, $object_src_name, $object_type); - - foreach ( $caps_by_otype as $src_name => $otypes ) { - // Cap reqs that pertain to other data sources or have no data source association - // will only be satisfied by blog roles. - $args['use_term_roles'] = $use_term_roles && ( $src_name == $object_src_name ); - $args['skip_object_roles'] = $skip_object_roles || ( $src_name != $object_src_name ); - - $this_src_object_id = ( $src_name == $object_src_name ) ? $object_id : 0; - - if ( $src_name ) { - if ( ! $src = $this->scoper->data_sources->get($src_name) ) - continue; - - if ( $this_src_object_id && $args['use_term_roles'] && ! empty($src->uses_taxonomies) ) { - $args['object_terms'] = array(); - foreach ( $src->uses_taxonomies as $taxonomy ) - $args['object_terms'][$taxonomy] = $this->scoper->get_terms($taxonomy, UNFILTERED_RS, COL_ID_RS, $this_src_object_id); - } - } - - foreach ( $otypes as $object_type => $this_otype_caps ) { - $qry_roles = array(); - - $args['use_term_roles'] = $args['use_term_roles'] && scoper_get_otype_option( 'use_term_roles', $src_name, $object_type ); - - //$caps_by_op = $this->scoper->cap_defs->organize_caps_by_op($this_otype_caps, true); //arg: retain caps which are not scoper-defined - //foreach ( $caps_by_op as $op => $this_op_caps ) { - foreach ( $this_otype_caps as $cap_name ) { - // If supporting custom user blogcaps, a separate role clause for each cap - // Otherwise (default) all reqd_caps from one role assignment (whatever scope it may be) - if ( $custom_user_blogcaps ) { - $reqd_caps_arg = array($cap_name); - } else { - $reqd_caps_arg = $this_otype_caps; - $cap_name = ''; - } - - // 'blog' argument forces inclusion of qualifying WP roles even if scoping with RS roles - // (will later strip out non-scopable roles for term role / object role clauses) - $args['roles'] = $this->scoper->role_defs->qualify_roles($reqd_caps_arg, array('rs', 'wp'), '', array( 'all_wp_caps' => true ) ); - - if ( $args['roles'] || ! $src_name ) { - if ( USER_ROLES_RS && ! $ignore_user_roles ) - $qry_roles[$cap_name]['general'][ROLE_BASIS_USER] = $this->users_queryroles($reqd_caps_arg, $src_name, $this_src_object_id, $args ); - - if ( GROUP_ROLES_RS && ! $ignore_group_roles ) { - $qry_roles[$cap_name]['general'][ROLE_BASIS_GROUPS] = $this->users_queryroles($reqd_caps_arg, $src_name, $this_src_object_id, $args ); - } - } - - // potentially, a separate set of role clauses for object owner - if ( $this_src_object_id && $src->cols->owner ) { - $owner_needs_caps = $this->scoper->cap_defs->remove_owner_caps($reqd_caps_arg); //returns array of caps the owner needs, after removing which are credited to owners automatically - - if ( $owner_needs_caps ) - $owner_has_all_caps = false; - - if ( $owner_needs_caps != $reqd_caps_arg ) { - if ( ! isset($stored_owner_id[$src_name][$this_src_object_id]) ) // DON'T initialize this at top of function - $stored_owner_id[$src_name][$this_src_object_id] = scoper_get_var("SELECT {$src->cols->owner} from $src->table WHERE {$src->cols->id} = '$object_id' LIMIT 1"); - - if ( $stored_owner_id[$src_name][$this_src_object_id] ) { - $owner_roles = $this->scoper->role_defs->qualify_roles($owner_needs_caps); - if ( $args['roles'] = array_diff_key($owner_roles, $args['roles']) ) { // if owners (needing fewer caps) qualify under different roles than other users: - - if ( GROUP_ROLES_RS && ! $ignore_group_roles ) { - if ( ! isset($owner_groups) ) - $owner_groups = WP_Scoped_User::get_groups_for_user( $stored_owner_id[$src_name][$this_src_object_id] ); - //$owner_groups = scoper_get_col("SELECT $wpdb->user2group_gid_col from $wpdb->user2group_rs WHERE $wpdb->user2group_uid_col = '{$stored_owner_id[$src_name][$this_src_object_id]}'"); - - if ( $owner_groups ) - $qry_roles[$cap_name]['owner'][ROLE_BASIS_GROUPS] = $this->users_queryroles($owner_needs_caps, $src_name, $this_src_object_id, $args); - } - - if ( USER_ROLES_RS && ! $ignore_user_roles ) - $qry_roles[$cap_name]['owner'][ROLE_BASIS_USER] = $this->users_queryroles($owner_needs_caps, $src_name, $this_src_object_id, $args); - - } // endif owner needs any caps assigned by role - } //endif stored owner_id found - } // endif any required caps are automatically granted to owner - } // endif request is for a specific object from a data source which stores owner_id - - // If not supporting custom blogcaps, we actually passed all of this object type's caps together - if ( ! $custom_user_blogcaps ) - break; - } // end foreach this_otype_caps - - - //d_echo ('scope data'); - //dump($qry_roles); - - // ------------ Construct this object type's where clause from $qry_roles: ----------------- - // ( note: if custom user blogcaps are not enabled, all roles stored into one cap_name dimension ) - // $qry_roles[cap_name][general/owner][user/groups]['object'][''] = array of role handles - // $qry_roles[cap_name][general/owner][user/groups]['term'][taxonomy] = array of role handles - // $qry_roles[cap_name][general/owner][user/groups]['blog'][role_type] = array of role handles - - // now construct the query for this iteration's operation type - $table_aliases = array( ROLE_BASIS_USER => 'uro', ROLE_BASIS_GROUPS => 'gro' ); - $SCOPER_ROLE_TYPE = SCOPER_ROLE_TYPE; - - if ( ! empty($stored_owner_id) && $owner_has_all_caps && USER_ROLES_RS && ! $ignore_user_roles ) - $ot_where['owner'][ROLE_BASIS_USER] = "uro.user_id = '$stored_owner_id'"; - - foreach ( $qry_roles as $cap_name => $user_types ) { // note: default is to put qualifying roles from all reqd_caps into a single "cap_name" element - $ot_where = array(); - - foreach ( $user_types as $user_type => $role_bases ) { - foreach ( $role_bases as $role_basis => $scopes ) { - - $alias = $table_aliases[$role_basis]; - - $content_date_comparison = ( $enforce_content_date_limits && ! empty($object_date_gmt) ) ? "'$object_date_gmt'" : ''; - $duration_clause = scoper_get_duration_clause( $content_date_comparison, $alias, $enforce_duration_limits ); // arg: skip duration clause - - foreach ( $scopes as $scope => $keys ) { - foreach ( $keys as $key => $role_names ) { - if ( empty($role_names) ) - continue; - - $role_in = "'" . implode("','", $role_names ) . "'"; - - switch ( $scope ) { - case OBJECT_SCOPE_RS: - $id_clause = ( $object_id ) ? "AND $alias.obj_or_term_id = '$object_id'" : ''; - $ot_where[$user_type][$role_basis][$scope][$key] = "$alias.scope = 'object' AND $alias.assign_for IN ('entity', 'both') AND $alias.src_or_tx_name = '$src_name' AND $alias.role_type = '$SCOPER_ROLE_TYPE' AND $alias.role_name IN ($role_in) $duration_clause $id_clause"; - break; - case TERM_SCOPE_RS: - $terms_clause = ( $object_id && $args['object_terms'][$key] ) ? "AND $alias.obj_or_term_id IN ('" . implode( "', '", $args['object_terms'][$taxonomy] ) . "')" : ''; - $ot_where[$user_type][$role_basis][$scope][$key] = "$alias.scope = 'term' AND $alias.assign_for IN ('entity', 'both') AND $alias.src_or_tx_name = '$key' $terms_clause AND $alias.role_type = '$SCOPER_ROLE_TYPE' AND $alias.role_name IN ($role_in) $duration_clause"; - break; - case BLOG_SCOPE_RS: - $ot_where[$user_type][$role_basis][$scope][$key] = "$alias.scope = 'blog' AND $alias.role_type = '$key' AND $alias.role_name IN ($role_in) $duration_clause"; - break; - } // end scope switch - } // end foreach key - - if ( ! empty($ot_where[$user_type][$role_basis][$scope]) ) // [key 1 clause] [OR] [key 2 clause] [OR] ... - $ot_where[$user_type][$role_basis][$scope] = agp_implode(' ) OR ( ', $ot_where[$user_type][$role_basis][$scope], ' ( ', ' ) '); - } // end foreach scope - - if ( ! empty($ot_where[$user_type][$role_basis]) ) { // [object scope clauses] [OR] [taxonomy scope clauses] [OR] [blog scope clauses] - $ot_where[$user_type][$role_basis] = agp_implode(' ) OR ( ', $ot_where[$user_type][$role_basis], ' ( ', ' ) '); - - if ( 'owner' == $user_type ) { - switch ( $role_basis ) { - case ROLE_BASIS_GROUPS: - $ot_where[$user_type][$role_basis] .= "AND gro.group_id IN ('" . implode("', '", $owner_groups) . "')"; - break; - case ROLE_BASIS_USER: - $ot_where[$user_type][$role_basis] .= "AND uro.user_id = '$stored_owner_id'"; - } // end role basis switch - } // endif owner - } // endif any role clauses for this user_type/role_basis - } // end foreach role basis (user or groups) - - if ( ! empty($ot_where[$user_type]) ) // [group role clauses] [OR] [user role clauses] - $ot_where[$user_type] = agp_implode(' ) OR ( ', $ot_where[$user_type], ' ( ', ' ) '); - } // end foreach user type (general or owner) - - if ( ! empty($ot_where) ) // [general user clauses] [OR] [owner clauses] - $rs_where[$src_name][$object_type][$cap_name] = agp_implode(' ) OR ( ', $ot_where, ' ( ', ' ) '); - - } // end foreach cap name (for optional support of custom user blogcaps) - - if ( ! empty($rs_where[$src_name][$object_type]) ) // [cap1 clauses] [AND] [cap2 clauses] - $rs_where[$src_name][$object_type] = agp_implode(' ) AND ( ', $rs_where[$src_name][$object_type], ' ( ', ' ) '); - } // end foreach otypes - - if ( isset( $rs_where[$src_name]) ) { // object_type1 clauses [AND] [object_type2 clauses] [AND] ... - $rs_where[$src_name] = agp_implode(' ) AND ( ', $rs_where[$src_name], ' ( ', ' ) '); - } - - //if ( isset($rs_where[$src_name]) && is_array($rs_where[$src_name]) ) { // user basis clause [OR] groups basis clause ... - // $rs_where[$src_name] = agp_implode(' ) OR ( ', $rs_where[$src_name], ' ( ', ' ) '); - //} - } // end foreach data source - - // data_source 1 clauses [AND] [data_source 2 clauses] [AND] ... - $rs_where = agp_implode(' ) AND ( ', $rs_where, ' ( ', ' ) '); - - if ( $rs_where ) { - if ( false !== strpos($where, $rs_where) ) - return $where; - - if ( ! empty($preserve_or_clause) ) - $rs_where = "( ( $rs_where ) OR ( $preserve_or_clause ) )"; - - if ( $where ) - $where = " AND ( $rs_where ) $where"; - else - $where = " AND $rs_where"; - - } else { - // if no valid role clauses were constructed, required caps are invalid; no users can do it - $where = ' AND 1=2'; - } - - return $where; - } // end function flt_users_where - - - function users_queryroles ($reqd_caps, $src_name, $object_id = '', $args = '') { - $defaults = array('roles' => '', 'user' => '', 'querying_groups' => 0, - 'use_term_roles' => 1, 'use_blog_roles' => 1, 'skip_object_roles' => false, - 'ignore_strict_terms' => 0, 'object_terms' => array(), 'object_type' => '', - 'objscope_roles' => '', 'any_object' => false ); - - $args = array_merge( $defaults, (array) $args ); - extract($args); - - $src = $this->scoper->data_sources->get($src_name); - - // ---- The following default argument generation is included to support potential direct usage of this function - // (not needed for flt_users_where call ----------------- - - // Treat empty reqd_caps array as an error - if ( empty ($reqd_caps) ) - return array(); - - if ( ! is_array($reqd_caps) ) - $reqd_caps = array($reqd_caps); - - // Calling function may save us a little work if it has already made this call - if ( ! $roles ) { - if ( ! $roles = $this->scoper->role_defs->qualify_roles($reqd_caps, array('rs', 'wp') ) ) - return array(); - - } elseif ( ! is_array($roles) ) - $roles = array($roles); - - // this set of reqd_caps cannot be satisfied by any role, either WP-defined or (if scoping with RS roles) RS-defined - if ( ! $reqd_caps && ! $roles ) - return; - - if ( $object_id && ! $src_name ) - $object_id = 0; - // ----------------------------------------------------------------------------------- - - - // Default to not honoring custom user caps, but support option - $custom_user_blogcaps = SCOPER_CUSTOM_USER_BLOGCAPS; - - if ( 'rs' == SCOPER_ROLE_TYPE ) { - if ( ! $object_type ) { - $object_types = $this->scoper->cap_defs->object_types_from_caps($reqd_caps); - - if ( count($object_types) == 1 ) { - $src_name = key($object_types); - - if ( (count($object_types[$src_name]) == 1) && key($object_types[$src_name]) ) - $object_type = key($object_types[$src_name]); - else - $object_type = $this->scoper->data_sources->detect('type', $src, $object_id); - } - } - - // RS roles are object type-specific - $roles_wp = $this->scoper->role_defs->filter_roles_by_type($roles, 'wp'); - - $roles_rs = $this->scoper->role_defs->filter_roles_by_type($roles, 'rs'); - $this_otype_roles = $this->scoper->role_defs->get_matching('rs', $src_name, $object_type); - $roles_rs = array_intersect_key($roles_rs, $this_otype_roles); - - $roles = array_merge($roles_rs, $roles_wp); - } - - $qualifying_roles = array(); - - // --------- ACCOUNT FOR OBJECT ROLES ----------- - // If this set of reqd_caps can be satisfied by a scopable role, check for object role assignements - if ( ! $skip_object_roles && ( $object_id || $any_object ) ) { - - // exclude roles which have never been assigned to any object - if ( $object_roles = $this->scoper->role_defs->qualify_object_roles($reqd_caps, $object_type) ) - $qualifying_roles[OBJECT_SCOPE_RS][''] = scoper_role_handles_to_names(array_keys($roles)); - } - - // If this inquiry is for a particular object, find out which roles must be object-assigned for it - if ( $object_id ) { - // For term and blog role clauses, exclude roles which require object assignment for that object - // But don't disqualify a role if any of the roles it "contains" also qualify and are not object-scoped. - // (i.e. If the required caps are satisfied by admin, editor and contributor, the actual minimum requirement - // is contributor. A specification that admin and editor roles "require object assignment" does not apply - // in this scenario. - if ( ! is_array($objscope_roles) ) - $objscope_roles = $this->get_objscope_roles($src_name, $object_id, '', true); - - if ( $objscope_roles ) { - $contained_roles = array(); - $roles_wp = $this->scoper->role_defs->filter_roles_by_type($roles, 'wp'); - - foreach ( array_keys($roles_wp) as $role_handle ) { - if ( 'rs' == SCOPER_ROLE_TYPE ) - // If scoping with RS roles, this will also have the effect of disqualifying a WP blog role if all of the qualifying RS roles it contains are objscoped. - $contained_roles[$role_handle] = $this->scoper->role_defs->get_contained_roles( $role_handle, false, 'rs' ); - else - $contained_roles[$role_handle] = $this->scoper->role_defs->get_contained_roles( $role_handle, true, 'wp' ); //true: include this role in return array - - $contained_roles[$role_handle] = array_intersect_key($contained_roles[$role_handle], $roles); - - if ( ! array_diff_key( $contained_roles[$role_handle], $objscope_roles ) ) - unset ($roles[$role_handle]); - } - - foreach ( array_keys($roles) as $role_handle ) { - $contained_roles[$role_handle] = $this->scoper->role_defs->get_contained_roles( $role_handle, true, SCOPER_ROLE_TYPE ); //true: include this role in return array - - $contained_roles[$role_handle] = array_intersect_key($contained_roles[$role_handle], $roles); - - if ( ! array_diff_key( $contained_roles[$role_handle], $objscope_roles ) ) - unset ($roles[$role_handle]); - } - } - } - - // --------- ACCOUNT FOR TERM ROLES ----------- - // Consider term scope settings and role assignments - // - if ( $use_term_roles && $src_name && $roles && ! empty($src->uses_taxonomies) ) { - - // If scoping with RS roles, strip out WP role definitions (which were included for blogrole clause) - $var = SCOPER_ROLE_TYPE; - $term_roles = ( 'rs' == SCOPER_ROLE_TYPE ) ? $this->scoper->role_defs->filter_roles_by_type($roles, 'rs') : $roles; - - if ( $term_roles ) - foreach ( $src->uses_taxonomies as $taxonomy ) - // include users with a sufficient term role assignment in any term - $qualifying_roles[TERM_SCOPE_RS][$taxonomy] = scoper_role_handles_to_names(array_keys($term_roles)); - - // Honor blog-wide assignment of any non-objscope role, but only if at least one term - // is not "strict" (i.e. merges blogroles into term-specific assignments). - if ( ! $ignore_strict_terms ) { - $term_roles = $this->get_unrestricted_term_roles($term_roles, $src->uses_taxonomies, $object_id, $object_terms); - - // If scoping with RS roles, disqualify a WP blog role if all of the qualifying RS roles it contains were excluded by the strict terms filter. - if ( ('rs' == SCOPER_ROLE_TYPE) ) { - if ( $roles_wp = $this->scoper->role_defs->filter_roles_by_type($roles, 'wp') ) { - $contained_roles = array(); - foreach ( array_keys($roles_wp) as $role_handle ) { - $contained_roles[$role_handle] = $this->scoper->role_defs->get_contained_roles( $role_handle, false, 'rs' ); - $contained_roles[$role_handle] = array_intersect_key($contained_roles[$role_handle], $roles); - - if ( ! $term_roles || ! $contained_roles[$role_handle] || ! array_intersect_key( $contained_roles[$role_handle], $term_roles ) ) - unset ($roles[$role_handle]); - } - } - } - - $roles_current = $this->scoper->role_defs->filter_roles_by_type($roles, SCOPER_ROLE_TYPE); - foreach ( array_keys($roles_current) as $role_handle ) - if ( ! isset($term_roles[$role_handle]) ) - unset ($roles[$role_handle]); // Since this term role is restricted for all terms, prevent corresponding blog role from being added to qualifying_roles array by subsequent code - } - } - - // --------- ACCOUNT FOR BLOG ROLES ----------- - // For each qualifying role, recognize blog assignment if the reqd_caps set is not associated - // with a defined data source, if this source/object type does not use term roles, - // or if some of the the terms are not strict. - // - // Note that WP blogrole assignments (if not taxonomy or object-scoped) are honored - // regardless of Role Scoper role_type setting. - if ( $use_blog_roles ) { - if ( $admin_roles = awp_administrator_roles() ) - $roles = ( $roles ) ? array_merge($roles, $admin_roles) : $admin_roles; - - if ( $roles ) { - $role_types = array('rs', 'wp'); - foreach ( $role_types as $role_type ) { - //if ( ('rs' == $role_type) && ! RS_BLOG_ROLES ) // rs_blog_roles option has never been active in any RS release; leave commented here in case need arises - // continue; - - $this_type_roles = $this->scoper->role_defs->filter_roles_by_type($roles, $role_type); - $qualifying_roles[BLOG_SCOPE_RS] [$role_type] = scoper_role_handles_to_names(array_keys($this_type_roles)); - } - } - - if ( $custom_user_blogcaps && $use_blog_roles ) { - // If custom user blogcaps option is enabled, this function is called separately for each reqd cap. - // Custom user caps are stored as "hidden" single-cap role of type WP_CAP, sync'd to WP usermeta storage. - if ( $custom_user_blogcaps ) - $qualifying_roles[BLOG_SCOPE_RS] ['wp_cap'] = $reqd_caps; // ...which contains one cap - } - } - - return $qualifying_roles; - } - - - /** - * function UsersInterceptor_RS::users_who_can - * - * Get all users with required capabilities, applying scoped roles where pertinent. - * - * reqd_caps: array of capability names, or string value containing single capability name - * cols: enumeration COLS_ALL_RS, COL_ID_RS or COLS_ID_DISPLAYNAME_RS. Determines return array dimensions. - * object_src_name: object data source name as defined in $scoper->data_sources ( 'post' for posts OR pages ) - * object_id: array(reqd_cap => object_id), or string value containing single object_id - * - * Any WP-defined or RS-defined cap may be included to filter users on blog-wide capabilities. - * - * In addition, object-specific calls filter users for RS-defined caps based on - * Taxonomy/Object role assignment and role scoping requirements. - * Any reqd_caps lacking a Role Scoper definition are still tested for blog-wide users roles. - * - * returns query results: 1D array of user_ids for $cols = COL_ID_RS, otherwise 2D array with all user columns - */ - function users_who_can($reqd_caps, $cols = COLS_ALL_RS, $object_src_name = '', $object_id = 0, $args = '' ) { - global $wpdb; - - $defaults = array( 'where' => '', 'orderby' => '', 'disable_memcache' => false, 'group_ids' => '', 'force_refresh' => false, 'force_all_users' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - if ( ! $orderby && ( ( COLS_ALL_RS == $cols ) || ( COLS_ID_DISPLAYNAME_RS == $cols ) ) ) - $orderby = " ORDER BY display_name"; - - if ( COL_ID_RS == $cols ) { - if ( $force_all_users ) - $qry = "SELECT ID FROM $wpdb->users"; - else - $qry = "SELECT DISTINCT uro.user_id AS ID FROM $wpdb->user2role2object_rs AS uro"; - } else { - if ( COLS_ID_DISPLAYNAME_RS == $cols ) - $qcols = "$wpdb->users.ID, $wpdb->users.display_name"; - elseif ( COLS_ALL_RS == $cols ) - $qcols = "$wpdb->users.*"; - else - $qcols = $cols; - - $qry = "SELECT DISTINCT $qcols FROM $wpdb->users"; - $where = ''; - } - - if ( $reqd_caps || ! $force_all_users ) { - if ( COL_ID_RS != $cols ) - $qry .= " INNER JOIN $wpdb->user2role2object_rs AS uro ON uro.user_id = $wpdb->users.ID"; - - if ( ! is_array($args) ) - $args = array(); - - if ( isset($args['ignore_user_roles']) ) - unset($args['ignore_user_roles']); - - $do_groups = empty($args['ignore_group_roles']); - - $args['ignore_group_roles'] = 1; - - $args['enforce_duration_limits'] = scoper_get_option( 'role_duration_limits' ); - $args['enforce_content_date_limits'] = scoper_get_option( 'role_content_date_limits' ); - - //log_mem_usage_rs( 'before flt_users_where' ); - - $where = $this->flt_users_where($where, $reqd_caps, $object_src_name, $object_id, $args); - - //log_mem_usage_rs( 'flt_users_where' ); - } - - $id_clause = ( $force_all_users ) ? '' : 'AND uro.user_id > 0'; - - $qry = "$qry WHERE 1=1 $id_clause $where $orderby"; - - $qry_key = $qry . serialize($args); - - // if we've already run this query before, return the result - if ( empty($disable_memcache) && isset($this->scoper->user_cache[$qry_key]) ) - return $this->scoper->user_cache[$qry_key]; - - if ( COL_ID_RS == $cols ) - $users = scoper_get_col($qry); - else - $users = scoper_get_results($qry); - - //log_mem_usage_rs( 'users query' ); - - if ( ! empty($do_groups) ) { - if ( ! empty($args['preserve_or_clause']) && strpos($args['preserve_or_clause'], 'uro.') ) - unset($args['preserve_or_clause']); - - if ( ! empty($args['orderby']) ) - unset($args['orderby']); - - if ( empty($group_ids) ) { - $group_ids = $this->groups_who_can($reqd_caps, COL_ID_RS, $object_src_name, $object_id, $args); - } - - if ( ! empty($group_ids) ) { - if ( defined('ENABLE_PERSISTENT_CACHE') && ! defined('DISABLE_PERSISTENT_CACHE') ) { - // if persistent cache is enabled, use cached members list for each group instead of querying for all groups - foreach ( $group_ids as $group_id ) - if ( $group_members = ScoperAdminLib::get_group_members($group_id, $cols, true) ) - $users = array_merge( $users, $group_members ); - } else { - // avoid separate query for each group if persistent cache is not enabled - if ( $group_members = ScoperAdminLib::get_group_members($group_ids, $cols, true) ) - $users = array_merge( $users, $group_members ); - } - } - - if ( COL_ID_RS == $cols ) - $users = array_unique( $users ); - else - $users = agp_array_unique_md( $users ); - } - - $this->scoper->user_cache[$qry_key] = $users; - - //log_mem_usage_rs( 'end UsersInt::users_who_can' ); - - return $users; - } - - function groups_who_can($reqd_caps, $cols = COLS_ALL_RS, $object_src_name = '', $object_id = 0, $args = '' ) { - global $wpdb; - - $defaults = array( 'orderby' => '', 'disable_memcache' => false, 'force_refresh' => false ); - $args = array_merge( $defaults, (array) $args ); - extract($args); - - $role_type = SCOPER_ROLE_TYPE; - $cache_flag = "{$role_type}_groups_who_can"; - $cache_id = md5(serialize($reqd_caps) . $cols . 'src' . $object_src_name . 'id' . $object_id . serialize($args) ); - - if ( ! $force_refresh ) { - $groups = wpp_cache_get($cache_id, $cache_flag); - - if ( is_array($groups) ) - return $groups; - } - - if ( ! is_array($reqd_caps) ) - $reqd_caps = ($reqd_caps) ? array($reqd_caps) : array(); - - if ( ! $orderby && ( ( COLS_ALL_RS == $cols ) || ( COLS_ID_DISPLAYNAME_RS == $cols ) ) ) - $orderby = " ORDER BY display_name"; - - if ( ! is_array($args) ) - $args = array(); - - if ( isset($args['ignore_group_roles']) ) - unset($args['ignore_group_roles']); - - $args['ignore_user_roles'] = 1; - $args['querying_groups'] = 1; - - $where = $this->flt_users_where('', $reqd_caps, $object_src_name, $object_id, $args); - - if ( COL_ID_RS == $cols ) { - $qry = "SELECT DISTINCT group_id as ID FROM $wpdb->user2role2object_rs AS gro WHERE 1=1 $where AND gro.group_id > 0 $orderby"; - - $groups = scoper_get_col($qry); - } else { - $grp = $wpdb->groups_rs; - $qry = "SELECT DISTINCT $grp.{$wpdb->groups_id_col} AS ID, $grp.{$wpdb->groups_name_col} AS display_name, $grp.$wpdb->groups_descript_col as descript" - . " INNER JOIN $wpdb->user2group_rs as u2g ON u2g.{$wpdb->user2group_gid_col} = $grp.{$wpdb->groups_id_col}" - . " INNER JOIN $wpdb->user2role2object_rs AS gro ON $grp.{$wpdb->groups_id_col} = gro.group_id WHERE 1=1 $where $orderby"; - - $groups = scoper_get_results($qry); - } - - wpp_cache_set($cache_id, $groups, $cache_flag); - - return $groups; - } - -} - - - -/** - * Map meta capabilities to primitive capabilities (with option to disregard to current user if user_id === -1) - * - * This does not actually compare whether the user ID has the actual capability, - * just what the capability or capabilities are. Meta capability list value can - * be 'delete_user', 'edit_user', 'delete_post', 'delete_page', 'edit_post', - * 'edit_page', 'read_post', or 'read_page'. - * - * @since 2.0.0 - * - * @param string $cap Capability name. - * @param int $user_id User ID. - * @return array Actual capabilities for meta capability. - */ -function map_meta_cap_rs( $cap, $user_id ) { - $args = array_slice( func_get_args(), 2 ); - $caps = array(); - - // support usage by RS users_who_can function, which needs to remap meta caps to simple equivalent but builds owner cap adjustment into DB query - $adjust_for_user = ( -1 !== $user_id ); - - switch ( $cap ) { - case 'delete_user': - $caps[] = 'delete_users'; - break; - case 'edit_user': - if ( !isset( $args[0] ) || $user_id != $args[0] ) { - $caps[] = 'edit_users'; - } - break; - case 'delete_post': - if ( $adjust_for_user ) - $author_data = get_userdata( $user_id ); - - //echo "post ID: {$args[0]}
    "; - $post = get_post( $args[0] ); - if ( 'page' == $post->post_type ) { - $args = array_merge( array( 'delete_page', $user_id ), $args ); - return call_user_func_array( 'map_meta_cap_rs', $args ); - } - - if ( $adjust_for_user ) - $post_author_data = get_userdata( $post->post_author ); - - //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "
    "; - // If the user is the author... - if ( $adjust_for_user && ( $user_id == $post_author_data->ID ) ) { - // If the post is published... - if ( 'publish' == $post->post_status ) - $caps[] = 'delete_published_posts'; - else - // If the post is draft... - $caps[] = 'delete_posts'; - } else { - // The user is trying to edit someone else's post. - $caps[] = 'delete_others_posts'; - // The post is published, extra cap required. - if ( 'publish' == $post->post_status ) - $caps[] = 'delete_published_posts'; - elseif ( 'private' == $post->post_status ) - $caps[] = 'delete_private_posts'; - } - break; - case 'delete_page': - if ( $adjust_for_user ) - $author_data = get_userdata( $user_id ); - - //echo "post ID: {$args[0]}
    "; - $page = get_page( $args[0] ); - - if ( $adjust_for_user ) - $page_author_data = get_userdata( $page->post_author ); - - //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "
    "; - // If the user is the author... - if ( $adjust_for_user && ( $user_id == $page_author_data->ID ) ) { - // If the page is published... - if ( $page->post_status == 'publish' ) - $caps[] = 'delete_published_pages'; - else - // If the page is draft... - $caps[] = 'delete_pages'; - } else { - // The user is trying to edit someone else's page. - $caps[] = 'delete_others_pages'; - // The page is published, extra cap required. - if ( $page->post_status == 'publish' ) - $caps[] = 'delete_published_pages'; - elseif ( $page->post_status == 'private' ) - $caps[] = 'delete_private_pages'; - } - break; - // edit_post breaks down to edit_posts, edit_published_posts, or - // edit_others_posts - case 'edit_post': - if ( $adjust_for_user ) - $author_data = get_userdata( $user_id ); - - //echo "post ID: {$args[0]}
    "; - $post = get_post( $args[0] ); - if ( 'page' == $post->post_type ) { - $args = array_merge( array( 'edit_page', $user_id ), $args ); - return call_user_func_array( 'map_meta_cap_rs', $args ); - } - - if ( $adjust_for_user ) - $post_author_data = get_userdata( $post->post_author ); - - //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "
    "; - // If the user is the author... - if ( $adjust_for_user && ( $user_id == $post_author_data->ID ) ) { - // If the post is published... - if ( 'publish' == $post->post_status ) - $caps[] = 'edit_published_posts'; - else - // If the post is draft... - $caps[] = 'edit_posts'; - } else { - // The user is trying to edit someone else's post. - $caps[] = 'edit_others_posts'; - // The post is published, extra cap required. - if ( 'publish' == $post->post_status ) - $caps[] = 'edit_published_posts'; - elseif ( 'private' == $post->post_status ) - $caps[] = 'edit_private_posts'; - } - break; - case 'edit_page': - if ( $adjust_for_user ) - $author_data = get_userdata( $user_id ); - - //echo "post ID: {$args[0]}
    "; - $page = get_page( $args[0] ); - - if ( $adjust_for_user ) - $page_author_data = get_userdata( $page->post_author ); - - //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "
    "; - // If the user is the author... - if ( $adjust_for_user && ( $user_id == $page_author_data->ID ) ) { - // If the page is published... - if ( 'publish' == $page->post_status ) - $caps[] = 'edit_published_pages'; - else - // If the page is draft... - $caps[] = 'edit_pages'; - } else { - // The user is trying to edit someone else's page. - $caps[] = 'edit_others_pages'; - // The page is published, extra cap required. - if ( 'publish' == $page->post_status ) - $caps[] = 'edit_published_pages'; - elseif ( 'private' == $page->post_status ) - $caps[] = 'edit_private_pages'; - } - break; - case 'read_post': - $post = get_post( $args[0] ); - if ( 'page' == $post->post_type ) { - $args = array_merge( array( 'read_page', $user_id ), $args ); - return call_user_func_array( 'map_meta_cap_rs', $args ); - } - - if ( 'private' != $post->post_status ) { - $caps[] = 'read'; - break; - } - - if ( $adjust_for_user ) { - $author_data = get_userdata( $user_id ); - $post_author_data = get_userdata( $post->post_author ); - } - - if ( $adjust_for_user && ( $user_id == $post_author_data->ID ) ) - $caps[] = 'read'; - else - $caps[] = 'read_private_posts'; - break; - case 'read_page': - $page = get_page( $args[0] ); - - if ( 'private' != $page->post_status ) { - $caps[] = 'read'; - break; - } - - if ( $adjust_for_user ) { - $author_data = get_userdata( $user_id ); - $page_author_data = get_userdata( $page->post_author ); - } - - if ( $adjust_for_user && ( $user_id == $page_author_data->ID ) ) - $caps[] = 'read'; - else - $caps[] = 'read_private_pages'; - break; - default: - // If no meta caps match, return the original cap. - $caps[] = $cap; - } - - return apply_filters('map_meta_cap_rs', $caps, $cap, $user_id, $args); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/wp_root_optional/rs_cache_flush.php b/blog/wp-content/plugins/role-scoper/wp_root_optional/rs_cache_flush.php deleted file mode 100644 index 1722db9..0000000 --- a/blog/wp-content/plugins/role-scoper/wp_root_optional/rs_cache_flush.php +++ /dev/null @@ -1,61 +0,0 @@ -
    '; - return; - } -} - -$dir = rtrim($dir, DIRECTORY_SEPARATOR); - -$top_dir = $dir; -$stack = array($dir); -$index = 0; -$flushed = false; - -while ($index < count($stack)) { - # Get indexed directory from stack - $dir = $stack[$index]; - - $dh = @ opendir($dir); - if (!$dh) { - echo "Error opening cache directory ($dir).

    Do you need to edit rs_cache_flush.php for a custom WP_CONTENT_DIR?"; - return; - } - - while (($file = @ readdir($dh)) !== false) { - if ($file == '.' or $file == '..') - continue; - - if (@ is_dir($dir . DIRECTORY_SEPARATOR . $file)) - $stack[] = $dir . DIRECTORY_SEPARATOR . $file; - else if (@ is_file($dir . DIRECTORY_SEPARATOR . $file)) { - @ unlink($dir . DIRECTORY_SEPARATOR . $file); - $flushed = true; - } - } - - $index++; -} - -$stack = array_reverse($stack); // Last added dirs are deepest -foreach($stack as $dir) { - if ( $dir != $top_dir) { - @ rmdir($dir); - $flushed = true; - } -} - -if ( $flushed ) - echo 'The cache was flushed'; -else - echo 'No cache to flush!'; - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/role-scoper/xmlrpc_rs.php b/blog/wp-content/plugins/role-scoper/xmlrpc_rs.php deleted file mode 100644 index 0c23e9b..0000000 --- a/blog/wp-content/plugins/role-scoper/xmlrpc_rs.php +++ /dev/null @@ -1,76 +0,0 @@ -') ) - if ( $pos_end = strpos($HTTP_RAW_POST_DATA, '', $pos) ) { - $post_id = substr($HTTP_RAW_POST_DATA, $pos + strlen(''), $pos_end - ($pos + strlen('')) ); - - // workaround for Windows Live Writer passing in postID = 1 for new posts - if ( strpos($HTTP_RAW_POST_DATA, 'metaWeblog.newPost') ) - $post_id = 0; - } - -if ( $post_id ) { - global $xmlrpc_post_id_rs; - $xmlrpc_post_id_rs = $post_id; - - $post_type = ''; - if ( $pos = strpos($HTTP_RAW_POST_DATA, 'post_type') ) - if ( $pos = strpos($HTTP_RAW_POST_DATA, '', $pos) ) - if ( $pos_end = strpos($HTTP_RAW_POST_DATA, '', $pos) ) - $post_type = substr($HTTP_RAW_POST_DATA, $pos + strlen(''), $pos_end - ($pos + strlen('')) ); - - if ( empty($post_type) ) { - if ( $pos_member_end = strpos($HTTP_RAW_POST_DATA, '') ) { - if ( $pos_member_end = strpos($HTTP_RAW_POST_DATA, '', $pos_member_end + 1) ) { - $pos_insert = $pos_member_end + strlen(''); - - global $wpdb; - if ( $post_type = scoper_get_var("SELECT post_type FROM $wpdb->posts WHERE ID = '$post_id'") ) { - if ( 'post' != $post_type ) { - global $xmlrpc_post_type_rs; - $xmlrpc_post_type_rs = $post_type; - } - - $insert_xml = -" - post_type - - $post_type - - "; - - $HTTP_RAW_POST_DATA = substr($HTTP_RAW_POST_DATA, 0, $pos_insert + 1) . $insert_xml . substr($HTTP_RAW_POST_DATA, $pos_insert); - - } // endif parsed post type - } // endif found existing member markup - } // endif found 2nd existing member markup - } // endif post_type not passed -} - - -// might have to do this at someday -/* -function scoper_mw_edit_post($args) { -} - -function scoper_flt_xmlrpc_methods($methods) { - $methods['metaWeblog.editPost'] = 'scoper_mw_edit_post'; - $methods['wp.editPage'] = 'scoper_mw_edit_post'; - - return $methods; -} - -//add_filter('xmlrpc_methods', 'scoper_flt_xmlrpc_methods'); -*/ - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/de/stemmer.php b/blog/wp-content/plugins/similar-posts/languages/de/stemmer.php deleted file mode 100644 index 3369e46..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/de/stemmer.php +++ /dev/null @@ -1,317 +0,0 @@ - $word) { - if ($odd) { - $words[$k] = _de_stemmer_wortstamm($word); - } - $odd = !$odd; - } - - // Put it all back together - return implode('', $words); - - /* alte Version - $words = _de_stemmer_split_text($text); - - // Process each word - foreach ($words as $k => $word) { - if (!_de_stemmer_stoppwort(strtolower($word))) { - $words[$k] = _de_stemmer_wortstamm($word); - } - } - - // Put it all back together - return implode(' ', $words); - */ -} - - -/** -* Implementation of hook_help(). -*/ -function de_stemmer_help($section = 'admin/help#search') { - switch ($section) { - case 'admin/modules#description': - return t('Implements a German stemming algorithm (Porter) to improve searching.'); - } -} - - -/* -* Function gets as text (parameter) and splits the text into words. -* Then each word is stemmed and the word together with its stem is -* stored in an array (hash). -* As a result the hash is returned and can be used as a lookup table -* to identify words which transform to the same stem. -* For details please compare 'search.module-stem.patch' -*/ -function de_stemmer_stem_list($text) { - // Split words from noise and remove apostrophes - $words = _de_stemmer_split_text($text); - - $stem_list = array(); - foreach ($words as $word) { - $stem_list[$word] = _de_stemmer_wortstamm($word); - } - return $stem_list; -} - - -function _de_stemmer_region_n($wort) { - $r = strcspn($wort, DE_STEMMER_VOKALE); - return $r + strspn($wort, DE_STEMMER_VOKALE, $r) + 1; -} - -function de_stemmer_preprocess($wort) { - $wort = mb_strtolower($wort); - $wort = str_replace("ß", "ss", $wort); - // replace ß by ss, and put u and y between vowels into upper case - - $wort = preg_replace( array( '/ß/', - '/(?<=['. DE_STEMMER_VOKALE .'])u(?=['. DE_STEMMER_VOKALE .'])/u', - '/(?<=['. DE_STEMMER_VOKALE .'])y(?=['. DE_STEMMER_VOKALE .'])/u' - ), - array( 'ss', 'U', 'Y' ), - $wort - ); - return $wort; -} - - -function _de_stemmer_postprocess($wort) { - $wort = mb_strtolower($wort); - - if (!_de_stemmer_ausnahme($wort)) // check for exceptions - { - $wort = strtr($wort, array('ä' => 'a', 'á' => 'a', - 'ë' => 'e', 'é' => 'e', - 'ï' => 'i', 'í' => 'i', - 'ö' => 'o', 'ó' => 'o', - 'ü' => "u", 'ú' => 'u' - )); - } - return $wort; -} - - -function _de_stemmer_wortstamm($wort) { - $stamm = de_stemmer_preprocess($wort); - - /* - * R1 is the region after the first non-vowel following a vowel, - or is the null region at the end of the word if there is no such non-vowel. - * R2 is the region after the first non-vowel following a vowel in R1, - or is the null region at the end of the word if there is no such non-vowel. - */ - - $l = strlen($stamm); - $r1 = _de_stemmer_region_n($stamm); - $r2 = $r1 == $l ? $r1 : $r1 + _de_stemmer_region_n(mb_substr($stamm, $r1)); - // unshure about interpreting the following rule: - // "then R1 is ADJUSTED so that the region before it contains at least 3 letters" - if ($r1 < 3) { - $r1 = 3; - } - - /* Step 1 - Search for the longest among the following suffixes, - (a) e em en ern er es - (b) s (preceded by a valid s-ending) - and delete if in R1. - (Of course the letter of the valid s-ending is not necessarily in R1) - */ - - if (preg_match('/(e|em|en|ern|er|es)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) { - $stamm = mb_substr($stamm, 0, $hits[0][1]); - } - elseif (preg_match('/(?<=(b|d|f|g|h|k|l|m|n|r|t))s$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) { - $stamm = mb_substr($stamm, 0, $hits[0][1]); - } - - - /* - Step 2 - Search for the longest among the following suffixes, - (a) en er est - (b) st (preceded by a valid st-ending, itself preceded by at least 3 letters) - and delete if in R1. - */ - - if (preg_match('/(en|er|est)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) { - $stamm = mb_substr($stamm, 0, $hits[0][1]); - } - elseif (preg_match('/(?<=(b|d|f|g|h|k|l|m|n|t))st$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) { - $stamm = mb_substr($stamm, 0, $hits[0][1]); - } - - - /* - Step 3: d-suffixes ( see http://snowball.tartarus.org/texts/glossary.html ) - Search for the longest among the following suffixes, and perform the action indicated. - end ung - delete if in R2 - if preceded by ig, delete if in R2 and not preceded by e - ig ik isch - delete if in R2 and not preceded by e - lich heit - delete if in R2 - if preceded by er or en, delete if in R1 - keit - delete if in R2 - if preceded by lich or ig, delete if in R2 - ^ means R1 ? - */ - - if (preg_match('/(?<=eig)(end|ung)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) { - ; - } - elseif (preg_match('/(end|ung)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) { - $stamm = mb_substr($stamm, 0, $hits[0][1]); - } - elseif (preg_match('/(? 'schön', // !schon - 'blüt' => 'blüt', // Blüte (NICHT Blut) - 'kannt' => 'kenn', - 'küch' => 'küch', // Küchen (NICHT Kuchen) - 'mög' => 'mög', - 'mocht' => 'mög', - 'mag' => 'mög', - 'ging' => 'geh', - 'lief' => 'lauf', - 'änd' => 'änd' // ändern (NICHT andern) - ); - - //return FALSE; - if ( array_key_exists($wort, $de_stemmer_ausnahmen) ) - { $wort = $de_stemmer_ausnahmen[$wort]; - return TRUE; - } - else - return FALSE; -} - -/* - Stem caching added by Rob Marsh, SJ - http://rmarsh.com -*/ - -$StemCache = array(); - -function stem($word) { - global $StemCache; - if (!isset($StemCache[$word])) { - $stemmedword = _de_stemmer_wortstamm($word); - $StemCache[$word] = $stemmedword; - } - else { - $stemmedword = $StemCache[$word] ; - } - return $stemmedword; -} - -?> diff --git a/blog/wp-content/plugins/similar-posts/languages/de/stopwords.php b/blog/wp-content/plugins/similar-posts/languages/de/stopwords.php deleted file mode 100644 index 8399be4..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/de/stopwords.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/en/stemmer.php b/blog/wp-content/plugins/similar-posts/languages/en/stemmer.php deleted file mode 100644 index 9983c48..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/en/stemmer.php +++ /dev/null @@ -1,335 +0,0 @@ -step1ab($word); - $word = $this->step1c($word); - $word = $this->step2($word); - $word = $this->step3($word); - $word = $this->step4($word); - $word = $this->step5($word); - /* - Esta parte esta editado por cesar rodas, - no quiero que me muestre ' (apostrofe) al final - */ - if (substr($word,-1,1) == "'") - $word = substr($word,0,strlen($word) -1 ); - return $word; - } - - - function step1ab($word) - { - if (substr($word, -1) == 's') { - - $this->replace($word, 'sses', 'ss') - OR $this->replace($word, 'ies', 'i') - OR $this->replace($word, 'ss', 'ss') - OR $this->replace($word, 's', ''); - } - - if (substr($word, -2, 1) != 'e' OR !$this->replace($word, 'eed', 'ee', 0)) { // First rule - $v = $this->regex_vowel; - - if ( preg_match("#$v+#", substr($word, 0, -3)) && $this->replace($word, 'ing', '') - OR preg_match("#$v+#", substr($word, 0, -2)) && $this->replace($word, 'ed', '')) { - if ( !$this->replace($word, 'at', 'ate') - AND !$this->replace($word, 'bl', 'ble') - AND !$this->replace($word, 'iz', 'ize')) { - - if ( $this->doubleConsonant($word) - AND substr($word, -2) != 'll' - AND substr($word, -2) != 'ss' - AND substr($word, -2) != 'zz') { - - $word = substr($word, 0, -1); - - } else if ($this->m($word) == 1 AND $this->cvc($word)) { - $word .= 'e'; - } - } - } - } - - return $word; - } - - function step1c($word) - { - $v = $this->regex_vowel; - - if (substr($word, -1) == 'y' && preg_match("#$v+#", substr($word, 0, -1))) { - $this->replace($word, 'y', 'i'); - } - - return $word; - } - - - function step2($word) - { - switch (substr($word, -2, 1)) { - case 'a': - $this->replace($word, 'ational', 'ate', 0) - OR $this->replace($word, 'tional', 'tion', 0); - break; - - case 'c': - $this->replace($word, 'enci', 'ence', 0) - OR $this->replace($word, 'anci', 'ance', 0); - break; - - case 'e': - $this->replace($word, 'izer', 'ize', 0); - break; - - case 'g': - $this->replace($word, 'logi', 'log', 0); - break; - - case 'l': - $this->replace($word, 'entli', 'ent', 0) - OR $this->replace($word, 'ousli', 'ous', 0) - OR $this->replace($word, 'alli', 'al', 0) - OR $this->replace($word, 'bli', 'ble', 0) - OR $this->replace($word, 'eli', 'e', 0); - break; - - case 'o': - $this->replace($word, 'ization', 'ize', 0) - OR $this->replace($word, 'ation', 'ate', 0) - OR $this->replace($word, 'ator', 'ate', 0); - break; - - case 's': - $this->replace($word, 'iveness', 'ive', 0) - OR $this->replace($word, 'fulness', 'ful', 0) - OR $this->replace($word, 'ousness', 'ous', 0) - OR $this->replace($word, 'alism', 'al', 0); - break; - - case 't': - $this->replace($word, 'biliti', 'ble', 0) - OR $this->replace($word, 'aliti', 'al', 0) - OR $this->replace($word, 'iviti', 'ive', 0); - break; - } - - return $word; - } - - - function step3($word) - { - switch (substr($word, -2, 1)) { - case 'a': - $this->replace($word, 'ical', 'ic', 0); - break; - - case 's': - $this->replace($word, 'ness', '', 0); - break; - - case 't': - $this->replace($word, 'icate', 'ic', 0) - OR $this->replace($word, 'iciti', 'ic', 0); - break; - - case 'u': - $this->replace($word, 'ful', '', 0); - break; - - case 'v': - $this->replace($word, 'ative', '', 0); - break; - - case 'z': - $this->replace($word, 'alize', 'al', 0); - break; - } - - return $word; - } - - - function step4($word) - { - switch (substr($word, -2, 1)) { - case 'a': - $this->replace($word, 'al', '', 1); - break; - - case 'c': - $this->replace($word, 'ance', '', 1) - OR $this->replace($word, 'ence', '', 1); - break; - - case 'e': - $this->replace($word, 'er', '', 1); - break; - - case 'i': - $this->replace($word, 'ic', '', 1); - break; - - case 'l': - $this->replace($word, 'able', '', 1) - OR $this->replace($word, 'ible', '', 1); - break; - - case 'n': - $this->replace($word, 'ant', '', 1) - OR $this->replace($word, 'ement', '', 1) - OR $this->replace($word, 'ment', '', 1) - OR $this->replace($word, 'ent', '', 1); - break; - - case 'o': - if (substr($word, -4) == 'tion' OR substr($word, -4) == 'sion') { - $this->replace($word, 'ion', '', 1); - } else { - $this->replace($word, 'ou', '', 1); - } - break; - - case 's': - $this->replace($word, 'ism', '', 1); - break; - - case 't': - $this->replace($word, 'ate', '', 1) - OR $this->replace($word, 'iti', '', 1); - break; - - case 'u': - $this->replace($word, 'ous', '', 1); - break; - - case 'v': - $this->replace($word, 'ive', '', 1); - break; - - case 'z': - $this->replace($word, 'ize', '', 1); - break; - } - - return $word; - } - - function step5($word) - { - if (substr($word, -1) == 'e') { - if ($this->m(substr($word, 0, -1)) > 1) { - $this->replace($word, 'e', ''); - - } else if ($this->m(substr($word, 0, -1)) == 1) { - - if (!$this->cvc(substr($word, 0, -1))) { - $this->replace($word, 'e', ''); - } - } - } - - // Part b - if ($this->m($word) > 1 AND $this->doubleConsonant($word) AND substr($word, -1) == 'l') { - $word = substr($word, 0, -1); - } - - return $word; - } - - function replace(&$str, $check, $repl, $m = null) - { - $len = 0 - strlen($check); - - if (substr($str, $len) == $check) { - $substr = substr($str, 0, $len); - if (is_null($m) OR $this->m($substr) > $m) { - $str = $substr . $repl; - } - - return true; - } - - return false; - } - - - - function m($str) - { - $c = $this->regex_consonant; - $v = $this->regex_vowel; - - $str = preg_replace("#^$c+#", '', $str); - $str = preg_replace("#$v+$#", '', $str); - - preg_match_all("#($v+$c+)#", $str, $matches); - - return count($matches[1]); - } - - - - function doubleConsonant($str) - { - $c = $this->regex_consonant; - - return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1}; - } - - - - function cvc($str) - { - $c = $this->regex_consonant; - $v = $this->regex_vowel; - - return preg_match("#($c$v$c)$#", $str, $matches) - AND strlen($matches[1]) == 3 - AND $matches[1]{2} != 'w' - AND $matches[1]{2} != 'x' - AND $matches[1]{2} != 'y'; - } - } -} - -/* - Stem caching added by Rob Marsh, SJ - http://rmarsh.com -*/ - -$Stemmer = new EnglishStemmer(); -$StemCache = array(); - -function stem($word) { - global $Stemmer, $StemCache; - if (!isset($StemCache[$word])) { - $stemmedword = $Stemmer->Stem($word); - $StemCache[$word] = $stemmedword; - } - else { - $stemmedword = $StemCache[$word] ; - } - return $stemmedword; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/en/stopwords.php b/blog/wp-content/plugins/similar-posts/languages/en/stopwords.php deleted file mode 100644 index 9b8f985..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/en/stopwords.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/es/stemmer.php b/blog/wp-content/plugins/similar-posts/languages/es/stemmer.php deleted file mode 100644 index 58d6828..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/es/stemmer.php +++ /dev/null @@ -1,381 +0,0 @@ -word = $word; - if (strlen($word) < 2) - return; - - - $this->step_0(); - while($this->step_1()); - $this->step_2(); - $this->step_3(); - return $this->word; - } - - function step_0() - { - $this->splitword(); - $search = array( - "me","se","sela","selo","selas","selos","la","le","lo","les", - "los","nos" - ); - - $prefix = array( - "indo","ndo","r","r","r", /* primer caso */ - "iendo","ando","ar","er","ir", /* segundo caso*/ - "yendo" - ); - - foreach ($prefix as $id => $pref) - { - $return = false; - if ( (strstr($this->RV,$pref) != NULL) or - /* caso para yendo */ - ($pref == "yendo" && strstr($this->word,"uyendo")) ) - { - - /* - El prefijo fue encontrado, ahora buscar para borrar - el pronombre. - */ - foreach ($search as $word) - { - $len = strlen($word); - - switch ($id) - { - - case $id < 5: /* primer Caso*/ - if ($word == substr($this->RV,-1 * $len,$len) ) - { - $this->word = substr($this->word,0, strlen($this->word) - $len); - $this->word = str_replace($prefix[$id],$prefix[$id+5],$this->word); - $return = true; - } - break; - case $id < 10: /* segundo caso*/ - if ($word == substr($this->RV,-1 * $len,$len) ) - { - $this->word = substr($this->word,0, strlen($this->word) - $len); - $return = true; - } - break; - case $id >= 10: /* tercer caso*/ - if ($word == substr($this->RV,-1 * $len,$len) ) - { - - $this->word = substr($this->word,0, strlen($this->word) - $len); - $return = true; - } - break; - } - } - } - - } - unset($prefix,$search,$word,$id,$pref,$len); - return $return; - } - - function step_1() - { - $return = false; - $this->splitword(); - - /* borrado de R2 */ - $search = array( - "abilidades","iblemente","icaciones","ablemente","antemente","ivamente","atamente", - "amientos","icadoras","icadores","icancias","imientos","icamente", - "osamente","abilidad","icidades","ividades","adamente","icantes", - "icancia","imiemto","icadora","icacin","amiento","imiento","aciones", - "ativos","ativas","ividad","idades","icidad","icante", - "icador","adoras","adores","ancias","mente","ables", - "ismos","anzas","ativa","ativo","istas","ibles", - "acin","antes","adora","ancia","ismo","anza", - "icos","ivas","osos","ivos","ante","osas", - "ador","ible","ista","idad","able","ico", - "osa","oso","iva","ica","ica","ivo", - ); - - for ($i = 0; $i < count($search); $i++) - if (substr($this->R2,strlen($search[$i]) * (-1),strlen($search[$i])) == $search[$i]) - { - $this->word = substr($this->word,0,strlen($this->word) - strlen($search[$i]) ); - $return = true; - break; - } - /* creo que esta mal, creo que hay que buscar en R1*/ - if ($this->R1 == "amente") - { - $this->word = str_replace("amente","",$this->word); - } - - $search = array - ( - "loga","logas",/**/"ucin","uciones",/**/"encia","encias" - ); - $replace = array - ( - "log","log","u","u","entre","entre" - ); - for ($i = 0; $i < count($search); $i++) - if (substr($this->R2,strlen($search[$i]) * (-1),strlen($search[$i])) == $search[$i]) - { - $this->word = str_replace($search[$i],$replace[$i],$this->word); - $return = true; - break; - } - unset($i,$search,$replace); - return $return; - } - - function step_2() - { - $this->splitword(); - $return = false; - $search = array( - "ya","ye","yan","yen","yeron","yendo","yo","y","yas","yes","yais","yamos" - ); - foreach ($search as $word) - { - if (substr($this->RV,strlen($word) * (-1),strlen($word)) == $word) - if (substr($this->word,-1*(strlen($word) + 1), strlen($word) + 1) == "u".$word) - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word) + 1)); - $return = true; - } - } - - if ($return == false) - $this->step_2b(); - unset($return,$search,$word); - } - - function step_2b() - { - $this->splitword(); - $search = array( - "en","es","is","emos" - ); - - foreach ($search as $word) - { - if (substr($this->RV,strlen($word) * (-1),strlen($word)) == $word) - if (substr($this->word,(-1)*(strlen($word) + 2), strlen($word) + 2) == "gu".$word) - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word) + 1) ); - $return = true; - } - /* - This part was fix by Diego Enrique Finol - This was the email that Diego sent to me: - Epa saludos, gracias por la clase de spanish stemmer, haba visto lo mismo - en snowball pero me ahorraste el trabajo de convertirlo a php. Slo not - que en las partes en la que haba que borrar cierto sufijo y, adems, - borrar la "u" de si est precedido por "gu" creo que no borra el sufijo si - no est precedido por esto. O sea, hay que borrar el afijo en ambos casos, - y de paso si est precedido por gu, tambin borrar la u, pero el algoritmo - slo lo hace si est precedido por gu, sino, no borra nada. - - Thanks Diego!. - */ - else - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word)) ); - $return = true; - } - /*End of Diego fix*/ - } - - $search = array( - "iramos","aramos","iramos","isemos","eramos","erais","eremos", - "isteis","irais","ierais","iremos","bamos","ieseis", - "asteis","ramos","semos","aremos","arais","abais", - "amos","arais","ieses","aran","iesen","ieron", - "iendo","ieras","iris","aras","eras","aseis", - "eris","eran","iran","aris","iras","ieran", - "ando","amos","aron","asen","aras","ados", - "ais","ases","imos","adas","idas","abas", - "iste","irn","ern","ara","era","iera", - "irs","ira","aran","ars","ers","aste", - "iese","aban","arn","is","ada","ir", - "an","ir","er","aba","ara","ido", - "ar","ar","ado","er","ase","as", - "ida","a","er","ar","i","an", - "ir","as","ad","ed","id","s", - - - ); - - foreach ($search as $word) - if (substr($this->RV,strlen($word) * (-1),strlen($word)) == $word) - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word))); - $this->splitword(); - } - unset($search,$word); - - } - - function step_3() - { - $this->splitword(); - $return = false; - $search = array( - "os","a","o","","","" - ); - - - foreach ($search as $word) - if (substr($this->RV,strlen($word) * (-1),strlen($word)) == $word) - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word))); - $return = true; - } - - $search = array( - "e","" - ); - - foreach ($search as $word) - { - if (substr($this->RV,strlen($word) * (-1),strlen($word)) == $word) - if (substr($this->RV,-1*(strlen($word) + 2), strlen($word) + 2) == "gu".$word) - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word) + 1) ); - $return = true; - } - else - { - $this->word = substr($this->word,0, strlen($this->word) -(strlen($word)) ); - $return = true; - } - } - unset($search,$word); - $this->word = str_replace("","a",$this->word); - $this->word = str_replace("","e",$this->word); - $this->word = str_replace("","i",$this->word); - $this->word = str_replace("","o",$this->word); - $this->word = str_replace("","u",$this->word); - $this->word = str_replace("","u",$this->word); - return $return; - } - - - /* funciones utilizadas*/ - function saddorsort($a, $b) - { - if (strlen($a) == strlen($b)) { - return 0; - } - return (strlen($a) < strlen($b)) ? 1 : -1; - } - function splitword() - { - $flag1=false; - $flag2=false; - $this->R1=""; - $this->R2=""; - $this->RV=""; - for ($i = 1; $i < strlen($this->word); $i++) - { - if ($flag1) - $this->R1.=$this->word[$i]; - if ($flag2) - $this->R2.=$this->word[$i]; - - if ($i+1 >= strlen($this->word)) - break; - - if ($this->char_is($this->word[$i]) == consonante && - $this->char_is(@$this->word[$i+1]) == vocal && - $flag1 == true && $flag2 == false) - $flag2=true; - - if ($this->char_is($this->word[$i]) == consonante && - $this->char_is($this->word[$i+1]) == vocal && - $flag1 == false) - $flag1=true; - } - - - /* Buscando RV*/ - $flag1=false; - if ($this->char_is($this->word[1]) == consonante) - { - for ($i = 2; $i < strlen($this->word); $i++) - if ($this->char_is($this->word[$i]) == vocal) - break; - $i++; - $this->RV = substr($this->word,$i); - } - else if ($this->char_is($this->word[1]) == vocal && $this->char_is($this->word[0]) == vocal) - { - for ($i = 2; $i < strlen($this->word); $i++) - if ($this->char_is($this->word[$i]) == consonante) - break; - $i++; - $this->RV = substr($this->word,$i); - } - else if (strlen($this->word) > 2) - $this->RV = substr($this->word,3); - - unset($flag1,$flag2,$i); - } - - function char_is($char) - { - $char = strtolower($char); - if ($char == "") - return; - $vowel = "aeiou"; - $consonant = "bcdfghijklmnopqrsvtxwyz"; - if (strstr($vowel,$char)) - return vocal; - if (strstr($consonant,$char)) - return consonante; - } - } -} - -/* - Stem caching added by Rob Marsh, SJ - http://rmarsh.com -*/ - -$Stemmer = new PorterStemmer(); -$StemCache = array(); - -function stem($word) { - global $Stemmer, $StemCache; - if (!isset($StemCache[$word])) { - $stemmedword = $Stemmer->Stem($word); - $StemCache[$word] = $stemmedword; - } - else { - $stemmedword = $StemCache[$word] ; - } - return $stemmedword; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/es/stopwords.php b/blog/wp-content/plugins/similar-posts/languages/es/stopwords.php deleted file mode 100644 index 49b7065..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/es/stopwords.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/fr/stemmer.php b/blog/wp-content/plugins/similar-posts/languages/fr/stemmer.php deleted file mode 100644 index 83c33a2..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/fr/stemmer.php +++ /dev/null @@ -1,513 +0,0 @@ -])/"; - -$PaiceHuskStemmerRules_fr = array( - 'esre1>', # { -erse > -ers } - 'esio1>', # { -oise > -ois } - 'siol1.', # { -lois > -loi } - 'siof0.', # { -fois > -fois } - 'sioe0.', # { -eois > -eois } - 'sio3>', # { -ois > - } - 'st1>', # { -ts > -t } - 'sf1>', # { -fs > -f } - 'sle1>', # { -els > -el } - 'slo1>', # { -ols > -ol } - 's1>', # { -s > - } - 'tuae5.', # { -eaut > - } - 'tuae2.', # { -eaut > -eau } - 'tnia0.', # { -aint > -aint } - 'tniv1.', # { -vint > -vin } - 'tni3>', # { -int > - } - 'suor1.', # { -rous > -ou } - 'suo0.', # { -ous > -ous } - 'sdrail5.', # { -liards > -l } - 'sdrai4.', # { -iards > -i } - 'eri1>', # { -ire > -ier } - 'sesue3x>', # { -euses > -euse } - 'esuey5i.', # { -yeuse > -i } - 'esue2x>', # { -euse > -eux } - 'se1>', # { -es > -e } - 'erg3.', # { -gre > -g } - 'eca1>', # { -ace > -ac } - 'esiah0.', # { -haise > - } - 'esi1>', # { -ise > -is } - 'siss2.', # { -ssis > -ss } - 'sir2>', # { -ris > -r } - 'sit2>', # { -tis > -t } - 'egan1.', # { -nage > -nag } - 'egalli6>', # { -illage > - } - 'egass1.', # { -ssage > -sag } - 'egas0.', # { -sage > - } - 'egat3.', # { -tage > - } - 'ega3>', # { -age > - } - 'ette4>', # { -ette > - } - 'ett2>', # { -tte > -t } - 'etio1.', # { -oite > -oit } - 'tio4c.', # { -oit > -c } - 'tio0.', # { -oit > -oit } - 'et1>', # { -te > -t } - 'eb1>', # { -be > -b } - 'snia1>', # { -ains > -ain } - 'eniatnau8>', # { -uantaine > - } - 'eniatn4.', # { -ntaine > -nt } - 'enia1>', # { -aine > -ain } - 'niatnio3.', # { -ointain > -oint } - 'niatg3.', # { -gtain > -gt } - 'e1>', # { -e > - } - 'hcat1.', # { -tach > -tach } - 'hca4.', # { -ach > - } - 'tila5>', # { -alit > - } - 'tici5.', # { -icit > - } - 'tir1.', # { -rit > -rit } - 'ti3>', # { -it > - } - 'gan1.', # { -nag > -nag } - 'ga3>', # { -ag > - } - 'tehc1.', # { -chet > -chet } - 'te3>', # { -et > - } - 'it0.', # { -ti > -ti } - '1>', # { - > - } - 'eire4.', # { -erie > - } - 'eirue5.', # { -eurie > - } - 'eio1.', # { -oie > -oi } - 'eia1.', # { -aie > -ai } - 'ei1>', # { -ie > -i } - 'eng1.', # { -gne > -gn } - 'xuaessi7.', # { -isseaux > - } - 'xuae1>', # { -eaux > -eau } - 'uaes0.', # { -seau > -seau } - 'uae3.', # { -eau > - } - 'xuave2l.', # { -evaux > -eval } - 'xuav2li>', # { -vaux > -vail } - 'xua3la>', # { -aux > -al } - 'ela1>', # { -ale > -al } - 'lart2.', # { -tral > -tr } - 'lani2>', # { -inal > -in } - 'la2>', # { -al > - } - 'siay4i.', # { -yais > -i } - 'siassia7.', # { -aissais > - } - 'siarv1*.', # { -vrais > -vrai if intact } - 'sia1>', # { -ais > -ai } - 'tneiayo6i.', # { -oyaient > -oi } - 'tneiay6i.', # { -yaient > -i } - 'tneiassia9.', # { -aissaient > - } - 'tneiareio7.', # { -oieraient > -oi } - 'tneia5>', # { -aient > - } - 'tneia4>', # { -aient > -a } - 'tiario4.', # { -oirait > -oi } - 'tiarim3.', # { -mirait > -mir } - 'tiaria3.', # { -airait > -air } - 'tiaris3.', # { -sirait > -sir } - 'tiari5.', # { -irait > - } - 'tiarve6>', # { -evrait > - } - 'tiare5>', # { -erait > - } - 'iare4>', # { -erai > - } - 'are3>', # { -era > - } - 'tiay4i.', # { -yait > -i } - 'tia3>', # { -ait > - } - 'tnay4i.', # { -yant > -i } - 'emiu5>', # { -uime > - } - 'emi4>', # { -ime > - } - 'tnaun3.', # { -nuant > -nu } - 'tnauqo3.', # { -oquant > -oqu } - 'tnau4>', # { -uant > - } - 'tnaf0.', # { -fant > -fant } - 'tnat2>', # { -tant > -t } - 'tna3>', # { -ant > - } - 'tno3>', # { -ont > - } - 'zeiy4i.', # { -yiez > -i } - 'zey3i.', # { -yez > -i } - 'zeire5>', # { -eriez > - } - 'zeird4.', # { -driez > -d } - 'zeirio4.', # { -oiriez > -oi } - 'ze2>', # { -ez > - } - 'ssiab0.', # { -baiss > - } - 'ssia4.', # { -aiss > - } - 'ssi3.', # { -iss > - } - 'tnemma6>', # { -amment > - } - 'tnemesuey9i.', # { -yeusement > -i } - 'tnemesue8>', # { -eusement > - } - 'tnemevi7.', # { -ivement > - } - 'tnemessia5.', # { -aissement > -aiss } - 'tnemessi8.', # { -issement > - } - 'tneme5>', # { -ement > - } - 'tnemia4.', # { -aiment > -ai } - 'tnem5>', # { -ment > - } - 'el2l>', # { -le > -l } - 'lle3le>', # { -ell > -el } - 'let0.', # { -tel > -tel } - 'lepp0.', # { -ppel > -ppel } - 'le2>', # { -el > - } - 'srei1>', # { -iers > -ier } - 'reit3.', # { -tier > -t } - 'reila2.', # { -alier > -ali } - 'rei3>', # { -ier > - } - 'erte5.', # { -etre > - } - 'ert1.', # { -tre > -tr } - 'ert4.', # { -tre > - } - 'drai4.', # { -iard > - } - 'erdro0.', # { -ordre > -ordre } - 'erute5.', # { -eture > - } - 'ruta0.', # { -atur > -atur } - 'eruta1.', # { -ature > -atur } - 'erutiov1.', # { -voiture > -voitur } - 'erub3.', # { -bure > -b } - 'eruh3.', # { -hure > -h } - 'erul3.', # { -lure > -l } - 'er2r>', # { -re > -r } - 'nn1>', # { -nn > -n } - 'ri3.', # { -ir > - } - 'srev0.', # { -vers > -vers } - 'sr1>', # { -rs > -r } - 'rid2>', # { -dir > -d } - 're2>', # { -er > - } - 'xuei4.', # { -ieux > - } - 'esuei5.', # { -ieuse > - } - 'lbati3.', # { -itabl > -it } - 'lba3>', # { -abl > - } - 'rueis0.', # { -sieur > - } - 'ruehcn4.', # { -ncheur > -nc } - 'ecirta6.', # { -atrice > - } - 'ruetai6.', # { -iateur > - } - 'rueta5.', # { -ateur > - } - 'rueir0.', # { -rieur > - } - 'rue3>', # { -eur > - } - 'esseti6.', # { -itesse > - } - 'essere6>', # { -eresse > - } - 'esserd1.', # { -dresse > -dress } - 'esse4>', # { -esse > - } - 'essiab1.', # { -baisse > -baiss } - 'essia5.', # { -aisse > - } - 'essio1.', # { -oisse > -oiss } - 'essi4.', # { -isse > - } - 'essal4.', # { -lasse > -l } - 'essa1>', # { -asse > -ass } - 'ssab1.', # { -bass > -bas } - 'essurp1.', # { -prusse > -uss } - 'essu4.', # { -usse > - } - 'essi1.', # { -isse > -ss } - 'ssor1.', # { -ross > -ros } - 'essor2.', # { -rosse > -ros } - 'esso1>', # { -osse > -oss } - 'ess2>', # { -sse > -s } - 'tio3.', # { -oit > - } - 'rs2re.', # { -sr > -ser } - 'r0e.', # { -r > -re } - 'esn1.', # { -nse > -ns } - 'eu1>', # { -ue > -u } - 'sua0.', # { -aus > -aus } - 'su1>', # { -us > -u } - 'utt1>', # { -utt > -tt } - 'tu3c.', # { -ut > -c } - 'u2c.', # { -u > -c } - 'ur1.', # { -ru > -r } - 'ehcn2>', # { -nche > -nc } - 'ehcu1>', # { -uche > -uch } - 'snorr3.', # { -rrons > -rr } - 'snoru3.', # { -urons > -ur } - 'snorua3.', # { -aurons > -aur } - 'snorv3.', # { -vrons > -vr } - 'snorio4.', # { -oirons > -oi } - 'snori5.', # { -irons > - } - 'snore5>', # { -erons > - } - 'snortt4>', # { -ttrons > -tt } - 'snorta7.', # { -atrons > - } - 'snort3.', # { -trons > -tr } - 'snor4.', # { -rons > - } - 'snossi6.', # { -issons > - } - 'snoire6.', # { -erions > - } - 'snoird5.', # { -drions > -d } - 'snoitai7.', # { -iations > - } - 'snoita6.', # { -ations > - } - 'snoits1>', # { -stions > -stion } - 'noits0.', # { -stion > -stion } - 'snoi4>', # { -ions > - } - 'noitaci7>', # { -ication > - } - 'noitai6.', # { -iation > - } - 'noita5.', # { -ation > - } - 'noitu4.', # { -ution > -u } - 'noi3>', # { -ion > - } - 'snoya0.', # { -ayons > -ayons } - 'snoy4i.', # { -yons > -i } - 'snoa1.', # { -aons > -aon } - 'snor1.', # { -rons > -ron } - 'snoe4.', # { -eons > - } - 'snosiar1>', # { -raisons > - } - 'snola1.', # { -alons > -alon } - 'sno3>', # { -ons > - } - 'sno1>', # { -ons > -on } - 'noll2.', # { -llon > -ll } - 'tnennei4.', # { -iennent > -ien } - 'ennei2>', # { -ienne > -ien } - 'snei1>', # { -iens > -ien } - 'sne1>', # { -ens > -en } - 'enne5e.', # { -enne > -e } - 'ne3e.', # { -en > -e } - 'neic0.', # { -cien > -cien } - 'neiv0.', # { -vien > -vien } - 'nei3.', # { -ien > - } - 'sc1.', # { -cs > -c } - 'sd1.', # { -ds > -d } - 'sg1.', # { -gs > -g } - 'sni1.', # { -ins > -in } - 'tiu0.', # { -uit > - } - 'ti2.', # { -it > - } - 'sp1>', # { -ps > -p } - 'sna1>', # { -ans > -an } - 'sue1.', # { -eus > -eu } - 'enn2>', # { -nne > -n } - 'nong2.', # { -gnon > -gn } - 'noss2.', # { -sson > -ss } - 'rioe4.', # { -eoir > - } - 'riot0.', # { -toir > -toir } - 'riorc1.', # { -croir > -croi } - 'riovec5.', # { -cevoir > -c } - 'rio3.', # { -oir > - } - 'ric2.', # { -cir > -l } - 'ril2.', # { -lir > -l } - 'tnerim3.', # { -mirent > -mir } - 'tneris3>', # { -sirent > -sir } - 'tneri5.', # { -irent > - } - 'ta3.', # { -at > - } - 'riss2.', # { -ssir > -ss } - 't2.', # { -t > - } - 't2>', # { -t > - } - 'ario2.', # { -oira > -oi } - 'arim1.', # { -mira > -m } - 'ara1.', # { -ara > -ar } - 'aris1.', # { -sira > -sir } - 'ari3.', # { -ira > - } - 'art1>', # { -tra > -tr } - 'ardn2.', # { -ndra > -nd } - 'arr1.', # { -rra > -rr } - 'arua1.', # { -aura > -aur } - 'aro1.', # { -ora > -or } - 'arv1.', # { -vra > -vr } - 'aru1.', # { -ura > -ur } - 'ar2.', # { -ra > - } - 'rd1.', # { -dr > -d } - 'ud1.', # { -du > - } - 'ul1.', # { -lu > -l } - 'ini1.', # { -ini > -in } - 'rin2.', # { -nir > - } - 'tnessiab3.', # { -baissent > -baiss } - 'tnessia7.', # { -aissent > - } - 'tnessi6.', # { -issent > - } - 'tnessni4.', # { -inssent > -ins } - 'sini2.', # { -inis > -in } - 'sl1.', # { -ls > -l } - 'iard3.', # { -drai > -d } - 'iario3.', # { -oirai > -oi } - 'ia2>', # { -ai > - } - 'io0.', # { -oi > -oi } - 'iule2.', # { -elui > -el } - 'i1>', # { -i > - } - 'sid2.', # { -dis > -d } - 'sic2.', # { -cis > -c } - 'esoi4.', # { -iose > - } - 'ed1.', # { -de > -d } - 'ai2>', # { -ia > - } - 'a1>', # { -a > - } - 'adr1.', # { -rda > -rd } - 'tner5>', # { -rent > - } - 'evir1.', # { -rive > -riv } - 'evio4>', # { -oive > - } - 'evi3.', # { -ive > - } - 'fita4.', # { -atif > - } - 'fi2>', # { -if > - } - 'enie1.', # { -eine > -ein } - 'sare4>', # { -eras > - } - 'sari4>', # { -iras > - } - 'sard3.', # { -dras > -d } - 'sart2>', # { -tras > -tr } - 'sa2.', # { -as > - } - 'tnessa6>', # { -assent > - } - 'tnessu6>', # { -ussent > - } - 'tnegna3.', # { -angent > -ang } - 'tnegi3.', # { -igent > -ig } - 'tneg0.', # { -gent > -gent } - 'tneru5>', # { -urent > - } - 'tnemg0.', # { -gment > -gment } - 'tnerni4.', # { -inrent > -in } - 'tneiv1.', # { -vient > -vien } - 'tne3>', # { -ent > - } - 'une1.', # { -enu > -en } - 'en1>', # { -ne > -n } - 'nitn2.', # { -ntin > - } - 'ecnay5i.', # { -yance > -i } - 'ecnal1.', # { -lance > -lanc } - 'ecna4.', # { -ance > - } - 'ec1>', # { -ce > -c } - 'nn1.', # { -nn > -n } - 'rit2>', # { -tir > - } - 'rut2>', # { -tur > -t } - 'rud2.', # { -dur > -d } - 'ugn1>', # { -ngu > -ng } - 'eg1>', # { -ge > -g } - 'tuo0.', # { -out > -out } - 'tul2>', # { -lut > -l } - 't2>', # { -t > - } - 'ev1>', # { -ve > -v } - 'v2ve>', # { -v > -ev } - 'rtt1>', # { -ttr > -tt } - 'emissi6.', # { -issime > - } - 'em1.', # { -me > -m } - 'ehc1.', # { -che > -ch } - 'ci2c.', # { -ic > -ic } - 'libi2l.', # { -ibil > -ibl } - 'llie1.', # { -eill > -eil } - 'liei4i.', # { -ieil > -i } - 'xuev1.', # { -veux > -veu } - 'xuey4i.', # { -yeux > -i } - 'xueni5>', # { -ineux > - } - 'xuell4.', # { -lleux > -l } - 'xuere5.', # { -ereux > - } - 'xue3>', # { -eux > - } - 'rb3rb.', # { -br > -br } - 'tur2.', # { -rut > -r } - 'rir4re.', # { -rir > -er } - 'rir2.', # { -rir > -r } - 'c2ca.', # { -c > -ac } - 'snu1.', # { -uns > -un } - 'rta4.', # { -atr > - } - 'long2.', # { -gnol > -gn } - 'vec2.', # { -cev > -c } - '1c>', # { - > -c } - 'ssilp3.', # { -pliss > -pl } - 'silp2.', # { -plis > -pl } - 'thc2te.', # { -cht > -chet } - 'nm2ne.', # { -mn > -men } - 'llepp1.', # { -ppell > -ppel } - 'tan2.', # { -nat > -n } - 'rv3rve.', # { -vr > -evr } - 'rv3rve.', # { -vr > -evr } - 'r2re.', # { -r > -er } - 'r2re.', # { -r > -er } - 't2te.', # { -t > -et } - 't2te.', # { -t > -et } - 'epp1.', # { -ppe > -pp } - 'eya2i.', # { -aye > -ai } - 'ya1i.', # { -ay > -ai } - 'yo1i.', # { -oy > -oi } - 'esu1.', # { -use > -us } - 'ugi1.', # { -igu > -g } - 'tt1.', # { -tt > -t } - - # end rule: the stem has already been found - 'end0.' -); - -// returns the number of the first rule from the rule number $rule_number -// that can be applied to the given reversed form -// returns -1 if no rule can be applied, ie the stem has been found -function getFirstRule($reversed_form, $rule_number) { - global $PaiceHuskStemmerRules_fr; - global $rule_pattern; - $nb_rules = sizeOf($PaiceHuskStemmerRules_fr); - for ($i=$rule_number; $i<$nb_rules; $i++) { - // gets the letters from the current rule - $rule = $PaiceHuskStemmerRules_fr[$i]; - $rule = preg_replace($rule_pattern, "\\1", $rule); - //if (strncasecmp(utf8_decode($rule),$reversed_form,strlen(utf8_decode($rule))) == 0) return $i; - if (strncasecmp($rule, $reversed_form, strlen($rule)) == 0) return $i; - } - return -1; -} - - -/* - * Check the acceptability of a stem - * - * $reversed_stem: the stem to check in reverse form - */ -function checkAcceptability($reversed_stem) { - //if (preg_match("/[aeiouy]$/",utf8_encode($reversed_stem))) { - if (preg_match("/[aeiouy]$/",$reversed_stem)) { - // if the form starts with a vowel then at least two letters must remain after stemming (e.g.: "taient" --> "t") - return (strlen($reversed_stem) > 2); - } - else { - // if the form starts with a consonant then at least two letters must remain after stemming - if (strlen($reversed_stem) <= 2) { - return False; - } - // and at least one of these must be a vowel or "y" - //return (preg_match("/[aeiouy]/",utf8_encode($reversed_stem))); - return (preg_match("/[aeiouy]/", $reversed_stem)); - } -} - - -/* - * the actual Paice/Husk stemmer - * which returns a stem for the given form - * - * $form: the word for which we want the stem - */ -function PaiceHuskStemmer($form) { - global $PaiceHuskStemmerRules_fr; - global $rule_pattern; - $intact = True; - $stem_found = False; - $reversed_form = strrev(utf8_decode($form)); - $rule_number = 0; - // that loop goes through the rules' array until it finds an ending one (ending by '.') or the last one ('end0.') - while (True) { - $rule_number = getFirstRule($reversed_form, $rule_number); - if ($rule_number == -1) { - // no other rule can be applied => the stem has been found - break; - } - $rule = $PaiceHuskStemmerRules_fr[$rule_number]; - preg_match($rule_pattern, $rule, $matches); - if (($matches[2] != '*') || ($intact)) { - $reversed_stem = utf8_decode($matches[4]) . substr($reversed_form,$matches[3],strlen($reversed_form)-$matches[3]); - if (checkAcceptability($reversed_stem)) { - $reversed_form = $reversed_stem; - if ($matches[5] == '.') break; - } - else { - // go to another rule - $rule_number++; - } - } - else { - // go to another rule - $rule_number++; - } - } - - return utf8_encode(strrev($reversed_form)); - -} - -/* - Stem caching added by Rob Marsh, SJ - http://rmarsh.com -*/ - -$StemCache = array(); - -function stem($word) { - global $StemCache; - if (!isset($StemCache[$word])) { - $stemmedword = PaiceHuskStemmer($word); - $StemCache[$word] = $stemmedword; - } - else { - $stemmedword = $StemCache[$word] ; - } - return $stemmedword; -} - -?> diff --git a/blog/wp-content/plugins/similar-posts/languages/fr/stopwords.php b/blog/wp-content/plugins/similar-posts/languages/fr/stopwords.php deleted file mode 100644 index 8bcf90e..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/fr/stopwords.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/it/stemmer.php b/blog/wp-content/plugins/similar-posts/languages/it/stemmer.php deleted file mode 100644 index 5d0053e..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/it/stemmer.php +++ /dev/null @@ -1,362 +0,0 @@ -stem($word); -* -* All Italian characters are (originally) in latin1 (ISO-8859-1). -* -*/ -class ItalianStemmer { - var $vocali = array('a','e','i','o','u','','','','',''); - var $consonanti = array('b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z','I','U'); - var $accenti_acuti = array('','','','',''); - var $accenti_gravi = array('','','','',''); - - var $suffissi_step_0 = array('ci','gli','la','le','li','lo','mi','ne','si','ti','vi','sene','gliela','gliele','glieli','glielo','gliene','mela','mele','meli','melo','mene','tela','tele','teli','telo','tene','cela','cele','celi','celo','cene','vela','vele','veli','velo','vene'); - - var $suffissi_step_1_a = array('anza','anze','ico','ici','ica','ice','iche','ichi','ismo','ismi','abile','abili','ibile','ibili','ista','iste','isti','ist','ist','ist','oso','osi','osa','ose','mente','atrice','atrici','ante','anti'); - var $suffissi_step_1_b = array('azione','azioni','atore','atori'); - var $suffissi_step_1_c = array('logia','logie'); - var $suffissi_step_1_d = array('uzione','uzioni','usione','usioni'); - var $suffissi_step_1_e = array('enza','enze'); - var $suffissi_step_1_f = array('amento','amenti','imento','imenti'); - var $suffissi_step_1_g = array('amente'); - var $suffissi_step_1_h = array('it'); - var $suffissi_step_1_i = array('ivo','ivi','iva','ive'); - - var $suffissi_step_2 = array('ammo','ando','ano','are','arono','asse','assero','assi','assimo','ata','ate','ati','ato','ava','avamo','avano','avate','avi','avo','emmo','enda','ende','endi','endo','er','erai','eranno','ere','erebbe','erebbero','erei','eremmo','eremo','ereste','eresti','erete','er','erono','essero','ete','eva','evamo','evano','evate','evi','evo','Yamo','iamo','immo','ir','irai','iranno','ire','irebbe','irebbero','irei','iremmo','iremo','ireste','iresti','irete','ir','irono','isca','iscano','isce','isci','isco','iscono','issero','ita','ite','iti','ito','iva','ivamo','ivano','ivate','ivi','ivo','ono','uta','ute','uti','uto','ar','ir'); - - var $ante_suff_a = array('ando','endo'); - var $ante_suff_b = array('ar','er','ir'); - - function __construct() { - usort($this->suffissi_step_0,create_function('$a,$b','return strlen($a)>strlen($b) ? -1 : 1;')); - usort($this->suffissi_step_1_a,create_function('$a,$b','return strlen($a)>strlen($b) ? -1 : 1;')); - usort($this->suffissi_step_2,create_function('$a,$b','return strlen($a)>strlen($b) ? -1 : 1;')); - } - - function trim($str) { - return trim($str); - } - - function to_lower($str) { - return strtolower($str); - } - - function replace_acc_acuti($str) { - return str_replace($this->accenti_acuti, $this->accenti_gravi, $str); //strtr - } - - function put_u_after_q_to_upper($str) { - return str_replace("qu", "qU", $str); - } - - function i_u_between_vow_to_upper($str) { - $pattern = '/([aeiou])([iu])([aeiou])/e'; - $replacement = "'$1'.strtoupper('$2').'$3'"; - return preg_replace($pattern, $replacement, $str); - } - - function return_RV($str) { - /* - If the second letter is a consonant, RV is the region after the next following vowel, - or if the first two letters are vowels, RV is the region after the next consonant, and otherwise - (consonant-vowel case) RV is the region after the third letter. But RV is the end of the word if these positions cannot be found. - example, - m a c h o [ho] o l i v a [va] t r a b a j o [bajo] u r e o [eo] prezzo sprezzante - */ - - if(strlen($str)<2) return '';//$str; - - if(in_array($str[1],$this->consonanti)) { - $str = substr($str,2); - $str = strpbrk($str, implode($this->vocali)); - return substr($str,1); //secondo me devo mettere 1 - } - else if(in_array($str[0],$this->vocali) && in_array($str[1],$this->vocali)) { - $str = strpbrk($str, implode($this->consonanti)); - return substr($str,1); - } - else if(in_array($str[0],$this->consonanti) && in_array($str[1],$this->vocali)) { - return substr($str,3); - } - - } - - function return_R1($str){ - /* - R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if there is no such non-vowel. - example: - beautiful [iful] beauty [y] beau [NULL] animadversion [imadversion] sprinkled [kled] eucharist [harist] - */ - - $pattern = '/['.implode($this->vocali).']+'.'['.implode($this->consonanti).']'.'(.*)/'; - preg_match($pattern,$str,$matches); - - return count($matches)>=1 ? $matches[1] : ''; - } - - function return_R2($str) { - /* - R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the word if there is no such non-vowel. - example: - beautiful [ul] beauty [NULL] beau [NULL] animadversion [adversion] sprinkled [NULL] eucharist [ist] - */ - - $R1 = $this->return_R1($str); - - $pattern = '/['.implode($this->vocali).']+'.'['.implode($this->consonanti).']'.'(.*)/'; - preg_match($pattern,$R1,$matches); - - return count($matches)>=1 ? $matches[1] : ''; - } - - - function step_0($str) { - //Step 0: Attached pronoun - //Always do steps 0 - - $str_len = strlen($str); - $rv = $this->return_RV($str); - $rv_len = strlen($rv); - - $pos = 0; - foreach($this->suffissi_step_0 as $suff) { - if($rv_len-strlen($suff) < 0) continue; - $pos = strpos($rv,$suff,$rv_len-strlen($suff)); - if($pos !== false) break; - } - - $ante_suff = substr($rv,0,$pos); - $ante_suff_len = strlen($ante_suff); - - foreach($this->ante_suff_a as $ante_a) { - if($ante_suff_len-strlen($ante_a) < 0) continue; - $pos_a = strpos($ante_suff,$ante_a,$ante_suff_len-strlen($ante_a)); - if($pos_a !== false) { - return substr($str,0,$pos+$str_len-$rv_len); - } - } - - foreach($this->ante_suff_b as $ante_b) { - if($ante_suff_len-strlen($ante_b) < 0) continue; - $pos_b = strpos($ante_suff,$ante_b,$ante_suff_len-strlen($ante_b)); - if($pos_b !== false) { - return substr($str,0,$pos+$str_len-$rv_len).'e'; - } - } - - return $str; - } - - function delete_suff($arr_suff,$str,$str_len,$where,$ovunque=false) { - if($where==='r2') $r = $this->return_R2($str); - else if($where==='rv') $r = $this->return_RV($str); - else if($where==='r1') $r = $this->return_R1($str); - - $r_len = strlen($r); - - if($ovunque) { - foreach($arr_suff as $suff) { - if($str_len-strlen($suff) < 0) continue; - $pos = strpos($str,$suff,$str_len-strlen($suff)); - if($pos !== false) { - $pattern = '/'.$suff.'$/'; - $ret_str = preg_match($pattern,$r) ? substr($str,0,$pos) : ''; - if($ret_str !== '') return $ret_str; - break; - } - } - } - else { - foreach($arr_suff as $suff) { - if($r_len-strlen($suff) < 0) continue; - $pos = strpos($r,$suff,$r_len-strlen($suff)); - if($pos !== false) return substr($str,0,$pos+$str_len-$r_len); - } - } - } - - - function step_1($str) { - //Step 1: Standard suffix removal - //Always do steps 1 - - $str_len = strlen($str); - - //delete if in R1, if preceded by 'iv', delete if in R2 (and if further preceded by 'at', delete if in R2), otherwise, if preceded by 'os', 'ic' or 'abil', delete if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_g,$str,$str_len,'r1'))) { - if(count($ret_str1 = $this->delete_suff(array('iv'),$ret_str,strlen($ret_str),'r2'))) { - if(count($ret_str2 = $this->delete_suff(array('at'),$ret_str1,strlen($ret_str1),'r2'))) return $ret_str2; - else return $ret_str1; - } - else if(count($ret_str1 = $this->delete_suff(array('os','ic','abil'),$ret_str,strlen($ret_str),'r2'))) { - return $ret_str1; - } - else return $ret_str; - } - //delete if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_a,$str,$str_len,'r2',true))) return $ret_str; - //delete if in R2, if preceded by 'ic', delete if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_b,$str,$str_len,'r2'))) { - if(count($ret_str1 = $this->delete_suff(array('ic'),$ret_str,strlen($ret_str),'r2'))) { - return $ret_str1; - } - else return $ret_str; - } - //replace with 'log' if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_c,$str,$str_len,'r2'))) return $ret_str.'log'; - //replace with 'u' if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_d,$str,$str_len,'r2'))) return $ret_str.'u'; - //replace with 'ente' if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_e,$str,$str_len,'r2'))) return $ret_str.'ente'; - //delete if in RV - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_f,$str,$str_len,'rv'))) return $ret_str; - //delete if in R2, if preceded by 'abil', 'ic' or 'iv', delete if in R2 - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_h,$str,$str_len,'r2'))) { - if(count($ret_str1 = $this->delete_suff(array('abil','ic','iv'),$ret_str,strlen($ret_str),'r2'))) { - return $ret_str1; - } - else return $ret_str; - } - //delete if in R2, if preceded by 'at', delete if in R2 (and if further preceded by 'ic', delete if in R2) - if(count($ret_str = $this->delete_suff($this->suffissi_step_1_i,$str,$str_len,'r2'))) { - if(count($ret_str1 = $this->delete_suff(array('at'),$ret_str,strlen($ret_str),'r2'))) { - if(count($ret_str2 = $this->delete_suff(array('ic'),$ret_str1,strlen($ret_str1),'r2'))) return $ret_str2; - else return $ret_str1; - } - else return $ret_str; - } - - return $str; - } - - function step_2($str,$str_step_1) { - //Step 2: Verb suffixes - //Do step 2 if no ending was removed by step 1 - - if($str != $str_step_1) return $str_step_1; - - $str_len = strlen($str); - - if(count($ret_str = $this->delete_suff($this->suffissi_step_2,$str,$str_len,'rv'))) return $ret_str; - - return $str; - } - - function step_3a($str) { - //Step 3a: Delete a final 'a', 'e', 'i', 'o',' ', '', '' or '' if it is in RV, and a preceding 'i' if it is in RV ('crocchi' -> 'crocch', 'crocchio' -> 'crocch') - //Always do steps 3a - - $vocale_finale = array('a','e','i','o','','','',''); - - $str_len = strlen($str); - - if(count($ret_str = $this->delete_suff($vocale_finale,$str,$str_len,'rv'))) { - if(count($ret_str1 = $this->delete_suff(array('i'),$ret_str,strlen($ret_str),'rv'))) { - return $ret_str1; - } - else return $ret_str; - } - - return $str; - } - - function step_3b($str) { - //Step 3b: Replace final 'ch' (or 'gh') with 'c' (or 'g') if in 'RV' ('crocch' -> 'crocc') - //Always do steps 3b - - $rv = $this->return_RV($str); - - $pattern = '/([cg])h$/'; - $replacement = '${1}'; - return substr($str,0,strlen($str)-strlen($rv)).preg_replace($pattern,$replacement,$rv); - } - - function step_4($str) { - //Step 4: Finally, turn I and U back into lower case - - return strtolower($str); - } - - function stem($str){ - $str = $this->trim($str); - $str = $this->to_lower($str); - $str = $this->replace_acc_acuti($str); - $str = $this->put_u_after_q_to_upper($str); - $str = $this->i_u_between_vow_to_upper($str); - $step0 = $this->step_0($str); - $step1 = $this->step_1($step0); - $step2 = $this->step_2($step0,$step1); - $step3a = $this->step_3a($step2); - $step3b = $this->step_3b($step3a); - $step4 = $this->step_4($step3b); - - return $step4; - } - - -} - - -/* - Stem caching added by Rob Marsh, SJ - http://rmarsh.com -*/ - -if (!function_exists('strpbrk')) { - function strpbrk( $haystack, $char_list ) { - $strlen = strlen($char_list); - $found = false; - for( $i=0; $i<$strlen; $i++ ) { - if( ($tmp = strpos($haystack, $char_list{$i})) !== false ) { - if(!$found) { - $pos = $tmp; - $found = true; - continue; - } - $pos = min($pos, $tmp); - } - } - if(!$found) { - return false; - } - return substr($haystack, $pos); - } -} - -$Stemmer = new ItalianStemmer(); -$StemCache = array(); - -function stem($word) { - global $Stemmer, $StemCache; - if (!isset($StemCache[$word])) { - $stemmedword = $Stemmer->Stem($word); - $StemCache[$word] = $stemmedword; - } - else { - $stemmedword = $StemCache[$word] ; - } - return $stemmedword; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/languages/it/stopwords.php b/blog/wp-content/plugins/similar-posts/languages/it/stopwords.php deleted file mode 100644 index 7ce6f52..0000000 --- a/blog/wp-content/plugins/similar-posts/languages/it/stopwords.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/readme.txt b/blog/wp-content/plugins/similar-posts/readme.txt deleted file mode 100644 index e0d355e..0000000 --- a/blog/wp-content/plugins/similar-posts/readme.txt +++ /dev/null @@ -1,134 +0,0 @@ -=== Similar Posts === -Contributors: RobMarsh -Donate link: http://rmarsh.com/donate/similar-posts/ -Tags: posts, related, similar, related posts, similar posts, tags, post-plugins -Requires at least: 1.5 -Tested up to: 2.6.2 -Stable tag: 2.6.2.0 -Displays a list of posts similar to the current one based on content, title and/or tags. - -== Description == - -Similar Posts displays a list of posts that are similar or related to the current posts. The list can be customised in *many* ways. Similarity is judged according to a post's title, content, and tags and you can adjust the balance of factors to fit your own blog. - -This plugin **requires** the latest version of the *Post-Plugin Library:* [download it now](http://downloads.wordpress.org/plugin/post-plugin-library.zip). - -== Installation == - -1. IMPORTANT! If you are upgrading from a previous version first deactivate the plugin, then delete the plugin folder from your server. - -1. If you have the *Similar Posts Feed* plugin installed you must deactivate it before installing Similar Posts (which now does the same job). - -1. Upload the plugin folder to your /wp-content/plugins/ folder. If you haven't already you should also install the [Post-Plugin Library](http://wordpress.org/extend/plugins/post-plugin-library/)>. - -1. Go to the **Plugins** page and activate the plugin. - -1. Put `` at the place in your template where you want the list of related posts to appear or use the plugin as a widget. - -1. Use the **Options/Settings** page to adjust the behaviour of the plugin. - -[My web site](http://rmarsh.com/) has [full instructions](http://rmarsh.com/plugins/similar-posts/) and [information on customisation](http://rmarsh.com/plugins/post-options/). - -== Version History == - -* 2.6.2.0 - * fixed a problem with the stemming algorithm and overused words - * introduced a first stab at fuzzy matching - * new {imagealt} output tag -- rather like {imagesrc} - * {excerpt} can now trim to whole sentences - * content filter can now take parameter string - * widget can now take parameter string - * output can be appended to posts & feeds -* 2.6.1.3 - * fix - german language stemmer was crashing if mb_string fucntions not available -* 2.6.1.2 - * fix - german language stemmer file now in utf8 -* 2.6.1.1 - * fix to italian language stemmer for PHP4 -* 2.6.1.0 - * the current post can be marked manually - * widgets now honour the option to show no output if list is empty - * fixed a bug with finding the right language files -* 2.6.0.1 - * bug fix: installation code was failing on some systems -* 2.6.0.0 - * version bump to indicate compatibility with WP 2.6 - * fix to really include attachments - * new parameter for {imagesrc} to append a suffix to the image name, e.g. to get the thumbnail for attachments -* 2.5.0.11 - * new option to include attachments - * {php} tag now accepts nested tags - * new output tag {authorurl} -- permalink to archive of author's posts - * fix for numeric locale issue -* 2.5.0.10 - * new option to select algorithm for term extraction - * new manual links option - * fix for page selection in old versions of WP - * fix for faulty tags in Cyrillic -* 2.5.0.9 - * new option to match the current post's author - * extended options for snippet and excerpt output tags -* 2.5.0.7 - * new option to show by status, i.e., published/private/draft/future - * {categorynames} and {categorylinks} apply 'single_cat_name' filter - * fixes bug in WP pre-2.2 causing installation to fail -* 2.5.0 - * CJK digrams - * {image} has new post, link, and default parameters - * new {imagesrc} tag - * fix to empty category bug - * excluded posts bug fix - * fix for intermittent bug with 'omit current post' option -* 2.5b28 - * improvements to Similar Posts matching - * experiment with Chinese/Korean/Japanese matching -* 2.5b27 - * fixed bug with bulk indexing of tags -* 2.5b26 - * reverted thumbnail serving (speed) - * fix current post after extra query -* 2.5b25 - * option to sort output, group templates - * removed 'trim_before' option added more logical 'divider' - * {date:raw}, {commentdate:raw}, etc. - * fix for {image} resizing when and not - * {image} now serves real thumbnails -* 2.5b24 - * fix for recursive replacement by content filter - * fix to {gravatar} to allow for 'identicon' etc. - * fix to {commenter} to allow trimming - * fix a warning in safe mode - * fix for unsanitised WP tags -* 2.5b23 - * new option to filter on custom fields - * nested braces in {if}; condition now taggable - * improved bug report feature - * better way to omit user comments -* 2.5b22 - * restored automatic indexing on installation - * moved indexing menu under settings - * show_pages option can now show only pages - * fix for upgraders who had utf8 selected but no mbstring -* 2.5b20 - * optimised indexing for speed and memory use -* 2.5b19 - * fixing some extended character issues -* 2.5b18 - * fix output filter bug - * add conditional tag {if:condition:yes:no} -* 2.5b16 - * fix for {php} -* 2.5b15 - * fix more or less obscure bugs, add 'include posts' setting -* 2.5b14 - * fix file-encoding, installation error, etc. -* 2.5b12 - * fix serious bug for WP < 2.3 -* 2.5b11 - * some widget fixes -* 2.5b10 - * fix for non-creation of table -* 2.5b9 - * clarifying installation instructions - -* [previous versions](http://rmarsh.com/plugins/similar-posts/) diff --git a/blog/wp-content/plugins/similar-posts/similar-posts-admin.php b/blog/wp-content/plugins/similar-posts/similar-posts-admin.php deleted file mode 100644 index b58e3c2..0000000 --- a/blog/wp-content/plugins/similar-posts/similar-posts-admin.php +++ /dev/null @@ -1,745 +0,0 @@ -

    '; - _e('Similar Posts ', 'similar_posts'); - echo ''; - _e('help and instructions'); - echo '

    '; - if (!SimilarPosts::check_post_plugin_library('

    '.sprintf(__('Please install the %sPost Plugin Library%s plugin.'), '', '').'

    ')) return; - $m = new admin_subpages(); - $m->add_subpage('General', 'general', 'similar_posts_general_options_subpage'); - $m->add_subpage('Output', 'output', 'similar_posts_output_options_subpage'); - $m->add_subpage('Filter', 'filter', 'similar_posts_filter_options_subpage'); - $m->add_subpage('Placement', 'placement', 'similar_posts_placement_options_subpage'); - $m->add_subpage('Other', 'other', 'similar_posts_other_options_subpage'); - $m->add_subpage('Manage the Index', 'index', 'similar_posts_index_options_subpage'); - $m->add_subpage('Report a Bug', 'bug', 'similar_posts_bug_subpage'); - $m->add_subpage('Remove this Plugin', 'remove', 'similar_posts_remove_subpage'); - $m->display(); - add_action('in_admin_footer', 'similar_posts_admin_footer'); -} - -function similar_posts_admin_footer() { - ppl_admin_footer(str_replace('-admin', '', __FILE__), "similar-posts"); -} - -function similar_posts_general_options_subpage(){ - global $wpdb, $wp_version; - $options = get_option('similar-posts'); - if (isset($_POST['update_options'])) { - check_admin_referer('similar-posts-update-options'); - if (defined('POC_CACHE_4')) poc_cache_flush(); - // Fill up the options with the values chosen... - $options = ppl_options_from_post($options, array('limit', 'skip', 'show_private', 'show_pages', 'show_attachments', 'status', 'age', 'omit_current_post', 'match_cat', 'match_tags', 'match_author')); - update_option('similar-posts', $options); - // Show a message to say we've done something - echo '

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - - - -
    - - -
    -
    - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    '.__('Indexed %d posts.').'

    ', $termcount); - } else { - $options = get_option('similar-posts'); - } - ?> -
    - '.__('Manage Index', 'similar_posts').''; - echo '

    '.__('Similar Posts maintains a special index to help search for related posts. The index is created when the plugin is activated and then kept up-to-date automatically when posts are added, edited, or deleted.', 'similar_posts').'

    '; - echo '

    '.__('The options that affect the index can be set below.', 'similar_posts').'

    '; - echo '

    '.__('If you are using a language other than english you may find that the plugin mangles some characters since PHP is normally blind to multibyte characters. You can force the plugin to interpret extended characters as UTF-8 at the expense of a little speed but this facility is only available if your installation of PHP supports the mbstring functions.', 'similar_posts').'

    '; - echo '

    '.__('Languages like Chinese, Korean and Japanese pose a special difficulty for the full-text search algorithm. As an experiment I have introduced an option below to work around some of these issues. The text must be encoded as UTF-8. I would be very grateful for feedback from any users knowledgeable in these languages.', 'similar_posts').'

    '; - echo '

    '.__('Some related word forms should really be counted together, e.g., "follow", "follows", and "following". By default, Similar Posts treats such differences strictly but has two other algorithms which are more relaxed: stemming and fuzzy matching. The stemming algorithm tries to reduce related forms to their root stem. Stemming algorithms are provided for english, german, spanish, french and italian but stemmers for other languages can be created: see the help for instructions. Fuzzy matching uses the "metaphone" algorithm to handle word variations. Note: both stemming and fuzzy matching slow down the indexing more than a little. It is worth experimenting with the three possibilities to see what improves the similarity of posts in your particular circumstances.', 'similar_posts').'

    '; - echo '

    '.__('The indexing routine processes posts in batches of 100 by default. If you run into problems with limited memory you can opt to make the batches smaller.', 'similar_posts').'

    '; - echo '

    '.__('Note: the process of indexing may take a little while. On my modest machine 500 posts take between 5 seconds and 20 seconds (with stemming and utf-8 support). Don\'t worry if the screen fails to update until finished.', 'similar_posts').'

    '; - ?> -
    - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -
    - - -
    -
    -
    -

    '; - _e('Similar Posts Feed ', 'similar_posts'); - echo ''; - _e('help and instructions'); - echo '

    '; - $m = new admin_subpages(); - $m->add_subpage('General', 'general', 'similar_posts_feed_general_options_subpage'); - $m->add_subpage('Output', 'output', 'similar_posts_feed_output_options_subpage'); - $m->add_subpage('Filter', 'filter', 'similar_posts_feed_filter_options_subpage'); - $m->add_subpage('Other', 'other', 'similar_posts_feed_other_options_subpage'); - $m->add_subpage('Report a Bug', 'bug', 'similar_posts_feed_bug_subpage'); - $m->add_subpage('Remove this Plugin', 'remove', 'similar_posts_feed_remove_subpage'); - $m->display(); -} - -function similar_posts_feed_general_options_subpage(){ - global $wpdb, $wp_version; - $options = get_option('similar-posts-feed'); - if (isset($_POST['update_options'])) { - check_admin_referer('similar-posts-feed-update-options'); - if (defined('POC_CACHE_4')) poc_cache_flush(); - // Fill up the options with the values chosen... - $options = ppl_options_from_post($options, array('limit', 'skip', 'show_private', 'show_pages', 'show_attachments', 'status', 'age', 'omit_current_post', 'match_cat', 'match_tags', 'match_author')); - update_option('similar-posts-feed', $options); - // Show a message to say we've done something - echo '

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - - - -
    - - -
    -
    - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    -

    ' . __('Options saved', 'similar_posts') . '

    '; - } - //now we drop into html to display the option page form - ?> -
    -

    -
    -
    - - -
    -
    - -
    -
    - query("DROP TABLE `$table_name`"); - } - ppl_plugin_eradicate_form('eradicate', str_replace('-admin', '', __FILE__)); -} - -// sets up the index for the blog -function save_index_entries ($utf8=false, $use_stemmer='false', $batch=100, $cjk=false) { - global $wpdb, $table_prefix; - //$t0 = microtime(true); - $table_name = $table_prefix.'similar_posts'; - $wpdb->query("TRUNCATE `$table_name`"); - $termcount = 0; - $start = 0; - // in batches to conserve memory - while ($posts = $wpdb->get_results("SELECT `ID`, `post_title`, `post_content`, `post_type` FROM $wpdb->posts LIMIT $start, $batch", ARRAY_A)) { - reset($posts); - while (list($dummy, $post) = each($posts)) { - if ($post['post_type'] === 'revision') continue; - $content = sp_get_post_terms($post['post_content'], $utf8, $use_stemmer, $cjk); - $title = sp_get_title_terms($post['post_title'], $utf8, $use_stemmer, $cjk); - $postID = $post['ID']; - $tags = sp_get_tag_terms($postID, $utf8); - $wpdb->query("INSERT INTO `$table_name` (pID, content, title, tags) VALUES ($postID, \"$content\", \"$title\", \"$tags\")"); - $termcount = $termcount + 1; - } - $start += $batch; - if (!ini_get('safe_mode')) set_time_limit(30); - } - unset($posts); - //$t = microtime(true) - $t0; echo "t = $t
    "; - return $termcount; -} - -// this function gets called when the plugin is installed to set up the index and default options -function similar_posts_install() { - global $wpdb, $table_prefix; - - $table_name = $table_prefix . 'similar_posts'; - $errorlevel = error_reporting(0); - $suppress = $wpdb->hide_errors(); - $sql = "CREATE TABLE IF NOT EXISTS `$table_name` ( - `pID` bigint( 20 ) unsigned NOT NULL , - `content` longtext NOT NULL , - `title` text NOT NULL , - `tags` text NOT NULL , - FULLTEXT KEY `title` ( `title` ) , - FULLTEXT KEY `content` ( `content` ) , - FULLTEXT KEY `tags` ( `tags` ) - ) ENGINE = MyISAM CHARSET = utf8;"; - $wpdb->query($sql); - // MySQL before 4.1 doesn't recognise the character set properly, so if there's an error we can try without - if ($wpdb->last_error !== '') { - $sql = "CREATE TABLE IF NOT EXISTS `$table_name` ( - `pID` bigint( 20 ) unsigned NOT NULL , - `content` longtext NOT NULL , - `title` text NOT NULL , - `tags` text NOT NULL , - FULLTEXT KEY `title` ( `title` ) , - FULLTEXT KEY `content` ( `content` ) , - FULLTEXT KEY `tags` ( `tags` ) - ) ENGINE = MyISAM;"; - $wpdb->query($sql); - } - $options = (array) get_option('similar-posts-feed'); - // check each of the option values and, if empty, assign a default (doing it this long way - // lets us add new options in later versions) - if (!isset($options['limit'])) $options['limit'] = 5; - if (!isset($options['skip'])) $options['skip'] = 0; - if (!isset($options['age'])) {$options['age']['direction'] = 'none'; $options['age']['length'] = '0'; $options['age']['duration'] = 'month';} - if (!isset($options['divider'])) $options['divider'] = ''; - if (!isset($options['omit_current_post'])) $options['omit_current_post'] = 'true'; - if (!isset($options['show_private'])) $options['show_private'] = 'false'; - if (!isset($options['show_pages'])) $options['show_pages'] = 'false'; - if (!isset($options['show_attachments'])) $options['show_attachments'] = 'false'; - // show_static is now show_pages - if ( isset($options['show_static'])) {$options['show_pages'] = $options['show_static']; unset($options['show_static']);}; - if (!isset($options['none_text'])) $options['none_text'] = __('None Found', 'similar_posts'); - if (!isset($options['no_text'])) $options['no_text'] = 'false'; - if (!isset($options['tag_str'])) $options['tag_str'] = ''; - if (!isset($options['excluded_cats'])) $options['excluded_cats'] = ''; - if ($options['excluded_cats'] === '9999') $options['excluded_cats'] = ''; - if (!isset($options['included_cats'])) $options['included_cats'] = ''; - if ($options['included_cats'] === '9999') $options['included_cats'] = ''; - if (!isset($options['excluded_authors'])) $options['excluded_authors'] = ''; - if ($options['excluded_authors'] === '9999') $options['excluded_authors'] = ''; - if (!isset($options['included_authors'])) $options['included_authors'] = ''; - if ($options['included_authors'] === '9999') $options['included_authors'] = ''; - if (!isset($options['included_posts'])) $options['included_posts'] = ''; - if (!isset($options['excluded_posts'])) $options['excluded_posts'] = ''; - if ($options['excluded_posts'] === '9999') $options['excluded_posts'] = ''; - if (!isset($options['stripcodes'])) $options['stripcodes'] = array(array()); - if (!isset($options['prefix'])) $options['prefix'] = 'Similar Posts:
      '; - if (!isset($options['suffix'])) $options['suffix'] = '
    '; - if (!isset($options['output_template'])) $options['output_template'] = '
  • {link}
  • '; - if (!isset($options['match_cat'])) $options['match_cat'] = 'false'; - if (!isset($options['match_tags'])) $options['match_tags'] = 'false'; - if (!isset($options['match_author'])) $options['match_author'] = 'false'; - if (!isset($options['custom'])) {$options['custom']['key'] = ''; $options['custom']['op'] = '='; $options['custom']['value'] = '';} - if (!isset($options['sort'])) {$options['sort']['by1'] = ''; $options['sort']['order1'] = SORT_ASC; $options['sort']['case1'] = 'false';$options['sort']['by2'] = ''; $options['sort']['order2'] = SORT_ASC; $options['sort']['case2'] = 'false';} - if (!isset($options['status'])) {$options['status']['publish'] = 'true'; $options['status']['private'] = 'false'; $options['status']['draft'] = 'false'; $options['status']['future'] = 'false';} - if (!isset($options['group_template'])) $options['group_template'] = ''; - if (!isset($options['weight_content'])) $options['weight_content'] = 0.9; - if (!isset($options['weight_title'])) $options['weight_title'] = 0.1; - if (!isset($options['weight_tags'])) $options['weight_tags'] = 0.0; - if (!isset($options['num_terms'])) $options['num_terms'] = 20; - if (!isset($options['term_extraction'])) $options['term_extraction'] = 'frequency'; - if (!isset($options['hand_links'])) $options['hand_links'] = 'false'; - update_option('similar-posts-feed', $options); - - $options = (array) get_option('similar-posts'); - // check each of the option values and, if empty, assign a default (doing it this long way - // lets us add new options in later versions) - if (!isset($options['feed_active'])) $options['feed_active'] = 'false'; // deprecated - if (!isset($options['widget_condition'])) $options['widget_condition'] = ''; - if (!isset($options['widget_parameters'])) $options['widget_parameters'] = ''; - if (!isset($options['feed_on'])) $options['feed_on'] = 'false'; - if (!isset($options['feed_priority'])) $options['feed_priority'] = '10'; - if (!isset($options['feed_parameters'])) $options['feed_parameters'] = 'prefix='.__('Similar Posts', 'similar-posts').':
      &suffix=
    '; - if (!isset($options['append_on'])) $options['append_on'] = 'false'; - if (!isset($options['append_priority'])) $options['append_priority'] = '10'; - if (!isset($options['append_parameters'])) $options['append_parameters'] = 'prefix=

    '.__('Similar Posts', 'similar-posts').':

      &suffix=
    '; - if (!isset($options['append_condition'])) $options['append_condition'] = 'is_single()'; - if (!isset($options['limit'])) $options['limit'] = 5; - if (!isset($options['skip'])) $options['skip'] = 0; - if (!isset($options['age'])) {$options['age']['direction'] = 'none'; $options['age']['length'] = '0'; $options['age']['duration'] = 'month';} - if (!isset($options['divider'])) $options['divider'] = ''; - if (!isset($options['omit_current_post'])) $options['omit_current_post'] = 'true'; - if (!isset($options['show_private'])) $options['show_private'] = 'false'; - if (!isset($options['show_pages'])) $options['show_pages'] = 'false'; - if (!isset($options['show_attachments'])) $options['show_attachments'] = 'false'; - // show_static is now show_pages - if ( isset($options['show_static'])) {$options['show_pages'] = $options['show_static']; unset($options['show_static']);}; - if (!isset($options['none_text'])) $options['none_text'] = __('None Found', 'similar_posts'); - if (!isset($options['no_text'])) $options['no_text'] = 'false'; - if (!isset($options['tag_str'])) $options['tag_str'] = ''; - if (!isset($options['excluded_cats'])) $options['excluded_cats'] = ''; - if ($options['excluded_cats'] === '9999') $options['excluded_cats'] = ''; - if (!isset($options['included_cats'])) $options['included_cats'] = ''; - if ($options['included_cats'] === '9999') $options['included_cats'] = ''; - if (!isset($options['excluded_authors'])) $options['excluded_authors'] = ''; - if ($options['excluded_authors'] === '9999') $options['excluded_authors'] = ''; - if (!isset($options['included_authors'])) $options['included_authors'] = ''; - if ($options['included_authors'] === '9999') $options['included_authors'] = ''; - if (!isset($options['included_posts'])) $options['included_posts'] = ''; - if (!isset($options['excluded_posts'])) $options['excluded_posts'] = ''; - if ($options['excluded_posts'] === '9999') $options['excluded_posts'] = ''; - if (!isset($options['stripcodes'])) $options['stripcodes'] = array(array()); - if (!isset($options['prefix'])) $options['prefix'] = '
      '; - if (!isset($options['suffix'])) $options['suffix'] = '
    '; - if (!isset($options['output_template'])) $options['output_template'] = '
  • {link}
  • '; - if (!isset($options['match_cat'])) $options['match_cat'] = 'false'; - if (!isset($options['match_tags'])) $options['match_tags'] = 'false'; - if (!isset($options['match_author'])) $options['match_author'] = 'false'; - if (!isset($options['content_filter'])) $options['content_filter'] = 'false'; - if (!isset($options['custom'])) {$options['custom']['key'] = ''; $options['custom']['op'] = '='; $options['custom']['value'] = '';} - if (!isset($options['sort'])) {$options['sort']['by1'] = ''; $options['sort']['order1'] = SORT_ASC; $options['sort']['case1'] = 'false';$options['sort']['by2'] = ''; $options['sort']['order2'] = SORT_ASC; $options['sort']['case2'] = 'false';} - if (!isset($options['status'])) {$options['status']['publish'] = 'true'; $options['status']['private'] = 'false'; $options['status']['draft'] = 'false'; $options['status']['future'] = 'false';} - if (!isset($options['group_template'])) $options['group_template'] = ''; - if (!isset($options['weight_content'])) $options['weight_content'] = 0.9; - if (!isset($options['weight_title'])) $options['weight_title'] = 0.1; - if (!isset($options['weight_tags'])) $options['weight_tags'] = 0.0; - if (!isset($options['num_terms'])) $options['num_terms'] = 20; - if (!isset($options['term_extraction'])) $options['term_extraction'] = 'frequency'; - if (!isset($options['hand_links'])) $options['hand_links'] = 'false'; - if (!isset($options['utf8'])) $options['utf8'] = 'false'; - if (!function_exists('mb_internal_encoding')) $options['utf8'] = 'false'; - if (!isset($options['cjk'])) $options['cjk'] = 'false'; - if (!function_exists('mb_internal_encoding')) $options['cjk'] = 'false'; - if (!isset($options['use_stemmer'])) $options['use_stemmer'] = 'false'; - if (!isset($options['batch'])) $options['batch'] = '100'; - - update_option('similar-posts', $options); - - // initial creation of the index, if the table is empty - $num_index_posts = $wpdb->get_var("SELECT COUNT(*) FROM `$table_name`"); - if ($num_index_posts == 0) save_index_entries (($options['utf8'] === 'true'), 'false', $options['batch'], ($options['cjk'] === 'true')); - - // deactivate legacy Similar Posts Feed if present - $current = get_option('active_plugins'); - if (in_array('Similar_Posts_Feed/similar-posts-feed.php', $current)) { - array_splice($current, array_search('Similar_Posts_Feed/similar-posts-feed.php', $current), 1); - update_option('active_plugins', $current); - } - unset($current); - - // clear legacy custom fields - $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'similarterms'"); - - // clear legacy index - $indices = $wpdb->get_results("SHOW INDEX FROM $wpdb->posts", ARRAY_A); - foreach ($indices as $index) { - if ($index['Key_name'] === 'post_similar') { - $wpdb->query("ALTER TABLE $wpdb->posts DROP INDEX post_similar"); - break; - } - } - - $wpdb->show_errors($suppress); - error_reporting($errorlevel); -} - - - -if (!function_exists('ppl_plugin_basename')) { - if ( !defined('WP_PLUGIN_DIR') ) define( 'WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins' ); - function ppl_plugin_basename($file) { - $file = str_replace('\\','/',$file); // sanitize for Win32 installs - $file = preg_replace('|/+|','/', $file); // remove any duplicate slash - $plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR); // sanitize for Win32 installs - $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash - $file = preg_replace('|^' . preg_quote($plugin_dir, '|') . '/|','',$file); // get relative path from plugins dir - return $file; - } -} - -add_action('activate_'.str_replace('-admin', '', ppl_plugin_basename(__FILE__)), 'similar_posts_install'); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/similar-posts.php b/blog/wp-content/plugins/similar-posts/similar-posts.php deleted file mode 100644 index 0430482..0000000 --- a/blog/wp-content/plugins/similar-posts/similar-posts.php +++ /dev/null @@ -1,607 +0,0 @@ -highly configurable list of related posts. Similarity can be based on any combination of word usage in the content, title, or tags. Don't be disturbed if it takes a few moments to complete the installation -- the plugin is indexing your posts. Instructions and help online. Requires the latest version of the Post-Plugin Library to be installed. -Version: 2.6.2.0 -Author: Rob Marsh, SJ -Author URI: http://rmarsh.com/ -*/ - -/* -Copyright 2008 Rob Marsh, SJ (http://rmarsh.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: http://www.gnu.org/licenses/gpl.txt -*/ - -$similar_posts_version = $similar_posts_feed_version= '2.6.2.0'; - -/* - Template Tag: Displays the posts most similar to the current post. - e.g.: - Full help and instructions at http://rmarsh.com/plugins/post-options/ -*/ - -function similar_posts($args = '') { - echo SimilarPosts::execute($args); -} - -function similar_posts_mark_current(){ - global $post, $similar_posts_current_ID; - $similar_posts_current_ID = $post->ID; -} - -/* - - 'innards' - -*/ - - -if (!defined('DSEP')) define('DSEP', DIRECTORY_SEPARATOR); -if (!defined('POST_PLUGIN_LIBRARY')) SimilarPosts::install_post_plugin_library(); - -$similar_posts_current_ID = -1; - -class SimilarPosts { - - function execute($args='', $default_output_template='
  • {link}
  • ', $option_key='similar-posts'){ - if (!SimilarPosts::check_post_plugin_library(''.__('Post-Plugin Library missing').'')) return ''; - global $table_prefix, $wpdb, $wp_version, $similar_posts_current_ID; - $start_time = ppl_microtime(); - $postid = ppl_current_post_id($similar_posts_current_ID); - if (defined('POC_CACHE_4')) { - $cache_key = $option_key.$postid.$args; - $result = poc_cache_fetch($cache_key); - if ($result !== false) return $result . sprintf("", 1000 * (ppl_microtime() - $start_time)); - } - $table_name = $table_prefix . 'similar_posts'; - // First we process any arguments to see if any defaults have been overridden - $options = ppl_parse_args($args); - // Next we retrieve the stored options and use them unless a value has been overridden via the arguments - $options = ppl_set_options($option_key, $options, $default_output_template); - if (0 < $options['limit']) { - $match_tags = ($options['match_tags'] !== 'false' && $wp_version >= 2.3); - $exclude_cats = ($options['excluded_cats'] !== ''); - $include_cats = ($options['included_cats'] !== ''); - $exclude_authors = ($options['excluded_authors'] !== ''); - $include_authors = ($options['included_authors'] !== ''); - $exclude_posts = (trim($options['excluded_posts']) !== ''); - $include_posts = (trim($options['included_posts']) !== ''); - $match_category = ($options['match_cat'] === 'true'); - $match_author = ($options['match_author'] === 'true'); - $use_tag_str = ('' != trim($options['tag_str']) && $wp_version >= 2.3); - $omit_current_post = ($options['omit_current_post'] !== 'false'); - $hide_pass = ($options['show_private'] === 'false'); - $check_age = ('none' !== $options['age']['direction']); - $check_custom = (trim($options['custom']['key']) !== ''); - $limit = $options['skip'].', '.$options['limit']; - - //get the terms to do the matching - if ($options['term_extraction'] === 'pagerank') { - list( $contentterms, $titleterms, $tagterms) = sp_terms_by_textrank($postid, $options['num_terms']); - } else { - list( $contentterms, $titleterms, $tagterms) = sp_terms_by_freq($postid, $options['num_terms']); - } - // these should add up to 1.0 - $weight_content = $options['weight_content']; - $weight_title = $options['weight_title']; - $weight_tags = $options['weight_tags']; - // below a threshold we ignore the weight completely and save some effort - if ($weight_content < 0.001) $weight_content = (int) 0; - if ($weight_title < 0.001) $weight_title = (int) 0; - if ($weight_tags < 0.001) $weight_tags = (int) 0; - - $count_content = substr_count($contentterms, ' ') + 1; - $count_title = substr_count($titleterms, ' ') + 1; - $count_tags = substr_count($tagterms, ' ') + 1; - if ($weight_content) $weight_content = 57.0 * $weight_content / $count_content; - if ($weight_title) $weight_title = 18.0 * $weight_title / $count_title; - if ($weight_tags) $weight_tags = 24.0 * $weight_tags / $count_tags; - if ($options['hand_links'] === 'true') { - // check custom field for manual links - $forced_ids = $wpdb->get_var("SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $postid AND meta_key = 'sp_similar' ") ; - } - // the workhorse... - $sql = "SELECT *, "; - $sql .= score_fulltext_match($table_name, $weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms, $forced_ids); - - if ($check_custom) $sql .= "LEFT JOIN $wpdb->postmeta ON post_id = ID "; - - // build the 'WHERE' clause - $where = array(); - $where[] = where_fulltext_match($weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms); - if (!function_exists('get_post_type')) { - $where[] = where_hide_future(); - } else { - $where[] = where_show_status($options['status'], $options['show_attachments']); - } - if ($match_category) $where[] = where_match_category(); - if ($match_tags) $where[] = where_match_tags($options['match_tags']); - if ($match_author) $where[] = where_match_author(); - $where[] = where_show_pages($options['show_pages'], $options['show_attachments']); - if ($include_cats) $where[] = where_included_cats($options['included_cats']); - if ($exclude_cats) $where[] = where_excluded_cats($options['excluded_cats']); - if ($exclude_authors) $where[] = where_excluded_authors($options['excluded_authors']); - if ($include_authors) $where[] = where_included_authors($options['included_authors']); - if ($exclude_posts) $where[] = where_excluded_posts(trim($options['excluded_posts'])); - if ($include_posts) $where[] = where_included_posts(trim($options['included_posts'])); - if ($use_tag_str) $where[] = where_tag_str($options['tag_str']); - if ($omit_current_post) $where[] = where_omit_post($similar_posts_current_ID); - if ($hide_pass) $where[] = where_hide_pass(); - if ($check_age) $where[] = where_check_age($options['age']['direction'], $options['age']['length'], $options['age']['duration']); - if ($check_custom) $where[] = where_check_custom($options['custom']['key'], $options['custom']['op'], $options['custom']['value']); - $sql .= "WHERE ".implode(' AND ', $where); - if ($check_custom) $sql .= " GROUP BY $wpdb->posts.ID"; - $sql .= " ORDER BY score DESC LIMIT $limit"; - //echo $sql; - $results = $wpdb->get_results($sql); - } else { - $results = false; - } - if ($results) { - $translations = ppl_prepare_template($options['output_template']); - foreach ($results as $result) { - $items[] = ppl_expand_template($result, $options['output_template'], $translations, $option_key); - } - if ($options['sort']['by1'] !== '') $items = ppl_sort_items($options['sort'], $results, $option_key, $options['group_template'], $items); - $output = implode(($options['divider']) ? $options['divider'] : "\n", $items); - $output = $options['prefix'] . $output . $options['suffix']; - } else { - // if we reach here our query has produced no output ... so what next? - if ($options['no_text'] !== 'false') { - $output = ''; // we display nothing at all - } else { - // we display the blank message, with tags expanded if necessary - $translations = ppl_prepare_template($options['none_text']); - $output = $options['prefix'] . ppl_expand_template(array(), $options['none_text'], $translations, $option_key) . $options['suffix']; - } - } - if (defined('POC_CACHE_4')) poc_cache_store($cache_key, $output); - return ($output) ? $output . sprintf("", 1000 * (ppl_microtime() - $start_time)) : ''; - } - - // tries to install the post-plugin-library plugin - function install_post_plugin_library() { - $plugin_path = 'post-plugin-library/post-plugin-library.php'; - $current = get_option('active_plugins'); - if (!in_array($plugin_path, $current)) { - $current[] = $plugin_path; - update_option('active_plugins', $current); - do_action('activate_'.$plugin_path); - } - } - - function check_post_plugin_library($msg) { - $exists = function_exists('ppl_microtime'); - if (!$exists) echo $msg; - return $exists; - } - -} - -function sp_terms_by_freq($ID, $num_terms = 20) { - if (!$ID) return array('', '', ''); - global $wpdb, $table_prefix; - $table_name = $table_prefix . 'similar_posts'; - $terms = ''; - $results = $wpdb->get_results("SELECT title, content, tags FROM $table_name WHERE pID=$ID LIMIT 1", ARRAY_A); - if ($results) { - $word = strtok($results[0]['content'], ' '); - $n = 0; - $wordtable = array(); - while ($word !== false) { - $wordtable[$word] += 1; - $word = strtok(' '); - } - arsort($wordtable); - if ($num_terms < 1) $num_terms = 1; - $wordtable = array_slice($wordtable, 0, $num_terms); - - foreach ($wordtable as $word => $count) { - $terms .= ' ' . $word; - } - - $res[] = $terms; - $res[] = $results[0]['title']; - $res[] = $results[0]['tags']; - } - return $res; -} - - -// adapted PageRank algorithm see http://www.cs.unt.edu/~rada/papers/mihalcea.emnlp04.pdf -// and the weighted version http://www.cs.unt.edu/~rada/papers/hassan.ieee07.pdf -function sp_terms_by_textrank($ID, $num_terms = 20) { - global $wpdb, $table_prefix; - $table_name = $table_prefix . 'similar_posts'; - $terms = ''; - $results = $wpdb->get_results("SELECT title, content, tags FROM $table_name WHERE pID=$ID LIMIT 1", ARRAY_A); - if ($results) { - // build a directed graph with words as vertices and, as edges, the words which precede them - $prev_word = 'aaaaa'; - $graph = array(); - $word = strtok($results[0]['content'], ' '); - while ($word !== false) { - $graph[$word][$prev_word] += 1; // list the incoming words and keep a tally of how many times words co-occur - $out_edges[$prev_word] += 1; // count the number of different words that follow each word - $prev_word = $word; - $word = strtok(' '); - } - // initialise the list of PageRanks-- one for each unique word - reset($graph); - while (list($vertex, $in_edges) = each($graph)) { - $oldrank[$vertex] = 0.25; - } - $n = count($graph); - if ($n > 0) { - $base = 0.15 / $n; - $error_margin = $n * 0.005; - do { - $error = 0.0; - // the edge-weighted PageRank calculation - reset($graph); - while (list($vertex, $in_edges) = each($graph)) { - $r = 0; - reset($in_edges); - while (list($edge, $weight) = each($in_edges)) { - $r += ($weight * $oldrank[$edge]) / $out_edges[$edge]; - } - $rank[$vertex] = $base + 0.95 * $r; - $error += abs($rank[$vertex] - $oldrank[$vertex]); - } - $oldrank = $rank; - //echo $error . '
    '; - } while ($error > $error_margin); - arsort($rank); - if ($num_terms < 1) $num_terms = 1; - $rank = array_slice($rank, 0, $num_terms); - foreach ($rank as $vertex => $score) { - $terms .= ' ' . $vertex; - } - } - $res[] = $terms; - $res[] = $results[0]['title']; - $res[] = $results[0]['tags']; - } - return $res; -} - -function sp_save_index_entry($postID) { - global $wpdb, $table_prefix; - $table_name = $table_prefix . 'similar_posts'; - $post = $wpdb->get_row("SELECT post_content, post_title, post_type FROM $wpdb->posts WHERE ID = $postID", ARRAY_A); - if ($post['post_type'] === 'revision') return $postid; - //extract its terms - $options = get_option('similar-posts'); - $utf8 = ($options['utf8'] === 'true'); - $cjk = ($options['cjk'] === 'true'); - $content = sp_get_post_terms($post['post_content'], $utf8, $options['use_stemmer'], $cjk); - $title = sp_get_title_terms($post['post_title'], $utf8, $options['use_stemmer'], $cjk); - $tags = sp_get_tag_terms($postID, $utf8); - //check to see if the field is set - $pid = $wpdb->get_var("SELECT pID FROM $table_name WHERE pID=$postID limit 1"); - //then insert if empty - if (is_null($pid)) { - $wpdb->query("INSERT INTO $table_name (pID, content, title, tags) VALUES ($postID, \"$content\", \"$title\", \"$tags\")"); - } else { - $wpdb->query("UPDATE $table_name SET content=\"$content\", title=\"$title\", tags=\"$tags\" WHERE pID=$postID" ); - } - return $postID; -} - -function sp_delete_index_entry($postID) { - global $wpdb, $table_prefix; - $table_name = $table_prefix . 'similar_posts'; - $wpdb->query("DELETE FROM $table_name WHERE pID = $postID "); - return $postID; -} - -function sp_clean_words($text) { - $text = strip_tags($text); - $text = strtolower($text); - $text = str_replace("’", "'", $text); // convert MSWord apostrophe - $text = preg_replace(array('/\[(.*?)\]/', '/&[^\s;]+;/', '/‘|’|—|“|”|–|…/', "/'\W/"), ' ', $text); //anything in [..] or any entities or MS Word droppings - return $text; -} - -function sp_mb_clean_words($text) { - mb_regex_encoding('UTF-8'); - mb_internal_encoding('UTF-8'); - $text = strip_tags($text); - $text = mb_strtolower($text); - $text = str_replace("’", "'", $text); // convert MSWord apostrophe - $text = preg_replace(array('/\[(.*?)\]/u', '/&[^\s;]+;/u', '/‘|’|—|“|”|–|…/u', "/'\W/u"), ' ', $text); //anything in [..] or any entities - return $text; -} - -function sp_mb_str_pad($text, $n, $c) { - mb_internal_encoding('UTF-8'); - $l = mb_strlen($text); - if ($l > 0 && $l < $n) { - $text .= str_repeat($c, $n-$l); - } - return $text; -} - -function sp_cjk_digrams($string) { - mb_internal_encoding("UTF-8"); - $strlen = mb_strlen($string); - $ascii = ''; - $prev = ''; - $result = array(); - for ($i = 0; $i < $strlen; $i++) { - $c = mb_substr($string, $i, 1); - // single-byte chars get combined - if (strlen($c) > 1) { - if ($ascii) { - $result[] = $ascii; - $ascii = ''; - $prev = $c; - } else { - $result[] = sp_mb_str_pad($prev.$c, 4, '_'); - $prev = $c; - } - } else { - $ascii .= $c; - } - } - if ($ascii) $result[] = $ascii; - return implode(' ', $result); -} - -function sp_get_post_terms($text, $utf8, $use_stemmer, $cjk) { - global $overusedwords; - if ($utf8) { - mb_regex_encoding('UTF-8'); - mb_internal_encoding('UTF-8'); - $wordlist = mb_split("\W+", sp_mb_clean_words($text)); - $words = ''; - reset($wordlist); - while (list($n, $word) = each($wordlist)) { - if ( mb_strlen($word) > 3 && !isset($overusedwords[$word])) { - switch ($use_stemmer) { - case 'true': - $words .= sp_mb_str_pad(stem($word), 4, '_') . ' '; - break; - case 'fuzzy': - $words .= sp_mb_str_pad(metaphone($word), 4, '_') . ' '; - break; - case 'false': - default: - $words .= $word . ' '; - } - } - } - } else { - $wordlist = str_word_count(sp_clean_words($text), 1); - $words = ''; - reset($wordlist); - while (list($n, $word) = each($wordlist)) { - if ( strlen($word) > 3 && !isset($overusedwords[$word])) { - switch ($use_stemmer) { - case 'true': - $words .= str_pad(stem($word), 4, '_') . ' '; - break; - case 'fuzzy': - $words .= str_pad(metaphone($word), 4, '_') . ' '; - break; - case 'false': - default: - $words .= $word . ' '; - } - } - } - } - if ($cjk) $words = sp_cjk_digrams($words); - return $words; -} - -$tinywords = array('the' => 1, 'and' => 1, 'of' => 1, 'a' => 1, 'for' => 1, 'on' => 1); - -function sp_get_title_terms($text, $utf8, $use_stemmer, $cjk) { - global $tinywords; - if ($utf8) { - mb_regex_encoding('UTF-8'); - mb_internal_encoding('UTF-8'); - $wordlist = mb_split("\W+", sp_mb_clean_words($text)); - $words = ''; - foreach ($wordlist as $word) { - if (!isset($tinywords[$word])) { - switch ($use_stemmer) { - case 'true': - $words .= sp_mb_str_pad(stem($word), 4, '_') . ' '; - break; - case 'fuzzy': - $words .= sp_mb_str_pad(metaphone($word), 4, '_') . ' '; - break; - case 'false': - default: - $words .= sp_mb_str_pad($word, 4, '_') . ' '; - } - } - } - } else { - $wordlist = str_word_count(sp_clean_words($text), 1); - $words = ''; - foreach ($wordlist as $word) { - if (!isset($tinywords[$word])) { - switch ($use_stemmer) { - case 'true': - $words .= str_pad(stem($word), 4, '_') . ' '; - break; - case 'fuzzy': - $words .= str_pad(metaphone($word), 4, '_') . ' '; - break; - case 'false': - default: - $words .= str_pad($word, 4, '_') . ' '; - } - } - } - } - if ($cjk) $words = sp_cjk_digrams($words); - return $words; -} - -function sp_get_tag_terms($ID, $utf8) { - global $wpdb; - if (!function_exists('get_object_term_cache')) return ''; - $tags = array(); - $query = "SELECT t.name FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = 'post_tag' AND tr.object_id = '$ID'"; - $tags = $wpdb->get_col($query); - if (!empty ($tags)) { - if ($utf8) { - mb_internal_encoding('UTF-8'); - foreach ($tags as $tag) { - $newtags[] = sp_mb_str_pad(mb_strtolower(str_replace('"', "'", $tag)), 4, '_'); - } - } else { - foreach ($tags as $tag) { - $newtags[] = str_pad(strtolower(str_replace('"', "'", $tag)), 4, '_'); - } - } - $newtags = str_replace(' ', '_', $newtags); - $tags = implode (' ', $newtags); - } else { - $tags = ''; - } - return $tags; -} - -if ( is_admin() ) { - require(dirname(__FILE__).'/similar-posts-admin.php'); -} - -function widget_rrm_similar_posts_init() { - if (! function_exists("register_sidebar_widget")) { - return; - } - function widget_rrm_similar_posts($args) { - extract($args); - $options = get_option('widget_rrm_similar_posts'); - $opt = get_option('similar-posts'); - $widget_condition = $opt['widget_condition']; - // the condition specified in the widget control overrides the placement setting screen - if ($options['condition']) { - $condition = $options['condition']; - } else { - if ($widget_condition) { - $condition = $widget_condition; - } else { - $condition = 'true'; - } - } - $condition = (stristr($condition, "return")) ? $condition : "return ".$condition; - $condition = rtrim($condition, '; ') . ' || is_admin();'; - if (eval($condition)) { - $title = empty($options['title']) ? __('Similar Posts', 'similar_posts') : $options['title']; - if ( !$number = (int) $options['number'] ) - $number = 10; - else if ( $number < 1 ) - $number = 1; - else if ( $number > 15 ) - $number = 15; - $options = get_option('recent-posts'); - $widget_parameters = $options['widget_parameters']; - $output = SimilarPosts::execute('limit='.$number.'&'.$widget_parameters); - if ($output) { - echo $before_widget; - echo $before_title.$title.$after_title; - echo $output; - echo $after_widget; - } - } - } - function widget_rrm_similar_posts_control() { - if ( $_POST['widget_rrm_similar_posts_submit'] ) { - $options['title'] = strip_tags(stripslashes($_POST['widget_rrm_similar_posts_title'])); - $options['number'] = (int) $_POST["widget_rrm_similar_posts_number"]; - $options['condition'] = stripslashes(trim($_POST["widget_rrm_similar_posts_condition"], '; ')); - update_option("widget_rrm_similar_posts", $options); - } else { - $options = get_option('widget_rrm_similar_posts'); - } - $title = attribute_escape($options['title']); - if ( !$number = (int) $options['number'] ) - $number = 5; - $condition = attribute_escape($options['condition']); - ?> -

    -

    -

    - - There are many more options available. - {link}', 'similar-posts-feed') : $content; -} - -function similar_posts_init () { - global $overusedwords, $wp_db_version; - load_plugin_textdomain('similar_posts'); - - $options = get_option('similar-posts'); - if ($options['feed_active'] === 'true') add_filter('the_content', 'similar_posts_for_feed'); - if ($options['content_filter'] === 'true' && function_exists('ppl_register_content_filter')) ppl_register_content_filter('SimilarPosts'); - if ($options['feed_on'] === 'true' && function_exists('ppl_register_post_filter')) ppl_register_post_filter('feed', 'similar-posts', 'SimilarPosts'); - if ($options['append_condition']) { - $condition = $options['append_condition']; - } else { - $condition = 'true'; - } - $condition = (stristr($condition, "return")) ? $condition : "return ".$condition; - $condition = rtrim($condition, '; ') . ';'; - if ($options['append_on'] === 'true' && function_exists('ppl_register_post_filter')) ppl_register_post_filter('append', 'similar-posts', 'SimilarPosts', $condition); - - //install the actions to keep the index up to date - add_action('save_post', 'sp_save_index_entry', 1); - add_action('delete_post', 'sp_delete_index_entry', 1); - if ($wp_db_version < 3308 ) { - add_action('edit_post', 'sp_save_index_entry', 1); - add_action('publish_post', 'sp_save_index_entry', 1); - } -} - -add_action ('init', 'similar_posts_init', 1); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/similar-posts/similar-posts.pot b/blog/wp-content/plugins/similar-posts/similar-posts.pot deleted file mode 100644 index e618b36..0000000 --- a/blog/wp-content/plugins/similar-posts/similar-posts.pot +++ /dev/null @@ -1,248 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Rob Marsh, SJ -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://wordpress.org/tag/similar-posts\n" -"POT-Creation-Date: 2008-09-09 13:52+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: similar-posts-admin.php:6 -msgid "Similar Posts Options" -msgstr "" - -#: similar-posts-admin.php:6 similar-posts-admin.php:645 -#: similar-posts-admin.php:648 similar-posts.php:506 -msgid "Similar Posts" -msgstr "" - -#: similar-posts-admin.php:12 -msgid "Similar Posts Feed Options" -msgstr "" - -#: similar-posts-admin.php:12 -msgid "Similar Posts Feed" -msgstr "" - -#: similar-posts-admin.php:34 -msgid "Similar Posts " -msgstr "" - -#: similar-posts-admin.php:36 similar-posts-admin.php:345 -msgid "help and instructions" -msgstr "" - -#: similar-posts-admin.php:38 -#, php-format -msgid "Please install the %sPost Plugin Library%s plugin." -msgstr "" - -#: similar-posts-admin.php:66 similar-posts-admin.php:106 -#: similar-posts-admin.php:151 similar-posts-admin.php:186 -#: similar-posts-admin.php:226 similar-posts-admin.php:367 -#: similar-posts-admin.php:407 similar-posts-admin.php:452 -#: similar-posts-admin.php:494 -msgid "Options saved" -msgstr "" - -#: similar-posts-admin.php:71 similar-posts-admin.php:372 -msgid "General Settings" -msgstr "" - -#: similar-posts-admin.php:73 similar-posts-admin.php:89 -#: similar-posts-admin.php:374 similar-posts-admin.php:390 -msgid "Save General Settings" -msgstr "" - -#: similar-posts-admin.php:111 similar-posts-admin.php:412 -msgid "Output Settings" -msgstr "" - -#: similar-posts-admin.php:113 similar-posts-admin.php:134 -#: similar-posts-admin.php:414 similar-posts-admin.php:435 -msgid "Save Output Settings" -msgstr "" - -#: similar-posts-admin.php:156 similar-posts-admin.php:457 -msgid "Filter Settings" -msgstr "" - -#: similar-posts-admin.php:158 similar-posts-admin.php:169 -#: similar-posts-admin.php:459 similar-posts-admin.php:470 -msgid "Save Filter Settings" -msgstr "" - -#: similar-posts-admin.php:191 -msgid "Placement Settings" -msgstr "" - -#: similar-posts-admin.php:193 similar-posts-admin.php:202 -msgid "Save Placement Settings" -msgstr "" - -#: similar-posts-admin.php:231 similar-posts-admin.php:499 -msgid "Other Settings" -msgstr "" - -#: similar-posts-admin.php:233 similar-posts-admin.php:244 -#: similar-posts-admin.php:501 similar-posts-admin.php:511 -msgid "Save Other Settings" -msgstr "" - -#: similar-posts-admin.php:272 -#, php-format -msgid "Indexed %d posts." -msgstr "" - -#: similar-posts-admin.php:279 -msgid "Manage Index" -msgstr "" - -#: similar-posts-admin.php:280 -msgid "" -"Similar Posts maintains a special index to help search for related posts. " -"The index is created when the plugin is activated and then kept up-to-date " -"automatically when posts are added, edited, or deleted." -msgstr "" - -#: similar-posts-admin.php:281 -msgid "The options that affect the index can be set below." -msgstr "" - -#: similar-posts-admin.php:282 -msgid "" -"If you are using a language other than english you may find that the plugin " -"mangles some characters since PHP is normally blind to multibyte characters. " -"You \tcan force the plugin to interpret extended characters as UTF-8 at the " -"expense of a little speed but this facility is only available if your " -"installation of PHP supports the mbstring functions." -msgstr "" - -#: similar-posts-admin.php:283 -msgid "" -"Languages like Chinese, Korean and Japanese pose a special difficulty for " -"the full-text search algorithm. As an experiment I have introduced an option " -"below to work around some of these issues. The text must be encoded as UTF-" -"8. I would be very grateful for feedback from any users knowledgeable in " -"these languages." -msgstr "" - -#: similar-posts-admin.php:284 -msgid "" -"Some related word forms should really be counted together, e.g., \"follow\", " -"\"follows\", and \"following\". By default, Similar Posts treats such " -"differences strictly but has two other algorithms which are more relaxed: " -"stemming and fuzzy matching. The stemming algorithm tries " -"to reduce related forms to their root stem. Stemming algorithms are provided " -"for english, german, spanish, french and italian but stemmers for other " -"languages can be created: see the help for instructions. Fuzzy matching uses " -"the \"metaphone\" algorithm to handle word variations. Note: both stemming " -"and fuzzy matching slow down the indexing more than a little. It is worth " -"experimenting with the three possibilities to see what improves the " -"similarity of posts in your particular circumstances." -msgstr "" - -#: similar-posts-admin.php:285 -msgid "" -"The indexing routine processes posts in batches of 100 by default. If you " -"run into problems with limited memory you can opt to make the batches " -"smaller." -msgstr "" - -#: similar-posts-admin.php:286 -msgid "" -"Note: the process of indexing may take a little while. On my modest machine " -"500 posts take between 5 seconds and 20 seconds (with stemming and utf-8 " -"support). Don't worry if the screen fails to update until finished." -msgstr "" - -#: similar-posts-admin.php:291 -msgid "Handle extended characters?" -msgstr "" - -#: similar-posts-admin.php:300 -msgid "Treat as Chinese, Korean, or Japanese?" -msgstr "" - -#: similar-posts-admin.php:309 -msgid "Treat Related Word Variations:" -msgstr "" - -#: similar-posts-admin.php:319 -msgid "Batch size:" -msgstr "" - -#: similar-posts-admin.php:324 -msgid "Recreate Index" -msgstr "" - -#: similar-posts-admin.php:343 -msgid "Similar Posts Feed " -msgstr "" - -#: similar-posts-admin.php:604 similar-posts-admin.php:660 -msgid "None Found" -msgstr "" - -#: similar-posts.php:57 -msgid "Post-Plugin Library missing" -msgstr "" - -#: similar-posts.php:538 -msgid "Title:" -msgstr "" - -#: similar-posts.php:539 -msgid "Number of posts to show:" -msgstr "" - -#: similar-posts.php:539 -msgid "(at most 15)" -msgstr "" - -#: similar-posts.php:540 -#, php-format -msgid "Show only if page: (e.g., %sis_single()%s)" -msgstr "" - -#: similar-posts.php:545 similar-posts.php:546 -msgid "Similar Posts +" -msgstr "" - -#. Plugin Name of an extension -msgid "Similar Posts" -msgstr "" - -#. Plugin URI of an extension -msgid "http://rmarsh.com/plugins/similar-posts/" -msgstr "" - -#. Description of an extension -msgid "" -"Displays a highly " -"configurable list of related posts. Similarity can be based on any " -"combination of word usage in the content, title, or tags. Don't be disturbed " -"if it takes a few moments to complete the installation -- the plugin is " -"indexing your posts. Instructions and help " -"online. Requires the latest version of the Post-Plugin " -"Library to be installed." -msgstr "" - -#. Author of an extension -msgid "Rob Marsh, SJ" -msgstr "" - -#. Author URI of an extension -msgid "http://rmarsh.com/" -msgstr "" diff --git a/blog/wp-content/plugins/similar-posts/uninstall.php b/blog/wp-content/plugins/similar-posts/uninstall.php deleted file mode 100644 index 2d42612..0000000 --- a/blog/wp-content/plugins/similar-posts/uninstall.php +++ /dev/null @@ -1,11 +0,0 @@ -query("DROP TABLE `$table_name`"); - } -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/css/colors-classic.css b/blog/wp-content/plugins/theme-my-login/admin/css/colors-classic.css deleted file mode 100644 index 7c11c41..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/css/colors-classic.css +++ /dev/null @@ -1,71 +0,0 @@ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.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:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - -.ui-tabs { padding: 0; zoom: 1; } - -.ui-tabs .ui-tabs-nav, .ui-tabs .ui-tabs-panel .ui-tabs-nav { list-style: none; position: relative; padding: 0; } -.ui-tabs .ui-tabs-nav li, .ui-tabs .ui-tabs-panel .ui-tabs-nav li { position: relative; float: left; margin: 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs .ui-tabs-panel .ui-tabs-nav li a { float: left; text-decoration: none; padding: .4em 1em; } -.ui-tabs .ui-tabs-panel, .ui-tabs .ui-tabs-panel .ui-tabs-panel { padding: 0 0 1em 0; display: block; border: none; } -.ui-tabs .ui-tabs-panel .ui-tabs-panel { padding: 0; } -.ui-tabs .ui-tabs-hide, .ui-tabs .ui-tabs-panel .ui-tabs-hide { display: none !important; } - -.ui-widget-content { - border: 1px solid #aaaaaa; - background: #ffffff; -} - -.ui-widget-content .ui-widget-header { - border-bottom: 1px solid #aaaaaa; - background: #eaf3fa url(../../../../wp-admin/images/menu-bits-vs.gif) repeat-x scroll left -379px; - font: normal 13px/18px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; -} -.ui-widget-content .ui-widget-content .ui-widget-header { - border-bottom: 1px solid #e5e5e5; - background: #f9f9f9; - font: normal 11px/18px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; -} - -.ui-widget-content .ui-state-default { - border-right: 1px solid #d3d3d3; - background: transparent; - outline: none; -} - -.ui-widget-content .ui-widget-content .ui-state-default, -.ui-widget-content .ui-widget-content .ui-state-hover, -.ui-widget-content .ui-widget-content .ui-state-focus, -.ui-widget-content .ui-widget-content .ui-state-active { - border: 0; - background: none; -} - -.ui-widget-content .ui-state-active { - background: #3c6b95 url(../../../../wp-admin/images/menu-bits-vs.gif) top left repeat-x; - outline: none; -} - -.ui-widget-content .ui-state-active a, -.ui-widget-content .ui-state-active a:link, -.ui-widget-content .ui-state-active a:visited, -.ui-widget-content .ui-state-active a:hover { - color: #ffffff; - outline: none; - text-decoration: none; -} - -.ui-widget-content .ui-widget-content .ui-state-active a, -.ui-widget-content .ui-widget-content .ui-state-active a:link, -.ui-widget-content .ui-widget-content .ui-state-active a:visited { - color: #212121; - outline: none; - font-weight: bold; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/css/colors-fresh.css b/blog/wp-content/plugins/theme-my-login/admin/css/colors-fresh.css deleted file mode 100644 index 52bfb38..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/css/colors-fresh.css +++ /dev/null @@ -1,71 +0,0 @@ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.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:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - -.ui-tabs { padding: 0; zoom: 1; } - -.ui-tabs .ui-tabs-nav, .ui-tabs .ui-tabs-panel .ui-tabs-nav { list-style: none; position: relative; padding: 0; } -.ui-tabs .ui-tabs-nav li, .ui-tabs .ui-tabs-panel .ui-tabs-nav li { position: relative; float: left; margin: 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs .ui-tabs-panel .ui-tabs-nav li a { float: left; text-decoration: none; padding: .4em 1em; } -.ui-tabs .ui-tabs-panel, .ui-tabs .ui-tabs-panel .ui-tabs-panel { padding: 0 0 1em 0; display: block; border: none; } -.ui-tabs .ui-tabs-panel .ui-tabs-panel { padding: 0; } -.ui-tabs .ui-tabs-hide, .ui-tabs .ui-tabs-panel .ui-tabs-hide { display: none !important; } - -.ui-widget-content { - border: 1px solid #aaaaaa; - background: #ffffff; -} - -.ui-widget-content .ui-widget-header { - border-bottom: 1px solid #aaaaaa; - background: #f1f1f1 url(../../../../wp-admin/images/menu-bits.gif) repeat-x scroll left -379px; - font: normal 13px/18px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; -} -.ui-widget-content .ui-widget-content .ui-widget-header { - border-bottom: 1px solid #e5e5e5; - background: #f9f9f9; - font: normal 11px/18px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; -} - -.ui-widget-content .ui-state-default { - border-right: 1px solid #d3d3d3; - background: transparent; - outline: none; -} - -.ui-widget-content .ui-widget-content .ui-state-default, -.ui-widget-content .ui-widget-content .ui-state-hover, -.ui-widget-content .ui-widget-content .ui-state-focus, -.ui-widget-content .ui-widget-content .ui-state-active { - border: 0; - background: none; -} - -.ui-widget-content .ui-state-active { - background: #6d6d6d url(../../../../wp-admin/images/menu-bits.gif) top left repeat-x; - outline: none; -} - -.ui-widget-content .ui-state-active a, -.ui-widget-content .ui-state-active a:link, -.ui-widget-content .ui-state-active a:visited, -.ui-widget-content .ui-state-active a:hover { - color: #ffffff; - outline: none; - text-decoration: none; -} - -.ui-widget-content .ui-widget-content .ui-state-active a, -.ui-widget-content .ui-widget-content .ui-state-active a:link, -.ui-widget-content .ui-widget-content .ui-state-active a:visited { - color: #212121; - outline: none; - font-weight: bold; -} \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/css/theme-my-login-admin.css b/blog/wp-content/plugins/theme-my-login/admin/css/theme-my-login-admin.css deleted file mode 100644 index fc185b6..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/css/theme-my-login-admin.css +++ /dev/null @@ -1,10 +0,0 @@ -#tml-container { margin: 20px 0 5px 0; font-size: 12px; } - -#tml-container table th { width: 125px; } - -#tml-container table input.regular-text { width: 25em; } -#tml-container table input.extended-text { width: 40em; } -#tml-container table input.full-text { width: 99%; } -#tml-container table input.small-text { width: 50px; } - -#tml-container div div { font-size: 1em; } \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/includes/admin.php b/blog/wp-content/plugins/theme-my-login/admin/includes/admin.php deleted file mode 100644 index 7dd2b0d..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/includes/admin.php +++ /dev/null @@ -1,194 +0,0 @@ -options['activate_modules']) || isset($theme_my_login->options['deactivate_modules']) ) { - // Set a constant so we know that we're editing the modules in the 'update_option' sanatization function - define('TML_EDITING_MODULES', true); - - // If we have modules to activate - if ( isset($theme_my_login->options['activate_modules']) ) { - // Attempt to activate them - $result = jkf_tml_activate_modules($theme_my_login->options['activate_modules']); - // Check for WP_Error - if ( is_wp_error($result) ) { - // Loop through each module in the WP_Error object - foreach ( $result->get_error_data('plugins_invalid') as $module => $wp_error ) { - // Store the module and error message to a temporary array which will be passed to 'admin_notices' - if ( is_wp_error($wp_error) ) - $theme_my_login->options['module_errors'][$module] = $wp_error->get_error_message(); - } - } - // Unset the 'activate_modules' array - unset($theme_my_login->options['activate_modules']); - } - - // If we have modules to deactivate - if ( isset($theme_my_login->options['deactivate_modules']) ) { - // Deactive them - jkf_tml_deactivate_modules($theme_my_login->options['deactivate_modules']); - // Unset the 'deactivate_modules' array - unset($theme_my_login->options['deactivate_modules']); - } - - // Unset the constant - define('TML_EDITING_MODULES', false); - // Update the options in the DB - update_option('theme_my_login', $theme_my_login->options); - - // Redirect so that the newly activated modules can be included and newly unactivated modules can not be included - $redirect = isset($theme_my_login->options['module_errors']) ? admin_url('options-general.php?page=theme-my-login/admin/options.php') : add_query_arg('updated', 'true'); - wp_redirect($redirect); - exit(); - } - - // If we have errors to display, hook into 'admin_notices' to display them - if ( $theme_my_login->options['module_errors'] ) - add_action('admin_notices', 'jkf_tml_module_error_notice'); -} - -function jkf_tml_module_error_notice() { - global $theme_my_login; - - // If we have errors to display - if ( isset($theme_my_login->options['module_errors']) ) { - // Display them - echo '
    '; - foreach ( $theme_my_login->options['module_errors'] as $module => $error ) { - echo "

    ERROR: The module \"$module\" could not be activated ($error).

    "; - } - echo '
    '; - // Unset the error array - unset($theme_my_login->options['module_errors']); - // Update the options in the DB - update_option('theme_my_login', $theme_my_login->options); - } -} - -function jkf_tml_save_settings($settings) { - global $theme_my_login; - - if ( defined('TML_EDITING_MODULES') ) - return $settings; - - // Assign current settings - $current = $theme_my_login->options; - - // Sanitize new settings - $settings['page_id'] = absint($settings['page_id']); - $settings['show_page'] = isset($settings['show_page']) ? 1 : 0; - $settings['rewrite_links'] = isset($settings['rewrite_links']) ? 1 : 0; - $settings['enable_css'] = isset($settings['enable_css']) ? 1 : 0; - $settings['enable_template_tag'] = isset($settings['enable_template_tag']) ? 1 : 0; - $settings['enable_widget'] = isset($settings['enable_widget']) ? 1 : 0; - //$settings['active_modules'] = isset($settings['active_modules']) ? (array) $settings['active_modules'] : array(); - $settings['modules'] = isset($settings['modules']) ? (array) $settings['modules'] : array(); - - // Set modules to be activated - if ( $activate = array_diff($settings['modules'], (array) $current['active_modules']) ) - $settings['activate_modules'] = $activate; - - // Set modules to be deactivated - if ( $deactivate = array_diff((array) $current['active_modules'], $settings['modules']) ) - $settings['deactivate_modules'] = $deactivate; - - // Unset 'modules' as it is only relevent here - unset($settings['modules']); - - // Merge current settings - $settings = wp_parse_args($settings, $current); - - // Allow plugins/modules to add/modify settings - $settings = apply_filters('tml_save_settings', $settings); - - return $settings; -} - -function jkf_tml_install() { - $previous_install = get_option('theme_my_login'); - if ( $previous_install ) { - if ( version_compare($previous_install['version'], '4.4', '<') ) { - global $wp_roles; - if ( $wp_roles->is_role('denied') ) - $wp_roles->remove_role('denied'); - } - } - - $insert = array( - 'post_title' => 'Login', - 'post_status' => 'publish', - 'post_type' => 'page', - 'post_author' => 1, - 'post_content' => '[theme-my-login show_title="0" before_widget="" after_widget="" instance_id="tml-page"]', - 'comment_status' => 'closed', - 'ping_status' => 'closed' - ); - - $login_page = get_page_by_title('Login'); - $page_id = ( $login_page ) ? $login_page->ID : wp_insert_post($insert); - - $options = wp_parse_args($previous_install, jkf_tml_default_settings()); - - $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/theme-my-login/theme-my-login.php'); - $options = array_merge(array('version' => $plugin_data['Version'], 'page_id' => $page_id), $options); - return update_option('theme_my_login', $options); -} - -function jkf_tml_uninstall() { - $options = get_option('theme_my_login'); - - require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); - - // Run module uninstall hooks - $modules = get_plugins('/theme-my-login/modules'); - foreach ( array_keys($modules) as $module ) { - $module = plugin_basename(trim($module)); - - $valid = jkf_tml_validate_module($module); - if ( is_wp_error($valid) ) - continue; - - @include (TML_MODULE_DIR . '/' . $module); - do_action('uninstall_' . trim($module)); - } - - // Delete the page - if ( get_page($options['page_id']) ) - wp_delete_post($options['page_id']); - - // Delete options - delete_option('theme_my_login'); - delete_option('widget_theme-my-login'); -} - -?> diff --git a/blog/wp-content/plugins/theme-my-login/admin/includes/module.php b/blog/wp-content/plugins/theme-my-login/admin/includes/module.php deleted file mode 100644 index c49fe44..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/includes/module.php +++ /dev/null @@ -1,146 +0,0 @@ -options['active_modules']); - return in_array($module, $current); -} - -function jkf_tml_activate_module($module) { - global $theme_my_login; - $module = plugin_basename(trim($module)); - - $valid = jkf_tml_validate_module($module); - if ( is_wp_error($valid) ) - return $valid; - - if ( !in_array($module, $theme_my_login->options['active_modules']) ) { - //ob_start(); - @include (TML_MODULE_DIR . '/' . $module); - $theme_my_login->options['active_modules'][] = $module; - sort($theme_my_login->options['active_modules']); - do_action('tml_activate_module', trim($module)); - // We will not use this since our function modifies the global plugin object instead of saving to the DB - //update_option('theme_my_login', $current); - do_action('activate_' . trim($module)); - do_action('tml_activated_module', trim($module)); - //ob_end_clean(); - } - - return null; -} - -function jkf_tml_deactivate_modules($modules, $silent= false) { - global $theme_my_login; - - if ( ! is_array($modules) ) - $modules = array($modules); - - foreach ( $modules as $module ) { - $module = plugin_basename($module); - if( ! jkf_tml_is_module_active($module) ) - continue; - if ( ! $silent ) - do_action('tml_deactivate_module', trim($module)); - - $key = array_search( $module, (array) $theme_my_login->options['active_modules'] ); - - if ( false !== $key ) - array_splice( $theme_my_login->options['active_modules'], $key, 1 ); - - if ( ! $silent ) { - do_action( 'deactivate_' . trim( $module ) ); - do_action( 'tml_deactivated_module', trim( $module ) ); - } - } - - // We will not use this since the function modifies our global plugin object instead of saving to the DB - //update_option('theme_my_login', $current); -} - -function jkf_tml_activate_modules($modules) { - if ( !is_array($modules) ) - $modules = array($modules); - - $errors = array(); - foreach ( (array) $modules as $module ) { - $result = jkf_tml_activate_module($module); - if ( is_wp_error($result) ) - $errors[$module] = $result; - } - - if ( !empty($errors) ) - return new WP_Error('plugins_invalid', __('One of the plugins is invalid.'), $errors); - - return true; -} - -function jkf_tml_validate_module($module) { - if ( validate_file($module) ) - return new WP_Error('plugin_invalid', __('Invalid plugin path.')); - if ( ! file_exists(TML_MODULE_DIR . '/' . $module) ) - return new WP_Error('plugin_not_found', __('Plugin file does not exist.')); - - $installed_modules = get_plugins('/theme-my-login/modules'); - if ( ! isset($installed_modules[$module]) ) - return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.')); - return 0; -} - -function jkf_tml_add_menu_page($menu_title, $file, $function = '', $position = NULL) { - global $jkf_tml_admin_menu; - - $file = plugin_basename($file); - - $hookname = get_plugin_page_hookname($file, ''); - $hookname = preg_replace('|[^a-zA-Z0-9_:.]|', '-', $hookname); - if ( !empty($function) && !empty($hookname) ) - add_action($hookname, $function); - - $new_menu = array($menu_title, $file, $hookname); - - if ( NULL === $position ) - $jkf_tml_admin_menu[] = $new_menu; - else - $jkf_tml_admin_menu[$position] = $new_menu; - - return $hookname; -} - -function jkf_tml_add_submenu_page($parent, $menu_title, $file, $function = '') { - global $jkf_tml_admin_submenu; - - $file = plugin_basename($file); - $parent = plugin_basename($parent); - - $count = is_array($jkf_tml_admin_submenu[$parent]) ? count($jkf_tml_admin_submenu[$parent]) + 1 : 1; - - $hookname = get_plugin_page_hookname($parent . '-' . $count, ''); - $hookname = preg_replace('|[^a-zA-Z0-9_:.]|', '-', $hookname); - if ( !empty($function) && !empty($hookname) ) - add_action($hookname, $function); - - $jkf_tml_admin_submenu[$parent][] = array($menu_title, $file, $hookname); - - return $hookname; -} - -function jkf_tml_load_admin_page($file, $hook = '') { - global $theme_my_login; - if ( $hook && has_action($hook) ) { - do_action("load-$hook"); - do_action($hook); - } else { - if ( validate_file($file) ) - return false; - - if ( ! ( file_exists(WP_PLUGIN_DIR . "/$file") && is_file(WP_PLUGIN_DIR . "/$file") ) ) - return false; - - do_action("load-$file"); - include (WP_PLUGIN_DIR . "/$file"); - } - return true; -} - -?> diff --git a/blog/wp-content/plugins/theme-my-login/admin/js/theme-my-login-admin.js b/blog/wp-content/plugins/theme-my-login/admin/js/theme-my-login-admin.js deleted file mode 100644 index d520212..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/js/theme-my-login-admin.js +++ /dev/null @@ -1,16 +0,0 @@ -jQuery(document).ready(function($){ - - $("#tml-container").tabs({ - select: function(event, ui) { - setUserSetting( 'tml0', ui.index ); - }, - selected: getUserSetting( 'tml0', 0 ) - }); - - $("#tml-container div").tabs({ - select: function(event, ui) { - setUserSetting( 'tml1', ui.index ); - }, - selected: getUserSetting( 'tml1', 0 ) - }); -}); \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/options-basic.php b/blog/wp-content/plugins/theme-my-login/admin/options-basic.php deleted file mode 100644 index e66f6d8..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/options-basic.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - options); ?> -
    - -

    -
    - options['show_page']); ?> /> - -

    -
    - options['rewrite_links']); ?> /> - -

    -
    - options['enable_css']); ?> /> - -

    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/options-modules.php b/blog/wp-content/plugins/theme-my-login/admin/options-modules.php deleted file mode 100644 index c522aff..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/options-modules.php +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - options); ?> -
    - $module_data ) : ?> - options['active_modules'])); ?> /> -
    - ' . $module_data['Description'] . '

    '; ?> - -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/options-optimization.php b/blog/wp-content/plugins/theme-my-login/admin/options-optimization.php deleted file mode 100644 index c4a925a..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/options-optimization.php +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - options); ?> -
    - options['enable_template_tag']); ?> /> -
    -

    - - options['enable_widget']); ?> /> -
    -

    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/admin/options.php b/blog/wp-content/plugins/theme-my-login/admin/options.php deleted file mode 100644 index 4cd6e03..0000000 --- a/blog/wp-content/plugins/theme-my-login/admin/options.php +++ /dev/null @@ -1,59 +0,0 @@ - - -
    -

    donating through PayPal!', 'theme-my-login'); ?>

    -
    - -
    - -

    - -
    - - -
    - - - - - ' . "\n"; - if ( isset($jkf_tml_admin_submenu[$tml_menu[1]]) ) { - echo '
      ' . "\n"; - foreach ( $jkf_tml_admin_submenu[$tml_menu[1]] as $tml_submenu ) { - echo '
    • ' . $tml_submenu[0] . '
    • ' . "\n"; - } - echo '
    ' . "\n"; - - foreach ( $jkf_tml_admin_submenu[$tml_menu[1]] as $tml_submenu ) { - echo '
    ' . "\n"; - jkf_tml_load_admin_page($tml_submenu[1], $tml_submenu[2]); - echo '
    ' . "\n"; - } - } else { - jkf_tml_load_admin_page($tml_menu[1], $tml_menu[2]); - } - echo '
    ' . "\n"; - } ?> - -
    - -

    - - - \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/includes/functions.php b/blog/wp-content/plugins/theme-my-login/includes/functions.php deleted file mode 100644 index ab89fb9..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/functions.php +++ /dev/null @@ -1,70 +0,0 @@ - 1, - 'rewrite_links' => 1, - 'enable_css' => 1, - 'enable_template_tag' => 0, - 'enable_widget' => 0, - 'active_modules' => array() - ); - return apply_filters('tml_default_settings', $options); -} - -function jkf_tml_get_instance() { - static $instance = 0; - ++$instance; - return "tml-$instance"; -} - -function jkf_tml_get_current_url($query = '') { - $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; - $self = $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; - - $keys = array('instance', 'action', 'checkemail', 'error', 'loggedout', 'registered', 'redirect_to', 'updated', 'key', '_wpnonce'); - $url = remove_query_arg($keys, $self); - - if ( !empty($query) ) { - $query = wp_parse_args($query); - $url = add_query_arg($query, $url); - } - - return $url; -} - -function jkf_tml_get_css($file = 'theme-my-login.css') { - if ( file_exists(get_stylesheet_directory() . "/$file") ) - $css_file = get_stylesheet_directory_uri() . "/$file"; - elseif ( file_exists(get_template_directory() . "/$file") ) - $css_file = get_template_directory_uri() . "/$file"; - else - $css_file = plugins_url("/theme-my-login/$file"); - - wp_enqueue_style('theme-my-login', $css_file); -} - -function jkf_tml_load_active_modules() { - global $theme_my_login; - - $current_modules = apply_filters( 'tml_active_modules', $theme_my_login->options['active_modules'] ); - if ( is_array($current_modules) ) { - foreach ( $current_modules as $module ) { - // check the $plugin filename - // Validate plugin filename - if ( validate_file($module) // $module must validate as file - || '.php' != substr($module, -4) // $module must end with '.php' - || !file_exists(TML_MODULE_DIR . '/' . $module) // $module must exist - ) - continue; - - include_once(TML_MODULE_DIR . '/' . $module); - } - unset($module); - } - unset($current_modules); - - do_action('tml_modules_loaded'); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/includes/hook-functions.php b/blog/wp-content/plugins/theme-my-login/includes/hook-functions.php deleted file mode 100644 index ff0b559..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/hook-functions.php +++ /dev/null @@ -1,88 +0,0 @@ -options['page_id'] == $post_id ) { - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/template-functions.php'); - $action = ( 'tml-page' == $theme_my_login->request_instance ) ? $theme_my_login->request_action : 'login'; - $title = jkf_tml_get_title($action); - } - return $title; -} - -function jkf_tml_single_post_title($title) { - global $theme_my_login; - if ( is_page($theme_my_login->options['page_id']) ) { - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/template-functions.php'); - $action = ( 'tml-page' == $theme_my_login->request_instance ) ? $theme_my_login->request_action : 'login'; - $title = jkf_tml_get_title($action); - } - return $title; -} - -function jkf_tml_site_url($url, $path, $orig_scheme) { - global $theme_my_login; - if ( strpos($url, 'wp-login.php') !== false && !isset($_REQUEST['interim-login']) ) { - $orig_url = $url; - $url = get_permalink($theme_my_login->options['page_id']); - if ( strpos($orig_url, '?') ) { - $query = substr($orig_url, strpos($orig_url, '?') + 1); - parse_str($query, $r); - $url = add_query_arg($r, $url); - } - } - return $url; -} - -function jkf_tml_list_pages_excludes($exclude_array) { - global $theme_my_login; - if ( !$theme_my_login->options['show_page'] ) - $exclude_array[] = $theme_my_login->options['page_id']; - return $exclude_array; -} - -function jkf_tml_page_link($link, $id) { - global $theme_my_login; - if ( $id == $theme_my_login->options['page_id'] ) { - if ( is_user_logged_in() ) - $link = wp_nonce_url(add_query_arg('action', 'logout', $link), 'log-out'); - } - return $link; -} - -function jkf_tml_get_pages($pages, $attributes) { - global $theme_my_login; - if ( is_admin() ) - return $pages; - // It sucks there's not really a better way to do this - if ( $theme_my_login->options['show_page'] ) { - foreach ( $pages as $page ) { - if ( $page->ID == $theme_my_login->options['page_id'] ) { - if ( is_user_logged_in() ) - $page->post_title = __('Log out'); - else - $page->post_title = __('Log In'); - } - } - } - return $pages; -} - -function jkf_tml_shortcode($atts = '') { - global $theme_my_login; - - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/template-functions.php'); - - if ( empty($atts['instance_id']) ) - $atts['instance_id'] = jkf_tml_get_instance(); - - if ( $theme_my_login->request_instance == $atts['instance_id'] ) - $atts['is_active'] = 1; - - $theme_my_login->current_instance = shortcode_atts(jkf_tml_get_display_options(), $atts); - return jkf_tml_display(); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/includes/login-actions.php b/blog/wp-content/plugins/theme-my-login/includes/login-actions.php deleted file mode 100644 index 2a4a8d1..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/login-actions.php +++ /dev/null @@ -1,145 +0,0 @@ -errors = new WP_Error(); - -// validate action so as to default to the login screen -if ( !in_array($theme_my_login->request_action, array('logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login'), true) && false === has_filter('login_action_' . $theme_my_login->request_action) ) - $theme_my_login->request_action = 'login'; - -//Set a cookie now to see if they are supported by the browser. -setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN); -if ( SITECOOKIEPATH != COOKIEPATH ) - setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN); - -// allow plugins to override the default actions, and to add extra actions if they want -if ( has_filter('login_action_' . $theme_my_login->request_action) ) : - -do_action('login_action_' . $theme_my_login->request_action); - -else : - -$http_post = ('POST' == $_SERVER['REQUEST_METHOD']); -switch ( $theme_my_login->request_action ) { - case 'logout' : - check_admin_referer('log-out'); - - $user = wp_get_current_user(); - - $redirect_to = site_url('wp-login.php?loggedout=true'); - $redirect_to = apply_filters('logout_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); - - wp_logout(); - - wp_safe_redirect($redirect_to); - exit(); - break; - case 'lostpassword' : - case 'retrievepassword' : - if ( $http_post ) { - require_once(WP_PLUGIN_DIR . '/theme-my-login/includes/login-functions.php'); - $theme_my_login->errors = retrieve_password(); - if ( !is_wp_error($theme_my_login->errors) ) { - $redirect_to = site_url('wp-login.php?checkemail=confirm'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('checkemail=confirm&instance=' . $theme_my_login->request_instance); - wp_redirect($redirect_to); - exit(); - } - } - - if ( isset($_REQUEST['error']) && 'invalidkey' == $_REQUEST['error'] ) $theme_my_login->errors->add('invalidkey', __('Sorry, that key does not appear to be valid.')); - break; - case 'resetpass' : - case 'rp' : - require_once(WP_PLUGIN_DIR . '/theme-my-login/includes/login-functions.php'); - $theme_my_login->errors = reset_password($_GET['key'], $_GET['login']); - - if ( ! is_wp_error($theme_my_login->errors) ) { - $redirect_to = site_url('wp-login.php?checkemail=newpass'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('checkemail=newpass&instance=' . $theme_my_login->request_instance); - $redirect_to = apply_filters('resetpass_redirect', $redirect_to); - wp_redirect($redirect_to); - exit(); - } - - $redirect_to = site_url('wp-login.php?action=lostpassword&error=invalidkey'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('action=lostpassword&error=invalidkey&instance=' . $theme_my_login->request_instance); - wp_redirect($redirect_to); - exit(); - break; - case 'register' : - if ( !get_option('users_can_register') ) { - wp_redirect(jkf_tml_get_current_url('registration=disabled')); - exit(); - } - - $user_login = ''; - $user_email = ''; - $user_pass = ''; - if ( $http_post ) { - require_once(ABSPATH . WPINC . '/registration.php'); - require_once(WP_PLUGIN_DIR . '/theme-my-login/includes/login-functions.php'); - - $user_login = $_POST['user_login']; - $user_email = $_POST['user_email']; - if ( $options['custom_pass'] && isset($_POST['pass1']) && '' != $_POST['pass1'] ) - $user_pass = stripslashes($_POST['pass1']); - $theme_my_login->errors = register_new_user($user_login, $user_email); - if ( !is_wp_error($theme_my_login->errors) ) { - $redirect_to = site_url('wp-login.php?checkemail=registered'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('checkemail=registered&instance=' . $theme_my_login->request_instance); - $redirect_to = apply_filters('register_redirect', $redirect_to); - wp_redirect($redirect_to); - exit(); - } - } - break; - case 'login' : - default: - $secure_cookie = ''; - - // If the user wants ssl but the session is not ssl, force a secure cookie. - if ( !empty($_POST['log']) && !force_ssl_admin() ) { - $user_name = sanitize_user($_POST['log']); - if ( $user = get_userdatabylogin($user_name) ) { - if ( get_user_option('use_ssl', $user->ID) ) { - $secure_cookie = true; - force_ssl_admin(true); - } - } - } - - if ( isset($_REQUEST['redirect_to']) && !empty($_REQUEST['redirect_to']) ) { - $theme_my_login->redirect_to = $_REQUEST['redirect_to']; - // Redirect to https if user wants ssl - if ( $secure_cookie && false !== strpos($theme_my_login->redirect_to, 'wp-admin') ) - $theme_my_login->redirect_to = preg_replace('|^http://|', 'https://', $theme_my_login->redirect_to); - } else { - $theme_my_login->redirect_to = admin_url(); - } - - if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($theme_my_login->redirect_to, 'https') ) && ( 0 === strpos($theme_my_login->redirect_to, 'http') ) ) - $secure_cookie = false; - - $user = wp_signon('', $secure_cookie); - - $theme_my_login->redirect_to = apply_filters('login_redirect', $theme_my_login->redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); - - if ( !is_wp_error($user) ) { - // If the user can't edit posts, send them to their profile. - if ( !$user->has_cap('edit_posts') && ( empty( $theme_my_login->redirect_to ) || $theme_my_login->redirect_to == 'wp-admin/' || $theme_my_login->redirect_to == admin_url() ) ) - $theme_my_login->redirect_to = admin_url('profile.php'); - wp_safe_redirect($theme_my_login->redirect_to); - exit(); - } - - $theme_my_login->errors = $user; - break; -} - -endif; - -?> diff --git a/blog/wp-content/plugins/theme-my-login/includes/login-functions.php b/blog/wp-content/plugins/theme-my-login/includes/login-functions.php deleted file mode 100644 index e496f43..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/login-functions.php +++ /dev/null @@ -1,185 +0,0 @@ -add('empty_username', __('ERROR: Enter a username or e-mail address.')); - - if ( strpos($_POST['user_login'], '@') ) { - $user_data = get_user_by_email(trim($_POST['user_login'])); - if ( empty($user_data) ) - $errors->add('invalid_email', __('ERROR: There is no user registered with that email address.')); - } else { - $login = trim($_POST['user_login']); - $user_data = get_userdatabylogin($login); - } - - do_action('lostpassword_post'); - - if ( $errors->get_error_code() ) - return $errors; - - if ( !$user_data ) { - $errors->add('invalidcombo', __('ERROR: Invalid username or e-mail.')); - return $errors; - } - - // redefining user_login ensures we return the right case in the email - $user_login = $user_data->user_login; - $user_email = $user_data->user_email; - - do_action('retreive_password', $user_login); // Misspelled and deprecated - do_action('retrieve_password', $user_login); - - $allow = apply_filters('allow_password_reset', true, $user_data->ID); - - if ( ! $allow ) - return new WP_Error('no_password_reset', __('Password reset is not allowed for this user')); - else if ( is_wp_error($allow) ) - return $allow; - - $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login)); - if ( empty($key) ) { - // Generate something random for a key... - $key = wp_generate_password(20, false); - do_action('retrieve_password_key', $user_login, $key); - // Now insert the new md5 key into the db - $wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $user_login)); - } - $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n"; - $message .= get_option('siteurl') . "\r\n\r\n"; - $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; - $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; - $message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n"; - - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $title = sprintf(__('[%s] Password Reset'), $blogname); - - $title = apply_filters('retrieve_password_title', $title, $user_data->ID); - $message = apply_filters('retrieve_password_message', $message, $key, $user_data->ID); - - if ( $message && !wp_mail($user_email, $title, $message) ) - die('

    ' . __('The e-mail could not be sent.') . "
    \n" . __('Possible reason: your host may have disabled the mail() function...') . '

    '); - - return true; -} - -/** - * Handles resetting the user's password. - * - * @uses $wpdb WordPress Database object - * - * @param string $key Hash to validate sending user's password - * @return bool|WP_Error - */ -function reset_password($key, $login) { - global $wpdb; - - $key = preg_replace('/[^a-z0-9]/i', '', $key); - - if ( empty( $key ) || !is_string( $key ) ) - return new WP_Error('invalid_key', __('Invalid key')); - - if ( empty($login) || !is_string($login) ) - return new WP_Error('invalid_key', __('Invalid key')); - - $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_login = %s", $key, $login)); - if ( empty( $user ) ) - return new WP_Error('invalid_key', __('Invalid key')); - - // Generate something random for a password... - $new_pass = wp_generate_password(); - - do_action('password_reset', $user, $new_pass); - - wp_set_password($new_pass, $user->ID); - update_usermeta($user->ID, 'default_password_nag', true); //Set up the Password change nag. - $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; - $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n"; - $message .= site_url('wp-login.php', 'login') . "\r\n"; - - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $title = sprintf(__('[%s] Your new password'), $blogname); - - $title = apply_filters('password_reset_title', $title, $user->ID); - $message = apply_filters('password_reset_message', $message, $new_pass, $user->ID); - - if ( $message && !wp_mail($user->user_email, $title, $message) ) - die('

    ' . __('The e-mail could not be sent.') . "
    \n" . __('Possible reason: your host may have disabled the mail() function...') . '

    '); - - wp_password_change_notification($user); - - return true; -} - -/** - * Handles registering a new user. - * - * @param string $user_login User's username for logging in - * @param string $user_email User's email address to send password and add - * @return int|WP_Error Either user's ID or error on failure. - */ -function register_new_user($user_login, $user_email) { - $errors = new WP_Error(); - - $user_login = sanitize_user( $user_login ); - $user_email = apply_filters( 'user_registration_email', $user_email ); - - // Check the username - if ( $user_login == '' ) - $errors->add('empty_username', __('ERROR: Please enter a username.')); - elseif ( !validate_username( $user_login ) ) { - $errors->add('invalid_username', __('ERROR: This username is invalid. Please enter a valid username.')); - $user_login = ''; - } elseif ( username_exists( $user_login ) ) - $errors->add('username_exists', __('ERROR: This username is already registered, please choose another one.')); - - // Check the e-mail address - if ($user_email == '') { - $errors->add('empty_email', __('ERROR: Please type your e-mail address.')); - } elseif ( !is_email( $user_email ) ) { - $errors->add('invalid_email', __('ERROR: The email address isn’t correct.')); - $user_email = ''; - } elseif ( email_exists( $user_email ) ) - $errors->add('email_exists', __('ERROR: This email is already registered, please choose another one.')); - - do_action('register_post', $user_login, $user_email, $errors); - - $errors = apply_filters( 'registration_errors', $errors, $user_login, $user_email ); - - if ( $errors->get_error_code() ) - return $errors; - - $user_pass = wp_generate_password(); - - // Allow the new password to be filtered by plugins - $user_pass = apply_filters('user_registration_pass', $user_pass); - - $user_id = wp_create_user( $user_login, $user_pass, $user_email ); - if ( !$user_id ) { - $errors->add('registerfail', sprintf(__('ERROR: Couldn’t register you... please contact the webmaster !'), get_option('admin_email'))); - return $errors; - } - - wp_new_user_notification($user_id, $user_pass); - - return $user_id; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/includes/pluggable-functions.php b/blog/wp-content/plugins/theme-my-login/includes/pluggable-functions.php deleted file mode 100644 index ac82038..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/pluggable-functions.php +++ /dev/null @@ -1,86 +0,0 @@ -user_email != get_option('admin_email') ) { - if ( apply_filters('password_change_notification', true) ) { - $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $title = sprintf(__('[%s] Password Lost/Changed'), $blogname); - - $title = apply_filters('password_change_notification_title', $title, $user->ID); - $message = apply_filters('password_change_notification_message', $message, $user->ID); - - @wp_mail(get_option('admin_email'), $title, $message); - } - } -} -endif; - -if ( !function_exists('wp_new_user_notification') ) : -/** - * Notify the blog admin of a new user, normally via email. - * - * @since 2.0 - * - * @param int $user_id User ID - * @param string $plaintext_pass Optional. The user's plaintext password - */ -function wp_new_user_notification($user_id, $plaintext_pass = '') { - $user = new WP_User($user_id); - - do_action('wp_new_user_notification', $user_id, $plaintext_pass); - - $user_login = stripslashes($user->user_login); - $user_email = stripslashes($user->user_email); - - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - if ( apply_filters('new_user_admin_notification', true) ) { - $message = sprintf(__('New user registration on your blog %s:'), $blogname) . "\r\n\r\n"; - $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; - $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; - - $title = sprintf(__('[%s] New User Registration'), $blogname); - - $title = apply_filters('new_user_admin_notification_title', $title, $user_id); - $message = apply_filters('new_user_admin_notification_message', $message, $user_id); - - @wp_mail(get_option('admin_email'), $title, $message); - } - - if ( empty($plaintext_pass) ) - return; - - if ( apply_filters('new_user_notification', true) ) { - $message = sprintf(__('Username: %s'), $user_login) . "\r\n"; - $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; - $message .= wp_login_url() . "\r\n"; - - $title = sprintf(__('[%s] Your username and password'), $blogname); - - $title = apply_filters('new_user_notification_title', $title, $user_id); - $message = apply_filters('new_user_notification_message', $message, $plaintext_pass, $user_id); - - wp_mail($user_email, $title, $message); - } - -} -endif; - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/includes/template-functions.php b/blog/wp-content/plugins/theme-my-login/includes/template-functions.php deleted file mode 100644 index 04c1f15..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/template-functions.php +++ /dev/null @@ -1,279 +0,0 @@ -current_instance['default_action']) ? $theme_my_login->current_instance['default_action'] : 'login'; - if ( $theme_my_login->request_instance == $theme_my_login->current_instance['instance_id'] ) - $action = $theme_my_login->request_action; - - ob_start(); - echo $theme_my_login->current_instance['before_widget']; - if ( $theme_my_login->current_instance['show_title'] ) - echo $theme_my_login->current_instance['before_title'] . jkf_tml_get_title($action) . $theme_my_login->current_instance['after_title'] . "\n"; - if ( is_user_logged_in() ) { - $user = wp_get_current_user(); - $user_role = reset($user->roles); - if ( $theme_my_login->current_instance['show_gravatar'] ) - echo '
    ' . get_avatar( $user->ID, $theme_my_login->current_instance['gravatar_size'] ) . '
    ' . "\n"; - echo '' . "\n"; - } else { - if ( has_filter('login_form_' . $action) ) { - do_action('login_form_' . $action); - } else { - switch ( $action ) { - case 'lostpassword' : - case 'retrievepassword' : - jkf_tml_get_lost_password_form(); - break; - case 'register' : - jkf_tml_get_register_form(); - break; - case 'login' : - default : - jkf_tml_get_login_form(); - break; - } - } - } - echo $theme_my_login->current_instance['after_widget'] . "\n"; - $contents = ob_get_contents(); - ob_end_clean(); - return $contents; -} - -function jkf_tml_get_display_options() { - $display_options = array( - 'instance_id' => 'tml-page', - 'is_active' => 0, - 'default_action' => 'login', - 'show_title' => 1, - 'show_log_link' => 1, - 'show_reg_link' => 1, - 'show_pass_link' => 1, - 'register_widget' => 0, - 'lost_pass_widget' => 0, - 'logged_in_widget' => 1, - 'show_gravatar' => 1, - 'gravatar_size' => 50, - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ' - ); - return apply_filters('tml_display_options', $display_options); -} - -function jkf_tml_get_title($action = '') { - if ( empty($action) ) - $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login'; - - if ( is_user_logged_in() ) { - $user = wp_get_current_user(); - $title = sprintf(__('Welcome, %s', 'theme-my-login'), $user->display_name); - } else { - switch ( $action ) { - case 'register': - $title = __('Register'); - break; - case 'lostpassword': - case 'retrievepassword': - case 'resetpass': - case 'rp': - $title = __('Lost Password'); - break; - case 'login': - default: - $title = __('Log In'); - } - } - return apply_filters('tml_title', $title, $action); -} - -function jkf_tml_get_header($message = '') { - global $theme_my_login, $error; - - if ( empty($theme_my_login->errors) ) - $theme_my_login->errors = new WP_Error(); - - echo '' . "\n"; -} - -function jkf_tml_get_login_form() { - global $theme_my_login; - - // Clear errors if loggedout is set. - if ( !empty($_GET['loggedout']) ) - $theme_my_login->errors = new WP_Error(); - - // If cookies are disabled we can't log in even with a valid user+pass - if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) ) - $theme_my_login->errors->add('test_cookie', __("ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.", 'theme-my-login')); - - // Some parts of this script use the main login form to display a message - if ( $theme_my_login->current_instance['is_active'] ) { - if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) - $theme_my_login->errors->add('loggedout', __('You are now logged out.'), 'message'); - elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) - $theme_my_login->errors->add('registerdisabled', __('User registration is currently not allowed.')); - elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) - $theme_my_login->errors->add('confirm', __('Check your e-mail for the confirmation link.'), 'message'); - elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) - $theme_my_login->errors->add('newpass', __('Check your e-mail for your new password.'), 'message'); - elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) - $theme_my_login->errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message'); - } - - jkf_tml_get_header(); - - if ( isset($_POST['log']) ) - $user_login = ( 'incorrect_password' == $theme_my_login->errors->get_error_code() || 'empty_password' == $theme_my_login->errors->get_error_code() ) ? attribute_escape(stripslashes($_POST['log'])) : ''; - - $user_login = ( $theme_my_login->current_instance['is_active'] && isset($user_login) ) ? $user_login : ''; - - if ( !isset($_GET['checkemail']) || - ( isset($_GET['checkemail']) && !$theme_my_login->current_instance['is_active'] ) || - ( !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) && $theme_my_login->current_instance['is_active'] ) || - ( in_array( $_GET['checkemail'], array('confirm', 'newpass') ) && !$theme_my_login->current_instance['is_active'] ) ) { - ?> -
    -

    - - -

    -

    - - -

    - current_instance['instance_id']); ?> -

    -

    - - - -

    -
    - current_instance['is_active'] && isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) - $login_link = true; - else - $login_link = false; - jkf_tml_get_footer($login_link, true, true); -} - -function jkf_tml_get_register_form() { - global $theme_my_login; - - $user_login = isset($_POST['user_login']) ? $_POST['user_login'] : ''; - $user_email = isset($_POST['user_email']) ? $_POST['user_email'] : ''; - - $message = apply_filters('register_message', __('A password will be e-mailed to you.')); - - jkf_tml_get_header($message); - ?> -
    -

    - - -

    -

    - - -

    - current_instance['instance_id']); ?> -

    - -

    -
    - current_instance['instance_id']); - - $message = apply_filters('lostpassword_message', __('Please enter your username or e-mail address. You will receive a new password via e-mail.')); - - jkf_tml_get_header($message); - - $user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : ''; - ?> -
    -

    - - -

    - current_instance['instance_id']); ?> -

    - -

    -
    - diff --git a/blog/wp-content/plugins/theme-my-login/includes/widget.php b/blog/wp-content/plugins/theme-my-login/includes/widget.php deleted file mode 100644 index e451da9..0000000 --- a/blog/wp-content/plugins/theme-my-login/includes/widget.php +++ /dev/null @@ -1,77 +0,0 @@ - 'widget_theme_my_login', 'description' => __('A login form for your blog.', 'theme-my-login') ); - parent::WP_Widget('theme-my-login', __('Theme My Login', 'theme-my-login'), $widget_ops); - } - - function widget($args, $instance){ - if ( is_user_logged_in() && !$instance['logged_in_widget'] ) - return; - $args = array_merge($args, $instance); - echo jkf_tml_shortcode($args); - } - - function update($new_instance, $old_instance){ - $instance = $old_instance; - $instance['default_action'] = in_array($new_instance['default_action'], array('login', 'register', 'lostpassword')) ? $new_instance['default_action'] : 'login'; - $instance['logged_in_widget'] = empty($new_instance['logged_in_widget']) ? false : true; - $instance['show_title'] = empty($new_instance['show_title']) ? false : true; - $instance['show_log_link'] = empty($new_instance['show_log_link']) ? false: true; - $instance['show_reg_link'] = empty($new_instance['show_reg_link']) ? false: true; - $instance['show_pass_link'] = empty($new_instance['show_pass_link']) ? false: true; - $instance['show_gravatar'] = empty($new_instance['show_gravatar']) ? false : true; - $instance['gravatar_size'] = absint($new_instance['gravatar_size']); - $instance['register_widget'] = empty($new_instance['register_widget']) ? false : true; - $instance['lost_pass_widget'] = empty($new_instance['lost_pass_widget']) ? false : true; - return $instance; - } - - function form($instance){ - $defaults = array( - 'default_action' => 'login', - 'logged_in_widget' => 1, - 'show_title' => 1, - 'show_log_link' => 1, - 'show_reg_link' => 1, - 'show_pass_link' => 1, - 'show_gravatar' => 1, - 'gravatar_size' => 50, - 'register_widget' => 1, - 'lost_pass_widget' => 1 - ); - - $instance = wp_parse_args($instance, $defaults); - $actions = array('login' => 'Login', 'register' => 'Register', 'lostpassword' => 'Lost Password'); - echo '

    Default Action

    ' . "\n"; - $is_checked = (empty($instance['logged_in_widget'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['show_title'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['show_log_link'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['show_reg_link'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['show_pass_link'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['show_gravatar'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - echo '

    ' . __('Gravatar Size', 'theme-my-login') . ':

    ' . "\n"; - $is_checked = (empty($instance['register_widget'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - $is_checked = (empty($instance['lost_pass_widget'])) ? '' : 'checked="checked" '; - echo '

    ' . "\n"; - } - -} -endif; - -?> diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/admin.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/admin.php deleted file mode 100644 index 163d5ad..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/admin.php +++ /dev/null @@ -1,38 +0,0 @@ - \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-general.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-general.php deleted file mode 100644 index 9f449d5..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-general.php +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - -
    -
    - -
    -
    - -
    -
    - -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-new-user.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-new-user.php deleted file mode 100644 index c131bcf..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-new-user.php +++ /dev/null @@ -1,14 +0,0 @@ - - - - -
    -

    : %blogname%, %siteurl%, %user_login%, %user_email%, %user_pass%, %user_ip%

    -
    -
    -
    -
    -

    - -

    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-reset-pass.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-reset-pass.php deleted file mode 100644 index 6db0955..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-reset-pass.php +++ /dev/null @@ -1,14 +0,0 @@ - - - - -
    -

    : %blogname%, %siteurl%, %user_login%, %user_email%, %user_pass%, %user_ip%

    -
    -
    -
    -
    -

    - -

    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-retrieve-pass.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-retrieve-pass.php deleted file mode 100644 index 83ea471..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/admin/options-retrieve-pass.php +++ /dev/null @@ -1,11 +0,0 @@ - - - - -
    -

    : %blogname%, %home%, %siteurl%, %reseturl%, %user_login%, %user_email%, %user_ip%

    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/custom-email.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/custom-email.php deleted file mode 100644 index 3fe77ae..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/custom-email.php +++ /dev/null @@ -1,94 +0,0 @@ -options['email']) ) - $theme_my_login->options['email'] = jkf_tml_custom_email_default_settings(); - - update_option('theme_my_login', $theme_my_login->options); -} - -function jkf_tml_custom_email_default_settings() { - $options = array( - 'mail_from' => '', - 'mail_from_name' => '', - 'mail_content_type' => '', - 'new_user' => array( - 'title' => '', - 'message' => '', - 'admin_disable' => 0 - ), - 'retrieve_pass' => array( - 'title' => '', - 'message' => '' - ), - 'reset_pass' => array( - 'title' => '', - 'message' => '', - 'admin_disable' => 0 - ) - ); - return $options; -} - -function jkf_tml_custom_email_retrieve_pass_filters($user_login) { - require_once (TML_MODULE_DIR . '/custom-email/includes/hook-functions.php'); - jkf_tml_custom_email_headers(); - add_filter('retrieve_password_title', 'jkf_tml_custom_email_retrieve_pass_title', 10, 2); - add_filter('retrieve_password_message', 'jkf_tml_custom_email_retrieve_pass_message', 10, 3); -} - -function jkf_tml_custom_email_reset_pass_filters($user, $new_pass) { - require_once (TML_MODULE_DIR . '/custom-email/includes/hook-functions.php'); - jkf_tml_custom_email_headers(); - add_filter('password_reset_title', 'jkf_tml_custom_email_reset_pass_title', 10, 2); - add_filter('password_reset_message', 'jkf_tml_custom_email_reset_pass_message', 10, 3); - add_filter('password_change_notification', 'jkf_tml_custom_email_reset_pass_disable'); -} - -function jkf_tml_custom_email_new_user_filters($user_id, $user_pass) { - require_once (TML_MODULE_DIR . '/custom-email/includes/hook-functions.php'); - jkf_tml_custom_email_headers(); - add_filter('new_user_notification_title', 'jkf_tml_custom_email_new_user_title', 10, 2); - add_filter('new_user_notification_message', 'jkf_tml_custom_email_new_user_message', 10, 3); - add_filter('new_user_admin_notification', 'jkf_tml_custom_email_new_user_admin_disable'); -} - -function jkf_tml_custom_email_new_user_notification_override_notice() { - $message = __('WARNING: The function wp_new_user_notification has already been overriden by another plugin. ', 'theme-my-login'); - $message .= __('Some features of the Custom E-mails module will not function properly.', 'theme-my-login'); - echo '

    ' . $message . '

    '; -} - -function jkf_tml_custom_email_password_change_notification_override_notice() { - $message = __('WARNING: The function wp_password_change_notification has already been overriden by another plugin. ', 'theme-my-login'); - $message .= __('Some features of the Custom E-mails module will not function properly.', 'theme-my-login'); - echo '

    ' . $message . '

    '; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/hook-functions.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/hook-functions.php deleted file mode 100644 index 5f245d0..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/hook-functions.php +++ /dev/null @@ -1,97 +0,0 @@ -options['email']['mail_from']) ? $from_email : $theme_my_login->options['email']['mail_from']; -} - -function jkf_tml_custom_email_from_name($from_name) { - global $theme_my_login; - return empty($theme_my_login->options['email']['mail_from_name']) ? $from_name : $theme_my_login->options['email']['mail_from_name']; -} - -function jkf_tml_custom_email_content_type($content_type) { - global $theme_my_login; - return empty($theme_my_login->options['email']['mail_content_type']) ? $content_type : 'text/' . $theme_my_login->options['email']['mail_content_type']; -} - -function jkf_tml_custom_email_retrieve_pass_title($title, $user_id) { - global $theme_my_login; - return empty($theme_my_login->options['email']['retrieve_pass']['title']) ? $title : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['retrieve_pass']['title'], $user_id); -} - -function jkf_tml_custom_email_retrieve_pass_message($message, $key, $user_id) { - global $theme_my_login; - $user = get_userdata($user_id); - $replacements = array( - '%loginurl%' => site_url('wp-login.php', 'login'), - '%reseturl%' => site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') - ); - return empty($theme_my_login->options['email']['retrieve_pass']['message']) ? $message : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['retrieve_pass']['message'], $user_id, $replacements); -} - -function jkf_tml_custom_email_reset_pass_title($title, $user_id) { - global $theme_my_login; - return empty($theme_my_login->options['email']['reset_pass']['title']) ? $title : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['reset_pass']['title'], $user_id); -} - -function jkf_tml_custom_email_reset_pass_message($message, $new_pass, $user_id) { - global $theme_my_login; - $replacements = array( - '%loginurl%' => site_url('wp-login.php', 'login'), - '%user_pass%' => $new_pass - ); - return empty($theme_my_login->options['email']['reset_pass']['message']) ? $message : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['reset_pass']['message'], $user_id, $replacements); -} - -function jkf_tml_custom_email_reset_pass_disable($enable) { - global $theme_my_login; - return ( $theme_my_login->options['email']['reset_pass']['admin_disable'] ) ? 0 : 1; -} - -function jkf_tml_custom_email_new_user_title($title, $user_id) { - global $theme_my_login; - return empty($theme_my_login->options['email']['new_user']['title']) ? $title : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['new_user']['title'], $user_id); -} - -function jkf_tml_custom_email_new_user_message($message, $new_pass, $user_id) { - global $theme_my_login; - $replacements = array( - '%loginurl%' => site_url('wp-login.php', 'login'), - '%user_pass%' => $new_pass - ); - return empty($theme_my_login->options['email']['new_user']['message']) ? $message : jkf_tml_custom_email_replace_vars($theme_my_login->options['email']['new_user']['message'], $user_id, $replacements); -} - -function jkf_tml_custom_email_new_user_admin_disable($enable) { - global $theme_my_login; - return ( $theme_my_login->options['email']['new_user']['admin_disable'] ) ? 0 : 1; -} - -function jkf_tml_custom_email_replace_vars($text, $user_id = '', $replacements = array()) { - // Get user data - if ( $user_id ) - $user = get_userdata($user_id); - - // Get all matches ($matches[0] will be '%value%'; $matches[1] will be 'value') - preg_match_all('/%([^%]*)%/', $text, $matches); - - // Iterate through matches - foreach ( $matches[0] as $key => $match ) { - if ( isset($replacements[$match]) ) - continue; - if ( isset($user) && isset($user->{$matches[1][$key]}) ) - $replacements[$match] = $user->{$matches[1][$key]}; - else - $replacements[$match] = get_bloginfo($matches[1][$key]); - } - return str_replace(array_keys($replacements), array_values($replacements), $text); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/pluggable-functions.php b/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/pluggable-functions.php deleted file mode 100644 index 12301cf..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-email/includes/pluggable-functions.php +++ /dev/null @@ -1,77 +0,0 @@ -user_email != get_option('admin_email') ) { - $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $title = sprintf(__('[%s] Password Lost/Changed'), $blogname); - - $title = apply_filters('password_change_notification_title', $title, $user->ID); - $message = apply_filters('password_change_notification_message', $message, $user->ID); - - @wp_mail(get_option('admin_email'), $title, $message); - } -} -endif; - -if ( !function_exists('wp_new_user_notification') ) : -/** - * Notify the blog admin of a new user, normally via email. - * - * @since 2.0 - * - * @param int $user_id User ID - * @param string $plaintext_pass Optional. The user's plaintext password - */ -function wp_new_user_notification($user_id, $plaintext_pass = '') { - $user = new WP_User($user_id); - - $user_login = stripslashes($user->user_login); - $user_email = stripslashes($user->user_email); - - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $message = sprintf(__('New user registration on your blog %s:'), $blogname) . "\r\n\r\n"; - $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; - $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; - - $title = sprintf(__('[%s] New User Registration'), $blogname); - - $title = apply_filters('new_user_admin_notification_title', $title, $user_id); - $message = apply_filters('new_user_admin_notification_message', $message, $user_id); - - @wp_mail(get_option('admin_email'), $title, $message); - - if ( empty($plaintext_pass) ) - return; - - $message = sprintf(__('Username: %s'), $user_login) . "\r\n"; - $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; - $message .= wp_login_url() . "\r\n"; - - $title = sprintf(__('[%s] Your username and password'), $blogname); - - $title = apply_filters('new_user_notification_title', $title, $user_id); - $message = apply_filters('new_user_notification_message', $message, $plaintext_pass, $user_id); - - wp_mail($user_email, $title, $message); - -} -endif; - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/custom-passwords.php b/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/custom-passwords.php deleted file mode 100644 index 623fecd..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/custom-passwords.php +++ /dev/null @@ -1,25 +0,0 @@ -options['page_id']) || is_active_widget(false, null, 'theme-my-login') || $theme_my_login->options['enable_template_tag'] ) { - require_once (TML_MODULE_DIR . '/custom-passwords/functions.php'); - add_action('register_form', 'jkf_tml_custom_pass_form'); - add_action('registration_errors', 'jkf_tml_custom_pass_errors'); - add_action('login_action_resetpass', 'jkf_tml_custom_pass_reset_action'); - add_action('login_action_rp', 'jkf_tml_custom_pass_reset_action'); - add_action('login_form_resetpass', 'jkf_tml_custom_pass_reset_form'); - add_action('login_form_rp', 'jkf_tml_custom_pass_reset_form'); - add_filter('user_registration_pass', 'jkf_tml_custom_pass_set_pass'); - add_filter('login_message', 'jkf_tml_custom_pass_login_message'); - add_filter('register_redirect', 'jkf_tml_custom_pass_register_redirect'); - add_filter('resetpass_redirect', 'jkf_tml_custom_pass_resetpass_redirect'); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/functions.php b/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/functions.php deleted file mode 100644 index 06de514..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-passwords/functions.php +++ /dev/null @@ -1,166 +0,0 @@ - -

    -

    -

    -

    -add('empty_password', __('ERROR: Please enter a password.')); - } elseif ( $_POST['pass1'] !== $_POST['pass2'] ) { - $errors->add('password_mismatch', __('ERROR: Your passwords do not match.')); - } elseif ( strlen($_POST['pass1']) < 6 ) { - $errors->add('password_length', __('ERROR: Your password must be at least 6 characters in length.')); - } else { - $_POST['user_pw'] = $_POST['pass1']; - } - return $errors; -} - -function jkf_tml_custom_pass_set_pass($user_pass) { - if ( isset($_POST['user_pw']) && !empty($_POST['user_pw']) ) - $user_pass = $_POST['user_pw']; - return $user_pass; -} - -function jkf_tml_custom_pass_reset_action() { - global $theme_my_login; - - if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) { - $theme_my_login->errors = jkf_tml_custom_pass_reset_pass(); - if ( ! is_wp_error($theme_my_login->errors) ) { - $redirect_to = site_url('wp-login.php?resetpass=complete'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('resetpass=complete&instance=' . $theme_my_login->request_instance); - wp_redirect($redirect_to); - exit(); - } - } - - $user = jkf_tml_custom_pass_validate_reset_key($_GET['key'], $_GET['login']); - if ( is_wp_error($user) ) { - $redirect_to = site_url('wp-login.php?action=lostpassword&error=invalidkey'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('action=lostpassword&error=invalidkey&instance=' . $theme_my_login->request_instance); - wp_redirect($redirect_to); - exit(); - } -} - -function jkf_tml_custom_pass_reset_form() { - global $theme_my_login; - - $message = apply_filters('resetpass_message', __('Please enter a new password.', 'theme-my-login')); - - jkf_tml_get_header($message); - - if ( !$theme_my_login->errors->get_error_message('invalid_key') ) { - ?> -
    -

    - - -

    -

    - - -

    - current_instance['instance_id']); ?> -

    - -

    -
    -get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_login = %s", $key, $login)); - if ( empty( $user ) ) - return new WP_Error('invalid_key', __('Invalid key')); - - return $user; -} - -function jkf_tml_custom_pass_reset_pass() { - global $theme_my_login; - - $user = jkf_tml_custom_pass_validate_reset_key($_REQUEST['key'], $_REQUEST['login']); - if ( is_wp_error($user) ) - return $user; - - $errors = jkf_tml_custom_pass_errors(new WP_Error()); - if ( $errors->get_error_code() ) - return $errors; - - $new_pass = $_POST['pass1']; - - do_action('password_reset', $user->user_login, $new_pass); - - wp_set_password($new_pass, $user->ID); - update_usermeta($user->ID, 'default_password_nag', false); - $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; - $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n"; - $message .= site_url('wp-login.php', 'login') . "\r\n"; - - // The blogname option is escaped with esc_html on the way into the database in sanitize_option - // we want to reverse this for the plain text arena of emails. - $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); - - $title = sprintf(__('[%s] Your new password'), $blogname); - - $title = apply_filters('password_reset_title', $title, $user); - $message = apply_filters('password_reset_message', $message, $new_pass, $user); - - if ( $message && !wp_mail($user->user_email, $title, $message) ) - die('

    ' . __('The e-mail could not be sent.') . "
    \n" . __('Possible reason: your host may have disabled the mail() function...') . '

    '); - - wp_password_change_notification($user); - - return true; -} - -function jkf_tml_custom_pass_register_redirect($redirect_to) { - global $theme_my_login; - $redirect_to = site_url('wp-login.php?registration=complete'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('registration=complete&instance=' . $theme_my_login->request_instance); - return $redirect_to; -} - -function jkf_tml_custom_pass_resetpass_redirect($redirect_to) { - global $theme_my_login; - $redirect_to = site_url('wp-login.php?resetpass=complete'); - if ( 'tml-page' != $theme_my_login->request_instance ) - $redirect_to = jkf_tml_get_current_url('resetpass=complete&instance=' . $theme_my_login->request_instance); - return $redirect_to; -} - -function jkf_tml_custom_pass_login_message($message) { - if ( isset($_GET['action']) && 'register' == $_GET['action'] ) - $message = ''; - elseif ( isset($_GET['registration']) && 'complete' == $_GET['registration'] ) - $message = __('Registration complete. You may now log in.', 'theme-my-login'); - elseif ( isset($_GET['resetpass']) && 'complete' == $_GET['resetpass'] ) - $message = __('Your password has been saved. You may now log in.', 'theme-my-login'); - return $message; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/admin.php b/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/admin.php deleted file mode 100644 index 47a4770..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/admin.php +++ /dev/null @@ -1,60 +0,0 @@ -get_names(); - foreach ( $user_roles as $role => $label ) { - if ( 'pending' == $role ) - continue; - ?> - - - - - -
    - options['redirection'][$role]['login_type']); ?> />
    - options['redirection'][$role]['login_type']); ?> />
    - options['redirection'][$role]['login_type']); ?> /> - -
    -get_names(); - foreach ( $user_roles as $role => $label ) { - if ( 'pending' == $role ) - continue; - ?> - - - - - -
    - options['redirection'][$role]['logout_type']); ?> />
    - options['redirection'][$role]['logout_type']); ?> />
    - options['redirection'][$role]['logout_type']); ?> /> - -
    - \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/custom-redirection.php b/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/custom-redirection.php deleted file mode 100644 index 3ed2e12..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/custom-redirection.php +++ /dev/null @@ -1,42 +0,0 @@ -options['redirection']) ) - $theme_my_login->options['redirection'] = jkf_tml_custom_redirect_default_settings(); - - update_option('theme_my_login', $theme_my_login->options); -} - -function jkf_tml_custom_redirect_default_settings() { - global $wp_roles; - - $user_roles = $wp_roles->get_names(); - foreach ( $user_roles as $role => $label ) { - $options[$role] = array('login_type' => 'default', 'login_url' => '', 'logout_type' => 'default', 'logout_url' => ''); - } - return $options; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/hook-functions.php b/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/hook-functions.php deleted file mode 100644 index 48a926d..0000000 --- a/blog/wp-content/plugins/theme-my-login/modules/custom-redirection/hook-functions.php +++ /dev/null @@ -1,70 +0,0 @@ -roles); - if ( 'default' == $theme_my_login->options['redirection'][$user_role]['login_type'] ) - $redirect_to = $orig_redirect; - elseif ( 'referer' == $theme_my_login->options['redirection'][$user_role]['login_type'] ) - $redirect_to = $http_referer; - else - $redirect_to = $theme_my_login->options['redirection'][$user_role]['login_url']; - } - - if ( isset($request) && admin_url() != $request ) - $redirect_to = $request; - - return $redirect_to; -} - -function jkf_tml_custom_redirect_logout($redirect_to, $request, $user) { - global $theme_my_login; - - $orig_redirect = $redirect_to; - - // Determine the correct referer - $http_referer = isset($_REQUEST['_wp_original_http_referer']) ? $_REQUEST['_wp_original_http_referer'] : $_SERVER['HTTP_REFERER']; - $http_referer = remove_query_arg(array('instance', 'action', 'checkemail', 'error', 'loggedout', 'registered', 'redirect_to', 'updated', 'key', '_wpnonce'), $http_referer); - if ( strpos($http_referer, get_option('home')) === false ) - $http_referer = get_option('home'); - - if ( is_object($user) && !is_wp_error($user) ) { - $user_role = reset($user->roles); - if ( 'default' == $theme_my_login->options['redirection'][$user_role]['logout_type'] ) - $redirect_to = $orig_redirect; - elseif ( 'referer' == $theme_my_login->options['redirection'][$user_role]['logout_type'] ) - $redirect_to = $http_referer; - else - $redirect_to = $theme_my_login->options['redirection'][$user_role]['logout_url']; - } - - if ( strpos($redirect_to, 'wp-admin') !== false ) - $redirect_to = add_query_arg('loggedout', 'true', get_permalink($theme_my_login->options['page_id'])); - - return $redirect_to; -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/readme.txt b/blog/wp-content/plugins/theme-my-login/readme.txt deleted file mode 100644 index ecfc5a9..0000000 --- a/blog/wp-content/plugins/theme-my-login/readme.txt +++ /dev/null @@ -1,222 +0,0 @@ -=== Theme My Login === -Contributors: jfarthing84 -Donate link: http://www.jfarthing.com/donate -Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail -Requires at least: 2.8 -Tested up to: 2.9.1 -Stable tag: 4.4 - -Themes the WordPress login pages according to your theme. - - -== Description == - -This plugin themes the WordPress login, registration and forgot password pages according to your current theme. It replaces the wp-login.php file by using a page template from your theme. Also includes a widget for sidebar login. - -= Features = -* Your registration, log in and password recovery pages will all match the rest of your website -* Includes a customizeable widget to login anywhere from your blog -* Redirect users upon log in based on their role -* Show gravatar to users who are logged in -* Assign custom links to users who are logged in based on their role -* Customize user emails for registration and/or password recovery -* Send user emails in HTML format -* Allow users to set their own password upon registration -* Optionally require users to be approved or confirm e-mail address upon registration - - -== Installation == - -1. Upload the plugin to your 'wp-content/plugins' directory -1. Activate the plugin -1. Visit the [Theme My Login Official Usage Thread](http://www.jfarthing.com/forum/theme-my-login/theme-my-login-official-usage-thread/) for further instruction. - - -== Frequently Asked Questions == - -None yet. Please visit http://www.jfarthing.com/forum for any support! - - -== Changelog == - -= 5.0 = -* Rewrite code in a modular fashion in order to speed up plugin -* Convert custom passwords, e-mails, redirection and user moderation to "modules" -* Add the option to enable/disable link rewriting, widget and template tag -* Simplify/optimize admin tabs style -* Remember current admin tab after save - -= 4.4 = -* Added the option to require new registrations to confirm e-mail address -* Added the option to redirect users upon log out according to their role -* Allow 'theme-my-login.css' to be loaded from current theme directory -* Cleaned up and rewrote most code -* Drop support for WP versions below 2.8 - -= 4.3.4 = -* Added the option to force redirect upon login - -= 4.3.3 = -* Fixed a redirection bug where WordPress is installed in a sub-directory -* Add CSS style to keep "Remember Me" label inline with checkbox - -= 4.3.2 = -* Added the option to redirect unapproved and/or denied users to a custom URL upon login attempt -* Fixed a bug where custom user password is lost if user moderation is enabled -* Fixed a PHP notice in the admin (Wish more plugin authors would do this; WP_DEBUG is your friend!) - -= 4.3.1 = -* Fixed a MAJOR security hole that allowed anyone to login without a password!! - -= 4.3 = -* Added the option to require approval for new registrations -* Added the option to enable/disable plugin stylesheet -* Removed form input fields from label tags -* Dropped support for WordPress versions older than 2.6 - -= 4.2.2 = -* Added the option to remove 'Register' and/or 'Lost Password' links -* Fixed a bug that sent e-mail from all plugins from this plugins setting - -= 4.2.1 = -* Fixed a bug that broke other plugins e-mail format -* Fixed a bug that could break plugin upon upgrade - -= 4.2 = -* Added the option to send e-mails in HTML format -* Fixed a bug that broke custom user role links if all links were deleted - -= 4.1.2 = -* Added the ability to change main login page ID (Only needed for debugging) -* The login will now revert to default wp-login in the case of plugin failure - -= 4.1.1 = -* Fixed a major bug dealing with saving options that broke the plugin -* Fixed a CSS bug causing interference with other interfaces that use jQuery UI Tabs - -= 4.1 = -* Implemented custom user passwords -* Implemented custom e-mail from name & address -* Removed template tag & shortcode restriction on main login page - -= 4.0 = -* Implemented custom links for logged in users based on role -* Implemented custom redirection upon log in based on role -* Implemented custom registration/password recovery emails -* Implemented true shortcode and template tag functionality -* Implemented true multi-instance functionality -* Implemented an easy-to-use jQuery tabbed administration menu -* Implemented both 'fresh' and 'classic' colors for administration menu - -= 3.3.1 = -* Fixed a bug that broke password recovery due to the new system from WP 2.8.4 - -= 3.3 = -* Fixed a bug that disabled error display when GET variable 'loggedout' was set -* Added template tag access - -= 3.2.8 = -* Fixed a security exploit regarding admin password reset addressed in WordPress 2.8.4 - -= 3.2.7 = -* Fixed a bug that determined how to create the widget - -= 3.2.6 = -* Fixed a bug dealing with the version_compare() function -* Included French translation -* Included Spanish translation - -= 3.2.5 = -* Fixed a bug that produced a 'headers aldready sent' error when uploading media -* Included Dutch translation - -= 3.2.4 = -* Fixed the load_plugin_textdomain() call -* Added 'login_head' action hook - -= 3.2.3 = -* Fixed and updated many gettext calls for internationalization - -= 3.2.2 = -* Added the option to leave widget links blank for default handling - -= 3.2.1 = -* Fixed a XHTML validation issue - -= 3.2 = -* Added the option to allow/disallow registration and password recovery within the widget -* Fixed a bug regarding color names within the CSS file that broke validation - -= 3.1.1 = -* Fixed a bug that incorrectly determined current user role - -= 3.1 = -* Added the ability to specify URL's for widget 'Dashboard' and 'Profile' links per user role -* Implemented WordPress 2.8 widget control for multiple widget instances -* Fixed a bug regarding the registration complete message - -= 3.0.3 = -* Fixed a bug with the widget links - -= 3.0.2 = -* Fixed a bug that didn't allow custom registration message to be displayed -* Fixed a few PHP unset variable notice's with a call to isset() - -= 3.0.1 = -* Fixed a bug that caused a redirection loop when trying to access wp-login.php -* Fixed a bug that broke the widget admin interface -* Added the option to show/hide login page from page list - -= 3.0 = -* Added a login widget - -= 2.2 = -* Removed all "bloatware" - -= 2.1 = -* Implemented login redirection based on user role - -= 2.0.8 = -* Fixed a bug that broke the login with permalinks - -= 2.0.7 = -* Fixed a bug that broke the Featured Content plugin - -= 2.0.6 = -* Added the option to turn on/off subscriber profile theming - -= 2.0.5 = -* Fixed a bug with default redirection and hid the login form from logged in users - -= 2.0.4 = -* Fixed a bug regarding relative URL's in redirection - -= 2.0.3 = -* Fixed various reported bugs and cleaned up code - -= 2.0.2 = -* Fixed a bug that broke registration and broke other plugins using the_content filter - -= 2.0.1 = -* Fixed a bug that redirected users who were not yet logged in to profile page - -= 2.0 = -* Completely rewrote plugin to use page template, no more specifying template files & HTML - -= 1.2 = -* Added capability to customize page titles for all pages affected by plugin - -= 1.1.2 = -* Updated to allow customization of text below registration form - -= 1.1.1 = -* Prepared plugin for internationalization and fixed a PHP version bug - -= 1.1.0 = -* Added custom profile to completely hide the back-end from subscribers - -= 1.0.1 = -* Made backwards compatible to WordPress 2.5+ - -= 1.0.0 = -* Initial release version \ No newline at end of file diff --git a/blog/wp-content/plugins/theme-my-login/theme-my-login.css b/blog/wp-content/plugins/theme-my-login/theme-my-login.css deleted file mode 100644 index 44a7eed..0000000 --- a/blog/wp-content/plugins/theme-my-login/theme-my-login.css +++ /dev/null @@ -1,25 +0,0 @@ -.login { - padding: 5px; - } - -.login p.error { - padding: 5px; - border: 1px solid #c00; - background-color: #ffebe8; - color: #333; - } - -.login p.message { - padding: 5px; - border: 1px solid #e6db55; - background-color: #ffffe0; - color: #333; - } - -.login form label { - display: block; - } - -.login form p.forgetmenot label { - display: inline; - } diff --git a/blog/wp-content/plugins/theme-my-login/theme-my-login.php b/blog/wp-content/plugins/theme-my-login/theme-my-login.php deleted file mode 100644 index 41205ac..0000000 --- a/blog/wp-content/plugins/theme-my-login/theme-my-login.php +++ /dev/null @@ -1,95 +0,0 @@ - get_option('theme_my_login', jkf_tml_default_settings()), - 'errors' => '', - 'request_action' => isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login', - 'request_instance' => isset($_REQUEST['instance']) ? $_REQUEST['instance'] : 'tml-page', - 'current_instance' => '', - 'redirect_to' => '' - ); - -// Load the plugin textdomain -load_plugin_textdomain('theme-my-login', '', 'theme-my-login/language'); - -jkf_tml_load_active_modules(); - -require_once( WP_PLUGIN_DIR . '/theme-my-login/includes/pluggable-functions.php' ); - -// Include admin-functions.php for install/uninstall process -if ( defined('WP_ADMIN') && true == WP_ADMIN ) { - require_once( WP_PLUGIN_DIR . '/theme-my-login/admin/includes/admin.php' ); - require_once( WP_PLUGIN_DIR . '/theme-my-login/admin/includes/module.php' ); - - register_activation_hook(__FILE__, 'jkf_tml_install'); - register_uninstall_hook(__FILE__, 'jkf_tml_uninstall'); - - add_action('admin_init', 'jkf_tml_admin_init'); - add_action('admin_menu', 'jkf_tml_admin_menu'); -} - -add_action('plugins_loaded', 'jkf_tml_load'); -function jkf_tml_load() { - global $theme_my_login; - - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/hook-functions.php'); - - do_action('tml_load', $theme_my_login); - - add_action('template_redirect', 'jkf_tml_template_redirect'); - - add_filter('the_title', 'jkf_tml_the_title', 10, 2); - add_filter('single_post_title', 'jkf_tml_single_post_title'); - - if ( $theme_my_login->options['rewrite_links'] ) - add_filter('site_url', 'jkf_tml_site_url', 10, 3); - - if ( $theme_my_login->options['show_page'] ) { - add_filter('page_link', 'jkf_tml_page_link', 10, 2); - add_filter('get_pages', 'jkf_tml_get_pages', 10, 2); - } elseif ( !$theme_my_login->options['show_page'] ) { - add_filter('wp_list_pages_excludes', 'jkf_tml_list_pages_excludes'); - } - - add_shortcode('theme-my-login', 'jkf_tml_shortcode'); - - if ( $theme_my_login->options['enable_widget'] ) { - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/widget.php'); - function jkf_tml_register_widget() { - return register_widget("Theme_My_Login_Widget"); - } - add_action('widgets_init', 'jkf_tml_register_widget'); - } -} - -function jkf_tml_template_redirect() { - global $theme_my_login; - - do_action('tml_init'); - - if ( is_page($theme_my_login->options['page_id']) || is_active_widget(false, null, 'theme-my-login') || $theme_my_login->options['enable_template_tag'] ) { - - if ( $theme_my_login->options['enable_css'] ) - jkf_tml_get_css(); - - require_once (WP_PLUGIN_DIR . '/theme-my-login/includes/login-actions.php'); - } -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/typekit/Screenshot-1.png b/blog/wp-content/plugins/typekit/Screenshot-1.png deleted file mode 100644 index 7f9fe24..0000000 Binary files a/blog/wp-content/plugins/typekit/Screenshot-1.png and /dev/null differ diff --git a/blog/wp-content/plugins/typekit/Screenshot-2.png b/blog/wp-content/plugins/typekit/Screenshot-2.png deleted file mode 100644 index 912f517..0000000 Binary files a/blog/wp-content/plugins/typekit/Screenshot-2.png and /dev/null differ diff --git a/blog/wp-content/plugins/typekit/Screenshot-3.png b/blog/wp-content/plugins/typekit/Screenshot-3.png deleted file mode 100644 index 3cfd6c3..0000000 Binary files a/blog/wp-content/plugins/typekit/Screenshot-3.png and /dev/null differ diff --git a/blog/wp-content/plugins/typekit/readme.txt b/blog/wp-content/plugins/typekit/readme.txt deleted file mode 100644 index b546769..0000000 --- a/blog/wp-content/plugins/typekit/readme.txt +++ /dev/null @@ -1,41 +0,0 @@ -=== Typekit plugin for WordPress === -Contributors: lucksy -Donate link: http://lucksy.com/sandbox/typekit_plugin_for_wordpress/ -Tags: fonts, typekit -Requires at least: 2.0.2 -Tested up to: 2.8.6 -Stable tag: 1.2.1 - -Convenient way for Wordpress users to use the Typekit font service in the sites. Typekit plugin for wordpress. - -== Description == -This is a convenient way for WordPress users to use the Typekit font service in WordPress web sites. This will enable users to change the fonts of their sites with least amount of time using the Typekit service. Further this plugin will give the ability to control where the typekit will be used in their site (whether in the front page, static pages .etc). - -== Installation == -1. Upload `typekit` directory to the `/wp-content/plugins/` directory -1. Activate the plugin through the 'Plugins' menu in WordPress -1. Open the plugin configuration page, which is located under Settings -> Typekit Config -1. Enter Typekit "Embed Code" and configure where your typekit font will appear. - -== Frequently Asked Questions == -= Have you got any questions? = - -Oh! that's good, I've got answers! Please email [me](http://lucksy.com/sandbox/typekit_plugin_for_wordpress/ "Your can find my email there") - -== Screenshots == - -1. Copy Embed Code in Typekit.com web site -2. Past Embed Code and Click Update Options -3. Actiate and click Update Options - -== Changelog == - -= 1.0 = -* A change since the previous version. -* Another change. - -== Arbitrary section == - - -== A brief Markdown Example == - diff --git a/blog/wp-content/plugins/typekit/readme.txt~ b/blog/wp-content/plugins/typekit/readme.txt~ deleted file mode 100644 index 36f0cdc..0000000 --- a/blog/wp-content/plugins/typekit/readme.txt~ +++ /dev/null @@ -1,41 +0,0 @@ -=== Typekit plugin for WordPress === -Contributors: lucksy -Donate link: http://lucksy.com/sandbox/typekit_plugin_for_wordpress/ -Tags: fonts, typekit -Requires at least: 2.0.2 -Tested up to: 2.8.6 -Stable tag: 1.2 - -Convenient way for Wordpress users to use the Typekit font service in the sites. Typekit plugin for wordpress. - -== Description == -This is a convenient way for WordPress users to use the Typekit font service in WordPress web sites. This will enable users to change the fonts of their sites with least amount of time using the Typekit service. Further this plugin will give the ability to control where the typekit will be used in their site (whether in the front page, static pages .etc). - -== Installation == -1. Upload `typekit` directory to the `/wp-content/plugins/` directory -1. Activate the plugin through the 'Plugins' menu in WordPress -1. Open the plugin configuration page, which is located under Settings -> Typekit Config -1. Enter Typekit "Embed Code" and configure where your typekit font will appear. - -== Frequently Asked Questions == -= Have you got any questions? = - -Oh! that's good, I've got answers! Please email [me](http://lucksy.com/sandbox/typekit_plugin_for_wordpress/ "Your can find my email there") - -== Screenshots == - -1. Copy Embed Code in Typekit.com web site -2. Past Embed Code and Click Update Options -3. Actiate and click Update Options - -== Changelog == - -= 1.0 = -* A change since the previous version. -* Another change. - -== Arbitrary section == - - -== A brief Markdown Example == - diff --git a/blog/wp-content/plugins/typekit/typekit.php b/blog/wp-content/plugins/typekit/typekit.php deleted file mode 100644 index e8c18c1..0000000 --- a/blog/wp-content/plugins/typekit/typekit.php +++ /dev/null @@ -1,217 +0,0 @@ - array( - array( - 'condition' => 'Is all', - 'enabled' => 'true', - ) - ) - ); - - $wptkf_activate_settings['wptkf_activate_settings'][1] = array( - 'condition' => 'Is front page', - 'enabled' => 'false', - ); - - - $wptkf_activate_settings['wptkf_activate_settings'][2] = array( - 'condition' => 'Is home', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][3] = array( - 'condition' => 'Is page', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][4] = array( - 'condition' => 'Is single', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][5] = array( - 'condition' => 'Is archive', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][6] = array( - 'condition' => 'Is 404', - 'enabled' => 'false', - ); - - - add_option('wptkf_activate_settings', $wptkf_activate_settings); - add_option('wptkf_browser_support_settings', 'false'); - -} - -function wptkf_activation() { - $wptkf_activate_settings = array('wptkf_activate_settings' => array( - array( - 'condition' => 'Is all', - 'enabled' => 'true', - ) - ) - ); - - $wptkf_activate_settings['wptkf_activate_settings'][1] = array( - 'condition' => 'Is front page', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][2] = array( - 'condition' => 'Is home', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][3] = array( - 'condition' => 'Is page', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][4] = array( - 'condition' => 'Is single', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][5] = array( - 'condition' => 'Is archive', - 'enabled' => 'false', - ); - - $wptkf_activate_settings['wptkf_activate_settings'][6] = array( - 'condition' => 'Is 404', - 'enabled' => 'false', - ); - - update_option('wptkf_activate_settings', $wptkf_activate_settings); - update_option('wptkf_browser_support_settings', 'false'); - -} - - -function wptkf_options_page() { - include('wptkf_admin.php'); -} - -function wptkf_admin() { - add_options_page("Typekit Config", "Typekit Config", 1, "Typekit Config", "wptkf_options_page"); -} - -function print_typekit() { - $head = "\n\n"; - $output = get_option('wptkf_embed_code'); - $foot = "\n\n"; - if ( '' != $output ) - echo $head . $output . $foot; -} - -function wptkf_active_typekit() { - - $wptkf_activate_settings = get_option('wptkf_activate_settings'); - $activate_settings_checked = ''; - - - for ($q = 0; $q < count($wptkf_activate_settings['wptkf_activate_settings']); $q++) { - $activate_settings_array = $wptkf_activate_settings['wptkf_activate_settings'][$q]; - if($activate_settings_array['enabled'] == 'true') { - if(($activate_settings_array['condition'] == 'Is all')) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is front page') && is_front_page() ) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is home') && is_home() ) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is page') && is_page() ) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is single') && is_single() ) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is archive') && is_archive() ) { - $activate_settings_checked = '1'; - } - - if(($activate_settings_array['condition'] == 'Is 404 page') && is_404() ) { - $activate_settings_checked = '1'; - } - } - } - - if($activate_settings_checked == '1' ) { - print_typekit(); - } -} - -function wptkf_admin_footer() { - if( basename($_SERVER['REQUEST_URI']) == 'typekit.php') { - $plugin_data = get_plugin_data( __FILE__ ); - printf('%1$s plugin | ' . __('Version') . ' %2$s | ' . __('Author') . ' %3$s
    ', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']); - } -} -function is_browser_support() { - - require_once(dirname (__FILE__)."/xbd/xbd.php"); - - $wptkf_browser_support_settings = get_option('wptkf_browser_support_settings'); - - if ($wptkf_browser_support_settings == 'false') { - return 1; - } else { - $browser_agent = 0; - - if (_browser('chrome', '>= 3.1')) { - $browser_agent = 1; - } elseif (_browser('safari', '>= 3.1')) { - $browser_agent = 1; - } elseif (_browser('firefox', '>= 3.5')) { - $browser_agent = 1; - } elseif (_browser('msie', '>= 4.0')) { - $browser_agent = 1; - } elseif (_browser('opera', '>= 10')) { - $browser_agent = 1; - } elseif (_browser('netscape', '>= 4.0')) { - $browser_agent = 1; - } - - if($browser_agent == '1' ) { - return 1; - } - } -} - - -if ( function_exists('register_activation_hook') ) - register_activation_hook(__FILE__, 'wptkf_install'); - - - if (version_compare($wp_version, '2.8', '>=')) add_filter('upgrader_pre_install', 'wptkf_activation', 10, 2); - -if ( function_exists('register_uninstall_hook') ) - register_uninstall_hook(__FILE__, 'wptkf_uninstall'); - -if ( is_admin() ) { - add_action('in_admin_footer', 'wptkf_admin_footer'); - add_action('admin_menu', 'wptkf_admin'); -} else { - if ( is_browser_support() ) { - add_action('wp_head', 'wptkf_active_typekit'); - } -} -?> diff --git a/blog/wp-content/plugins/typekit/wptkf_admin.php b/blog/wp-content/plugins/typekit/wptkf_admin.php deleted file mode 100644 index 4a15a6f..0000000 --- a/blog/wp-content/plugins/typekit/wptkf_admin.php +++ /dev/null @@ -1,153 +0,0 @@ - -

    - '.__('You do not have sufficient permissions to edit plugins for this blog.', 'typekit').'

    '); - } - } else { - $wptkf_embed_code = get_option('wptkf_embed_code'); - } - - if ( ($_POST['wptkf_activate_hidden'] == 'YES') ) { - if ( current_user_can('edit_plugins') ) { - - $wptkf_post_activate_settings = array(); - for ($w = 0; $w < count($_POST['activate_settings_arrays']['wptkf_activate_settings']); $w++){ - $e = $_POST['activate_settings_arrays']['wptkf_activate_settings'][$w]; - $e['condition'] = ($e['condition']); - - if($_POST['activate_setting_enabled'] != '') { - if(in_array($e['condition'], $_POST['activate_setting_enabled'])) { - $e['enabled'] = 'true'; - } else { - $e['enabled'] = 'false'; - } - } - $wptkf_post_activate_settings[] = $e; - } - - $_POST['activate_settings_arrays']['wptkf_activate_settings'] = $wptkf_post_activate_settings; - - update_option('wptkf_activate_settings', $_POST['activate_settings_arrays']); - - $message_export = '

    '; - $message_export.= __('Activate Typekit!', 'typekit'); - $message_export.= '

    '; - - } else { - wp_die('

    '.__('You do not have sufficient permissions to edit plugins for this blog.', 'typekit').'

    '); - } - } - - if ( ($_POST['browser_detection'] == 'YES') ) { - if ( current_user_can('edit_plugins') ) { - - $message_export = '

    '; - - if($_POST['wptkf_browser_support_settings'] == '1' ) { - $wptkf_bss = 'true'; - $message_export.= __('Browser Detection Enabled!', 'ccrdfa'); - } else { - $wptkf_bss = 'false'; - $message_export.= __('Browser Detection Disabled!', 'ccrdfa'); - } - - update_option('wptkf_browser_support_settings', $wptkf_bss); - - $message_export.= '

    '; - - } else { - wp_die('

    '.__('You do not have sufficient permissions to edit plugins for this blog.', 'ccrdfa').'

    '); - } - } - - -?> - -
    -

    - -
    -
    -
    -

    -
    -
    -
    - -

    -

    -
    -
    -
    -
    -
    -
    -
    -

    -
    -

    -
    - -
    - - - -
    - '; - $activate_settings_checked = ''; - - } - ?> -
    -

    - -
    -
    -
    -
    -
    -
    -

    - -
    -

    -
    - -
    -
    -
    -
    - -

    - - -

    -
    - -
    -
    - - -
    \ No newline at end of file diff --git a/blog/wp-content/plugins/typekit/xbd/xbd.php b/blog/wp-content/plugins/typekit/xbd/xbd.php deleted file mode 100644 index 790e23d..0000000 --- a/blog/wp-content/plugins/typekit/xbd/xbd.php +++ /dev/null @@ -1,222 +0,0 @@ - -Copyright (C) <2009> - -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 3 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, see . -*/ - -function _print($name, $ret) -{ - echo $name . '
    '; - - if (!f($ret)) - { - $ret = 'false'; - } - elseif ($ret == '1') - { - $ret = 'true'; - } - - echo '
    ';
    -	print_r($ret);
    -	echo '
    '; - - return; -} - -function v_server($a) -{ - return (isset($_SERVER[$a])) ? $_SERVER[$a] : ''; -} - -function f($s) -{ - return !empty($s); -} - -function w($a = '', $d = false) -{ - if (!f($a) || !is_string($a)) return array(); - - $e = explode(' ', $a); - if ($d !== false) - { - foreach ($e as $i => $v) - { - $e[$v] = $d; - unset($e[$i]); - } - } - - return $e; -} - -/* -If you want to add more browsers, do it but be careful... order matters. -*/ -function _browser($a_browser = false, $a_version = false, $name = false, $d_name = false) -{ - $browser_list = 'nokia motorola samsung sonyericsson blackberry iphone htc '; - $browser_list .= 'flock firefox konqueror lobo msie netscape navigator mosaic netsurf lynx amaya omniweb '; - $browser_list .= 'googlebot googlebot-image feedfetcher-google gigabot msnbot thunderbird fennec minimo '; - $browser_list .= 'minefield chrome wget cheshire safari avant camino seamonkey aol bloglines '; - $browser_list .= 'wii playstation netfront opera mozilla gecko ubuntu'; - - $browser_type = array( - 'mobile' => 'nokia motorola samsung sonyericsson blackberry iphone fennec minimo htc', - 'console' => 'wii playstation', - 'bot' => 'googlebot googlebot-image feedfetcher-google gigabot msnbot bloglines' - ); - - $platforms = array( - 'linux' => w('linux'), - 'mac' => array('macintosh', 'mac platform x', 'mac os x'), - 'windows' => w('windows win32') - ); - - $user_browser = strtolower(v_server('HTTP_USER_AGENT')); - - $this_version = $this_browser = $this_platform = ''; - - if ($a_browser == '*') { - $a_browser = $a_version = $name = false; - $d_name = true; - } - - if ($a_browser === false && $a_version === false && $name === false && $d_name !== false) - { - return $user_browser; - } - - foreach (w('user_browser a_browser a_version name d_name') as $row) - { - $vrow = $$row; - if (is_string($vrow)) { - $$row = strtolower($vrow); - } - } - - $browser_limit = strlen($user_browser); - foreach (w($browser_list) as $row) - { - $row = ($a_browser !== false) ? $a_browser : $row; - $n = stristr($user_browser, $row); - if (!$n || f($this_browser)) continue; - - $this_browser = $row; - $j = strpos($user_browser, $row) + strlen($row); - $j2 = substr($user_browser, $j, 1); - if (preg_match('#[\/\_\-\ ]#', $j2)) { - $j += 1; - } - - for (; $j <= $browser_limit; $j++) - { - $s = trim(substr($user_browser, $j, 1)); - if (!preg_match('/[\w\.\-]/', $s)) break; - - $this_version .= $s; - } - } - - if ($a_browser !== false && ($d_name === false || $name === true)) - { - $ret = false; - if (strtolower($a_browser) == $this_browser) - { - $ret = true; - if ($a_version !== false) - { - if (f($this_version)) - { - $a_sign = explode(' ', $a_version); - if (version_compare($this_version, $a_sign[1], $a_sign[0]) === false) { - $ret = false; - $vf = true; - } - } - else - { - $ret = false; - } - } - } - - if ($name !== true) - { - return $ret; - } - } - - foreach ($platforms as $os => $match) - { - foreach ($match as $os_name) - { - if (strpos($user_browser, $os_name) !== false) - { - $this_platform = $os; - break 2; - } - } - } - - $this_type = ''; - if (f($this_browser)) - { - foreach ($browser_type as $type => $browsers) - { - foreach (w($browsers) as $row) - { - if (strpos($this_browser, $row) !== false) - { - $this_type = $type; - break 2; - } - } - } - - if (!$this_type) $this_type = 'desktop'; - } - - if ($name !== false) - { - if ($a_browser !== false && $a_version !== false && $ret === false) - { - return false; - } - - $s_browser = ''; - $s_data = array($this_type, $this_platform, $this_browser, $this_version); - foreach ($s_data as $row) - { - if (f($row)) $s_browser .= (($s_browser != '') ? ' ' : '') . $row; - } - - return $s_browser; - } - - return array( - 'browser' => $this_browser, - 'version' => $this_version, - 'platform' => $this_platform, - 'type' => $this_type, - 'useragent' => $user_browser - ); -} - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/wmd-editor/images/bg-fill.png b/blog/wp-content/plugins/wmd-editor/images/bg-fill.png deleted file mode 100644 index ec503ce..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/bg-fill.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/bg.png b/blog/wp-content/plugins/wmd-editor/images/bg.png deleted file mode 100644 index 5f00af3..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/bg.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/blockquote.png b/blog/wp-content/plugins/wmd-editor/images/blockquote.png deleted file mode 100644 index 537864a..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/blockquote.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/bold.png b/blog/wp-content/plugins/wmd-editor/images/bold.png deleted file mode 100644 index eac2763..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/bold.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/code.png b/blog/wp-content/plugins/wmd-editor/images/code.png deleted file mode 100644 index dc1011c..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/code.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/h1.png b/blog/wp-content/plugins/wmd-editor/images/h1.png deleted file mode 100644 index 96baecb..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/h1.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/hr.png b/blog/wp-content/plugins/wmd-editor/images/hr.png deleted file mode 100644 index 08be8e5..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/hr.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/img.png b/blog/wp-content/plugins/wmd-editor/images/img.png deleted file mode 100644 index 596b989..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/img.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/italic.png b/blog/wp-content/plugins/wmd-editor/images/italic.png deleted file mode 100644 index 412b0fc..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/italic.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/link.png b/blog/wp-content/plugins/wmd-editor/images/link.png deleted file mode 100644 index 1e11500..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/link.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/ol.png b/blog/wp-content/plugins/wmd-editor/images/ol.png deleted file mode 100644 index 3df2b9b..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/ol.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/redo.png b/blog/wp-content/plugins/wmd-editor/images/redo.png deleted file mode 100644 index 736a78b..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/redo.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/separator.png b/blog/wp-content/plugins/wmd-editor/images/separator.png deleted file mode 100644 index 9cb87b9..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/separator.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/ul.png b/blog/wp-content/plugins/wmd-editor/images/ul.png deleted file mode 100644 index 978be7e..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/ul.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/undo.png b/blog/wp-content/plugins/wmd-editor/images/undo.png deleted file mode 100644 index 533faaf..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/undo.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/wmd-on.png b/blog/wp-content/plugins/wmd-editor/images/wmd-on.png deleted file mode 100644 index 4844ae9..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/wmd-on.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/images/wmd.png b/blog/wp-content/plugins/wmd-editor/images/wmd.png deleted file mode 100644 index 04177fb..0000000 Binary files a/blog/wp-content/plugins/wmd-editor/images/wmd.png and /dev/null differ diff --git a/blog/wp-content/plugins/wmd-editor/showdown.js b/blog/wp-content/plugins/wmd-editor/showdown.js deleted file mode 100644 index 2aae197..0000000 --- a/blog/wp-content/plugins/wmd-editor/showdown.js +++ /dev/null @@ -1,421 +0,0 @@ -var Attacklab=Attacklab||{}; -Attacklab.showdown=Attacklab.showdown||{}; -Attacklab.showdown.converter=function(){ -this.obfuscation; -var _1; -var _2; -var _3; -var _4=0; -this.makeHtml=function(_5){ -_1=new Array(); -_2=new Array(); -_3=new Array(); -_5=_5.replace(/~/g,"~T"); -_5=_5.replace(/\$/g,"~D"); -_5=_5.replace(/\r\n/g,"\n"); -_5=_5.replace(/\r/g,"\n"); -_5="\n\n"+_5+"\n\n"; -_5=_6(_5); -_5=_5.replace(/^[ \t]+$/mg,""); -_5=_7(_5); -_5=_8(_5); -_5=_9(_5); -_5=_a(_5); -_5=_5.replace(/~D/g,"$$"); -_5=_5.replace(/~T/g,"~"); -return _5; -}; -var _8=function(_b){ -var _b=_b.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,function(_c,m1,m2,m3,m4){ -m1=m1.toLowerCase(); -_1[m1]=_11(m2); -if(m3){ -return m3+m4; -}else{ -if(m4){ -_2[m1]=m4.replace(/"/g,"""); -} -} -return ""; -}); -return _b; -}; -var _7=function(_12){ -_12=_12.replace(/\n/g,"\n\n"); -var _13="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"; -var _14="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"; -_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,_15); -_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,_15); -_12=_12.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,_15); -_12=_12.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,_15); -_12=_12.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,_15); -_12=_12.replace(/\n\n/g,"\n"); -return _12; -}; -var _15=function(_16,m1){ -var _18=m1; -_18=_18.replace(/\n\n/g,"\n"); -_18=_18.replace(/^\n/,""); -_18=_18.replace(/\n+$/g,""); -_18="\n\n~K"+(_3.push(_18)-1)+"K\n\n"; -return _18; -}; -var _9=function(_19){ -_19=_1a(_19); -var key=_1c("
    "); -_19=_19.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key); -_19=_19.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key); -_19=_19.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key); -_19=_1d(_19); -_19=_1e(_19); -_19=_1f(_19); -_19=_7(_19); -_19=_20(_19); -return _19; -}; -var _21=function(_22){ -_22=_23(_22); -_22=_24(_22); -_22=_25(_22); -_22=_26(_22); -_22=_27(_22); -_22=_28(_22); -_22=_11(_22); -_22=_29(_22); -_22=_22.replace(/ +\n/g,"
    \n"); -return _22; -}; -var _24=function(_2a){ -var _2b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi; -_2a=_2a.replace(_2b,function(_2c){ -var tag=_2c.replace(/(.)<\/?code>(?=.)/g,"$1`"); -tag=_2e(tag,"\\`*_"); -return tag; -}); -return _2a; -}; -var _27=function(_2f){ -_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_30); -_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_30); -_2f=_2f.replace(/(\[([^\[\]]+)\])()()()()()/g,_30); -return _2f; -}; -var _30=function(_31,m1,m2,m3,m4,m5,m6,m7){ -if(m7==undefined){ -m7=""; -} -var _39=m1; -var _3a=m2; -var _3b=m3.toLowerCase(); -var url=m4; -var _3d=m7; -if(url==""){ -if(_3b==""){ -_3b=_3a.toLowerCase().replace(/ ?\n/g," "); -} -url="#"+_3b; -if(_1[_3b]!=undefined){ -url=_1[_3b]; -if(_2[_3b]!=undefined){ -_3d=_2[_3b]; -} -}else{ -if(_39.search(/\(\s*\)$/m)>-1){ -url=""; -}else{ -return _39; -} -} -} -url=_2e(url,"*_"); -var _3e=""; -return _3e; -}; -var _26=function(_3f){ -_3f=_3f.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_40); -_3f=_3f.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_40); -return _3f; -}; -var _40=function(_41,m1,m2,m3,m4,m5,m6,m7){ -var _49=m1; -var _4a=m2; -var _4b=m3.toLowerCase(); -var url=m4; -var _4d=m7; -if(!_4d){ -_4d=""; -} -if(url==""){ -if(_4b==""){ -_4b=_4a.toLowerCase().replace(/ ?\n/g," "); -} -url="#"+_4b; -if(_1[_4b]!=undefined){ -url=_1[_4b]; -if(_2[_4b]!=undefined){ -_4d=_2[_4b]; -} -}else{ -return _49; -} -} -_4a=_4a.replace(/"/g,"""); -url=_2e(url,"*_"); -var _4e="\""+_4a+"\"";"+_21(m1)+""); -}); -_4f=_4f.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(_52,m1){ -return _1c("

    "+_21(m1)+"

    "); -}); -_4f=_4f.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(_54,m1,m2){ -var _57=m1.length; -return _1c(""+_21(m2)+""); -}); -return _4f; -}; -var _58; -var _1d=function(_59){ -_59+="~0"; -var _5a=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; -if(_4){ -_59=_59.replace(_5a,function(_5b,m1,m2){ -var _5e=m1; -var _5f=(m2.search(/[*+-]/g)>-1)?"ul":"ol"; -_5e=_5e.replace(/\n{2,}/g,"\n\n\n"); -var _60=_58(_5e); -_60=_60.replace(/\s+$/,""); -_60="<"+_5f+">"+_60+"\n"; -return _60; -}); -}else{ -_5a=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g; -_59=_59.replace(_5a,function(_61,m1,m2,m3){ -var _65=m1; -var _66=m2; -var _67=(m3.search(/[*+-]/g)>-1)?"ul":"ol"; -var _66=_66.replace(/\n{2,}/g,"\n\n\n"); -var _68=_58(_66); -_68=_65+"<"+_67+">\n"+_68+"\n"; -return _68; -}); -} -_59=_59.replace(/~0/,""); -return _59; -}; -_58=function(_69){ -_4++; -_69=_69.replace(/\n{2,}$/,"\n"); -_69+="~0"; -_69=_69.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(_6a,m1,m2,m3,m4){ -var _6f=m4; -var _70=m1; -var _71=m2; -if(_70||(_6f.search(/\n{2,}/)>-1)){ -_6f=_9(_72(_6f)); -}else{ -_6f=_1d(_72(_6f)); -_6f=_6f.replace(/\n$/,""); -_6f=_21(_6f); -} -return "
  • "+_6f+"
  • \n"; -}); -_69=_69.replace(/~0/g,""); -_4--; -return _69; -}; -var _1e=function(_73){ -_73+="~0"; -_73=_73.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(_74,m1,m2){ -var _77=m1; -var _78=m2; -_77=_79(_72(_77)); -_77=_6(_77); -_77=_77.replace(/^\n+/g,""); -_77=_77.replace(/\n+$/g,""); -_77="
    "+_77+"\n
    "; -return _1c(_77)+_78; -}); -_73=_73.replace(/~0/,""); -return _73; -}; -var _1c=function(_7a){ -_7a=_7a.replace(/(^\n+|\n+$)/g,""); -return "\n\n~K"+(_3.push(_7a)-1)+"K\n\n"; -}; -var _23=function(_7b){ -_7b=_7b.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(_7c,m1,m2,m3,m4){ -var c=m3; -c=c.replace(/^([ \t]*)/g,""); -c=c.replace(/[ \t]*$/g,""); -c=_79(c); -return m1+""+c+""; -}); -return _7b; -}; -var _79=function(_82){ -_82=_82.replace(/&/g,"&"); -_82=_82.replace(//g,">"); -_82=_2e(_82,"*_{}[]\\",false); -return _82; -}; -var _29=function(_83){ -_83=_83.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"); -_83=_83.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2"); -return _83; -}; -this.hidetable; -var _1f=function(_84){ -_84=_84.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(_85,m1){ -var bq=m1; -bq=bq.replace(/^[ \t]*>[ \t]?/gm,"~0"); -bq=bq.replace(/~0/g,""); -bq=bq.replace(/^[ \t]+$/gm,""); -bq=_9(bq); -bq=bq.replace(/(^|\n)/g,"$1 "); -bq=bq.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(_88,m1){
    -var pre=m1;
    -pre=pre.replace(/^  /mg,"~0");
    -pre=pre.replace(/~0/g,"");
    -return pre;
    -});
    -return _1c("
    \n"+bq+"\n
    "); -}); -return _84; -}; -var _20=function(_8b){ -_8b=_8b.replace(/^\n+/g,""); -_8b=_8b.replace(/\n+$/g,""); -var _8c=_8b.split(/\n{2,}/g); -var _8d=new Array(); -var end=_8c.length; -for(var i=0;i=0){ -_8d.push(str); -}else{ -if(str.search(/\S/)>=0){ -str=_21(str); -str=str.replace(/^([ \t]*)/g,"

    "); -str+="

    "; -_8d.push(str); -} -} -} -end=_8d.length; -for(var i=0;i=0){ -var _91=_3[RegExp.$1]; -_91=_91.replace(/\$/g,"$$$$"); -_8d[i]=_8d[i].replace(/~K\d+K/,_91); -} -} -return _8d.join("\n\n"); -}; -var _11=function(_92){ -_92=_92.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"); -_92=_92.replace(/<(?![a-z\/?\$!])/gi,"<"); -return _92; -}; -var _25=function(_93){ -_93=_93.replace(/\\(\\)/g,_94); -_93=_93.replace(/\\([`*_{}\[\]()>#+-.!])/g,_94); -return _93; -}; -var _28=function(_95){ -_95=_95.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"
    $1"); -_95=_95.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(_96,m1){ -return _98(_a(m1)); -}); -return _95; -}; -var _98=function(_99){ -function char2hex(ch){ -var _9b="0123456789ABCDEF"; -var dec=ch.charCodeAt(0); -return (_9b.charAt(dec>>4)+_9b.charAt(dec&15)); -} -var _9d=[function(ch){ -return "&#"+ch.charCodeAt(0)+";"; -},function(ch){ -return "&#x"+char2hex(ch)+";"; -},function(ch){ -return ch; -}]; -_99="mailto:"+_99; -_99=_99.replace(/./g,function(ch){ -if(ch=="@"){ -ch=_9d[Math.floor(Math.random()*2)](ch); -}else{ -if(ch!=":"){ -var r=Math.random(); -ch=(r>0.9?_9d[2](ch):r>0.45?_9d[1](ch):_9d[0](ch)); -} -} -return ch; -}); -_99=""+_99+""; -_99=_99.replace(/">.+:/g,"\">"); -return _99; -}; -var _a=function(_a3){ -_a3=_a3.replace(/~E(\d+)E/g,function(_a4,m1){ -var _a6=parseInt(m1); -return String.fromCharCode(_a6); -}); -return _a3; -}; -var _72=function(_a7){ -_a7=_a7.replace(/^(\t|[ ]{1,4})/gm,"~0"); -_a7=_a7.replace(/~0/g,""); -return _a7; -}; -var _6=function(_a8){ -_a8=_a8.replace(/\t(?=\t)/g," "); -_a8=_a8.replace(/\t/g,"~A~B"); -_a8=_a8.replace(/~B(.+?)~A/g,function(_a9,m1,m2){ -var _ac=m1; -var _ad=4-_ac.length%4; -for(var i=0;i<_ad;i++){ -_ac+=" "; -} -return _ac; -}); -_a8=_a8.replace(/~A/g," "); -_a8=_a8.replace(/~B/g,""); -return _a8; -}; -var _2e=function(_af,_b0,_b1){ -var _b2="(["+_b0.replace(/([\[\]\\])/g,"\\$1")+"])"; -if(_b1){ -_b2="\\\\"+_b2; -} -var _b3=new RegExp(_b2,"g"); -_af=_af.replace(_b3,_94); -return _af; -}; -var _94=function(_b4,m1){ -var _b6=m1.charCodeAt(0); -return "~E"+_b6+"E"; -}; -this.obfuscation; -}; -var Showdown=Attacklab.showdown; -if(Attacklab.fileLoaded){ -Attacklab.fileLoaded("showdown.js"); -} - diff --git a/blog/wp-content/plugins/wmd-editor/wmd-base.js b/blog/wp-content/plugins/wmd-editor/wmd-base.js deleted file mode 100644 index 9d16e9d..0000000 --- a/blog/wp-content/plugins/wmd-editor/wmd-base.js +++ /dev/null @@ -1,1799 +0,0 @@ -var Attacklab=Attacklab||{}; -Attacklab.wmdBase=function(){ -var _1=top; -var _2=_1["Attacklab"]; -var _3=_1["document"]; -var _4=_1["RegExp"]; -var _5=_1["navigator"]; -_2.Util={}; -_2.Position={}; -_2.Command={}; -var _6=_2.Util; -var _7=_2.Position; -var _8=_2.Command; -_2.Util.IE=(_5.userAgent.indexOf("MSIE")!=-1); -_2.Util.oldIE=(_5.userAgent.indexOf("MSIE 6.")!=-1||_5.userAgent.indexOf("MSIE 5.")!=-1); -_2.Util.newIE=!_2.Util.oldIE&&(_5.userAgent.indexOf("MSIE")!=-1); -_6.makeElement=function(_9,_a){ -var _b=_3.createElement(_9); -if(!_a){ -var _c=_b.style; -_c.margin="0"; -_c.padding="0"; -_c.clear="none"; -_c.cssFloat="none"; -_c.textAlign="left"; -_c.position="relative"; -_c.lineHeight="1em"; -_c.border="none"; -_c.color="black"; -_c.backgroundRepeat="no-repeat"; -_c.backgroundImage="none"; -_c.minWidth=_c.minHeight="0"; -_c.maxWidth=_c.maxHeight="90000px"; -} -return _b; -}; -_6.getStyle=function(_d,_e){ -var _f=function(_10){ -return _10.replace(/-(\S)/g,function(_11,_12){ -return _12.toUpperCase(); -}); -}; -if(_d.currentStyle){ -_e=_f(_e); -return _d.currentStyle[_e]; -}else{ -if(_1.getComputedStyle){ -return _3.defaultView.getComputedStyle(_d,null).getPropertyValue(_e); -} -} -return ""; -}; -_6.getElementsByClass=function(_13,_14,_15){ -var _16=[]; -if(_14==null){ -_14=_3; -} -if(_15==null){ -_15="*"; -} -var _17=_14.getElementsByTagName(_15); -var _18=_17.length; -var _19=new _4("(^|\\s)"+_13+"(\\s|$)"); -for(var i=0,j=0;i<_18;i++){ -if(_19.test(_17[i].className.toLowerCase())){ -_16[j]=_17[i]; -j++; -} -} -return _16; -}; -_6.addEvent=function(_1c,_1d,_1e){ -if(_1c.attachEvent){ -_1c.attachEvent("on"+_1d,_1e); -}else{ -_1c.addEventListener(_1d,_1e,false); -} -}; -_6.removeEvent=function(_1f,_20,_21){ -if(_1f.detachEvent){ -_1f.detachEvent("on"+_20,_21); -}else{ -_1f.removeEventListener(_20,_21,false); -} -}; -_6.regexToString=function(_22){ -var _23={}; -var _24=_22.toString(); -_23.expression=_24.replace(/\/([gim]*)$/,""); -_23.flags=_4.$1; -_23.expression=_23.expression.replace(/(^\/|\/$)/g,""); -return _23; -}; -_6.stringToRegex=function(_25){ -return new _4(_25.expression,_25.flags); -}; -_6.elementOk=function(_26){ -if(!_26||!_26.parentNode){ -return false; -} -if(_6.getStyle(_26,"display")=="none"){ -return false; -} -return true; -}; -_6.skin=function(_27,_28,_29,_2a){ -var _2b; -var _2c=(_5.userAgent.indexOf("MSIE")!=-1); -if(_2c){ -_6.fillers=[]; -} -var _2d=_29/2; -for(var _2e=0;_2e<4;_2e++){ -var _2f=_6.makeElement("div"); -_2b=_2f.style; -_2b.overflow="hidden"; -_2b.padding="0"; -_2b.margin="0"; -_2b.lineHeight="0px"; -_2b.height=_2d+"px"; -_2b.width="50%"; -_2b.maxHeight=_2d+"px"; -_2b.position="absolute"; -if(_2e&1){ -_2b.top="0"; -}else{ -_2b.bottom=-_29+"px"; -} -_2b.zIndex="-1000"; -if(_2e&2){ -_2b.left="0"; -}else{ -_2b.marginLeft="50%"; -} -if(_2c){ -var _30=_6.makeElement("span"); -_2b=_30.style; -_2b.height="100%"; -_2b.width=_2a; -_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg.png')"; -_2b.position="absolute"; -if(_2e&1){ -_2b.top="0"; -}else{ -_2b.bottom="0"; -} -if(_2e&2){ -_2b.left="0"; -}else{ -_2b.right="0"; -} -_2f.appendChild(_30); -}else{ -_2b.backgroundImage="url("+_28+")"; -_2b.backgroundPosition=(_2e&2?"left":"right")+" "+(_2e&1?"top":"bottom"); -} -_27.appendChild(_2f); -} -var _31=function(_32){ -var _33=_6.makeElement("div"); -if(_6.fillers){ -_6.fillers.push(_33); -} -_2b=_33.style; -_2b.overflow="hidden"; -_2b.padding="0"; -_2b.margin="0"; -_2b.marginTop=_2d+"px"; -_2b.lineHeight="0px"; -_2b.height="100%"; -_2b.width="50%"; -_2b.position="absolute"; -_2b.zIndex="-1000"; -if(_2c){ -var _34=_6.makeElement("span"); -_2b=_34.style; -_2b.height="100%"; -_2b.width=_2a; -_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg-fill.png',sizingMethod='scale')"; -_2b.position="absolute"; -_33.appendChild(_34); -if(_32){ -_2b.left="0"; -} -if(!_32){ -_2b.right="0"; -} -} -if(!_2c){ -_2b.backgroundImage="url("+_2.basePath+"images/bg-fill.png)"; -_2b.backgroundRepeat="repeat-y"; -if(_32){ -_2b.backgroundPosition="left top"; -} -if(!_32){ -_2b.backgroundPosition="right top"; -} -} -if(!_32){ -_33.style.marginLeft="50%"; -} -return _33; -}; -_27.appendChild(_31(true)); -_27.appendChild(_31(false)); -}; -_6.setImage=function(_35,_36,_37,_38){ -_36=_2.basePath+_36; -if(_5.userAgent.indexOf("MSIE")!=-1){ -var _39=_35.firstChild; -var _3a=_39.style; -_3a.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_36+"')"; -}else{ -_35.src=_36; -} -return _35; -}; -_6.createImage=function(_3b,_3c,_3d){ -_3b=_2.basePath+_3b; -if(_5.userAgent.indexOf("MSIE")!=-1){ -var _3e=_6.makeElement("span"); -var _3f=_3e.style; -_3f.display="inline-block"; -_3f.height="1px"; -_3f.width="1px"; -_3e.unselectable="on"; -var _40=_6.makeElement("span"); -_3f=_40.style; -_3f.display="inline-block"; -_3f.height="1px"; -_3f.width="1px"; -_3f.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_3b+"')"; -_40.unselectable="on"; -_3e.appendChild(_40); -}else{ -var _3e=_6.makeElement("img"); -_3e.style.display="inline"; -_3e.src=_3b; -} -_3e.style.border="none"; -_3e.border="0"; -if(_3c&&_3d){ -_3e.style.width=_3c+"px"; -_3e.style.height=_3d+"px"; -} -return _3e; -}; -_6.prompt=function(_41,_42,_43){ -var _44; -var _45,_46,_47; -var _48=function(_49){ -var _4a=(_49.charCode||_49.keyCode); -if(_4a==27){ -_4b(true); -} -}; -var _4b=function(_4c){ -_6.removeEvent(_3.body,"keydown",_48); -var _4d=_47.value; -if(_4c){ -_4d=null; -} -_45.parentNode.removeChild(_45); -_46.parentNode.removeChild(_46); -_43(_4d); -return false; -}; -if(_42==undefined){ -_42=""; -} -var _4e=function(){ -_46=_6.makeElement("div"); -_44=_46.style; -_3.body.appendChild(_46); -_44.position="absolute"; -_44.top="0"; -_44.left="0"; -_44.backgroundColor="#000"; -_44.zIndex="1000"; -var _4f=/konqueror/.test(_5.userAgent.toLowerCase()); -if(_4f){ -_44.backgroundColor="transparent"; -}else{ -_44.opacity="0.5"; -_44.filter="alpha(opacity=50)"; -} -var _50=_7.getPageSize(); -_44.width="100%"; -_44.height=_50[1]+"px"; -}; -var _51=function(){ -_45=_3.createElement("div"); -_45.style.border="3px solid #333"; -_45.style.backgroundColor="#ccc"; -_45.style.padding="10px;"; -_45.style.borderTop="3px solid white"; -_45.style.borderLeft="3px solid white"; -_45.style.position="fixed"; -_45.style.width="400px"; -_45.style.zIndex="1001"; -var _52=_6.makeElement("div"); -_44=_52.style; -_44.fontSize="14px"; -_44.fontFamily="Helvetica, Arial, Verdana, sans-serif"; -_44.padding="5px"; -_52.innerHTML=_41; -_45.appendChild(_52); -var _53=_6.makeElement("form"); -_53.onsubmit=function(){ -return _4b(); -}; -_44=_53.style; -_44.padding="0"; -_44.margin="0"; -_44.cssFloat="left"; -_44.width="100%"; -_44.textAlign="center"; -_44.position="relative"; -_45.appendChild(_53); -_47=_3.createElement("input"); -_47.value=_42; -_44=_47.style; -_44.display="block"; -_44.width="80%"; -_44.marginLeft=_44.marginRight="auto"; -_44.backgroundColor="white"; -_44.color="black"; -_53.appendChild(_47); -var _54=_3.createElement("input"); -_54.type="button"; -_54.onclick=function(){ -return _4b(); -}; -_54.value="OK"; -_44=_54.style; -_44.margin="10px"; -_44.display="inline"; -_44.width="7em"; -var _55=_3.createElement("input"); -_55.type="button"; -_55.onclick=function(){ -return _4b(true); -}; -_55.value="Cancel"; -_44=_55.style; -_44.margin="10px"; -_44.display="inline"; -_44.width="7em"; -if(/mac/.test(_5.platform.toLowerCase())){ -_53.appendChild(_55); -_53.appendChild(_54); -}else{ -_53.appendChild(_54); -_53.appendChild(_55); -} -_6.addEvent(_3.body,"keydown",_48); -_45.style.top="50%"; -_45.style.left="50%"; -_45.style.display="block"; -if(_2.Util.oldIE){ -var _56=_7.getPageSize(); -_45.style.position="absolute"; -_45.style.top=_3.documentElement.scrollTop+200+"px"; -_45.style.left="50%"; -} -_3.body.appendChild(_45); -_45.style.marginTop=-(_7.getHeight(_45)/2)+"px"; -_45.style.marginLeft=-(_7.getWidth(_45)/2)+"px"; -}; -_4e(); -_1.setTimeout(function(){ -_51(); -var _57=_42.length; -if(_47.selectionStart!=undefined){ -_47.selectionStart=0; -_47.selectionEnd=_57; -}else{ -if(_47.createTextRange){ -var _58=_47.createTextRange(); -_58.collapse(false); -_58.moveStart("character",-_57); -_58.moveEnd("character",_57); -_58.select(); -} -} -_47.focus(); -},0); -}; -_6.objectsEqual=function(_59,_5a){ -for(var _5b in _59){ -if(_59[_5b]!=_5a[_5b]){ -return false; -} -} -for(_5b in _5a){ -if(_59[_5b]!=_5a[_5b]){ -return false; -} -} -return true; -}; -_6.cloneObject=function(_5c){ -var _5d={}; -for(var _5e in _5c){ -_5d[_5e]=_5c[_5e]; -} -return _5d; -}; -_6.escapeUnderscores=function(_5f){ -_5f=_5f.replace(/(\S)(_+)(\S)/g,function(_60,_61,_62,_63){ -_62=_62.replace(/_/g,"_"); -return _61+_62+_63; -}); -return _5f; -}; -_7.getPageSize=function(){ -var _64,_65; -var _66,_67; -if(_1.innerHeight&&_1.scrollMaxY){ -_64=_3.body.scrollWidth; -_65=_1.innerHeight+_1.scrollMaxY; -}else{ -if(_3.body.scrollHeight>_3.body.offsetHeight){ -_64=_3.body.scrollWidth; -_65=_3.body.scrollHeight; -}else{ -_64=_3.body.offsetWidth; -_65=_3.body.offsetHeight; -} -} -var _68,_69; -if(self.innerHeight){ -_68=self.innerWidth; -_69=self.innerHeight; -}else{ -if(_3.documentElement&&_3.documentElement.clientHeight){ -_68=_3.documentElement.clientWidth; -_69=_3.documentElement.clientHeight; -}else{ -if(_3.body){ -_68=_3.body.clientWidth; -_69=_3.body.clientHeight; -} -} -} -if(_65<_69){ -_67=_69; -}else{ -_67=_65; -} -if(_64<_68){ -_66=_68; -}else{ -_66=_64; -} -var _6a=[_66,_67,_68,_69]; -return _6a; -}; -_7.getPixelVal=function(_6b){ -if(_6b&&/^(-?\d+(\.\d*)?)px$/.test(_6b)){ -return _4.$1; -} -return undefined; -}; -_7.getTop=function(_6c,_6d){ -var _6e=_6c.offsetTop; -if(!_6d){ -while(_6c=_6c.offsetParent){ -_6e+=_6c.offsetTop; -} -} -return _6e; -}; -_7.setTop=function(_6f,_70,_71){ -var _72=_7.getPixelVal(_6f.style.top); -if(_72==undefined){ -_6f.style.top=_70+"px"; -_72=_70; -} -var _73=_7.getTop(_6f,_71)-_72; -_6f.style.top=(_70-_73)+"px"; -}; -_7.getLeft=function(_74,_75){ -var _76=_74.offsetLeft; -if(!_75){ -while(_74=_74.offsetParent){ -_76+=_74.offsetLeft; -} -} -return _76; -}; -_7.setLeft=function(_77,_78,_79){ -var _7a=_7.getPixelVal(_77.style.left); -if(_7a==undefined){ -_77.style.left=_78+"px"; -_7a=_78; -} -var _7b=_7.getLeft(_77,_79)-_7a; -_77.style.left=(_78-_7b)+"px"; -}; -_7.getHeight=function(_7c){ -var _7d=_7c.offsetHeight; -if(!_7d){ -_7d=_7c.scrollHeight; -} -return _7d; -}; -_7.setHeight=function(_7e,_7f){ -var _80=_7.getPixelVal(_7e.style.height); -if(_80==undefined){ -_7e.style.height=_7f+"px"; -_80=_7f; -} -var _81=_7.getHeight(_7e)-_80; -if(_81>_7f){ -_81=_7f; -} -_7e.style.height=(_7f-_81)+"px"; -}; -_7.getWidth=function(_82){ -var _83=_82.offsetWidth; -if(!_83){ -_83=_82.scrollWidth; -} -return _83; -}; -_7.setWidth=function(_84,_85){ -var _86=_7.getPixelVal(_84.style.width); -if(_86==undefined){ -_84.style.width=_85+"px"; -_86=_85; -} -var _87=_7.getWidth(_84)-_86; -if(_87>_85){ -_87=_85; -} -_84.style.width=(_85-_87)+"px"; -}; -_7.getWindowHeight=function(){ -if(_1.innerHeight){ -return _1.innerHeight; -}else{ -if(_3.documentElement&&_3.documentElement.clientHeight){ -return _3.documentElement.clientHeight; -}else{ -if(_3.body){ -return _3.body.clientHeight; -} -} -} -}; -_2.inputPoller=function(_88,_89,_8a){ -var _8b=this; -var _8c; -var _8d; -var _8e,_8f; -this.tick=function(){ -if(!_6.elementOk(_88)){ -return; -} -if(_88.selectionStart||_88.selectionStart==0){ -var _90=_88.selectionStart; -var _91=_88.selectionEnd; -if(_90!=_8c||_91!=_8d){ -_8c=_90; -_8d=_91; -if(_8e!=_88.value){ -_8e=_88.value; -return true; -} -} -} -return false; -}; -var _92=function(){ -if(_6.getStyle(_88,"display")=="none"){ -return; -} -if(_8b.tick()){ -_89(); -} -}; -var _93=function(){ -if(_8a==undefined){ -_8a=500; -} -_8f=_1.setInterval(_92,_8a); -}; -this.destroy=function(){ -_1.clearInterval(_8f); -}; -_93(); -}; -_2.undoManager=function(_94,_95){ -var _96=this; -var _97=[]; -var _98=0; -var _99="none"; -var _9a; -var _9b; -var _9c; -var _9d; -var _9e=function(_9f,_a0){ -if(_99!=_9f){ -_99=_9f; -if(!_a0){ -_a1(); -} -} -if(!_2.Util.IE||_99!="moving"){ -_9c=_1.setTimeout(_a2,1); -}else{ -_9d=null; -} -}; -var _a2=function(){ -_9d=new _2.textareaState(_94); -_9b.tick(); -_9c=undefined; -}; -this.setCommandMode=function(){ -_99="command"; -_a1(); -_9c=_1.setTimeout(_a2,0); -}; -this.canUndo=function(){ -return _98>1; -}; -this.canRedo=function(){ -if(_97[_98+1]){ -return true; -} -return false; -}; -this.undo=function(){ -if(_96.canUndo()){ -if(_9a){ -_9a.restore(); -_9a=null; -}else{ -_97[_98]=new _2.textareaState(_94); -_97[--_98].restore(); -if(_95){ -_95(); -} -} -} -_99="none"; -_94.focus(); -_a2(); -}; -this.redo=function(){ -if(_96.canRedo()){ -_97[++_98].restore(); -if(_95){ -_95(); -} -} -_99="none"; -_94.focus(); -_a2(); -}; -var _a1=function(){ -var _a3=_9d||new _2.textareaState(_94); -if(!_a3){ -return false; -} -if(_99=="moving"){ -if(!_9a){ -_9a=_a3; -} -return; -} -if(_9a){ -if(_97[_98-1].text!=_9a.text){ -_97[_98++]=_9a; -} -_9a=null; -} -_97[_98++]=_a3; -_97[_98+1]=null; -if(_95){ -_95(); -} -}; -var _a4=function(_a5){ -var _a6=false; -if(_a5.ctrlKey||_a5.metaKey){ -var _a7=(_a5.charCode||_a5.keyCode)|96; -var _a8=String.fromCharCode(_a7); -switch(_a8){ -case "y": -_96.redo(); -_a6=true; -break; -case "z": -if(!_a5.shiftKey){ -_96.undo(); -}else{ -_96.redo(); -} -_a6=true; -break; -} -} -if(_a6){ -if(_a5.preventDefault){ -_a5.preventDefault(); -} -if(_1.event){ -_1.event.returnValue=false; -} -return; -} -}; -var _a9=function(_aa){ -if(!_aa.ctrlKey&&!_aa.metaKey){ -var _ab=_aa.keyCode; -if((_ab>=33&&_ab<=40)||(_ab>=63232&&_ab<=63235)){ -_9e("moving"); -}else{ -if(_ab==8||_ab==46||_ab==127){ -_9e("deleting"); -}else{ -if(_ab==13){ -_9e("newlines"); -}else{ -if(_ab==27){ -_9e("escape"); -}else{ -if((_ab<16||_ab>20)&&_ab!=91){ -_9e("typing"); -} -} -} -} -} -} -}; -var _ac=function(){ -_6.addEvent(_94,"keypress",function(_ad){ -if((_ad.ctrlKey||_ad.metaKey)&&(_ad.keyCode==89||_ad.keyCode==90)){ -_ad.preventDefault(); -} -}); -var _ae=function(){ -if(_2.Util.IE||(_9d&&_9d.text!=_94.value)){ -if(_9c==undefined){ -_99="paste"; -_a1(); -_a2(); -} -} -}; -_9b=new _2.inputPoller(_94,_ae,100); -_6.addEvent(_94,"keydown",_a4); -_6.addEvent(_94,"keydown",_a9); -_6.addEvent(_94,"mousedown",function(){ -_9e("moving"); -}); -_94.onpaste=_ae; -_94.ondrop=_ae; -}; -var _af=function(){ -_ac(); -_a2(); -_a1(); -}; -this.destroy=function(){ -if(_9b){ -_9b.destroy(); -} -}; -_af(); -}; -_2.editor=function(_b0,_b1){ -if(!_b1){ -_b1=function(){ -}; -} -var _b2=28; -var _b3=4076; -var _b4=0; -var _b5,_b6; -var _b7=this; -var _b8,_b9; -var _ba,_bb,_bc; -var _bd,_be,_bf; -var _c0=[]; -var _c1=function(_c2){ -if(_bd){ -_bd.setCommandMode(); -} -var _c3=new _2.textareaState(_b0); -if(!_c3){ -return; -} -var _c4=_c3.getChunks(); -var _c5=function(){ -_b0.focus(); -if(_c4){ -_c3.setChunks(_c4); -} -_c3.restore(); -_b1(); -}; -var _c6=_c2(_c4,_c5); -if(!_c6){ -_c5(); -} -}; -var _c7=function(_c8){ -_b0.focus(); -if(_c8.textOp){ -_c1(_c8.textOp); -} -if(_c8.execute){ -_c8.execute(_b7); -} -}; -var _c9=function(_ca,_cb){ -var _cc=_ca.style; -if(_cb){ -_cc.opacity="1.0"; -_cc.KHTMLOpacity="1.0"; -if(_2.Util.newIE){ -_cc.filter=""; -} -if(_2.Util.oldIE){ -_cc.filter="chroma(color=fuchsia)"; -} -_cc.cursor="pointer"; -_ca.onmouseover=function(){ -_cc.backgroundColor="lightblue"; -_cc.border="1px solid blue"; -}; -_ca.onmouseout=function(){ -_cc.backgroundColor=""; -_cc.border="1px solid transparent"; -if(_2.Util.oldIE){ -_cc.borderColor="fuchsia"; -_cc.filter="chroma(color=fuchsia)"+_cc.filter; -} -}; -}else{ -_cc.opacity="0.4"; -_cc.KHTMLOpacity="0.4"; -if(_2.Util.oldIE){ -_cc.filter="chroma(color=fuchsia) alpha(opacity=40)"; -} -if(_2.Util.newIE){ -_cc.filter="alpha(opacity=40)"; -} -_cc.cursor=""; -_cc.backgroundColor=""; -if(_ca.onmouseout){ -_ca.onmouseout(); -} -_ca.onmouseover=_ca.onmouseout=null; -} -}; -var _cd=function(_ce){ -_ce&&_c0.push(_ce); -}; -var _cf=function(){ -_c0.push("|"); -}; -var _d0=function(){ -var _d1=_6.createImage("images/separator.png",20,20); -_d1.style.padding="4px"; -_d1.style.paddingTop="0px"; -_b9.appendChild(_d1); -}; -var _d2=function(_d3){ -if(_d3.image){ -var _d4=_6.createImage(_d3.image,16,16); -_d4.border=0; -if(_d3.description){ -var _d5=_d3.description; -if(_d3.key){ -var _d6=" Ctrl+"; -_d5+=_d6+_d3.key.toUpperCase(); -} -_d4.title=_d5; -} -_c9(_d4,true); -var _d7=_d4.style; -_d7.margin="0px"; -_d7.padding="1px"; -_d7.marginTop="7px"; -_d7.marginBottom="5px"; -_d4.onmouseout(); -var _d8=_d4; -_d8.onclick=function(){ -if(_d8.onmouseout){ -_d8.onmouseout(); -} -_c7(_d3); -return false; -}; -_b9.appendChild(_d8); -return _d8; -} -return; -}; -var _d9=function(){ -for(var _da in _c0){ -if(_c0[_da]=="|"){ -_d0(); -}else{ -_d2(_c0[_da]); -} -} -}; -var _db=function(){ -if(_bd){ -_c9(_be,_bd.canUndo()); -_c9(_bf,_bd.canRedo()); -} -}; -var _dc=function(){ -if(_b0.offsetParent){ -_ba=_6.makeElement("div"); -var _dd=_ba.style; -_dd.visibility="hidden"; -_dd.top=_dd.left=_dd.width="0px"; -_dd.display="inline"; -_dd.cssFloat="left"; -_dd.overflow="visible"; -_dd.opacity="0.999"; -_b8.style.position="absolute"; -_ba.appendChild(_b8); -_b0.style.marginTop=""; -var _de=_7.getTop(_b0); -_b0.style.marginTop="0"; -var _df=_7.getTop(_b0); -_b4=_de-_df; -_e0(); -_b0.parentNode.insertBefore(_ba,_b0); -_e1(); -_6.skin(_b8,_2.basePath+"images/bg.png",_b2,_b3); -_dd.visibility="visible"; -return true; -} -return false; -}; -var _e2=function(){ -var _e3=_2.wmd_env.buttons.split(/\s+/); -for(var _e4 in _e3){ -switch(_e3[_e4]){ -case "|": -_cf(); -break; -case "bold": -_cd(_8.bold); -break; -case "italic": -_cd(_8.italic); -break; -case "link": -_cd(_8.link); -break; -} -if(_2.full){ -switch(_e3[_e4]){ -case "blockquote": -_cd(_8.blockquote); -break; -case "code": -_cd(_8.code); -break; -case "image": -_cd(_8.img); -break; -case "ol": -_cd(_8.ol); -break; -case "ul": -_cd(_8.ul); -break; -case "heading": -_cd(_8.h1); -break; -case "hr": -_cd(_8.hr); -break; -} -} -} -return; -}; -var _e5=function(){ -if(/\?noundo/.test(_3.location.href)){ -_2.nativeUndo=true; -} -if(!_2.nativeUndo){ -_bd=new _2.undoManager(_b0,function(){ -_b1(); -_db(); -}); -} -var _e6=_b0.parentNode; -_b8=_6.makeElement("div"); -_b8.style.display="block"; -_b8.style.zIndex=100; -if(!_2.full){ -_b8.title+="\n(Free Version)"; -} -_b8.unselectable="on"; -_b8.onclick=function(){ -_b0.focus(); -}; -_b9=_6.makeElement("span"); -var _e7=_b9.style; -_e7.height="auto"; -_e7.paddingBottom="2px"; -_e7.lineHeight="0"; -_e7.paddingLeft="15px"; -_e7.paddingRight="65px"; -_e7.display="block"; -_e7.position="absolute"; -_b9.unselectable="on"; -_b8.appendChild(_b9); -_cd(_8.autoindent); -var _e8=_6.createImage("images/bg.png"); -var _e9=_6.createImage("images/bg-fill.png"); -_e2(); -_d9(); -if(_bd){ -_d0(); -_be=_d2(_8.undo); -_bf=_d2(_8.redo); -var _ea=_5.platform.toLowerCase(); -if(/win/.test(_ea)){ -_be.title+=" - Ctrl+Z"; -_bf.title+=" - Ctrl+Y"; -}else{ -if(/mac/.test(_ea)){ -_be.title+=" - Ctrl+Z"; -_bf.title+=" - Ctrl+Shift+Z"; -}else{ -_be.title+=" - Ctrl+Z"; -_bf.title+=" - Ctrl+Shift+Z"; -} -} -} -var _eb="keydown"; -if(_5.userAgent.indexOf("Opera")!=-1){ -_eb="keypress"; -} -_6.addEvent(_b0,_eb,function(_ec){ -var _ed=false; -if(_ec.ctrlKey||_ec.metaKey){ -var _ee=(_ec.charCode||_ec.keyCode); -var _ef=String.fromCharCode(_ee).toLowerCase(); -for(var _f0 in _c0){ -var _f1=_c0[_f0]; -if(_f1.key&&_ef==_f1.key||_f1.keyCode&&_ec.keyCode==_f1.keyCode){ -_c7(_f1); -_ed=true; -} -} -} -if(_ed){ -if(_ec.preventDefault){ -_ec.preventDefault(); -} -if(_1.event){ -_1.event.returnValue=false; -} -} -}); -_6.addEvent(_b0,"keyup",function(_f2){ -if(_f2.shiftKey&&!_f2.ctrlKey&&!_f2.metaKey){ -var _f3=(_f2.charCode||_f2.keyCode); -switch(_f3){ -case 13: -_c7(_8.autoindent); -break; -} -} -}); -if(!_dc()){ -_bc=_1.setInterval(function(){ -if(_dc()){ -_1.clearInterval(_bc); -} -},100); -} -_6.addEvent(_1,"resize",_e1); -_bb=_1.setInterval(_e1,100); -if(_b0.form){ -var _f4=_b0.form.onsubmit; -_b0.form.onsubmit=function(){ -_f5(); -if(_f4){ -return _f4.apply(this,arguments); -} -}; -} -_db(); -}; -var _f5=function(){ -if(_2.showdown){ -var _f6=new _2.showdown.converter(); -} -var _f7=_b0.value; -var _f8=function(){ -_b0.value=_f7; -}; -_f7=_6.escapeUnderscores(_f7); -if(!/markdown/.test(_2.wmd_env.output.toLowerCase())){ -if(_f6){ -_b0.value=_f6.makeHtml(_f7); -_1.setTimeout(_f8,0); -} -} -return true; -}; -var _e0=function(){ -var _f9=_6.makeElement("div"); -var _fa=_f9.style; -_fa.paddingRight="15px"; -_fa.height="100%"; -_fa.display="block"; -_fa.position="absolute"; -_fa.right="0"; -_f9.unselectable="on"; -var _fb=_6.makeElement("a"); -_fa=_fb.style; -_fa.position="absolute"; -_fa.right="10px"; -_fa.top="5px"; -_fa.display="inline"; -_fa.width="50px"; -_fa.height="25px"; -_fb.href="http://www.wmd-editor.com/"; -_fb.target="_blank"; -_fb.title="WMD: The Wysiwym Markdown Editor"; -var _fc=_6.createImage("images/wmd.png"); -var _fd=_6.createImage("images/wmd-on.png"); -_fb.appendChild(_fc); -_fb.onmouseover=function(){ -_6.setImage(_fc,"images/wmd-on.png"); -_fb.style.cursor="pointer"; -}; -_fb.onmouseout=function(){ -_6.setImage(_fc,"images/wmd.png"); -}; -_b8.appendChild(_fb); -}; -var _e1=function(){ -if(!_6.elementOk(_b0)){ -_b8.style.display="none"; -return; -} -if(_b8.style.display=="none"){ -_b8.style.display="block"; -} -var _fe=_7.getWidth(_b0); -var _ff=_7.getHeight(_b0); -var _100=_7.getLeft(_b0); -if(_b8.style.width==_fe+"px"&&_b5==_ff&&_b6==_100){ -if(_7.getTop(_b8)<_7.getTop(_b0)){ -return; -} -} -_b5=_ff; -_b6=_100; -var _101=100; -_b8.style.width=Math.max(_fe,_101)+"px"; -var root=_b8.offsetParent; -var _103=_7.getHeight(_b9); -var _104=_103-_b2+"px"; -_b8.style.height=_104; -if(_6.fillers){ -_6.fillers[0].style.height=_6.fillers[1].style.height=_104; -} -var _105=3; -_b0.style.marginTop=_103+_105+_b4+"px"; -var _106=_7.getTop(_b0); -var _100=_7.getLeft(_b0); -_7.setTop(root,_106-_103-_105); -_7.setLeft(root,_100); -_b8.style.opacity=_b8.style.opacity||0.999; -return; -}; -this.undo=function(){ -if(_bd){ -_bd.undo(); -} -}; -this.redo=function(){ -if(_bd){ -_bd.redo(); -} -}; -var init=function(){ -_e5(); -}; -this.destroy=function(){ -if(_bd){ -_bd.destroy(); -} -if(_ba.parentNode){ -_ba.parentNode.removeChild(_ba); -} -if(_b0){ -_b0.style.marginTop=""; -} -_1.clearInterval(_bb); -_1.clearInterval(_bc); -}; -init(); -}; -_2.textareaState=function(_108){ -var _109=this; -var _10a=function(_10b){ -if(_6.getStyle(_108,"display")=="none"){ -return; -} -var _10c=_5.userAgent.indexOf("Opera")!=-1; -if(_10b.selectionStart!=undefined&&!_10c){ -_10b.focus(); -_10b.selectionStart=_109.start; -_10b.selectionEnd=_109.end; -_10b.scrollTop=_109.scrollTop; -}else{ -if(_3.selection){ -if(_3.activeElement&&_3.activeElement!=_108){ -return; -} -_10b.focus(); -var _10d=_10b.createTextRange(); -_10d.moveStart("character",-_10b.value.length); -_10d.moveEnd("character",-_10b.value.length); -_10d.moveEnd("character",_109.end); -_10d.moveStart("character",_109.start); -_10d.select(); -} -} -}; -this.init=function(_10e){ -if(_10e){ -_108=_10e; -} -if(_6.getStyle(_108,"display")=="none"){ -return; -} -_10f(_108); -_109.scrollTop=_108.scrollTop; -if(!_109.text&&_108.selectionStart||_108.selectionStart=="0"){ -_109.text=_108.value; -} -}; -var _110=function(_111){ -_111=_111.replace(/\r\n/g,"\n"); -_111=_111.replace(/\r/g,"\n"); -return _111; -}; -var _10f=function(){ -if(_108.selectionStart||_108.selectionStart=="0"){ -_109.start=_108.selectionStart; -_109.end=_108.selectionEnd; -}else{ -if(_3.selection){ -_109.text=_110(_108.value); -var _112=_3.selection.createRange(); -var _113=_110(_112.text); -var _114="\x07"; -var _115=_114+_113+_114; -_112.text=_115; -var _116=_110(_108.value); -_112.moveStart("character",-_115.length); -_112.text=_113; -_109.start=_116.indexOf(_114); -_109.end=_116.lastIndexOf(_114)-_114.length; -var _117=_109.text.length-_110(_108.value).length; -if(_117){ -_112.moveStart("character",-_113.length); -while(_117--){ -_113+="\n"; -_109.end+=1; -} -_112.text=_113; -} -_10a(_108); -} -} -return _109; -}; -this.restore=function(_118){ -if(!_118){ -_118=_108; -} -if(_109.text!=undefined&&_109.text!=_118.value){ -_118.value=_109.text; -} -_10a(_118,_109); -_118.scrollTop=_109.scrollTop; -}; -this.getChunks=function(){ -var _119=new _2.Chunks(); -_119.before=_110(_109.text.substring(0,_109.start)); -_119.startTag=""; -_119.selection=_110(_109.text.substring(_109.start,_109.end)); -_119.endTag=""; -_119.after=_110(_109.text.substring(_109.end)); -_119.scrollTop=_109.scrollTop; -return _119; -}; -this.setChunks=function(_11a){ -_11a.before=_11a.before+_11a.startTag; -_11a.after=_11a.endTag+_11a.after; -var _11b=_5.userAgent.indexOf("Opera")!=-1; -if(_11b){ -_11a.before=_11a.before.replace(/\n/g,"\r\n"); -_11a.selection=_11a.selection.replace(/\n/g,"\r\n"); -_11a.after=_11a.after.replace(/\n/g,"\r\n"); -} -_109.start=_11a.before.length; -_109.end=_11a.before.length+_11a.selection.length; -_109.text=_11a.before+_11a.selection+_11a.after; -_109.scrollTop=_11a.scrollTop; -}; -this.init(); -}; -_2.Chunks=function(){ -}; -_2.Chunks.prototype.findTags=function(_11c,_11d){ -var _11e,_11f; -var _120=this; -if(_11c){ -_11f=_6.regexToString(_11c); -_11e=new _4(_11f.expression+"$",_11f.flags); -this.before=this.before.replace(_11e,function(_121){ -_120.startTag=_120.startTag+_121; -return ""; -}); -_11e=new _4("^"+_11f.expression,_11f.flags); -this.selection=this.selection.replace(_11e,function(_122){ -_120.startTag=_120.startTag+_122; -return ""; -}); -} -if(_11d){ -_11f=_6.regexToString(_11d); -_11e=new _4(_11f.expression+"$",_11f.flags); -this.selection=this.selection.replace(_11e,function(_123){ -_120.endTag=_123+_120.endTag; -return ""; -}); -_11e=new _4("^"+_11f.expression,_11f.flags); -this.after=this.after.replace(_11e,function(_124){ -_120.endTag=_124+_120.endTag; -return ""; -}); -} -}; -_2.Chunks.prototype.trimWhitespace=function(_125){ -this.selection=this.selection.replace(/^(\s*)/,""); -if(!_125){ -this.before+=_4.$1; -} -this.selection=this.selection.replace(/(\s*)$/,""); -if(!_125){ -this.after=_4.$1+this.after; -} -}; -_2.Chunks.prototype.skipLines=function(_126,_127,_128){ -if(_126==undefined){ -_126=1; -} -if(_127==undefined){ -_127=1; -} -_126++; -_127++; -var _129,_12a; -this.selection=this.selection.replace(/(^\n*)/,""); -this.startTag=this.startTag+_4.$1; -this.selection=this.selection.replace(/(\n*$)/,""); -this.endTag=this.endTag+_4.$1; -this.startTag=this.startTag.replace(/(^\n*)/,""); -this.before=this.before+_4.$1; -this.endTag=this.endTag.replace(/(\n*$)/,""); -this.after=this.after+_4.$1; -if(this.before){ -_129=_12a=""; -while(_126--){ -_129+="\\n?"; -_12a+="\n"; -} -if(_128){ -_129="\\n*"; -} -this.before=this.before.replace(new _4(_129+"$",""),_12a); -} -if(this.after){ -_129=_12a=""; -while(_127--){ -_129+="\\n?"; -_12a+="\n"; -} -if(_128){ -_129="\\n*"; -} -this.after=this.after.replace(new _4(_129,""),_12a); -} -}; -_8.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)"; -_8.unwrap=function(_12b){ -var _12c=new _4("([^\\n])\\n(?!(\\n|"+_8.prefixes+"))","g"); -_12b.selection=_12b.selection.replace(_12c,"$1 $2"); -}; -_8.wrap=function(_12d,len){ -_8.unwrap(_12d); -var _12f=new _4("(.{1,"+len+"})( +|$\\n?)","gm"); -_12d.selection=_12d.selection.replace(_12f,function(_130,line){ -if(new _4("^"+_8.prefixes,"").test(_130)){ -return _130; -} -return line+"\n"; -}); -_12d.selection=_12d.selection.replace(/\s+$/,""); -}; -_8.doBold=function(_132){ -return _8.doBorI(_132,2,"strong text"); -}; -_8.doItalic=function(_133){ -return _8.doBorI(_133,1,"emphasized text"); -}; -_8.doBorI=function(_134,_135,_136){ -_134.trimWhitespace(); -_134.selection=_134.selection.replace(/\n{2,}/g,"\n"); -_134.before.search(/(\**$)/); -var _137=_4.$1; -_134.after.search(/(^\**)/); -var _138=_4.$1; -var _139=Math.min(_137.length,_138.length); -if((_139>=_135)&&(_139!=2||_135!=1)){ -_134.before=_134.before.replace(_4("[*]{"+_135+"}$",""),""); -_134.after=_134.after.replace(_4("^[*]{"+_135+"}",""),""); -return; -} -if(!_134.selection&&_138){ -_134.after=_134.after.replace(/^([*_]*)/,""); -_134.before=_134.before.replace(/(\s?)$/,""); -var _13a=_4.$1; -_134.before=_134.before+_138+_13a; -return; -} -if(!_134.selection&&!_138){ -_134.selection=_136; -} -var _13b=_135<=1?"*":"**"; -_134.before=_134.before+_13b; -_134.after=_13b+_134.after; -}; -_8.stripLinkDefs=function(_13c,_13d){ -_13c=_13c.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(_13e,id,_140,_141,_142){ -_13d[id]=_13e.replace(/\s*$/,""); -if(_141){ -_13d[id]=_13e.replace(/["(](.+?)[")]$/,""); -return _141+_142; -} -return ""; -}); -return _13c; -}; -_8.addLinkDef=function(_143,_144){ -var _145=0; -var _146={}; -_143.before=_8.stripLinkDefs(_143.before,_146); -_143.selection=_8.stripLinkDefs(_143.selection,_146); -_143.after=_8.stripLinkDefs(_143.after,_146); -var _147=""; -var _148=/(\[(?:\[[^\]]*\]|[^\[\]])*\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g; -var _149=function(def){ -_145++; -def=def.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+_145+"]:"); -_147+="\n"+def; -}; -var _14b=function(_14c,_14d,id,end){ -if(_146[id]){ -_149(_146[id]); -return _14d+_145+end; -} -return _14c; -}; -_143.before=_143.before.replace(_148,_14b); -if(_144){ -_149(_144); -}else{ -_143.selection=_143.selection.replace(_148,_14b); -} -var _150=_145; -_143.after=_143.after.replace(_148,_14b); -if(_143.after){ -_143.after=_143.after.replace(/\n*$/,""); -} -if(!_143.after){ -_143.selection=_143.selection.replace(/\n*$/,""); -} -_143.after+="\n\n"+_147; -return _150; -}; -_8.doLinkOrImage=function(_151,_152,_153){ -_151.trimWhitespace(); -_151.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\[.*?\])?/); -if(_151.endTag.length>1){ -_151.startTag=_151.startTag.replace(/!?\[/,""); -_151.endTag=""; -_8.addLinkDef(_151,null); -}else{ -if(/\n\n/.test(_151.selection)){ -_8.addLinkDef(_151,null); -return; -} -var _154; -var _155=function(_156){ -if(_156!=null){ -_151.startTag=_151.endTag=""; -var _157=" [999]: "+_156; -var num=_8.addLinkDef(_151,_157); -_151.startTag=_152?"![":"["; -_151.endTag="]["+num+"]"; -if(!_151.selection){ -if(_152){ -_151.selection="alt text"; -}else{ -_151.selection="link text"; -} -} -} -_153(); -}; -if(_152){ -_154=_6.prompt("

    Enter the image URL.

    You can also add a title, which will be displayed as a tool tip.

    Example:
    http://wmd-editor.com/images/cloud1.jpg \"Optional title\"

    ","http://",_155); -}else{ -_154=_6.prompt("

    Enter the web address.

    You can also add a title, which will be displayed as a tool tip.

    Example:
    http://wmd-editor.com/ \"Optional title\"

    ","http://",_155); -} -return true; -} -}; -_8.bold={}; -_8.bold.description="Strong "; -_8.bold.image="images/bold.png"; -_8.bold.key="b"; -_8.bold.textOp=_8.doBold; -_8.italic={}; -_8.italic.description="Emphasis "; -_8.italic.image="images/italic.png"; -_8.italic.key="i"; -_8.italic.textOp=_8.doItalic; -_8.link={}; -_8.link.description="Hyperlink "; -_8.link.image="images/link.png"; -_8.link.key="l"; -_8.link.textOp=function(_159,_15a){ -return _8.doLinkOrImage(_159,false,_15a); -}; -_8.undo={}; -_8.undo.description="Undo"; -_8.undo.image="images/undo.png"; -_8.undo.execute=function(_15b){ -_15b.undo(); -}; -_8.redo={}; -_8.redo.description="Redo"; -_8.redo.image="images/redo.png"; -_8.redo.execute=function(_15c){ -_15c.redo(); -}; -_6.findPanes=function(_15d){ -_15d.preview=_15d.preview||_6.getElementsByClass("wmd-preview",null,"div")[0]; -_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"textarea")[0]; -_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"div")[0]; -if(!_15d.input){ -var _15e=-1; -var _15f=_3.getElementsByTagName("textarea"); -for(var _160=0;_160<_15f.length;_160++){ -var _161=_15f[_160]; -if(_161!=_15d.output&&!/wmd-ignore/.test(_161.className.toLowerCase())){ -_15d.input=_161; -break; -} -} -} -return _15d; -}; -_6.makeAPI=function(){ -_2.wmd={}; -_2.wmd.editor=_2.editor; -_2.wmd.previewManager=_2.previewManager; -}; -_6.startEditor=function(){ -if(_2.wmd_env.autostart==false){ -_2.editorInit(); -_6.makeAPI(); -return; -} -var _162={}; -var _163,_164; -var _165=function(){ -try{ -var _166=_6.cloneObject(_162); -_6.findPanes(_162); -if(!_6.objectsEqual(_166,_162)&&_162.input){ -if(!_163){ -_2.editorInit(); -var _167; -if(_2.previewManager!=undefined){ -_164=new _2.previewManager(_162); -_167=_164.refresh; -} -_163=new _2.editor(_162.input,_167); -}else{ -if(_164){ -_164.refresh(true); -} -} -} -} -catch(e){ -} -}; -_6.addEvent(_1,"load",_165); -var _168=_1.setInterval(_165,100); -}; -_2.previewManager=function(_169){ -var _16a=this; -var _16b,_16c; -var _16d,_16e; -var _16f,_170; -var _171=3000; -var _172="delayed"; -var _173=function(_174,_175){ -_6.addEvent(_174,"input",_175); -_174.onpaste=_175; -_174.ondrop=_175; -_6.addEvent(_1,"keypress",_175); -_6.addEvent(_174,"keypress",_175); -_6.addEvent(_174,"keydown",_175); -_16c=new _2.inputPoller(_174,_175); -}; -var _176=function(){ -var _177=0; -if(_1.innerHeight){ -_177=_1.pageYOffset; -}else{ -if(_3.documentElement&&_3.documentElement.scrollTop){ -_177=_3.documentElement.scrollTop; -}else{ -if(_3.body){ -_177=_3.body.scrollTop; -} -} -} -return _177; -}; -var _178=function(){ -if(!_169.preview&&!_169.output){ -return; -} -var text=_169.input.value; -if(text&&text==_16f){ -return; -}else{ -_16f=text; -} -var _17a=new Date().getTime(); -if(!_16b&&_2.showdown){ -_16b=new _2.showdown.converter(); -} -text=_6.escapeUnderscores(text); -if(_16b){ -text=_16b.makeHtml(text); -} -var _17b=new Date().getTime(); -_16e=_17b-_17a; -_17c(text); -_170=text; -}; -var _17d=function(){ -if(_16d){ -_1.clearTimeout(_16d); -_16d=undefined; -} -if(_172!="manual"){ -var _17e=0; -if(_172=="delayed"){ -_17e=_16e; -} -if(_17e>_171){ -_17e=_171; -} -_16d=_1.setTimeout(_178,_17e); -} -}; -var _17f; -var _180; -var _181=function(_182){ -if(_182.scrollHeight<=_182.clientHeight){ -return 1; -} -return _182.scrollTop/(_182.scrollHeight-_182.clientHeight); -}; -var _183=function(_184,_185){ -_184.scrollTop=(_184.scrollHeight-_184.clientHeight)*_185; -}; -var _186=function(){ -if(_169.preview){ -_17f=_181(_169.preview); -} -if(_169.output){ -_180=_181(_169.output); -} -}; -var _187=function(){ -if(_169.preview){ -_169.preview.scrollTop=_169.preview.scrollTop; -_183(_169.preview,_17f); -} -if(_169.output){ -_183(_169.output,_180); -} -}; -this.refresh=function(_188){ -if(_188){ -_16f=""; -_178(); -}else{ -_17d(); -} -}; -this.processingTime=function(){ -return _16e; -}; -this.output=function(){ -return _170; -}; -this.setUpdateMode=function(_189){ -_172=_189; -_16a.refresh(); -}; -var _18a=true; -var _17c=function(text){ -_186(); -var _18c=_7.getTop(_169.input)-_176(); -if(_169.output){ -if(_169.output.value!=undefined){ -_169.output.value=text; -_169.output.readOnly=true; -}else{ -var _18d=text.replace(/&/g,"&"); -_18d=_18d.replace(/
    "; -} -} -if(_169.preview){ -_169.preview.innerHTML=text; -} -_187(); -if(_18a){ -_18a=false; -return; -} -var _18e=_7.getTop(_169.input)-_176(); -if(_5.userAgent.indexOf("MSIE")!=-1){ -_1.setTimeout(function(){ -_1.scrollBy(0,_18e-_18c); -},0); -}else{ -_1.scrollBy(0,_18e-_18c); -} -}; -var init=function(){ -_173(_169.input,_17d); -_178(); -if(_169.preview){ -_169.preview.scrollTop=0; -} -if(_169.output){ -_169.output.scrollTop=0; -} -}; -this.destroy=function(){ -if(_16c){ -_16c.destroy(); -} -}; -init(); -}; -}; -if(Attacklab.fileLoaded){ -Attacklab.fileLoaded("wmd-base.js"); -} - diff --git a/blog/wp-content/plugins/wmd-editor/wmd-editor.php b/blog/wp-content/plugins/wmd-editor/wmd-editor.php deleted file mode 100644 index 6ae5ff8..0000000 --- a/blog/wp-content/plugins/wmd-editor/wmd-editor.php +++ /dev/null @@ -1,24 +0,0 @@ -WMD Editor to the comment field, to make life easier for your commenters. -Version: 1.0 -Author: Chad Coleman -Author URI: http://c.hadcoleman.com - - -This is a simple plugin that just adds the javascript call to the header of your template. You can gather more info on this project at http://code.google.com/p/wmd/ -*/ - -// function for head output sytles -function wmd_header() { - global $cb_path; - $cb_path = get_bloginfo('wpurl')."/wp-content/plugins/wmd-editor"; //URL to the plugin directory - $hHead = "\n".""."\n"; - $hHead .= " \n"; - $hHead .= ""."\n"; - print($hHead); -} - -add_action('wp_head', 'wmd_header'); ?> \ No newline at end of file diff --git a/blog/wp-content/plugins/wmd-editor/wmd-plus.js b/blog/wp-content/plugins/wmd-editor/wmd-plus.js deleted file mode 100644 index 37a054c..0000000 --- a/blog/wp-content/plugins/wmd-editor/wmd-plus.js +++ /dev/null @@ -1,311 +0,0 @@ -var Attacklab=Attacklab||{}; -Attacklab.wmdPlus=function(){ -this.symboltable; -var _1=top; -var _2=_1["Attacklab"]; -var _3=_1["document"]; -var _4=_1["RegExp"]; -var _5=_1["navigator"]; -var _6=_2.Util; -var _7=_2.Position; -var _8=_2.Command; -_8.doAutoindent=function(_9){ -_9.before=_9.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n"); -_9.before=_9.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n"); -_9.before=_9.before.replace(/(\n|^)[ \t]+\n$/,"\n\n"); -if(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(_9.before)){ -if(_8.doList){ -_8.doList(_9); -} -} -if(/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(_9.before)){ -if(_8.doBlockquote){ -_8.doBlockquote(_9); -} -} -if(/(\n|^)(\t|[ ]{4,}).*\n$/.test(_9.before)){ -if(_8.doCode){ -_8.doCode(_9); -} -} -}; -_8.doBlockquote=function(_a){ -_a.selection=_a.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(_b,_c,_d,_e){ -_a.before+=_c; -_a.after=_e+_a.after; -return _d; -}); -_a.before=_a.before.replace(/(>[ \t]*)$/,function(_f,_10){ -_a.selection=_10+_a.selection; -return ""; -}); -_a.selection=_a.selection.replace(/^(\s|>)+$/,""); -_a.selection=_a.selection||"Blockquote"; -if(_a.before){ -_a.before=_a.before.replace(/\n?$/,"\n"); -} -if(_a.after){ -_a.after=_a.after.replace(/^\n?/,"\n"); -} -_a.before=_a.before.replace(/(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*$)/,function(_11){ -_a.startTag=_11; -return ""; -}); -_a.after=_a.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(_12){ -_a.endTag=_12; -return ""; -}); -var _13=function(_14){ -var _15=_14?"> ":""; -if(_a.startTag){ -_a.startTag=_a.startTag.replace(/\n((>|\s)*)\n$/,function(_16,_17){ -return "\n"+_17.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n"; -}); -} -if(_a.endTag){ -_a.endTag=_a.endTag.replace(/^\n((>|\s)*)\n/,function(_18,_19){ -return "\n"+_19.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n"; -}); -} -}; -if(/^(?![ ]{0,3}>)/m.test(_a.selection)){ -_8.wrap(_a,_2.wmd_env.lineLength-2); -_a.selection=_a.selection.replace(/^/gm,"> "); -_13(true); -_a.skipLines(); -}else{ -_a.selection=_a.selection.replace(/^[ ]{0,3}> ?/gm,""); -_8.unwrap(_a); -_13(false); -if(!/^(\n|^)[ ]{0,3}>/.test(_a.selection)){ -if(_a.startTag){ -_a.startTag=_a.startTag.replace(/\n{0,2}$/,"\n\n"); -} -} -if(!/(\n|^)[ ]{0,3}>.*$/.test(_a.selection)){ -if(_a.endTag){ -_a.endTag=_a.endTag.replace(/^\n{0,2}/,"\n\n"); -} -} -} -if(!/\n/.test(_a.selection)){ -_a.selection=_a.selection.replace(/^(> *)/,function(_1a,_1b){ -_a.startTag+=_1b; -return ""; -}); -} -}; -_8.doCode=function(_1c){ -var _1d=/\S[ ]*$/.test(_1c.before); -var _1e=/^[ ]*\S/.test(_1c.after); -if((!_1e&&!_1d)||/\n/.test(_1c.selection)){ -_1c.before=_1c.before.replace(/[ ]{4}$/,function(_1f){ -_1c.selection=_1f+_1c.selection; -return ""; -}); -var _20=1; -var _21=1; -if(/\n(\t|[ ]{4,}).*\n$/.test(_1c.before)){ -_20=0; -} -if(/^\n(\t|[ ]{4,})/.test(_1c.after)){ -_21=0; -} -_1c.skipLines(_20,_21); -if(!_1c.selection){ -_1c.startTag=" "; -_1c.selection="print(\"code sample\");"; -return; -} -if(/^[ ]{0,3}\S/m.test(_1c.selection)){ -_1c.selection=_1c.selection.replace(/^/gm," "); -}else{ -_1c.selection=_1c.selection.replace(/^[ ]{4}/gm,""); -} -}else{ -_1c.trimWhitespace(); -_1c.findTags(/`/,/`/); -if(!_1c.startTag&&!_1c.endTag){ -_1c.startTag=_1c.endTag="`"; -if(!_1c.selection){ -_1c.selection="print(\"code sample\");"; -} -}else{ -if(_1c.endTag&&!_1c.startTag){ -_1c.before+=_1c.endTag; -_1c.endTag=""; -}else{ -_1c.startTag=_1c.endTag=""; -} -} -} -}; -_8.autoindent={}; -_8.autoindent.textOp=_8.doAutoindent; -_8.blockquote={}; -_8.blockquote.description="Blockquote
    "; -_8.blockquote.image="images/blockquote.png"; -_8.blockquote.key="."; -_8.blockquote.keyCode=190; -_8.blockquote.textOp=function(_22){ -return _8.doBlockquote(_22); -}; -_8.code={}; -_8.code.description="Code Sample
    ";
    -_8.code.image="images/code.png";
    -_8.code.key="k";
    -_8.code.textOp=_8.doCode;
    -_8.img={};
    -_8.img.description="Image ";
    -_8.img.image="images/img.png";
    -_8.img.key="g";
    -_8.img.textOp=function(_23,_24){
    -return _8.doLinkOrImage(_23,true,_24);
    -};
    -_8.doList=function(_25,_26){
    -var _27=/(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/;
    -var _28="";
    -var _29=1;
    -var _2a=function(){
    -if(_26){
    -var _2b=" "+_29+". ";
    -_29++;
    -return _2b;
    -}
    -var _2c=_28||"-";
    -return "  "+_2c+" ";
    -};
    -var _2d=function(_2e){
    -if(_26==undefined){
    -_26=/^\s*\d/.test(_2e);
    -}
    -_2e=_2e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(_2f){
    -return _2a();
    -});
    -return _2e;
    -};
    -var _30=function(){
    -_31=_6.regexToString(_27);
    -_31.expression="^\n*"+_31.expression;
    -var _32=_6.stringToRegex(_31);
    -_25.after=_25.after.replace(_32,_2d);
    -};
    -_25.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null);
    -var _33=/^\n/;
    -if(_25.before&&!/\n$/.test(_25.before)&&!_33.test(_25.startTag)){
    -_25.before+=_25.startTag;
    -_25.startTag="";
    -}
    -if(_25.startTag){
    -var _34=/\d+[.]/.test(_25.startTag);
    -_25.startTag="";
    -_25.selection=_25.selection.replace(/\n[ ]{4}/g,"\n");
    -_8.unwrap(_25);
    -_25.skipLines();
    -if(_34){
    -_30();
    -}
    -if(_26==_34){
    -return;
    -}
    -}
    -var _35=1;
    -var _31=_6.regexToString(_27);
    -_31.expression="(\\n|^)"+_31.expression+"$";
    -var _36=_6.stringToRegex(_31);
    -_25.before=_25.before.replace(_36,function(_37){
    -if(/^\s*([*+-])/.test(_37)){
    -_28=_4.$1;
    -}
    -_35=/[^\n]\n\n[^\n]/.test(_37)?1:0;
    -return _2d(_37);
    -});
    -if(!_25.selection){
    -_25.selection="List item";
    -}
    -var _38=_2a();
    -var _39=1;
    -_31=_6.regexToString(_27);
    -_31.expression="^\n*"+_31.expression;
    -_36=_6.stringToRegex(_31);
    -_25.after=_25.after.replace(_36,function(_3a){
    -_39=/[^\n]\n\n[^\n]/.test(_3a)?1:0;
    -return _2d(_3a);
    -});
    -_25.trimWhitespace(true);
    -_25.skipLines(_35,_39,true);
    -_25.startTag=_38;
    -var _3b=_38.replace(/./g," ");
    -_8.wrap(_25,_2.wmd_env.lineLength-_3b.length);
    -_25.selection=_25.selection.replace(/\n/g,"\n"+_3b);
    -};
    -_8.doHeading=function(_3c){
    -_3c.selection=_3c.selection.replace(/\s+/g," ");
    -_3c.selection=_3c.selection.replace(/(^\s+|\s+$)/g,"");
    -var _3d=0;
    -_3c.findTags(/#+[ ]*/,/[ ]*#+/);
    -if(/#+/.test(_3c.startTag)){
    -_3d=_4.lastMatch.length;
    -}
    -_3c.startTag=_3c.endTag="";
    -_3c.findTags(null,/\s?(-+|=+)/);
    -if(/=+/.test(_3c.endTag)){
    -_3d=1;
    -}
    -if(/-+/.test(_3c.endTag)){
    -_3d=2;
    -}
    -_3c.startTag=_3c.endTag="";
    -_3c.skipLines(1,1);
    -if(!_3c.selection){
    -_3c.startTag="## ";
    -_3c.selection="Heading";
    -_3c.endTag=" ##";
    -return;
    -}
    -var _3e=_3d==0?2:_3d-1;
    -if(_3e){
    -var _3f=_3e>=2?"-":"=";
    -var _40=_3c.selection.length;
    -if(_40>_2.wmd_env.lineLength){
    -_40=_2.wmd_env.lineLength;
    -}
    -_3c.endTag="\n";
    -while(_40--){
    -_3c.endTag+=_3f;
    -}
    -}
    -};
    -_8.ol={};
    -_8.ol.description="Numbered List 
      "; -_8.ol.image="images/ol.png"; -_8.ol.key="o"; -_8.ol.textOp=function(_41){ -_8.doList(_41,true); -}; -_8.ul={}; -_8.ul.description="Bulleted List
        "; -_8.ul.image="images/ul.png"; -_8.ul.key="u"; -_8.ul.textOp=function(_42){ -_8.doList(_42,false); -}; -_8.h1={}; -_8.h1.description="Heading

        /

        "; -_8.h1.image="images/h1.png"; -_8.h1.key="h"; -_8.h1.textOp=_8.doHeading; -_8.hr={}; -_8.hr.description="Horizontal Rule
        "; -_8.hr.image="images/hr.png"; -_8.hr.key="r"; -_8.hr.textOp=function(_43){ -_43.startTag="----------\n"; -_43.selection=""; -_43.skipLines(2,1,true); -}; -}; -if(Attacklab.fileLoaded){ -Attacklab.fileLoaded("wmd-plus.js"); -} - diff --git a/blog/wp-content/plugins/wmd-editor/wmd.js b/blog/wp-content/plugins/wmd-editor/wmd.js deleted file mode 100644 index 7e387ee..0000000 --- a/blog/wp-content/plugins/wmd-editor/wmd.js +++ /dev/null @@ -1,73 +0,0 @@ -var Attacklab=Attacklab||{}; -Attacklab.wmd_env={}; -Attacklab.account_options={}; -Attacklab.wmd_defaults={version:1,output:"HTML",lineLength:40,delayLoad:false}; -if(!Attacklab.wmd){ -Attacklab.wmd=function(){ -Attacklab.loadEnv=function(){ -var _1=function(_2){ -if(!_2){ -return; -} -for(var _3 in _2){ -Attacklab.wmd_env[_3]=_2[_3]; -} -}; -_1(Attacklab.wmd_defaults); -_1(Attacklab.account_options); -_1(top["wmd_options"]); -Attacklab.full=true; -var _4="bold italic | link blockquote code image | ol ul heading hr"; -Attacklab.wmd_env.buttons=Attacklab.wmd_env.buttons||_4; -}; -Attacklab.loadEnv(); -var _5=["showdown.js","wmd-base.js","wmd-plus.js"]; -var _6=function(_7){ -}; -Attacklab.fileLoaded=function(_8){ -arguments.callee.count=arguments.callee.count||0; -if(++arguments.callee.count>=_5.length){ -var go=function(){ -Attacklab.wmdBase(); -Attacklab.Util.startEditor(); -}; -if(Attacklab.wmd_env.delayLoad){ -window.setTimeout(go,0); -}else{ -go(); -} -} -}; -Attacklab.editorInit=function(){ -Attacklab.wmdPlus(); -}; -var _a=function(_b,_c){ -var _d=Attacklab.basePath+_b; -if(_c){ -_d+="?nocache="+(new Date()).getTime(); -} -var _e=document.createElement("script"); -_e.src=_d; -top.document.documentElement.firstChild.appendChild(_e); -}; -var _f=function(_10){ -var _11=RegExp("(.*)"+_10+"(\\?(.+))?$","g"); -var _12=document.getElementsByTagName("script"); -for(var i=0;i<_12.length;i++){ -if(_11.test(_12[i].src)){ -var _14=RegExp.$1; -if(/wmd-editor.com/.test(_12[i].src)){ -return null; -} -return _14; -} -} -}; -Attacklab.basePath=_f("wmd.js")||"http://static.wmd-editor.com/v2/"; -for(var f,i=0;f=_5[i];i++){ -_a(f,false); -} -}; -Attacklab.wmd(); -} - diff --git a/blog/wp-content/plugins/wp-dummy-content/content/paragraph.php b/blog/wp-content/plugins/wp-dummy-content/content/paragraph.php new file mode 100644 index 0000000..eb274bf --- /dev/null +++ b/blog/wp-content/plugins/wp-dummy-content/content/paragraph.php @@ -0,0 +1,44 @@ +The raft drew beyond the middle of the river; the boys pointed her head right, and then lay on their oars.

    + +The river was not high, so there was not more than a two or three mile current. Hardly a word was +said during the next three-quarters of an hour. Now the raft was passing before the distant town. Two or three glimmering lights showed where it lay, peacefully sleeping, beyond the vague vast sweep of star-gemmed water, unconscious of the tremendous event that was happening. +
      +
    • The Black Avenger stood still with folded arms, "looking his last" upon
    • +
    • the scene of his former joys and his later sufferings, and wishing
    • +
    • "she" could see him now, abroad on the wild sea, facing peril and death with dauntless heart, going to his doom with a grim smile on his lips. It was but a small strain on his imagination to remove Jackson's Island
    • +
    • beyond eyeshot of the village, and so he "looked his last" with a
    • +
    • broken and satisfied heart. The other pirates were looking their last,
    • +
    • too; and they all looked so long that they came near letting the
    • +
    + +current drift them out of the range of the island. But they discovered the danger in time, and made shift to avert it. About two o'clock in the morning the raft grounded on the bar two hundred yards above the head of the island, and they waded back and forth until they had landed their freight. +

    Part of the little raft's belongings consisted of an old sail, and this they spread over a nook in the bushes for a tent to shelter their provisions; but they themselves would sleep in the open air in good weather, as became outlaws. +

      +
    1. They built a fire against the side of a great log twenty or thirty
    2. +
    3. steps within the sombre depths of the forest, and then cooked some
    4. +
    5. bacon in the frying-pan for supper, and used up half of the corn "pone"
    6. +
    7. stock they had brought. It seemed glorious sport to be feasting in that
    8. +
    9. wild, free way in the virgin forest of an unexplored and uninhabited
    10. +
    11. island, far from the haunts of men, and they said they never would
    12. +
    13. return to civilization. The climbing fire lit up their faces and threw
    14. +
    15. its ruddy glare upon the pillared tree-trunks of their forest temple,
    16. +
    17. and upon the varnished foliage and festooning vines.
    18. +
    +When the last crisp slice of bacon was gone, and the last allowance of corn pone devoured, the boys stretched themselves out on the grass, filled with contentment. They could have found a cooler place, but they would not deny themselves such a romantic feature as the roasting camp-fire. + +EOT +); + diff --git a/blog/wp-content/plugins/wp-dummy-content/content/titles.php b/blog/wp-content/plugins/wp-dummy-content/content/titles.php new file mode 100644 index 0000000..be7eec2 --- /dev/null +++ b/blog/wp-content/plugins/wp-dummy-content/content/titles.php @@ -0,0 +1,26 @@ +get_row("SHOW TABLE STATUS like '" . $wpdb->posts . "'"); + $guid = $guid_query->Auto_increment; + + //main query to build on + $query = 'INSERT INTO ' . $wpdb->posts . ' (post_author, post_date, post_date_gmt, post_content, post_title, post_status, post_name, post_modified, post_modified_gmt, post_type, comment_status, ping_status, post_parent, post_excerpt, guid) VALUES '; + $template_query = "INSERT INTO " . $wpdb->postmeta . " (meta_key, meta_value, post_id) VALUES "; + $cat_query = 'INSERT INTO ' . $wpdb->term_relationships . ' (object_ID, term_taxonomy_id, term_order) VALUES '; + $original_template = $template_query; + + + $query .= "("; + $query .= "'" . $userdata->ID . "'"; //post author + $query .= ", NOW()"; //post published timestamp + + $query .= ", '" . get_gmt_from_date(time()) . "'"; + $query .= ", '" . mysql_real_escape_string($content) . "'"; //post content + $query .= ", '" . mysql_real_escape_string($title) . "'"; //post title + //$query .= ", '" . 0 . "'"; //post category + $query .= ", '" . $page_status . "'"; //post status + $query .= ", '" . sanitize_title_with_dashes($title) . "'"; //page name + $query .= ", NOW()"; //modified timestamps + $query .= ", '" . get_gmt_from_date(time()) . "'"; + $query .= ", 'page'"; //post type + $query .= ", 'open'"; //comment status + $query .= ", 'open'"; //ping status + $query .= ", ".$parent_id; //post parent + //change page excerpt placeholders + $query .= ", '" . mysql_real_escape_string(substr(strip_tags($content),0,200)) . "'"; //post excerpt + + $page_id = '/?page_id='; + $query .= ", '" . $url . $page_id . $guid++ . "'"; //guid form + $query .= ")"; + + + if ($wpdb->query($query)) { + + $insert_id = $wpdb->insert_id; + foreach($custom_fields as $key=>$val) + { + $cfQuery = $template_query. "('".mysql_real_escape_string($key)."','".mysql_real_escape_string($val)."',".$insert_id.")"; + if (!$wpdb->query($cfQuery)) { + return "An error occurred: ". mysql_error(); + + } + } + $templateQuery = $template_query. "('_wp_page_template','".$template_id."',".$insert_id.")"; + if (!$wpdb->query($templateQuery)) { + return "An error occurred: ". mysql_error(); + + } + + +$genQuery = $template_query. "('dummy_content_generator','1',".$insert_id.")"; + if (!$wpdb->query($genQuery)) { + return "An error occurred: ". mysql_error(); + + } + + + + + return $insert_id; + + + } + else + { + return "An error occurred: ". mysql_error(); + } + + } + + + function delete_stuff() +{ + global $wpdb; + if (!$wpdb->query("DELETE FROM ".$wpdb->posts." WHERE ID IN (SELECT post_id FROM ".$wpdb->postmeta." WHERE meta_key='dummy_content_generator')" )) { + return "An error occurred: ". mysql_error(); + + } + + if (!$wpdb->query("DELETE FROM ".$wpdb->postmeta." WHERE meta_key='dummy_content_generator'" )) { + return "An error occurred clearing out the postmeta table: ". mysql_error(); + + } + + return "Pages Deleted."; + + +} + + + + function if_empty_zero($val) + { + $val = trim($val); + if($val == "" || empty($val)) + return 0; + return $val; + } + + + + + + + + + + + function create_blog_stuff($form_var) + { + $num_pages = if_empty_zero($form_var["num_pages"]); + $content_type = $form_var["content_type"]; + $cat_id = $form_var["cat"]; + $spacing = $form_var["post_spacing"]; + + $page_status = $form_var["page_status"]; + $custom_fields = array(); + for($i = 0;$i < 5;$i++) + { + if(isset($form_var["meta_key".$i]) && !empty($form_var["meta_key".$i])) + { + $custom_fields[$form_var["meta_key".$i]] =$form_var["meta_value".$i]; + } + } + + $date = strtotime("now"); + + //MAIN PAGE CREATION LOOP!!! + for($x = 0; $x < $num_pages; $x++) + { + $content = get_post_content($content_type); + $title = get_post_title(); + + + if($x>0) + { + if($spacing =="day" || $spacing=="week") + $date = strtotime($x." ".$spacing."s ago"); + + } + + $result_id = insert_post($title,$content,$cat_id,$date,$page_status,$custom_fields); + + if(!is_numeric($result_id)) + $result .= $result_id; + + } + if(empty($result)) + $result = "Run Complete"; + return $result; + } + + + + + + + + function insert_post($title,$content,$cat_id,$date,$page_status,$custom_fields) + { + + global $wpdb; + global $userdata; + + //get user data + get_currentuserinfo(); + //get url for GUID + $url = get_bloginfo('url'); + + //get next auto increment id + $guid_query = $wpdb->get_row("SHOW TABLE STATUS like '" . $wpdb->posts . "'"); + $guid = $guid_query->Auto_increment; + + //main query to build on + $query = 'INSERT INTO ' . $wpdb->posts . ' (post_author, post_date, post_date_gmt, post_content, post_title, post_status, post_name, post_modified, post_modified_gmt, post_type, comment_status, ping_status, post_parent, post_excerpt, guid) VALUES '; + $template_query = "INSERT INTO " . $wpdb->postmeta . " (meta_key, meta_value, post_id) VALUES "; + $cat_query = 'INSERT INTO ' . $wpdb->term_relationships . ' (object_ID, term_taxonomy_id, term_order) VALUES '; + $original_template = $template_query; + + + $query .= "("; + $query .= "'" . $userdata->ID . "'"; //post author + $query .= ", FROM_UNIXTIME('".$date."')"; //post published timestamp + + $query .= ", '" . get_gmt_from_date($date) . "'"; + $query .= ", '" . mysql_real_escape_string($content) . "'"; //post content + $query .= ", '" . mysql_real_escape_string($title) . "'"; //post title + //$query .= ", '" . 0 . "'"; //post category + $query .= ", '" . $page_status . "'"; //post status + $query .= ", '" . sanitize_title_with_dashes($title) . "'"; //page name + $query .= ", FROM_UNIXTIME(".$date.")"; //modified timestamps + $query .= ", '" . get_gmt_from_date($date) . "'"; + $query .= ", 'post'"; //post type + $query .= ", 'open'"; //comment status + $query .= ", 'open'"; //ping status + $query .= ", 0"; //post parent + //change page excerpt placeholders + $query .= ", '" . mysql_real_escape_string(substr(strip_tags($content),0,200)) . "'"; //post excerpt + + $page_id = '/?post_id='; + $query .= ", '" . $url . $page_id . $guid++ . "'"; //guid form + $query .= ")"; + + + if ($wpdb->query($query)) { + + $insert_id = $wpdb->insert_id; + foreach($custom_fields as $key=>$val) + { + $cfQuery = $template_query. "('".mysql_real_escape_string($key)."','".mysql_real_escape_string($val)."',".$insert_id.")"; + if (!$wpdb->query($cfQuery)) { + return "An error occurred: ". mysql_error(); + + } + } + $templateQuery = $template_query. "('_wp_page_template','".$template_id."',".$insert_id.")"; + if (!$wpdb->query($templateQuery)) { + return "An error occurred: ". mysql_error(); + + } + + +$genQuery = $template_query. "('dummy_content_generator','1',".$insert_id.")"; + if (!$wpdb->query($genQuery)) { + return "An error occurred: ". mysql_error(); + + } + + +if($cat_id != "-1"){ +$catQuery = $cat_query. "('".$insert_id."','".$cat_id."',0)"; + if (!$wpdb->query($catQuery)) { + return "An error occurred: ". mysql_error(); + + } + } + + + return $insert_id; + + + } + else + { + return "An error occurred: ". mysql_error(); + } + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/wp-content/plugins/wp-dummy-content/readme.txt b/blog/wp-content/plugins/wp-dummy-content/readme.txt new file mode 100644 index 0000000..8113963 --- /dev/null +++ b/blog/wp-content/plugins/wp-dummy-content/readme.txt @@ -0,0 +1,66 @@ +=== Plugin Name === +Contributors: skeevis +Donate link: http://skeevisarts.com/projects/wp-dummy-content/ +Tags: lorem ipsum, dummy content, dummy, development, content +Requires at least: 2.5 +Tested up to: 2.8.3 +Stable tag: 0.5.1 + +Easy generation and deletion of blog posts, pages, and sub pages for developers. Full site structure in one click. + +== Description == + +One pain of theme development is setting up all the pages and blog posts in order for you to see how your site will look one by one by one. + +No more! + +WP-Dummy-Content is a Wordpress plugin that will generate a bunch of pages, sub-pages and posts which you specify. Titles and content are automatically generated for you as well, and you have a few choices as to the type and length of content. + + +* One click generates an entire site. +* Choose what type of content to insert: single paragraph, multi paragraphs, styled (lists, blockquotes, links, etc.), or random. +* One click DELETES all content created by the plugin! + +== Installation == + +This section describes how to install the plugin and get it working. + +e.g. + +1. Unzip wp-dummy-content and upload the folder to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Click 'Dummy Content' in the settings directory in your templates + +== Frequently Asked Questions == + += When would I use this? = + +When developing a new Wordpress-powered website, and you need lots of pages and posts to structure the site around. + += Can I create multi-level page heirarchies? = + +You can create top level pages and subject. We can't really go deeper than that, unfortunately. + += I entered a really big number, and now nothing works. = + +Doh - didn't I warn you against that? Wordpress can only handle a certain number of pages (my install usually crashes after about 15K). You'll have to access your database via phpMyAdmin or a similar client, and clear out the wp_posts table. + += Can I add tags to my posts? = + +Not at this point. That'll be coming in a future release. + += I only want to delete some but not all of the pages auto-generated = + +You have two choices. You can either go through and delete pages through the standard Wordpress interface. Or you can go into posts you want to keep and remove the dummy content custom field. Really simple! + +== Screenshots == + +1. Clip of overall interface. + +== Changelog == + += 0.5.1 = +* Fixed up content to remove extra linebreaks. + += 0.5 = +* Initial Version - works! diff --git a/blog/wp-content/plugins/wp-dummy-content/screenshot-1.jpg b/blog/wp-content/plugins/wp-dummy-content/screenshot-1.jpg new file mode 100644 index 0000000..4b18514 Binary files /dev/null and b/blog/wp-content/plugins/wp-dummy-content/screenshot-1.jpg differ diff --git a/blog/wp-content/plugins/wp-dummy-content/wp-dummy-content.php b/blog/wp-content/plugins/wp-dummy-content/wp-dummy-content.php new file mode 100644 index 0000000..6ef7baa --- /dev/null +++ b/blog/wp-content/plugins/wp-dummy-content/wp-dummy-content.php @@ -0,0 +1,252 @@ +

    ' . $result . '

    '; +} + + if (isset($_POST['blogchecker'])) { + $result = create_blog_stuff($_POST); + echo '

    ' . $result . '

    '; +} + + + if (isset($_POST['delete'])) { + $result = delete_stuff($_POST); + echo '

    ' . $result . '

    '; +} + + +?> + + +
    +
    +

    Wordpress Dummy Content Generator

    +
      +
    • Instantly fill your site with sample blog posts and pages.
    • +
    • Different content styles for your theme to handle.
    • +
    • Delete it all in one click!
    • + +
    +
    +
    +

    +
    + +" enctype="multipart/form-data"> + + + + + + + + + + + + + + + + + + + + + + + + + + +

    WARNING: The nerd in you is tempted to type in a really big number to see what happens. Here's what happens: stuff breaks. The only way to fix it is to go in via an external control panel (like phpMyAdmin) and clear out tables. So do it once, laugh, then fix it and don't do it again.

    +
     
     

    Custom Fields

     

    + +

    +
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    +

    +
    + +" enctype="multipart/form-data"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    WARNING: The nerd in you is tempted to type in a really big number to see what happens. Here's what happens: stuff breaks. The only way to fix it is to go in via an external control panel (like phpMyAdmin) and clear out tables. So do it once, laugh, then fix it and don't do it again.

     
     
    + +  
    +  
    +  
    + + +

    Custom Fields

     

    + +

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +
    +

    In one click, you can delete all dummy content (we marked all dummy content with a special attribute).

    +

    WARNING:This will delete any posts or pages created by this plugin, including pages you may have edited since then. If you want to prevent a page from being deleted, remove the 'dummy_content_generator'.

    + +
    " enctype="multipart/form-data"> + +

    + +

    +
    +
    +
    + +
    + + + + + + +
    +
    +

    +
    +

    This plugin is totally free for you to use. Developed by skeevisArts. If you like/hate it that much:

    +

    +

    +

    Thanks! -Zvi

    +
    +
    + +
    +
    +
    + \ No newline at end of file