From: Steve Sutton Date: Tue, 9 Sep 2014 20:30:20 +0000 (-0400) Subject: Add plugins X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f102bd46b97adc9b051fdd723f6f904e5d8ba15c;p=web%2FPetoskeyRobotics.git Add plugins for access control add style changes --- diff --git a/wp-content/plugins/advanced-access-manager/aam.php b/wp-content/plugins/advanced-access-manager/aam.php new file mode 100644 index 0000000..7973fab --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/aam.php @@ -0,0 +1,1236 @@ + + Author URI: http://www.wpaam.com + + =========================================================================== + LICENSE: This file is subject to the terms and conditions defined in * + file 'license.txt', which is part of this source code package. * + =========================================================================== + * + */ +require(dirname(__FILE__) . '/config.php'); + +/** + * Main Plugin Class + * + * Responsible for initialization and handling user requests to Advanced Access + * Manager + * + * @package AAM + * @author Vasyl Martyniuk + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam { + + /** + * Single instance of itself + * + * @var aam + * + * @access private + */ + private static $_aam = null; + + /** + * User Subject + * + * @var aam_Control_Subject_User + * + * @access private + */ + private $_user = null; + + /** + * Initialize the AAM Object + * + * @return void + * + * @access protected + */ + protected function __construct() { + //use some internal hooks to extend functionality + add_filter('aam_access_objects', array($this, 'internalHooks'), 1, 2); + + //initialize the user subject + $this->initializeUser(); + + if (is_admin()) { + //check if system requires update + $this->checkUpdate(); + + //print required JS & CSS + add_action('admin_print_scripts', array($this, 'printScripts')); + add_action('admin_print_styles', array($this, 'printStyles')); + + //add help menu + add_filter('contextual_help', array($this, 'contextualHelp'), 10, 3); + + //manager Admin Menu + if (aam_Core_API::isNetworkPanel()) { + add_action('network_admin_menu', array($this, 'adminMenu'), 999); + } else { + add_action('admin_menu', array($this, 'adminMenu'), 999); + } + add_filter('parent_file', array($this, 'filterMenu'), 999, 1); + //manager AAM Features Content rendering + add_action('admin_action_features', array($this, 'features')); + //manager AAM Ajax Requests + add_action('wp_ajax_aam', array($this, 'ajax')); + //manager WordPress metaboxes + add_action("in_admin_header", array($this, 'metaboxes'), 999); + //manager user search and authentication control + add_filter('user_search_columns', array($this, 'searchColumns')); + //terms & post restriction handlers + add_filter('get_terms', array($this, 'getBackendTerms'), 10, 3); + //post restrictions + add_action('post_updated', array($this, 'postUpdate'), 10, 3); + add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2); + add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2); + add_filter('tag_row_actions', array($this, 'tagRowActions'), 10, 2); + add_action('admin_action_edit', array($this, 'adminActionEdit'), 10); + //control permalink editing + add_filter( + 'get_sample_permalink_html', array($this, 'permalinkHTML'), 10, 4 + ); + //wp die hook + add_filter('wp_die_handler', array($this, 'wpDie'), 10); + //***For UI purposes*** + add_action('parse_tax_query', array($this, 'parseTaxQuery'), 10, 1); + add_filter('editable_roles', array($this, 'editableRoles'), 999); + //control Admin area + add_action('admin_init', array($this, 'adminInit')); + } else { + //make sure that subject is initiated during the login + add_action('wp_login', array($this, 'login'), 0, 2); + //control WordPress frontend + add_action('wp', array($this, 'wp'), 999); + //filter navigation pages & taxonomies + add_filter('get_pages', array($this, 'getPages')); + add_filter('wp_get_nav_menu_items', array($this, 'getNavigationMenu')); + //widget filters + add_filter('sidebars_widgets', array($this, 'widgetFilter'), 999); + //get control over commenting stuff + add_filter('comments_open', array($this, 'commentOpen'), 10, 2); + //user login control + add_filter('wp_authenticate_user', array($this, 'authenticate'), 1, 2); + //terms & post restriction handlers + add_filter('get_terms', array($this, 'getFrontendTerms'), 10, 3); + } + + //load extensions only when admin + $this->loadExtensions(); + + //add shutdown action + add_action('shutdown', array($this, 'shutdown'), 1); + } + + /** + * Control Admin Area access + * + * @return void + * + * @access public + */ + public function adminInit() { + global $plugin_page; + + //compile menu + if (empty($plugin_page)){ + $menu = basename(aam_Core_Request::server('SCRIPT_NAME')); + if ($query = trim(aam_Core_Request::server('QUERY_STRING'))) { + $menu .= '?' . $query; + } + } else { + $menu = $plugin_page; + } + + $has = $this->getUser()->getObject(aam_Control_Object_Menu::UID)->has($menu); + if ($has === true){ + $this->reject(); + } elseif(is_null($has) + && aam_Core_ConfigPress::getParam('aam.menu.undefined') == 'deny'){ + $this->reject(); + } + } + + /** + * Check if system requires update + * + * @return void + * + * @access public + */ + public function checkUpdate() { + if (aam_Core_API::getBlogOption('aam_updated', '', 1) != AAM_VERSION) { + $update = new aam_Core_Update($this); + $update->run(); + } + } + + /** + * Control Frontend commenting freature + * + * @param boolean $open + * @param int $post_id + * + * @return boolean + * + * @access public + */ + public function commentOpen($open, $post_id) { + $control = $this->getUser()->getObject( + aam_Control_Object_Post::UID, $post_id + ); + if ($control->has('frontend', aam_Control_Object_Post::ACTION_COMMENT)) { + $open = false; + } + + return $open; + } + + /** + * Control edit permalink feature + * + * @param string $html + * @param int $id + * @param type $new_title + * @param type $new_slug + * + * @return string + */ + public function permalinkHTML($html, $id, $new_title, $new_slug) { + if (aam_Core_ConfigPress::getParam('aam.control_permalink') === 'true') { + if ($this->getUser()->hasCapability('manage_permalink') === false) { + $html = ''; + } + } + + return $html; + } + + /** + * Get Post ID + * + * Replication of the same mechanism that is in wp-admin/post.php + * + * @return WP_Post|null + * + * @access public + */ + public function getPost() { + if (get_post()) { + $post = get_post(); + } elseif ($post_id = aam_Core_Request::get('post')) { + $post = get_post($post_id); + } elseif ($post_id = aam_Core_Request::get('post_ID')) { + $post = get_post($post_id); + } else { + $post = null; + } + + return $post; + } + + /** + * Filter backend term list + * + * @param array $terms + * @param array $taxonomies + * @param array $args + * + * @return array + * + * @access public + */ + public function getBackendTerms($terms, $taxonomies, $args) { + return $this->getTerms('backend', $terms); + } + + /** + * Filter frontend term list + * + * @param array $terms + * @param array $taxonomies + * @param array $args + * + * @return array + * + * @access public + */ + public function getFrontendTerms($terms, $taxonomies, $args) { + return $this->getTerms('frontend', $terms); + } + + /** + * Filter terms based on area + * + * @param string $area + * @param array $terms + * + * @return array + * + * @access public + */ + public function getTerms($area, $terms) { + if (is_array($terms)) { + foreach ($terms as $i => $term) { + if (is_object($term)) { + $object = $this->getUser()->getObject( + aam_Control_Object_Term::UID, $term->term_id + ); + if ($object->has($area, aam_Control_Object_Term::ACTION_LIST)) { + unset($terms[$i]); + } + } + } + } + + return $terms; + } + + /** + * Filter Pages that should be excluded in frontend + * + * @param array $pages + * + * @return array + * + * @access public + * @todo Cache this process + */ + public function getPages($pages) { + if (is_array($pages)) { + foreach ($pages as $i => $page) { + $object = $this->getUser()->getObject( + aam_Control_Object_Post::UID, $page->ID + ); + if ($object->has('frontend', aam_Control_Object_Post::ACTION_EXCLUDE)) { + unset($pages[$i]); + } + } + } + + return $pages; + } + + /** + * Contextual Help Menu + * + * @param type $contextual_help + * @param type $screen_id + * @param type $screen + * + * @return + */ + public function contextualHelp($contextual_help, $screen_id, $screen){ + if ($this->isAAMScreen()){ + $help = new aam_View_Help(); + $help->content($screen); + } + + return $contextual_help; + } + + /** + * Filter Navigation menu + * + * @param array $pages + * + * @return array + * + * @access public + */ + public function getNavigationMenu($pages) { + if (is_array($pages)) { + foreach ($pages as $i => $page) { + if ($page->type === 'taxonomy') { + $object = $this->getUser()->getObject( + aam_Control_Object_Term::UID, $page->object_id + ); + $exclude = aam_Control_Object_Term::ACTION_EXCLUDE; + } else { + $object = $this->getUser()->getObject( + aam_Control_Object_Post::UID, $page->object_id + ); + $exclude = aam_Control_Object_Post::ACTION_EXCLUDE; + } + + if ($object->has('frontend', $exclude)) { + unset($pages[$i]); + } + } + } + + return $pages; + } + + /** + * Filter Frontend widgets + * + * @param array $widgets + * + * @return array + * + * @access public + */ + public function widgetFilter($widgets) { + return $this->getUser()->getObject( + aam_Control_Object_Metabox::UID)->filterFrontend($widgets); + } + + /** + * Control Edit Post/Term + * + * Make sure that current user does not have access to edit Post or Term + * + * @return void + * + * @access public + */ + public function adminActionEdit() { + $user = $this->getUser(); + if (aam_Core_Request::request('taxonomy')) { + $control = $user->getObject( + aam_Control_Object_Term::UID, aam_Core_Request::request('tag_ID') + ); + if ($control->has('backend', aam_Control_Object_Post::ACTION_EDIT)) { + $this->reject(); + } + } elseif ($post = $this->getPost()) { + $control = $user->getObject(aam_Control_Object_Post::UID, $post->ID); + if ($control->has('backend', aam_Control_Object_Post::ACTION_EDIT)) { + $this->reject(); + } + } + } + + /** + * Reject the request + * + * Redirect or die the execution based on ConfigPress settings + * + * @return void + * + * @access public + */ + public function reject() { + if (is_admin()) { + $redirect = aam_Core_ConfigPress::getParam( + 'backend.access.deny.redirect' + ); + $message = aam_Core_ConfigPress::getParam( + 'backend.access.deny.message', __('Access Denied', 'aam') + ); + } else { + $redirect = aam_Core_ConfigPress::getParam( + 'frontend.access.deny.redirect' + ); + $message = aam_Core_ConfigPress::getParam( + 'frontend.access.deny.message', + __('Access Denied', 'aam') + ); + } + + if (filter_var($redirect, FILTER_VALIDATE_URL)) { + wp_redirect($redirect); + exit; + } elseif (is_int($redirect)) { + wp_redirect(get_post_permalink($redirect)); + exit; + } else { + wp_die($message); + } + } + + /** + * Take control over wp_die function + * + * @param callback $function + * + * @return void + * + * @access public + */ + public function wpDie($function) { + $redirect = aam_Core_ConfigPress::getParam('backend.access.deny.redirect'); + $message = aam_Core_ConfigPress::getParam( + 'backend.access.deny.message', __('Access Denied', 'aam') + ); + + if (filter_var($redirect, FILTER_VALIDATE_URL)) { + wp_redirect($redirect); + exit; + } elseif (is_int($redirect)) { + wp_redirect(get_post_permalink($redirect)); + exit; + } else { + call_user_func($function, $message, '', array()); + } + } + + /** + * Term Quick Menu Actions Filtering + * + * @param array $actions + * @param object $term + * + * @return array + * + * @access public + */ + public function tagRowActions($actions, $term) { + $control = $this->getUser()->getObject( + aam_Control_Object_Term::UID, $term->term_id + ); + //filter edit menu + if ($control->has('backend', aam_Control_Object_Post::ACTION_EDIT)) { + if (isset($actions['edit'])) { + unset($actions['edit']); + } + if (isset($actions['inline hide-if-no-js'])) { + unset($actions['inline hide-if-no-js']); + } + } + + //filter delete menu + if ($control->has('backend', aam_Control_Object_Post::ACTION_DELETE)) { + if (isset($actions['delete'])) { + unset($actions['delete']); + } + } + + return $actions; + } + + /** + * Post Quick Menu Actions Filtering + * + * @param array $actions + * @param WP_Post $post + * + * @return array + * + * @access public + */ + public function postRowActions($actions, $post) { + $control = $this->getUser()->getObject( + aam_Control_Object_Post::UID, $post->ID + ); + //filter edit menu + if ($control->has('backend', aam_Control_Object_Post::ACTION_EDIT)) { + if (isset($actions['edit'])) { + unset($actions['edit']); + } + if (isset($actions['inline hide-if-no-js'])) { + unset($actions['inline hide-if-no-js']); + } + } + //filter trash menu + if ($control->has('backend', aam_Control_Object_Post::ACTION_TRASH)) { + if (isset($actions['trash'])) { + unset($actions['trash']); + } + } + + //filter delete menu + if ($control->has('backend', aam_Control_Object_Post::ACTION_DELETE)) { + if (isset($actions['delete'])) { + unset($actions['delete']); + } + } + + return $actions; + } + + /** + * Main Frontend access control hook + * + * @return void + * + * @access public + * @global WP_Query $wp_query + * @global WP_Post $post + */ + public function wp() { + global $wp_query, $post; + + $user = $this->getUser(); + if (is_category()) { + $category = $wp_query->get_queried_object(); + if ($user->getObject(aam_Control_Object_Term::UID, $category->term_id + )->has('frontend', aam_Control_Object_Term::ACTION_BROWSE)) { + $this->reject(); + } + } elseif (!$wp_query->is_home() && ($post instanceof WP_Post)) { + if ($user->getObject(aam_Control_Object_Post::UID, $post->ID + )->has('frontend', aam_Control_Object_Post::ACTION_READ)) { + $this->reject(); + } + } + } + + /** + * Register Internal miscellenious functionality + * + * @param array $objects + * @param aam_Control_Subject $subject + * + * @return array + * + * @access public + */ + public function internalHooks($objects, $subject) { + $objects[aam_Control_Object_Event::UID] = new aam_Control_Object_Event( + $subject + ); + + return $objects; + } + + /** + * Event Handler + * + * @param int $post_ID + * @param WP_Post $post_after + * @param WP_Post $post_before + * + * @return void + * + * @access public + */ + public function postUpdate($post_ID, $post_after, $post_before = null) { + $events = $this->getUser()->getObject( + aam_Control_Object_Event::UID)->getOption(); + + foreach ($events as $event) { + if ($post_after->post_type == $event['post_type']) { + if ($event['event'] == 'status_change') { + if ($event['event_specifier'] == $post_after->post_status) { + $this->triggerAction( + $event, $post_ID, $post_after, $post_before + ); + } + } elseif ($post_before && $event['event'] == 'content_change') { + if ($post_before->post_content != $post_after->post_content) { + $this->triggerAction( + $event, $post_ID, $post_after, $post_before + ); + } + } + } + } + } + + /** + * Trigger Action based on settings + * + * @param array $event + * @param int $post_ID + * @param WP_Post $post_after + * @param WP_Post $post_before + * + * @global wpdb $wpdb + * @global array $wp_post_types + * + * @return void + * + * @access public + */ + public function triggerAction($event, $post_ID, $post_after, $post_before) { + global $wpdb, $wp_post_types; + + if ($event['action'] == 'notify') { + $subject = $wp_post_types[$event['post_type']]->labels->name . ' '; + $subject .= $post_ID . ' has been changed by ' . get_current_user(); + $subject = apply_filters('aam_notification_subject', $subject); + + $message = apply_filters( + 'aam_notification_message', get_edit_post_link($post_ID) + ); + + wp_mail($event['action_specifier'], $subject, $message); + } else if ($event['action'] == 'change_status') { + $wpdb->update( + $wpdb->posts, + array('post_status' => $event['action_specifier']), + array('ID' => $post_ID) + ); + } else if ($event['action'] == 'custom') { + if (is_callable($event['callback'])) { + call_user_func( + $event['callback'], $post_ID, $post_after, $post_before + ); + } + } + } + + /** + * Add extra column to search in for User search + * + * @param array $columns + * + * @return array + * + * @access public + */ + public function searchColumns($columns) { + $columns[] = 'display_name'; + + return $columns; + } + + /** + * Control User Block flag + * + * @param WP_Error $user + * + * @return WP_Error|WP_User + * + * @access public + */ + public function authenticate($user) { + if ($user->user_status == 1) { + $user = new WP_Error(); + $user->add( + 'authentication_failed', 'ERROR: User is blocked' + ); + } + + return $user; + } + + /** + * Make sure that AAM UI Page is used + * + * @return boolean + * + * @access public + */ + public function isAAMScreen() { + return (aam_Core_Request::get('page') == 'aam' ? true : false); + } + + /** + * Make sure that AAM Extension UI Page is used + * + * @return boolean + * + * @access public + */ + public function isAAMExtensionScreen() { + return (aam_Core_Request::get('page') == 'aam-ext' ? true : false); + } + + /** + * Make sure that AAM ConfigPress UI Page is used + * + * @return boolean + * + * @access public + */ + public function isAAMConfigPressScreen() { + return (aam_Core_Request::get('page') == 'aam-configpress' ? true : false); + } + + /** + * Print necessary styles + * + * @return void + * + * @access public + */ + public function printStyles() { + if ($this->isAAMScreen()) { + wp_enqueue_style('dashboard'); + wp_enqueue_style('global'); + wp_enqueue_style('wp-admin'); + wp_enqueue_style('aam-ui-style', AAM_MEDIA_URL . 'css/jquery-ui.css'); + wp_enqueue_style('aam-common-style', AAM_MEDIA_URL . 'css/common.css'); + wp_enqueue_style( + 'aam-style', + AAM_MEDIA_URL . 'css/aam.css', + array('aam-common-style') + ); + wp_enqueue_style('aam-datatables', AAM_MEDIA_URL . 'css/jquery.dt.css'); + wp_enqueue_style('wp-pointer'); + wp_enqueue_style( + 'aam-treeview', AAM_MEDIA_URL . 'css/jquery.treeview.css' + ); + } elseif ($this->isAAMExtensionScreen()) { + wp_enqueue_style('dashboard'); + wp_enqueue_style('global'); + wp_enqueue_style('wp-admin'); + wp_enqueue_style('aam-ui-style', AAM_MEDIA_URL . 'css/jquery-ui.css'); + wp_enqueue_style('aam-common-style', AAM_MEDIA_URL . 'css/common.css'); + wp_enqueue_style( + 'aam-style', + AAM_MEDIA_URL . 'css/extension.css', + array('aam-common-style') + ); + wp_enqueue_style('aam-datatables', AAM_MEDIA_URL . 'css/jquery.dt.css'); + } elseif ($this->isAAMConfigPressScreen()) { + wp_enqueue_style('aam-common-style', AAM_MEDIA_URL . 'css/common.css'); + wp_enqueue_style( + 'aam-style', + AAM_MEDIA_URL . 'css/configpress.css', + array('aam-common-style') + ); + wp_enqueue_style('aam-codemirror', AAM_MEDIA_URL . 'css/codemirror.css'); + } + + } + + /** + * Print necessary scripts + * + * @return void + * + * @access public + */ + public function printScripts() { + if ($this->isAAMScreen()) { + wp_enqueue_script('postbox'); + wp_enqueue_script('dashboard'); + wp_enqueue_script('aam-admin', AAM_MEDIA_URL . 'js/aam.js'); + wp_enqueue_script('aam-datatables', AAM_MEDIA_URL . 'js/jquery.dt.js'); + wp_enqueue_script( + 'aam-treeview', AAM_MEDIA_URL . 'js/jquery.treeview.js' + ); + wp_enqueue_script('jquery-ui-core'); + wp_enqueue_script('jquery-effects-core'); + wp_enqueue_script('jquery-ui-widget'); + wp_enqueue_script('jquery-ui-tabs'); + wp_enqueue_script('jquery-ui-accordion'); + wp_enqueue_script('jquery-ui-progressbar'); + wp_enqueue_script('jquery-ui-dialog'); + wp_enqueue_script('jquery-ui-button'); + wp_enqueue_script('jquery-ui-sortable'); + wp_enqueue_script('jquery-ui-menu'); + wp_enqueue_script('jquery-effects-highlight'); + wp_enqueue_script('wp-pointer'); + + $localization = array( + 'nonce' => wp_create_nonce('aam_ajax'), + 'siteURI' => admin_url('index.php'), + 'ajaxurl' => admin_url('admin-ajax.php'), + 'addUserURI' => admin_url('user-new.php'), + 'editUserURI' => admin_url('user-edit.php'), + 'defaultSegment' => array( + 'role' => $this->getDefaultEditableRole(), + 'blog' => get_current_blog_id(), + 'user' => 0 + ), + 'contextualMenu' => get_user_meta( + get_current_user_id(), 'aam_contextual_menu', true + ), + 'labels' => aam_View_Manager::uiLabels() + ); + wp_localize_script('aam-admin', 'aamLocal', $localization); + } elseif ($this->isAAMExtensionScreen()) { + wp_enqueue_script('postbox'); + wp_enqueue_script('dashboard'); + wp_enqueue_script('jquery-ui-core'); + wp_enqueue_script('jquery-effects-core'); + wp_enqueue_script('jquery-ui-widget'); + wp_enqueue_script('jquery-ui-dialog'); + wp_enqueue_script('jquery-ui-button'); + wp_enqueue_script('jquery-effects-highlight'); + wp_enqueue_script('aam-admin', AAM_MEDIA_URL . 'js/extension.js'); + wp_enqueue_script('aam-datatables', AAM_MEDIA_URL . 'js/jquery.dt.js'); + + $localization = array( + 'nonce' => wp_create_nonce('aam_ajax'), + 'ajaxurl' => admin_url('admin-ajax.php'), + 'labels' => aam_View_Manager::uiLabels() + ); + wp_localize_script('aam-admin', 'aamLocal', $localization); + } elseif ($this->isAAMConfigPressScreen()) { + wp_enqueue_script('jquery-ui-core'); + wp_enqueue_script('jquery-effects-core'); + wp_enqueue_script('jquery-effects-highlight'); + wp_enqueue_script('aam-admin', AAM_MEDIA_URL . 'js/configpress.js'); + wp_enqueue_script('aam-codemirror', AAM_MEDIA_URL . 'js/codemirror.js'); + wp_enqueue_script('aam-cmini', AAM_MEDIA_URL . 'js/properties.js'); + + $localization = array( + 'nonce' => wp_create_nonce('aam_ajax'), + 'ajaxurl' => admin_url('admin-ajax.php'), + ); + wp_localize_script('aam-admin', 'aamLocal', $localization); + } + } + + /** + * Get first editable role + * + * @return string + * + * @access public + */ + public function getDefaultEditableRole(){ + $role_keys = array_keys(get_editable_roles()); + + return array_shift($role_keys); + } + + /** + * Render list of AAM Features + * + * Must be separate from Ajax call because WordPress ajax does not load a lot of + * UI stuff + * + * @return void + * + * @access public + */ + public function features() { + check_ajax_referer('aam_ajax'); + try{ + $model = new aam_View_Manager; + $model->retrieveFeatures(); + } catch (Exception $e){ + echo $e->getMessage(); + } + die(); + } + + /** + * Handle Ajax calls to AAM + * + * @return void + * + * @access public + */ + public function ajax() { + check_ajax_referer('aam_ajax'); + + //clean buffer to make sure that nothing messing around with system + while (@ob_end_clean()); + + //process ajax request + try{ + $model = new aam_View_Manager(); + echo $model->processAjax(); + } catch (Exception $e){ + echo '-1'; + } + die(); + } + + /** + * Hanlde Metabox initialization process + * + * @return void + * + * @access public + */ + public function metaboxes() { + global $post; + + //make sure that nobody is playing with screen options + if ($post instanceof WP_Post) { + $screen = $post->post_type; + } elseif ($screen_object = get_current_screen()) { + $screen = $screen_object->id; + } else { + $screen = ''; + } + + if (aam_Core_Request::get('aam_meta_init')) { + try { + $model = new aam_View_Metabox; + $model->run($screen); + } catch (Exception $e){} + } else { + $this->getUser()->getObject(aam_Control_Object_Metabox::UID) + ->filterBackend($screen); + } + } + + /** + * Register Admin Menu + * + * @return void + * + * @access public + */ + public function adminMenu() { + //register the menu + add_menu_page( + __('AAM', 'aam'), + __('AAM', 'aam'), + aam_Core_ConfigPress::getParam( + 'aam.page.access_control.capability', 'administrator' + ), + 'aam', + array($this, 'content'), + AAM_BASE_URL . 'active-menu.png' + ); + //register submenus + add_submenu_page( + 'aam', + __('Access Control', 'aam'), + __('Access Control', 'aam'), + aam_Core_ConfigPress::getParam( + 'aam.page.access_control.capability', 'administrator' + ), + 'aam', + array($this, 'content') + ); + add_submenu_page( + 'aam', + __('ConfigPress', 'aam'), + __('ConfigPress', 'aam'), + aam_Core_ConfigPress::getParam( + 'aam.page.configpress.capability', 'administrator' + ), + 'aam-configpress', + array($this, 'configPressContent') + ); + add_submenu_page( + 'aam', + __('Extensions', 'aam'), + __('Extensions', 'aam'), + aam_Core_ConfigPress::getParam( + 'aam.page.extensions.capability', 'administrator' + ), + 'aam-ext', + array($this, 'extensionContent') + ); + + } + + /** + * Filter the Admin Menu + * + * @param string $parent_file + * + * @return string + * + * @access public + */ + public function filterMenu($parent_file){ + //filter admin menu + $this->getUser()->getObject(aam_Control_Object_Menu::UID)->filter(); + + return $parent_file; + } + + /** + * Take control over Tax Query parser + * + * By default WordPress consider non-empty term & category pair as search by + * slug. This is weird assumption and there is no other way to force core to + * search posts within custom taxonomy rather than take control over it with + * action parse_tax_query. + * + * @param WP_Query $query + * + * @return void + * + * @access public + */ + public function parseTaxQuery($query) { + if (!empty($query->query['term']) && !empty($query->query['taxonomy'])) { + foreach ($query->tax_query->queries as $id => $dump) { + $query->tax_query->queries[$id]['field'] = 'term_id'; + } + } + } + + /** + * Filter list of editable roles + * + * Does not allow for current user manager roles that have same or higher Level + * + * @param array $roles + * + * @return array + * + * @access public + */ + public function editableRoles($roles){ + $filtered = array(); + $level = aam_Core_API::getUserLevel(); + + + //check if super admin is specified + if (aam_Core_API::isSuperAdmin() === false){ + foreach ($roles as $role => $info) { + if (empty($info['capabilities']["level_{$level}"]) + || !$info['capabilities']["level_{$level}"]) { + $filtered[$role] = $info; + } + } + } else { + $filtered = $roles; + } + + return $filtered; + } + + /** + * Render Main Content page + * + * @return void + * + * @access public + */ + public function content() { + try { + $manager = new aam_View_Manager(); + echo $manager->run(); + } catch (Exception $e) { + echo $e->getMessage(); + } + } + + /** + * Render ConfigPress Page + * + * @return void + * + * @access public + */ + public function configPressContent() { + $manager = new aam_View_ConfigPress(); + echo $manager->run(); + } + + /** + * Extension content page + * + * @return void + * + * @access public + */ + public function extensionContent() { + $manager = new aam_View_Extension(); + echo $manager->run(); + } + + /** + * Initialize the AAM plugin + * + * @return void + * + * @access public + * @static + */ + public static function initialize() { + if (is_null(self::$_aam)) { + self::$_aam = new self; + } + } + + /** + * Initialize the current user + * + * Whether it is logged in user or visitor + * + * @return void + * + * @access public + */ + public function initializeUser() { + if ($user_id = get_current_user_id()) { + $this->setUser(new aam_Control_Subject_User($user_id)); + } else { + $this->setUser(new aam_Control_Subject_Visitor('')); + } + } + + /** + * User Login Hook + * + * This hook track the user's successfull login and update current subject + * + * @param string $username User Login name + * @param Wp_User $user Current user object + * + * @return void + * + * @access public + */ + public function login($username, $user) { + $this->setUser(new aam_Control_Subject_User($user->ID)); + } + + /** + * Uninstall hook + * + * Remove all leftovers from AAM execution + * + * @return void + * + * @access public + */ + public static function uninstall() { + global $wp_filesystem; + + //remove the content directory + if (!defined(AAM_CONTENT_DIR_FAILURE) && WP_Filesystem()) { + $wp_filesystem->rmdir(AAM_TEMP_DIR, true); + } + } + + /** + * Get Current User Subject + * + * @return aam_Control_Subject_User + * + * @access public + */ + public function getUser() { + return $this->_user; + } + + /** + * Set Current User Subject + * + * @param aam_Control_Subject $user + * + * @return void + * + * @access public + */ + public function setUser(aam_Control_Subject $user) { + $this->_user = $user; + } + + /** + * Execute before shutdown actions + * + * @return void + * + * @access public + */ + public function shutdown() { + $this->getUser()->saveCache(); + } + + /** + * Load Installed extensions + * + * @return void + * + * @access protected + */ + protected function loadExtensions() { + aam_Core_Repository::getInstance($this)->load(); + } + +} + +//the highest priority (higher the core) +//this is important to have to catch events like register core post types +add_action('init', 'aam::initialize', -1); + +//register_activation_hook(__FILE__, array('aam', 'activate')); +register_uninstall_hook(__FILE__, array('aam', 'uninstall')); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/active-menu.png b/wp-content/plugins/advanced-access-manager/active-menu.png new file mode 100644 index 0000000..81c3f44 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/active-menu.png differ diff --git a/wp-content/plugins/advanced-access-manager/application/control/object.php b/wp-content/plugins/advanced-access-manager/application/control/object.php new file mode 100644 index 0000000..bb49243 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object.php @@ -0,0 +1,150 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +abstract class aam_Control_Object { + + /** + * Subject + * + * @var aam_Control_Subject + * + * @access private + */ + private $_subject = null; + + /** + * Constructor + * + * @param aam_Control_Subject $subject + * @param int $object_id + * + * @return void + * + * @access public + */ + public function __construct(aam_Control_Subject $subject, $object_id) { + $this->setSubject($subject); + $this->init($object_id); + } + + /** + * Sleep method + * + * Used for caching mechanism + * + * @return array + * + * @access public + */ + public function __sleep(){ + return array('_option'); + } + + /** + * Indicate either object can be cached on not + * + * @return boolean + * + * @access public + */ + abstract public function cacheObject(); + + /** + * Initialize object + * + * @param string|int $object_id + * + * @return void + * + * @access public + */ + public function init($object_id) { + $this->setOption( + $this->getSubject()->readOption($this->getUID(), $object_id) + ); + } + + /** + * Set current subject + * + * Either it is User or Role + * + * @param aam_Control_Subject $subject + * + * @return void + * + * @access public + */ + public function setSubject(aam_Control_Subject $subject) { + $this->_subject = $subject; + } + + /** + * Get Subject + * + * @return aam_Control_Subject + * + * @access public + */ + public function getSubject() { + return $this->_subject; + } + + /** + * Get current object UID + * + * @return string + * + * @access public + */ + abstract public function getUID(); + + /** + * Set Object options + * + * @param mixed $option + * + * @return void + * + * @access public + */ + abstract public function setOption($option); + + /** + * Get Object options + * + * @return mixed + * + * @access public + */ + abstract public function getOption(); + + /** + * Save Object options + * + * @param mixed $params + * + * @return void + * + * @access public + */ + abstract public function save($params = null); + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/capability.php b/wp-content/plugins/advanced-access-manager/application/control/object/capability.php new file mode 100644 index 0000000..13de4ad --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/capability.php @@ -0,0 +1,96 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Capability extends aam_Control_Object { + + /** + * + */ + const UID = 'capability'; + + /** + * + * @var type + */ + private $_option = array(); + + /** + * + * @param type $capabilities + */ + public function save($capabilities = null) { + if (is_array($capabilities)) { + foreach ($capabilities as $capability => $grant) { + if (intval($grant)) { + $this->getSubject()->addCapability($capability); + } else { + $this->getSubject()->removeCapability($capability); + } + } + } + } + + /** + * @inheritdoc + */ + public function cacheObject(){ + return false; + } + + /** + * + * @param type $object_id + */ + public function init($object_id) { + if (empty($this->_option)) { + $this->setOption($this->getSubject()->getCapabilities()); + } + } + + /** + * + * @return type + */ + public function getUID() { + return self::UID; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + + /** + * + * @param type $capability + * @return type + */ + public function has($capability) { + return $this->getSubject()->hasCapability($capability); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/event.php b/wp-content/plugins/advanced-access-manager/application/control/object/event.php new file mode 100644 index 0000000..87c3349 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/event.php @@ -0,0 +1,71 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Event extends aam_Control_Object { + + /** + * + */ + const UID = 'event'; + + /** + * + * @var type + */ + private $_option = array(); + + /** + * + * @param type $events + */ + public function save($events = null) { + if (is_array($events)) { + $this->getSubject()->updateOption($events, self::UID); + } + } + + /** + * @inheritdoc + */ + public function cacheObject(){ + return true; + } + + /** + * + * @return type + */ + public function getUID() { + return self::UID; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/menu.php b/wp-content/plugins/advanced-access-manager/application/control/object/menu.php new file mode 100644 index 0000000..9917a7e --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/menu.php @@ -0,0 +1,166 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Menu extends aam_Control_Object { + + /** + * Object Unique ID + */ + const UID = 'menu'; + + /** + * List of options + * + * @var array + * + * @access private + */ + private $_option = array(); + + /** + * Filter Menu List + * + * @global array $menu + * @global array $submenu + * + * @return void + * + * @access public + */ + public function filter() { + global $menu; + + //filter menu & submenu first + $capability = uniqid('aam_'); //random capability means NO access + //let's go and iterate menu & submenu + foreach ($menu as $id => $item) { + if ($this->has($item[2])) { + $menu[$id][1] = $capability; + $denied = true; + } else { + $denied = false; + } + //filter submenu + $submenu = $this->filterSubmenu($item[2], $denied); + //a trick to whether remove the Root Menu or replace link with the first + //available submenu + if ($denied && $submenu){ + $menu[$id][2] = $submenu[1]; + $menu[$id][1] = $submenu[0]; + } elseif ($denied){ //ok, no available submenus, remove it completely + unset($menu[$id]); + } + } + } + + /** + * Filter submenu + * + * @global array $submenu + * + * @param array $menu + * @param boolean $denied + * + * @return string|null + * + * @access public + */ + public function filterSubmenu($menu, $denied) { + global $submenu; + + //go to submenu + $available = null; + if (isset($submenu[$menu])) { + foreach ($submenu[$menu] as $sid => $sub_item) { + if ($this->has($sub_item[2])) { + //weird WordPress behavior, it gets the first submenu link + //$submenu[$menu][$sid][1] = $capability; + unset($submenu[$menu][$sid]); + } elseif (is_null($available)){ //find first available submenu + $available = array($sub_item[1], $sub_item[2]); + } + } + } + + //replace submenu with available new if found + if ($denied && !is_null($available) && ($available[1] != $menu) ){ + $submenu[$available[1]] = $submenu[$menu]; + unset($submenu[$menu]); + } + + return $available; + } + + /** + * @inheritdoc + */ + public function save($menu = null) { + if (is_array($menu)) { + $this->getSubject()->updateOption($menu, self::UID); + //set flag that this subject has custom settings + $this->getSubject()->setFlag(aam_Control_Subject::FLAG_MODIFIED); + } + } + + /** + * @inheritdoc + */ + public function cacheObject(){ + return true; + } + + /** + * + * @return type + */ + public function getUID() { + return self::UID; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + + /** + * + * @param type $menu + * @return type + */ + public function has($menu) { + $response = null; + //decode URL in case of any special characters like & + $menu_decoded = htmlspecialchars_decode($menu); + //check if menu is restricted + if (isset($this->_option[$menu_decoded])) { + $response = (intval($this->_option[$menu_decoded]) ? true : false); + } + + return $response; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/metabox.php b/wp-content/plugins/advanced-access-manager/application/control/object/metabox.php new file mode 100644 index 0000000..1564b1e --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/metabox.php @@ -0,0 +1 @@ + * @copyright Copyright C 2013 Vasyl Martyniuk * @license GNU General Public License {@link http://www.gnu.org/licenses/} */ class aam_Control_Object_Metabox extends aam_Control_Object { /** * */ const UID = 'metabox'; /** * * @var type */ private $_option = array(); /** * * @global type $wp_registered_widgets * @param type $sidebar_widgets * @return type */ public function filterFrontend($sidebar_widgets) { global $wp_registered_widgets; if (is_array($wp_registered_widgets)) { foreach ($wp_registered_widgets as $id => $data) { if (is_object($data['callback'][0])) { $callback = get_class($data['callback'][0]); } elseif (is_string($data['callback'][0])) { $callback = $data['callback'][0]; } if ($this->has('widgets', $callback)) { unregister_widget($callback); //remove it from registered widget global var!! //INFORM: Why Unregister Widget does not clear global var? unset($wp_registered_widgets[$id]); } } } return $sidebar_widgets; } /** * * @global type $wp_meta_boxes * @param type $screen * @param type $post */ public function filterBackend($screen, $post = null) { global $wp_meta_boxes; if (is_array($wp_meta_boxes)) { foreach ($wp_meta_boxes as $screen_id => $zones) { if ($screen == $screen_id) { foreach ($zones as $zone => $priorities) { foreach ($priorities as $priority => $metaboxes) { foreach ($metaboxes as $metabox => $data) { if ($this->has($screen_id, $metabox)) { remove_meta_box($metabox, $screen_id, $zone); } } } } } } } } /** * @inheritdoc */ public function save($metaboxes = null) { if (is_array($metaboxes)) { $this->getSubject()->updateOption($metaboxes, self::UID); //set flag that this subject has custom settings $this->getSubject()->setFlag(aam_Control_Subject::FLAG_MODIFIED); } } /** * @inheritdoc */ public function cacheObject(){ return true; } /** * * @return type */ public function getUID() { return self::UID; } /** * * @param type $option */ public function setOption($option) { $this->_option = (is_array($option) ? $option : array()); } /** * * @return type */ public function getOption() { return $this->_option; } /** * * @param type $group * @param type $metabox * @return type */ public function has($group, $metabox) { $response = false; if (isset($this->_option[$group][$metabox])) { $response = (intval($this->_option[$group][$metabox]) ? true : false); } return $response; } } \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/post.php b/wp-content/plugins/advanced-access-manager/application/control/object/post.php new file mode 100644 index 0000000..e8c0659 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/post.php @@ -0,0 +1,338 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Post extends aam_Control_Object { + + /** + * Object Identifier + */ + const UID = 'post'; + + /** + * Object Action: COMMENT + * + * Control access to commenting ability + */ + const ACTION_COMMENT = 'comment'; + + /** + * Object Action: READ + * + * Either Object can be read by user or not + */ + const ACTION_READ = 'read'; + + /** + * Object Action: EXCLUDE + * + * If object is a part of frontend menu either exclude it from menu or not + */ + const ACTION_EXCLUDE = 'exclude'; + + /** + * Object Action: TRASH + * + * Manage access to object trash ability + */ + const ACTION_TRASH = 'trash'; + + /** + * + */ + const ACTION_DELETE = 'delete'; + + /** + * + */ + const ACTION_EDIT = 'edit'; + + /** + * + * @var type + */ + private $_post; + + /** + * + * @var type + */ + private $_option = array(); + + /** + * Indicator that settings where inherited + * + * @var boolean + * + * @access private + */ + private $_inherited = false; + + /** + * Init Post Object + * + * @param WP_Post|Int $object + * + * @return void + * + * @access public + */ + public function init($object) { + //make sure that we are dealing with WP_Post object + if ($object instanceof WP_Post){ + $this->setPost($object); + } elseif (intval($object)) { + $this->setPost(get_post($object)); + } + + if ($this->getPost()){ + $this->read(); + } + } + + /** + * Read the Post AAM Metadata + * + * Get all settings related to specified post + * + * @return void + * + * @access public + */ + public function read() { + $option = get_post_meta($this->getPost()->ID, $this->getOptionName(), true); + //try to inherit it from parent category + if (empty($option) + && (aam_Core_ConfigPress::getParam('aam.post.inherit', 'true') == 'true')) { + $terms = $this->retrievePostTerms(); + //use only first term for inheritance + $term_id = array_shift($terms); + //try to get any parent access + $option = $this->inheritAccess($term_id); + } + //even if parent category is empty, try to read the parent subject + if (empty($option)){ + $option = $this->getSubject()->readParentSubject( + self::UID, $this->getPost()->ID + ); + } + + $this->setOption( + apply_filters('aam_post_access_option', $option, $this) + ); + } + + /** + * Generate option name + * + * @return string + * + * @access protected + */ + protected function getOptionName() { + $subject = $this->getSubject(); + //prepare option name + $meta_key = 'aam_' . self::UID . '_access_' . $subject->getUID(); + $meta_key .= ($subject->getId() ? $subject->getId() : ''); + + return $meta_key; + } + + /** + * Inherit access from parent term + * + * Go throught the hierarchical branch of terms and retrieve access from the + * first parent term that has access defined. + * + * @param int $term_id + * + * @return array + * + * @access private + */ + private function inheritAccess($term_id) { + $term = new aam_Control_Object_Term($this->getSubject(), $term_id); + $access = $term->getOption(); + if (isset($access['post']) && $access['post']) { + $result = array('post' => $access['post']); + $this->setInherited(true); + } elseif (is_object($term->getTerm()) && $term->getTerm()->parent) { + $result = $this->inheritAccess($term->getTerm()->parent); + } else { + $result = array(); + } + + return $result; + } + + /** + * @inheritdoc + */ + public function __sleep(){ + return array('_post', '_option', '_inherited'); + } + + /** + * @inheritdoc + */ + public function cacheObject(){ + return true; + } + + /** + * @inheritdoc + */ + public function save($params = null) { + if (is_array($params)) { + $this->setInherited(false); + update_post_meta($this->getPost()->ID, $this->getOptionName(), $params); + //set flag that this subject has custom settings + $this->getSubject()->setFlag(aam_Control_Subject::FLAG_MODIFIED); + } + //fire internal hook + do_action_ref_array('aam_object_saved', $this, $params); + } + + /** + * Get Object Unique ID + * + * @return string + * + * @access public + */ + public function getUID() { + return self::UID; + } + + /** + * + * @return type + */ + public function delete() { + return delete_post_meta($this->getPost()->ID, $this->getOptionName()); + } + + /** + * Retrieve list of all hierarchical terms the object belongs to + * + * @return array + * + * @access private + */ + private function retrievePostTerms() { + $taxonomies = get_object_taxonomies($this->getPost()); + if (is_array($taxonomies) && count($taxonomies)) { + //filter taxonomies to hierarchical only + $filtered = array(); + foreach ($taxonomies as $taxonomy) { + if (is_taxonomy_hierarchical($taxonomy)) { + $filtered[] = $taxonomy; + } + } + $terms = wp_get_object_terms( + $this->getPost()->ID, $filtered, array('fields' => 'ids') + ); + } else { + $terms = array(); + } + + return $terms; + } + + /** + * Set Post. Cover all unexpectd wierd issues with WP Core + * + * @param WP_Post $post + * + * @return void + * + * @access public + */ + public function setPost($post) { + if ($post instanceof WP_Post){ + $this->_post = $post; + } else { + $this->_post = (object) array('ID' => 0); + } + } + + /** + * Get Post + * + * @return WP_Post|stdClass + * + * @access public + */ + public function getPost() { + return $this->_post; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + + /** + * Set inherited flag + * + * If post does not have access specified, it'll try to inherit it from the + * parent category and if parent category has access defined it'll inherit all + * settings and set _inherited flag to true. + * + * @param boolean $flag + * + * @return void + * + * @access public + */ + public function setInherited($flag){ + $this->_inherited = $flag; + } + + /** + * + * @return type + */ + public function getInherited(){ + return $this->_inherited; + } + + /** + * + * @param type $area + * @param type $action + * @return type + */ + public function has($area, $action) { + $response = false; + if (isset($this->_option['post'][$area][$action])) { + $response = (intval($this->_option['post'][$area][$action]) ? true : false); + } + + return $response; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/object/term.php b/wp-content/plugins/advanced-access-manager/application/control/object/term.php new file mode 100644 index 0000000..c695408 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/object/term.php @@ -0,0 +1,222 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Term extends aam_Control_Object { + + /** + * + */ + const UID = 'term'; + + /** + * + */ + const ACTION_BROWSE = 'browse'; + + /** + * + */ + const ACTION_EXCLUDE = 'exclude'; + + /** + * + */ + const ACTION_EDIT = 'edit'; + + /** + * + */ + const ACTION_LIST = 'list'; + + /** + * + * @var type + */ + private $_term = null; + + /** + * + * @var type + */ + private $_option = array(); + + /** + * @inheritdoc + */ + public function __sleep(){ + return array('_term', '_option'); + } + + /** + * @inheritdoc + */ + public function save($params = null) { + if (is_array($params)) { + $this->getSubject()->updateOption( + $params, self::UID, $this->getTerm()->term_id + ); + //set flag that this subject has custom settings + $this->getSubject()->setFlag(aam_Control_Subject::FLAG_MODIFIED); + } + } + + /** + * Get Object Unique ID + * + * @return string + * + * @access public + */ + public function getUID() { + return self::UID; + } + + /** + * + * @param type $object_id + */ + public function init($object_id) { + if ($object_id) { + //initialize term first + $term = get_term($object_id, $this->getTaxonomy($object_id)); + if ($term && !is_wp_error($term)) { + $this->setTerm($term); + $access = $this->getSubject()->readOption( + self::UID, $this->getTerm()->term_id + ); + $inherit = aam_Core_ConfigPress::getParam( + 'aam.term.inherit', 'true' + ); + if (empty($access) && ($inherit == 'true')) { + //try to get any parent restriction + $access = $this->inheritAccess($this->getTerm()->parent); + } + + //even if parent category is empty, try to read the parent subject + if (empty($access)){ + $access = $this->getSubject()->readParentSubject( + self::UID, $this->getTerm()->term_id + ); + } + + $this->setOption( + apply_filters('aam_term_access_option', $access, $this) + ); + } + } + } + + /** + * + * @return type + */ + public function delete() { + return $this->getSubject()->deleteOption( + self::UID, $this->getTerm()->term_id + ); + } + + /** + * + * @param type $term_id + * @return array + */ + private function inheritAccess($term_id) { + $term = new aam_Control_Object_Term($this->getSubject(), $term_id); + if ($term->getTerm()) { + $access = $term->getOption(); + if (empty($access) && $term->getTerm()->parent) { + $this->inheritAccess($term->getTerm()->parent); + } elseif (!empty($access)) { + $access['inherited'] = true; + } + } else { + $access = array(); + } + + return $access; + } + + /** + * + * @global type $wpdb + * @param type $object_id + * @return type + */ + private function getTaxonomy($object_id) { + global $wpdb; + + $query = "SELECT taxonomy FROM {$wpdb->term_taxonomy} "; + $query .= "WHERE term_id = {$object_id}"; + + return $wpdb->get_var($query); + } + + /** + * + * @param type $term + */ + public function setTerm($term) { + $this->_term = $term; + } + + /** + * + * @return type + */ + public function getTerm() { + return $this->_term; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + + /** + * @inheritdoc + */ + public function cacheObject(){ + return true; + } + + /** + * + * @param type $area + * @param type $action + * @return type + */ + public function has($area, $action) { + $response = false; + if (isset($this->_option['term'][$area][$action])) { + $response = (intval($this->_option['term'][$area][$action]) ? true : false); + } + + return $response; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/subject.php b/wp-content/plugins/advanced-access-manager/application/control/subject.php new file mode 100644 index 0000000..a2639cc --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/subject.php @@ -0,0 +1,468 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +abstract class aam_Control_Subject { + + /** + * Flag that idicates that subject has been modified + */ + const FLAG_MODIFIED = 'modified_flag'; + + /** + * Subject ID + * + * Whether it is User ID or Role ID + * + * @var string|int + * + * @access private + */ + private $_id; + + /** + * WordPres Subject + * + * It can be WP_User or WP_Role, based on what class has been used + * + * @var WP_Role|WP_User + * + * @access private + */ + private $_subject; + + /** + * List of Objects to be access controled for current subject + * + * All access control objects like Admin Menu, Metaboxes, Posts etc + * + * @var array + * + * @access private + */ + private $_objects = array(); + + /** + * Update Cache flag + * + * If there is any new object instantiated, update cache too + * + * @var boolean + * + * @access private + */ + private $_updateCache = false; + + /** + * Constructor + * + * @param string|int $id + * + * @return void + * + * @access public + */ + public function __construct($id) { + //set subject + $this->setId($id); + //retrieve and set subject itself + $this->setSubject($this->retrieveSubject()); + //retrieve cache if there is any + $this->initCache(); + } + + /** + * Initialize cache + * + * @return void + * + * @access public + */ + public function initCache(){ + if (aam_Core_ConfigPress::getParam('aam.caching', 'false') === "true"){ + $this->setObjects($this->readCache()); + foreach($this->_objects as $objects){ + foreach($objects as $object){ + if (!($object instanceof __PHP_Incomplete_Class)) { + $object->setSubject($this); + } + } + } + } + } + + /** + * Desctruct the subject + * + * Execute extra actions during application shutdown + * + * @return void + * + * @access public + */ + public function saveCache(){ + $caching = aam_Core_ConfigPress::getParam('aam.caching', 'false'); + if (($this->_updateCache === true) && ($caching === "true")){ + $this->updateCache(); + } + } + + /** + * Trigger Subject native methods + * + * @param string $name + * @param array $arguments + * + * @return mixed + * + * @access public + */ + public function __call($name, $arguments) { + $subject = $this->getSubject(); + //make sure that method is callable + if (method_exists($subject, $name)) { + $response = call_user_func_array(array($subject, $name), $arguments); + } else { + $response = null; + } + + return $response; + } + + /** + * Get Subject's native properties + * + * @param string $name + * + * @return mixed + * + * @access public + */ + public function __get($name) { + $subject = $this->getSubject(); + //TODO - In multisite Wp_User roles are not initialized if admin not a part + //of the site + return @$subject->$name; + } + + /** + * Set Subject's native properties + * + * @param string $name + * + * @return mixed + * + * @access public + */ + public function __set($name, $value) { + $subject = $this->getSubject(); + $subject->$name = $value; + } + + /** + * Set Subject ID + * + * @param string|int + * + * @return void + * + * @access public + */ + public function setId($id) { + $this->_id = $id; + } + + /** + * Get Subject ID + * + * @return string|int + * + * @access public + */ + public function getId() { + return $this->_id; + } + + /** + * Get Subject + * + * @return WP_Role|WP_User + * + * @access public + */ + public function getSubject() { + return $this->_subject; + } + + /** + * Set Subject + * + * @param WP_Role|WP_User $subject + * + * @return void + * + * @access public + */ + public function setSubject($subject) { + $this->_subject = $subject; + } + + /** + * Set Objects + * + * If there is any cache, set the complete set of objects + * + * @return void + * + * @access public + */ + public function setObjects($objects) { + $this->_objects = $objects; + } + + /** + * Get Access Objects + * + * @return array + * + * @access public + */ + public function getObjects() { + return $this->_objects; + } + + /** + * Get Individual Object + * + * @param string $object + * @param mixed $object_id + * + * @return aam_Control_Object + * + * @access public + */ + public function getObject($object, $object_id = 0) { + //make sure that object group is defined + if (!isset($this->_objects[$object])){ + $this->_objects[$object] = array(); + } + //check if there is an object with specified ID + if (!isset($this->_objects[$object][$object_id])) { + $class_name = 'aam_Control_Object_' . ucfirst($object); + if (class_exists($class_name)) { + $this->_objects[$object][$object_id] = new $class_name( + $this, $object_id, $this + ); + } else { + $this->_objects[$object][$object_id] = apply_filters( + 'aam_object', null, $object, $object_id, $this + ); + } + + //set update cache flag to true if object can be cached + if ($this->_objects[$object][$object_id]->cacheObject() === true){ + $this->_updateCache = true; + } + } + + return $this->_objects[$object][$object_id]; + } + + /** + * Set Individual Access Object + * + * @param aam_Control_Object $object + * @param string $uid + * + * @return void + * + * @access public + */ + public function setObject(aam_Control_Object $object, $uid) { + $this->_objects[$uid] = $object; + } + + /** + * Release the object + * + * @param string $uid + * @param string|int $object_id + * + * @return void + * + * @access public + */ + public function releaseObject($uid, $object_id = 0){ + if (isset($this->_objects[$uid][$object_id])){ + unset($this->_objects[$uid][$object_id]); + } + } + + /** + * Get Subject Type + * + * @return string + * + * @access public + */ + public function getType() { + return get_class($this->getSubject()); + } + + /** + * + * @param type $capability + * @return type + */ + public function hasCapability($capability) { + return $this->getSubject()->has_cap($capability); + } + + /** + * Save Access Parameters + * + * @param array $params + * + * @return boolean + * + * @access public + */ + public function save(array $params) { + foreach ($params as $object_type => $dump) { + if ($object = $this->getObject($object_type)) { + $object->save($dump); + } + } + + //clear cache + $this->clearCache(); + } + + /** + * Retrieve list of subject's capabilities + * + * @return array + * + * @access public + */ + abstract public function getCapabilities(); + + /** + * Read Cache + * + * Cache all settings to speed-up the AAM execution + * + * @return void + * + * @access public + */ + abstract public function readCache(); + + /** + * Update Cache + * + * If there is any change to cache, update it and save to database + * + * @return boolean + * + * @access public + */ + abstract public function updateCache(); + + /** + * Clear the Subject Cache + * + * @return boolean + * + * @access public + */ + abstract public function clearCache(); + + /** + * Clear all options + * + * Remove all options related to current user from database and any other + * custom storage + * + * @return void + * + * @access public + */ + abstract public function clearAllOptions(); + + /** + * Check if subject has specified flag + * + * @param string flag + * + * @return boolean + * + * @access public + */ + abstract public function hasFlag($flag); + + /** + * Set Subject Flag + * + * @param string $flag + * @param boolean $value + * + * @return void + * + * @access protected + */ + abstract public function setFlag($flag, $value = true); + + /** + * Retrieve subject based on used class + * + * @return void + * + * @access protected + */ + abstract protected function retrieveSubject(); + + /** + * Read object from parent subject + * + * @param string $object + * @param mixed $object_id + * + * @return mixed + * + * @access public + */ + public function readParentSubject($object, $object_id){ + if ($subject = $this->getParentSubject()){ + $option = $subject->getObject($object, $object_id)->getOption(); + } else { + $option = null; + } + + return $option; + } + + /** + * Retrive parent subject + * + * If there is no parent subject, return null + * + * @return aam_Control_Subject|null + * + * @access public + */ + abstract public function getParentSubject(); +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/subject/role.php b/wp-content/plugins/advanced-access-manager/application/control/subject/role.php new file mode 100644 index 0000000..47d5ddc --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/subject/role.php @@ -0,0 +1,289 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Subject_Role extends aam_Control_Subject { + + /** + * Subject UID: ROLE + */ + const UID = 'role'; + + /** + * Retrieve Role based on ID + * + * @return WP_Role|null + * + * @access protected + */ + protected function retrieveSubject() { + $roles = new WP_Roles; + $role = $roles->get_role($this->getId()); + + if (!is_null($role) && isset($role->capabilities)){ + //add role capability as role id, weird WordPress behavior + //example is administrator capability + $role->capabilities[$this->getId()] = true; + } + + return $role; + } + + /** + * Delete User Role and all User's in role if requested + * + * @param boolean $delete_users + * + * @return boolean + * + * @access public + */ + public function delete($delete_users = false) { + $role = new WP_Roles; + + if ($this->getId() !== 'administrator') { + if ($delete_users) { + if (current_user_can('delete_users')) { + //delete users first + $users = new WP_User_Query(array( + 'number' => '', + 'blog_id' => get_current_blog_id(), + 'role' => $this->getId() + )); + foreach ($users->get_results() as $user) { + //user can not delete himself + if (($user instanceof WP_User) + && ($user->ID != get_current_user_id())) { + wp_delete_user($user->ID); + } + } + $role->remove_role($this->getId()); + $status = true; + } else { + $status = false; + } + } else { + $role->remove_role($this->getId()); + $status = true; + } + } else { + $status = false; + } + + return $status; + } + + /** + * + * @param type $name + * @return boolean + */ + public function update($name) { + $role = new WP_Roles; + if ($name) { + $role->roles[$this->getId()]['name'] = $name; + $status = aam_Core_API::updateBlogOption($role->role_key, $role->roles); + } else { + $status = false; + } + + return $status; + } + + /** + * Remove Capability + * + * @param string $capability + * + * @return boolean + * + * @access public + */ + public function removeCapability($capability) { + return $this->getSubject()->remove_cap($capability); + } + + /** + * Check if Subject has capability + * + * Keep compatible with WordPress core + * + * @param string $capability + * + * @return boolean + * + * @access public + */ + public function addCapability($capability) { + return $this->getSubject()->add_cap($capability, 1); + } + + /** + * + * @return type + */ + public function getCapabilities() { + return $this->getSubject()->capabilities; + } + + /** + * + * @param type $value + * @param type $object + * @param type $object_id + * @return type + */ + public function updateOption($value, $object, $object_id = 0) { + return aam_Core_API::updateBlogOption( + $this->getOptionName($object, $object_id), $value + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @param type $default + * @return type + */ + public function readOption($object, $object_id = 0, $default = null) { + return aam_Core_API::getBlogOption( + $this->getOptionName($object, $object_id), $default + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @return type + */ + public function deleteOption($object, $object_id = 0) { + return aam_Core_API::deleteBlogOption( + $this->getOptionName($object, $object_id) + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @return string + */ + protected function getOptionName($object, $object_id) { + $name = "aam_{$object}" . ($object_id ? "_{$object_id}_" : '_'); + $name .= self::UID . '_' . $this->getId(); + + return $name; + } + + /** + * @inheritdoc + */ + public function hasFlag($flag){ + $option = 'aam_' . self::UID . '_' . $this->getId() . "_{$flag}"; + return aam_Core_API::getBlogOption($option); + } + + /** + * @inheritdoc + */ + public function setFlag($flag, $value = true) { + $option = 'aam_' . self::UID . '_' . $this->getId() . "_{$flag}"; + if ($value === true){ + aam_Core_API::updateBlogOption($option, $value); + } else { + aam_Core_API::deleteBlogOption($option); + } + } + + /** + * @inheritdoc + */ + public function clearAllOptions(){ + global $wpdb; + + //prepare option mask + $mask = 'aam_%_' . $this->getId(); + + //clear all settings in options table + $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '{$mask}'"); + + //clear all settings in postmeta table + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '{$mask}'"); + + $this->clearCache(); //delete cache + //clear modifield flag + $this->setFlag(aam_Control_Subject::FLAG_MODIFIED, false); + + do_action('aam_clear_all_options', $this); + } + + /** + * + * @return type + */ + public function getUID() { + return self::UID; + } + + /** + * Get Role Cache + * + * AAM does not store individual Role cache that is why this function returns + * always empty array + * + * @return array + * + * @access public + */ + public function readCache(){ + return array(); + } + + /** + * Update Role Cache + * + * This function does nothing because AAM does not store Role's cache + * + * @return boolean + * + * @access public + */ + public function updateCache(){ + return true; + } + + /** + * Clear Role Cache + * + * This function does nothing because AAM does not store Role's cache + * + * @return boolean + * + * @access public + */ + public function clearCache(){ + return true; + } + + /** + * @inheritdoc + */ + public function getParentSubject(){ + return null; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/subject/user.php b/wp-content/plugins/advanced-access-manager/application/control/subject/user.php new file mode 100644 index 0000000..d80ab47 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/subject/user.php @@ -0,0 +1,395 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Subject_User extends aam_Control_Subject { + + /** + * Subject UID: USER + */ + const UID = 'user'; + + /** + * AAM Capability Key + * + * WordPress does not allow to have different set of capabilities for one user + * between sites. aam_capability key stores the set of capabilities stored after + * individual user edit and merge them with system capabilities. + * The merging process overwrites allcaps. + * + * @var array + * + * @access private + */ + private $_cap_key = ''; + + /** + * @inheritdoc + */ + public function __construct($id) { + parent::__construct($id); + + //overwrite default set of capabilities if AAM capset is defined + if ($this->isDefaultCapSet() === false){ + //make sure that aam_capability is actually array + if (is_array($this->getSubject()->aam_caps)){ + $allcaps = array_merge( + $this->getSubject()->allcaps, $this->getSubject()->aam_caps + ); + $this->getSubject()->allcaps = $allcaps; + } + } + } + + /** + * Delete User + * + * @return boolean + * + * @access public + */ + public function delete() { + $response = false; + if (current_user_can('delete_users') + && ($this->getId() !== get_current_user_id())) { + $response = wp_delete_user($this->getId()); + } + + return $response; + } + + /** + * Block User + * + * @return boolean + * + * @access public + * @global wpdb $wpdb + */ + public function block() { + global $wpdb; + + $response = false; + if (current_user_can('edit_users') + && ($this->getId() != get_current_user_id())) { + $status = ($this->getSubject()->user_status == 0 ? 1 : 0); + if ($wpdb->update( + $wpdb->users, + array('user_status' => $status), + array('ID' => $this->getId()) + )) { + $this->getSubject()->user_status = $status; + clean_user_cache($this->getSubject()); + $response = true; + } + } + + return $response; + } + + /** + * Retrieve User based on ID + * + * @return WP_Role|null + * + * @access protected + */ + protected function retrieveSubject() { + global $current_user; + + if (($current_user instanceof WP_User) + && ($current_user->ID == $this->getId())) { + $subject = $current_user; + } else { + $subject = new WP_User($this->getId()); + } + + //retrieve aam capabilities if are not retrieved yet + $this->_cap_key = 'aam_capability'; + $subject->aam_caps = get_user_option($this->_cap_key, $this->getId()); + + return $subject; + } + + /** + * Check if user has default capability set + * + * @return boolean + * + * @access public + */ + public function isDefaultCapSet(){ + return empty($this->getSubject()->aam_caps); + } + + /** + * + * @return array + */ + public function getCapabilities() { + return $this->getSubject()->allcaps; + } + + /** + * Check if user has specified capability + * + * @param string $capability + * + * @return boolean + * + * @access public + */ + public function hasCapability($capability) { + return user_can($this->getSubject(), $capability); + } + + /** + * Check if Subject has capability + * + * Keep compatible with WordPress core + * + * @param string $capability + * + * @return boolean + * + * @access public + */ + public function addCapability($capability) { + return $this->updateCapability($capability, true); + } + + /** + * Remove Capability + * + * @param string $capability + * + * @return boolean + * + * @access public + */ + public function removeCapability($capability) { + return $this->updateCapability($capability, false); + } + + /** + * Reset User Capability + * + * @return array + * + * @access public + */ + public function resetCapability(){ + return delete_user_option($this->getId(), $this->_cap_key); + } + + /** + * Update User's Capability Set + * + * @param string $capability + * @param boolean $grand + * + * @return boolean + * + * @access public + */ + public function updateCapability($capability, $grand){ + //make sure that we have right array + if (is_array($this->getSubject()->aam_caps)){ + $aam_caps = $this->getSubject()->aam_caps; + } else { + $aam_caps = array(); + } + + //add capability + $aam_caps[$capability] = $grand; + //update user data. TODO - Keep eyes on this part + $this->getSubject()->data->aam_caps = $aam_caps; + //save and return the result of operation + return update_user_option($this->getId(), $this->_cap_key, $aam_caps); + } + + /** + * + * @param type $value + * @param type $object + * @param type $object_id + * @return type + */ + public function updateOption($value, $object, $object_id = 0) { + return update_user_option( + $this->getId(), $this->getOptionName($object, $object_id), $value + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @param bool $inherit + * + * @return mixed + */ + public function readOption($object, $object_id = 0, $inherit = true) { + $option = get_user_option( + $this->getOptionName($object, $object_id), $this->getId() + ); + if (empty($option) && $inherit) { + $option = $this->readParentSubject($object, $object_id); + } + + return $option; + } + + /** + * @inheritdoc + */ + public function getParentSubject() { + //try to get this option from the User's Role + $roles = $this->getSubject()->roles; + //first user role is counted only. AAM does not support multi-roles + $subject_role = array_shift($roles); + + if ($subject_role){ + //in case of multisite & current user does not belong to the site + $role = new aam_Control_Subject_Role($subject_role); + } else { + $role = null; + } + + return $role; + } + + /** + * + * @param type $object + * @param type $object_id + * @return type + */ + public function deleteOption($object, $object_id = 0) { + return delete_user_option( + $this->getId(), $this->getOptionName($object, $object_id) + ); + } + + /** + * @inheritdoc + */ + public function hasFlag($flag){ + return get_user_option("aam_{$flag}", $this->getId()); + } + + /** + * @inheritdoc + */ + public function setFlag($flag, $value = true) { + if ($value === true){ + update_user_option($this->getId(), "aam_{$flag}", $value); + } else { + delete_user_option($this->getId(), "aam_{$flag}"); + } + } + + /** + * @inheritdoc + */ + public function clearAllOptions() + { + global $wpdb; + + //clear all settings in usermeta table + $prefix = $wpdb->get_blog_prefix(); + $query = "DELETE FROM {$wpdb->usermeta} WHERE "; + $query .= "meta_key LIKE '{$prefix}aam_%' AND user_id = " . $this->getId(); + $wpdb->query($query); + + //clear all settings in postmeta table + $mask = 'aam_%_' . $this->getId(); + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '{$mask}'"); + + $this->clearCache(); //delete cache + $this->resetCapability(); //reset default capabilities + $this->setFlag(aam_Control_Subject::FLAG_MODIFIED, false); //clear flag + + do_action('aam_clear_all_options', $this); + } + + /** + * Prepare option's name + * + * Compile option's name based on object name and object ID. As example if + * object name is "post" and object ID is "5", the compiled option's name is + * aam_post_5. + * + * @param string $object + * @param string|int $object_id + * + * @return string + * + * @access protected + */ + protected function getOptionName($object, $object_id) { + return "aam_{$object}" . ($object_id ? "_{$object_id}" : ''); + } + + /** + * Get Subject UID + * + * @return string + * + * @access public + */ + public function getUID() { + return self::UID; + } + + /** + * Get User's Cache + * + * Read User's option aam_cache and return it + * + * @return array + * + * @access public + */ + public function readCache(){ + $cache = get_user_option('aam_cache', $this->getId()); + + return (is_array($cache) ? $cache : array()); + } + + /** + * Insert or Update User's Cache + * + * @return boolean + * + * @access public + */ + public function updateCache(){ + return update_user_option($this->getId(), 'aam_cache', $this->getObjects()); + } + + /** + * Delete User's Cache + * + * @return boolean + * + * @access public + */ + public function clearCache(){ + return delete_user_option($this->getId(), 'aam_cache'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/control/subject/visitor.php b/wp-content/plugins/advanced-access-manager/application/control/subject/visitor.php new file mode 100644 index 0000000..5ddeb07 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/control/subject/visitor.php @@ -0,0 +1,201 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Subject_Visitor extends aam_Control_Subject +{ + + /** + * Subject UID: VISITOR + */ + const UID = 'visitor'; + + /** + * Constructor + * + * @param string|int $id + * + * @return void + * + * @access public + */ + public function __construct($id) { + //run parent constructor + parent::__construct(''); + } + + /** + * Retrieve Visitor Subject + * + * @return stdClass + * + * @access protected + */ + protected function retrieveSubject(){ + return new stdClass(); + } + + /** + * + * @return type + */ + public function getCapabilities(){ + return array(); + } + + /** + * + * @param type $value + * @param type $object + * @param type $object_id + * @return type + */ + public function updateOption($value, $object, $object_id = 0){ + return aam_Core_API::updateBlogOption( + $this->getOptionName($object, $object_id), $value + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @return type + */ + public function readOption($object, $object_id = 0){ + return aam_Core_API::getBlogOption( + $this->getOptionName($object, $object_id) + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @return type + */ + public function deleteOption($object, $object_id = 0){ + return aam_Core_API::deleteBlogOption( + $this->getOptionName($object, $object_id) + ); + } + + /** + * + * @param type $object + * @param type $object_id + * @return type + */ + protected function getOptionName($object, $object_id){ + return 'aam_' . self::UID . "_{$object}" . ($object_id ? "_{$object_id}" : ''); + } + + /** + * @inheritdoc + */ + public function hasFlag($flag) { + $option = 'aam_' . self::UID . "_{$flag}"; + return aam_Core_API::getBlogOption($option); + } + + /** + * @inheritdoc + */ + public function setFlag($flag, $value = true) { + $option = 'aam_' . self::UID . "_{$flag}"; + if ($value === true){ + aam_Core_API::updateBlogOption($option, $value); + } else { + aam_Core_API::deleteBlogOption($option); + } + } + + /** + * + * @return type + */ + public function getUID(){ + return self::UID; + } + + /** + * Get Visitor's Cache + * + * Read Visitor's option aam_visitor_cache and return it + * + * @return array + * + * @access public + */ + public function readCache(){ + $cache = aam_Core_API::getBlogOption('aam_visitor_cache', array()); + + return (is_array($cache) ? $cache : array()); + } + + /** + * Insert or Update Visitor's Cache + * + * @return boolean + * + * @access public + */ + public function updateCache(){ + return aam_Core_API::updateBlogOption( + 'aam_visitor_cache', $this->getObjects() + ); + } + + /** + * Delete Visitor's Cache + * + * @return boolean + * + * @access public + */ + public function clearCache(){ + return aam_Core_API::deleteBlogOption('aam_visitor_cache'); + } + + /** + * @inheritdoc + */ + public function clearAllOptions(){ + global $wpdb; + + $mask = 'aam_%_' . self::UID; + //clear postmeta data + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '{$mask}'"); + + //clear all settings in options table + //TODO - convert mask to the standart aam_%_[subject] + $mask = 'aam_' . self::UID . '_%'; + $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '{$mask}'"); + + $this->clearCache(); //delete cache + //clear modifield flag + $this->setFlag(aam_Control_Subject::FLAG_MODIFIED, false); + + do_action('aam_clear_all_options', $this); + } + + /** + * @inheritdoc + */ + public function getParentSubject(){ + return null; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/api.php b/wp-content/plugins/advanced-access-manager/application/core/api.php new file mode 100644 index 0000000..853b82a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/api.php @@ -0,0 +1,215 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +final class aam_Core_API { + + /** + * Get current blog's option + * + * @param string $option + * @param mixed $default + * @param int $blog_id; + * + * @return mixed + * + * @access public + * @static + */ + public static function getBlogOption($option, $default = FALSE, $blog_id = null) { + if (is_multisite()) { + $blog = (is_null($blog_id) ? get_current_blog_id() : $blog_id); + $response = get_blog_option($blog, $option, $default); + } else { + $response = get_option($option, $default); + } + + return $response; + } + + /** + * Update Blog Option + * + * @param string $option + * @param mixed $data + * @param int $blog_id + * + * @return bool + * + * @access public + * @static + */ + public static function updateBlogOption($option, $data, $blog_id = null) { + if (is_multisite()) { + $blog = (is_null($blog_id) ? get_current_blog_id() : $blog_id); + $response = update_blog_option($blog, $option, $data); + } else { + $response = update_option($option, $data); + } + + return $response; + } + + /** + * Delete Blog Option + * + * @param string $option + * @param int $blog_id + * + * @return bool + * + * @access public + * @static + */ + public static function deleteBlogOption($option, $blog_id = null) { + if (is_multisite()) { + $blog = (is_null($blog_id) ? get_current_blog_id() : $blog_id); + $response = delete_blog_option($blog, $option); + } else { + $response = delete_option($option); + } + + return $response; + } + + /** + * Initiate HTTP request + * + * @param string $url Requested URL + * @param bool $send_cookies Wheather send cookies or not + * @param bool $return_content Return content or not + * @return bool Always return TRUE + */ + public static function cURL($url, $send_cookies = TRUE, $return_content = FALSE) { + $header = array( + 'User-Agent' => aam_Core_Request::server('HTTP_USER_AGENT') + ); + + $cookies = array(); + if (is_array($_COOKIE) && $send_cookies) { + foreach ($_COOKIE as $key => $value) { + //SKIP PHPSESSID - some servers does not like it for security reason + if ($key !== 'PHPSESSID') { + $cookies[] = new WP_Http_Cookie(array( + 'name' => $key, + 'value' => $value + )); + } + } + } + + $res = wp_remote_request($url, array( + 'headers' => $header, + 'cookies' => $cookies, + 'timeout' => 5) + ); + + if (is_wp_error($res)) { + $result = array( + 'status' => 'error', + 'url' => $url + ); + } else { + $result = array('status' => 'success'); + if ($return_content) { + $result['content'] = $res['body']; + } + } + + return $result; + } + + /** + * Check whether it is Multisite Network panel + * + * @return boolean + * + * @access public + */ + public static function isNetworkPanel() { + return (is_multisite() && is_network_admin() ? TRUE : FALSE); + } + + /** + * Check if SSL is used + * + * @return boolean + * + * @access public + * @static + */ + public static function isSSL() { + if (force_ssl_admin()) { + $response = true; + } elseif (aam_Core_Request::server('HTTPS')) { + $response = true; + } elseif (aam_Core_Request::server('REQUEST_SCHEME') == 'https') { + $response = true; + } else { + $response = false; + } + + return $response; + } + + /** + * Get User Capability Level + * + * Iterate throught User Capabilities and find out the higher User Level + * + * @param WP_User $user + * + * @return int + * + * @access public + * @static + */ + public static function getUserLevel(WP_User $user = null){ + if (is_null($user) ){ + $user = wp_get_current_user(); + } + + $caps = $user->allcaps; + //get users highest level + $level = 0; + do { + $level++; + } while (isset($caps["level_{$level}"]) && $caps["level_{$level}"]); + + return $level - 1; + } + + /** + * Check if current user is super admin + * + * Super admin is someone who is allowed to manage all roles and users. This + * user is defined in ConfigPress parameter aam.super_admin + * + * @return boolean + * + * @access public + * @static + */ + public static function isSuperAdmin(){ + if (is_multisite()){ + $response = is_super_admin(); + } else { + $super_admin = aam_Core_ConfigPress::getParam('aam.super_admin', 0); + $response = ($super_admin == get_current_user_id() ? true : false); + } + + return $response; + } +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/configpress.php b/wp-content/plugins/advanced-access-manager/application/core/configpress.php new file mode 100644 index 0000000..e9ca84f --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/configpress.php @@ -0,0 +1,164 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +final class aam_Core_ConfigPress { + + /** + * Parsed ConfigPress from the file + * + * @var Zend_Config_Ini + * + * @access private + * @static + */ + private static $_config = null; + + /** + * Read ConfigPress File content + * + * @return string + * + * @access public + * @static + */ + public static function read() { + $filename = aam_Core_API::getBlogOption('aam_configpress', ''); + if ($filename && file_exists(AAM_TEMP_DIR . $filename)) { + $content = file_get_contents(AAM_TEMP_DIR . $filename); + } else { + $content = ''; + } + + return $content; + } + + /** + * Write ConfigPres to file + * + * @param string $content + * + * @return boolean + * + * @access public + * @static + */ + public static function write($content) { + if (is_writable(AAM_TEMP_DIR)) { + $filename = aam_Core_API::getBlogOption('aam_configpress', ''); + //file already was created and name is valid + if (preg_match('/^[a-z0-9]{40}$/i', $filename) === 0) { + $filename = sha1(uniqid('aam')); + aam_Core_API::updateBlogOption('aam_configpress', $filename); + } + $response = file_put_contents( + AAM_TEMP_DIR . $filename, stripcslashes($content) + ); + } else { + $response = false; + } + + return $response; + } + + /** + * Get ConfigPress parameter + * + * @param string $param + * @param mixed $default + * + * @return mixed + * + * @access public + * @static + */ + public static function getParam($param, $default = null) { + //initialize the ConfigPress if empty + if (is_null(self::$_config)) { + $filename = aam_Core_API::getBlogOption('aam_configpress', ''); + if ($filename && file_exists(AAM_TEMP_DIR . $filename)) { + //parse the file content & create Config INI Object + self::parseConfig(AAM_TEMP_DIR . $filename); + } + } + + //find the parameter + $tree = self::$_config; + foreach (explode('.', $param) as $section) { + if (isset($tree->{$section})) { + $tree = $tree->{$section}; + } else { + $tree = $default; + break; + } + } + + return self::parseParam($tree, $default); + } + + /** + * Parse found parameter + * + * @param mixed $param + * @param mixed $default + * + * @return mixed + * + * @access protected + * @static + */ + protected static function parseParam($param, $default) { + if (is_object($param) && isset($param->userFunc)) { + $func = trim($param->userFunc); + if (is_string($func) && is_callable($func)) { + $response = call_user_func($func); + } else { + $response = $default; + } + } else { + $response = $param; + } + + return $response; + } + + /** + * Parse ConfigPress file and create an object + * + * @param string $filename + * + * @return void + * + * @access protected + * @static + */ + protected static function parseConfig($filename) { + //include third party library + if (!class_exists('Zend_Config')) { + require_once(AAM_LIBRARY_DIR . 'Zend/Exception.php'); + require_once(AAM_LIBRARY_DIR . 'Zend/Config/Exception.php'); + require_once(AAM_LIBRARY_DIR . 'Zend/Config.php'); + require_once(AAM_LIBRARY_DIR . 'Zend/Config/Ini.php'); + } + //parse ini file + try { + self::$_config = new Zend_Config_Ini($filename); + } catch (Zend_Config_Exception $e) { + //do nothing + } + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/console.php b/wp-content/plugins/advanced-access-manager/application/core/console.php new file mode 100644 index 0000000..4cbaacd --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/console.php @@ -0,0 +1,71 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Core_Console { + + /** + * List of Runtime errors related to AAM + * + * @var array + * + * @access private + * @static + */ + private static $_warnings = array(); + + /** + * Add new warning + * + * @param string $message + * + * @return void + * + * @access public + * @static + */ + public static function add($message) { + self::$_warnings[] = $message; + } + + /** + * Check if there is any warning during execution + * + * @return boolean + * + * @access public + * @static + */ + public static function hasIssues() { + return (count(self::$_warnings) ? true : false); + } + + /** + * Get list of all warnings + * + * @return array + * + * @access public + * @static + */ + public static function getWarnings() { + return self::$_warnings; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/extension.php b/wp-content/plugins/advanced-access-manager/application/core/extension.php new file mode 100644 index 0000000..b8df1a1 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/extension.php @@ -0,0 +1,89 @@ + + * @copyright Copyright C 2014 Vasyl Martyniuk + */ +class AAM_Core_Extension { + + /** + * Parent AAM object + * + * @var aam + * + * @access public + */ + private $_parent = null; + + /** + * Constructor + * + * @param aam $parent + * + * @return void + * + * @access public + */ + public function __construct(aam $parent) { + $this->setParent($parent); + } + + /** + * Activate hook + * + * @return boolean + * + * @access public + */ + public function activate(){ + return true; + } + + /** + * Set Parent Object + * + * This is reference to main AAM class + * + * @param aam $parent + * + * @return void + * + * @access public + */ + public function setParent(aam $parent) { + $this->_parent = $parent; + } + + /** + * Get Parent Object + * + * @return aam + * + * @access public + */ + public function getParent() { + return $this->_parent; + } + + /** + * Get current User + * + * @return aam_Control_Subject_User + * + * @access public + */ + public function getUser() { + return $this->getParent()->getUser(); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/repository.php b/wp-content/plugins/advanced-access-manager/application/core/repository.php new file mode 100644 index 0000000..d2ebb76 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/repository.php @@ -0,0 +1,393 @@ + + * @copyright Copyright C 2014 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Core_Repository { + + /** + * Single instance of itself + * + * @var aam_Core_Repository + * + * @access private + * @static + */ + private static $_instance = null; + + /** + * Extension repository + * + * @var array + * + * @access private + */ + private $_repository = array(); + + /** + * Basedir to Extentions repository + * + * @var string + * + * @access private + */ + private $_basedir = ''; + + /** + * Extension list cache + * + * @var array + * + * @access private + */ + private $_cache = array(); + + /** + * Repository Errors + * + * @var array + * + * @access private + */ + private $_errors = array(); + + /** + * Main AAM class + * + * @var aam + * + * @access private + */ + private $_parent; + + /** + * Consturctor + * + * @return void + * + * @access protected + */ + protected function __construct(aam $parent = null) { + $this->setParent($parent); + $this->_basedir = AAM_BASE_DIR . 'extension'; + //retrieve list of extensions from the database + $repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1); + if (is_array($repository)){ + $this->_repository = $repository; + } + } + + /** + * Get single instance of itself + * + * @param aam $parent + * + * @return aam_Core_Repository + * + * @access public + * @static + */ + public static function getInstance(aam $parent = null){ + if (is_null(self::$_instance)){ + self::$_instance = new self($parent); + } + + return self::$_instance; + } + + /** + * Load active extensions + * + * @return void + * + * @access public + */ + public function load() { + //iterate through each active extension and load it + foreach (scandir($this->_basedir) as $module) { + if (!in_array($module, array('.', '..'))) { + $status = aam_Core_ConfigPress::getParam( + "aam.extension.{$module}.status" + ); + if (strtolower($status) !== 'off'){ + $this->bootstrapExtension($module); + } + } + } + } + + /** + * Check if extensions exists + * + * @param string $extension + * + * @return boolean + * + * @access public + */ + public function hasExtension($extension){ + return file_exists( + $this->_basedir . '/' . $this->prepareExtFName($extension) + ); + } + + /** + * Check if license exists + * + * @param string $extension + * + * @return boolean + * + * @access public + */ + public function hasLicense($extension) { + return (isset($this->_repository[$extension]) ? true : false); + } + + /** + * Get Extension info + * + * @param string $ext + * + * @return stdClass + * + * @access public + */ + public function getLicense($ext){ + return ($this->hasLicense($ext) ? $this->_repository[$ext]->license : ''); + } + + /** + * Download extension from the external server + * + * @return void + * + * @access public + */ + public function download() { + $this->initFilesystem(); + $repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1); + + if (is_array($repository)) { + //get the list of extensions + foreach ($repository as $data) { + $this->retrieve($data->license); + } + aam_Core_API::updateBlogOption('aam_extensions', $repository, 1); + } + } + + /** + * Add new extension to repository + * + * @param string $extension + * @param string $license + * + * @return boolean + * + * @access public + */ + public function add($extension, $license){ + $this->initFilesystem(); + $repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1); + + if ($this->retrieve($license)){ + $repository[$extension] = (object) array( + 'license' => $license + ); + aam_Core_API::updateBlogOption('aam_extensions', $repository, 1); + $response = true; + } else { + $response = false; + } + + return $response; + } + + /** + * Remove Extension from the repository + * + * @param string $extension + * + * @return boolean + * + * @access public + */ + public function remove($extension){ + global $wp_filesystem; + + $repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1); + + //if extension has been downloaded as part of dev license, it'll be + //not present in the repository list + if (isset($repository[$extension])){ + unset($repository[$extension]); + aam_Core_API::updateBlogOption('aam_extensions', $repository, 1); + } + + if ($this->hasExtension($extension)){ + $this->initFilesystem(); + $wp_filesystem->rmdir( + $this->_basedir . '/' . $this->prepareExtFName($extension), true + ); + } + + return true; + } + + /** + * + * @param type $extension + * @return type + */ + protected function prepareExtFName($extension) { + return str_replace(' ', '_', $extension); + } + + /** + * Initialize WordPress filesystem + * + * @return void + * + * @access protected + */ + protected function initFilesystem(){ + require_once ABSPATH . 'wp-admin/includes/file.php'; + + //initialize Filesystem + WP_Filesystem(); + } + + /** + * Retrieve extension based on license key + * + * @global WP_Filesystem $wp_filesystem + * @param string $license + * + * @return boolean + * + * @access protected + */ + protected function retrieve($license) { + global $wp_filesystem; + + $url = WPAAM_REST_API . '?method=exchange&license=' . $license; + $res = wp_remote_request($url, array('timeout' => 10)); + $response = false; + if (!is_wp_error($res)) { + //write zip archive to the filesystem first + $zip = AAM_TEMP_DIR . '/' . uniqid(); + $content = base64_decode($res['body']); + if ($content && $wp_filesystem->put_contents($zip, $content)) { + $response = $this->insert($zip); + $wp_filesystem->delete($zip); + } elseif (empty($content)){ + $this->addError(__('Invalid License Key', 'aam')); + } else { + $this->addError( + __('Failed to write file to wp-content/aam folder', 'aam') + ); + } + } else { + $this->addError(__('Failed to reach the WPAAM Server', 'aam')); + } + + return $response; + } + + /** + * + * @param type $zip + * @return boolean + */ + protected function insert($zip) { + $response = true; + if (is_wp_error(unzip_file($zip, $this->_basedir))) { + $response = false; + $this->addError( + __('Failed to insert extension to extension folder', 'aam') + ); + } + + return $response; + } + + /** + * Bootstrap the Extension + * + * In case of any errors, the output can be found in console + * + * @param string $extension + * + * @return void + * + * @access protected + */ + protected function bootstrapExtension($extension) { + $bootstrap = $this->_basedir . "/{$extension}/index.php"; + if (file_exists($bootstrap) && !isset($this->_cache[$extension])) { + //bootstrap the extension + $this->_cache[$extension] = require_once($bootstrap); + $this->_cache[$extension]->activate(); + } + } + + /** + * Set Parent class + * + * @param aam $parent + * + * @return void + * + * @access public + */ + public function setParent($parent){ + $this->_parent = $parent; + } + + /** + * Get Parent class + * + * @return aam + * + * @access public + */ + public function getParent(){ + return $this->_parent; + } + + /** + * Add error + * + * @param string $message + * + * @access public + */ + public function addError($message){ + $this->_errors[] = $message; + } + + /** + * Get all errors + * + * @return array + * + * @access public + */ + public function getErrors(){ + return $this->_errors; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/request.php b/wp-content/plugins/advanced-access-manager/application/core/request.php new file mode 100644 index 0000000..1dc45fe --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/request.php @@ -0,0 +1,110 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Core_Request { + + /** + * Get parameter from global _GET array + * + * @param string $param GET Parameter + * @param mixed $default Default value + * + * @return mixed + * + * @access public + */ + public static function get($param = null, $default = null) { + return self::readArray($_GET, $param, $default); + } + + /** + * Get parameter from global _POST array + * + * @param string $param POST Parameter + * @param mixed $default Default value + * + * @return mixed + * + * @access public + */ + public static function post($param = null, $default = null) { + return self::readArray($_POST, $param, $default); + } + + /** + * Get parameter from global _REQUEST array + * + * @param string $param REQUEST Parameter + * @param mixed $default Default value + * + * @return mixed + * + * @access public + * @static + */ + public static function request($param = null, $default = null) { + return self::readArray($_REQUEST, $param, $default); + } + + /** + * Get parameter from global _SERVER array + * + * @param string $param SERVER Parameter + * @param mixed $default Default value + * + * @return mixed + * + * @access public + * @static + */ + public static function server($param = null, $default = null) { + return self::readArray($_SERVER, $param, $default); + } + + /** + * Check array for specified parameter and return the it's value or + * default one + * + * @param array &$array Global array _GET, _POST etc + * @param string $param Array Parameter + * @param mixed $default Default value + * + * @return mixed + * + * @access protected + * @static + */ + protected static function readArray(&$array, $param, $default) { + $value = $default; + if (is_null($param)) { + $value = $array; + } else { + $chunks = explode('.', $param); + $value = $array; + foreach ($chunks as $chunk) { + if (isset($value[$chunk])) { + $value = $value[$chunk]; + } else { + $value = $default; + break; + } + } + } + + return $value; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/settings.php b/wp-content/plugins/advanced-access-manager/application/core/settings.php new file mode 100644 index 0000000..58e0c1a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/settings.php @@ -0,0 +1,89 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +final class aam_Core_Settings { + + /** + * Collection of settings + * + * @var array + * + * @access private + * @static + */ + private static $_collection = array(); + + /** + * Get Setting + * + * @param string $setting + * @param mixed $default + * + * @return mixed + * + * @access public + * @static + */ + public static function get($setting, $default = null) { + if (empty(self::$_collection)) { + self::init(); + } + + if (isset(self::$_collection[$setting])) { + $response = self::$_collection[$setting]; + } else { + $response = $default; + } + + return apply_filters('aam_core_setting', $response, $setting); + } + + /** + * Initialize all core & default settings + * + * @return void + * + * @access protected + * @static + */ + protected static function init() { + //initialize default posts & terms restrictions + self::$_collection['term_frontend_restrictions'] = array( + aam_Control_Object_Term::ACTION_BROWSE, + aam_Control_Object_Term::ACTION_EXCLUDE, + aam_Control_Object_Term::ACTION_LIST + ); + self::$_collection['term_backend_restrictions'] = array( + aam_Control_Object_Term::ACTION_BROWSE, + aam_Control_Object_Term::ACTION_EDIT, + aam_Control_Object_Term::ACTION_LIST + ); + self::$_collection['post_frontend_restrictions'] = array( + aam_Control_Object_Post::ACTION_READ, + aam_Control_Object_Post::ACTION_EXCLUDE, + aam_Control_Object_Post::ACTION_COMMENT + ); + self::$_collection['post_backend_restrictions'] = array( + aam_Control_Object_Post::ACTION_TRASH, + aam_Control_Object_Post::ACTION_DELETE, + aam_Control_Object_Post::ACTION_EDIT + ); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/core/update.php b/wp-content/plugins/advanced-access-manager/application/core/update.php new file mode 100644 index 0000000..846e775 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/core/update.php @@ -0,0 +1,147 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +final class aam_Core_Update { + + /** + * Reference to AAM + * + * @var aam + * + * @access private + */ + + private $_parent = null; + /** + * List of stages + * + * @var array + * + * @access private + */ + private $_stages = array(); + + /** + * Constructoor + * + * @return void + * + * @access public + */ + public function __construct($parent) { + $this->_parent = $parent; + //register update stages + $this->_stages = apply_filters('aam_update_stages', array( + array($this, 'downloadRepository'), + array($this, 'flashCache'), + array($this, 'updateFlag') + )); + } + + /** + * Run the update if necessary + * + * @return void + * + * @access public + */ + public function run() { + foreach ($this->_stages as $stage) { + //break the change if any stage failed + if (call_user_func($stage) === false) { + break; + } + } + } + + /** + * Download the Extension Repository + * + * This forces the system to retrieve the new set of extensions based on + * license key + * + * @return boolean + * + * @access public + */ + public function downloadRepository() { + $response = true; + if ($extensions = aam_Core_API::getBlogOption('aam_extensions')) { + if (is_array($extensions)){ + $repo = aam_Core_Repository::getInstance($this->_parent); + $repo->download(); + } + } + + return $response; + } + + /** + * Flash all cache + * + * @return boolean + * + * @access public + */ + public function flashCache(){ + global $wpdb; + + //clear visitor's cache first + if (is_multisite()) { + //get all sites first and iterate through each + $query = 'SELECT blog_id FROM ' . $wpdb->blogs; + $blog_list = $wpdb->get_results($query); + if (is_array($blog_list)) { + $query = 'DELETE FROM %s WHERE `option_name` = "aam_%s_cache"'; + foreach ($blog_list as $blog) { + $wpdb->query( + sprintf( + $query, + $wpdb->get_blog_prefix($blog->blog_id) . 'options', + aam_Control_Subject_Visitor::UID + ) + ); + } + } + } else { + $query = 'DELETE FROM ' . $wpdb->options . ' '; + $query .= 'WHERE `option_name` = "aam_' . aam_Control_Subject_Visitor::UID . '_cache"'; + $wpdb->query($query); + } + + //clear users cache + $query = 'DELETE FROM ' . $wpdb->usermeta . ' '; + $query .= 'WHERE `meta_key` = "aam_cache"'; + $wpdb->query($query); + + return true; + } + + /** + * Change the Update flag + * + * This will stop to run the update again + * + * @return boolean + * + * @access public + */ + public function updateFlag() { + return aam_Core_API::updateBlogOption('aam_updated', AAM_VERSION, 1); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/abstract.php b/wp-content/plugins/advanced-access-manager/application/view/abstract.php new file mode 100644 index 0000000..e9419a4 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/abstract.php @@ -0,0 +1,148 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +abstract class aam_View_Abstract { + + /** + * Current Subject + * + * @var aam_Control_Subject + * + * @access private + */ + static private $_subject = null; + + /** + * Construct the Object + * + * Instantiate the subject one type that is going to be shared with all view + * models. + * + * @return void + * + * @access public + */ + public function __construct() { + if (is_null(self::$_subject)) { + $subject_class = 'aam_Control_Subject_' . ucfirst( + trim(aam_Core_Request::request('subject'), '') + ); + if (class_exists($subject_class)){ + $this->setSubject(new $subject_class( + aam_Core_Request::request('subject_id') + )); + //check if view for current subject can be managed + $this->isManagable(); + } + } + + //control default option list + add_filter('aam_default_option_list', array($this, 'defaultOption')); + } + + /** + * Check if view can be managed + * + * @return void + * + * @access public + * @throw Exception You are not allowed to manage current view + */ + public function isManagable(){ + if ($this->getSubject()->getUID() == aam_Control_Subject_Role::UID){ + $caps = $this->getSubject()->capabilities; + } elseif ($this->getSubject()->getUID == aam_Control_Subject_User::UID){ + //AAM does not support multi-roles. Get only one first role + $roles = $this->getSubject()->roles; + $caps = get_role(array_shift($roles))->capabilities; + } else { + $caps = apply_filters('aam_managable_capabilities', null, $this); + } + + if ($caps && !aam_Core_API::isSuperAdmin()){ + //get user's highest level + $level = aam_Core_API::getUserLevel(); + if (!empty($caps['level_' . $level]) && $caps['level_' . $level]){ + Throw new Exception( + __('You are not allowed to manager current view', 'aam') + ); + } + } + + return true; + } + + /** + * Control default set of options + * + * This is very important function. It control the default option for each + * feature. It covers the scenario when the set of UI options is represented by + * checkboxes. + * + * @param array $options + * + * @return array + * + * @access public + */ + public function defaultOption($options){ + return $options; + } + + /** + * Get Subject + * + * @return aam_Control_Subject + * + * @access public + */ + public function getSubject() { + return self::$_subject; + } + + /** + * Set Subject + * + * @param aam_Control_Subject $subject + * + * @return void + * + * @access public + */ + public function setSubject(aam_Control_Subject $subject) { + self::$_subject = $subject; + } + + /** + * Load View template + * + * @param string $tmpl_path + * + * @return string + * + * @access public + */ + public function loadTemplate($tmpl_path) { + ob_start(); + require_once($tmpl_path); + $content = ob_get_contents(); + ob_end_clean(); + + return $content; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/capability.php b/wp-content/plugins/advanced-access-manager/application/view/capability.php new file mode 100644 index 0000000..8b60200 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/capability.php @@ -0,0 +1,225 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Capability extends aam_View_Abstract { + + /** + * + * @var type + */ + private $_groups = array( + 'system' => array( + 'level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5', + 'level_6', 'level_7', 'level_8', 'level_9', 'level_10' + ), + 'post' => array( + 'delete_others_pages', 'delete_others_posts', 'delete_pages', + 'delete_posts', 'delete_private_pages', 'delete_private_posts', + 'delete_published_pages', 'delete_published_posts', 'edit_others_pages', + 'edit_others_posts', 'edit_pages', 'edit_private_posts', + 'edit_private_pages', 'edit_posts', 'edit_published_pages', + 'edit_published_posts', 'publish_pages', 'publish_posts', 'read', + 'read_private_pages', 'read_private_posts', 'edit_permalink' + ), + 'backend' => array( + 'aam_manage', 'activate_plugins', 'add_users', 'create_users', + 'delete_users', 'delete_themes', 'edit_dashboard', 'edit_files', + 'edit_plugins', 'edit_theme_options', 'edit_themes', 'edit_users', + 'export', 'import', 'install_plugins', 'install_themes', 'list_users', + 'manage_options', 'manage_links', 'manage_categories', 'promote_users', + 'unfiltered_html', 'unfiltered_upload', 'update_themes', 'update_plugins', + 'update_core', 'upload_files', 'delete_plugins', 'remove_users', + 'switch_themes' + ) + ); + + /** + * + * @return type + */ + public function retrieveList() { + $response = array( + 'aaData' => array(), + 'aaDefault' => 1 //Default set of Capabilities indicator + ); + + $subject = $this->getSubject(); + $roles = new WP_Roles(); + if ($subject->getUID() === aam_Control_Subject_Role::UID) { + //prepare list of all capabilities + $caps = array(); + foreach ($roles->role_objects as $role) { + $caps = array_merge($caps, $role->capabilities); + } + //init all caps + foreach ($caps as $capability => $grant) { + $response['aaData'][] = array( + $capability, + ($subject->hasCapability($capability) ? 1 : 0), + $this->getGroup($capability), + $this->getHumanText($capability), + '' + ); + } + } else { + $role_list = $subject->roles; + $role = $roles->get_role(array_shift($role_list)); + foreach ($role->capabilities as $capability => $grant) { + $response['aaData'][] = array( + $capability, + ($subject->hasCapability($capability) ? 1 : 0), + $this->getGroup($capability), + $this->getHumanText($capability), + '' + ); + $response['aaDefault'] = ($subject->isDefaultCapSet() ? 1 : 0); + } + } + + return json_encode($response); + } + + /** + * + * @return type + */ + public function getGroupList(){ + return apply_filters('aam_capability_groups', array( + __('System', 'aam'), + __('Post & Page', 'aam'), + __('Backend Interface', 'aam'), + __('Miscellaneous', 'aam') + )); + } + + /** + * + * @return type + */ + public function retrieveRoleCapabilities() { + return json_encode(array( + 'status' => 'success', + 'capabilities' => $this->getSubject()->getCapabilities() + )); + } + + /** + * + * @return type + */ + public function addCapability() { + $roles = new WP_Roles(); + $capability = trim(aam_Core_Request::post('capability')); + $unfiltered = intval(aam_Core_Request::post('unfiltered')); + + if ($capability) { + if ($unfiltered){ + $normalized = $capability; + } else { + $normalized = str_replace(' ', '_', strtolower($capability)); + } + //add the capability to administrator's role as default behavior + $roles->add_cap('administrator', $normalized); + $response = array('status' => 'success', 'capability' => $normalized); + } else { + $response = array('status' => 'failure'); + } + + return json_encode($response); + } + + /** + * + * @return type + */ + public function deleteCapability() { + $roles = new WP_Roles(); + $capability = trim(aam_Core_Request::post('capability')); + + if ($capability) { + foreach ($roles->role_objects as $role) { + $role->remove_cap($capability); + } + $response = array('status' => 'success'); + } else { + $response = array('status' => 'failure'); + } + + return json_encode($response); + } + + /** + * Restore default user capabilities + * + * @return string + * + * @access public + */ + public function restoreCapability(){ + $subject = $this->getSubject(); + $response = array('status' => 'failure'); + if (($subject->getUID() == aam_Control_Subject_User::UID) + && $subject->resetCapability()){ + $response['status'] = 'success'; + } + + return json_encode($response); + } + + /** + * + * @param type $text + * @return type + */ + protected function getHumanText($text) { + $parts = preg_split('/_/', $text); + if (is_array($parts)) { + foreach ($parts as &$part) { + $part = ucfirst($part); + } + } + + return implode(' ', $parts); + } + + /** + * + * @param type $capability + * @return type + */ + protected function getGroup($capability) { + if (in_array($capability, $this->_groups['system'])) { + $response = __('System', 'aam'); + } elseif (in_array($capability, $this->_groups['post'])) { + $response = __('Post & Page', 'aam'); + } elseif (in_array($capability, $this->_groups['backend'])) { + $response = __('Backend Interface', 'aam'); + } else { + $response = __('Miscellaneous', 'aam'); + } + + return apply_filters('aam_capability_group', $response, $capability); + } + + /** + * + * @return type + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/capability.phtml'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/collection.php b/wp-content/plugins/advanced-access-manager/application/view/collection.php new file mode 100644 index 0000000..e13f7bb --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/collection.php @@ -0,0 +1,285 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Collection { + + /** + * Collection of subjects + * + * @var array + * + * @access private + * @static + */ + static private $_subjects = array(); + + /** + * Collection of features + * + * @var array + * + * @access private + * @static + */ + static private $_features = array(); + + /** + * Register Subject + * + * @param stdClass $subject + * + * @return boolean + * + * @access public + * @static + */ + public static function registerSubject(stdClass $subject) { + self::$_subjects[] = $subject; + + return true; + } + + /** + * Register UI Feature + * + * @param stdClass $feature + * + * @return boolean + * + * @access public + * @static + */ + public static function registerFeature(stdClass $feature) { + $response = false; + + if (empty($feature->capability)){ + $cap = aam_Core_ConfigPress::getParam( + 'aam.default_feature_capability', 'administrator' + ); + } else { + $cap = $feature->capability; + } + + if (self::accessGranted($feature->uid, $cap)) { + self::$_features[] = $feature; + $response = true; + } + + return $response; + } + + /** + * Check if feature registered + * + * If feature is restricted for current user or it does not exist, this function + * will return false result + * + * @param string $search + * + * @return boolean + * + * @access public + * @static + */ + public static function hasFeature($search){ + $found = false; + foreach(self::$_features as $feature){ + if ($feature->uid == $search){ + $found = true; + break; + } + } + + return $found; + } + + /** + * Check if subject is registered + * + * @param string $search + * + * @return boolean + * + * @access public + * @static + */ + public static function hasSubject($search){ + $found = false; + foreach(self::$_subjects as $subject){ + if ($subject->uid == $search){ + $found = true; + break; + } + } + + return $found; + } + + /** + * Get initiated feature + * + * Find the feature in the collection of registered features and initiate it if + * was not initiated already + * + * @param string $search + * @return boolean + */ + public static function getFeature($search){ + $response = null; + foreach(self::$_features as $feature){ + if ($feature->uid == $search){ + $response = self::initController($feature); + break; + } + } + + return $response; + } + + /** + * Get initiated subject + * + * Find the subject in the collection of registered subjects and initiate it if + * was not initiated already + * + * @param string $search + * @return boolean + */ + public static function getSubject($search){ + $response = null; + foreach(self::$_subjects as $subject){ + if ($subject->uid == $search){ + $response = self::initController($subject); + break; + } + } + + return $response; + } + + /** + * Initiate the Controller + * + * @param stdClass $feature + * + * @return stdClass + * + * @access public + * @static + */ + public static function initController(stdClass $feature){ + if (is_string($feature->controller)){ + $feature->controller = new $feature->controller; + } + + return $feature; + } + + /** + * Retrieve subjects + * + * @return array + * + * @access public + * @static + */ + public static function retrieveSubjects() { + $subjects = self::$_subjects; //keep originally copy + usort($subjects, 'aam_View_Collection::positionOrder'); + + //initiate controller + foreach($subjects as $subject){ + self::initController($subject); + } + + return $subjects; + } + + /** + * Retrieve list of features + * + * Retrieve sorted list of featured based on current subject + * + * @param aam_Control_Subject $subject + * + * @return array + * + * @access public + * @static + */ + public static function retriveFeatures(aam_Control_Subject $subject) { + $response = array(); + + foreach (self::$_features as $feature) { + if (in_array($subject->getUID(), $feature->subjects)) { + $response[] = self::initController($feature); + } + } + usort($response, 'aam_View_Collection::positionOrder'); + + return $response; + } + + /** + * Check if current user can use feature + * + * Make sure that current user has enough capabilities to use feature + * + * @param string $feature + * @param string $cap + * + * @return boolean + * + * @access protected + * @static + */ + protected static function accessGranted($feature, $cap = 'administrator') { + $capability = aam_Core_ConfigPress::getParam( + "aam.feature.{$feature}.capability", $cap + ); + + return current_user_can($capability); + } + + /** + * Order list of features or subjectes + * + * Reorganize the list based on "position" attribute + * + * @param array $features + * + * @return array + * + * @access public + * @static + */ + public static function positionOrder($feature_a, $feature_b){ + $pos_a = (empty($feature_a->position) ? 9999 : $feature_a->position); + $pos_b = (empty($feature_b->position) ? 9999 : $feature_b->position); + + if ($pos_a == $pos_b){ + $response = 0; + } else { + $response = ($pos_a < $pos_b ? -1 : 1); + } + + return $response; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/configpress.php b/wp-content/plugins/advanced-access-manager/application/view/configpress.php new file mode 100644 index 0000000..2698b4f --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/configpress.php @@ -0,0 +1,30 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_ConfigPress extends aam_View_Abstract { + + /** + * Run the Manager + * + * @return string + * + * @access public + */ + public function run() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/configpress.phtml'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/event.php b/wp-content/plugins/advanced-access-manager/application/view/event.php new file mode 100644 index 0000000..47062f4 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/event.php @@ -0,0 +1,83 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Event extends aam_View_Abstract { + + /** + * + * @return type + */ + public function retrieveEventList() { + $response = array('aaData' => array()); + $events = $this->getSubject()->getObject(aam_Control_Object_Event::UID); + foreach ($events->getOption() as $event) { + $response['aaData'][] = array( + $event['event'], + $event['event_specifier'], + $event['post_type'], + $event['action'], + $event['action_specifier'], + '' + ); + } + + return json_encode($response); + } + + /** + * + * @global type $wp_post_statuses + * @return type + */ + public function getPostStatuses() { + global $wp_post_statuses; + + return $wp_post_statuses; + } + + /** + * + * @global type $wp_post_types + * @return type + */ + public function getPostTypes() { + global $wp_post_types; + + return $wp_post_types; + } + + /** + * + * @return type + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/event.phtml'); + } + + /** + * @inheritdoc + */ + public function defaultOption($options) { + //make sure that some parts are always in place + if (!isset($options[aam_Control_Object_Event::UID])) { + $options[aam_Control_Object_Event::UID] = array(); + } + + return $options; + } + + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/extension.php b/wp-content/plugins/advanced-access-manager/application/view/extension.php new file mode 100644 index 0000000..da2707d --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/extension.php @@ -0,0 +1,115 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Extension extends aam_View_Abstract { + + /** + * Extensions Repository + * + * @var aam_Core_Repository + * + * @access private + */ + private $_repository; + + /** + * Constructor + * + * The filter "aam_cpanel" can be used to control the Control Panel items. + * + * @return void + * + * @access public + */ + public function __construct() { + parent::__construct(); + $this->_repository = aam_Core_Repository::getInstance(); + } + + /** + * Install extension + * + * @return string + * + * @access public + */ + public function install(){ + $license = aam_Core_Request::post('license'); + $ext = aam_Core_Request::post('extension'); + + if ($license && $this->getRepository()->add($ext, $license)){ + $response = array('status' => 'success'); + } else { + $response = array( + 'status' => 'failure', + 'reasons' => $this->getRepository()->getErrors() + ); + } + + return json_encode($response); + } + + /** + * Remove extension + * + * @return string + * + * @access public + */ + public function remove(){ + $license = aam_Core_Request::post('license'); + $ext = aam_Core_Request::post('extension'); + + if ($this->getRepository()->remove($ext, $license)){ + $response = array('status' => 'success'); + } else { + $response = array( + 'status' => 'failure', + 'reasons' => $this->getRepository()->getErrors() + ); + } + + return json_encode($response); + } + + /** + * Run the Manager + * + * @return string + * + * @access public + */ + public function run() { + //check if plugins/advanced-access-manager/extension is writable + if (!is_writable(AAM_BASE_DIR . 'extension')){ + aam_Core_Console::add(__( + 'Folder advanced-access-manager/extension is not writable', 'aam' + )); + } + + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/extension.phtml'); + } + + /** + * + * @return aam_Core_Respository + */ + public function getRepository(){ + return $this->_repository; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/help.php b/wp-content/plugins/advanced-access-manager/application/view/help.php new file mode 100644 index 0000000..9498e25 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/help.php @@ -0,0 +1,51 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Help extends aam_View_Abstract { + + /** + * Get View content + * + * @return string + * + * @access public + */ + public function content($screen) { + $basedir = dirname(__FILE__) . '/tmpl/'; + $screen->add_help_tab(array( + 'id' => 'faq', + 'title' => 'FAQ', + 'content' => $this->loadTemplate($basedir . 'help_faq.phtml') + )); + //add overview tab + $screen->add_help_tab(array( + 'id' => 'overview', + 'title' => 'Overview', + 'content' => $this->loadTemplate($basedir . 'help_overview.phtml') + )); + $screen->add_help_tab(array( + 'id' => 'extensions', + 'title' => 'Extensions', + 'content' => $this->loadTemplate($basedir . 'help_extensions.phtml') + )); + $screen->add_help_tab(array( + 'id' => 'developers', + 'title' => 'Developers', + 'content' => $this->loadTemplate($basedir . 'help_developers.phtml') + )); + } + +} diff --git a/wp-content/plugins/advanced-access-manager/application/view/manager.php b/wp-content/plugins/advanced-access-manager/application/view/manager.php new file mode 100644 index 0000000..892ffcf --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/manager.php @@ -0,0 +1,873 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Manager extends aam_View_Abstract { + + /** + * Admin Menu Feature + */ + const FEATURE_ADMIN_MENU = 'admin_menu'; + + /** + * Metaboxes & Widgetst Feature + */ + const FEATURE_METABOX = 'metabox'; + + /** + * Capability Feature + */ + const FEATURE_CAPABILITY = 'capability'; + + /** + * Post Access Feature + */ + const FEATURE_POST_ACCESS = 'post_access'; + + /** + * Event Manager Feature + */ + const FEATURE_EVENT_MANAGER = 'event_manager'; + + /** + * Default ajax response + */ + const DEFAULT_AJAX_RESPONSE = -1; + + /** + * Constructor + * + * The filter "aam_cpanel" can be used to control the Control Panel items. + * + * @return void + * + * @access public + */ + public function __construct() { + parent::__construct(); + + $this->registerDefaultSubjects(); + $this->registerDefaultFeatures(); + } + + /** + * Registet default list of subjects + * + * @return void + * + * @access protected + */ + protected function registerDefaultSubjects() { + aam_View_Collection::registerSubject((object)array( + 'position' => 5, + 'segment' => aam_Control_Subject_Role::UID, + 'label' => __('Roles', 'aam'), + 'title' => __('Role Manager', 'aam'), + 'class' => 'manager-item manager-item-role', + 'uid' => 'role', + 'controller' => 'aam_View_Role' + )); + + aam_View_Collection::registerSubject((object)array( + 'position' => 10, + 'segment' => aam_Control_Subject_User::UID, + 'label' => __('Users', 'aam'), + 'title' => __('User Manager', 'aam'), + 'class' => 'manager-item manager-item-user', + 'uid' => 'user', + 'controller' => 'aam_View_User' + )); + + aam_View_Collection::registerSubject((object)array( + 'position' => 15, + 'segment' => aam_Control_Subject_Visitor::UID, + 'label' => __('Visitor', 'aam'), + 'title' => __('Visitor Manager', 'aam'), + 'class' => 'manager-item manager-item-visitor', + 'uid' => 'visitor', + 'controller' => 'aam_View_Visitor' + )); + } + + /** + * Prepare default list of features + * + * Check if current user has proper capability to use the feature + * + * @return array + * + * @access protected + */ + protected function registerDefaultFeatures() { + $features = array(); + + //Main Menu Tab + aam_View_Collection::registerFeature((object)array( + 'uid' => self::FEATURE_ADMIN_MENU, + 'position' => 5, + 'title' => __('Admin Menu', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, aam_Control_Subject_User::UID + ), + 'controller' => 'aam_View_Menu' + )); + + + //Metaboxes & Widgets Tab + aam_View_Collection::registerFeature((object)array( + 'uid' => self::FEATURE_METABOX, + 'position' => 10, + 'title' => __('Metabox & Widget', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, + aam_Control_Subject_User::UID, + aam_Control_Subject_Visitor::UID + ), + 'controller' => 'aam_View_Metabox' + )); + + //Capability Tab + aam_View_Collection::registerFeature((object)array( + 'uid' => self::FEATURE_CAPABILITY, + 'position' => 15, + 'title' => __('Capability', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, aam_Control_Subject_User::UID + ), + 'controller' => 'aam_View_Capability' + )); + + //Posts & Pages Tab + aam_View_Collection::registerFeature((object)array( + 'uid' => self::FEATURE_POST_ACCESS, + 'position' => 20, + 'title' => __('Posts & Pages', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, + aam_Control_Subject_User::UID, + aam_Control_Subject_Visitor::UID + ), + 'controller' => 'aam_View_Post' + )); + + //Event Manager Tab + aam_View_Collection::registerFeature((object)array( + 'uid' => self::FEATURE_EVENT_MANAGER, + 'position' => 25, + 'title' => __('Event Manager', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, aam_Control_Subject_User::UID + ), + 'controller' =>'aam_View_Event' + )); + + return $features; + } + + /** + * Run the Manager + * + * @return string + * + * @access public + */ + public function run() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/manager.phtml'); + } + + /** + * Process the ajax call + * + * @return string + * + * @access public + */ + public function processAjax(){ + $sub_method = aam_Core_Request::request('sub_action'); + + if (method_exists($this, $sub_method)) { + $response = call_user_func(array($this, $sub_method)); + } else { + $response = apply_filters( + 'aam_ajax_call', self::DEFAULT_AJAX_RESPONSE, $this->getSubject() + ); + } + + return $response; + } + + /** + * Render the Main Control Area + * + * @return void + * + * @access public + */ + public function retrieveFeatures() { + $features = aam_View_Collection::retriveFeatures($this->getSubject()); + if (count($features)){ + ?> +
+ uid . '">'; + echo '' . $feature->title . '
'; + } + ?> + +
+ controller->content($this->getSubject()); + } + ?> +
+
+ '; + echo __('You are not allowed to manage any AAM Features.', 'aam'); + echo '

'; + } + do_action('aam_post_features_render'); + } + + /** + * Load List of Metaboxes + * + * @return string + * + * @access public + */ + public function loadMetaboxes(){ + if (aam_View_Collection::hasFeature(self::FEATURE_METABOX)){ + $metabox = new aam_View_Metabox; + $response = $metabox->retrieveList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Initialize list of metaboxes from individual link + * + * @return string + * + * @access public + */ + public function initLink(){ + if (aam_View_Collection::hasFeature(self::FEATURE_METABOX)){ + $metabox = new aam_View_Metabox; + $response = $metabox->initLink(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Retrieve Available for Editing Role List + * + * @return string + * + * @access public + */ + public function roleList(){ + if (aam_View_Collection::hasSubject(aam_Control_Subject_Role::UID)){ + $role = new aam_View_Role; + $response = $role->retrieveList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Retrieve Pure Role List + * + * @return string + * + * @access public + */ + public function plainRoleList(){ + if (aam_View_Collection::hasSubject(aam_Control_Subject_Role::UID)){ + $role = new aam_View_Role; + $response = $role->retrievePureList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Add New Role + * + * @return string + * + * @access public + */ + public function addRole() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_Role::UID)) { + $role = new aam_View_Role; + $response = $role->add(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Edit Existing Role + * + * @return string + * + * @access public + */ + public function editRole() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_Role::UID)) { + $role = new aam_View_Role; + $response = $role->edit(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Delete Existing Role + * + * @return string + * + * @access public + */ + public function deleteRole() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_Role::UID)) { + $role = new aam_View_Role; + $response = $role->delete(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Retrieve Available User List + * + * @return string + * + * @access public + */ + public function userList() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_User::UID)) { + $user = new aam_View_User; + $response = $user->retrieveList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Block Selected User + * + * @return string + * + * @access public + */ + public function blockUser() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_User::UID)) { + $user = new aam_View_User; + $response = $user->block(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Delete Selected User + * + * @return string + * + * @access public + */ + public function deleteList() + { + if (aam_View_Collection::hasSubject(aam_Control_Subject_User::UID)) { + $user = new aam_View_User; + $response = $user->delete(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Load list of capabilities + * + * @return string + * + * @access public + */ + public function loadCapabilities() + { + if (aam_View_Collection::hasFeature(self::FEATURE_CAPABILITY)){ + $capability = new aam_View_Capability; + $response = $capability->retrieveList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Get list of Capabilities by selected Role + * + * @return string + * + * @access public + */ + public function roleCapabilities() + { + if (aam_View_Collection::hasFeature(self::FEATURE_CAPABILITY)){ + $capability = new aam_View_Capability; + $response = $capability->retrieveRoleCapabilities(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Add New Capability + * + * @return string + * + * @access public + */ + public function addCapability() + { + if (aam_View_Collection::hasFeature(self::FEATURE_CAPABILITY)){ + $capability = new aam_View_Capability; + $response = $capability->addCapability(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Delete Capability + * + * @return string + * + * @access protected + */ + public function deleteCapability() + { + if (aam_View_Collection::hasFeature(self::FEATURE_CAPABILITY)){ + $capability = new aam_View_Capability; + $response = $capability->deleteCapability(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Restore Capabilities + * + * @return string + * + * @access public + */ + public function restoreCapabilities() + { + if (aam_View_Collection::hasFeature(self::FEATURE_CAPABILITY)){ + $capability = new aam_View_Capability; + $response = $capability->restoreCapability(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Get the List of Posts + * + * @return string + * + * @access public + */ + public function postList() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->retrievePostList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Get Post Tree + * + * @return string + * + * @access public + */ + public function postTree() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->getPostTree(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Save Access settings for Post or Term + * + * @return string + * + * @access public + */ + public function saveAccess() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->saveAccess(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Get Access settings for Post or Term + * + * @return string + * + * @access public + */ + public function getAccess() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->getAccess(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Restore default access level for Post or Term + * + * @return string + * + * @access public + */ + public function clearAccess() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->clearAccess(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Delete Post + * + * @return string + * + * @access public + */ + public function deletePost() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->deletePost(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Prepare and generate the post breadcrumb + * + * @return string + * + * @access public + */ + public function postBreadcrumb() + { + if (aam_View_Collection::hasFeature(self::FEATURE_POST_ACCESS)){ + $post = new aam_View_Post; + $response = $post->getPostBreadcrumb(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Get Event List + * + * @return string + * + * @access public + */ + public function eventList() + { + if (aam_View_Collection::hasFeature(self::FEATURE_EVENT_MANAGER)){ + $event = new aam_View_Event; + $response = $event->retrieveEventList(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Save AAM options + * + * @return string + * + * @access public + */ + public function save() { + $this->getSubject()->save( + apply_filters( + 'aam_default_option_list', aam_Core_Request::post('aam') + )); + return json_encode(array('status' => 'success')); + } + + /** + * Roleback changes + * + * Restore default settings for current Subject + * + * @return string + * + * @access public + */ + public function roleback() { + //clear all settings + $this->getSubject()->clearAllOptions(); + //clear cache + $this->getSubject()->clearCache(); + + return json_encode(array('status' => 'success')); + } + + /** + * Check if current subject can perform roleback + * + * This function checks if there is any saved set of settings and return + * true if roleback feature can be performed + * + * @return string + * + * @access public + */ + public function hasRoleback() { + return json_encode( + array( + 'status' => intval( + $this->getSubject()->hasFlag( + aam_Control_Subject::FLAG_MODIFIED + ) + ) + )); + } + + /** + * Install license + * + * @return string + * + * @access public + */ + public function installLicense() + { + if (current_user_can(aam_Core_ConfigPress::getParam( + 'aam.menu.extensions.capability', 'administrator' + ))){ + $model = new aam_View_Extension(); + $response = $model->install(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Remove license + * + * @return string + * + * @access public + */ + public function removeLicense() + { + if (current_user_can(aam_Core_ConfigPress::getParam( + 'aam.menu.extensions.capability', 'administrator' + ))){ + $model = new aam_View_Extension(); + $response = $model->remove(); + } else { + $response = self::DEFAULT_AJAX_RESPONSE; + } + + return $response; + } + + /** + * Save ConfigPress + * + * @return string + * + * @access public + */ + public function saveConfigPress() + { + if (current_user_can(aam_Core_ConfigPress::getParam( + 'aam.menu.configpress.capability', 'administrator' + ))){ + $result = aam_Core_ConfigPress::write(aam_Core_Request::post('config')); + } else { + $result = false; + } + + return json_encode(array( + 'status' => ($result === false ? 'failure' : 'success') + )); + } + + /** + * Discard Help Pointer + * + * @return string + * + * @access public + */ + public function discardHelp(){ + return update_user_meta(get_current_user_id(), 'aam_contextual_menu', 1); + } + + /** + * UI Javascript labels + * + * @return array + * + * @access public + * @static + * @todo Move to other file + */ + public static function uiLabels() { + return apply_filters('aam_localization_labels', array( + 'Rollback Settings' => __('Rollback Settings', 'aam'), + 'Cancel' => __('Cancel', 'aam'), + 'Send E-mail' => __('Send E-mail', 'aam'), + 'Add New Role' => __('Add New Role', 'aam'), + 'Manage' => __('Manage', 'aam'), + 'Edit' => __('Edit', 'aam'), + 'Delete' => __('Delete', 'aam'), + 'Filtered' => __('Filtered', 'aam'), + 'Clear' => __('Clear', 'aam'), + 'Add New Role' => __('Add New Role', 'aam'), + 'Save Changes' => __('Save Changes', 'aam'), + 'Delete Role with Users Message' => __('System detected %d user(s) with this role. All Users with Role %s will be deleted automatically!', 'aam'), + 'Delete Role Message' => __('Are you sure that you want to delete role %s?', 'aam'), + 'Delete Role' => __('Delete Role', 'aam'), + 'Add User' => __('Add User', 'aam'), + 'Filter Users' => __('Filter Users', 'aam'), + 'Refresh List' => __('Refresh List', 'aam'), + 'Block' => __('Block', 'aam'), + 'Delete User Message' => __('Are you sure you want to delete user %s?', 'aam'), + 'Filter Capabilities by Category' => __('Filter Capabilities by Category', 'aam'), + 'Inherit Capabilities' => __('Inherit Capabilities', 'aam'), + 'Add New Capability' => __('Add New Capability', 'aam'), + 'Delete Capability Message' => __('Are you sure that you want to delete capability %s?', 'aam'), + 'Delete Capability' => __('Delete Capability', 'aam'), + 'Select Role' => __('Select Role', 'aam'), + 'Add Capability' => __('Add Capability', 'aam'), + 'Add Event' => __('Add Event', 'aam'), + 'Edit Event' => __('Edit Event', 'aam'), + 'Delete Event' => __('Delete Event', 'aam'), + 'Save Event' => __('Save Event', 'aam'), + 'Delete Event' => __('Delete Event', 'aam'), + 'Filter Posts by Post Type' => __('Filter Posts by Post Type', 'aam'), + 'Refresh List' => __('Refresh List', 'aam'), + 'Restore Default' => __('Restore Default', 'aam'), + 'Apply' => __('Apply', 'aam'), + 'Edit Term' => __('Edit Term', 'aam'), + 'Manager Access' => __('Manager Access', 'aam'), + 'Unlock Default Accesss Control' => __('Unlock Default Accesss Control', 'aam'), + 'Close' => __('Close', 'aam'), + 'Edit Role' => __('Edit Role', 'aam'), + 'Restore Default Capabilities' => __('Restore Default Capabilities', 'aam'), + 'Delete Post Message' => __('Are you sure you want to delete %s?', 'aam'), + 'Trash Post Message' => __('Are you sure you want to move %s to trash?', 'aam'), + 'Delete Post' => __('Delete Post', 'aam'), + 'Delete Permanently' => __('Delete Permanently', 'aam'), + 'Trash Post' => __('Trash Post', 'aam'), + 'Restore Default Access' => __('Restore Default Access', 'aam'), + 'Duplicate' => __('Duplicate', 'aam'), + 'Actions Locked' => __('Actions Locked', 'aam'), + 'AAM Documentation' => __('

AAM Documentation

Find more information about Advanced Access Manager here.
', 'aam'), + )); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/menu.php b/wp-content/plugins/advanced-access-manager/application/view/menu.php new file mode 100644 index 0000000..d64f5ca --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/menu.php @@ -0,0 +1,150 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Menu extends aam_View_Abstract { + + /** + * + * @return type + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/menu.phtml'); + } + + /** + * @inheritdoc + */ + public function defaultOption($options) { + //make sure that some parts are always in place + if (!isset($options[aam_Control_Object_Menu::UID])) { + $options[aam_Control_Object_Menu::UID] = array(); + } + + return $options; + } + + /** + * + * @global type $menu + * @global type $submenu + * @return type + */ + public function getMenu() { + global $menu; + + $response = array(); + + //let's create menu list with submenus + foreach ($menu as $menu_item) { + if (!preg_match('/^separator/', $menu_item[2])) { + $submenu = $this->getSubmenu($menu_item[2]); + $remove = !$this->getSubject()->hasCapability($menu_item[1]); + if (($remove === false) || (count($submenu) !== 0)) { + $item = array( + 'name' => $this->removeHTML($menu_item[0]), + 'id' => $menu_item[2], + 'submenu' => $submenu + ); + $response[] = $item; + } + } + } + + return $response; + } + + /** + * Prepare filtered submenu + * + * @global array $submenu + * @param string $menu + * + * @return array + * + * @access public + */ + public function getSubmenu($menu) { + global $submenu; + + $filtered_submenu = array(); + if (isset($submenu[$menu])) { + foreach ($submenu[$menu] as $submenu_item) { + if ($this->getSubject()->hasCapability($submenu_item[1]) !== false) { + //prepare title + $submenu_title = $this->removeHTML($submenu_item[0]); + $filtered_submenu[] = array( + 'name' => $submenu_title, + 'short' => $this->prepareTitle($submenu_title), + 'id' => $submenu_item[2] + ); + } + } + } + + return $filtered_submenu; + } + + /** + * + * @param type $title + * @return string + */ + protected function prepareTitle($title) { + if (function_exists('mb_strlen')) { + if ((mb_strlen($title) > 18)) { + $title = mb_substr($title, 0, 15) . '..'; + } + } elseif (strlen($title) > 18) { + $title = substr($title, 0, 15) . '..'; + } + + return $title; + } + + /** + * Check if the entire branch is restricted + * + * @param array $menu + * + * @return boolean + * + * @access public + */ + public function hasRestrictedAll($menu) { + $menuControl = $this->getSubject()->getObject(aam_Control_Object_Menu::UID); + $response = $menuControl->has($menu['id']); + + foreach ($menu['submenu'] as $submenu) { + if ($menuControl->has($submenu['id']) === false) { + $response = false; + break; + } + } + + return $response; + } + + /** + * + * @param type $text + * @return type + */ + public function removeHTML($text) { + // Return clean content + return strip_tags($text); + } + +} diff --git a/wp-content/plugins/advanced-access-manager/application/view/metabox.php b/wp-content/plugins/advanced-access-manager/application/view/metabox.php new file mode 100644 index 0000000..d357d70 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/metabox.php @@ -0,0 +1,303 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Metabox extends aam_View_Abstract { + + /** + * Metabox Group - WIDGETS + * + * Is used to retrieve the list of all wigets on the frontend + */ + const GROUP_WIDGETS = 'widgets'; + + /** + * + * @var type + */ + private $_cache = array(); + + /** + * + * @global type $wp_meta_boxes + * @param type $post_type + */ + public function run($post_type) { + $this->_cache = aam_Core_API::getBlogOption( + 'aam_metabox_cache', array() + ); + + if ($post_type === 'dashboard') { + $this->collectWidgets(); + } else { + $this->collectMetaboxes($post_type); + } + aam_Core_API::updateBlogOption('aam_metabox_cache', $this->_cache); + } + + /** + * + * @global type $wp_registered_widgets + */ + protected function collectWidgets() { + global $wp_registered_widgets; + + if (!isset($this->_cache['widgets'])) { + $this->_cache['widgets'] = array(); + } + + //get frontend widgets + if (is_array($wp_registered_widgets)) { + foreach ($wp_registered_widgets as $id => $data) { + if (is_object($data['callback'][0])) { + $callback = get_class($data['callback'][0]); + } elseif (is_string($data['callback'][0])) { + $callback = $data['callback'][0]; + } else { + $callback = null; + } + + if (!is_null($callback)) { //exclude any junk + $this->_cache['widgets'][$callback] = array( + 'title' => $this->removeHTML($data['name']), + 'id' => $callback + ); + } + } + } + + //now collect Admin Dashboard Widgets + $this->collectMetaboxes('dashboard'); + } + + /** + * + * @global type $wp_meta_boxes + * @param type $post_type + */ + protected function collectMetaboxes($post_type) { + global $wp_meta_boxes; + + if (!isset($this->_cache[$post_type])) { + $this->_cache[$post_type] = array(); + } + + if (isset($wp_meta_boxes[$post_type]) && is_array($wp_meta_boxes[$post_type])) { + foreach ($wp_meta_boxes[$post_type] as $levels) { + if (is_array($levels)) { + foreach ($levels as $boxes) { + if (is_array($boxes)) { + foreach ($boxes as $data) { + if (trim($data['id'])) { //exclude any junk + $this->_cache[$post_type][$data['id']] = array( + 'id' => $data['id'], + 'title' => $this->removeHTML($data['title']) + ); + } + } + } + } + } + } + } + } + + /** + * + * @return type + */ + public function initLink() { + $link = filter_var(aam_Core_Request::post('link'), FILTER_VALIDATE_URL); + if ($link) { + $url = add_query_arg('aam_meta_init', 1, $link); + aam_Core_API::cURL($url); + $response = array('status' => 'success'); + } else { + $response = array('status' => 'failure'); + } + + return json_encode($response); + } + + /** + * + * @global type $wp_post_types + * @return type + */ + public function retrieveList() { + global $wp_post_types; + + if (aam_Core_Request::post('refresh') == 1) { + aam_Core_API::deleteBlogOption('aam_metabox_cache'); + $type_list = array_keys($wp_post_types); + array_unshift($type_list, self::GROUP_WIDGETS); + + foreach ($type_list as $type) { + if ($type == self::GROUP_WIDGETS) { + $url = add_query_arg( + 'aam_meta_init', + 1, + admin_url('index.php') + ); + } else { + $url = add_query_arg( + 'aam_meta_init', + 1, + admin_url('post-new.php?post_type=' . $type) + ); + } + //grab metaboxes + aam_Core_API::cURL($url); + } + } + + return $this->buildMetaboxList(); + } + + /** + * + * @global type $wp_post_types + * @return type + */ + protected function buildMetaboxList() { + global $wp_post_types; + + $cache = aam_Core_API::getBlogOption('aam_metabox_cache', array()); + if ($this->getSubject()->getUID() == aam_Control_Subject_Visitor::UID) { + $list = array( + 'widgets' => (isset($cache['widgets']) ? $cache['widgets'] : array()) + ); + } else { + $list = $cache; + } + $content = '
'; + foreach ($list as $screen => $metaboxes) { + $content .= '
'; + switch ($screen) { + case 'dashboard': + $content .= '

' . __('Dashboard Widgets', 'aam') . '

'; + break; + + case 'widgets': + $content .= '

' . __('Frontend Widgets', 'aam') . '

'; + break; + + default: + $content .= '

' . $wp_post_types[$screen]->labels->name; + $content .= '

'; + break; + } + $content .= '
'; + $content .= '
'; + $i = 1; + $metaboxControl = $this->getSubject()->getObject( + aam_Control_Object_Metabox::UID + ); + foreach ($metaboxes as $metabox) { + if ($i++ == 1) { + $content .= '
'; + } + //prepare title + $title = $this->prepareTitle($metabox['title']); + + //prepare selected + if ($metaboxControl->has($screen, $metabox['id'])) { + $checked = 'checked="checked"'; + } else { + $checked = ''; + } + + $metabox_id = "metabox_{$screen}_{$metabox['id']}"; + + $content .= '
'; + $content .= sprintf( + '', + $metabox_id, + esc_js($metabox['title']), + $title + ); + $content .= sprintf( + '', + $metabox_id, + aam_Control_Object_Metabox::UID, + $screen, + $metabox['id'], + $checked + ); + $content .= ''; + $content .= '
'; + if ($i > 3) { + $content .= '
'; + $i = 1; + } + } + if ($i != 1) { + $content .= '
'; + } + $content .= '
'; + } + $content .= ''; + + return $content; + } + + /** + * + * @param type $title + * @return string + */ + protected function prepareTitle($title) { + if (function_exists('mb_strlen')) { + if ((mb_strlen($title) > 18)) { + $title = mb_substr($title, 0, 15) . '..'; + } + } elseif (strlen($title) > 18) { + $title = substr($title, 0, 15) . '..'; + } + + return $title; + } + + /** + * + * @param type $text + * @return type + */ + public function removeHTML($text) { + return strip_tags($text); + } + + /** + * + * @return type + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/metabox.phtml'); + } + + /** + * @inheritdoc + */ + public function defaultOption($options) { + //make sure that some parts are always in place + if (!isset($options[aam_Control_Object_Metabox::UID])) { + $options[aam_Control_Object_Metabox::UID] = array(); + } + + return $options; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/post.php b/wp-content/plugins/advanced-access-manager/application/view/post.php new file mode 100644 index 0000000..1f72489 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/post.php @@ -0,0 +1,549 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Post extends aam_View_Abstract { + + /** + * Type of browsing object + * + * It can be either post or term + * + * @var string + * + * @access private + */ + private $_post_type = 'post'; + + /** + * Term ID + * + * @var int + * + * @access private + */ + private $_term = 0; + + /** + * Constructor + * + * @return void + * + * @access public + */ + public function __construct() { + parent::__construct(); + $this->_post_type = aam_Core_Request::request('post_type'); + $this->_term = intval(aam_Core_Request::request('term')); + } + + /** + * + * @global type $wp_post_statuses + * @global type $wp_post_types + * @return type + */ + public function retrievePostList() { + global $wp_post_statuses, $wp_post_types, $wp_taxonomies; + + $term = trim(aam_Core_Request::request('term')); + + //default behavior + if (empty($term)) { + $post_type = 'post'; + //root for each Post Type + } elseif (isset($wp_post_types[$term])) { + $post_type = $term; + $term = ''; + } else { + $taxonomy = $this->getTaxonomy($term); + if (isset($wp_taxonomies[$taxonomy])) { + //take in consideration only first object type + $post_type = $wp_taxonomies[$taxonomy]->object_type[0]; + } else { + $post_type = 'post'; + } + } + + $args = array( + 'numberposts' => aam_Core_Request::request('iDisplayLength'), + 'offset' => aam_Core_Request::request('iDisplayStart'), + 'fields' => 'ids', + 'term' => $term, + 'taxonomy' => (!empty($taxonomy) ? $taxonomy : ''), + 'post_type' => $post_type, + 's' => aam_Core_Request::request('sSearch'), + 'post_status' => array() + ); + + $argsAll = array( + 'numberposts' => '999999', + 'fields' => 'ids', + //'category' => $term, + 'term' => $term, + 'taxonomy' => (!empty($taxonomy) ? $taxonomy : ''), + 'post_type' => $post_type, + 's' => aam_Core_Request::request('sSearch'), + 'post_status' => array() + ); + + if ($post_type != 'attachment') { //attachment has only inherit status + foreach ($wp_post_statuses as $status => $data) { + if ($data->show_in_admin_status_list) { + $args['post_status'][] = $status; + $argsAll['post_status'][] = $status; + } + } + } + + $total = 0; + foreach (wp_count_posts($post_type) as $status => $number) { + if ($wp_post_statuses[$status]->show_in_admin_status_list) { + $total += $number; + } + } + + //get displayed total + $displayTotal = count(get_posts($argsAll)); + + $response = array( + 'iTotalRecords' => $total, + 'iTotalDisplayRecords' => $displayTotal, + 'sEcho' => aam_Core_Request::request('sEcho'), + 'aaData' => array(), + ); + + foreach (get_posts($args) as $post_id) { + $post = $this->getSubject()->getObject( + aam_Control_Object_Post::UID, $post_id + ); + $response['aaData'][] = array( + $post->getPost()->ID, + $post->getPost()->post_status, + get_edit_post_link($post->getPost()->ID), + $post->getPost()->post_title, + $wp_post_statuses[$post->getPost()->post_status]->label, + '', + ($post->getOption() && !$post->getInherited() ? 1 : 0) + ); + } + + return json_encode($response); + } + + /** + * Get Taxonomy by Term ID + * + * @global type $wpdb + * @param type $object_id + * @return type + */ + private function getTaxonomy($object_id) { + global $wpdb; + + $query = "SELECT taxonomy FROM {$wpdb->term_taxonomy} "; + $query .= "WHERE term_id = {$object_id}"; + + return $wpdb->get_var($query); + } + + /** + * + * @global type $wp_post_types + * @return type + */ + public function getPostTree() { + global $wp_post_types; + + $type = aam_Core_Request::request('root'); + $tree = array(); + + if ($type == "source") { + if (is_array($wp_post_types)) { + foreach ($wp_post_types as $post_type => $data) { + //show only list of post type which have User Interface + if ($data->show_ui) { + $tree[] = (object) array( + 'text' => $data->label, + 'expanded' => FALSE, + 'hasChildren' => TRUE, + 'id' => $post_type, + 'classes' => 'important', + ); + } + } + } + } else { + if (preg_match('/^[\d]+$/', $type)) { + $taxonomy = $this->getTaxonomyByTerm($type); + $tree = $this->buildBranch(NULL, $taxonomy, $type); + } else { + $tree = $this->buildBranch($type); + } + } + + if (!count($tree)) { + $tree[] = (object) array( + 'text' => '' . __('[empty]', 'aam') . '', + 'hasChildren' => FALSE, + 'classes' => 'post-ontree', + 'id' => 'empty-' . uniqid() + ); + } + + return json_encode($tree); + } + + /** + * Delete Post + * + * @return string + * + * @access public + */ + public function deletePost() { + $post_id = aam_Core_Request::post('post'); + + if (aam_Core_Request::post('force')) { + $result = wp_delete_post($post_id, true); + } else { + $result = wp_trash_post($post_id); + } + + return json_encode(array('status' => ($result ? 'success' : 'failure'))); + } + + /** + * + * @global type $wpdb + * @param type $term_id + * @return boolean + */ + protected function getTaxonomyByTerm($term_id) { + global $wpdb; + + if ($term_id) { + $query = "SELECT taxonomy FROM {$wpdb->term_taxonomy} "; + $query .= "WHERE term_id = {$term_id}"; + $result = $wpdb->get_var($query); + } else { + $result = FALSE; + } + + return $result; + } + + /** + * + * @param type $post_type + * @param type $taxonomy + * @param type $parent + * @return type + */ + private function buildBranch($post_type, $taxonomy = FALSE, $parent = 0) { + $tree = array(); + if (!$parent && !$taxonomy) { //root of a branch + $tree = $this->buildCategories($post_type); + } elseif ($taxonomy) { //build sub categories + $tree = $this->buildCategories('', $taxonomy, $parent); + } + + return $tree; + } + + /** + * + * @param type $post_type + * @param type $taxonomy + * @param type $parent + * @return type + */ + private function buildCategories($post_type, $taxonomy = FALSE, $parent = 0) { + + $tree = array(); + + if ($parent) { + //$taxonomy = $this->get_taxonomy_get_term($parent); + //firstly render the list of sub categories + $cat_list = get_terms( + $taxonomy, array( + 'get' => 'all', + 'parent' => $parent, + 'hide_empty' => FALSE + ) + ); + if (is_array($cat_list)) { + foreach ($cat_list as $category) { + $tree[] = $this->buildCategory($category); + } + } + } else { + $taxonomies = get_object_taxonomies($post_type); + foreach ($taxonomies as $taxonomy) { + if (is_taxonomy_hierarchical($taxonomy)) { + $term_list = get_terms($taxonomy, array( + 'parent' => $parent, + 'hide_empty' => FALSE + )); + if (is_array($term_list)) { + foreach ($term_list as $term) { + $tree[] = $this->buildCategory($term); + } + } + } + } + } + + return $tree; + } + + /** + * + * @param type $category + * @return type + */ + private function buildCategory($category) { + $branch = (object) array( + 'text' => $category->name, + 'expanded' => FALSE, + 'classes' => 'important folder', + ); + if ($this->hasCategoryChilds($category)) { + $branch->hasChildren = TRUE; + } else { + $branch->hasChildren = FALSE; + } + $branch->id = $category->term_id; + + return $branch; + } + + /** + * Check if category has children + * + * @param int category ID + * @return bool TRUE if has + */ + protected function hasCategoryChilds($cat) { + global $wpdb; + + //get number of categories + $query = "SELECT COUNT(*) FROM {$wpdb->term_taxonomy} "; + $query .= "WHERE parent={$cat->term_id}"; + $counter = $wpdb->get_var($query); + + return ($counter ? TRUE : FALSE); + } + + /** + * + * @global type $wp_post_types + * @global type $wp_taxonomies + * @return type + */ + public function getPostBreadcrumb() { + global $wp_post_types, $wp_taxonomies; + + $id = aam_Core_Request::post('id'); + $response = array(); + if (preg_match('/^[\d]+$/', $id)) { + $taxonomy = $this->getTaxonomyByTerm($id); + //get post type + if (isset($wp_taxonomies[$taxonomy])) { + $post_type = $wp_taxonomies[$taxonomy]->object_type[0]; + if (isset($wp_post_types[$post_type])) { + $response['post_type'] = $post_type; + $response['term'] = $id; + $response['link'] = get_edit_term_link($id, $taxonomy); + $term = get_term($id, $taxonomy); + $tree = $this->renderBreadcrumbTree($term, array()); + $tree[] = array($post_type, $wp_post_types[$post_type]->label); + $response['breadcrumb'] = array_reverse($tree); + } + } + } else { + if (isset($wp_post_types[$id])) { + $response = array( + 'post_type' => $id, + 'term' => 0, + 'breadcrumb' => array( + array($id, $wp_post_types[$id]->label), + array('#', __('All', 'aam')) + ) + ); + } else { + $response = array( + 'term' => '', + 'breadcrumb' => array( + array('post', $wp_post_types['post']->label), + array('#', __('All', 'aam')) + ) + ); + } + } + + return json_encode($response); + } + + /** + * + * @param type $term + * @param type $tree + * @return type + */ + protected function renderBreadcrumbTree($term, $tree) { + $tree[] = array($term->term_id, $term->name); + if ($term->parent) { + $tree = $this->renderBreadcrumbTree( + get_term($term->parent, $term->taxonomy), $tree + ); + } + + return $tree; + } + + /** + * + * @return type + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/post.phtml'); + } + + /** + * Save Post or Term access + * + * @return string + * + * @access public + */ + public function saveAccess() { + $object_id = aam_Core_Request::post('id'); + + $limit_counter = apply_filters( + 'wpaccess_restrict_limit', + aam_Core_API::getBlogOption('aam_access_limit', 0) + ); + + if ($limit_counter == -1 || $limit_counter <= 10) { + $access = aam_Core_Request::post('access'); + if (aam_Core_Request::post('type') == 'term') { + $object = $this->getSubject()->getObject( + aam_Control_Object_Term::UID, $object_id + ); + if ($limit_counter !== -1 && isset($access['post'])) { + unset($access['post']); + } + } else { + $object = $this->getSubject()->getObject( + aam_Control_Object_Post::UID, $object_id + ); + } + $object->save($access); + aam_Core_API::updateBlogOption('aam_access_limit', $limit_counter + 1); + + //clear cache + $this->getSubject()->clearCache(); + + $response = array('status' => 'success'); + } else { + $response = array( + 'status' => 'failure', + 'reason' => 'limitation', + 'extension' => 'AAM Unlimited Basic' + ); + } + + return json_encode($response); + } + + /** + * Get Post or Term access + * + * @return string + * + * @access public + */ + public function getAccess() { + return json_encode(array( + 'html' => $this->loadTemplate( + dirname(__FILE__) . '/tmpl/control_area.phtml' + ), + 'counter' => apply_filters( + 'wpaccess_restrict_limit', + aam_Core_API::getBlogOption('aam_access_limit', 0) + ) + )); + } + + /** + * Restore default access level for object + * + * @return string + * + * @access public + */ + public function clearAccess() { + $type = aam_Core_Request::post('type'); + $object_id = aam_Core_Request::post('id'); + + if ($type === aam_Control_Object_Term::UID) { + $object = $this->getSubject()->getObject( + aam_Control_Object_Term::UID, $object_id + ); + } else { + $object = $this->getSubject()->getObject( + aam_Control_Object_Post::UID, $object_id + ); + } + + return json_encode(array( + 'status' => ($object->delete() ? 'success' : 'failure') + )); + } + + /** + * Get Object Title + * + * @param string $type + * @param string $name + * + * @return string + * + * @access public + * @global array $wp_post_types + * @global array $wp_taxonomies + */ + public function getObjectTitle($type, $name) { + global $wp_post_types, $wp_taxonomies; + + if ($type == aam_Control_Object_Term::UID) { + if (!empty($wp_taxonomies[$name]->labels->name)) { + $title = $wp_taxonomies[$name]->labels->name; + } else { + $title = 'term'; + } + } else { + if (!empty($wp_post_types[$name]->labels->name)) { + $title = $wp_post_types[$name]->labels->name; + } else { + $title = 'post'; + } + } + + return $title; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/role.php b/wp-content/plugins/advanced-access-manager/application/view/role.php new file mode 100644 index 0000000..751cc16 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/role.php @@ -0,0 +1,140 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Role extends aam_View_Abstract { + + /** + * Generate UI Content + * + * @return string + * + * @access public + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/role.phtml'); + } + + /** + * Get Role List + * + * @return string JSON Encoded role list + * + * @access public + */ + public function retrieveList() { + //retrieve list of users + $count = count_users(); + $user_count = $count['avail_roles']; + + //filter by name + $search = strtolower(trim(aam_Core_Request::request('sSearch'))); + $filtered = array(); + $roles = get_editable_roles(); + foreach ($roles as $id => $role) { + if (!$search || preg_match('/^' . $search . '/i', $role['name'])) { + $filtered[$id] = $role; + } + } + + $response = array( + 'iTotalRecords' => count($roles), + 'iTotalDisplayRecords' => count($filtered), + 'sEcho' => aam_Core_Request::request('sEcho'), + 'aaData' => array(), + ); + foreach ($filtered as $role => $data) { + $users = (isset($user_count[$role]) ? $user_count[$role] : 0); + $response['aaData'][] = array( + $role, + $users, + translate_user_role($data['name']), + '' + ); + } + + return json_encode($response); + } + + /** + * Retrieve Pure Role List + * + * @return string + */ + public function retrievePureList(){ + return json_encode(get_editable_roles()); + } + + /** + * Add New Role + * + * @return string + * + * @access public + */ + public function add() { + $name = trim(aam_Core_Request::post('name')); + $roles = new WP_Roles; + if (aam_Core_ConfigPress::getParam('aam.native_role_id') === 'true'){ + $role_id = strtolower($name); + } else { + $role_id = 'aamrole_' . uniqid(); + } + //if inherited role is set get capabilities from it + $parent = trim(aam_Core_Request::post('inherit')); + if ($parent && $roles->get_role($parent)){ + $caps = $roles->get_role($parent)->capabilities; + } else { + $caps = array(); + } + + if ($roles->add_role($role_id, $name, $caps)) { + $response = array( + 'status' => 'success', + 'role' => $role_id + ); + } else { + $response = array('status' => 'failure'); + } + + return json_encode($response); + } + + /** + * + * @return type + */ + public function edit() { + $result = $this->getSubject()->update(trim(aam_Core_Request::post('name'))); + return json_encode( + array('status' => ($result ? 'success' : 'failure')) + ); + } + + /** + * + * @return type + */ + public function delete() { + if ($this->getSubject()->delete(aam_Core_Request::post('delete_users'))) { + $status = 'success'; + } else { + $status = 'failure'; + } + + return json_encode(array('status' => $status)); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/capability.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/capability.phtml new file mode 100644 index 0000000..e469df8 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/capability.phtml @@ -0,0 +1,84 @@ + +
+ + + + + + + + + + + +
Capability IDChecked
+ +
+ + + + + + + + + getGroupList() as $group) { ?> + + + + + + +
+
+ +
+
+
+ +
+ + + + + + + + + + +
Role IDUser Count
+
+
+ +
+ + + + + + + + + + + +
*:
: + + +
+
+
+ +
+

+
+
\ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/configpress.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/configpress.phtml new file mode 100644 index 0000000..43539ea --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/configpress.phtml @@ -0,0 +1,161 @@ + +
+
+
+
+
+
+

+ + + +

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

+ +

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

+ +

+ +
+
+
+
+
+ + diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/control_area.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/control_area.phtml new file mode 100644 index 0000000..fb13209 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/control_area.phtml @@ -0,0 +1,242 @@ +getSubject()->getObject( + aam_Control_Object_Term::UID, aam_Core_Request::post('id') + ); + if (isset($wp_taxonomies[$object->getTerm()->taxonomy])){ + //take in consideration only first object type + $post_type = $wp_taxonomies[$object->getTerm()->taxonomy]->object_type[0]; + } else { + $post_type = 'post'; + } +} else { + $object = $this->getSubject()->getObject( + aam_Control_Object_Post::UID, aam_Core_Request::post('id') + ); + $post_type = $object->getPost()->post_type; +} + +if ($post_type == 'attachment'){ +?> +
+ Get better access control over your media files with + AAM Media Manager + extension. +
+getUID() == aam_Control_Object_Term::UID) { ?> +
+ + + + + + + + + + + + getTerm()->taxonomy . '.caps.frontend', + apply_filters( + 'aam_term_access_list', + aam_Core_Settings::get('term_frontend_restrictions'), + 'frontend', + $object, + $post_type + ) + ); + foreach ($term_fcaps as $i => $action) { + ?> + + + + + + +
+ getObjectTitle('term', $object->getTerm()->taxonomy) . ' ' . __('Access', 'aam'); ?> +
+
+ +
+
+
+
+ has('frontend', $action) ? 'checked="checked"' : ''); ?> /> + +
+
+
+ + + + + + + + + + + + + getTerm()->taxonomy . '.caps.backend', + apply_filters( + 'aam_term_access_list', + aam_Core_Settings::get('term_backend_restrictions'), + 'backend', + $object, + $post_type + ) + ); + foreach ($term_bcaps as $i => $action) { + ?> + + + + + + +
+ getObjectTitle('term', $object->getTerm()->taxonomy) . ' ' . __('Access', 'aam'); ?> +
+
+ +
+
+
+
+ has('backend', $action) ? 'checked="checked"' : ''); ?> /> + +
+
+
+
+ +
+ + + + + + + + + + + + $action) { + ?> + + + + + + +
+ getUID() == aam_Control_Object_Term::UID)){ + echo sprintf(__('All %s in Term', 'aam'), $this->getObjectTitle('post', $post_type)); + } else { + echo $this->getObjectTitle('post', $post_type) . ' ' . __('Access', 'aam'); + } + ?> +
+
+ +
+
+
+
+ has('frontend', $action) ? 'checked="checked"' : ''); ?> /> + +
+
+
+ + + + + + + + + + + + $action) { + ?> + + + + + + +
+ getUID() == aam_Control_Object_Term::UID)){ + echo sprintf(__('All %s in Term', 'aam'), $this->getObjectTitle('post', $post_type)); + } else { + echo $this->getObjectTitle('post', $post_type) . ' ' . __('Access', 'aam'); + } + ?> +
+
+ +
+
+
+
+ has('backend', $action) ? 'checked="checked"' : ''); ?> /> + +
+
+
+
+ + + +
+
\ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/event.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/event.phtml new file mode 100644 index 0000000..a994ea3 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/event.phtml @@ -0,0 +1,109 @@ + +
+ + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*: + +
*: + +
*: + +
*: + +
*: + +
*: + +
+
+ +
+

+
+ +
\ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/extension.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/extension.phtml new file mode 100644 index 0000000..fe93ee6 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/extension.phtml @@ -0,0 +1,234 @@ + +
+
+
+
+
+
+

+ + + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ AAM Plus Package + + This Extension extends default AAM basic features and unlock some limitations. + Add custom taxonomy Page Category to ground pages into categories; + Unlock the limitation for Post Access control; + Add additional Capability Group Comments with the set of capabilities to control default comment + actions like Reply, Mark Spam, Trash, Delete etc; + Add possibility to setup default post or page access. + For more details, please visit our forum. + $30.00 +
+ + getRepository()->hasExtension('AAM Plus Package')) { ?> + + + + +
+
+ AAM Activities + + Extend the list of activities that AAM can track. By default AAM logs only user login and logout. + By purchasing this extension you can also track activities like post trash, delete, update etc. + As well as we can implement any additional activity on demand. Check our website for more details. + $20.00 +
+ + getRepository()->hasExtension('AAM Activities')) { ?> + + + + +
+
+ AAM Media Manager + + It is the first official prototype that allows you to group your media files in Categories. + Visit our website + to find out more about current functionality and future development plans. + $10.00 +
+ + getRepository()->hasExtension('AAM Media Manager')) { ?> + + + + +
+
+ AAM Content Filter + + The first version of AAM Content Filter Extension allows you to filter content for your Posts or Pages or Custom Post Types. + The content (or part of the content) can be filtered based on currently logged in user or visitor. + Check our website for more information. + $15.00 + +
+ + getRepository()->hasExtension('AAM Content Filter')) { ?> + + + + +
+
+ AAM Plugin Manager + + Control access to individual plugins in your list of Plugins. Hide, restrict to activate, deactivate or delete any existing plugin for user or role. + Check our website for more information. + $10.00 +
+ + getRepository()->hasExtension('AAM Plugin Manager')) { ?> + + + + +
+
+
+

+ Purchase button to checkout your order.', 'aam'); ?> + +

+
    +
    +
    +

    +
    + +

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

      + +

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

      + +

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

      + +

      +
      +

      + Development License for $119 and receive access to all extensions that are available today and will be developed within a year.', 'aam'); ?> + +

      +
      + getRepository()->hasLicense('AAM Development License')) { ?> + + + + + +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_developers.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_developers.phtml new file mode 100644 index 0000000..a0696ed --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_developers.phtml @@ -0,0 +1,29 @@ +

      AAM Development Framework

      + +

      + Are you passionate about WordPress development? We are too! Become a member of + the AAM community and obtain our + Exclusive Development License + where you can profit from your own ideas and have access to all AAM extensions. +

      + +

      + We receive regular requests and suggestions for new extensions and decided we would + extend the opportunity to create and earn by opening our platform to you. We will + host your extensions on our server so you may develop custom features for you and + your customers. If you have a great idea and would like to create an extension for + sales, we will review, approve and host it on AAM server. +

      + +

      + You can download the sample extension from our official + GitHub Repository + and customize it to your special need. +

      + +

      + Additionally the + AAM Development License + gives you an opportunity to download ALL AAM extensions that are available + now and all new extensions that will be developed within a year from the time of purchase. +

      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_extensions.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_extensions.phtml new file mode 100644 index 0000000..4583b98 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_extensions.phtml @@ -0,0 +1,16 @@ +

      AAM Extensions

      + +

      + Advanced Access Manager is free platform and you can use most of the features without + any limitations but in case you are looking for more, this is where AAM extensions + might be useful for you to check. Complete list of available extensions you can find + on AAM->Extensions page. +

      +

      + We are using PayPal to process the payment and if it completed successfully, you will + automatically receive an email with license key that you can use to activate the extension. +

      +

      + In case of any issues with license key, we guaranty to resolve the issue within one business day. + Otherwise your money back. +

      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_faq.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_faq.phtml new file mode 100644 index 0000000..06830dd --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_faq.phtml @@ -0,0 +1,38 @@ +

      Frequently Asked Questions

      + +

      What is Advanced Access Manager?

      +

      + Advanced Access Manager (aka AAM) is free WordPress plugin that allows you to + control access to your website. With AAM you can manager access to your Posts, + Pages and Categories, filter unnecessary areas in your Backend, manager Users and + Roles and many more. +

      + +

      What should I know to understand how AAM works?

      +

      + Best way to learn more about AAM is to check our + collection of tutorials. + From here you'll get the basic understanding about most important aspects of AAM + functionality. It is also very important to understand how WordPress + Roles & Capabilities + are organized. +

      + +

      I'm not able to manage Administrator Role. What am I missing?

      +

      + In fact that AAM is very powerful tool, many unexperienced users were able to limit + Administrator rights and loose access to Dashboard. That is why from AAM Release 2.5 + we introduced AAM Super Admin. + You can make one user in your system as AAM Super Administrator that is able to manager other + administrators.
      + Warning! Do not limit capabilities for Administrator + Role, because even if you are AAM Super Administrator, you still remain WordPress Administrator. +

      + +

      What is ConfigPress?

      +

      + Think about ConfigPress as a settings page but instead of dozens of checkboxes, drop-downs and input fields + you use configuration script based on INI Standard. + The reason we use this format is that AAM is not only just a plugin but complex and very flexible development + tool. That is why we came to conclusion to organize all settings in ConfigPress format. +

      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_overview.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_overview.phtml new file mode 100644 index 0000000..f8817cb --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/help_overview.phtml @@ -0,0 +1,48 @@ +

      General Overview

      +

      + Advanced Access Manager (aka AAM) is one of the most popular access control plugins. It is easy-to-use but + at the same time very powerful tool that gives you a flexible control over your either + single WordPress site or Multisite Network. With AAM you are allowed to configure access + to different parts of your website for any role or individual user. +

      +

      + Another great aspect of AAM is that our team constantly working on new features and improving + existing. We are very dedicated to success of this project and our support is ready to help you + within 48hours. +

      +

      + Below you can find some of the major feature that are available in current AAM version: +

      + +Control access to backend menu (including submenu). As example you can restrict +access for role Editor to Menu "Pages" or does not allow any user to +manage Post's Categories.
      +
      +Filter widgets & metaboxes. Filter the list of metaboxes that any role +or user can see during Post/Page editing. At the same time you can filter the +list of Dashboard and Frontend widgets.
      +
      +Control access to any post, page, custom post type or category. +You can restrict access to page or post for any user or role as well as +restrict access to entire category and all posts inside it. You can also restrict +commenting for pages or exclude any from the frontend menu. For more restrictions you can +consider to get AAM Plus Package.
      +
      +Filter Post or Page content. You can filter Post's or Page's content for +currently logged in user or visitor. This feature is available with extension +AAM Content Manager.
      +
      +Manage capabilities for any role or user. +AAM, with simple interface, allows you to grand or remove capabilities for any role or user. +You can also create new custom capability or remove existing.
      +
      +Create custom actions for system events. As example your system can send email +to you if some user published post or page, or modified content. You also can develop +your own custom action for system event.
      +
      +Track user activities. With AAM you can track user activities within +your website. So you can easily find out when user was logged in or modified any post +or page. To extend the list of tracked activities, consider to get +AAM Activities +extension. + diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/manager.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/manager.phtml new file mode 100644 index 0000000..923d6b6 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/manager.phtml @@ -0,0 +1,111 @@ + +
      +
      + +
      +
      +
      +
      +
      +

      + + + + +

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

      + +

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

      + +

      +
      +
      +
      +
      +
      +
      +
      +

      +
      +
      +

      support@wpaam.com', 'aam'); ?>

      +
      +
      +
      +
      + +
      +
      +
      +
      +

      + +

      +
      +
      +
      + class, '" '; + echo 'aam-tooltip="', $subject->title, '" segment="' . $subject->segment . '">'; + echo $subject->label, ''; + } + ?> +
      +
      +
      + controller->content(); + } + ?> +
      +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/menu.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/menu.phtml new file mode 100644 index 0000000..0acc32e --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/menu.phtml @@ -0,0 +1,76 @@ +getMenu(); +?> +
      + + + + + + + +
      + \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/metabox.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/metabox.phtml new file mode 100644 index 0000000..56b67df --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/metabox.phtml @@ -0,0 +1,21 @@ + +
      +
      + + + +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/post.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/post.phtml new file mode 100644 index 0000000..2bcbdd0 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/post.phtml @@ -0,0 +1,57 @@ + +
      + + + + + + + + + + + + + + +
      Post IDPost StatusPost LinkRestriction Status
      + +
      +

      +
      + +
      +
      +
      +  |  +  |  +
      +
      +
        +
        +
        +
        + +
        +
        + AAM Plus Package to unlock the feature.'); ?> +
        +
        + getSubject()->getUID() != 'visitor') { ?> +
        + + +
        + +
        +
        +
        +
        diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/role.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/role.phtml new file mode 100644 index 0000000..b7bfab4 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/role.phtml @@ -0,0 +1,61 @@ + +
        + + + + + + + + + + +
        Role IDUser Count
        + +
        + + + + + + + + + + + +
        *:
        :
        +
        + +
        + + + + + + + + + + + +
        :
        *:
        +
        + +
        +

        +
        +
        +

        + Administrator Role', 'aam'); ?> +

        +
        +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/user.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/user.phtml new file mode 100644 index 0000000..673c8cd --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/user.phtml @@ -0,0 +1,42 @@ + +
        + + + + + + + + + + + + +
        User IDUser LoginStatusManagable
        + +
        + + + + + + + + + + +
        Role IDUser Count
        +
        + +
        + +
        +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/tmpl/visitor.phtml b/wp-content/plugins/advanced-access-manager/application/view/tmpl/visitor.phtml new file mode 100644 index 0000000..0f6edfa --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/tmpl/visitor.phtml @@ -0,0 +1,12 @@ + +
        + . +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/user.php b/wp-content/plugins/advanced-access-manager/application/view/user.php new file mode 100644 index 0000000..fd2f87d --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/user.php @@ -0,0 +1,156 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_User extends aam_View_Abstract { + + /** + * Generate UI content + * + * @return string + * + * @access public + */ + public function content() { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/user.phtml'); + } + + /** + * Retrieve list of users + * + * Based on filters, get list of users + * + * @return string JSON encoded list of users + * + * @access public + */ + public function retrieveList() { + //get total number of users + $total = count_users(); + $result = $this->query(); + $response = array( + 'iTotalRecords' => $total['total_users'], + 'iTotalDisplayRecords' => $result->get_total(), + 'sEcho' => aam_Core_Request::request('sEcho'), + 'aaData' => array(), + ); + foreach ($result->get_results() as $user) { + $response['aaData'][] = array( + $user->ID, + $user->user_login, + ($user->display_name ? $user->display_name : $user->user_nicename), + '', + $user->user_status, + ($this->canManage($user) ? 1 : 0) + ); + } + + return json_encode($response); + } + + /** + * Check if specified user can be managed by current user + * + * @param WP_User $user + * + * @return boolean + * + * @access public + */ + public function canManage(WP_User $user = null){ + //AAM does not support multi-roles. Get only one first role + $roles = $user->roles; + $role = get_role(array_shift($roles)); + //get user's highest level + $level = aam_Core_API::getUserLevel(); + + if (empty($role->capabilities['level_' . $level]) + || !$role->capabilities['level_' . $level] + || aam_Core_API::isSuperAdmin()){ + $response = true; + } else { + $response = false; + } + + return $response; + } + + /** + * Query database for list of users + * + * Based on filters and settings get the list of users from database + * + * @return \WP_User_Query + * + * @access public + */ + public function query() { + if ($search = trim(aam_Core_Request::request('sSearch'))) { + $search = "{$search}*"; + } + $args = array( + 'number' => '', + 'blog_id' => get_current_blog_id(), + 'role' => aam_Core_Request::request('role'), + 'fields' => 'all', + 'number' => aam_Core_Request::request('iDisplayLength'), + 'offset' => aam_Core_Request::request('iDisplayStart'), + 'search' => $search, + 'search_columns' => array('user_login', 'user_email', 'display_name'), + 'orderby' => 'user_nicename', + 'order' => 'ASC' + ); + + return new WP_User_Query($args); + } + + /** + * Block user + * + * @return string + * + * @access public + */ + public function block() { + if ($this->isManagable() && $this->getSubject()->block()){ + $response = array( + 'status' => 'success', + 'user_status' => $this->getSubject()->user_status + ); + } else{ + $response = array('status' => 'failure'); + } + + return json_encode($response); + } + + /** + * Delete user + * + * @return string + * + * @access public + */ + public function delete() { + if ($this->isManagable($this->getSubject()->getUser())){ + $response = $this->getSubject()->delete(); + } else { + $response = false; + } + + return json_encode(array('status' => $response ? 'success' : 'failure')); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/application/view/visitor.php b/wp-content/plugins/advanced-access-manager/application/view/visitor.php new file mode 100644 index 0000000..3e023b7 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/application/view/visitor.php @@ -0,0 +1,32 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Visitor extends aam_View_Abstract +{ + + /** + * Get View content + * + * @return string + * + * @access public + */ + public function content() + { + return $this->loadTemplate(dirname(__FILE__) . '/tmpl/visitor.phtml'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/config.php b/wp-content/plugins/advanced-access-manager/config.php new file mode 100644 index 0000000..b853293 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/config.php @@ -0,0 +1,68 @@ +<'clear'>>t<'footer'ip<'clear'>>", + sPaginationType: "full_numbers", + bAutoWidth: false, + bDestroy: true, + bSort: false, + sAjaxSource: ajaxurl, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'activity_list' + }); + aoData.push({ + name: 'subject', + value: _this.getSubject().type + }); + aoData.push({ + name: 'subject_id', + value: _this.getSubject().id + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + }, + fnInitComplete: function() { + var a = jQuery('#activity_list_wrapper .activity-top-actions'); + + var clear = jQuery('', { + 'href': '#', + 'class': 'activity-top-action activity-top-action-clear', + 'aam-tooltip': aamLocal.labels['Clear Logs'] + }).bind('click', function(event) { + event.preventDefault(); + _this.launch(jQuery(this), 'activity-top-action-clear'); + _this.launchClearActivityLog(); + }); + jQuery(a).append(clear); + + var info = jQuery('', { + 'href': '#', + 'class': 'activity-top-action activity-top-action-info', + 'aam-tooltip': aamLocal.labels['Get More'] + }).bind('click', function(event) { + event.preventDefault(); + _this.launch(jQuery(this), 'activity-top-action-info'); + _this.launchActivityLogInfo(); + }); + jQuery(a).append(info); + + _this.doAction('aam_activity_top_actions', {container: a}); + }, + fnRowCallback: function(nRow, aData) { + jQuery('td:eq(0)', nRow).html(jQuery('', { + href: aamLocal.editUserURI + '?user_id=' + aData[0], + target: '_blank' + }).html(aData[1])); + }, + aoColumnDefs: [ + {bVisible: false, aTargets: [0]} + ], + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + }, + sLengthMenu: "_MENU_" + } + }); + } +}; + +/** + * Show Clear Activity Log Confirmation dialog + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchClearActivityLog = function() { + var _this = this; + + var buttons = {}; + + buttons[aamLocal.labels['Clear Logs']] = function() { + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: _this.compileAjaxPackage('clear_activities', true), + complete: function() { + jQuery('#clear_activity_dialog').dialog("close"); + } + }); + }; + + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#clear_activity_dialog').dialog("close"); + }; + + jQuery('#clear_activity_dialog').dialog({ + resizable: false, + height: 'auto', + width: '20%', + modal: true, + buttons: buttons, + close: function() { + _this.terminate( + jQuery('.activity-top-action-clear'), + 'activity-top-action-clear' + ); + //refresh the table + _this.blogTables.activityList = null; + _this.loadActivityTab(); + } + }); +}; + +/** + * Show Activation Log Information Dialog + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchActivityLogInfo = function() { + var _this = this; + + var buttons = {}; + + buttons[aamLocal.labels['Close']] = function() { + jQuery('#info_activity_dialog').dialog("close"); + }; + + jQuery('#info_activity_dialog').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + buttons: buttons, + close: function() { + _this.terminate( + jQuery('.activity-top-action-info'), + 'activity-top-action-info' + ); + } + }); +}; + +jQuery(document).ready(function() { + aamInterface.addAction('aam_feature_activation', function(params) { + if (params.feature === 'activity_log') { + aamInterface.loadActivityTab(); + } + }); +}); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/activity.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/activity.php new file mode 100644 index 0000000..ade8914 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/activity.php @@ -0,0 +1,214 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_Control_Object_Activity extends aam_Control_Object { + + /** + * Control Object UID + */ + const UID = 'activity'; + + /** + * Activity User Login + */ + const ACTIVITY_LOGIN = 'login'; + + /** + * Activity User Logout + */ + const ACTIVITY_LOGOUT = 'logout'; + + /** + * Set of Activities + * + * @var array + * + * @access private + */ + private $_option = array(); + + /** + * Initialize the Activity list + * + * Based on subject type, load the list of activities + * + * @param int $object_id + * + * @return void + * + * @access public + */ + public function init($object_id) { + if ($this->getSubject()->getUID() == aam_Control_Subject_User::UID) { + //get single user activity list + $option = array( + $this->getSubject()->getId() => $this->getSubject()->readOption( + self::UID, $object_id, false + )); + } else { + //get all users in Role and combine the activities + $query = new WP_User_Query(array( + 'number' => '', + 'blog_id' => get_current_blog_id(), + 'role' => $this->getSubject()->getId(), + 'fields' => 'id' + )); + $option = array(); + + foreach ($query->get_results() as $user) { + $dump = get_user_option('aam_activity', $user); + if (is_array($dump) && count($dump)) { + $option[$user] = $dump; + } + } + } + + if (is_array($option)) { + $this->setOption($option); + //filter old activities + $this->filter(); + } + } + + /** + * Decorate Activity description + * + * @param array $activity + * + * @return string + * + * @access public + */ + public function decorate($activity) { + switch ($activity['action']) { + case self::ACTIVITY_LOGIN: + $response = __('System Login', 'aam'); + break; + + case self::ACTIVITY_LOGOUT: + $response = __('System Logout', 'aam'); + break; + + default: + $response = apply_filters( + 'aam_activity_decorator', + __('Unknown Activity', 'aam'), + $activity + ); + break; + } + + return $response; + } + + /** + * Add User's Activity + * + * This method can be used only for Subject User + * + * @param int $timestamp + * @param array $activity + * + * @return void + * + * @access public + */ + public function add($timestamp, array $activity) { + //make sure that user's activity is array + $user_id = $this->getSubject()->getId(); + if (empty($this->_option[$user_id]) || !is_array($this->_option[$user_id])) { + $this->_option[$user_id] = array(); + } + //add activity + $this->_option[$user_id][$timestamp] = $activity; + + //finally save the activity + $this->save($this->_option[$user_id]); + } + + /** + * Filter old activities + * + * Based on aam.extension.AAM_Activity_Log.date config, filter old activities + * + * @return void + * + * @access public + */ + public function filter() { + $date = strtotime( + aam_Core_ConfigPress::getParam( + 'aam.extension.AAM_Activity_Log.date', 'today - 30 days' + ) + ); + foreach ($this->_option as $user_id => $activities) { + if (is_array($activities)) { + foreach ($activities as $timestamp => $activity) { + if ($timestamp < $date) { + unset($this->_option[$user_id][$timestamp]); + } + } + } + } + } + + /** + * Save Activities + * + * @param array $events + * + * @return void + * + * @access public + */ + public function save($activities = null) { + if (is_array($activities)) { + $this->getSubject()->updateOption($activities, self::UID); + } + } + + /** + * @inheritdoc + */ + public function cacheObject() { + return false; + } + + /** + * + * @return type + */ + public function getUID() { + return self::UID; + } + + /** + * + * @param type $option + */ + public function setOption($option) { + $this->_option = (is_array($option) ? $option : array()); + } + + /** + * + * @return type + */ + public function getOption() { + return $this->_option; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/extension.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/extension.php new file mode 100644 index 0000000..7d87076 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/extension.php @@ -0,0 +1,279 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class AAM_Extension_ActivityLog extends AAM_Core_Extension { + + /** + * Current subject + * + * @var aam_Control_Subject + */ + private $_subject = null; + + /** + * + * @param aam|aam_View_Connector $parent + */ + public function __construct(aam $parent) { + parent::__construct($parent); + + //include activity object + require_once(dirname(__FILE__) . '/activity.php'); + + if (is_admin()) { + $this->registerFeature(); + } + + //define new Activity Object + add_filter('aam_object', array($this, 'activityObject'), 10, 3); + + //login & logout hooks + add_action('wp_login', array($this, 'login'), 10, 2); + add_action('wp_logout', array($this, 'logout')); + } + + /** + * Register new UI feature + * + * @return void + * + * @access protected + */ + protected function registerFeature() { + $capability = aam_Core_ConfigPress::getParam( + 'aam.feature.activity_log.capability', 'administrator' + ); + + if (current_user_can($capability)) { + add_action('admin_print_scripts', array($this, 'printScripts')); + add_action('admin_print_styles', array($this, 'printStyles')); + add_filter('aam_ajax_call', array($this, 'ajax'), 10, 2); + add_action( + 'aam_localization_labels', array($this, 'localizationLabels') + ); + + aam_View_Collection::registerFeature((object)array( + 'uid' => 'activity_log', + 'position' => 35, + 'title' => __('Activity Log', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, aam_Control_Subject_User::UID + ), + 'controller' => $this + )); + } + } + + /** + * + * @param type $username + * @param type $user + */ + public function login($username, $user) { + $this->getParent()->getUser() + ->getObject(aam_Control_Object_Activity::UID)->add( + time(), + array( + 'action' => aam_Control_Object_Activity::ACTIVITY_LOGIN + ) + ); + } + + /** + * + */ + public function logout() { + $user = $this->getParent()->getUser(); + $user->getObject(aam_Control_Object_Activity::UID)->add( + time(), + array( + 'action' => aam_Control_Object_Activity::ACTIVITY_LOGOUT + )); + } + + /** + * + * @param aam_Control_Object_Activity $object + * @param type $object_uid + * @param type $object_id + * @return \aam_Control_Object_Activity + */ + public function activityObject($object, $object_uid, $object_id) { + if ($object_uid === aam_Control_Object_Activity::UID) { + $object = new aam_Control_Object_Activity( + $this->getParent()->getUser(), $object_id + ); + } + + return $object; + } + + /** + * + * @return type + */ + public function content() { + ob_start(); + require dirname(__FILE__) . '/ui.phtml'; + $content = ob_get_contents(); + ob_end_clean(); + + return $content; + } + + /** + * Print necessary scripts + * + * @return void + * + * @access public + */ + public function printScripts() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_script( + 'aam-activity-log-admin', + AAM_ACTIVITY_LOG_BASE_URL . '/activity.js', + array('aam-admin') + ); + } + } + + /** + * + */ + public function printStyles() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_style( + 'aam-activity-log-admin', + AAM_ACTIVITY_LOG_BASE_URL . '/activity.css' + ); + } + } + + /** + * Add extra UI labels + * + * @param array $labels + * + * @return array + * + * @access public + */ + public function localizationLabels($labels) { + $labels['Clear Logs'] = __('Clear Logs', 'aam'); + $labels['Get More'] = __('Get More', 'aam'); + + return $labels; + } + + /** + * Hanlde Ajax call + * + * @param mixed $default + * @param aam_Control_Subject $subject + * + * @return mixed + * + * @access public + */ + public function ajax($default, aam_Control_Subject $subject = null) { + $this->setSubject($subject); + + switch (aam_Core_Request::request('sub_action')) { + case 'activity_list': + $response = $this->getActivityList(); + break; + + case 'clear_activities': + $response = $this->clearActivities(); + break; + + default: + $response = $default; + break; + } + + return $response; + } + + /** + * + * @return type + */ + protected function getActivityList() { + $response = array( + 'iTotalRecords' => 0, + 'iTotalDisplayRecords' => 0, + 'sEcho' => aam_Core_Request::request('sEcho'), + 'aaData' => array(), + ); + + $activity = $this->getSubject()->getObject(aam_Control_Object_Activity::UID); + $activities = $activity->getOption(); + + foreach ($activities as $user_id => $list) { + $user = new WP_User($user_id); + if ($user->ID && is_array($list)) { + foreach ($list as $time => $data) { + $response['aaData'][] = array( + $user->ID, + ($user->display_name ? $user->display_name : $user->user_nicename), + $activity->decorate($data), + date('Y-m-d H:i:s', $time) + ); + } + } + } + + return json_encode($response); + } + + /** + * Clear the activities + * + * @global wpdb $wpdb + * + * @return string + * + * @access public + */ + protected function clearActivities() { + $activity = $this->getSubject()->getObject(aam_Control_Object_Activity::UID); + foreach ($activity->getOption() as $user_id => $list) { + delete_user_option($user_id, 'aam_activity'); + } + + return json_encode(array('status' => 'success')); + } + + /** + * + * @param aam_Control_Subject $subject + */ + public function setSubject($subject) { + $this->_subject = $subject; + } + + /** + * + * @return aam_Control_Subject + */ + public function getSubject() { + return $this->_subject; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info-active.png new file mode 100644 index 0000000..2c3a25c Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info.png new file mode 100644 index 0000000..e582316 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/info.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash-active.png new file mode 100644 index 0000000..39961e7 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash.png new file mode 100644 index 0000000..42570a1 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/images/trash.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/index.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/index.php new file mode 100644 index 0000000..911e638 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/index.php @@ -0,0 +1,15 @@ +getParent()); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/ui.phtml b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/ui.phtml new file mode 100644 index 0000000..a499b0a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Activity_Log/ui.phtml @@ -0,0 +1,33 @@ + + \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/extension.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/extension.php new file mode 100644 index 0000000..bc68795 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/extension.php @@ -0,0 +1,253 @@ + + * @copyright Copyright C 2014 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class AAM_Extension_Multisite extends AAM_Core_Extension { + + /** + * + * @var type + */ + private $_subject = null; + + /** + * + * @param aam|aam_View_Connector $parent + */ + public function __construct(aam $parent) { + parent::__construct($parent); + if (aam_Core_API::isNetworkPanel()) { + add_action('admin_print_scripts', array($this, 'printScripts')); + add_action('admin_print_styles', array($this, 'printStyles')); + add_action('aam_localization_labels', array($this, 'localizationLabels')); + add_action('wpmu_new_blog', array($this, 'newBlog'), 10, 6); + $this->registerSubject(); + } elseif (is_admin()) { + add_filter('aam_ajax_call', array($this, 'ajax'), 10, 2); + } + } + + /** + * + * @param type $blog_id + * @param type $user_id + * @param type $domain + * @param type $path + * @param type $site_id + * @param type $meta + */ + public function newBlog($blog_id, $user_id, $domain, $path, $site_id, $meta) { + global $wpdb; + + if ($default_id = aam_Core_API::getBlogOption('aam_default_site', 0, 1)){ + $default_option = $wpdb->get_blog_prefix($default_id) . 'user_roles'; + $roles = aam_Core_API::getBlogOption($default_option, null, $default_id); + if ($roles){ + aam_Core_API::updateBlogOption( + $wpdb->get_blog_prefix($blog_id) . 'user_roles', + $roles, $blog_id + ); + } + } + } + + /** + * + * @return type + */ + protected function getSiteList() { + //retrieve site list first + $blog_list = $this->retrieveSiteList(); + + $response = array( + 'iTotalRecords' => count($blog_list), + 'iTotalDisplayRecords' => count($blog_list), + 'sEcho' => aam_Core_Request::request('sEcho'), + 'aaData' => array(), + ); + $default = aam_Core_API::getBlogOption('aam_default_site', 0, 1); + + foreach ($blog_list as $site) { + $blog = get_blog_details($site->blog_id); + $response['aaData'][] = array( + $site->blog_id, + get_admin_url($site->blog_id, 'admin.php'), + get_admin_url($site->blog_id, 'admin-ajax.php'), + $blog->blogname, + '', + ($site->blog_id == $default ? 1 : 0) + ); + } + + return json_encode($response); + } + + /** + * Retieve the list of sites + * + * @return array + * + * @access public + */ + public function retrieveSiteList(){ + global $wpdb; + + return $wpdb->get_results('SELECT blog_id FROM ' . $wpdb->blogs); + } + + /** + * Register new subject Multisite + * + * @return void + * + * @access public + */ + public function registerSubject() { + aam_View_Collection::registerSubject((object)array( + 'position' => 1, + 'segment' => 'multisite', + 'label' => __('Sites', 'aam'), + 'title' => __('Site Manager', 'aam'), + 'class' => 'manager-item manager-item-multisite', + 'uid' => 'multisite', + 'controller' => $this + )); + } + + /** + * + * @return type + */ + public function content() { + ob_start(); + require dirname(__FILE__) . '/ui.phtml'; + $content = ob_get_contents(); + ob_end_clean(); + + return $content; + } + + /** + * Print necessary scripts + * + * @return void + * + * @access public + */ + public function printScripts() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_script( + 'aam-multisite-admin', + AAM_MULTISITE_BASE_URL . '/multisite.js', + array('aam-admin') + ); + $localization = array( + 'nonce' => wp_create_nonce('aam_ajax'), + 'addSiteURI' => admin_url('network/site-new.php'), + 'editSiteURI' => admin_url('network/site-info.php') + ); + + wp_localize_script( + 'aam-multisite-admin', 'aamMultisiteLocal', $localization + ); + } + } + + /** + * + */ + public function printStyles() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_style( + 'aam-multisite-admin', AAM_MULTISITE_BASE_URL . '/multisite.css' + ); + } + } + + /** + * + * @param type $labels + * @return type + */ + public function localizationLabels($labels) { + $labels['Set Default'] = __('Set Default', 'aam'); + $labels['Unset Default'] = __('Unset Default', 'aam'); + $labels['Set as Default'] = __('Set as Default', 'aam'); + + return $labels; + } + + /** + * + * @param type $default + * @param aam_Control_Subject $subject + * @return type + */ + public function ajax($default, aam_Control_Subject $subject = null) { + $this->setSubject($subject); + + switch (aam_Core_Request::request('sub_action')) { + case 'site_list': + $response = $this->getSiteList(); + break; + + case 'pin_site': + $response = $this->pinSite(); + break; + + case 'unpin_site': + $response = $this->unpinSite(); + break; + + default: + $response = $default; + break; + } + + return $response; + } + + protected function pinSite() { + return json_encode(array( + 'status' => aam_Core_API::updateBlogOption( + 'aam_default_site', aam_Core_Request::post('blog'), 1 + ) ? 'success' : 'failure' + )); + } + + protected function unpinSite() { + return json_encode(array( + 'status' => aam_Core_API::deleteBlogOption('aam_default_site', 1) ? 'success' : 'failure' + )); + } + + /** + * + * @param type $subject + */ + public function setSubject($subject) { + $this->_subject = $subject; + } + + /** + * + * @return type + */ + public function getSubject() { + return $this->_subject; + } + +} diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add-active.png new file mode 100644 index 0000000..a17cc4a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add.png new file mode 100644 index 0000000..ef21b41 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/add.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit-active.png new file mode 100644 index 0000000..17506cf Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit.png new file mode 100644 index 0000000..03fcd80 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/edit.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage-active.png new file mode 100644 index 0000000..ad1aa62 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage.png new file mode 100644 index 0000000..6a1aec3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/manage.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite-active.png new file mode 100644 index 0000000..7bb38ec Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite.png new file mode 100644 index 0000000..c852e94 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/multisite.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin-active.png new file mode 100644 index 0000000..25d027b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin.png new file mode 100644 index 0000000..4dcafd1 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/pin.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh-active.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh-active.png new file mode 100644 index 0000000..a2d280e Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh.png new file mode 100644 index 0000000..6b43550 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/refresh.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/unpin.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/unpin.png new file mode 100644 index 0000000..c48aaa3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/images/unpin.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/index.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/index.php new file mode 100644 index 0000000..3f64528 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/index.php @@ -0,0 +1,15 @@ +getParent()); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.css b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.css new file mode 100644 index 0000000..7668ed4 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.css @@ -0,0 +1,98 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ + +/** CONTROL MANAGER STYLES **/ +.manager-item-multisite{ + background-image: url('images/multisite.png'); +} + +.manager-item-multisite-active{ + background-image: url('images/multisite-active.png'); +} + +.multisite-top-actions{ + float: right; + display: inline-table; + width: auto; + text-align: right; +} + +.multisite-top-action{ + width: 24px; + height: 24px; + display: table-cell; + text-indent: -9999px; + padding-right: 10px; + background-repeat: no-repeat; + background-position: center; +} + +.multisite-top-action-add{ + background-image: url('images/add.png'); +} + +.multisite-top-action-add:hover{ + background-image: url('images/add-active.png'); +} + +.multisite-top-action-refresh{ + background-image: url('images/refresh.png'); +} + +.multisite-top-action-refresh:hover{ + background-image: url('images/refresh-active.png'); +} + +.multisite-actions{ + width: 100%; + display: table; +} + +.multisite-action{ + width: 16px; + height: 16px; + display: table-cell; + text-indent: -9999px; + background-repeat: no-repeat; + background-position: center; +} + +.multisite-action-manage{ + background-image: url('images/manage.png'); +} + +.multisite-action-manage:hover{ + background-image: url('images/manage-active.png'); +} + +.multisite-action-manage-active{ + background-image: url('images/manage-active.png'); +} + +.multisite-action-pin{ + background-image: url('images/pin.png'); +} + +.multisite-action-pin-active{ + background-image: url('images/pin-active.png'); +} + +.multisite-action-pin:hover{ + background-image: url('images/pin-active.png'); +} + +.multisite-action-edit{ + background-image: url('images/edit.png'); +} + +.multisite-action-edit:hover{ + background-image: url('images/edit-active.png'); +} + +.aam-multisite-bold{ + font-weight: bold; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.js b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.js new file mode 100644 index 0000000..c1acd21 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/multisite.js @@ -0,0 +1,228 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ + +AAM.prototype.site_id = 1; +AAM.prototype.segmentTables.siteList = null; + +AAM.prototype.reloadSite = function(site_id, siteurl, ajaxurl) { + var _this = this; + this.site_id = site_id; + aamLocal.siteURI = siteurl; + aamLocal.ajaxurl = ajaxurl; + + //reset default values for current subjects + this.setSubject('role', aamLocal.defaultSegment.role); + + this.retrieveSettings(); + + //highlight the active site + jQuery('#site_list .aam-multisite-bold').removeClass('aam-multisite-bold'); + jQuery('#site_list .multisite-action-manage-active').each(function() { + _this.terminate(jQuery(this), 'multisite-action-manage'); + }); + var nRow = jQuery('#site_list tr[site="' + site_id + '"]'); + jQuery('td:eq(0)', nRow).addClass('aam-multisite-bold'); + this.launch(jQuery('.multisite-action-manage', nRow), 'multisite-action-manage'); + + //reload all segmentTables + for (var i in this.segmentTables) { + if (this.segmentTables[i] !== null) { + this.segmentTables[i].fnDraw(); + } + } +}; + +AAM.prototype.loadMultisiteSegment = function() { + var _this = this; + + if (typeof this.siteList === 'undefined') { + this.siteList = jQuery('#site_list').dataTable({ + sDom: "<'top'f<'multisite-top-actions'><'clear'>>t<'footer'ip<'clear'>>", + bServerSide: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + sAjaxSource: ajaxurl, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'site_list' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + aoData.push({ + name: 's', + value: jQuery('#site_list_filter input').val() + }); + }, + fnInitComplete: function() { + var add = jQuery('', { + 'href': aamMultisiteLocal.addSiteURI, + 'target': '_blank', + 'class': 'multisite-top-action multisite-top-action-add', + 'aam-tooltip': aamLocal.labels['Add New Site'] + }); + jQuery('#site_list_wrapper .multisite-top-actions').append(add); + + var refresh = jQuery('', { + 'href': '#', + 'class': 'multisite-top-action multisite-top-action-refresh', + 'aam-tooltip': aamLocal.labels['Refresh'] + }).bind('click', function(event) { + event.preventDefault(); + _this.siteList.fnDraw(); + }); + jQuery('#site_list_wrapper .multisite-top-actions').append(refresh); + + _this.initTooltip(jQuery('#site_list_wrapper .site-top-actions')); + }, + fnDrawCallback: function() { + jQuery('#multisite_list_wrapper .clear-table-filter').bind('click', function(event) { + event.preventDefault(); + jQuery('#multisite_list_filter input').val(''); + _this.siteList.fnFilter(''); + }); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + } + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1, 2, 4] + } + ], + fnRowCallback: function(nRow, aData) { //format data + jQuery('td:eq(1)', nRow).html(jQuery('
        ', { + 'class': 'multisite-actions' + })); // + //add role attribute + jQuery(nRow).attr('site', aData[0]); + + if (parseInt(aData[0]) === _this.site_id) { + jQuery('.current-site').html(aData[3] + ':'); + jQuery('td:eq(0)', nRow).addClass('aam-multisite-bold'); + var current = true; + } else { + current = false; + } + + jQuery('.multisite-actions', nRow).empty(); + jQuery('.multisite-actions', nRow).append(jQuery('', { + 'href': '#', + 'class': 'multisite-action multisite-action-manage' + (current ? '-active' : ''), + 'aam-tooltip': aamLocal.labels['Manage'] + }).bind('click', function(event) { + event.preventDefault(); + //change title + jQuery('.current-site').html(aData[3] + ':'); + _this.reloadSite(aData[0], aData[1], aData[2]); + })); + + var def_site = (parseInt(aData[5]) === 1 ? true : false); + + jQuery('.multisite-actions', nRow).append(jQuery('', { + 'href': '#', + 'class': 'multisite-action multisite-action-pin' + (def_site ? '-active' : ''), + 'aam-tooltip': (def_site ? aamLocal.labels['Unset Default'] : aamLocal.labels['Set as Default']) + }).bind('click', function(event) { + event.preventDefault(); + var button = this; + + if (def_site) { + var unpin_data = _this.compileAjaxPackage('unpin_site', false); + unpin_data.blog = aData[0]; + jQuery.ajax(ajaxurl, { + type: 'POST', + dataType: 'json', + data: unpin_data, + success: function(response) { + if (response.status === 'success') { + _this.siteList.fnDraw(); + } + _this.highlight('.control-manager-content', response.status); + }, + error: function() { + _this.highlight('.control-manager-content', 'failure'); + } + }); + } else { + jQuery('#default_site').html(aData[3]); + var pin_data = _this.compileAjaxPackage('pin_site', false); + pin_data.blog = aData[0]; + + var buttons = {}; + buttons[aamLocal.labels['Set Default']] = function() { + jQuery.ajax(ajaxurl, { + type: 'POST', + dataType: 'json', + data: pin_data, + success: function(response) { + if (response.status === 'success') { + _this.siteList.fnDraw(); + } + _this.highlight('.control-manager-content', response.status); + }, + error: function() { + _this.highlight('.control-manager-content', 'failure'); + }, + complete: function() { + jQuery("#tap_default_site").dialog("close"); + } + }); + jQuery("#tap_default_site").dialog("close"); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery("#tap_default_site").dialog("close"); + }; + + jQuery("#tap_default_site").dialog({ + resizable: false, + height: 'auto', + modal: true, + buttons: buttons + }); + } + })); + + jQuery('.multisite-actions', nRow).append(jQuery('', { + 'href': aamMultisiteLocal.editSiteURI + '?id=' + aData[0], + 'class': 'multisite-action multisite-action-edit', + 'target': '_blank', + 'aam-tooltip': aamLocal.labels['Edit'] + })); + + _this.initTooltip(nRow); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); + } + + jQuery('#multisite_manager_wrap').show(); +}; + +jQuery(document).ready(function() { + aamInterface.addAction('aam_load_segment', function() { + aamInterface.loadMultisiteSegment(); + }); + //by default load the Multisite panel first + aamInterface.loadSegment('multisite'); +}); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/ui.phtml b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/ui.phtml new file mode 100644 index 0000000..781a4b8 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Multisite_Support/ui.phtml @@ -0,0 +1,32 @@ + +
        + + + + + + + + + + + + +
        Site IDSite URLSite Ajax URLDefault
        +
        +

        + +

        +

        + +

        +
        +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/extension.php b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/extension.php new file mode 100644 index 0000000..7f80219 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/extension.php @@ -0,0 +1,113 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class AAM_Extension_MyFeature extends AAM_Core_Extension { + + /** + * Constructor + * + * @param aam $parent + * + * @return void + * + * @access public + */ + public function __construct(aam $parent) { + parent::__construct($parent); + + if (is_admin()) { + $this->registerFeature(); + } + } + + /** + * Register feature + * + * @return void + * + * @access protected + */ + protected function registerFeature() { + //add feature + $capability = aam_Core_ConfigPress::getParam( + 'aam.feature.my_feature.capability', 'administrator' + ); + + if (current_user_can($capability)) { + add_action('admin_print_scripts', array($this, 'printScripts')); + add_action('admin_print_styles', array($this, 'printStyles')); + aam_View_Collection::registerFeature((object)array( + 'uid' => 'my_feature', + 'position' => 100, + 'title' => __('My Feature', 'aam'), + 'subjects' => array( + aam_Control_Subject_Role::UID, + aam_Control_Subject_User::UID, + aam_Control_Subject_Visitor::UID + ), + 'controller' => $this + )); + } + } + + /** + * + * @return type + */ + public function content() { + ob_start(); + require dirname(__FILE__) . '/ui.phtml'; + $content = ob_get_contents(); + ob_end_clean(); + + return $content; + } + + /** + * Print necessary scripts + * + * @return void + * + * @access public + */ + public function printScripts() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_script( + 'aam-my-feature-admin', + AAM_MY_FEATURE_BASE_URL . '/my_feature.js', + array('aam-admin') + ); + } + } + + /** + * Register stylesheets + * + * @return void + * + * @access public + */ + public function printStyles() { + if ($this->getParent()->isAAMScreen()) { + wp_enqueue_style( + 'aam-my-feature-admin', + AAM_MY_FEATURE_BASE_URL . '/my_feature.css' + ); + } + } + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/images/worker.png b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/images/worker.png new file mode 100644 index 0000000..8fb52cf Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/images/worker.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/index.php b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/index.php new file mode 100644 index 0000000..862b842 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/index.php @@ -0,0 +1,15 @@ +getParent()); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.css b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.css new file mode 100644 index 0000000..83e3f5d --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.css @@ -0,0 +1,22 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ +.my-feature-banner{ + width: 100%; + background: transparent url('images/worker.png') no-repeat center 10px; + padding-top: 150px; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +.my-feature-banner .banner-style{ + margin: 0px 10px; + font-family: "Trebuchet MS", Helvetica, sans-serif; + font-size: 1.2em; + font-weight: bold; + text-align: center; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.js b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.js new file mode 100644 index 0000000..90f373a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/my_feature.js @@ -0,0 +1,20 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ + +AAM.prototype.myFeature = function() { + //Send Email to Us + jQuery('.my-feature-message-action').bind('click', function(event) { + event.preventDefault(); + jQuery('#aam_message').trigger('click'); + }); +}; + +jQuery(document).ready(function() { + aamInterface.addAction('aam_init_features', function() { + aamInterface.myFeature(); + }); +}); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/ui.phtml b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/ui.phtml new file mode 100644 index 0000000..52d552c --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_My_Feature/ui.phtml @@ -0,0 +1,19 @@ + +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/extension.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/extension.php new file mode 100644 index 0000000..5ff6f2a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/extension.php @@ -0,0 +1,384 @@ + + * @copyright Copyright C Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class AAM_Secure extends AAM_Core_Extension { + + /** + * Unique Feature ID + */ + const FEATURE_ID = 'secure'; + + /** + * + * @var type + */ + private $_cache = array(); + + /** + * + * @var type + */ + private $_cacheLimit = 1000; + + /** + * + * @var type + */ + private $_stats = array(); + + /** + * Constructor + * + * @param aam $parent Main AAM object + * + * @return void + * + * @access public + */ + public function __construct(aam $parent) { + parent::__construct($parent); + + if (is_admin()) { + //print required JS & CSS + add_action('admin_print_scripts', array($this, 'printScripts')); + add_action('admin_print_styles', array($this, 'printStyles')); + add_action('admin_head', array($this, 'adminHead')); + + //manager Admin Menu + if (aam_Core_API::isNetworkPanel()) { + add_action('network_admin_menu', array($this, 'adminMenu'), 999); + } else { + add_action('admin_menu', array($this, 'adminMenu'), 999); + } + //manager AAM Ajax Requests + add_action('wp_ajax_aam_security', array($this, 'ajax')); + } + + add_filter('wp_login_errors', array($this, 'loginFailure'), 10, 2); + add_action('wp_login', array($this, 'login'), 10, 2); + + //add_filter('authenticate', array($this, 'authenticate'), 999, 3); + } + + /** + * + * @param type $username + * @param type $user + */ + public function login($username, $user) { + $this->_cache = aam_Core_API::getBlogOption( + 'aam_security_login_cache', array() + ); + $ip = aam_Core_Request::server('REMOTE_ADDR'); + if ($this->hasIPCache($ip)) { + $data = $this->getIPCache($ip); + $data->attempts = 0; //reset counter + $this->addIPCache($ip, $data); + aam_Core_API::updateBlogOption( + 'aam_security_login_cache', $this->_cache + ); + } + } + + /** + * + * @return type + */ + public function isGeoLookupOn() { + $geo_lookup = aam_Core_ConfigPress::getParam( + 'security.login.geo_lookup', 'false' + ); + + return ($geo_lookup == 'true' ? true : false); + } + + /** + * + * @return type + */ + public function isLoginLockoutOn() { + $login_lock = aam_Core_ConfigPress::getParam( + 'security.login.lockout', 'false' + ); + + return ($login_lock == 'true' ? true : false); + } + + /** + * + * @param type $errors + * @param type $redirect_to + */ + public function loginFailure($errors, $redirect_to) { + $this->_cache = aam_Core_API::getBlogOption( + 'aam_security_login_cache', array() + ); + $this->_cacheLimit = aam_Core_ConfigPress::getParam( + 'security.login.cache_limit', 1000 + ); + if ($this->isGeoLookupOn()) { + $this->_stats = aam_Core_API::getBlogOption( + 'aam_security_login_stats', array() + ); + $info = $this->retrieveGeoData(); + if ($info instanceof stdClass) { + if (!isset($this->_stats[$info->countryCode])) { + $this->_stats[$info->countryCode] = array( + 'failed' => 0 + ); + } + $this->_stats[$info->countryCode]['failed']++; + aam_Core_API::updateBlogOption( + 'aam_security_login_stats', $this->_stats + ); + } + } + if ($this->isLoginLockoutOn()) { + $this->loginLockout(); + } + aam_Core_API::updateBlogOption( + 'aam_security_login_cache', $this->_cache + ); + + return $errors; + } + + /** + * + */ + protected function loginLockout() { + $ip = aam_Core_Request::server('REMOTE_ADDR'); + if ($this->hasIPCache($ip)) { + $info = $this->getIPCache($ip); + } else { + $info = new stdClass; + } + + if (!isset($info->attempts)) { + $info->attempts = 1; + } else { + $info->attempts++; + } + $threshold = aam_Core_ConfigPress::getParam( + 'security.login.attempts', 10 + ); + if ($info->attempts >= $threshold) { + $action = aam_Core_ConfigPress::getParam( + 'security.login.attempt_failure', 'slowdown' + ); + switch ($action) { + case 'slowdown': + $time = aam_Core_ConfigPress::getParam( + 'security.login.slowdown_time', '5' + ); + sleep(intval($time)); + break; + + case 'die': + wp_die(aam_Core_ConfigPress::getParam( + 'security.login.die_message', 'You are not allowed to login' + )); + break; + + default: + break; + } + } + } + + /** + * + * @return null + */ + protected function retrieveGeoData() { + $ip = aam_Core_Request::server('REMOTE_ADDR'); + if ($this->hasIPCache($ip)) { + $location = $this->getIPCache($ip); + } else { + $service = aam_Core_ConfigPress::getParam( + 'security.login.geoip.service', 'FreeGeoIP' + ); + $filename = dirname(__FILE__) . '/geoip/' . strtolower($service) . '.php'; + + if (file_exists($filename)) { + require_once($filename); + $location = call_user_func("{$service}::query", $ip); + $this->addIPCache($ip, $location); + } else { + $location = null; + } + } + + return $location; + } + + /** + * + * @param type $ip + * @return type + */ + protected function hasIPCache($ip) { + return (isset($this->_cache[$ip]) ? true : false); + } + + /** + * + * @param type $ip + * @return type + */ + protected function getIPCache($ip) { + return ($this->hasIPCache($ip) ? $this->_cache[$ip] : null); + } + + /** + * + * @param type $ip + * @param type $data + */ + protected function addIPCache($ip, $data) { + if (!is_null($data)) { + if ((count($this->_cache) >= $this->_cacheLimit) && !isset($this->_cache[$ip])) { + array_shift($this->_cache); + } + $this->_cache[$ip] = $data; + } + } + + /** + * Print necessary styles + * + * @return void + * + * @access public + */ + public function printStyles() { + if ($this->isSecurityScreen()) { + wp_enqueue_style('dashboard'); + wp_enqueue_style('global'); + wp_enqueue_style('wp-admin'); + wp_enqueue_style('aam-ui-style', AAM_MEDIA_URL . 'css/jquery-ui.css'); + wp_enqueue_style('aam-common-style', AAM_MEDIA_URL . 'css/common.css'); + wp_enqueue_style('aam-security-style', AAM_SECURITY_BASE_URL . '/stylesheet/security.css'); + if ($this->isGeoLookupOn()) { + wp_enqueue_style('aam-datatable', AAM_MEDIA_URL . 'css/jquery.dt.css'); + wp_enqueue_style('aam-country-flags', AAM_SECURITY_BASE_URL . '/stylesheet/flags32.css'); + } + } + } + + /** + * Print necessary scripts + * + * @return void + * + * @access public + */ + public function printScripts() { + if ($this->isSecurityScreen()) { + wp_enqueue_script('postbox'); + wp_enqueue_script('dashboard'); + if ($this->isGeoLookupOn()) { + wp_enqueue_script('aam-datatable', AAM_MEDIA_URL . 'js/jquery.dt.js'); + wp_enqueue_script('google-jsapi', 'https://www.google.com/jsapi'); + } + wp_enqueue_script('aam-security', AAM_SECURITY_BASE_URL . '/javascript/security.js'); + $localization = array( + 'nonce' => wp_create_nonce('aam_ajax'), + 'ajaxurl' => admin_url('admin-ajax.php'), + ); + wp_localize_script('aam-security', 'aamLocal', $localization); + } + } + + /** + * + */ + public function adminHead() { + if ($this->isSecurityScreen() && $this->isGeoLookupOn()) { + echo ''; + } + } + + /** + * + * @return type + */ + public function isSecurityScreen() { + return (aam_Core_Request::get('page') == 'aam-security' ? true : false); + } + + /** + * Register Admin Menu + * + * @return void + * + * @access public + */ + public function adminMenu() { + //register submenus + add_submenu_page( + 'aam', __('Security', 'aam'), __('Security', 'aam'), aam_Core_ConfigPress::getParam( + 'aam.page.security.capability', 'administrator' + ), 'aam-security', array($this, 'content') + ); + } + + /** + * + */ + public function content() { + require_once(dirname(__FILE__) . '/security.php'); + $security = new aam_View_Security(); + echo $security->run(); + } + + public function ajax() { + check_ajax_referer('aam_ajax'); + + //clean buffer to make sure that nothing messing around with system + while (@ob_end_clean()); + + //process ajax request + try { + require_once(dirname(__FILE__) . '/security.php'); + $model = new aam_View_Security(); + echo $model->processAjax(); + } catch (Exception $e) { + echo '-1'; + } + die(); + } + + /** + * + * @param type $user + * @param type $username + * @param type $password + * @return type + */ + public function authenticate($user, $username, $password) { + if (!is_wp_error($user)) { + $login_history = get_user_meta($user->ID, 'aam_login_history', true); + $ip = aam_Core_Request::server('REMOTE_ADDR'); + } + + return $user; + } + +} diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/freegeoip.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/freegeoip.php new file mode 100644 index 0000000..5d34567 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/freegeoip.php @@ -0,0 +1,31 @@ + (string) $data->CountryCode, + 'countryName' => (string) $data->CountryName, + 'region' => (string) $data->RegionCode, + 'city' => (string) $data->City, + 'zip' => (string) $data->ZipCode + ); + } else { + $geodata = null; + } + + return $geodata; + } + +} diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/geoip.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/geoip.php new file mode 100644 index 0000000..a93b0c9 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/geoip/geoip.php @@ -0,0 +1,15 @@ +getParent()); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/loader.js b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/loader.js new file mode 100644 index 0000000..2e9886f --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/loader.js @@ -0,0 +1,41 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ + +google.load('visualization', '1', {'packages': ['geochart']}); +google.setOnLoadCallback(drawRegionsMap); + +function drawRegionsMap() { + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: { + action: 'aam_security', + sub_action: 'map_data', + _ajax_nonce: aamLocal.nonce + }, + success: function(response) { + var list = new Array(); + list.push(['Country', 'Failed Attempts']); + for (var i in response.list) { + list.push(response.list[i]); + } + var data = google.visualization.arrayToDataTable(list); + + var options = { + colorAxis: {colors: ['#4374e0', '#e7711c']} // orange to blue + }; + var chart = new google.visualization.GeoChart( + document.getElementById('geo_map') + ); + chart.draw(data, options); + }, + failure: function() { + + } + }); + +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/security.js b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/security.js new file mode 100644 index 0000000..06db4fc --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/javascript/security.js @@ -0,0 +1,48 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== +*/ + +function AAMSecurity() { + +} + +AAMSecurity.prototype.init = function() { + var _this = this; + + if (jQuery('#country_list').length) { + jQuery('#country_list').dataTable({ + sDom: "t", + bAutoWidth: false, + bSort: false, + aoColumnDefs: [ + { + sClass: 'center', + aTargets: [1] + } + ] + }); + } + + jQuery('.aam-icon', '.large-icons-row').each(function(){ + jQuery(this).bind('click', function(){ + _this.switchMode(jQuery(this).attr('mode')); + }); + }); + jQuery('#setting_trigger_inline').bind('click', function(event){ + event.preventDefault(); + _this.switchMode('settings'); + }); +}; + +AAMSecurity.prototype.switchMode = function(mode) { + jQuery('.mode-container').hide(); + jQuery('#' + mode + '_mode').show(); +}; + +jQuery(document).ready(function() { + var security = new AAMSecurity(); + security.init(); +}); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/security.php b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/security.php new file mode 100644 index 0000000..efa0ead --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/security.php @@ -0,0 +1,85 @@ + + * @copyright Copyright C 2013 Vasyl Martyniuk + * @license GNU General Public License {@link http://www.gnu.org/licenses/} + */ +class aam_View_Security extends aam_View_Abstract { + + /** + * Run the Manager + * + * @return string + * + * @access public + */ + public function run() { + return $this->loadTemplate(dirname(__FILE__) . '/view/security.phtml'); + } + + /** + * + * @return type + */ + public function processAjax() { + switch (aam_Core_Request::post('sub_action')) { + case 'map_data': + $response = $this->getMapData(); + break; + + default: + $response = json_encode(array('status' => 'failure')); + break; + } + + return $response; + } + + protected function getMapData() { + $stats = aam_Core_API::getBlogOption( + 'aam_security_login_stats', array() + ); + $list = array(); + foreach($stats as $country => $data){ + $list[] = array($country, $data['failed']); + } + return json_encode( + array('list' => $list) + ); + } + + /** + * + * @return type + */ + public function isGeoLookupOn() { + $geo_lookup = aam_Core_ConfigPress::getParam( + 'security.login.geo_lookup', 'false' + ); + + return ($geo_lookup == 'true' ? true : false); + } + + /** + * + * @return type + */ + public function isLoginLockoutOn() { + $login_lock = aam_Core_ConfigPress::getParam( + 'security.login.lockout', 'false' + ); + + return ($login_lock == 'true' ? true : false); + } + +} diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/flags32.css b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/flags32.css new file mode 100644 index 0000000..f1e8fa1 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/flags32.css @@ -0,0 +1,260 @@ +.flag{ + display:block; + height:32px; + min-width:32px; + vertical-align: middle; + line-height:32px; + background:url(images/flags32.png) no-repeat 0 center; + padding-left: 36px; +} +._African_Union{background-position:0 -32px;} +._Arab_League{background-position:0 -64px;} +._ASEAN{background-position:0 -96px;} +._CARICOM{background-position:0 -128px;} +._CIS{background-position:0 -160px;} +._Commonwealth{background-position:0 -192px;} +._England{background-position:0 -224px;} +._European_Union, .eu{background-position:0 -256px;} +._Islamic_Conference{background-position:0 -288px;} +._Kosovo{background-position:0 -320px;} +._NATO{background-position:0 -352px;} +._Northern_Cyprus{background-position:0 -384px;} +._Northern_Ireland{background-position:0 -416px;} +._Olimpic_Movement{background-position:0 -448px;} +._OPEC{background-position:0 -480px;} +._Red_Cross{background-position:0 -512px;} +._Scotland{background-position:0 -544px;} +._Somaliland{background-position:0 -576px;} +._Tibet{background-position:0 -608px;} +._United_Nations{background-position:0 -640px;} +._Wales{background-position:0 -672px;} +.ad{background-position:0 -704px;} +.ae{background-position:0 -736px;} +.af{background-position:0 -768px;} +.ag{background-position:0 -800px;} +.ai{background-position:0 -832px;} +.al{background-position:0 -864px;} +.am{background-position:0 -896px;} +.ao{background-position:0 -928px;} +.aq{background-position:0 -960px;} +.ar{background-position:0 -992px;} +.as{background-position:0 -1024px;} +.at{background-position:0 -1056px;} +.au{background-position:0 -1088px;} +.aw{background-position:0 -1120px;} +.ax{background-position:0 -1152px;} +.az{background-position:0 -1184px;} +.ba{background-position:0 -1216px;} +.bb{background-position:0 -1248px;} +.bd{background-position:0 -1280px;} +.be{background-position:0 -1312px;} +.bf{background-position:0 -1344px;} +.bg{background-position:0 -1376px;} +.bh{background-position:0 -1408px;} +.bi{background-position:0 -1440px;} +.bj{background-position:0 -1472px;} +.bm{background-position:0 -1504px;} +.bn{background-position:0 -1536px;} +.bo{background-position:0 -1568px;} +.br{background-position:0 -1600px;} +.bs{background-position:0 -1632px;} +.bt{background-position:0 -1664px;} +.bw{background-position:0 -1696px;} +.by{background-position:0 -1728px;} +.bz{background-position:0 -1760px;} +.ca{background-position:0 -1792px;} +.cd{background-position:0 -1824px;} +.cf{background-position:0 -1856px;} +.cg{background-position:0 -1888px;} +.ch{background-position:0 -1920px;} +.ci{background-position:0 -1952px;} +.ck{background-position:0 -1984px;} +.cl{background-position:0 -2016px;} +.cm{background-position:0 -2048px;} +.cn{background-position:0 -2080px;} +.co{background-position:0 -2112px;} +.cr{background-position:0 -2144px;} +.cu{background-position:0 -2176px;} +.cv{background-position:0 -2208px;} +.cy{background-position:0 -2240px;} +.cz{background-position:0 -2272px;} +.de{background-position:0 -2304px;} +.dj{background-position:0 -2336px;} +.dk{background-position:0 -2368px;} +.dm{background-position:0 -2400px;} +.do{background-position:0 -2432px;} +.dz{background-position:0 -2464px;} +.ec{background-position:0 -2496px;} +.ee{background-position:0 -2528px;} +.eg{background-position:0 -2560px;} +.eh{background-position:0 -2592px;} +.er{background-position:0 -2624px;} +.es{background-position:0 -2656px;} +.et{background-position:0 -2688px;} +.fi{background-position:0 -2720px;} +.fj{background-position:0 -2752px;} +.fm{background-position:0 -2784px;} +.fo{background-position:0 -2816px;} +.fr{background-position:0 -2848px;} +.bl, .cp, .mf, .yt{background-position:0 -2848px;} +.ga{background-position:0 -2880px;} +.gb{background-position:0 -2912px;} +.sh{background-position:0 -2912px;} +.gd{background-position:0 -2944px;} +.ge{background-position:0 -2976px;} +.gg{background-position:0 -3008px;} +.gh{background-position:0 -3040px;} +.gi{background-position:0 -3072px;} +.gl{background-position:0 -3104px;} +.gm{background-position:0 -3136px;} +.gn{background-position:0 -3168px;} +.gp{background-position:0 -3200px;} +.gq{background-position:0 -3232px;} +.gr{background-position:0 -3264px;} +.gt{background-position:0 -3296px;} +.gu{background-position:0 -3328px;} +.gw{background-position:0 -3360px;} +.gy{background-position:0 -3392px;} +.hk{background-position:0 -3424px;} +.hn{background-position:0 -3456px;} +.hr{background-position:0 -3488px;} +.ht{background-position:0 -3520px;} +.hu{background-position:0 -3552px;} +.id{background-position:0 -3584px;} +.mc{background-position:0 -3584px;} +.ie{background-position:0 -3616px;} +.il{background-position:0 -3648px;} +.im{background-position:0 -3680px;} +.in{background-position:0 -3712px;} +.iq{background-position:0 -3744px;} +.ir{background-position:0 -3776px;} +.is{background-position:0 -3808px;} +.it{background-position:0 -3840px;} +.je{background-position:0 -3872px;} +.jm{background-position:0 -3904px;} +.jo{background-position:0 -3936px;} +.jp{background-position:0 -3968px;} +.ke{background-position:0 -4000px;} +.kg{background-position:0 -4032px;} +.kh{background-position:0 -4064px;} +.ki{background-position:0 -4096px;} +.km{background-position:0 -4128px;} +.kn{background-position:0 -4160px;} +.kp{background-position:0 -4192px;} +.kr{background-position:0 -4224px;} +.kw{background-position:0 -4256px;} +.ky{background-position:0 -4288px;} +.kz{background-position:0 -4320px;} +.la{background-position:0 -4352px;} +.lb{background-position:0 -4384px;} +.lc{background-position:0 -4416px;} +.li{background-position:0 -4448px;} +.lk{background-position:0 -4480px;} +.lr{background-position:0 -4512px;} +.ls{background-position:0 -4544px;} +.lt{background-position:0 -4576px;} +.lu{background-position:0 -4608px;} +.lv{background-position:0 -4640px;} +.ly{background-position:0 -4672px;} +.ma{background-position:0 -4704px;} +.md{background-position:0 -4736px;} +.me{background-position:0 -4768px;} +.mg{background-position:0 -4800px;} +.mh{background-position:0 -4832px;} +.mk{background-position:0 -4864px;} +.ml{background-position:0 -4896px;} +.mm{background-position:0 -4928px;} +.mn{background-position:0 -4960px;} +.mo{background-position:0 -4992px;} +.mq{background-position:0 -5024px;} +.mr{background-position:0 -5056px;} +.ms{background-position:0 -5088px;} +.mt{background-position:0 -5120px;} +.mu{background-position:0 -5152px;} +.mv{background-position:0 -5184px;} +.mw{background-position:0 -5216px;} +.mx{background-position:0 -5248px;} +.my{background-position:0 -5280px;} +.mz{background-position:0 -5312px;} +.na{background-position:0 -5344px;} +.nc{background-position:0 -5376px;} +.ne{background-position:0 -5408px;} +.ng{background-position:0 -5440px;} +.ni{background-position:0 -5472px;} +.nl{background-position:0 -5504px;} +.bq{background-position:0 -5504px;} +.no{background-position:0 -5536px;} +.bv, .nq, .sj{background-position:0 -5536px;} +.np{background-position:0 -5568px;} +.nr{background-position:0 -5600px;} +.nz{background-position:0 -5632px;} +.om{background-position:0 -5664px;} +.pa{background-position:0 -5696px;} +.pe{background-position:0 -5728px;} +.pf{background-position:0 -5760px;} +.pg{background-position:0 -5792px;} +.ph{background-position:0 -5824px;} +.pk{background-position:0 -5856px;} +.pl{background-position:0 -5888px;} +.pr{background-position:0 -5920px;} +.ps{background-position:0 -5952px;} +.pt{background-position:0 -5984px;} +.pw{background-position:0 -6016px;} +.py{background-position:0 -6048px;} +.qa{background-position:0 -6080px;} +.re{background-position:0 -6112px;} +.ro{background-position:0 -6144px;} +.rs{background-position:0 -6176px;} +.ru{background-position:0 -6208px;} +.rw{background-position:0 -6240px;} +.sa{background-position:0 -6272px;} +.sb{background-position:0 -6304px;} +.sc{background-position:0 -6336px;} +.sd{background-position:0 -6368px;} +.se{background-position:0 -6400px;} +.sg{background-position:0 -6432px;} +.si{background-position:0 -6464px;} +.sk{background-position:0 -6496px;} +.sl{background-position:0 -6528px;} +.sm{background-position:0 -6560px;} +.sn{background-position:0 -6592px;} +.so{background-position:0 -6624px;} +.sr{background-position:0 -6656px;} +.st{background-position:0 -6688px;} +.sv{background-position:0 -6720px;} +.sy{background-position:0 -6752px;} +.sz{background-position:0 -6784px;} +.tc{background-position:0 -6816px;} +.td{background-position:0 -6848px;} +.tg{background-position:0 -6880px;} +.th{background-position:0 -6912px;} +.tj{background-position:0 -6944px;} +.tl{background-position:0 -6976px;} +.tm{background-position:0 -7008px;} +.tn{background-position:0 -7040px;} +.to{background-position:0 -7072px;} +.tr{background-position:0 -7104px;} +.tt{background-position:0 -7136px;} +.tv{background-position:0 -7168px;} +.tw{background-position:0 -7200px;} +.tz{background-position:0 -7232px;} +.ua{background-position:0 -7264px;} +.ug{background-position:0 -7296px;} +.us{background-position:0 -7328px;} +.uy{background-position:0 -7360px;} +.uz{background-position:0 -7392px;} +.va{background-position:0 -7424px;} +.vc{background-position:0 -7456px;} +.ve{background-position:0 -7488px;} +.vg{background-position:0 -7520px;} +.vi{background-position:0 -7552px;} +.vn{background-position:0 -7584px;} +.vu{background-position:0 -7616px;} +.ws{background-position:0 -7648px;} +.ye{background-position:0 -7680px;} +.za{background-position:0 -7712px;} +.zm{background-position:0 -7744px;} +.zw{background-position:0 -7776px;} +.sx{background-position:0 -7808px;} +.cw{background-position:0 -7840px;} +.ss{background-position:0 -7872px;} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/deny.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/deny.png new file mode 100644 index 0000000..17bdb15 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/deny.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/flags32.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/flags32.png new file mode 100644 index 0000000..66a0d15 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/flags32.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/large-iconset.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/large-iconset.png new file mode 100644 index 0000000..e66c4e2 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/large-iconset.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/restriction.png b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/restriction.png new file mode 100644 index 0000000..61325d6 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/images/restriction.png differ diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/security.css b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/security.css new file mode 100644 index 0000000..fe5dd48 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/stylesheet/security.css @@ -0,0 +1,84 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== +*/ + +#aam_form{ + position: relative; +} + +.clear{ + line-height: 0; + font-size: 0; + padding: 0; + margin: 0; + clear: both; +} + +.main-inside{ + position: relative; + min-height: 200px; +} + +.aam-main-loader{ + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background: transparent url('images/main-loader.gif') no-repeat center; +} + +.aam-icon-large span { + background-image: url('images/large-iconset.png'); +} + +.aam-icon-large-glob span{ + background-position: 0 0; +} + +.aam-icon-large-glob:hover span{ + background-position: 0 -48px; +} + +.aam-icon-large-settings span{ + background-position: -48px 0; +} + +.aam-icon-large-settings:hover span{ + background-position: -48px -48px; +} + + +.restriction{ + background: transparent url('images/restriction.png') no-repeat center; +} + +.deny{ + background: transparent url('images/deny.png') no-repeat center; +} + +.center{ + text-align: center; +} + +.feature-off-notice{ + width: 90%; + text-align: center; + padding: 10px 0; + font-size: 1.1em; + margin: 5px auto 0 auto; + border: 1px solid #FFAAAA; +} + +.feature-off-notice a{ + text-decoration: none; + color: #257DA6; +} + +#settings_mode{ + text-align: justify; + padding: 5px 15px; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/view/security.phtml b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/view/security.phtml new file mode 100644 index 0000000..d52efff --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/extension/AAM_Secure/view/security.phtml @@ -0,0 +1,156 @@ + +
        +
        +
        +
        +
        +
        +

        + +

        +
        +
        + isGeoLookupOn()) { ?> +
        + +

        + The Geo Lookup feature is off. Turn it on with ConfigPress.
        + For more information check Settings tab. +

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

        + +

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

        + +

        +
        +
        + + + + + + + +
        +
        + + + + +
        +
        +
        +
        +
        +
        + isGeoLookupOn()) { ?> +
        +
        +
        +
        +
        +

        + +

        +
        + + + + + + + + + +
        CountryAction
        +
        +
        +
        +
        +
        + +
        +
        \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.mo b/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.mo new file mode 100644 index 0000000..3b5ab27 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.po b/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.po new file mode 100644 index 0000000..010feff --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-de_DE.po @@ -0,0 +1,336 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2013-12-01 14:07-0500\n" +"PO-Revision-Date: 2014-01-02 21:40-0500\n" +"Last-Translator: Vasyl Martyniuk \n" +"Language-Team: WPAAM \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: de_DE\n" + +#: aam.php:243 aam.php:248 aam.php:267 +msgid "Access denied" +msgstr "Zugriff verweigert" + +#: aam.php:691 aam.php:692 +msgid "AAM" +msgstr "AAM" + +#: aam.php:701 aam.php:702 +msgid "Access Control" +msgstr "Zugangs Kontrolle" + +#: aam.php:709 aam.php:710 +msgid "Extensions" +msgstr "Erweiterungen" + +#: application/view/capability.php:98 application/view/capability.php:179 +msgid "System" +msgstr "System" + +#: application/view/capability.php:99 application/view/capability.php:181 +msgid "Post & Page" +msgstr "Artikel & Seiten" + +#: application/view/capability.php:100 application/view/capability.php:183 +msgid "Backend Interface" +msgstr "Backend Interface" + +#: application/view/capability.php:101 +msgid "Miscellaneous" +msgstr "Diverses" + +#: application/view/capability.php:185 +msgid "Miscelaneous" +msgstr "Diverses" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "Rollen" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "Rollen Manager" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "Benutzer" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "Benutzer Manager" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "Besucher" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "Besucher Manager" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "Admin Menü" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"Zugangskontrolle für das Admin Menü. Zugangs Beschränkung das vollständige " +"Menü oder Untermenüs . Anmerkung, das Menü wird aufgrund der " +"Benutzer- oder Rolleneigenschaften erstellt." + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "Metabox & Widgets" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"Sortiere nach den Metaboxen oder Widgets der ausgewählten Rolle oder des " +"Benutzers. Wenn eine Metabox oder ein Widget nicht angezeigt wird, klicke " +"auf Refresh the List oder kopiere den direkten Link zu der Site wo " +"die Metabox oder das Widget angezeigt werden und klicke Retrieve " +"Metaboxes from Link ." + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "Eigenschaft" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"Verwalte die Eigenschaften für die ausgewählte Rolle oder den Benutzer. " +"Anmerkung, die Eigenschafen der Benutzer werden von der Benutzerrolle " +"vererbt.
        Achtung!, sei vorsichtig mit den Eigenschaften. Das " +"Löschen oder das Abwählen von Eigenschaften kann zeitweisen oder dauerhaften " +"Verlust von Funktionen verursachen." + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "Artikel & Kategorien" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"Verwalte den Zugang zu einzelnen Artikeln oder Ebenen Unter " +"Artikeln werden alle Artikel, Seiten oder custom post type und unter " +"Ebenen z.B. Kategorien verstanden." + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "Event Manager" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"Definiere deine eigene Aktion, wenn ein Bestimmtes Ereignis auf deinem Blog " +"eintritt. Diese Auswahl erlaubt dir automatisch eine Aktion auszulösen, wenn " +"sich der Inhalt eines Artikels oder der Seitenstatus geändert haben. Du " +"kannst Email Benachichtugungen senden, den Artikel Status ändern oder eigene " +"Ereignisse beschreiben." + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "ConfigPress" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" +"Kontrolliere das Verhalten von AAM mit ConfigPress Für mehr Details " +"schaue bitte ins ConfigPress Tutorial." + +#: application/view/manager.php:342 +msgid "Rollback Settings" +msgstr "Wiederholungseinstellungen" + +#: application/view/manager.php:343 +msgid "Cancel" +msgstr "Abbrechen" + +#: application/view/manager.php:344 +msgid "Send E-mail" +msgstr "E-Mail senden" + +#: application/view/manager.php:345 application/view/manager.php:351 +msgid "Add New Role" +msgstr "Neue Rolle hinzufügen" + +#: application/view/manager.php:346 +msgid "Manage" +msgstr "Verwalten" + +#: application/view/manager.php:347 +msgid "Edit" +msgstr "Bearbeiten" + +#: application/view/manager.php:348 +msgid "Delete" +msgstr "Löschen" + +#: application/view/manager.php:349 +msgid "Filtered" +msgstr "Sortieren" + +#: application/view/manager.php:350 +msgid "Clear" +msgstr "Leeren" + +#: application/view/manager.php:352 +msgid "Save Changes" +msgstr "Änderungen speichern" + +#: application/view/manager.php:353 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"Das System hat %d Benutzer mit dieser Rolle identifiziert. Alle Benutzer mit " +"der Rolle %s werden automatisch gelöscht." + +#: application/view/manager.php:354 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "Bist du sicher, dass du die Rolle %s löschen möchtest?" + +#: application/view/manager.php:355 +msgid "Delete Role" +msgstr "Rolle löschen" + +#: application/view/manager.php:356 +msgid "Add User" +msgstr "Benutzer hinzufügen" + +#: application/view/manager.php:357 +msgid "Filter Users" +msgstr "Benutzer sortieren" + +#: application/view/manager.php:358 application/view/manager.php:374 +msgid "Refresh List" +msgstr "Liste aktualisieren" + +#: application/view/manager.php:359 +msgid "Block" +msgstr "Block" + +#: application/view/manager.php:360 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "Bist du sicher, dass du den Benutzer %s löschen möchtest?" + +#: application/view/manager.php:361 +msgid "Filter Capabilities by Category" +msgstr "Sortiere die Eigenschaften nach der Kategorie" + +#: application/view/manager.php:362 +msgid "Inherit Capabilities" +msgstr "Vererbe Eigenschaften" + +#: application/view/manager.php:363 +msgid "Add New Capability" +msgstr "Neue Eigenschaft hinzufügen" + +#: application/view/manager.php:364 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "Bist du sicher, dass du die Eigenschaft %s löschen möchtest?" + +#: application/view/manager.php:365 +msgid "Delete Capability" +msgstr "Eigenschaft löschen" + +#: application/view/manager.php:366 +msgid "Select Role" +msgstr "Rolle auswählen" + +#: application/view/manager.php:367 +msgid "Add Capability" +msgstr "Eigenschaft hinzufügen" + +#: application/view/manager.php:368 +msgid "Add Event" +msgstr "Event hinzufügen" + +#: application/view/manager.php:369 +msgid "Edit Event" +msgstr "Event bearbeiten" + +#: application/view/manager.php:370 application/view/manager.php:372 +msgid "Delete Event" +msgstr "Event löschen" + +#: application/view/manager.php:371 +msgid "Save Event" +msgstr "Event speichern" + +#: application/view/manager.php:373 +msgid "Filter Posts by Post Type" +msgstr "Sortiere Artikel nach Artikel Typ" + +#: application/view/manager.php:375 +msgid "Restore Default" +msgstr "Standard wiederherstellen" + +#: application/view/manager.php:376 +msgid "Apply" +msgstr "Zustimmen" + +#: application/view/manager.php:377 +msgid "Edit Term" +msgstr "Ebene bearbeiten" + +#: application/view/manager.php:378 +msgid "Manager Access" +msgstr "Zugangs Verwaltung" + +#: application/view/manager.php:379 +msgid "Unlock Default Accesss Control" +msgstr "Öffne Standard Zugangs Kontrolle" + +#: application/view/manager.php:380 +msgid "Close" +msgstr "Schließen" + +#: application/view/manager.php:381 +msgid "Edit Role" +msgstr "Rolle bearbeiten" + +#: application/view/metabox.php:179 +msgid "Dashboard Widgets" +msgstr "Dashboard Widgets" + +#: application/view/metabox.php:183 +msgid "Frontend Widgets" +msgstr "Frontend Widgets" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "[leer]" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-en_US.mo b/wp-content/plugins/advanced-access-manager/lang/aam-en_US.mo new file mode 100644 index 0000000..be7d7e8 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-en_US.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-en_US.po b/wp-content/plugins/advanced-access-manager/lang/aam-en_US.po new file mode 100644 index 0000000..26aab65 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-en_US.po @@ -0,0 +1,310 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2013-12-01 14:07-0500\n" +"PO-Revision-Date: 2014-01-02 21:40-0500\n" +"Last-Translator: Vasyl Martyniuk \n" +"Language-Team: WPAAM \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" +"X-Generator: Poedit 1.6.3\n" + +#: aam.php:243 aam.php:248 aam.php:267 +msgid "Access denied" +msgstr "" + +#: aam.php:691 aam.php:692 +msgid "AAM" +msgstr "" + +#: aam.php:701 aam.php:702 +msgid "Access Control" +msgstr "" + +#: aam.php:709 aam.php:710 +msgid "Extensions" +msgstr "" + +#: application/view/capability.php:98 application/view/capability.php:179 +msgid "System" +msgstr "" + +#: application/view/capability.php:99 application/view/capability.php:181 +msgid "Post & Page" +msgstr "" + +#: application/view/capability.php:100 application/view/capability.php:183 +msgid "Backend Interface" +msgstr "" + +#: application/view/capability.php:101 +msgid "Miscellaneous" +msgstr "" + +#: application/view/capability.php:185 +msgid "Miscelaneous" +msgstr "" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" + +#: application/view/manager.php:342 +msgid "Rollback Settings" +msgstr "" + +#: application/view/manager.php:343 +msgid "Cancel" +msgstr "" + +#: application/view/manager.php:344 +msgid "Send E-mail" +msgstr "" + +#: application/view/manager.php:345 application/view/manager.php:351 +msgid "Add New Role" +msgstr "" + +#: application/view/manager.php:346 +msgid "Manage" +msgstr "" + +#: application/view/manager.php:347 +msgid "Edit" +msgstr "" + +#: application/view/manager.php:348 +msgid "Delete" +msgstr "" + +#: application/view/manager.php:349 +msgid "Filtered" +msgstr "" + +#: application/view/manager.php:350 +msgid "Clear" +msgstr "" + +#: application/view/manager.php:352 +msgid "Save Changes" +msgstr "" + +#: application/view/manager.php:353 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" + +#: application/view/manager.php:354 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "" + +#: application/view/manager.php:355 +msgid "Delete Role" +msgstr "" + +#: application/view/manager.php:356 +msgid "Add User" +msgstr "" + +#: application/view/manager.php:357 +msgid "Filter Users" +msgstr "" + +#: application/view/manager.php:358 application/view/manager.php:374 +msgid "Refresh List" +msgstr "" + +#: application/view/manager.php:359 +msgid "Block" +msgstr "" + +#: application/view/manager.php:360 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "" + +#: application/view/manager.php:361 +msgid "Filter Capabilities by Category" +msgstr "" + +#: application/view/manager.php:362 +msgid "Inherit Capabilities" +msgstr "" + +#: application/view/manager.php:363 +msgid "Add New Capability" +msgstr "" + +#: application/view/manager.php:364 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "" + +#: application/view/manager.php:365 +msgid "Delete Capability" +msgstr "" + +#: application/view/manager.php:366 +msgid "Select Role" +msgstr "" + +#: application/view/manager.php:367 +msgid "Add Capability" +msgstr "" + +#: application/view/manager.php:368 +msgid "Add Event" +msgstr "" + +#: application/view/manager.php:369 +msgid "Edit Event" +msgstr "" + +#: application/view/manager.php:370 application/view/manager.php:372 +msgid "Delete Event" +msgstr "" + +#: application/view/manager.php:371 +msgid "Save Event" +msgstr "" + +#: application/view/manager.php:373 +msgid "Filter Posts by Post Type" +msgstr "" + +#: application/view/manager.php:375 +msgid "Restore Default" +msgstr "" + +#: application/view/manager.php:376 +msgid "Apply" +msgstr "" + +#: application/view/manager.php:377 +msgid "Edit Term" +msgstr "" + +#: application/view/manager.php:378 +msgid "Manager Access" +msgstr "" + +#: application/view/manager.php:379 +msgid "Unlock Default Accesss Control" +msgstr "" + +#: application/view/manager.php:380 +msgid "Close" +msgstr "" + +#: application/view/manager.php:381 +msgid "Edit Role" +msgstr "" + +#: application/view/metabox.php:179 +msgid "Dashboard Widgets" +msgstr "" + +#: application/view/metabox.php:183 +msgid "Frontend Widgets" +msgstr "" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.mo b/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.mo new file mode 100644 index 0000000..12a2708 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.po b/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.po new file mode 100644 index 0000000..0935c9f --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-es_ES.po @@ -0,0 +1,998 @@ +msgid "" +msgstr "" +"Project-Id-Version: Advanced Access Manager\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-12-01 14:07-0500\n" +"PO-Revision-Date: 2014-01-03 18:30-0300\n" +"Last-Translator: Esteban Truelsegaard \n" +"Language-Team: Vasyl Martyniuk \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__\n" +"X-Generator: Poedit 1.5.7\n" +"X-Poedit-SearchPath-0: .\n" + +#: aam.php:243 aam.php:248 aam.php:267 +msgid "Access denied" +msgstr "Acceso Denegado" + +#: aam.php:691 aam.php:692 +msgid "AAM" +msgstr "Permisos AAM" + +#: aam.php:701 aam.php:702 +msgid "Access Control" +msgstr "Control de Accesos" + +#: aam.php:709 aam.php:710 +msgid "Extensions" +msgstr "Extensiones" + +#: application/view/capability.php:98 application/view/capability.php:179 +msgid "System" +msgstr "Sistema" + +#: application/view/capability.php:99 application/view/capability.php:181 +msgid "Post & Page" +msgstr "Entrada & Página" + +#: application/view/capability.php:100 application/view/capability.php:183 +msgid "Backend Interface" +msgstr "Backend Interface" + +#: application/view/capability.php:101 +msgid "Miscellaneous" +msgstr "Misceláneo" + +#: application/view/capability.php:185 +msgid "Miscelaneous" +msgstr "Misceláneo" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "Roles" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "Administrar Roles" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "Usuarios" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "Administrar Usuario" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "Visita" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "Administrar Visitas" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "Menú principal" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"Control de Accesos al Menu Admin. Restringe accesos a todo el Menú o por " +"Submenú. Nota, el menú es mostrado basado en el Rol o capabilities " +"del Usuario." + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "Metabox & Widget" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"Filtrar lista de Metaboxes o Widgets para el Rol o Usuario seleccionado. Si " +"el metabox o widget no está listado, intente clickeando el botón " +"Actualizar Lista o Copie & Pegue el link directo a la página donde se " +"muestra el metabox o widget y toque el botón Recuperar Metaboxes desde " +"link." + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "Capability" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"Administrar lista de Capabilities para el Usuario o Rol seleccionado. " +"Nota, la lista de capacidades se heredan del Rol de usuario.
        Cuidado! Sea cuidadoso con las capacidades. Borrar o desmarcar una " +"capability puede causar perdida de control temporal o permanente sobre " +"alguna característica o el panel de Wordpress." + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "Entradas & Taxonomias" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"Administrar acceso sobre Entrada o Taxonomía individual. Nota, " +"bajo Entrada, se asume cualquier post, página o custom post type. Y " +"bajo Taxonomía, cualquier término como Categorías de Entradas." + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "Administrar Eventos" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"Define su propia acción cuando ocurre algún evento en su blog. Esta sección " +"le permite agregar una acción a un evento como cambio de contenido de una " +"entrada, o el estado de actualización de una página. Puede enviar una " +"notificación por e-mail, cambiar el estado de la entrada o escribir su " +"propio manejador de eventos." + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "Configuración" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" +"Controle el comportamiento de AAM con ConfigPress. Para mas detalles " +"mire ConfigPress tutorial." + +#: application/view/manager.php:342 +msgid "Rollback Settings" +msgstr "Recuperar Valores" + +#: application/view/manager.php:343 +msgid "Cancel" +msgstr "Cancelar" + +#: application/view/manager.php:344 +msgid "Send E-mail" +msgstr "Enviar email" + +#: application/view/manager.php:345 application/view/manager.php:351 +msgid "Add New Role" +msgstr "Agregar Nuevo Rol" + +#: application/view/manager.php:346 +msgid "Manage" +msgstr "Administrar" + +#: application/view/manager.php:347 +msgid "Edit" +msgstr "Editor" + +#: application/view/manager.php:348 +msgid "Delete" +msgstr "Borrar" + +#: application/view/manager.php:349 +msgid "Filtered" +msgstr "Filtrado" + +#: application/view/manager.php:350 +msgid "Clear" +msgstr "Limpìar" + +#: application/view/manager.php:352 +msgid "Save Changes" +msgstr "Grabar Cambios" + +#: application/view/manager.php:353 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"El sistema ha detectado %d usuario(s) con este rol. ¡Todos los Usuarios con " +"Rol %s serán borrados automáticamente!" + +#: application/view/manager.php:354 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "Está seguro de borrar el rol %s?" + +#: application/view/manager.php:355 +msgid "Delete Role" +msgstr "Borrar Rol" + +#: application/view/manager.php:356 +msgid "Add User" +msgstr "Agregar Usuario" + +#: application/view/manager.php:357 +msgid "Filter Users" +msgstr "Filtrar Usuarios" + +#: application/view/manager.php:358 application/view/manager.php:374 +msgid "Refresh List" +msgstr "Refrescar Lista" + +#: application/view/manager.php:359 +msgid "Block" +msgstr "Bloquear" + +#: application/view/manager.php:360 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "Está seguro de borrar el usuario %s?" + +#: application/view/manager.php:361 +msgid "Filter Capabilities by Category" +msgstr "Filtrar Capabilities por Categoría" + +#: application/view/manager.php:362 +msgid "Inherit Capabilities" +msgstr "Inherit Capabilities" + +#: application/view/manager.php:363 +msgid "Add New Capability" +msgstr "Agregar nueva Capability" + +#: application/view/manager.php:364 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "Por favor confirme el borrado de Capability - %s" + +#: application/view/manager.php:365 +msgid "Delete Capability" +msgstr "Borrar Capability" + +#: application/view/manager.php:366 +msgid "Select Role" +msgstr "Seleccionar Rol" + +#: application/view/manager.php:367 +msgid "Add Capability" +msgstr "Agregar Capability" + +#: application/view/manager.php:368 +msgid "Add Event" +msgstr "Agregar Evento" + +#: application/view/manager.php:369 +msgid "Edit Event" +msgstr "Editar Evento" + +#: application/view/manager.php:370 application/view/manager.php:372 +msgid "Delete Event" +msgstr "Borrar Evento" + +#: application/view/manager.php:371 +msgid "Save Event" +msgstr "Salvar Evento" + +#: application/view/manager.php:373 +msgid "Filter Posts by Post Type" +msgstr "Filtrar Entradas por Post Type" + +#: application/view/manager.php:375 +msgid "Restore Default" +msgstr "Restaurar valores por defecto" + +#: application/view/manager.php:376 +msgid "Apply" +msgstr "Aplicar Todo" + +#: application/view/manager.php:377 +msgid "Edit Term" +msgstr "Editar Term" + +#: application/view/manager.php:378 +msgid "Manager Access" +msgstr "Administrar Accesos" + +#: application/view/manager.php:379 +msgid "Unlock Default Accesss Control" +msgstr "Desbloquear Control de Accesos por Defecto" + +#: application/view/manager.php:380 +msgid "Close" +msgstr "Cerrar" + +#: application/view/manager.php:381 +msgid "Edit Role" +msgstr "Editar Rol" + +#: application/view/metabox.php:179 +msgid "Dashboard Widgets" +msgstr "Metaboxes & Widgets" + +#: application/view/metabox.php:183 +msgid "Frontend Widgets" +msgstr "Frontend Widgets" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "[vaciar]" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "Todo" + +#~ msgid "Password Protected" +#~ msgstr "Protegido por contraseña" + +#~ msgid "Public" +#~ msgstr "Público" + +#~ msgid "Advanced Access Manager" +#~ msgstr "Administrador de Accesos" + +#~ msgid "Alert" +#~ msgstr "Alerta" + +#~ msgid "Options updated successfully" +#~ msgstr "Opciones guardadas" + +#~ msgid "Drag and Drop Menu in the List and click Save Order" +#~ msgstr "" +#~ "Para Reorganizar el menu sólo arrastre y suelte Items en la lista y " +#~ "clickee Salvar Orden" + +#~ msgid "Reorganize" +#~ msgstr "Reorganizar" + +#~ msgid "Whole Branch" +#~ msgstr "Toda la Rama" + +#~ msgid "" +#~ "To initialize list of metaboxes manually, copy and paste the URL to edit " +#~ "screen page (e.g. http://localhost/wp-admin/post.php?post=1&action=edit) " +#~ "into text field and click \"Initiate URL\". List of all new metaboxes " +#~ "will be added automatically." +#~ msgstr "" +#~ "Para inicializar la lista de metaboxes manualmente, copie y pegue la URL " +#~ "a la pag. admin en este sitio en el campo de texto y clickee \"Iniciar URL" +#~ "\". La lista de todas las metaboxes nuevas serán agregadas " +#~ "automaticamente." + +#~ msgid "Enter Correct URL" +#~ msgstr "Ingrese URL correcta" + +#~ msgid "Initialize URL" +#~ msgstr "Inicializar URL" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Priority" +#~ msgstr "Prioridad" + +#~ msgid "Position" +#~ msgstr "Posición" + +#~ msgid "Restrict" +#~ msgstr "Restringir" + +#~ msgid "List of Metaboxes is empty or not initialized." +#~ msgstr "La lista de metaboxes esta vacía o no inicializada." + +#~ msgid "Initialize the List" +#~ msgstr "Inicializar la Lista" + +#~ msgid "Error" +#~ msgstr "Error" + +#~ msgid "Role Administrator's List of Capabilities" +#~ msgstr "Dar lista de Capabilities de Administrador" + +#~ msgid "Administrator" +#~ msgstr "Administrador" + +#~ msgid "Role Editor's List of Capabilities" +#~ msgstr "Dar lista de Capabilities de Editor" + +#~ msgid "Role Author's List of Capabilities" +#~ msgstr "Dar lista de Capabilities de Autor" + +#~ msgid "Author" +#~ msgstr "Autor" + +#~ msgid "Role Contributor's List of Capabilities" +#~ msgstr "Dar lista de Capabilities de Contribuidor" + +#~ msgid "Contributor" +#~ msgstr "Contribuidor" + +#~ msgid "Role Subscriber's List of Capabilities" +#~ msgstr "Dar lista de Capabilities de Suscriptor" + +#~ msgid "Subscriber" +#~ msgstr "Suscriptor" + +#~ msgid "Collapse All" +#~ msgstr "Colapsar Todo" + +#~ msgid "Expand All" +#~ msgstr "Expandir Todo" + +#~ msgid "Error during saving" +#~ msgstr "Error mientras guardaba" + +#~ msgid "Apply Restrictions Only for Current Role or User" +#~ msgstr "Aplicar Restricciones solo para el Rol o Usuario Actual" + +#~ msgid "Apply Restrictions for All Roles" +#~ msgstr "Aplicar valores para TODOS los Roles de Usuario ?" + +#~ msgid "Apply for All" +#~ msgstr "Aplicar para Todo" + +#~ msgid "Select Post, Page or Taxonomy" +#~ msgstr "Seleccionar Entrada, Página o Taxonomía" + +#~ msgid "Click to toggle" +#~ msgstr "Click para intercambiar" + +#~ msgid "General" +#~ msgstr "General" + +#~ msgid "Current Role" +#~ msgstr "Rol Actual" + +#~ msgid "OK" +#~ msgstr "OK" + +#~ msgid "Saving..." +#~ msgstr "Salvando..." + +#~ msgid "Save" +#~ msgstr "Salvar" + +#~ msgid "Enter New Role" +#~ msgstr "Ingrese Nuevo Rol" + +#~ msgid "Add" +#~ msgstr "Agregar" + +#~ msgid "New Role Created successfully" +#~ msgstr "Nuevo Rol creado" + +#~ msgid "Role can not be created" +#~ msgstr "El Rol no puede ser creado" + +#~ msgid "Delete Role?" +#~ msgstr "Borrar Rol ?" + +#~ msgid "Please confirm deleting Role %s" +#~ msgstr "Por favor confirme el borrado del Rol %s" + +#~ msgid "Save Menu Order" +#~ msgstr "Salvar Orden del Menú?" + +#~ msgid "Save Menu Order ONLY for Role %s?" +#~ msgstr "Le gustaría salvar el orden del Menú SOLO para el Rol %s?" + +#~ msgid "Delete Capability?" +#~ msgstr "Borrar Capability?" + +#~ msgid "Restore Default Settings?" +#~ msgstr "Restaurar valores por defecto de Rol?" + +#~ msgid "All current settings will be lost. Are you sure?" +#~ msgstr "Todos los valores actuales se perderán. Está seguro?" + +#~ msgid "Apply Setting for ALL Roles?" +#~ msgstr "Aplicar valores para TODOS los Roles de Usuario ?" + +#~ msgid "Do you really want to apply these settings to ALL Roles?" +#~ msgstr "" +#~ "Realmente quiere aplicar estos valores para TODOS los Roles de " +#~ "Usuario ?" + +#~ msgid "Do not show me this message again" +#~ msgstr "No mostrarme este mensaje otra vez." + +#~ msgid "Description" +#~ msgstr "Posición" + +#~ msgid "Upgrade functionality" +#~ msgstr "Actualizar funcionalidad" + +#~ msgid "Important Message" +#~ msgstr "Mensaje Importante" + +#~ msgid "No Description found" +#~ msgstr "No se encontró descripción" + +#~ msgid "WARNING" +#~ msgstr "WARNING" + +#~ msgid "" +#~ "Advanced Access Manager requires WordPress 3.2 or newer. Update now!" +#~ msgstr "" +#~ "Advanced Access Manager requiere WordPress 3.1 o mayor. Update now!" + +#~ msgid "Advanced Access Manager requires PHP 5.1.2 or newer" +#~ msgstr "Advanced Access Manager requiere PHP 5.0 o superior" + +#~ msgid "Empty Capability" +#~ msgstr "Borrar Capability" + +#~ msgid "Current Capability can not be deleted" +#~ msgstr "Capability Actual no puede ser borrada" + +#~ msgid "Super Admin" +#~ msgstr "Super Admin" + +#~ msgid "Unauthorized Action" +#~ msgstr "Acción no Autorizada" + +#~ msgid "Options List" +#~ msgstr "Lista de Opciones" + +#~ msgid "Yes" +#~ msgstr "Si" + +#~ msgid "Error appeared during Metabox initialization!" +#~ msgstr "Aparece un error durante la inicialización Metabox!" + +#~ msgid "Restore" +#~ msgstr "Restaurar" + +#~ msgid "Current Role can not be restored!" +#~ msgstr "Rol actual no puede ser restaurado!" + +#~ msgid "Apply All" +#~ msgstr "Aplicar Todo" + +#~ msgid "Error during information grabbing!" +#~ msgstr "Error during information grabbing!" + +#~ msgid "Premium" +#~ msgstr " " + +#~ msgid "Create" +#~ msgstr "Crear" + +#~ msgid "Do not Create" +#~ msgstr "No Crear" + +#~ msgid "Change Role" +#~ msgstr "Cambiar Rol" + +#~ msgid "Current Site" +#~ msgstr "Sitio Actual" + +#~ msgid "" +#~ "cURL library returned empty result. Contact your system administrator to " +#~ "fix this issue." +#~ msgstr "" +#~ "cURL library returned empty result. Contact your system administrator to " +#~ "fix this issue." + +#~ msgid "" +#~ "You are not an active user for current blog. Please click here to add yourself to current blog as " +#~ "Administrator" +#~ msgstr "" +#~ "No es un usuario activo para el blog Actual. Por favor clickea aquí para agregarte como admin del blog " +#~ "actual" + +#~ msgid "Basic" +#~ msgstr " " + +#~ msgid "Administrator added Successfully" +#~ msgstr "Administrador agregado" + +#~ msgid "Failed to add new Administrator" +#~ msgstr "Falla al agregar Administrador" + +#~ msgid "Click for more information" +#~ msgstr "Click para Tooltip" + +#~ msgid "Current User" +#~ msgstr "Usuario Actual" + +#~ msgid "Delete current capability" +#~ msgstr "Borrar Capability" + +#~ msgid "Read more..." +#~ msgstr "Leer Más..." + +#~ msgid "Restore Default Settings" +#~ msgstr "Restaurar valores por defecto de Rol?" + +#~ msgid "" +#~ "Check Menu or Submenu to restrict or Whole Branch to restrict " +#~ "whole menu." +#~ msgstr "" +#~ "Marque Menú o Sub-menú para restringir el acceso o Toda la Rama " +#~ "para restringir el acceso a todo el menú." + +#~ msgid "" +#~ "Only Latin letters, numbers and space are allowed. All other symbols will " +#~ "be filtered.
        New Capability will be added to Super Admin and Admin " +#~ "Roles automatically." +#~ msgstr "" +#~ "Sólo se permiten letras, números y espacios. Todo lo demás será filtrado." +#~ "
        La nueva Capability se agregará automáticamente a los roles Super " +#~ "Admin y Admin." + +#~ msgid "Enter New Capability" +#~ msgstr "Agregar nueva Capability" + +#~ msgid "Would you like to restore default restrictions?" +#~ msgstr "Quiere restaurar los permisos por defecto ?" + +#~ msgid "Restore Restrictions" +#~ msgstr "Restaurar valores por defecto de Rol?" + +#~ msgid "Posts in %s" +#~ msgstr "Entradas en %s" + +#~ msgid "Information" +#~ msgstr "Información" + +#~ msgid "Refresh" +#~ msgstr "Refrescar" + +#~ msgid "Frontend" +#~ msgstr "Frontend" + +#~ msgid "Backend" +#~ msgstr "Backend" + +#~ msgid "List" +#~ msgstr "Lista de Roles" + +#~ msgid "Exclude" +#~ msgstr "Excluir Página" + +#~ msgid "Read" +#~ msgstr "Leer" + +#~ msgid "Trash" +#~ msgstr "Papelera" + +#~ msgid "Install Plugin" +#~ msgstr "Instalar Plugin" + +#~ msgid "Publish" +#~ msgstr "Público" + +#~ msgid "Comment" +#~ msgstr "Comentario" + +#~ msgid "Browse" +#~ msgstr "Mostrar" + +#~ msgid "Worth checking" +#~ msgstr "Chequeo de errores" + +#~ msgid "Additional features available" +#~ msgstr "Características adicionales" + +#~ msgid "You have a JavaScript Error on a page" +#~ msgstr "Tiene un error Javascript en una página" + +#~ msgid "For support send an email to address" +#~ msgstr "Para soporte envíe un email a" + +#~ msgid "Add New Cap" +#~ msgstr "Agregar Cap" + +#~ msgid "Title" +#~ msgstr "Título" + +#~ msgid "This is the title of selected Post or Page" +#~ msgstr "Este es el título del Post o Página seleccionada" + +#~ msgid "Selected item's type" +#~ msgstr "Tipo de Item seleccionado" + +#~ msgid "Type" +#~ msgstr "Tipo" + +#~ msgid "Status" +#~ msgstr "Status" + +#~ msgid "Current Post or Page Status" +#~ msgstr "Estado actual del Post o Página" + +#~ msgid "Visibility" +#~ msgstr "Visibilidad" + +#~ msgid "Visibility of current Post or Page" +#~ msgstr "Visibilidad del Post o Página Actual" + +#~ msgid "Restrict Admin" +#~ msgstr "Restringir Admin" + +#~ msgid "Restrict access to current Post or Page on BackEnd" +#~ msgstr "Restringir acceso al Post o Página actual en el BackEnd" + +#~ msgid "Restrict Front" +#~ msgstr "Restringir Frente" + +#~ msgid "Restrict access to current Post or Page on FrontEnd" +#~ msgstr "Restringir acceso al Post o Página actual en el FrontEnd" + +#~ msgid "Just Exclude page from navitation but do not restrict access" +#~ msgstr "Sólo Excluye la página de la navegación pero no restringe el acceso" + +#~ msgid "Expire" +#~ msgstr "Expirar" + +#~ msgid "" +#~ "If Restric is checked then restrict access to current Post or Page until " +#~ "the picked date. If Restrict is unchecked then allow access to Page or " +#~ "Post until the picked date" +#~ msgstr "" +#~ "Si Restringir está checkeado entonces restringe acceso al post o página " +#~ "actual hasta la fecha elegida. Si Restringir no está checkeado entonces " +#~ "permite acceso al post o página actual hasta la fecha elegida." + +#~ msgid "Update info only for current role" +#~ msgstr "Actualizar info sólo para el rol actual" + +#~ msgid "Update Current" +#~ msgstr "Actualizar" + +#~ msgid "Update info for all role" +#~ msgstr "Actualizar info para todos los roles" + +#~ msgid "Update All" +#~ msgstr "Actualziar todo" + +#~ msgid "Category" +#~ msgstr "Categoría" + +#~ msgid "Category title" +#~ msgstr "Título de categoría" + +#~ msgid "This is just a type of post's taxonomy. Always Category" +#~ msgstr "Esto es sólo un tipo de taxonomía de post. Siempre Category" + +#~ msgid "Posts" +#~ msgstr "Posts" + +#~ msgid "Number of posts current category has" +#~ msgstr "Número de posts que tiene la categoría actual" + +#~ msgid "" +#~ "Restrict access to current category and for all Sub Categories on " +#~ "BackEnd. Also it'll restrict access to all posts under these categories" +#~ msgstr "" +#~ "Restringir acceso a la categoría actual y a todas las subcategorías en el " +#~ "BackEnd. También restringirá acceso a todos los posts bajo estas " +#~ "categorías" + +#~ msgid "" +#~ "Restrict access to current category and for all Sub Categories on " +#~ "FrontEnd. Also it'll restrict access to all posts under these categories" +#~ msgstr "" +#~ "Restringir acceso a la categoría actual y a todas las subcategorías en el " +#~ "FrontEnd. También restringirá acceso a todos los posts bajo estas " +#~ "categorías" + +#~ msgid "" +#~ "If Restric is checked then restrict access to current Category and all " +#~ "Sub Categories, and Posts since the picked date. If Restrict is unchecked " +#~ "then allow access to current Category and all Sub Categories, and Posts " +#~ "since the picked date" +#~ msgstr "" +#~ "Si Restringir está checkeado entonces restringe acceso a la categoría " +#~ "actual y sus subcategorías, y Posts desde la fecha elegida. Si " +#~ "Restringir no está checkeado entonces permite acceso a la categoría " +#~ "actual y sus subcategorías, y Posts hasta la fecha elegida." + +#~ msgid "Select a proper Page, Post or Category." +#~ msgstr "Seleccionar una página, Post, o Categoría adecuada." + +#~ msgid "Restore Default Setting for Current Role" +#~ msgstr "Restaurar valores por defecto del Rol Actual" + +#~ msgid "Export Configurations" +#~ msgstr "Exportar configuraciones" + +#~ msgid "Import Configurations" +#~ msgstr "Importar Configuraciones" + +#~ msgid "Support" +#~ msgstr "Soporte" + +#~ msgid "Find on Facebook" +#~ msgstr "Buscar en Facebook" + +#~ msgid "Follow on Twitter" +#~ msgstr "Seguir en Twitter" + +#~ msgid "LinkedIn" +#~ msgstr "LinkedIn" + +#~ msgid "Leave Without Saving?" +#~ msgstr "Salir Sin Salvar ?" + +#~ msgid "" +#~ "Some changed detected. Are you sure that you want to leave without saving" +#~ msgstr "Detectados algunos cambios. Está seguro de salir sin salvar ?" + +#~ msgid "Additional Features Available" +#~ msgstr "Disponibles características adicionales" + +#~ msgid "" +#~ "Additional features detected to extend Advanced Access Manager " +#~ "functionality." +#~ msgstr "" +#~ "Características adicionales detectadas para extender la funcionalidad del " +#~ "Administrador Avanzado de Acceso." + +#~ msgid "" +#~ "Do you want to create a Super Admin Role to get access to ALL " +#~ "features?" +#~ msgstr "" +#~ "Quiere crear el Rol Super Admin para acceder a todas las " +#~ "características ?" + +#~ msgid "" +#~ "After importing, ALL current configurations will be lost. If you are " +#~ "sure, please select proper INI file and click on Import button." +#~ msgstr "" +#~ "Despues de importar, TODAS las configuraciones actuales de perderán. Si " +#~ "está seguro, seleccione el Archivo INI apropiado y haga click en el botón " +#~ "Importar" + +#~ msgid "Uploading..." +#~ msgstr "Actualizando..." + +#~ msgid "Please wait. Importer is working..." +#~ msgstr "Espere por favor. Realizando la importación..." + +#~ msgid "You are not authorized to view this page" +#~ msgstr "No está autorizado a ver esta página" + +#~ msgid "Import" +#~ msgstr "Importar" + +#~ msgid "Error during importing" +#~ msgstr "Error durante la Importación" + +#~ msgid "Apply to ALL Blogs" +#~ msgstr "Aplicar a TODOS los Blogs" + +#~ msgid "Action completed successfully" +#~ msgstr "Acción completada con éxito" + +#~ msgid "Action failed" +#~ msgstr "Error en la acción" + +#~ msgid "Settings applied successfully to ALL Blogs" +#~ msgstr "Valores aplicados con éxito a todos los Blogs" + +#~ msgid "" +#~ "Since 2.0
        \n" +#~ " Note: No longer used." +#~ msgstr "" +#~ "Since 2.0
        \n" +#~ " Nota: No usado mas." + +#~ msgid "Description does not exist" +#~ msgstr "Descripción no existe" + +#~ msgid "

        You do not have sufficient permissions to perform this action

        " +#~ msgstr "

        No tienes los permisos suficientes para realizar esta acción

        " + +#~ msgid "" +#~ "

        General Information

        \n" +#~ "

        If you want to filter Admin Menu for some User Roles or just " +#~ "delete unnecessary dashboard widgets or metaboxes in Edit Post Page, this " +#~ "plugin is for you.\n" +#~ " You can do following things with Advanced Access Manager:

        \n" +#~ "
          \n" +#~ "
        • Filter Admin Menu for specific User Role
        • \n" +#~ "
        • Filter Dashboard Widgets for specific User Role
        • \n" +#~ "
        • Filter List of Metaboxes in Edit Post page for specific User Role\n" +#~ "
        • Add new User Capabilities
        • \n" +#~ "
        • Delete created User Capabilities
        • \n" +#~ "
        • Create new User Roles
        • \n" +#~ "
        • Delete any User Role
        • \n" +#~ "
        • Save current User Roles settings and restore later
        • \n" +#~ "
        • View the list of Posts Pages and Categories in a nice hierarchical " +#~ "tree
        • \n" +#~ "
        • Filter Posts and Post Categories
        • \n" +#~ "
        • Filter Pages and Sub Pages
        • \n" +#~ "
        • Set expiration Date for specific Posts, Pages or even Categories\n" +#~ "
        • Reorganize Order of Main Menu for specific User Role
        • \n" +#~ "
        \n" +#~ "

        Main Menu

        \n" +#~ "

        Under Main Menu Tab there is a list of admin menu and submenus. " +#~ "You can Restrict access to certain menus of submenus by checking proper " +#~ "checkbox.\n" +#~ " Also you can reorganize the menu order by draggin and dropping menus " +#~ "in order you want.

        \n" +#~ "

        Metabox & Widgets

        \n" +#~ "

        This section allows you to filter the list of metaboxes (sections " +#~ "to the Write Post, Write Page, and Write Link editing pages) and " +#~ "dashboard widgets.

        \n" +#~ "

        Capabilities

        \n" +#~ "

        This is more advanced Tab which allows to create different " +#~ "combinations of Capabilities for current User Role. If you are not " +#~ "familiar with Capabilities please read Roles and Capabilities." +#~ "

        \n" +#~ "

        Posts & Pages

        \n" +#~ "

        Tree View of Posts (grouped into categories) and Pages (organized " +#~ "hierarchically according to Parent Page parameter) where you can restrict " +#~ "access to certain page or post or the whole category for current User " +#~ "Role. There is also possibility to set expiration date to posts or pages." +#~ "

        \n" +#~ msgstr "" +#~ "

        Información General

        \n" +#~ "

        Si quiere flitrar el Menú Admin para algunos Roles de usuario o " +#~ "borrar widgets no necesarios del Escritorio o metaboxes en la Edición de " +#~ "páginas , Este plugin es para ti.\n" +#~ " You can do following things with Advanced Access Manager:

        \n" +#~ "
          \n" +#~ "
        • Filter Admin Menu for specific User Role
        • \n" +#~ "
        • Filter Dashboard Widgets for specific User Role
        • \n" +#~ "
        • Filter List of Metaboxes in Edit Post page for specific User Role\n" +#~ "
        • Add new User Capabilities
        • \n" +#~ "
        • Delete created User Capabilities
        • \n" +#~ "
        • Create new User Roles
        • \n" +#~ "
        • Delete any User Role
        • \n" +#~ "
        • Save current User Roles settings and restore later
        • \n" +#~ "
        • View the list of Posts Pages and Categories in a nice hierarchical " +#~ "tree
        • \n" +#~ "
        • Filter Posts and Post Categories
        • \n" +#~ "
        • Filter Pages and Sub Pages
        • \n" +#~ "
        • Set expiration Date for specific Posts, Pages or even Categories\n" +#~ "
        • Reorganize Order of Main Menu for specific User Role
        • \n" +#~ "
        \n" +#~ "

        Main Menu

        \n" +#~ "

        Under Main Menu Tab there is a list of admin menu and submenus. " +#~ "You can Restrict access to certain menus of submenus by checking proper " +#~ "checkbox.\n" +#~ " Also you can reorganize the menu order by draggin and dropping menus " +#~ "in order you want.

        \n" +#~ "

        Metabox & Widgets

        \n" +#~ "

        This section allows you to filter the list of metaboxes (sections " +#~ "to the Write Post, Write Page, and Write Link editing pages) and " +#~ "dashboard widgets.

        \n" +#~ "

        Capabilities

        \n" +#~ "

        This is more advanced Tab which allows to create different " +#~ "combinations of Capabilities for current User Role. If you are not " +#~ "familiar with Capabilities please read Roles and Capabilities." +#~ "

        \n" +#~ "

        Posts & Pages

        \n" +#~ "

        Tree View of Posts (grouped into categories) and Pages (organized " +#~ "hierarchically according to Parent Page parameter) where you can restrict " +#~ "access to certain page or post or the whole category for current User " +#~ "Role. There is also possibility to set expiration date to posts or pages." +#~ "

        \n" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.mo b/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.mo new file mode 100644 index 0000000..78c8e38 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.po b/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.po new file mode 100644 index 0000000..19f9f1a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-fa_IR.po @@ -0,0 +1,606 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2014-02-20 08:00+0330\n" +"PO-Revision-Date: 2014-02-20 09:05+0330\n" +"Last-Translator: Ghaem Omidi \n" +"Language-Team: WP-Parsi \n" +"Language: fa_IR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.7\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-KeywordsList: __;_e;_x;_n\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:380 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:387 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:414 +msgid "Access denied" +msgstr "امکان دسترسی وجود ندارد." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:873 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:874 +msgid "AAM" +msgstr "افزونه مدیریت دسترسی پیشرفته" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:883 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:884 +msgid "Access Control" +msgstr "کنترل دسترسی" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:891 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:892 +msgid "ConfigPress" +msgstr "پیکربندی" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:899 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/aam.php:900 +msgid "Extensions" +msgstr "افزودنی ها" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/config.php:61 +msgid "Failed to create wp-content/aam folder" +msgstr "ایجاد پوشه wp-content/aam انجام نشد." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/config.php:64 +msgid "Folder wp-content/aam is not writable" +msgstr "پوشه wp-content/aam قابل نوشتن نیست." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:100 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:204 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:100 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:204 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:100 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:204 +msgid "System" +msgstr "سیستم" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:101 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:206 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:101 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:206 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:101 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:206 +msgid "Post & Page" +msgstr "نوشته و برگه" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:102 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:208 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:102 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:208 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:102 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:208 +msgid "Backend Interface" +msgstr "رابط بخش مدیریت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:103 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/capability.php:210 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:103 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/capability.php:210 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:103 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/capability.php:210 +msgid "Miscellaneous" +msgstr "متفرقه" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/extension.php:99 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/extension.php:99 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/extension.php:99 +msgid "Folder advanced-access-manager/extension is not writable" +msgstr "پوشه advanced-access-manager/extension قابل نوشتن نیست." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:59 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:59 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:59 +msgid "Roles" +msgstr "قوانین" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:60 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:60 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:60 +msgid "Role Manager" +msgstr "مدیریت قانون" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:68 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:68 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:68 +msgid "Users" +msgstr "کاربران" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:69 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:69 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:69 +msgid "User Manager" +msgstr "مدیریت کاربر" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:77 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:77 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:77 +msgid "Visitor" +msgstr "بازدیدکنندگان" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:78 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:78 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:78 +msgid "Visitor Manager" +msgstr "مدیریت بازدیدکنندگان" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:95 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:95 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:95 +msgid "Admin Menu" +msgstr "منوی مدیریت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:98 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:98 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"کنترل دسترسی به منوی مدیریت. محدود کردن دسترسی به منو یا زیر منو. توجه، " +"منو بر اساس قابلیت های کاربران یا قوانین ارائه شده است." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:103 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:103 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:103 +msgid "Metabox & Widget" +msgstr "متاباکس و ابزارک" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:106 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:106 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"فیلترکردن متاباکس ها یا ابزارک ها برای قانون یا کاربر انتخاب شده. اگر " +"متاباکس یا ابزارک فهرست نشده است، روی ((تازه کردن فهرست)) کلیک کنید یا لینک " +"مستقیم را کپی کنید و قرار دهید." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:111 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:111 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:111 +msgid "Capability" +msgstr "قابلیت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:114 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:114 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"مدیریت فهرست قابلیت ها برای کاربر یا قانون انتخاب شده. توجه، با " +"قابلیت ها خیلی با دقت باشید. پاک کردن یا برداشتن هر قابلیتی ممکن است باعث " +"شوذ کنترل موقت یا دائم برخی از ویژگی ها یا پیشخوان وردپرس را از دست داد." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:119 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:119 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:119 +msgid "Posts & Pages" +msgstr "نوشته ها و برگه ها" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:122 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:122 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"مدیریت دسترسی یه نوشته یا دوره فردی. توجه، ما فرض می کنیم هر نوشته، برگه " +"یا پست تایپ دلخواه بر اساس نوشته است. و هر دوره ای شبیه دسته های نوشته بر " +"اساس دوره است." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:127 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:127 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:127 +msgid "Event Manager" +msgstr "مدیریت رویداد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:130 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:130 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"هنگامی که تعدادی رویداد در سایت وردپرسی شما ظاهر می شوند عمل خود را تعریف " +"کنید. این بخش ها به شما اجازه می دهند تا باعث یک عمل در رویداد شبیه تغییر " +"محتوای نوشته یا بروزرسانی وضعیت برگه شوید. شما می توانید تنظیم کنید تا تغییر " +"وضعیت نوشته یا نوشتن یک رویداد دلخواه به عنوان یک اطلاعیه به ایمیل شما ارسال " +"شوند." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:331 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:331 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:331 +msgid "Rollback Settings" +msgstr "تنظیمات عقبگرد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:332 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:332 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:332 +msgid "Cancel" +msgstr "لغو" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:333 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:333 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:333 +msgid "Send E-mail" +msgstr "ارسال ایمیل" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:334 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:340 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:334 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:340 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:334 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:340 +msgid "Add New Role" +msgstr "افزودن قانون جدید" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:335 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:335 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:335 +msgid "Manage" +msgstr "مدیریت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:336 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:336 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:336 +msgid "Edit" +msgstr "ویرایش" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:337 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:337 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:337 +msgid "Delete" +msgstr "پاک کردن" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:338 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:338 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:338 +msgid "Filtered" +msgstr "فیلترشده" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:339 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:339 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:339 +msgid "Clear" +msgstr "پاک کردن" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:341 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:341 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:341 +msgid "Save Changes" +msgstr "ذخیره ی تغییرات" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:342 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:342 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:342 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"سیستم %d کاربر را با این قانون شناسایی کرده است. همه کاربران با قانون %s به طور خودکار پاک خواهند شد." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:343 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:343 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:343 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "آیا شما مطمئنید که می خواهید قانون %s را پاک کنید؟" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:344 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:344 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:344 +msgid "Delete Role" +msgstr "پاک کردن قانون" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:345 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:345 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:345 +msgid "Add User" +msgstr "افزودن کاربر" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:346 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:346 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:346 +msgid "Filter Users" +msgstr "فیلتر کاربران" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:347 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:363 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:347 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:363 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:347 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:363 +msgid "Refresh List" +msgstr "تازه کردن فهرست" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:348 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:348 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:348 +msgid "Block" +msgstr "مسدود کردن" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:349 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:349 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:349 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "آیا شما مطمئنید که می خواهید %s را پاک کنید؟" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:350 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:350 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:350 +msgid "Filter Capabilities by Category" +msgstr "فیلترکردن قابلیت ها بر اساس دسته" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:351 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:351 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:351 +msgid "Inherit Capabilities" +msgstr "به ارث بردن قابلیت ها" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:352 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:352 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:352 +msgid "Add New Capability" +msgstr "افزودن قابلیت جدید" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:353 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:353 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:353 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "آیا شما مطمئنید که می خواهید قابلیت %s را پاک کنید؟" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:354 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:354 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:354 +msgid "Delete Capability" +msgstr "پاک کردن قابلیت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:355 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:355 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:355 +msgid "Select Role" +msgstr "انتخاب قانون" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:356 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:356 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:356 +msgid "Add Capability" +msgstr "افزودن قابلیت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:357 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:357 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:357 +msgid "Add Event" +msgstr "افزودن رویداد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:358 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:358 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:358 +msgid "Edit Event" +msgstr "ویرایش رویداد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:359 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:361 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:359 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:361 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:359 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:361 +msgid "Delete Event" +msgstr "پاک کردن رویداد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:360 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:360 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:360 +msgid "Save Event" +msgstr "ذخیره رویداد" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:362 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:362 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:362 +msgid "Filter Posts by Post Type" +msgstr "فیلتر کردن نوشته ها بر اساس پست تایپ" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:364 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:364 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:364 +msgid "Restore Default" +msgstr "بازگردانی به پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:365 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:365 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:365 +msgid "Apply" +msgstr "اعمال کردن" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:366 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:366 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:366 +msgid "Edit Term" +msgstr "ویرایش دوره" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:367 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:367 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:367 +msgid "Manager Access" +msgstr "دسترسی مدیریت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:368 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:368 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:368 +msgid "Unlock Default Accesss Control" +msgstr "بازکردن کنترل دسترسی پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:369 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:369 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:369 +msgid "Close" +msgstr "بستن" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:370 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:370 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:370 +msgid "Edit Role" +msgstr "ویرایش قانون" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:371 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:371 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:371 +msgid "Restore Default Capabilities" +msgstr "بازگردانی قابلیت های پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:372 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:372 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:372 +#, php-format +msgid "Are you sure you want to delete %s?" +msgstr "آیا شما مطمئنید که می خواهید %s را پاک کنید؟" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:373 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:373 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:373 +#, php-format +msgid "Are you sure you want to move %s to trash?" +msgstr "آیا شما مطمئنید که می خواهید %s را به زباله دان انتقال دهید؟" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:374 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:374 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:374 +msgid "Delete Post" +msgstr "پاک کردن نوشته" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:375 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:375 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:375 +msgid "Delete Permanently" +msgstr "پاک کردن برای همیشه" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:376 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:376 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:376 +msgid "Trash Post" +msgstr "زباله دان نوشته" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/manager.php:377 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/manager.php:377 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/manager.php:377 +msgid "Restore Default Access" +msgstr "بازگردانی دسترسی پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/metabox.php:190 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/metabox.php:190 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/metabox.php:190 +msgid "Dashboard Widgets" +msgstr "ابزارک های پیشخوان" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/metabox.php:194 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/metabox.php:194 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/metabox.php:194 +msgid "Frontend Widgets" +msgstr "ابزارک های جلو" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/post.php:213 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/post.php:213 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/post.php:213 +msgid "[empty]" +msgstr "(خالی)" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/post.php:396 +#: C:\Users\Ghaem\Desktop\advanced-access-manager/application/view/post.php:404 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/post.php:396 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application/view/post.php:404 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/post.php:396 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\application\view/post.php:404 +msgid "All" +msgstr "همه" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/activity.php:98 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/activity.php:98 +msgid "System Login" +msgstr "ورود به سیستم" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/activity.php:102 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/activity.php:102 +msgid "System Logout" +msgstr "خروج از سیستم" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/activity.php:108 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/activity.php:108 +msgid "Unknown Activity" +msgstr "فعالیت ناشناخته" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/extension.php:112 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/extension.php:112 +msgid "Activity Log" +msgstr "گزارش فعالیت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/extension.php:116 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/extension.php:116 +msgid "" +"Tracks User Activities like user login/logout or post changes. Check AAM " +"Activities Extension to get advanced list of possible activities." +msgstr "" +"ردیابی فعالیت های کاربر مانند ورود و خروج کاربر یا تغییرات کاربر. افزودنی " +"فعالیت های افزونه کنترل دسترسی پیشرفته را بررسی کنید تا فهرست پیشرفته از " +"فعالیت های ممکن را دریافت کنید." + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/extension.php:177 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/extension.php:177 +msgid "Clear Logs" +msgstr "پاک کردن گزارش ها" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Activity_Log/extension.php:178 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Activity_Log/extension.php:178 +msgid "Get More" +msgstr "بیشتر" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Multisite_Support/extension.php:125 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Multisite_Support/extension.php:125 +msgid "Sites" +msgstr "سایت ها" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Multisite_Support/extension.php:126 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Multisite_Support/extension.php:126 +msgid "Site Manager" +msgstr "مدیریت سایت" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Multisite_Support/extension.php:189 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Multisite_Support/extension.php:189 +msgid "Set Default" +msgstr "تنظیم پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Multisite_Support/extension.php:190 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Multisite_Support/extension.php:190 +msgid "Unset Default" +msgstr "تنظیم نکردن پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_Multisite_Support/extension.php:191 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_Multisite_Support/extension.php:191 +msgid "Set as Default" +msgstr "تنظیم به عنوان پیش فرض" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_My_Feature/extension.php:50 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_My_Feature/extension.php:50 +msgid "My Feature" +msgstr "ویژگی من" + +#: C:\Users\Ghaem\Desktop\advanced-access-manager/extension/AAM_My_Feature/extension.php:53 +#: C:\Users\Ghaem\Desktop\advanced-access-manager\extension\AAM_My_Feature/extension.php:53 +msgid "My customly developed feature" +msgstr "ویژگی دلخواه توسعه یافته من" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.mo b/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.mo new file mode 100644 index 0000000..8203e57 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.po b/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.po new file mode 100644 index 0000000..1a906ef --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-fr_FR.po @@ -0,0 +1,337 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2013-12-01 14:07-0500\n" +"PO-Revision-Date: 2014-01-15 23:25+0100\n" +"Last-Translator: Moskito7 \n" +"Language-Team: WPAAM \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr_FR\n" +"X-Generator: Poedit 1.5.4\n" + +#: aam.php:243 aam.php:248 aam.php:267 +msgid "Access denied" +msgstr "Accès refusé" + +#: aam.php:691 aam.php:692 +msgid "AAM" +msgstr "AAM" + +#: aam.php:701 aam.php:702 +msgid "Access Control" +msgstr "Contrôle d'accès" + +#: aam.php:709 aam.php:710 +msgid "Extensions" +msgstr "Extensions" + +#: application/view/capability.php:98 application/view/capability.php:179 +msgid "System" +msgstr "Système" + +#: application/view/capability.php:99 application/view/capability.php:181 +msgid "Post & Page" +msgstr "Articles et Pages" + +#: application/view/capability.php:100 application/view/capability.php:183 +msgid "Backend Interface" +msgstr "Interface d'administration" + +#: application/view/capability.php:101 +msgid "Miscellaneous" +msgstr "Divers" + +#: application/view/capability.php:185 +msgid "Miscelaneous" +msgstr "Divers" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "Rôles" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "Gestionnaire de rôle" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "Utilisateurs" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "Gestionnaire d'utilisateurs" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "Visiteur" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "Gestionnaire de visiteurs" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "Menu d'administration" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"Contrôler l'accès au menu d'administration. Restreindre l'accès au menu " +"entier ou à un sous-menu. Note, l'affichage des menus est basé sur le " +"rôle ou les capacités de l'utilisateur." + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "Métabox & Widget" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"Filtrer la liste des métabox ou widgets pour le rôle ou l'utilisateur " +"sélectionné. Si une métabox ou un widget n'est pas listé, essayez de cliquer " +"sur le bouton Rafraîchir la liste ou copier et coller directement le " +"lien vers la page où la métabox ou le widget est affiché et cliquez sur le " +"bouton Récupérer une métabox à partir d'un lien." + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "Capacités" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"Gérer la liste des capacités pour l'utilisateur ou le rôle sélectionné. " +"Note, la liste des capacités de l'utilisateur est héritée du rôle de " +"l'utilisateur.
        Attention ! Faites très attention avec les " +"capacités. Supprimer ou décocher n'importe quelle capacité pourrait " +"entrainer la perte temporaire ou définitive de certaines fonctionnalités ou " +"du tableau de bord de Wordpress." + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "Articles et Catégories" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"Gérer l'accès individuellement aux articles ou termes. Note, " +"on entend par article n'importe quel article, page ou type d'article. " +"Et par terme n'importe quel élément comme des catégories d'articles." + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "Gestionnaire d'événements" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"Définir votre propre action lorsqu'un événement apparaît sur votre blog " +"WordPress. Cette section vous permet de déclencher une action sur un " +"événement comme le changement de contenu d'un article, ou une mise à jour de " +"l'état de la page. Vous pouvez configurer l'envoi d'une notification par E-" +"mail, la modification du statut de l'article ou écrire votre propre " +"gestionnaire d'événements." + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "ConfigPress" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" +"Contrôler le comportement de AAM avec ConfigPress. Pour plus de " +"détails regardez le tutoriel ConfigPress." + +#: application/view/manager.php:342 +msgid "Rollback Settings" +msgstr "Rétablir les paramètres" + +#: application/view/manager.php:343 +msgid "Cancel" +msgstr "Annuler" + +#: application/view/manager.php:344 +msgid "Send E-mail" +msgstr "Envoyer un E-mail" + +#: application/view/manager.php:345 application/view/manager.php:351 +msgid "Add New Role" +msgstr "Ajouter un rôle" + +#: application/view/manager.php:346 +msgid "Manage" +msgstr "Gérer" + +#: application/view/manager.php:347 +msgid "Edit" +msgstr "Editer" + +#: application/view/manager.php:348 +msgid "Delete" +msgstr "Supprimer" + +#: application/view/manager.php:349 +msgid "Filtered" +msgstr "Filtré" + +#: application/view/manager.php:350 +msgid "Clear" +msgstr "Nettoyer" + +#: application/view/manager.php:352 +msgid "Save Changes" +msgstr "Sauvegarder les modifications" + +#: application/view/manager.php:353 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"Le système a détecté %d utilisateur(s) avec ce rôle. Tous les utilisateurs " +"avec le rôle %s seront automatiquement supprimés !" + +#: application/view/manager.php:354 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "Êtes-vous certain de vouloir supprimer %s ?" + +#: application/view/manager.php:355 +msgid "Delete Role" +msgstr "Supprimer le rôle" + +#: application/view/manager.php:356 +msgid "Add User" +msgstr "Ajouter un utilisateur" + +#: application/view/manager.php:357 +msgid "Filter Users" +msgstr "Filtrer les utilisateurs" + +#: application/view/manager.php:358 application/view/manager.php:374 +msgid "Refresh List" +msgstr "Rafraîchir la liste" + +#: application/view/manager.php:359 +msgid "Block" +msgstr "Bloquer" + +#: application/view/manager.php:360 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "Êtes-vous certain de vouloir supprimer l'utilisateur %s ?" + +#: application/view/manager.php:361 +msgid "Filter Capabilities by Category" +msgstr "Filtrer les capacités par catégorie" + +#: application/view/manager.php:362 +msgid "Inherit Capabilities" +msgstr "Capacités héritées" + +#: application/view/manager.php:363 +msgid "Add New Capability" +msgstr "Ajouter une nouvelle capacité" + +#: application/view/manager.php:364 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "Êtes-vous certain de vouloir supprimer la capacité %s ?" + +#: application/view/manager.php:365 +msgid "Delete Capability" +msgstr "Supprimer la capacité" + +#: application/view/manager.php:366 +msgid "Select Role" +msgstr "Sélectionner le rôle" + +#: application/view/manager.php:367 +msgid "Add Capability" +msgstr "Ajouter la capacité" + +#: application/view/manager.php:368 +msgid "Add Event" +msgstr "Ajouter un événement" + +#: application/view/manager.php:369 +msgid "Edit Event" +msgstr "Editer un événement" + +#: application/view/manager.php:370 application/view/manager.php:372 +msgid "Delete Event" +msgstr "Supprimer un événement" + +#: application/view/manager.php:371 +msgid "Save Event" +msgstr "Sauvegarder un événement" + +#: application/view/manager.php:373 +msgid "Filter Posts by Post Type" +msgstr "Filtrer les articles par type" + +#: application/view/manager.php:375 +msgid "Restore Default" +msgstr "Restaurer les paramètres par défaut" + +#: application/view/manager.php:376 +msgid "Apply" +msgstr "Appliquer" + +#: application/view/manager.php:377 +msgid "Edit Term" +msgstr "Editer les termes" + +#: application/view/manager.php:378 +msgid "Manager Access" +msgstr "Gestionnaire d'accès" + +#: application/view/manager.php:379 +msgid "Unlock Default Accesss Control" +msgstr "Déverrouiller le contrôle d'accès par défaut" + +#: application/view/manager.php:380 +msgid "Close" +msgstr "Fermer" + +#: application/view/manager.php:381 +msgid "Edit Role" +msgstr "Editer le rôle" + +#: application/view/metabox.php:179 +msgid "Dashboard Widgets" +msgstr "Widgets du tableau de bord" + +#: application/view/metabox.php:183 +msgid "Frontend Widgets" +msgstr "Widgets du site" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "[vide]" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "Tout" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-nb_NO.mo b/wp-content/plugins/advanced-access-manager/lang/aam-nb_NO.mo new file mode 100644 index 0000000..32608a4 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-nb_NO.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.mo b/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.mo new file mode 100644 index 0000000..ef9a356 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.po b/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.po new file mode 100644 index 0000000..b8cfb98 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-pl_PL.po @@ -0,0 +1,385 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM v2.2.2\n" +"POT-Creation-Date: 2014-01-23 20:56-0500\n" +"PO-Revision-Date: 2014-02-06 21:37+0100\n" +"Last-Translator: Gustaw Lasek \n" +"Language-Team: Servitium \n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.7\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: aam.php:346 aam.php:351 aam.php:379 +msgid "Access denied" +msgstr "Brak dostępu" + +#: aam.php:833 aam.php:834 +msgid "AAM" +msgstr "AAM" + +#: aam.php:843 aam.php:844 +msgid "Access Control" +msgstr "Kontrola dostępu" + +#: aam.php:851 aam.php:852 +msgid "Extensions" +msgstr "Rozszerzenia" + +#: config.php:58 +msgid "wp-content folder is not writable or does not exists. " +msgstr "wp-content folder nie ma uparwnień do zapisu lub nie istnieje." + +#: config.php:60 +msgid "Read more." +msgstr "Czytaj więcej." + +#: config.php:85 +msgid "Migrate your old AAM settings to the new AAM platform. " +msgstr "" +"Migracja ustawień ze starych wersji AAM (do v1.9.1) do nowej wersji wtyczki " +"AAM." + +#: config.php:86 +msgid "Click to Migrate" +msgstr "Kliknij by migrować" + +#: application/view/capability.php:100 application/view/capability.php:199 +msgid "System" +msgstr "System" + +#: application/view/capability.php:101 application/view/capability.php:201 +msgid "Post & Page" +msgstr "Wpisy i Strony" + +#: application/view/capability.php:102 application/view/capability.php:203 +msgid "Backend Interface" +msgstr "Interfejs panelu zarządzania" + +#: application/view/capability.php:103 application/view/capability.php:205 +msgid "Miscellaneous" +msgstr "Pozostałe" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "Role" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "Zarządzanie rolami" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "Użytkownicy" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "Zarządzanie użytkownikami" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "Gość" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "Zarządzaj gośćmi" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "Admin Menu" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"Kontroluj dostęp do menu administracyjnego. Ogranicz dostęp do całych " +"pozycji menu lub do pozycji podmenu. Wskazówka menu jest dynamicznie " +"generowane zależnie od ról i uprawnień." + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "Metaboxy i Widżety" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"Filtruj listę Widżetów i Metaboksów dla wybranej roli lub użytkownika. " +"Jeżeli brakuje Metaboxów i/lub Widżetów na liście, kliknij ikonkę Odśwież " +"listę lub skopiuj i wklej bezpośredni odnośnik do strony, gdzie " +"wyświetlają się braujące Metaboksy i/lub Widżety i kliknij ikonkę plusa " +"Wczytaj elementy ze strony" + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "Szczegółowe prawa" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"Zarządzaj listą uprawnień dla wybranego użytkownia lub roli. Wskazówka Lista uprawnień jest dziedziczona z roli/ról uzytkownika. Ostrzeżenie!" +" Bądź ostrony z uprawnieniami. Usuwanie lub odbieranie uprawnień może " +"spowodować tymczasowy lub całkowity brak dostępu do panelu administracyjnego " +"WordPress." + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "Wpisy i Kategorie" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"Zarządzaj dostępen do poszczególnych Wpisów i/lub Typów. " +"Wyjaśnienie, Wpisy rozumiane jako dowolne strony, wpisy lub " +"niestandardowe typy wpisów. Typy rozumiane jako dowolne kategorie." + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "Menadżer reguł" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"Zdefiniuj własną akcję dla zdarzeń wystepujących w Twoim WordPress. Ta " +"skecja pozwala ustawić akcję na jakieś zdarzenie np.: zmiana treści wpisu/" +"strony lub statusu. Możesz skonfigurować wysyłanie powiadomień email, " +"zmienić status wpisu/strony lub zdefiniować własną obsługę zdarzenia. " + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "Konfiguracja" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" +"Konfiguruj AAM przez ConfigPress. Aby uzyskać więcej informacji " +"zapoznaj się poradnikiem ConfigPress." + +#: application/view/manager.php:339 +msgid "Rollback Settings" +msgstr "Wycofaj ustawienia" + +#: application/view/manager.php:340 +msgid "Cancel" +msgstr "Anuluj" + +#: application/view/manager.php:341 +msgid "Send E-mail" +msgstr "Wyślij E-mail" + +#: application/view/manager.php:342 application/view/manager.php:348 +msgid "Add New Role" +msgstr "Dodaj nową rolę" + +#: application/view/manager.php:343 +msgid "Manage" +msgstr "Zarządzaj/Edytuj" + +#: application/view/manager.php:344 +msgid "Edit" +msgstr "Edytuj" + +#: application/view/manager.php:345 +msgid "Delete" +msgstr "Usuń" + +#: application/view/manager.php:346 +msgid "Filtered" +msgstr "Przefiltrowane" + +#: application/view/manager.php:347 +msgid "Clear" +msgstr "Wyczyść" + +#: application/view/manager.php:349 +msgid "Save Changes" +msgstr "Zapisz zmiany" + +#: application/view/manager.php:350 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"System wykrył użytkownika/ów z tej roli. Wszyscy użytkownicy z tą rolą " +"zostaną usunięci!" + +#: application/view/manager.php:351 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "Czy na pewno chcesz usunąć rolę/e?" + +#: application/view/manager.php:352 +msgid "Delete Role" +msgstr "Usuń rolę" + +#: application/view/manager.php:353 +msgid "Add User" +msgstr "Dodaj użytkownika" + +#: application/view/manager.php:354 +msgid "Filter Users" +msgstr "FIltruj uzytkowników" + +#: application/view/manager.php:355 application/view/manager.php:371 +msgid "Refresh List" +msgstr "Odśwież listę" + +#: application/view/manager.php:356 +msgid "Block" +msgstr "Zablokuj" + +#: application/view/manager.php:357 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "Czy na pewno chcesz usunąć użytkownika/ów?" + +#: application/view/manager.php:358 +msgid "Filter Capabilities by Category" +msgstr "Filtruj prawa wg kategorii" + +#: application/view/manager.php:359 +msgid "Inherit Capabilities" +msgstr "Dziedzicz prawa" + +#: application/view/manager.php:360 +msgid "Add New Capability" +msgstr "Dodaj nowe prawo" + +#: application/view/manager.php:361 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "Czy na pewno chcesz usunąć pozycję/e?" + +#: application/view/manager.php:362 +msgid "Delete Capability" +msgstr "Usuń pozycję" + +#: application/view/manager.php:363 +msgid "Select Role" +msgstr "Wybierz rolę" + +#: application/view/manager.php:364 +msgid "Add Capability" +msgstr "Dodaj pozycję" + +#: application/view/manager.php:365 +msgid "Add Event" +msgstr "Dodaj regułę" + +#: application/view/manager.php:366 +msgid "Edit Event" +msgstr "Edytuj regułę" + +#: application/view/manager.php:367 application/view/manager.php:369 +msgid "Delete Event" +msgstr "Usuń regułę" + +#: application/view/manager.php:368 +msgid "Save Event" +msgstr "Zapisz regułę" + +#: application/view/manager.php:370 +msgid "Filter Posts by Post Type" +msgstr "Filtruj wpisy typy wpisów" + +#: application/view/manager.php:372 +msgid "Restore Default" +msgstr "Przywróć domyślne" + +#: application/view/manager.php:373 +msgid "Apply" +msgstr "Zastosuj" + +#: application/view/manager.php:374 +msgid "Edit Term" +msgstr "Edytuj termin" + +#: application/view/manager.php:375 +msgid "Manager Access" +msgstr "Menadżer dostępu" + +#: application/view/manager.php:376 +msgid "Unlock Default Accesss Control" +msgstr "Odblokuj domyślną kontrolę dostępu" + +#: application/view/manager.php:377 +msgid "Close" +msgstr "Zamknij" + +#: application/view/manager.php:378 +msgid "Edit Role" +msgstr "Edytuj rolę" + +#: application/view/manager.php:379 +msgid "Restore Default Capabilities" +msgstr "Przywróć domyślne" + +#: application/view/metabox.php:185 +msgid "Dashboard Widgets" +msgstr "Widżety panelu" + +#: application/view/metabox.php:189 +msgid "Frontend Widgets" +msgstr "Widżety strony" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "[puste]" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "Wszystkie" + +#: extension/AAM_Multisite_Support/extension.php:125 +msgid "Sites" +msgstr "Strony" + +#: extension/AAM_Multisite_Support/extension.php:126 +msgid "Site Manager" +msgstr "Zarządzanie stroną" + +#: extension/AAM_Multisite_Support/extension.php:189 +msgid "Set Default" +msgstr "Ustaw domyślne" + +#: extension/AAM_Multisite_Support/extension.php:190 +msgid "Unset Default" +msgstr "Odznacz domyślne" + +#: extension/AAM_Multisite_Support/extension.php:191 +msgid "Set as Default" +msgstr "Zaznacz jako domyślne" + +#: extension/AAM_My_Feature/extension.php:50 +msgid "My Feature" +msgstr "Moje funckcje" + +#: extension/AAM_My_Feature/extension.php:53 +msgid "My customly developed feature" +msgstr "Własna funkcjonalność" + +#~ msgid "Miscelaneous" +#~ msgstr "Pozostałe" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.mo b/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.mo new file mode 100644 index 0000000..d3a567a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.po b/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.po new file mode 100644 index 0000000..68f992c --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam-ru_RU.po @@ -0,0 +1,334 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2013-12-01 14:07-0500\n" +"PO-Revision-Date: 2014-01-31 21:24+0400\n" +"Last-Translator: Maxim Kernozhitskiy \n" +"Language-Team: WPAAM \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" +"X-Generator: Poedit 1.5.7\n" + +#: aam.php:243 aam.php:248 aam.php:267 +msgid "Access denied" +msgstr "Доступ запрещен" + +#: aam.php:691 aam.php:692 +msgid "AAM" +msgstr "AAM" + +#: aam.php:701 aam.php:702 +msgid "Access Control" +msgstr "Контроль доступа" + +#: aam.php:709 aam.php:710 +msgid "Extensions" +msgstr "Расширение" + +#: application/view/capability.php:98 application/view/capability.php:179 +msgid "System" +msgstr "Система" + +#: application/view/capability.php:99 application/view/capability.php:181 +msgid "Post & Page" +msgstr "Пост и Страница" + +#: application/view/capability.php:100 application/view/capability.php:183 +msgid "Backend Interface" +msgstr "Интерфейс Админа" + +#: application/view/capability.php:101 +msgid "Miscellaneous" +msgstr "Разное" + +#: application/view/capability.php:185 +msgid "Miscelaneous" +msgstr "Разное" + +#: application/view/manager.php:59 +msgid "Roles" +msgstr "Роли" + +#: application/view/manager.php:60 +msgid "Role Manager" +msgstr "Менеджер ролей" + +#: application/view/manager.php:68 +msgid "Users" +msgstr "Пользователи" + +#: application/view/manager.php:69 +msgid "User Manager" +msgstr "Менеджер пользователей" + +#: application/view/manager.php:77 +msgid "Visitor" +msgstr "Посетители" + +#: application/view/manager.php:78 +msgid "Visitor Manager" +msgstr "Менеджер посетителей" + +#: application/view/manager.php:95 +msgid "Admin Menu" +msgstr "Меню Админа" + +#: application/view/manager.php:98 +msgid "" +"Control Access to Admin Menu. Restrict access to entire Menu or Submenu. " +"Notice, the menu is rendered based on Role's or User's capabilities." +msgstr "" +"Контроль доступа к меню Администратора. Запретить доступ ко всему меню или в " +"подменю. Внимание, меню отображается основываясь на Роли или доступе " +"пользователя." + +#: application/view/manager.php:103 +msgid "Metabox & Widget" +msgstr "Виджеты и Метабоксы" + +#: application/view/manager.php:106 +msgid "" +"Filter the list of Metaboxes or Widgets for selected Role or User. If " +"metabox or widget is not listed, try to click Refresh the List button " +"or Copy & Paste direct link to page where specific metabox or widget is " +"shown and hit Retrieve Metaboxes from Link button." +msgstr "" +"Фильтрует лист Виджетов или Метабоксов для выбранной Роли Пользователя. Если " +"метабокс или виджет не в списке попробуйте нажать кнопку Обновить список или скопировать и вставить прямую ссылку на страницу, где показан " +"метабокс или виджет и нажать кнопку Извлеч Метабоксы из ссылки" + +#: application/view/manager.php:111 +msgid "Capability" +msgstr "Возможность" + +#: application/view/manager.php:114 +msgid "" +"Manage the list of Capabilities for selected User or Role. Notice, " +"list of user's capabilities are inherited from user's Role.
        Warning! Be very careful with capabilities. Deleting or unchecking any capability " +"may cause temporary or permanent constrol lost over some features or " +"WordPress dashboard." +msgstr "" +"Управляйте листом возможностей для выбранных Пользователя или Роли. " +"Внимание, лист пользовательских возможностей унаследован от Роли " +"пользователя.
        ВНИМАНИЕ! будьте осторожны с возможностями. " +"Удаление или снятие некоторых возможностей пользователя может привести к " +"временной, либо постоянной потере контроля над некоторыми функциями " +"Wordpress." + +#: application/view/manager.php:119 +msgid "Posts & Categories" +msgstr "Посты и Категории" + +#: application/view/manager.php:122 +msgid "" +"Manage access to individual Post or Term. Notice, under " +"Post, we assume any post, page or custom post type. And under " +"Term - any term like Post Categories." +msgstr "" +"Управляйте доступом к индивидуальным Постам или Терминам. " +"Понятие Пост в данном случае - любой пост, страница или Собственный " +"тип поста. А под Термином - любой термин типа Категории поста." + +#: application/view/manager.php:127 +msgid "Event Manager" +msgstr "Менеджер событий" + +#: application/view/manager.php:130 +msgid "" +"Define your own action when some event appeared in your WordPress blog. This " +"sections allows you to trigger an action on event like post content change, " +"or page status update. You can setup to send email notification, change the " +"post status or write your own custom event handler." +msgstr "" +"Укажите ваше собственное действие, когда происходит некоторое событие в " +"Wordpress. Эта секция позволяет вам отрабатывать действие или даже изменение " +"контента, или изменение статуса страницы. Вы можете отправлять уведомления " +"на email, менять статус поста или написать свой собственный обработчик." + +#: application/view/manager.php:135 +msgid "ConfigPress" +msgstr "ConfigPress" + +#: application/view/manager.php:138 +msgid "" +"Control AAM behavior with ConfigPress. For more details please check " +"ConfigPress tutorial." +msgstr "" +"Контролируйте поведение AAM с ConfigPress. Для подробностей " +"посмотрите ConfigPress туториал." + +#: application/view/manager.php:342 +msgid "Rollback Settings" +msgstr "Настройки Rollback" + +#: application/view/manager.php:343 +msgid "Cancel" +msgstr "Отменить" + +#: application/view/manager.php:344 +msgid "Send E-mail" +msgstr "Отправить E-mail" + +#: application/view/manager.php:345 application/view/manager.php:351 +msgid "Add New Role" +msgstr "Добавить Роль" + +#: application/view/manager.php:346 +msgid "Manage" +msgstr "Управление" + +#: application/view/manager.php:347 +msgid "Edit" +msgstr "Редактировать" + +#: application/view/manager.php:348 +msgid "Delete" +msgstr "Удалить" + +#: application/view/manager.php:349 +msgid "Filtered" +msgstr "Фильтровано" + +#: application/view/manager.php:350 +msgid "Clear" +msgstr "Отчистить" + +#: application/view/manager.php:352 +msgid "Save Changes" +msgstr "Сохранить изменения" + +#: application/view/manager.php:353 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" +"Система определила %d пользователя(лей) с этой ролью. Все Пользователи с " +"Ролью %s будут удалены автоматически!" + +#: application/view/manager.php:354 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "Вы уверены, что хотите удалить роль %s?" + +#: application/view/manager.php:355 +msgid "Delete Role" +msgstr "Удалить Роль" + +#: application/view/manager.php:356 +msgid "Add User" +msgstr "Добавить пользователя" + +#: application/view/manager.php:357 +msgid "Filter Users" +msgstr "Фильтр пользователей" + +#: application/view/manager.php:358 application/view/manager.php:374 +msgid "Refresh List" +msgstr "Обновить список" + +#: application/view/manager.php:359 +msgid "Block" +msgstr "Заблокировать" + +#: application/view/manager.php:360 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "Вы уверены, что хотите удалить пользователя %s?" + +#: application/view/manager.php:361 +msgid "Filter Capabilities by Category" +msgstr "Фильтр возможностей по категории" + +#: application/view/manager.php:362 +msgid "Inherit Capabilities" +msgstr "Назледовать возможности" + +#: application/view/manager.php:363 +msgid "Add New Capability" +msgstr "Добавить новую возможность" + +#: application/view/manager.php:364 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "Вы уверены, что хотите удалить возможность %s?" + +#: application/view/manager.php:365 +msgid "Delete Capability" +msgstr "Удалить возможность" + +#: application/view/manager.php:366 +msgid "Select Role" +msgstr "Выбрать роль" + +#: application/view/manager.php:367 +msgid "Add Capability" +msgstr "Добавить возможность" + +#: application/view/manager.php:368 +msgid "Add Event" +msgstr "Добавить событие" + +#: application/view/manager.php:369 +msgid "Edit Event" +msgstr "Редактировать событие" + +#: application/view/manager.php:370 application/view/manager.php:372 +msgid "Delete Event" +msgstr "Удалить событие" + +#: application/view/manager.php:371 +msgid "Save Event" +msgstr "Сохранить событие" + +#: application/view/manager.php:373 +msgid "Filter Posts by Post Type" +msgstr "Фильтр постов по Типу" + +#: application/view/manager.php:375 +msgid "Restore Default" +msgstr "Сбросить настройки" + +#: application/view/manager.php:376 +msgid "Apply" +msgstr "Применить" + +#: application/view/manager.php:377 +msgid "Edit Term" +msgstr "Редактировать Термин" + +#: application/view/manager.php:378 +msgid "Manager Access" +msgstr "Диспетчер доступу" + +#: application/view/manager.php:379 +msgid "Unlock Default Accesss Control" +msgstr "Разблокировать стандартный контроль доступа" + +#: application/view/manager.php:380 +msgid "Close" +msgstr "Закрыть" + +#: application/view/manager.php:381 +msgid "Edit Role" +msgstr "Редактировать роль" + +#: application/view/metabox.php:179 +msgid "Dashboard Widgets" +msgstr "Панель виджетов" + +#: application/view/metabox.php:183 +msgid "Frontend Widgets" +msgstr "Frontend виджеты" + +#: application/view/post.php:181 +msgid "[empty]" +msgstr "[пусто]" + +#: application/view/post.php:345 application/view/post.php:353 +msgid "All" +msgstr "Все" diff --git a/wp-content/plugins/advanced-access-manager/lang/aam.mo b/wp-content/plugins/advanced-access-manager/lang/aam.mo new file mode 100644 index 0000000..b0cc144 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/lang/aam.mo differ diff --git a/wp-content/plugins/advanced-access-manager/lang/aam.pot b/wp-content/plugins/advanced-access-manager/lang/aam.pot new file mode 100644 index 0000000..d031cee --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/lang/aam.pot @@ -0,0 +1,850 @@ +msgid "" +msgstr "" +"Project-Id-Version: AAM\n" +"POT-Creation-Date: 2014-05-04 19:41-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: WPAAM \n" +"Language-Team: WP AAM \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.5\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __\n" +"X-Poedit-Basepath: d:\\xampp\\htdocs\\aam\\wp-content\\plugins\\aam\\\n" +"X-Poedit-SearchPath-0: .\n" + +#: aam.php:404 aam.php:412 aam.php:439 +msgid "Access denied" +msgstr "" + +#: aam.php:927 aam.php:928 +msgid "AAM" +msgstr "" + +#: aam.php:939 aam.php:940 +msgid "Access Control" +msgstr "" + +#: aam.php:949 aam.php:950 +msgid "ConfigPress" +msgstr "" + +#: aam.php:959 aam.php:960 +msgid "Extensions" +msgstr "" + +#: application/core/repository.php:261 +msgid "Failed to Remove Extension" +msgstr "" + +#: application/core/repository.php:306 +msgid "Invalid License Key" +msgstr "" + +#: application/core/repository.php:309 +msgid "Failed to write file to wp-content/aam folder" +msgstr "" + +#: application/core/repository.php:313 +msgid "Failed to reach the WPAAM Server" +msgstr "" + +#: application/core/repository.php:329 +msgid "Failed to insert extension to extension folder" +msgstr "" + +#: application/view/abstract.php:81 +msgid "You are not allowed to manager current view" +msgstr "" + +#: application/view/capability.php:101 application/view/capability.php:205 +msgid "System" +msgstr "" + +#: application/view/capability.php:102 application/view/capability.php:207 +msgid "Post & Page" +msgstr "" + +#: application/view/capability.php:103 application/view/capability.php:209 +msgid "Backend Interface" +msgstr "" + +#: application/view/capability.php:104 application/view/capability.php:211 +msgid "Miscellaneous" +msgstr "" + +#: application/view/extension.php:100 +msgid "Folder advanced-access-manager/extension is not writable" +msgstr "" + +#: application/view/manager.php:76 +msgid "Roles" +msgstr "" + +#: application/view/manager.php:77 +msgid "Role Manager" +msgstr "" + +#: application/view/manager.php:86 +msgid "Users" +msgstr "" + +#: application/view/manager.php:87 +msgid "User Manager" +msgstr "" + +#: application/view/manager.php:96 +msgid "Visitor" +msgstr "" + +#: application/view/manager.php:97 +msgid "Visitor Manager" +msgstr "" + +#: application/view/manager.php:120 +msgid "Admin Menu" +msgstr "" + +#: application/view/manager.php:132 +msgid "Metabox & Widget" +msgstr "" + +#: application/view/manager.php:145 application/view/tmpl/capability.phtml:17 +#: application/view/tmpl/control_area.phtml:47 +#: application/view/tmpl/control_area.phtml:94 +#: application/view/tmpl/control_area.phtml:148 +#: application/view/tmpl/control_area.phtml:199 +#: extension/AAM_Plus_Package/ui.phtml:28 +#: extension/AAM_Plus_Package/ui.phtml:60 +#: extension/AAM_Plus_Package/ui.phtml:93 +#: extension/AAM_Plus_Package/ui.phtml:125 +msgid "Capability" +msgstr "" + +#: application/view/manager.php:156 +msgid "Posts & Pages" +msgstr "" + +#: application/view/manager.php:169 +msgid "Event Manager" +msgstr "" + +#: application/view/manager.php:241 +msgid "You are not allowed to manage any AAM Features." +msgstr "" + +#: application/view/manager.php:820 +msgid "Rollback Settings" +msgstr "" + +#: application/view/manager.php:821 +msgid "Cancel" +msgstr "" + +#: application/view/manager.php:822 +msgid "Send E-mail" +msgstr "" + +#: application/view/manager.php:823 application/view/manager.php:829 +msgid "Add New Role" +msgstr "" + +#: application/view/manager.php:824 +msgid "Manage" +msgstr "" + +#: application/view/manager.php:825 +msgid "Edit" +msgstr "" + +#: application/view/manager.php:826 +msgid "Delete" +msgstr "" + +#: application/view/manager.php:827 +msgid "Filtered" +msgstr "" + +#: application/view/manager.php:828 +msgid "Clear" +msgstr "" + +#: application/view/manager.php:830 +msgid "Save Changes" +msgstr "" + +#: application/view/manager.php:831 +#, php-format +msgid "" +"System detected %d user(s) with this role. All Users with Role %s " +"will be deleted automatically!" +msgstr "" + +#: application/view/manager.php:832 +#, php-format +msgid "Are you sure that you want to delete role %s?" +msgstr "" + +#: application/view/manager.php:833 application/view/tmpl/role.phtml:53 +msgid "Delete Role" +msgstr "" + +#: application/view/manager.php:834 +msgid "Add User" +msgstr "" + +#: application/view/manager.php:835 +msgid "Filter Users" +msgstr "" + +#: application/view/manager.php:836 application/view/manager.php:852 +msgid "Refresh List" +msgstr "" + +#: application/view/manager.php:837 +msgid "Block" +msgstr "" + +#: application/view/manager.php:838 +#, php-format +msgid "Are you sure you want to delete user %s?" +msgstr "" + +#: application/view/manager.php:839 +msgid "Filter Capabilities by Category" +msgstr "" + +#: application/view/manager.php:840 application/view/tmpl/capability.phtml:47 +msgid "Inherit Capabilities" +msgstr "" + +#: application/view/manager.php:841 application/view/tmpl/capability.phtml:62 +msgid "Add New Capability" +msgstr "" + +#: application/view/manager.php:842 +#, php-format +msgid "Are you sure that you want to delete capability %s?" +msgstr "" + +#: application/view/manager.php:843 application/view/tmpl/capability.phtml:81 +msgid "Delete Capability" +msgstr "" + +#: application/view/manager.php:844 +msgid "Select Role" +msgstr "" + +#: application/view/manager.php:845 +msgid "Add Capability" +msgstr "" + +#: application/view/manager.php:846 +msgid "Add Event" +msgstr "" + +#: application/view/manager.php:847 +msgid "Edit Event" +msgstr "" + +#: application/view/manager.php:848 application/view/manager.php:850 +#: application/view/tmpl/event.phtml:105 +msgid "Delete Event" +msgstr "" + +#: application/view/manager.php:849 +msgid "Save Event" +msgstr "" + +#: application/view/manager.php:851 +msgid "Filter Posts by Post Type" +msgstr "" + +#: application/view/manager.php:853 application/view/tmpl/manager.phtml:63 +msgid "Restore Default" +msgstr "" + +#: application/view/manager.php:854 +msgid "Apply" +msgstr "" + +#: application/view/manager.php:855 +msgid "Edit Term" +msgstr "" + +#: application/view/manager.php:856 +msgid "Manager Access" +msgstr "" + +#: application/view/manager.php:857 +msgid "Unlock Default Accesss Control" +msgstr "" + +#: application/view/manager.php:858 +msgid "Close" +msgstr "" + +#: application/view/manager.php:859 +msgid "Edit Role" +msgstr "" + +#: application/view/manager.php:860 +msgid "Restore Default Capabilities" +msgstr "" + +#: application/view/manager.php:861 +#, php-format +msgid "Are you sure you want to delete %s?" +msgstr "" + +#: application/view/manager.php:862 +#, php-format +msgid "Are you sure you want to move %s to trash?" +msgstr "" + +#: application/view/manager.php:863 application/view/tmpl/post.phtml:27 +msgid "Delete Post" +msgstr "" + +#: application/view/manager.php:864 +msgid "Delete Permanently" +msgstr "" + +#: application/view/manager.php:865 +msgid "Trash Post" +msgstr "" + +#: application/view/manager.php:866 +msgid "Restore Default Access" +msgstr "" + +#: application/view/manager.php:867 +msgid "Duplicate" +msgstr "" + +#: application/view/manager.php:868 +msgid "Actions Locked" +msgstr "" + +#: application/view/manager.php:869 +msgid "" +"

        AAM Documentation

        Find more information about " +"Advanced Access Manager here.
        " +msgstr "" + +#: application/view/metabox.php:191 +msgid "Dashboard Widgets" +msgstr "" + +#: application/view/metabox.php:195 +msgid "Frontend Widgets" +msgstr "" + +#: application/view/post.php:199 +msgid "[empty]" +msgstr "" + +#: application/view/post.php:383 application/view/post.php:391 +msgid "All" +msgstr "" + +#: config.php:62 +msgid "Failed to create wp-content/aam folder" +msgstr "" + +#: config.php:65 +msgid "Folder wp-content/aam is not writable" +msgstr "" + +#: extension/AAM_Activity_Log/activity.php:98 +msgid "System Login" +msgstr "" + +#: extension/AAM_Activity_Log/activity.php:102 +msgid "System Logout" +msgstr "" + +#: extension/AAM_Activity_Log/activity.php:108 +msgid "Unknown Activity" +msgstr "" + +#: extension/AAM_Activity_Log/extension.php:72 +msgid "Activity Log" +msgstr "" + +#: extension/AAM_Activity_Log/extension.php:177 +msgid "Clear Logs" +msgstr "" + +#: extension/AAM_Activity_Log/extension.php:178 +msgid "Get More" +msgstr "" + +#: extension/AAM_Multisite_Support/extension.php:122 +msgid "Sites" +msgstr "" + +#: extension/AAM_Multisite_Support/extension.php:123 +msgid "Site Manager" +msgstr "" + +#: extension/AAM_Multisite_Support/extension.php:186 +msgid "Set Default" +msgstr "" + +#: extension/AAM_Multisite_Support/extension.php:187 +msgid "Unset Default" +msgstr "" + +#: extension/AAM_Multisite_Support/extension.php:188 +msgid "Set as Default" +msgstr "" + +#: extension/AAM_My_Feature/extension.php:56 +msgid "My Feature" +msgstr "" + +#: extension/AAM_Plus_Package/extension.php:168 +msgid "Comments" +msgstr "" + +#: application/view/tmpl/capability.phtml:16 +msgid "Category" +msgstr "" + +#: application/view/tmpl/capability.phtml:18 +#: application/view/tmpl/event.phtml:19 application/view/tmpl/post.phtml:19 +msgid "Control" +msgstr "" + +#: application/view/tmpl/capability.phtml:24 +msgid "Filter Capability List" +msgstr "" + +#: application/view/tmpl/capability.phtml:28 +msgid "Group Name" +msgstr "" + +#: application/view/tmpl/capability.phtml:29 +msgid "Select" +msgstr "" + +#: application/view/tmpl/capability.phtml:53 +#: application/view/tmpl/role.phtml:27 application/view/tmpl/role.phtml:46 +#: application/view/tmpl/user.phtml:31 +msgid "Role Name" +msgstr "" + +#: application/view/tmpl/capability.phtml:54 +#: application/view/tmpl/event.phtml:17 application/view/tmpl/event.phtml:65 +#: application/view/tmpl/role.phtml:17 application/view/tmpl/user.phtml:17 +#: application/view/tmpl/user.phtml:32 +#: extension/AAM_Multisite_Support/ui.phtml:18 +msgid "Action" +msgstr "" + +#: application/view/tmpl/capability.phtml:66 +msgid "Capability Name" +msgstr "" + +#: application/view/tmpl/capability.phtml:70 +msgid "Keep Unfiltered" +msgstr "" + +#: application/view/tmpl/configpress.phtml:15 +#: application/view/tmpl/configpress.phtml:34 +#: application/view/tmpl/configpress.phtml:53 +#: application/view/tmpl/extension.phtml:15 +#: application/view/tmpl/extension.phtml:148 +#: application/view/tmpl/extension.phtml:167 +#: application/view/tmpl/extension.phtml:187 +#: application/view/tmpl/manager.phtml:17 +#: application/view/tmpl/manager.phtml:38 +#: application/view/tmpl/manager.phtml:57 +#: application/view/tmpl/manager.phtml:87 +msgid "Click to toggle" +msgstr "" + +#: application/view/tmpl/configpress.phtml:18 +msgid "AAM ConfigPress" +msgstr "" + +#: application/view/tmpl/configpress.phtml:36 +#: application/view/tmpl/extension.phtml:150 +#: application/view/tmpl/manager.phtml:40 +msgid "AAM Warnings" +msgstr "" + +#: application/view/tmpl/configpress.phtml:55 +#: application/view/tmpl/manager.phtml:59 +msgid "Control Panel" +msgstr "" + +#: application/view/tmpl/configpress.phtml:59 +#: application/view/tmpl/manager.phtml:64 +msgid "Save" +msgstr "" + +#: application/view/tmpl/configpress.phtml:62 +#: application/view/tmpl/manager.phtml:67 +msgid "Follow @wpaam" +msgstr "" + +#: application/view/tmpl/configpress.phtml:62 +#: application/view/tmpl/manager.phtml:67 +msgid "Follow" +msgstr "" + +#: application/view/tmpl/configpress.phtml:63 +#: application/view/tmpl/manager.phtml:68 +msgid "Help Forum" +msgstr "" + +#: application/view/tmpl/configpress.phtml:63 +#: application/view/tmpl/manager.phtml:68 +msgid "Help" +msgstr "" + +#: application/view/tmpl/configpress.phtml:64 +#: application/view/tmpl/manager.phtml:69 +#: application/view/tmpl/manager.phtml:77 +msgid "E-mail Us" +msgstr "" + +#: application/view/tmpl/configpress.phtml:65 +#: application/view/tmpl/manager.phtml:70 +msgid "Rate AAM" +msgstr "" + +#: application/view/tmpl/configpress.phtml:65 +#: application/view/tmpl/manager.phtml:70 +msgid "Rate Us" +msgstr "" + +#: application/view/tmpl/control_area.phtml:43 +#: application/view/tmpl/control_area.phtml:90 +#: application/view/tmpl/control_area.phtml:142 +#: application/view/tmpl/control_area.phtml:193 +msgid "Access" +msgstr "" + +#: application/view/tmpl/control_area.phtml:48 +#: application/view/tmpl/control_area.phtml:95 +#: application/view/tmpl/control_area.phtml:149 +#: application/view/tmpl/control_area.phtml:200 +#: extension/AAM_Plus_Package/ui.phtml:29 +#: extension/AAM_Plus_Package/ui.phtml:61 +#: extension/AAM_Plus_Package/ui.phtml:94 +#: extension/AAM_Plus_Package/ui.phtml:126 +msgid "Restrict" +msgstr "" + +#: application/view/tmpl/control_area.phtml:140 +#: application/view/tmpl/control_area.phtml:191 +#, php-format +msgid "All %s in Term" +msgstr "" + +#: application/view/tmpl/control_area.phtml:239 +msgid "Get AAM Plus Package" +msgstr "" + +#: application/view/tmpl/event.phtml:14 application/view/tmpl/event.phtml:28 +msgid "Event" +msgstr "" + +#: application/view/tmpl/event.phtml:15 +msgid "Event Specifier" +msgstr "" + +#: application/view/tmpl/event.phtml:16 +msgid "Bind Post Type" +msgstr "" + +#: application/view/tmpl/event.phtml:18 +msgid "Action Specifier" +msgstr "" + +#: application/view/tmpl/event.phtml:24 +msgid "Manager Event" +msgstr "" + +#: application/view/tmpl/event.phtml:31 +msgid "Post Status Change" +msgstr "" + +#: application/view/tmpl/event.phtml:32 +msgid "Post Content Change" +msgstr "" + +#: application/view/tmpl/event.phtml:37 +msgid "Status Changed To" +msgstr "" + +#: application/view/tmpl/event.phtml:52 +msgid "Bind to Post Type" +msgstr "" + +#: application/view/tmpl/event.phtml:68 +msgid "Email Notification" +msgstr "" + +#: application/view/tmpl/event.phtml:69 +msgid "Change Status" +msgstr "" + +#: application/view/tmpl/event.phtml:70 +msgid "Callback" +msgstr "" + +#: application/view/tmpl/event.phtml:75 +msgid "Email Address" +msgstr "" + +#: application/view/tmpl/event.phtml:81 +msgid "Change Status To" +msgstr "" + +#: application/view/tmpl/event.phtml:96 +msgid "Callback Function" +msgstr "" + +#: application/view/tmpl/event.phtml:106 +msgid "Are you sure you want to delete selected Event?" +msgstr "" + +#: application/view/tmpl/extension.phtml:18 +msgid "Extension List" +msgstr "" + +#: application/view/tmpl/extension.phtml:25 +#: application/view/tmpl/post.phtml:17 +msgid "Name" +msgstr "" + +#: application/view/tmpl/extension.phtml:26 +msgid "Description" +msgstr "" + +#: application/view/tmpl/extension.phtml:27 +msgid "Price" +msgstr "" + +#: application/view/tmpl/extension.phtml:28 +msgid "Actions" +msgstr "" + +#: application/view/tmpl/extension.phtml:123 +msgid "Install Extension" +msgstr "" + +#: application/view/tmpl/extension.phtml:125 +msgid "" +"If you already have license key for current extension, please enter it " +"below. Othewise click Purchase button to checkout your order." +msgstr "" + +#: application/view/tmpl/extension.phtml:130 +msgid "Update Extension" +msgstr "" + +#: application/view/tmpl/extension.phtml:132 +msgid "Extension has been installed. Your license key: " +msgstr "" + +#: application/view/tmpl/extension.phtml:169 +msgid "Connect with AAM" +msgstr "" + +#: application/view/tmpl/extension.phtml:189 +msgid "Development License" +msgstr "" + +#: application/view/tmpl/extension.phtml:193 +msgid "" +"Become a member of AAM Community. Obtain Development License " +"today for $119 and get access to all extensions that are available today and " +"will be developed witin a year." +msgstr "" + +#: application/view/tmpl/extension.phtml:196 +msgid "Read More" +msgstr "" + +#: application/view/tmpl/manager.phtml:63 +msgid "Default" +msgstr "" + +#: application/view/tmpl/manager.phtml:74 +msgid "Undo Change" +msgstr "" + +#: application/view/tmpl/manager.phtml:75 +msgid "Would your like to role back current settings?" +msgstr "" + +#: application/view/tmpl/manager.phtml:78 +msgid "Our E-mail address is support@wpaam.com" +msgstr "" + +#: application/view/tmpl/manager.phtml:89 +msgid "Control Manager" +msgstr "" + +#: application/view/tmpl/menu.phtml:33 +msgid "Restrict All" +msgstr "" + +#: application/view/tmpl/menu.phtml:70 +msgid "There is no single menu item allowed for current Role or User" +msgstr "" + +#: application/view/tmpl/metabox.phtml:15 +msgid "Retrieve Metaboxes From Link" +msgstr "" + +#: application/view/tmpl/metabox.phtml:16 +msgid "Refresh the List" +msgstr "" + +#: application/view/tmpl/post.phtml:18 +msgid "Status" +msgstr "" + +#: application/view/tmpl/post.phtml:31 +msgid "Filter Posts by Type" +msgstr "" + +#: application/view/tmpl/post.phtml:34 +msgid "Collapse All" +msgstr "" + +#: application/view/tmpl/post.phtml:35 +msgid "Expand All" +msgstr "" + +#: application/view/tmpl/post.phtml:36 +msgid "Refresh" +msgstr "" + +#: application/view/tmpl/post.phtml:45 +msgid "You reached the limit. Get Administrator
        Role" +msgstr "" + +#: application/view/tmpl/user.phtml:16 extension/AAM_Activity_Log/ui.phtml:15 +msgid "Username" +msgstr "" + +#: application/view/tmpl/user.phtml:25 +msgid "Filter Users by Role" +msgstr "" + +#: application/view/tmpl/user.phtml:39 +msgid "Delete User" +msgstr "" + +#: application/view/tmpl/visitor.phtml:11 +msgid "" +"Control Access to your blog for visitor (any user that is not logged in)" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:16 +msgid "Activity" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:17 +msgid "Time" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:23 +msgid "Clear Activity Log" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:25 +msgid "Are you sure you want to clear activity log?" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:28 +msgid "Activity Log Info" +msgstr "" + +#: extension/AAM_Activity_Log/ui.phtml:30 +#, php-format +msgid "" +"Basic version of Activity Log tracks only user's login and logout. Consider " +"to purchase the %s Extension today to get access to advanced list of " +"activities as well as we can develop additional activities on demand." +msgstr "" + +#: extension/AAM_Multisite_Support/ui.phtml:17 +msgid "Site" +msgstr "" + +#: extension/AAM_Multisite_Support/ui.phtml:24 +msgid "Set Default Site" +msgstr "" + +#: extension/AAM_Multisite_Support/ui.phtml:26 +msgid "Would you like to set the site" +msgstr "" + +#: extension/AAM_Multisite_Support/ui.phtml:26 +msgid "as default?" +msgstr "" + +#: extension/AAM_Multisite_Support/ui.phtml:29 +msgid "All newly created sites will inherit list of Roles & Capabilities." +msgstr "" + +#: extension/AAM_My_Feature/ui.phtml:13 +msgid "Do you need a custom feature?" +msgstr "" + +#: extension/AAM_My_Feature/ui.phtml:15 +msgid "Create your own extension " +msgstr "" + +#: extension/AAM_My_Feature/ui.phtml:16 +msgid "or ask us and we will develop it for you." +msgstr "" + +#: extension/AAM_Plus_Package/ui.phtml:24 +#: extension/AAM_Plus_Package/ui.phtml:56 +msgid "All Categories Default Access" +msgstr "" + +#: extension/AAM_Plus_Package/ui.phtml:89 +#: extension/AAM_Plus_Package/ui.phtml:121 +msgid "All Posts Default Access" +msgstr "" diff --git a/wp-content/plugins/advanced-access-manager/library/Zend/Config.php b/wp-content/plugins/advanced-access-manager/library/Zend/Config.php new file mode 100644 index 0000000..0368d5e --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/library/Zend/Config.php @@ -0,0 +1,485 @@ + to fit the + * project needs. + */ + +/** + * @category Zend + * @package Zend_Config + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +class Zend_Config implements Countable, Iterator +{ + /** + * Whether in-memory modifications to configuration data are allowed + * + * @var boolean + */ + protected $_allowModifications; + + /** + * Iteration index + * + * @var integer + */ + protected $_index; + + /** + * Number of elements in configuration data + * + * @var integer + */ + protected $_count; + + /** + * Contains array of configuration data + * + * @var array + */ + protected $_data; + + /** + * Used when unsetting values during iteration to ensure we do not skip + * the next element + * + * @var boolean + */ + protected $_skipNextIteration; + + /** + * Contains which config file sections were loaded. This is null + * if all sections were loaded, a string name if one section is loaded + * and an array of string names if multiple sections were loaded. + * + * @var mixed + */ + protected $_loadedSection; + + /** + * This is used to track section inheritance. The keys are names of sections that + * extend other sections, and the values are the extended sections. + * + * @var array + */ + protected $_extends = array(); + + /** + * Load file error string. + * + * Is null if there was no error while file loading + * + * @var string + */ + protected $_loadFileErrorStr = null; + + /** + * Zend_Config provides a property based interface to + * an array. The data are read-only unless $allowModifications + * is set to true on construction. + * + * Zend_Config also implements Countable and Iterator to + * facilitate easy access to the data. + * + * @param array $array + * @param boolean $allowModifications + * @return void + */ + public function __construct(array $array, $allowModifications = false) + { + $this->_allowModifications = (boolean) $allowModifications; + $this->_loadedSection = null; + $this->_index = 0; + $this->_data = array(); + foreach ($array as $key => $value) { + if (is_array($value)) { + $this->_data[$key] = new self($value, $this->_allowModifications); + } else { + $this->_data[$key] = $value; + } + } + $this->_count = count($this->_data); + } + + /** + * Retrieve a value and return $default if there is no element set. + * + * @param string $name + * @param mixed $default + * @return mixed + */ + public function get($name, $default = null) + { + $result = $default; + if (array_key_exists($name, $this->_data)) { + $result = $this->_data[$name]; + } + return $result; + } + + /** + * Magic function so that $obj->value will work. + * + * @param string $name + * @return mixed + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Only allow setting of a property if $allowModifications + * was set to true on construction. Otherwise, throw an exception. + * + * @param string $name + * @param mixed $value + * @throws Zend_Config_Exception + * @return void + */ + public function __set($name, $value) + { + if ($this->_allowModifications) { + if (is_array($value)) { + $this->_data[$name] = new self($value, true); + } else { + $this->_data[$name] = $value; + } + $this->_count = count($this->_data); + } else { + /** @see Zend_Config_Exception */ + throw new Zend_Config_Exception('Zend_Config is read only'); + } + } + + /** + * Deep clone of this instance to ensure that nested Zend_Configs + * are also cloned. + * + * @return void + */ + public function __clone() + { + $array = array(); + foreach ($this->_data as $key => $value) { + if ($value instanceof Zend_Config) { + $array[$key] = clone $value; + } else { + $array[$key] = $value; + } + } + $this->_data = $array; + } + + /** + * Return an associative array of the stored data. + * + * @return array + */ + public function toArray() + { + $array = array(); + $data = $this->_data; + foreach ($data as $key => $value) { + if ($value instanceof Zend_Config) { + $array[$key] = $value->toArray(); + } else { + $array[$key] = $value; + } + } + return $array; + } + + /** + * Support isset() overloading on PHP 5.1 + * + * @param string $name + * @return boolean + */ + public function __isset($name) + { + return isset($this->_data[$name]); + } + + /** + * Support unset() overloading on PHP 5.1 + * + * @param string $name + * @throws Zend_Config_Exception + * @return void + */ + public function __unset($name) + { + if ($this->_allowModifications) { + unset($this->_data[$name]); + $this->_count = count($this->_data); + $this->_skipNextIteration = true; + } else { + /** @see Zend_Config_Exception */ + throw new Zend_Config_Exception('Zend_Config is read only'); + } + + } + + /** + * Defined by Countable interface + * + * @return int + */ + public function count() + { + return $this->_count; + } + + /** + * Defined by Iterator interface + * + * @return mixed + */ + public function current() + { + $this->_skipNextIteration = false; + return current($this->_data); + } + + /** + * Defined by Iterator interface + * + * @return mixed + */ + public function key() + { + return key($this->_data); + } + + /** + * Defined by Iterator interface + * + */ + public function next() + { + if ($this->_skipNextIteration) { + $this->_skipNextIteration = false; + return; + } + next($this->_data); + $this->_index++; + } + + /** + * Defined by Iterator interface + * + */ + public function rewind() + { + $this->_skipNextIteration = false; + reset($this->_data); + $this->_index = 0; + } + + /** + * Defined by Iterator interface + * + * @return boolean + */ + public function valid() + { + return $this->_index < $this->_count; + } + + /** + * Returns the section name(s) loaded. + * + * @return mixed + */ + public function getSectionName() + { + if(is_array($this->_loadedSection) && count($this->_loadedSection) == 1) { + $this->_loadedSection = $this->_loadedSection[0]; + } + return $this->_loadedSection; + } + + /** + * Returns true if all sections were loaded + * + * @return boolean + */ + public function areAllSectionsLoaded() + { + return $this->_loadedSection === null; + } + + + /** + * Merge another Zend_Config with this one. The items + * in $merge will override the same named items in + * the current config. + * + * @param Zend_Config $merge + * @return Zend_Config + */ + public function merge(Zend_Config $merge) + { + foreach($merge as $key => $item) { + if(array_key_exists($key, $this->_data)) { + if($item instanceof Zend_Config && $this->$key instanceof Zend_Config) { + $this->$key = $this->$key->merge(new Zend_Config($item->toArray(), !$this->readOnly())); + } else { + $this->$key = $item; + } + } else { + if($item instanceof Zend_Config) { + $this->$key = new Zend_Config($item->toArray(), !$this->readOnly()); + } else { + $this->$key = $item; + } + } + } + + return $this; + } + + /** + * Prevent any more modifications being made to this instance. Useful + * after merge() has been used to merge multiple Zend_Config objects + * into one object which should then not be modified again. + * + */ + public function setReadOnly() + { + $this->_allowModifications = false; + foreach ($this->_data as $key => $value) { + if ($value instanceof Zend_Config) { + $value->setReadOnly(); + } + } + } + + /** + * Returns if this Zend_Config object is read only or not. + * + * @return boolean + */ + public function readOnly() + { + return !$this->_allowModifications; + } + + /** + * Get the current extends + * + * @return array + */ + public function getExtends() + { + return $this->_extends; + } + + /** + * Set an extend for Zend_Config_Writer + * + * @param string $extendingSection + * @param string $extendedSection + * @return void + */ + public function setExtend($extendingSection, $extendedSection = null) + { + if ($extendedSection === null && isset($this->_extends[$extendingSection])) { + unset($this->_extends[$extendingSection]); + } else if ($extendedSection !== null) { + $this->_extends[$extendingSection] = $extendedSection; + } + } + + /** + * Throws an exception if $extendingSection may not extend $extendedSection, + * and tracks the section extension if it is valid. + * + * @param string $extendingSection + * @param string $extendedSection + * @throws Zend_Config_Exception + * @return void + */ + protected function _assertValidExtend($extendingSection, $extendedSection) + { + // detect circular section inheritance + $extendedSectionCurrent = $extendedSection; + while (array_key_exists($extendedSectionCurrent, $this->_extends)) { + if ($this->_extends[$extendedSectionCurrent] == $extendingSection) { + /** @see Zend_Config_Exception */ + throw new Zend_Config_Exception('Illegal circular inheritance detected'); + } + $extendedSectionCurrent = $this->_extends[$extendedSectionCurrent]; + } + // remember that this section extends another section + $this->_extends[$extendingSection] = $extendedSection; + } + + /** + * Handle any errors from simplexml_load_file or parse_ini_file + * + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline + */ + protected function _loadFileErrorHandler($errno, $errstr, $errfile, $errline) + { + if ($this->_loadFileErrorStr === null) { + $this->_loadFileErrorStr = $errstr; + } else { + $this->_loadFileErrorStr .= (PHP_EOL . $errstr); + } + } + + /** + * Merge two arrays recursively, overwriting keys of the same name + * in $firstArray with the value in $secondArray. + * + * @param mixed $firstArray First array + * @param mixed $secondArray Second array to merge into first array + * @return array + */ + protected function _arrayMergeRecursive($firstArray, $secondArray) + { + if (is_array($firstArray) && is_array($secondArray)) { + foreach ($secondArray as $key => $value) { + if (isset($firstArray[$key])) { + $firstArray[$key] = $this->_arrayMergeRecursive($firstArray[$key], $value); + } else { + if($key === 0) { + $firstArray= array(0=>$this->_arrayMergeRecursive($firstArray, $value)); + } else { + $firstArray[$key] = $value; + } + } + } + } else { + $firstArray = $secondArray; + } + + return $firstArray; + } +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/library/Zend/Config/Exception.php b/wp-content/plugins/advanced-access-manager/library/Zend/Config/Exception.php new file mode 100644 index 0000000..df0c842 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/library/Zend/Config/Exception.php @@ -0,0 +1,33 @@ + to fit the + * project needs. + */ + +/** + * @category Zend + * @package Zend_Config + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +class Zend_Config_Exception extends Zend_Exception {} diff --git a/wp-content/plugins/advanced-access-manager/library/Zend/Config/Ini.php b/wp-content/plugins/advanced-access-manager/library/Zend/Config/Ini.php new file mode 100644 index 0000000..f4717c5 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/library/Zend/Config/Ini.php @@ -0,0 +1,301 @@ + to fit the + * project needs. + */ + + +/** + * @category Zend + * @package Zend_Config + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +class Zend_Config_Ini extends Zend_Config +{ + /** + * String that separates nesting levels of configuration data identifiers + * + * @var string + */ + protected $_nestSeparator = '.'; + + /** + * String that separates the parent section name + * + * @var string + */ + protected $_sectionSeparator = ':'; + + /** + * Whether to skip extends or not + * + * @var boolean + */ + protected $_skipExtends = false; + + /** + * Loads the section $section from the config file $filename for + * access facilitated by nested object properties. + * + * If the section name contains a ":" then the section name to the right + * is loaded and included into the properties. Note that the keys in + * this $section will override any keys of the same + * name in the sections that have been included via ":". + * + * If the $section is null, then all sections in the ini file are loaded. + * + * If any key includes a ".", then this will act as a separator to + * create a sub-property. + * + * example ini file: + * [all] + * db.connection = database + * hostname = live + * + * [staging : all] + * hostname = staging + * + * after calling $data = new Zend_Config_Ini($file, 'staging'); then + * $data->hostname === "staging" + * $data->db->connection === "database" + * + * The $options parameter may be provided as either a boolean or an array. + * If provided as a boolean, this sets the $allowModifications option of + * Zend_Config. If provided as an array, there are three configuration + * directives that may be set. For example: + * + * $options = array( + * 'allowModifications' => false, + * 'nestSeparator' => ':', + * 'skipExtends' => false, + * ); + * + * @param string $filename + * @param mixed $section + * @param boolean|array $options + * @throws Zend_Config_Exception + * @return void + */ + public function __construct($filename, $section = null, $options = false) + { + if (empty($filename)) { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception('Filename is not set'); + } + + $allowModifications = false; + if (is_bool($options)) { + $allowModifications = $options; + } elseif (is_array($options)) { + if (isset($options['allowModifications'])) { + $allowModifications = (bool) $options['allowModifications']; + } + if (isset($options['nestSeparator'])) { + $this->_nestSeparator = (string) $options['nestSeparator']; + } + if (isset($options['skipExtends'])) { + $this->_skipExtends = (bool) $options['skipExtends']; + } + } + + $iniArray = $this->_loadIniFile($filename); + + if (null === $section) { + // Load entire file + $dataArray = array(); + foreach ($iniArray as $sectionName => $sectionData) { + if(!is_array($sectionData)) { + $dataArray = $this->_arrayMergeRecursive($dataArray, $this->_processKey(array(), $sectionName, $sectionData)); + } else { + $dataArray[$sectionName] = $this->_processSection($iniArray, $sectionName); + } + } + parent::__construct($dataArray, $allowModifications); + } else { + // Load one or more sections + if (!is_array($section)) { + $section = array($section); + } + $dataArray = array(); + foreach ($section as $sectionName) { + if (!isset($iniArray[$sectionName])) { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception("Section '$sectionName' cannot be found in $filename"); + } + $dataArray = $this->_arrayMergeRecursive($this->_processSection($iniArray, $sectionName), $dataArray); + + } + parent::__construct($dataArray, $allowModifications); + } + + $this->_loadedSection = $section; + } + + /** + * Load the INI file from disk using parse_ini_file(). Use a private error + * handler to convert any loading errors into a Zend_Config_Exception + * + * @param string $filename + * @throws Zend_Config_Exception + * @return array + */ + protected function _parseIniFile($filename) + { + set_error_handler(array($this, '_loadFileErrorHandler')); + $iniArray = parse_ini_file($filename, true); // Warnings and errors are suppressed + restore_error_handler(); + + // Check if there was a error while loading file + if ($this->_loadFileErrorStr !== null) { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception($this->_loadFileErrorStr); + } + + return $iniArray; + } + + /** + * Load the ini file and preprocess the section separator (':' in the + * section name (that is used for section extension) so that the resultant + * array has the correct section names and the extension information is + * stored in a sub-key called ';extends'. We use ';extends' as this can + * never be a valid key name in an INI file that has been loaded using + * parse_ini_file(). + * + * @param string $filename + * @throws Zend_Config_Exception + * @return array + */ + protected function _loadIniFile($filename) + { + $loaded = $this->_parseIniFile($filename); + $iniArray = array(); + foreach ($loaded as $key => $data) + { + $pieces = explode($this->_sectionSeparator, $key); + $thisSection = trim($pieces[0]); + switch (count($pieces)) { + case 1: + $iniArray[$thisSection] = $data; + break; + + case 2: + $extendedSection = trim($pieces[1]); + $iniArray[$thisSection] = array_merge(array(';extends'=>$extendedSection), $data); + break; + + default: + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception("Section '$thisSection' may not extend multiple sections in $filename"); + } + } + + return $iniArray; + } + + /** + * Process each element in the section and handle the ";extends" inheritance + * key. Passes control to _processKey() to handle the nest separator + * sub-property syntax that may be used within the key name. + * + * @param array $iniArray + * @param string $section + * @param array $config + * @throws Zend_Config_Exception + * @return array + */ + protected function _processSection($iniArray, $section, $config = array()) + { + $thisSection = $iniArray[$section]; + + foreach ($thisSection as $key => $value) { + if (strtolower($key) == ';extends') { + if (isset($iniArray[$value])) { + $this->_assertValidExtend($section, $value); + + if (!$this->_skipExtends) { + $config = $this->_processSection($iniArray, $value, $config); + } + } else { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception("Parent section '$section' cannot be found"); + } + } else { + $config = $this->_processKey($config, $key, $value); + } + } + return $config; + } + + /** + * Assign the key's value to the property list. Handles the + * nest separator for sub-properties. + * + * @param array $config + * @param string $key + * @param string $value + * @throws Zend_Config_Exception + * @return array + */ + protected function _processKey($config, $key, $value) + { + if (strpos($key, $this->_nestSeparator) !== false) { + $pieces = explode($this->_nestSeparator, $key, 2); + if (strlen($pieces[0]) && strlen($pieces[1])) { + if (!isset($config[$pieces[0]])) { + if ($pieces[0] === '0' && !empty($config)) { + // convert the current values in $config into an array + $config = array($pieces[0] => $config); + } else { + $config[$pieces[0]] = array(); + } + } elseif (!is_array($config[$pieces[0]])) { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception("Cannot create sub-key for '{$pieces[0]}' as key already exists"); + } + $config[$pieces[0]] = $this->_processKey($config[$pieces[0]], $pieces[1], $value); + } else { + /** + * @see Zend_Config_Exception + */ + throw new Zend_Config_Exception("Invalid key '$key'"); + } + } else { + $config[$key] = $value; + } + return $config; + } +} diff --git a/wp-content/plugins/advanced-access-manager/library/Zend/Exception.php b/wp-content/plugins/advanced-access-manager/library/Zend/Exception.php new file mode 100644 index 0000000..4089913 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/library/Zend/Exception.php @@ -0,0 +1,101 @@ + to fit the + * project needs. + */ + +/** +* @category Zend +* @package Zend +* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) +* @license http://framework.zend.com/license/new-bsd New BSD License +*/ +class Zend_Exception extends Exception +{ + /** + * @var null|Exception + */ + private $_previous = null; + + /** + * Construct the exception + * + * @param string $msg + * @param int $code + * @param Exception $previous + * @return void + */ + public function __construct($msg = '', $code = 0, Exception $previous = null) + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + parent::__construct($msg, (int) $code); + $this->_previous = $previous; + } else { + parent::__construct($msg, (int) $code, $previous); + } + } + + /** + * Overloading + * + * For PHP < 5.3.0, provides access to the getPrevious() method. + * + * @param string $method + * @param array $args + * @return mixed + */ + public function __call($method, array $args) + { + if ('getprevious' == strtolower($method)) { + return $this->_getPrevious(); + } + return null; + } + + /** + * String representation of the exception + * + * @return string + */ + public function __toString() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + if (null !== ($e = $this->getPrevious())) { + return $e->__toString() + . "\n\nNext " + . parent::__toString(); + } + } + return parent::__toString(); + } + + /** + * Returns previous Exception + * + * @return Exception|null + */ + protected function _getPrevious() + { + return $this->_previous; + } +} diff --git a/wp-content/plugins/advanced-access-manager/license.txt b/wp-content/plugins/advanced-access-manager/license.txt new file mode 100644 index 0000000..e79a228 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/license.txt @@ -0,0 +1,14 @@ +Copyright (C) <2013> Vasyl Martyniuk + +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 . \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/aam.css b/wp-content/plugins/advanced-access-manager/media/css/aam.css new file mode 100644 index 0000000..313e410 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/aam.css @@ -0,0 +1,856 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== +*/ + + +/** GLOBAL AAM STYLES */ +#aam_form{ + position: relative; +} + +.aam-asterix{ + display: inline-block; + font-size: 0.9em; + color: #bf0909; + margin-left: 3px; +} + +.aam-form-table{ + width: 100%; +} + +.aam-form-table th{ + text-align: right; +} + +.aam-form-table input, .aam-form-table select{ + width: 100%; +} + +.dialog-content{ + text-align: center; +} + +.dialog-note{ + font-size: 0.8em; + margin-bottom: 0; +} + +.dialog-input{ + width: 55%; + margin-left: 5%; +} + +.aam-input{ + width: 100%; +} + +.dialog-input-dynamic{ + width: 55%; + margin-left: 5%; + background: transparent url('images/cmanager/field-loader.gif') no-repeat center; +} + +.input-dynamic{ + background: transparent url('images/cmanager/field-loader.gif') no-repeat center; +} + +.dialog-fieldset{ + width: 100%; + margin: 10px 0px; +} + +.aam-medium-loader span{ + background-image: url('images/common/medium-loader.gif'); + background-position: 0 0 !important; +} + +.aam-list-top-actions{ + float: right; + display: inline-table; + width: auto; + text-align: right; +} + +.aam-list-top-actions a{ + display: table-cell; + min-width: 30px; +} + +.aam-list-row-actions{ + width: 100%; + display: inline-table; + text-align: center; +} + +.aam-list-row-actions .aam-icon{ + display: table-cell; +} + +.clear{ + line-height: 0; + font-size: 0; + padding: 0; + margin: 0; + clear: both; +} + +.main-inside{ + position: relative; + min-height: 200px; +} + +.aam-main-loader{ + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background: transparent url('images/main-loader.gif') no-repeat center; +} + +.aam-metabox-loader{ + display: none; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background: transparent url('images/metabox-loader.gif') no-repeat center; +} + +.aam-bold{ + font-weight: bold; +} + +.current-site{ + text-transform: capitalize; + font-weight: bold; + color: #257DA6; + margin-right: 4px; +} + + +.current-subject{ + text-transform: capitalize; + font-weight: bold; + color: #bf0909; +} + +/** FEATURE LIST STYLES */ +.feature-list{ + width: 25%; + float: left; +} + +.feature-item{ + height: 28px; + width: 100%; + display: table; + font-size: 1em; + border: 1px solid #CCCCCC; + font-family: "Lucida Console", Monaco, monospace; + cursor: pointer; + background: transparent url('images/feature.png') no-repeat 2px 2px; +} + +.feature-item:hover{ + border: 1px solid #006400; +} + +.feature-item-active{ + border: 1px solid #257DA6; + background: #257DA6 url('images/feature-active.png') no-repeat 2px 2px; +} + +.feature-item span{ + text-transform: uppercase; + display: table-cell; + padding-left: 38px; + vertical-align: middle; +} + +.feature-item-active span{ + font-weight: bold; + color: #FFFFFF; +} + +.feature-content{ + float: right; + width: 72%; + border-radius: 4px; + border: 1px solid #CCCCCC; + padding: 5px; +} + +.feature-content-container{ + position: relative; +} + +.feature-list-empty{ + text-align: center; + font-size: 1.1em; + color: #AAAAAA; + padding: 10px; +} + +/** CONTROL PANEL STYLES */ + +#major-publishing-actions{ + margin-top: 5px; + border-top: 1px solid #D5D5D5; +} + +/** CONTROL MANAGER STYLES */ +.control-manager{ + display: table; + width: 100%; + margin-bottom: 5px; +} + +.manager-item{ + height: 50px; + min-width: 32px; + display: table-cell; + text-align: center; + vertical-align: bottom; + text-decoration: none; + text-transform: uppercase; + font-size: 10px; + font-weight: bold; + color: #333333; + background-repeat: no-repeat; + background-position: center top; +} + +.control-manager-content{ + border-top: 1px solid #F5F5F5; + visibility: hidden; +} + +/** + ================ + ALL OTHER STYLES + ================ +*/ + +/** ROLE MANAGER STYLES */ +.manager-item-role{ + background-image: url('images/cmanager/role.png'); +} + +.manager-item-role-active{ + background-image: url('images/cmanager/role-active.png'); +} + +/** USER MANAGER STYLES */ +.manager-item-user{ + background-image: url('images/cmanager/user.png'); +} + +.manager-item-user-active{ + background-image: url('images/cmanager/user-active.png'); +} + +.user-settings{ + border: 1px solid #E2E4FF; + width: 100%; +} + +.user-settings td { + border-bottom: 1px solid #CCCCCC; +} + +.user-settings th { + padding: 2px 10px; + border-bottom: 1px solid #CCCCCC; + font-weight: bold; + text-transform: uppercase; + cursor: pointer; + text-align: right; + background-color: #257da6; +} + +.user-settings input, .user-settings select{ + width: 100%; + border: 0px solid transparent; +} + +.user-action-locked{ + display: inline-block; + width:16px; + height: 16px; + background: transparent url('images/cmanager/lock.png') no-repeat center; +} + + +/** VISITOR MANAGER STYLES */ +.manager-item-visitor{ + background-image: url('images/cmanager/visitor.png'); +} + +.manager-item-visitor-active{ + background-image: url('images/cmanager/visitor-active.png'); +} + +.control-manager-visitor{ + margin-top: 10px; + width: auto; + border-top: 4px solid #257DA6; + border-bottom: 1px solid #CCCCCC; + border-left: 1px solid #CCCCCC; + border-right: 1px solid #CCCCCC; + text-align: justify; + padding: 10px; + font-family: 'Lucida Console', Monaco, monospace; +} + + +/** ADMIN MENU STYLES */ +.menu-item-action{ + background-repeat: no-repeat; + background-position: center; + width: 26px; + height: 26px; + display: block; + margin: -10px auto 4px auto; + text-indent: -9999px; + text-decoration: none; +} + +.menu-item-action-restrict{ + background-image:url(images/menu/visibility.png); +} + +.menu-item-action-restrict-active{ + background-image:url(images/menu/visibility-active.png); +} + +.whole-menu{ + width: 50%; + background-color: #F9F9F9; + border-radius: 5px; + text-align: center; + font-family: 'Lucida Console', Monaco, monospace; + vertical-align: top; + margin: 0px auto 5px auto; + padding: 0px 10px; +} + +.whole-menu label{ + display: inline-block; + line-height: 25px; + height: 23px; +} + +.menu-submenu-list{ + border: 1px solid #CCCCCC; + border-radius: 5px; + padding: 12px 5px 5px; + background-color: #F9F9F9; + width: 95%; + margin: auto; + display: table; +} + +.menu-submenu-row{ + display: table-row; +} + +.menu-submenu-item{ + text-align: right; + padding-right: 10px; + font-family: 'Lucida Console', Monaco, monospace; + vertical-align: top; + display: table-cell; +} + +.menu-submenu-item label{ + display: inline-block; + line-height: 25px; + height: 29px; + font-size: 0.8em; +} + +#main_menu_list input[type="checkbox"] { + display:none; +} + +#main_menu_list input[type="checkbox"] + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/menu/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; +} + +#main_menu_list input[type="checkbox"]:checked + label span { + background:url(images/menu/checked.png) no-repeat center; +} + +.menu-empty-list{ + border: 1px solid #bf0909; + border-radius: 4px; + padding: 8px 10px; + text-align: center; + font-weight: bold; + font-size: 1em; + background-color: #E2E4FF; +} + +/** METABOX & WIDGETS STYLES */ +.metabox-top-actions{ + padding: 2px 0; + width: 100%; + margin-bottom: 10px; +} + +.metabox-top-action-link{ + width: 75%; + float: left; +} + +.metabox-top-action-link input{ + height: 24px; + width: 100%; + background-repeat: no-repeat; + background-position: 5px center; + background-image: url('images/metabox/link.png'); + padding-left: 24px; +} + +.metabox-top-action-link input:focus{ + background-image: url('images/metabox/link-active.png'); +} + +.metabox-top-actions .aam-icon-medium-add{ + margin-left: 10px; + display: inline-block; +} + +.metabox-top-actions .aam-icon-medium-refresh{ + float: right; + display: inline-block; +} + +.metabox-group{ + border: 1px solid #CCCCCC; + border-radius: 5px; + padding: 12px 5px 5px; + background-color: #F9F9F9; + width: 95%; + margin: auto; + display: table; +} + +.metabox-row{ + display: table-row; +} + +.metabox-item{ + text-align: right; + font-family: 'Lucida Console', Monaco, monospace; + vertical-align: top; + display: table-cell; +} + +.metabox-item label{ + display: inline-block; + line-height: 25px; + height: 29px; + font-size: 0.8em; +} + +.metabox-item input[type="checkbox"] { + display:none; +} + +.metabox-item input[type="checkbox"] + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/metabox/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; + margin-left: 6px; +} + +.metabox-item input[type="checkbox"]:checked + label span { + background:url(images/metabox/checked.png) no-repeat center; +} + +#metabox_content{ + min-height: 200px; +} + +/** CAPABILITIES STYLES */ +.capability-actions{ + display: table; + width: 100%; +} + +.capability-action{ + width: 16px; + height: 16px; + display: table-cell; + text-align: center; + vertical-align: middle; + text-decoration: none; + outline: 0; +} + +a.capability-action{ + outline: 0; +} + +.capability-action input[type="checkbox"] { + display:none; +} + +.capability-action input[type="checkbox"] + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/capability/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; +} + +.capability-action input[type="checkbox"]:checked + label span { + background:url(images/capability/checked.png) no-repeat center; +} + +.capability-action-delete{ + background: transparent url('images/capability/delete.png') no-repeat center; +} + +.capability-action-delete:hover{ + background: transparent url('images/capability/delete-active.png') no-repeat center; +} + +.capability-action-delete-active{ + background: transparent url('images/capability/delete-active.png') no-repeat center; +} + +.capability-action-select{ + background: transparent url('images/capability/select.png') no-repeat center; +} + +.capability-action-select:hover{ + background: transparent url('images/capability/select-active.png') no-repeat center; +} + +.capability-action-select-active{ + background: transparent url('images/capability/select-active.png') no-repeat center; +} + +#capability_unfiltered { + display:none; +} + +#capability_unfiltered + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/capability/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; +} + +#capability_unfiltered:checked + label span { + background:url(images/capability/checked.png) no-repeat center; +} + +.aam-align-right{ + text-align: right; +} + + +/** POSTS & CATEGORIES STYLES */ +.post-type-post{ + height: 16px; + background: transparent url('images/post/post.png') no-repeat left center; + display: inline-block; + padding-left: 20px; + text-decoration: none; +} + +.post-action-check{ + text-align: center; +} + +.post-action-lock{ + background-image: url('images/lock.png'); +} + +.post-action input[type="checkbox"] { + display:none; +} + +.post-action input[type="checkbox"] + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/post/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; +} + +.post-action input[type="checkbox"]:checked + label span { + background:url(images/post/checked.png) no-repeat center; +} + +.post-access-area{ + margin: 5px 0; + text-align: center; +} + +.post-access-area .ui-button-text-only .ui-button-text{ + padding: 0.1em 1em; +} + +.post-category-subposts .ui-button-text-only .ui-button-text{ + padding: 0.1em 1em; +} + +.post-access{ + display: inline-block; + font-size: 14px; + font-weight: bold; + padding: 2px 0 4px 5px; + text-transform: uppercase; +} + +.post-access-inherited{ + border: 1px solid #CCCCCC; + border-radius: 3px; + color: #FF0000; + margin: 5px 0 10px; + padding: 2px; + text-align: center; + display: none; +} + +.post-breadcrumb{ + margin-top: 4px; + border: 1px solid #CCCCCC; + width: 100%; + padding: 4px 0px; + font-family: 'Lucida Console', Monaco, monospace; +} + +.post-breadcrumb-loading{ + background: transparent url('images/post/loader.gif') no-repeat center; +} + +.post-breadcrumb-line{ + width: 88%; + display: inline-block; + vertical-align: middle; +} + +.post-breadcrumb-line a{ + text-decoration: none; + font-weight: bold; + color: #257DA6; + margin-left: 5px; +} + +.aam-gt{ + display: inline-block; + margin: 0 2px; +} + +.post-breadcrumb-line-actions{ + width: 10%; + display:inline-table; + border-left: 1px solid #CCCCCC; + vertical-align: middle; + text-align: center; +} + +.post-breadcrumb-line-actions a{ + display: table-cell; + width: 16px; + height: 16px; + background-position: center; + background-repeat: no-repeat; +} + +.post-breadcrumb-line-action-lock{ + background-image: url('images/lock.png'); +} + +#access_dialog{ + position: relative; +} + +.aam-lock-message{ + margin: 5px 0 10px 0; + border: 1px solid #bf0909; + border-radius: 4px; + background: transparent url('images/lock.png') no-repeat 5px center; + display: table; + width: 100%; +} + +.attachment-access-block{ + border: 1px solid #257DA6; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + padding-left: 22px; + box-sizing: content-box; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + background: transparent url('images/post/info-active.png') no-repeat 2px center; + font-size: 0.8em; +} + +.aam-lock-message span{ + font-weight: bold; + vertical-align: middle; + display: table-cell; + padding: 5px 2px 5px 28px; +} + +.aam-lock-message a{ + color: #257DA6; + outline: 0; +} + +.ui-menu { + width: 150px; + z-index: 9999; +} + +.post-term-descend{ + margin: 5px 0; + text-align: left; + display: table; + vertical-align: middle; +} + +.post-term-descend label{ + display: table-cell; +} + +.post-term-descend input[type="checkbox"] { + display:none; +} + +.post-term-descend input[type="checkbox"] + label span { + display:inline-block; + width:16px; + height:16px; + background:url(images/capability/unchecked.png) no-repeat center; + cursor:pointer; + margin-top: 4px; + margin-left: 8px; +} + +.post-term-descend input[type="checkbox"]:checked + label span { + background:url(images/capability/checked.png) no-repeat center; +} + +#access_dialog table.dataTable td{ + padding: 0px 10px; +} + +.dataTable th.term-access-title, .dataTable th.post-access-title{ + background-color: #CCCCCC; +} + +.post-access-list{ + position: relative; +} + +.post-access-list .post-access-block{ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #F5F5F5; + opacity: 0.8; +} + +.aam-lock-big{ + display: table; + width: 100%; + height: 120px; + background: transparent url('images/post/lock-big.png') no-repeat center; +} + +a.aam-lock-big{ + text-decoration: none; + outline: 0; +} + +.aam-lock-big span{ + display: table-cell; + vertical-align: bottom; + text-align: center; + text-transform: uppercase; + font-size: 0.8em; + font-weight: bold; +} + +.aam-post-access-notice{ + display: inline-block; + margin-right: 2px; + color: #257DA6; + font-weight: bold; +} + +.post-access-description{ + font-size: 0.75em; +} + + +/** EVENT MANAGER STYLES */ +.event-actions{ + display: table; + width: 100%; +} + +.event-action{ + width: 16px; + height: 16px; + display: table-cell; + padding: 2px 0; + background-repeat: no-repeat; + background-position: center; +} + +.event-action-edit{ + background-image: url('images/event/edit.png'); +} + +.event-action-edit:hover{ + background-image: url('images/event/edit-active.png'); +} + +.event-action-edit-active{ + background-image: url('images/event/edit-active.png'); +} + +.event-action-delete{ + background-image: url('images/event/delete.png'); +} + +.event-action-delete:hover{ + background-image: url('images/event/delete-active.png'); +} + +.event-action-delete-active{ + background-image: url('images/event/delete-active.png'); +} + +.event-specifier{ + display:none; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/codemirror.css b/wp-content/plugins/advanced-access-manager/media/css/codemirror.css new file mode 100644 index 0000000..b3958a9 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/codemirror.css @@ -0,0 +1,262 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; +} +.CodeMirror-scroll { + /* Set scrolling behaviour here */ + overflow: auto; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; +} + +/* CURSOR */ + +.CodeMirror div.CodeMirror-cursor { + border-left: 1px solid black; + z-index: 3; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; + z-index: 1; +} +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} + +.cm-tab { display: inline-block; } + +/* DEFAULT THEME */ + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-property {color: black;} +.cm-s-default .cm-operator {color: black;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-error {color: #f00;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} + +.cm-invalidchar {color: #f00;} + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + line-height: 1; + position: relative; + overflow: hidden; + background: #FFFFFF; + color: black; + border: 1px solid #CCCCCC; + border-radius: 4px; + padding: 1px; +} + +.CodeMirror-scroll { + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + background-color: #F9F9F9; + font-size: 1.1em; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + padding-bottom: 30px; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + padding-bottom: 30px; + margin-bottom: -32px; + display: inline-block; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-lines { + cursor: text; +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} +.CodeMirror-code pre { + border-right: 30px solid transparent; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; +} +.CodeMirror-wrap .CodeMirror-code pre { + border-right: none; + width: auto; +} +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget { +} + +.CodeMirror-wrap .CodeMirror-scroll { + overflow-x: hidden; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; height: 0px; + overflow: hidden; + visibility: hidden; +} +.CodeMirror-measure pre { position: static; } + +.CodeMirror div.CodeMirror-cursor { + position: absolute; + visibility: hidden; + border-right: none; + width: 0; +} +.CodeMirror-focused div.CodeMirror-cursor { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursor { + visibility: hidden; + } +} diff --git a/wp-content/plugins/advanced-access-manager/media/css/common.css b/wp-content/plugins/advanced-access-manager/media/css/common.css new file mode 100644 index 0000000..b15afcf --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/common.css @@ -0,0 +1,369 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== +*/ +.aam-beta-version{ + margin: 15px 10px; + border: 1px solid #FF8888; + border-radius: 4px; + padding: 4px; + text-align: center; + font-weight: bold; + font-size: 1.1em; +} + +.aam-hidden{ + display: none; +} + +.aam-dialog{ + display: none; +} + +.wrap a{ + outline: 0; +} + +.aam-tooltip { + display:none; + position:absolute; + border:1px solid #CCCCCC; + background-color: #F5F5F5; + border-radius: 4px; + box-shadow: 0 0 5px #AAAAAA; + padding: 5px 10px; + z-index: 9999; + color: #333333; + font-size: 1em; + max-width: 300px; + left:0px; + top: 0px; + font-weight: bold; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +.aam-icon{ + text-indent: -9999px; + text-align: center; + background-repeat: no-repeat; +} + +a.aam-icon{ + outline: none; +} + +.aam-icon span { + content: ""; + display: block; + background-repeat: no-repeat; + opacity: 1; + -webkit-transition: opacity 0.5s; + -moz-transition: opacity 0.5s; + -o-transition: opacity 0.5s; +} + +.aam-icon span:hover{ + opacity: 1; +} + +.aam-icon-large span { + background-image: url('images/common/large-iconset.png'); + width: 48px; + height: 48px; + margin-left: calc(50% - 24px); + margin-left: -moz-calc(50% - 24px); +} + +.aam-icon-medium span { + background-image: url('images/common/medium-iconset.png'); + width: 24px; + height: 24px; + margin-left: calc(50% - 12px); + margin-left: -moz-calc(50% - 12px); +} + +.aam-icon-small span { + background-image: url('images/common/small-iconset.png'); + width: 16px; + height: 16px; + margin-left: calc(50% - 8px); + margin-left: -moz-calc(50% - 8px); +} + +.aam-icon-large-active{ + background-position-y: -48px !important; +} + +.aam-icon-medium-active{ + background-position-y: -24px !important; +} + +.aam-icon-small-active{ + background-position-y: -16px !important; +} + +.aam-icon-large-save span{ + background-position: 0 0; +} + +.aam-icon-large-save:hover span{ + background-position: 0 -48px; +} + +.aam-icon-large-roleback span{ + background-position: -48px 0; +} + +.aam-icon-large-roleback:hover span{ + background-position: -48px -48px; +} + +.aam-icon-large-twitter span{ + background-position: -96px 0; +} + +.aam-icon-large-twitter:hover span{ + background-position: -96px -48px; +} + +.aam-icon-large-message span{ + background-position: -144px 0; +} + +.aam-icon-large-message:hover span{ + background-position: -144px -48px; +} + +.aam-icon-large-link span{ + background-position: -192px 0; +} + +.aam-icon-large-link:hover span{ + background-position: -192px -48px; +} + +.aam-icon-large-info span{ + background-position: -240px 0; +} + +.aam-icon-large-info:hover span{ + background-position: -240px -48px; +} + +.aam-icon-large-editor span{ + background-position: -288px 0; +} + +.aam-icon-large-editor:hover span{ + background-position: -288px -48px; +} + +.aam-icon-medium-add span{ + background-position: 0 0; +} + +.aam-icon-medium-add:hover span{ + background-position: 0 -24px; +} + +.aam-icon-medium-refresh span{ + background-position: -24px 0px; +} + +.aam-icon-medium-refresh:hover span{ + background-position: -24px -24px; +} + +.aam-icon-medium-filter span{ + background-position: -48px 0px; +} + +.aam-icon-medium-filter:hover span{ + background-position: -48px -24px; +} + +.aam-icon-medium-copy span{ + background-position: -72px 0px; +} + +.aam-icon-medium-copy:hover span{ + background-position: -72px -24px; +} + +.aam-icon-medium-roleback span{ + background-position: -96px 0px; +} + +.aam-icon-medium-roleback:hover span{ + background-position: -96px -24px; +} + +.aam-icon-medium-twitter span{ + background-position: -120px 0; +} + +.aam-icon-medium-twitter:hover span{ + background-position: -120px -24px; +} + +.aam-icon-medium-help span{ + background-position: -144px 0; +} + +.aam-icon-medium-help:hover span{ + background-position: -144px -24px; +} + +.aam-icon-medium-message span{ + background-position: -168px 0; +} + +.aam-icon-medium-message:hover span{ + background-position: -168px -24px; +} + +.aam-icon-medium-star span{ + background-position: -192px 0; +} + +.aam-icon-medium-star:hover span{ + background-position: -192px -24px; +} + +.aam-icon-small-manage span{ + background-position: 0 0; +} + +.aam-icon-small-manage:hover span{ + background-position: 0 -16px; +} + +.aam-icon-small-delete span{ + background-position: -16px 0; +} + +.aam-icon-small-delete:hover span{ + background-position: -16px -16px; +} + +.aam-icon-small-pen span{ + background-position: -32px 0; +} + +.aam-icon-small-pen:hover span{ + background-position: -32px -16px; +} + +.aam-icon-small-edit-user span{ + background-position: -48px 0; +} + +.aam-icon-small-edit-user:hover span{ + background-position: -48px -16px; +} + +.aam-icon-small-block span{ + background-position: -64px 0; +} + +.aam-icon-small-block:hover span{ + background-position: -64px -16px; +} + +.aam-icon-small-roleback span{ + background-position: -80px 0; +} + +.aam-icon-small-roleback:hover span{ + background-position: -80px -16px; +} + +.aam-icon-small-trash span{ + background-position: -96px 0; +} + +.aam-icon-small-trash:hover span{ + background-position: -96px -16px; +} + +.aam-icon-small-select span{ + background-position: -112px 0; +} + +.aam-icon-small-select:hover span{ + background-position: -112px -16px; +} + +.large-icons-row{ + display: table; + width: 100%; + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #CCCCCC; +} + +.large-icons-row .aam-icon{ + display: table-cell; + text-align: center; + vertical-align: bottom; + text-decoration: none; + text-transform: uppercase; + font-size: 10px; + font-weight: bold; + color: #333333; +} + +.large-icons-row a.disabled span{ + opacity: 0.8; + cursor: none; + pointer-events: none; + text-decoration: line-through; +} + +.medium-icons-row{ + display: inline-table; + width: 100%; + margin-top: 10px; +} + +.medium-icons-row .aam-icon{ + display: table-cell; + text-indent: 0; + font-size: 9px; + font-weight: bold; + color: #333333; +} + +.medium-icons-row a.aam-icon{ + text-decoration: none; +} + +.aam-list-row-actions{ + width: 100%; + display: inline-table; + text-align: center; +} + +.aam-list-row-actions .aam-icon{ + display: table-cell; +} + +.aam-warning{ + width: 100%; + height: 40px; + display: table-row; + background: transparent url('images/common/warning.png') no-repeat 2px center; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin-top: 1px; +} + +.aam-warning span{ + display: table-cell; + vertical-align: middle; + padding-left: 30px; + font-size: 0.9em; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/configpress.css b/wp-content/plugins/advanced-access-manager/media/css/configpress.css new file mode 100644 index 0000000..f45f516 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/configpress.css @@ -0,0 +1,4 @@ +#major-publishing-actions{ + margin-top: 5px; + border-top: 1px solid #D5D5D5; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/extension.css b/wp-content/plugins/advanced-access-manager/media/css/extension.css new file mode 100644 index 0000000..08d3fc5 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/extension.css @@ -0,0 +1,155 @@ +.extension-name{ + font-weight: bold; + font-family: Tahoma, Geneva, sans-serif; +} + +.extension-description{ + text-align: justify; +} + +.extension-description a{ + font-weight: bold; + text-decoration: none; +} + +.extension-price{ + text-align: center; + font-weight: bold; + font-size: 1.1em; +} + +.free{ + color: #006400; +} + +.payed{ + color: #212121; +} + +.cpanel-item-twitter{ + background-image: url('images/extension/twitter.png'); +} + +.cpanel-item-twitter:hover{ + background-image: url('images/extension/twitter-active.png'); +} + +.cpanel-item-message{ + background-image: url('images/extension/message.png'); +} + +.cpanel-item-message:hover{ + background-image: url('images/extension/message-active.png'); +} + +.cpanel-item-website{ + background-image: url('images/extension/link.png'); +} + +.cpanel-item-website:hover{ + background-image: url('images/extension/link-active.png'); +} + +.extension-actions{ + display: table; + width: 100%; +} + +.extension-action{ + width: 26px; + height: 26px; + display: table-cell; + text-align: center; + vertical-align: middle; + text-decoration: none; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} + +a.extension-action{ + outline: 0; +} + +.extension-action-youtube{ + background-image: url('images/extension/youtube.png'); +} + +.extension-action-youtube:hover{ + background-image: url('images/extension/youtube-active.png'); +} + +.extension-action-forum{ + background-image: url('images/extension/forum.png'); +} + +.extension-action-forum:hover{ + background-image: url('images/extension/forum-active.png'); +} + +.extension-action-purchase{ + background-image: url('images/extension/plus.png'); +} + +.extension-action-purchase:hover{ + background-image: url('images/extension/plus-active.png'); +} + +.extension-action-ok{ + background-image: url('images/extension/ok.png'); +} + +.extension-action-ok:hover{ + background-image: url('images/extension/ok-active.png'); +} + +.extension-action-download{ + background-image: url('images/extension/download.png'); +} + +.extension-action-download:hover{ + background-image: url('images/extension/download-active.png'); +} + +.dialog-content{ + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +.dialog-content a{ + font-weight: bold; + text-decoration: none; + color: #257DA6; + outline: 0; +} + +input.license-input{ + width: 100%; + border: 1px solid #CCCCCC; + border-radius: 0px; + margin-top: 5px; + padding: 2px; + font-size: 12px; + line-height: 16px; +} + +#install_extension{ + position: relative; +} + +.loading-extension{ + width: 100%; + height: 100%; + background: #CCCCCC url('images/main-loader.gif') no-repeat center; + position: absolute; + top: 0; + left: 0; + opacity: 0.8; +} + +.license-error-list{ + margin-top: 5px; + display: none; + font-size: 0.8em; + color: #FF8888; + font-weight: bold; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/animated-overlay.gif b/wp-content/plugins/advanced-access-manager/media/css/images/animated-overlay.gif new file mode 100644 index 0000000..d441f75 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/animated-overlay.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/capability/checked.png b/wp-content/plugins/advanced-access-manager/media/css/images/capability/checked.png new file mode 100644 index 0000000..a9c3352 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/capability/checked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete-active.png new file mode 100644 index 0000000..f22a8e3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete.png b/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete.png new file mode 100644 index 0000000..bec37f9 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/capability/delete.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/capability/unchecked.png b/wp-content/plugins/advanced-access-manager/media/css/images/capability/unchecked.png new file mode 100644 index 0000000..66f709a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/capability/unchecked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/field-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/field-loader.gif new file mode 100644 index 0000000..575332b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/field-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/lock.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/lock.png new file mode 100644 index 0000000..a95a906 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/lock.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role-active.png new file mode 100644 index 0000000..53003c6 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role.png new file mode 100644 index 0000000..f5eff2a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/role.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user-active.png new file mode 100644 index 0000000..5a1dc92 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user.png new file mode 100644 index 0000000..67c2052 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/user.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor-active.png new file mode 100644 index 0000000..d94efef Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor.png b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor.png new file mode 100644 index 0000000..ee08c36 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cmanager/visitor.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/common/large-iconset.png b/wp-content/plugins/advanced-access-manager/media/css/images/common/large-iconset.png new file mode 100644 index 0000000..027710a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/common/large-iconset.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-iconset.png b/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-iconset.png new file mode 100644 index 0000000..d3d8593 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-iconset.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-loader.gif new file mode 100644 index 0000000..263e9b7 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/common/medium-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/common/small-iconset.png b/wp-content/plugins/advanced-access-manager/media/css/images/common/small-iconset.png new file mode 100644 index 0000000..e5d7a60 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/common/small-iconset.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/common/warning.png b/wp-content/plugins/advanced-access-manager/media/css/images/common/warning.png new file mode 100644 index 0000000..26d0c8e Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/common/warning.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/cpanel/cpanel-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/cpanel/cpanel-loader.gif new file mode 100644 index 0000000..507c6df Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/cpanel/cpanel-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/event/delete-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/event/delete-active.png new file mode 100644 index 0000000..f22a8e3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/event/delete-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/event/delete.png b/wp-content/plugins/advanced-access-manager/media/css/images/event/delete.png new file mode 100644 index 0000000..bec37f9 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/event/delete.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/event/edit-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/event/edit-active.png new file mode 100644 index 0000000..b853566 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/event/edit-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/event/edit.png b/wp-content/plugins/advanced-access-manager/media/css/images/event/edit.png new file mode 100644 index 0000000..7fcb23c Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/event/edit.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/download-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/download-active.png new file mode 100644 index 0000000..44be4d8 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/download-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/download.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/download.png new file mode 100644 index 0000000..0512241 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/download.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum-active.png new file mode 100644 index 0000000..f673a8d Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum.png new file mode 100644 index 0000000..ff122b9 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/forum.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok-active.png new file mode 100644 index 0000000..f827273 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok.png new file mode 100644 index 0000000..cb0e74d Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/ok.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus-active.png new file mode 100644 index 0000000..7352ffa Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus.png new file mode 100644 index 0000000..7352ffa Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/plus.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube-active.png new file mode 100644 index 0000000..04dbd9c Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube.png b/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube.png new file mode 100644 index 0000000..9791d34 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/extension/youtube.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/feature-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/feature-active.png new file mode 100644 index 0000000..e8c5719 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/feature-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/feature.png b/wp-content/plugins/advanced-access-manager/media/css/images/feature.png new file mode 100644 index 0000000..e1d9daf Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/feature.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/lock.png b/wp-content/plugins/advanced-access-manager/media/css/images/lock.png new file mode 100644 index 0000000..acccc8e Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/lock.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/main-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/main-loader.gif new file mode 100644 index 0000000..f5c9e52 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/main-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/menu/checked.png b/wp-content/plugins/advanced-access-manager/media/css/images/menu/checked.png new file mode 100644 index 0000000..39cc541 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/menu/checked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/menu/unchecked.png b/wp-content/plugins/advanced-access-manager/media/css/images/menu/unchecked.png new file mode 100644 index 0000000..66f709a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/menu/unchecked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/metabox-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/metabox-loader.gif new file mode 100644 index 0000000..f5c9e52 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/metabox-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/metabox/checked.png b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/checked.png new file mode 100644 index 0000000..39cc541 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/checked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link-active.png new file mode 100644 index 0000000..c0f7682 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link.png b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link.png new file mode 100644 index 0000000..65d55be Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/link.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/metabox/unchecked.png b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/unchecked.png new file mode 100644 index 0000000..66f709a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/metabox/unchecked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/checked.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/checked.png new file mode 100644 index 0000000..39cc541 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/checked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/info-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/info-active.png new file mode 100644 index 0000000..8ca8989 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/info-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/info.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/info.png new file mode 100644 index 0000000..7c6dbcb Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/info.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/post/loader.gif new file mode 100644 index 0000000..575332b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/lock-big.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/lock-big.png new file mode 100644 index 0000000..61d9f61 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/lock-big.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/lock.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/lock.png new file mode 100644 index 0000000..acccc8e Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/lock.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/post.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/post.png new file mode 100644 index 0000000..818705c Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/post.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/post/unchecked.png b/wp-content/plugins/advanced-access-manager/media/css/images/post/unchecked.png new file mode 100644 index 0000000..66f709a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/post/unchecked.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/search-active.png b/wp-content/plugins/advanced-access-manager/media/css/images/search-active.png new file mode 100644 index 0000000..51c73f9 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/search-active.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/search.png b/wp-content/plugins/advanced-access-manager/media/css/images/search.png new file mode 100644 index 0000000..d02dcc1 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/search.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc.png b/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc.png new file mode 100644 index 0000000..9a4f67a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc_disabled.png b/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc_disabled.png new file mode 100644 index 0000000..9a4f67a Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/sort_asc_disabled.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/sort_both.png b/wp-content/plugins/advanced-access-manager/media/css/images/sort_both.png new file mode 100644 index 0000000..41d51c5 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/sort_both.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc.png b/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc.png new file mode 100644 index 0000000..fee12d5 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc_disabled.png b/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc_disabled.png new file mode 100644 index 0000000..4f74db3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/sort_desc_disabled.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/table-filtered.png b/wp-content/plugins/advanced-access-manager/media/css/images/table-filtered.png new file mode 100644 index 0000000..0bdd87c Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/table-filtered.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/ajax-loader.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/ajax-loader.gif new file mode 100644 index 0000000..c10645d Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/ajax-loader.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/file.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/file.gif new file mode 100644 index 0000000..7e62167 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/file.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-close.png b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-close.png new file mode 100644 index 0000000..fd2e9d2 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-close.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-closed.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-closed.gif new file mode 100644 index 0000000..5411078 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-closed.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-open.png b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-open.png new file mode 100644 index 0000000..3097457 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder-open.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder.gif new file mode 100644 index 0000000..2b31631 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/folder.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/minus.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/minus.gif new file mode 100644 index 0000000..47fb7b7 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/minus.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/plus.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/plus.gif new file mode 100644 index 0000000..6906621 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/plus.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black-line.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black-line.gif new file mode 100644 index 0000000..e549687 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black-line.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black.gif new file mode 100644 index 0000000..d549b9f Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-black.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default-line.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default-line.gif new file mode 100644 index 0000000..37114d3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default-line.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default.gif new file mode 100644 index 0000000..a12ac52 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-default.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam-line.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam-line.gif new file mode 100644 index 0000000..6e289ce Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam-line.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam.gif new file mode 100644 index 0000000..0cb178e Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-famfamfam.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray-line.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray-line.gif new file mode 100644 index 0000000..3760044 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray-line.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray.gif new file mode 100644 index 0000000..cfb8a2f Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-gray.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red-line.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red-line.gif new file mode 100644 index 0000000..df9e749 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red-line.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red.gif b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red.gif new file mode 100644 index 0000000..3bbb3a1 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/treeview/treeview-red.gif differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..e97ed12 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_75_ffffff_40x100.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..9c371ee Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..3fce4a1 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_65_ffffff_1x400.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..a75596b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_dadada_1x400.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..fdef16f Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..385c0a3 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_95_fef1ec_1x400.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..14f3ba7 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..af6b6aa Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_222222_256x240.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..2259983 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_222222_256x240.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_2e83ff_256x240.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..84b601b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_2e83ff_256x240.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_454545_256x240.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..017a02b Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_454545_256x240.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_888888_256x240.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..c2b6c70 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_888888_256x240.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_cd0a0a_256x240.png b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..ed5b6b0 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/media/css/images/ui-icons_cd0a0a_256x240.png differ diff --git a/wp-content/plugins/advanced-access-manager/media/css/jquery-ui.css b/wp-content/plugins/advanced-access-manager/media/css/jquery-ui.css new file mode 100644 index 0000000..d5464c5 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/jquery-ui.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.10.3 - 2013-09-12 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/jquery.dt.css b/wp-content/plugins/advanced-access-manager/media/css/jquery.dt.css new file mode 100644 index 0000000..494fb1a --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/jquery.dt.css @@ -0,0 +1,242 @@ +.dataTable { + margin: 10px auto; + clear: both; + width: 100%; + border: 1px solid #CCCCCC; +} + +table.dataTable thead th { + padding: 3px 18px 3px 10px; + border-bottom: 1px solid #CCCCCC; + font-weight: bold; + text-transform: uppercase; + cursor: pointer; + background-color: #257da6; +} + +table.dataTable tfoot td { + border-top: 1px solid #CCCCCC; +} + +table.dataTable td { + padding: 3px 10px; +} + +table.dataTable td.center, +table.dataTable td.dataTables_empty { + text-align: center; +} + +table.dataTable tr.odd { background-color: #E2E4FF; } +table.dataTable tr.even { background-color: white; } + +table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; } +table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; } +table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; } +table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; } +table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; } +table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; } + + +/* + * Table wrapper +*/ +.dataTables_wrapper { + position: relative; + clear: both; +} + + +/* + * Page length menu +*/ +.dataTables_length { + float: left; + margin-right: 5px; +} + +/* + * Filter +*/ +.dataTables_filter { + text-align: left; + width: 60%; + float:left; +} + +.dataTables_filter input{ + width: 90%; + height: 28px; + padding-left: 24px; + background: transparent url('images/search.png') no-repeat 5px center; +} + +.dataTables_filter input:focus{ + background: transparent url('images/search-active.png') no-repeat 5px center; +} + +.table-filtered{ + background: transparent url('images/table-filtered.png') no-repeat 2px center; + height: 16px; + display: inline-block; + padding-left: 20px; + font-size: 0.8em; +} + +a.clear-table-filter{ + text-decoration: none; + color: #257DA6; + font-size: 0.9em; + font-weight: bold; +} + +/* + * Table information +*/ +.dataTables_info { + clear: both; + float: left; +} + + +/* + * Pagination +*/ +.dataTables_paginate { + float: right; + text-align: right; + font-size: 0.8em; +} + +/* Two button pagination - previous / next */ +.paginate_disabled_previous, +.paginate_enabled_previous, +.paginate_disabled_next, +.paginate_enabled_next { + height: 19px; + float: left; + cursor: pointer; + *cursor: hand; + color: #111 !important; +} +.paginate_disabled_previous:hover, +.paginate_enabled_previous:hover, +.paginate_disabled_next:hover, +.paginate_enabled_next:hover { + text-decoration: none !important; +} +.paginate_disabled_previous:active, +.paginate_enabled_previous:active, +.paginate_disabled_next:active, +.paginate_enabled_next:active { + outline: none; +} + +.paginate_disabled_previous, +.paginate_disabled_next { + color: #666 !important; +} +.paginate_disabled_previous, +.paginate_enabled_previous { + padding-left: 23px; +} +.paginate_disabled_next, +.paginate_enabled_next { + padding-right: 23px; + margin-left: 10px; +} + +.paginate_enabled_previous { background: url('images/back_enabled.png') no-repeat top left; } +.paginate_enabled_previous:hover { background: url('images/back_enabled_hover.png') no-repeat top left; } +.paginate_disabled_previous { background: url('images/back_disabled.png') no-repeat top left; } + +.paginate_enabled_next { background: url('images/forward_enabled.png') no-repeat top right; } +.paginate_enabled_next:hover { background: url('images/forward_enabled_hover.png') no-repeat top right; } +.paginate_disabled_next { background: url('images/forward_disabled.png') no-repeat top right; } + +/* Full number pagination */ +.paging_full_numbers { + height: 22px; + line-height: 22px; +} +.paging_full_numbers a:active { + outline: none +} +.paging_full_numbers a:hover { + text-decoration: none; +} + +.paging_full_numbers a.paginate_button, +.paging_full_numbers a.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; + color: #333 !important; +} + +.paging_full_numbers a.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers a.paginate_button:hover { + background-color: #ccc; + text-decoration: none !important; +} + +.paging_full_numbers a.paginate_active { + background-color: #99B3FF; +} + + +/* + * Processing indicator +*/ +.dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 250px; + height: 30px; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px 0; + border: 1px solid #ddd; + text-align: center; + color: #999; + font-size: 14px; + background-color: white; +} + + +/* + * Sorting +*/ +.sorting { background: url('images/sort_both.png') no-repeat center right; } +.sorting_asc { background: url('images/sort_asc.png') no-repeat center right; } +.sorting_desc { background: url('images/sort_desc.png') no-repeat center right; } + +.sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; } +.sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable thead th:active, +table.dataTable thead td:active { + outline: none; +} + + +/* + * Scrolling +*/ +.dataTables_scroll { + clear: both; +} + +.dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/css/jquery.treeview.css b/wp-content/plugins/advanced-access-manager/media/css/jquery.treeview.css new file mode 100644 index 0000000..f6b1be6 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/css/jquery.treeview.css @@ -0,0 +1,117 @@ +.treeview, .treeview ul { + padding: 0; + margin: 0; + list-style: none; +} + +.treeview ul { + + margin-top: 4px; +} + +.treeview .hitarea { + background: url(images/treeview/treeview-default.gif) -64px -25px no-repeat; + height: 16px; + width: 16px; + margin-left: -16px; + float: left; + cursor: pointer; +} +/* fix for IE6 */ +* html .hitarea { + display: inline; + float:none; +} + +.treeview li { + margin: 0; + padding: 3px 0pt 3px 16px; +} + +.treeview a.selected { + background-color: #eee; +} + +#treecontrol { margin: 1em 0; display: none; } + +.treeview .hover { color: red; cursor: pointer; } + +.treeview li { background: url(images/treeview/treeview-default-line.gif) 0 0 no-repeat; } +.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } + +.treeview .expandable-hitarea { background-position: -80px -3px; } + +.treeview li.last { background-position: 0 -1766px } +.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview/treeview-default.gif); } +.treeview li.lastCollapsable { background-position: 0 -111px } +.treeview li.lastExpandable { background-position: -32px -67px } + +.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } + +.treeview-red li { background-image: url(images/treeview/treeview-red-line.gif); } +.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); } + +.treeview-black li { background-image: url(images/treeview/treeview-black-line.gif); } +.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); } + +.treeview-gray li { background-image: url(images/treeview/treeview-gray-line.gif); } +.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); } + +.treeview-famfamfam li { background-image: url(images/treeview/treeview-famfamfam-line.gif); } +.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); } + +.treeview .placeholder { + background: url(images/treeview/ajax-loader.gif) 0 0 no-repeat; + height: 16px; + width: 16px; + display: block; +} + +.filetree li { padding: 3px 0 2px 16px; } +.filetree span.folder { padding-left: 18px; display: block; } +.filetree span.folder { background: url(images/treeview/folder-open.png) 0 0 no-repeat; } +.filetree li.expandable span.folder { background: url(images/treeview/folder-close.png) 0 0 no-repeat; } +.filetree span.folder a{ + text-decoration: none; +} + +.treeview .important{ + font-weight: bold; +} + +.treeview .roots{ + font-weight: bold; + color: #257DA6; +} + +#sidetreecontrol{ + font-size: 12px; + margin-bottom: 10px; + float: right; + padding-bottom: 6px; + border-bottom: 2px solid #257DA6; +} + +#sidetreecontrol span{ + color: #006505; + text-decoration: underline; + cursor: pointer; +} + +#sidetreecontrol span:hover{ + color: #257da6; +} + +.tree-holder{ + width: auto; + padding: 10px; +} + +#sidetreecontrol a{ + color: #006505; + outline: none; +} + +#sidetreecontrol a:hover{ + color: #257da6; +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/js/aam.js b/wp-content/plugins/advanced-access-manager/media/js/aam.js new file mode 100644 index 0000000..ae853de --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/js/aam.js @@ -0,0 +1,3034 @@ +/** + * ====================================================================== + * LICENSE: This file is subject to the terms and conditions defined in * + * file 'license.txt', which is part of this source code package. * + * ====================================================================== + */ + +/** + * Main AAM UI Class + * + * @returns {AAM} + */ +function AAM() { + + /** + * Current Subject + * + * @type {Object} + * + * @access public + */ + this.subject = { + type: 'role', + id: aamLocal.defaultSegment.role + }; + + /** + * Current Post Term + * + * @type {Int} + * + * @access public + */ + this.postTerm = ''; + + /** + * User Role to filter + * + * @type String + * + * @access public + */ + this.userRoleFilter = aamLocal.defaultSegment.role; + + /** + * ConfigPress editor + * + * @type {Object} + * + * @access public + */ + this.editor = null; + + /** + * JavaScript Custom Actions + * + * @type Array + */ + this.actions = new Array(); + + //Let's init the UI + this.initUI(); +} + +/** + * List of Blog Tables + * + * @type {Object} + * + * @access public + */ +AAM.prototype.blogTables = { + capabilities: null, + inheritRole: null, + postList: null, + eventList: null, + filterRoleList: null +}; + +/** + * List of Segment Tables + * + * @type {Object} + * + * @access public + */ +AAM.prototype.segmentTables = { + roleList: null, + userList: null +}; + +/** + * Add Custom Action to queue + * + * @param {String} action + * @param {Fuction} callback + * + * @returns {void} + */ +AAM.prototype.addAction = function(action, callback) { + if (typeof this.actions[action] === 'undefined') { + this.actions[action] = new Array(); + } + + this.actions[action].push(callback); +}; + +/** + * Do Custom Action queue + * + * @param {String} action + * @param {Object} params + * + * @returns {void} + */ +AAM.prototype.doAction = function(action, params) { + if (typeof this.actions[action] !== 'undefined') { + for (var i in this.actions[action]) { + this.actions[action][i].call(this, params); + } + } +}; + +/** + * Set Current Subject + * + * @param {String} type + * @param {String} id + * + * @returns {void} + * + * @access public + */ +AAM.prototype.setSubject = function(type, id) { + //reset subject first + this.subject.type = type; + this.subject.id = id; +}; + +/** + * Get Current Subject + * + * @returns {void} + * + * @access public + */ +AAM.prototype.getSubject = function() { + return this.subject; +}; + +/** + * Initialize the UI + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initUI = function() { + //initialize side blocks - Control Panel & Control Manager + this.initControlPanel(); + this.initControlManager(); + + //Retrieve settings for default segment + this.retrieveSettings(); + + //init contextual menu if necessary + this.initContextualMenu(); +}; + +/** + * Initial Contextual Menu + * + * @returns void + * + * @access public + */ +AAM.prototype.initContextualMenu = function(){ + var _this = this; + if (parseInt(aamLocal.contextualMenu) !== 1){ + jQuery('#contextual-help-link-wrap').pointer({ + pointerClass : 'aam-help-pointer', + pointerWidth : 300, + content: aamLocal.labels['AAM Documentation'], + position: { + edge : 'top', + align : 'right' + }, + close: function() { + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: _this.compileAjaxPackage('discardHelp', false) + }); + } + }).pointer('open'); + } +}; + +/** + * Initialize tooltip for selected area + * + * @param {String} selector + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initTooltip = function(selector) { + jQuery('[aam-tooltip]', selector).hover(function() { + // Hover over code + var title = jQuery(this).attr('aam-tooltip'); + jQuery(this).data('tipText', title).removeAttr('aam-tooltip'); + jQuery('
        ', { + 'class': 'aam-tooltip' + }).text(title).appendTo('body').fadeIn('slow'); + }, function() { + //Hover out code + jQuery(this).attr('aam-tooltip', jQuery(this).data('tipText')); + jQuery('.aam-tooltip').remove(); + }).mousemove(function(e) { + jQuery('.aam-tooltip').css({ + top: e.pageY + 15, //Get Y coordinates + left: e.pageX + 15 //Get X coordinates + }); + }); +}; + +/** + * Show Metabox Loader + * + * @param {String} selector + * + * @returns {void} + * + * @access public + */ +AAM.prototype.showMetaboxLoader = function(selector) { + jQuery('.aam-metabox-loader', selector).show(); +}; + +/** + * Hide Metabox Loader + * + * @param {String} selector + * + * @returns {void} + * + * @access public + */ +AAM.prototype.hideMetaboxLoader = function(selector) { + jQuery('.aam-metabox-loader', selector).hide(); +}; + +/** + * Compile default Ajax POST package + * + * @param {String} action + * @param {Boolean} include_subject + * + * @returns {Object} + * + * @access public + */ +AAM.prototype.compileAjaxPackage = function(action, include_subject) { + var data = { + action: 'aam', + sub_action: action, + _ajax_nonce: aamLocal.nonce + }; + if (include_subject) { + data.subject = this.getSubject().type; + data.subject_id = this.getSubject().id; + } + + return data; +}; + +/** + * Disable roleback button + * + * @returns void + * + * @access public + */ +AAM.prototype.disableRoleback = function(){ + jQuery('#aam_roleback').addClass('disabled'); +}; + +/** + * Enable roleback button + * + * @returns void + * + * @access public + */ +AAM.prototype.enableRoleback = function(){ + jQuery('#aam_roleback').removeClass('disabled'); +}; + +/** + * Initialize Control Panel Metabox + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initControlPanel = function() { + var _this = this; + //Role Back feature + var roleback = this.createIcon('large', 'roleback').append('Roleback').bind('click', function(event) { + event.preventDefault(); + if (!jQuery(this).hasClass('cpanel-item-disabled')){ + var buttons = {}; + buttons[aamLocal.labels['Rollback Settings']] = function() { + _this.showMetaboxLoader('#control_panel'); + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: _this.compileAjaxPackage('roleback', true), + success: function(response) { + if (response.status === 'success') { + _this.retrieveSettings(); + _this.disableRoleback(); + } + _this.highlight('#control_panel .inside', response.status); + }, + error: function() { + _this.highlight('#control_panel .inside', 'failure'); + }, + complete: function() { + _this.hideMetaboxLoader('#control_panel'); + jQuery("#restore_dialog").dialog("close"); + } + }); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery("#restore_dialog").dialog("close"); + }; + + jQuery("#restore_dialog").dialog({ + resizable: false, + height: 180, + modal: true, + buttons: buttons + }); + } + }); + jQuery('#cpanel_major').append(roleback); + + //Save the AAM settings + var save = this.createIcon('large', 'save').append('Save').bind('click', function(event) { + event.preventDefault(); + _this.showMetaboxLoader('#control_panel'); + + //get information from the form + var data = _this.compileAjaxPackage('save', true); + //collect data from the form + //1. Collect Main Menu + if (jQuery('#admin_menu_content').length){ + jQuery('input', '#admin_menu_content').each(function() { + data[jQuery(this).attr('name')] = (jQuery(this).prop('checked') ? 1 : 0); + }); + } + //2. Collect Metaboxes & Widgets + if (jQuery('#metabox_content').length){ + jQuery('input', '#metabox_list').each(function() { + data[jQuery(this).attr('name')] = (jQuery(this).prop('checked') ? 1 : 0); + }); + } + //3. Collect Capabilities + if (jQuery('#capability_content').length){ + var caps = _this.blogTables.capabilities.fnGetData(); + for (var i in caps) { + data['aam[capability][' + caps[i][0] + ']'] = caps[i][1]; + } + } + //4. Collect Events + if (jQuery('#event_manager_content').length){ + var events = _this.blogTables.eventList.fnGetData(); + for (var j in events) { + data['aam[event][' + j + '][event]'] = events[j][0]; + data['aam[event][' + j + '][event_specifier]'] = events[j][1]; + data['aam[event][' + j + '][post_type]'] = events[j][2]; + data['aam[event][' + j + '][action]'] = events[j][3]; + data['aam[event][' + j + '][action_specifier]'] = events[j][4]; + } + } + + _this.doAction('aam_before_save', data); + + //send the Ajax request to save the data + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.retrieveSettings(); + } + _this.highlight('#control_panel .inside', response.status); + }, + error: function() { + _this.highlight('#control_panel .inside', 'failure'); + }, + complete: function() { + _this.hideMetaboxLoader('#control_panel'); + } + }); + }); + jQuery('#cpanel_major').append(save); + + //create minor actions + jQuery('#cpanel_minor').append( + this.createIcon('medium', 'twitter', 'Follow Us').attr({ + href: 'https://twitter.com/wpaam', + target: '_blank' + }).append('Twitter') + ); + jQuery('#cpanel_minor').append( + this.createIcon('medium', 'help', 'Support').attr({ + href: 'http://wpaam.com/support', + target: '_blank' + }).append('Support') + ); + jQuery('#cpanel_minor').append( + this.createIcon('medium', 'message', 'Message').append('Support').bind('click', function(event) { + event.preventDefault(); + var buttons = {}; + buttons[aamLocal.labels['Send E-mail']] = function() { + location.href = 'mailto:support@wpaam.com'; + jQuery("#message_dialog").dialog("close"); + }; + jQuery("#message_dialog").dialog({ + resizable: false, + height: 'auto', + width: '20%', + modal: true, + buttons: buttons + }); + })); + jQuery('#cpanel_minor').append( + this.createIcon('medium', 'star', 'Rate Us').attr({ + href: 'http://wordpress.org/support/view/plugin-reviews/advanced-access-manager', + target: '_blank' + }).append('Rate') + ); + + //Init Tooltip + this.initTooltip('#control_panel'); +}; + +/** + * Initialize Control Manager Metabox + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initControlManager = function() { + var _this = this; + jQuery('.control-manager a').each(function() { + jQuery(this).bind('click', function(event) { + event.preventDefault(); + var segment = jQuery(this).attr('segment'); + _this.loadSegment(segment); + }); + }); + + //by default load the Role Segment + this.loadSegment('role'); + + //show the list + jQuery('.control-manager-content').css('visibility', 'visible'); +}; + +/** + * Initialize & Load the Control Segment + * + * Segment is a access control area like Blog, Role or User. It is virtual + * understanding of what we are managing right now + * + * @param {String} segment + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadSegment = function(segment) { + //clear all active segments + jQuery('.control-manager a').each(function() { + jQuery(this).removeClass( + 'manager-item-' + jQuery(this).attr('segment') + '-active' + ); + }); + + //hide all segment contents from control manager + jQuery('.control-manager-content > div').hide(); + + switch (segment) { + case 'role': + this.loadRoleSegment(); + break; + + case 'user': + this.loadUserSegment(); + break; + + case 'visitor': + this.loadVisitorSegment(); + break; + + default: + this.doAction('aam_load_segment'); + break; + } + + //activate segment icon + jQuery('.manager-item-' + segment).addClass( + 'manager-item-' + segment + '-active' + ); +}; + +/** + * Initialize & Load Role Segment + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadRoleSegment = function() { + var _this = this; + + jQuery('#role_manager_wrap').show(); + if (this.segmentTables.roleList === null) { + this.segmentTables.roleList = jQuery('#role_list').dataTable({ + sDom: "<'top'f<'aam-list-top-actions'><'clear'>>t<'footer'ip<'clear'>>", + bServerSide: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'roleList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + }, + fnInitComplete: function() { + var add = _this.createIcon( + 'medium', + 'add', + aamLocal.labels['Add New Role'] + ).bind('click', function(event) { + event.preventDefault(); + _this.activateIcon(this, 'medium'); + + //retrieve list of roles dynamically + jQuery('#parent_cap_role').addClass('input-dynamic'); + jQuery('#parent_cap_role_holder').show(); + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: _this.compileAjaxPackage('plainRoleList'), + success: function(response) { + //reset selector + jQuery('#parent_cap_role').empty(); + jQuery('#parent_cap_role').append( + jQuery('
        ', { + 'class': 'aam-list-row-actions' + })); // + //add role attribute + jQuery(nRow).attr('role', aData[0]); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'manage', + aamLocal.labels['Manage'] + ).bind('click', { + role: aData[0] + }, function(event) { + event.preventDefault(); + _this.setSubject('role', event.data.role); + _this.userRoleFilter = event.data.role; + _this.retrieveSettings(); + _this.setCurrent('role', nRow, aData[2]); + if (_this.segmentTables.userList !== null) { + _this.segmentTables.userList.fnDraw(); + } + })); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'pen', + aamLocal.labels['Edit'] + ).bind('click', function(event) { + event.preventDefault(); + _this.activateIcon(this, 'small'); + _this.launchEditRoleDialog(this, aData); + })); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'delete', + aamLocal.labels['Delete'] + ).bind('click', function(event) { + event.preventDefault(); + var button = this; + if ((aData[0] === 'administrator')) { + //open the dialog + var buttons = {}; + _this.activateIcon(this, 'small'); + buttons[aamLocal.labels['Close']] = function() { + jQuery('#delete_admin_role_dialog').dialog("close"); + }; + jQuery('#delete_admin_role_dialog').dialog({ + resizable: false, + height: 'auto', + width: '25%', + modal: true, + buttons: buttons, + close: function(){ + _this.deactivateIcon(button); + } + }); + } else { + _this.activateIcon(this, 'small'); + _this.launchDeleteRoleDialog(this, aData); + } + })); + + //set active + if (_this.getSubject().type === 'role' + && _this.getSubject().id === aData[0]) { + _this.setCurrent('role', nRow, aData[2]); + } + + _this.initTooltip(nRow); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); + } +}; + +/** + * Highlight current subject + * + * @param {String} subject + * @param {Object} nRow + * @param {String} name + * + * @returns {void} + * + * @access public + */ +AAM.prototype.setCurrent = function(subject, nRow, name) { + var _this = this; + + //terminate any active subject + jQuery('.aam-icon-small-active').removeClass('aam-icon-small-active'); + + jQuery('.aam-bold').each(function() { + jQuery(this).removeClass('aam-bold'); + }); + + //highlight the row + jQuery('td:eq(0)', nRow).addClass('aam-bold'); + _this.activateIcon(jQuery('.aam-icon-manage', nRow), 'small'); + jQuery('.current-subject').html(subject + ' ' + name); +}; + +/** + * Generate clear filter indicator for all tables + * + * @returns {String} + * + * @access public + */ +AAM.prototype.clearFilterIndicator = function() { + var info = ''; + + return info; +}; + +/** + * Launch Add Role Dialog + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchAddRoleDialog = function(button) { + var _this = this; + //clean-up the form first + jQuery('#role_name').val(''); + //open the dialog + var buttons = {}; + buttons[aamLocal.labels['Add New Role']] = function() { + //prepare ajax package + var data = _this.compileAjaxPackage('addRole'); + data.name = jQuery('#role_name').val(); + data.inherit = jQuery('#parent_cap_role').val(); + + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.segmentTables.roleList.fnDraw(); + } + _this.highlight('#control_manager .inside', response.status); + } + }); + jQuery('#manage_role_dialog').dialog("close"); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#manage_role_dialog').dialog("close"); + }; + + jQuery('#manage_role_dialog').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + title: aamLocal.labels['Add New Role'], + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch Edit Role Dialog + * + * @param {Object} button + * @param {Object} aData + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchEditRoleDialog = function(button, aData) { + var _this = this; + //populate the form with data + jQuery('#role_name').val(aData[2]); + jQuery('#parent_cap_role_holder').hide(); + //launch the dialog + var buttons = {}; + buttons[aamLocal.labels['Save Changes']] = function() { + var data = _this.compileAjaxPackage('editRole'); + data.subject = 'role'; + data.subject_id = aData[0]; + data.name = jQuery('#role_name').val(); + //save the changes + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.segmentTables.roleList.fnDraw(); + } + _this.highlight('#control_manager .inside', response.status); + }, + error: function() { + _this.highlight('#control_manager .inside', 'failure'); + }, + complete: function() { + jQuery('#manage_role_dialog').dialog("close"); + } + }); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#manage_role_dialog').dialog("close"); + }; + + jQuery('#manage_role_dialog').dialog({ + resizable: false, + height: 'auto', + modal: true, + width: '30%', + title: aamLocal.labels['Edit Role'], + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch Delete Role Dialog + * + * @param {Object} button + * @param {Object} aData + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchDeleteRoleDialog = function(button, aData) { + var _this = this; + //render the message first + if (aData[1]) { + var message = aamLocal.labels['Delete Role with Users Message'].replace( + '%d', aData[1] + ); + message = message.replace('%s', aData[2]); + jQuery('#delete_role_dialog .dialog-content').html(message); + } else { + message = aamLocal.labels['Delete Role Message'].replace('%s', aData[2]); + jQuery('#delete_role_dialog .dialog-content').html(message); + } + + var buttons = {}; + buttons[aamLocal.labels['Delete Role']] = function() { + //prepare ajax package + var data = _this.compileAjaxPackage('deleteRole'); + data.subject = 'role'; + data.subject_id = aData[0]; + data.delete_users = parseInt(aData[1]); + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + //reset the current role + var subject = _this.getSubject(); + if (subject.type === 'role' && subject.id === aData[0]) { + _this.setSubject('role', null); + } + _this.segmentTables.roleList.fnDraw(); + } + _this.highlight('#control_manager .inside', response.status); + }, + error: function() { + _this.highlight('#control_manager .inside', 'failure'); + }, + complete: function() { + jQuery('#delete_role_dialog').dialog("close"); + } + }); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#delete_role_dialog').dialog("close"); + }; + + //launch the dialog + jQuery('#delete_role_dialog').dialog({ + resizable: false, + height: 'auto', + modal: true, + title: aamLocal.labels['Delete Role'], + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Initialize & Load User Segment + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadUserSegment = function() { + var _this = this; + jQuery('#user_manager_wrap').show(); + if (this.segmentTables.userList === null) { + this.segmentTables.userList = jQuery('#user_list').dataTable({ + sDom: "<'top'f<'aam-list-top-actions'><'clear'>>t<'footer'ip<'clear'>>", + bServerSide: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'userList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + aoData.push({ + name: 'role', + value: _this.userRoleFilter + }); + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1, 4, 5] + } + ], + fnInitComplete: function() { + var add = _this.createIcon( + 'medium', + 'add' + ).attr({ + href: aamLocal.addUserURI, + target: '_blank' + }); + + var filter = _this.createIcon( + 'medium', + 'filter' + ).bind('click', function(event) { + event.preventDefault(); + _this.activateIcon(this, 'medium'); + _this.launchFilterUserDialog(this); + }); + + var refresh = _this.createIcon( + 'medium', + 'refresh' + ).bind('click', function(event) { + event.preventDefault(); + _this.segmentTables.userList.fnDraw(); + }); + + jQuery('#user_list_wrapper .aam-list-top-actions').append(filter); + jQuery('#user_list_wrapper .aam-list-top-actions').append(add); + jQuery('#user_list_wrapper .aam-list-top-actions').append(refresh); + _this.initTooltip(jQuery('#user_list_wrapper .aam-list-top-actions')); + }, + fnDrawCallback: function() { + jQuery('#user_list_wrapper .clear-table-filter').bind( + 'click', function(event) { + event.preventDefault(); + jQuery('#user_list_filter input').val(''); + _this.userRoleFilter = ''; + _this.segmentTables.userList.fnFilter(''); + } + ); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + } + }, + fnRowCallback: function(nRow, aData, iDisplayIndex) { //format data + //add User attribute + jQuery(nRow).attr('user', aData[0]); + jQuery('td:eq(1)', nRow).html(jQuery('
        ', { + 'class': 'aam-list-row-actions' + })); + + if (parseInt(aData[5]) === 1){ + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'manage', + aamLocal.labels['Manage'] + ).bind('click', function(event) { + event.preventDefault(); + _this.setSubject('user', aData[0]); + _this.retrieveSettings(); + _this.setCurrent('user', nRow, aData[2]); + })); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'edit-user', + aamLocal.labels['Edit'] + ).attr({ + href: aamLocal.editUserURI + '?user_id=' + aData[0], + target: '_blank' + })); + + var block = _this.createIcon( + 'small', + 'block', + aamLocal.labels['Block'] + ); + if (parseInt(aData[4]) === 1){ + _this.activateIcon(block, 'small'); + } + block.bind('click', function(event) { + event.preventDefault(); + _this.blockUser(this, aData); + }); + jQuery('.aam-list-row-actions', nRow).append(block); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'delete', + aamLocal.labels['Delete'] + ).bind('click', function(event) { + event.preventDefault(); + _this.deleteUser(this, aData); + })); + } else { + jQuery('.aam-list-row-actions', nRow).append(jQuery('', { + 'href': '#', + 'class': 'user-action-locked', + 'aam-tooltip': aamLocal.labels['Actions Locked'] + }).bind('click', function(event) { + event.preventDefault(); + })); + } + + //set active + if (_this.getSubject().type === 'user' + && _this.getSubject().id === aData[0]) { + _this.setCurrent('user', nRow, aData[2]); + } + + _this.initTooltip(nRow); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); + } +}; + +/** + * Block the selected user + * + * @param {Object} button + * @param {Object} aData + * + * @returns {void} + * + * @access public + */ +AAM.prototype.blockUser = function(button, aData) { + var _this = this; + var data = this.compileAjaxPackage('blockUser'); + data.subject = 'user'; + data.subject_id = aData[0]; + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + _this.highlight('#control_manager .inside', response.status); + if (response.user_status === 1) { + _this.activateIcon(button, 'small'); + } else { + _this.deactivateIcon(button); + } + }, + error: function() { + _this.highlight('#control_manager .inside', 'failure'); + } + }); +}; + +/** + * Delete selected User + * + * @param {Object} button + * @param {Object} aData + * + * @returns {void} + * + * @access public + */ +AAM.prototype.deleteUser = function(button, aData) { + var _this = this; + //insert content + jQuery('#delete_user_dialog .dialog-content').html( + aamLocal.labels['Delete User Message'].replace('%s', aData[2]) + ); + var buttons = {}; + buttons[aamLocal.labels['Delete']] = function() { + var data = _this.compileAjaxPackage('deleteUser'); + data.subject = 'user'; + data.subject_id = aData[0]; + //send request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.segmentTables.userList.fnDraw(); + } + _this.highlight('#control_manager .inside', response.status); + + }, + error: function() { + _this.highlight('#control_manager .inside', 'failure'); + }, + complete: function() { + jQuery('#delete_user_dialog').dialog('close'); + } + }); + }; + + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#delete_user_dialog').dialog("close"); + }; + //show the dialog + jQuery('#delete_user_dialog').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch the Filter User List by User Role dialog + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchFilterUserDialog = function(button) { + var _this = this; + if (this.blogTables.filterRoleList === null) { + this.blogTables.filterRoleList = jQuery('#filter_role_list').dataTable({ + sDom: "<'top'f<'clear'>>t<'footer'ip<'clear'>>", + bServerSide: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'roleList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + }, + fnDrawCallback: function() { + jQuery('#filter_role_list_wrapper .clear-table-filter').bind( + 'click', function(event) { + event.preventDefault(); + jQuery('#filter_role_list_filter input').val(''); + _this.blogTables.filterRoleList.fnFilter(''); + } + ); + _this.initTooltip('#filter_role_list_wrapper'); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + } + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1] + } + ], + fnRowCallback: function(nRow, aData) { //format data + jQuery('td:eq(1)', nRow).html(jQuery('
        ', { + 'class': 'aam-list-row-actions' + })); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'select', + aamLocal.labels['Select Role'] + ).bind('click', function(event) { + event.preventDefault(); + _this.userRoleFilter = aData[0]; + _this.segmentTables.userList.fnDraw(); + jQuery('#filter_user_dialog').dialog('close'); + })); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); + } else { + this.blogTables.filterRoleList.fnDraw(); + } + //show the dialog + var buttons = {}; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#filter_user_dialog').dialog("close"); + }; + jQuery('#filter_user_dialog').dialog({ + resizable: false, + height: 'auto', + width: '40%', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Initialize & Load visitor segment + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadVisitorSegment = function() { + jQuery('#visitor_manager_wrap').show(); + this.setSubject('visitor', 1); + this.setCurrent('Visitor', '', ''); + this.retrieveSettings(); +}; + +/** + * Retrieve main metabox settings + * + * @returns {void} + * + * @access public + */ +AAM.prototype.retrieveSettings = function() { + var _this = this; + + jQuery('.aam-main-loader').show(); + jQuery('.aam-main-content').empty(); + + //reset blog Tables first + for (var i in this.blogTables) { + this.blogTables[i] = null; + } + + jQuery.ajax(aamLocal.siteURI, { + type: 'POST', + dataType: 'html', + data: { + action: 'features', + _ajax_nonce: aamLocal.nonce, + subject: _this.getSubject().type, + subject_id: _this.getSubject().id + }, + success: function(response) { + jQuery('.aam-main-content').html(response); + _this.checkRoleback(); + _this.initSettings(); + }, + complete: function() { + jQuery('.aam-main-loader').hide(); + } + }); +}; + +/** + * Check if current subject has roleback available + * + * @returns {undefined} + */ +AAM.prototype.checkRoleback = function() { + var _this = this; + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: _this.compileAjaxPackage('hasRoleback', true), + success: function(response) { + if (parseInt(response.status) === 0) { + _this.disableRoleback(); + } else { + _this.enableRoleback(); + } + }, + complete: function() { + jQuery('.aam-main-loader').hide(); + } + }); +}; + +/** + * Initialize Main metabox settings + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initSettings = function() { + var _this = this; + + //remove all dialogs to make sure that there are no confusions + jQuery('.ui-dialog').remove(); + + //init Settings Menu + jQuery('.feature-list .feature-item').each(function() { + jQuery(this).bind('click', function() { + //feature activation hook + _this.doAction( + 'aam_feature_activation', + {'feature': jQuery(this).attr('feature')} + ); + + jQuery('.feature-list .feature-item').removeClass( + 'feature-item-active' + ); + jQuery(this).addClass('feature-item-active'); + jQuery('.feature-content .feature-content-container').hide(); + jQuery('#' + jQuery(this).attr('feature') + '_content').show(); + }); + }); + + //init default tabs + if (jQuery('#admin_menu_content').length){ + this.initMenuTab(); + } + if (jQuery('#metabox_content').length){ + this.initMetaboxTab(); + } + if (jQuery('#capability_content').length){ + this.initCapabilityTab(); + } + if (jQuery('#post_access_content').length){ + this.initPostTab(); + } + if (jQuery('#event_manager_content').length){ + this.initEventTab(); + } + + this.doAction('aam_init_features'); + + jQuery('.feature-list .feature-item:eq(0)').trigger('click'); +}; + +/** + * Initialize Capability Feature + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initCapabilityTab = function() { + var _this = this; + + //indicator that current user has default capability set. In case he does + //not, it will show additional top action - Restore Default Capabilities + var userDefault = true; + + this.blogTables.capabilities = jQuery('#capability_list').dataTable({ + sDom: "<'top'lf<'aam-list-top-actions'><'clear'>>t<'footer'ip<'clear'>>", + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + bDestroy: true, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback) { + jQuery.ajax({ + dataType: 'json', + type: "POST", + url: aamLocal.ajaxurl, + data: aoData, + success: function(data) { + //set Default Capability set indicator + userDefault = parseInt(data.aaDefault); + //populate oTable + fnCallback(data); + }, + error: function() { + _this.parent.failure(); + } + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'loadCapabilities' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + aoData.push({ + name: 'subject', + value: _this.getSubject().type + }); + aoData.push({ + name: 'subject_id', + value: _this.getSubject().id + }); + }, + fnInitComplete: function() { + var a = jQuery('#capability_list_wrapper .aam-list-top-actions'); + + var filter = _this.createIcon( + 'medium', + 'filter', + aamLocal.labels['Filter Capabilities by Category'] + ).bind('click', function(event) { + event.preventDefault(); + _this.activateIcon(this, 'medium'); + _this.launchCapabilityFilterDialog(this); + }); + jQuery(a).append(filter); + + //do not allow for user to add any new capabilities or copy from + //existing role + if (_this.getSubject().type !== 'user') { + var copy = _this.createIcon( + 'medium', + 'copy', + aamLocal.labels['Inherit Capabilities'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchRoleCopyDialog(this); + }); + + jQuery(a).append(copy); + var add = _this.createIcon( + 'medium', + 'add', + aamLocal.labels['Add New Capability'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchAddCapabilityDialog(this); + }); + jQuery(a).append(add); + } else if (userDefault === 0) { + //add Restore Default Capability button + var restore = _this.createIcon( + 'medium', + 'roleback', + aamLocal.labels['Restore Default Capabilities'] + ).bind('click', function(event) { + event.preventDefault(); + var data = _this.compileAjaxPackage('restoreCapabilities', true); + //show indicator that is running + _this.loadingIcon(jQuery(this), 'medium'); + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.retrieveSettings(); + } else { + _this.highlight('#capability_content', 'failure'); + } + }, + error: function() { + _this.highlight('#capability_content', 'failure'); + } + }); + }); + jQuery(a).append(restore); + } + + _this.initTooltip(a); + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1] + } + ], + fnRowCallback: function(nRow, aData) { + jQuery('td:eq(2)', nRow).empty().append(jQuery('
        ', { + 'class': 'capability-actions' + })); + var actions = jQuery('.capability-actions', nRow); + //add capability checkbox + jQuery(actions).append(jQuery('
        ', { + 'class': 'capability-action' + })); + jQuery('.capability-action', actions).append(jQuery('', { + type: 'checkbox', + id: aData[0], + checked: (parseInt(aData[1]) === 1 ? true : false), + name: 'aam[capability][' + aData[0] + ']' + }).bind('change', function() { + var status = (jQuery(this).prop('checked') === true ? 1 : 0); + _this.blogTables.capabilities.fnUpdate(status, nRow, 1, false); + })); + jQuery('.capability-action', actions).append( + '' + ); + //add capability delete + jQuery(actions).append(jQuery('', { + 'href': '#', + 'class': 'capability-action capability-action-delete', + 'aam-tooltip': aamLocal.labels['Delete'] + }).bind('click', function(event) { + event.preventDefault(); + _this.launchDeleteCapabilityDialog(this, aData, nRow); + })); + _this.initTooltip(nRow); + }, + fnDrawCallback: function() { + jQuery('#capability_list_wrapper .clear-table-filter').bind( + 'click', function(event) { + event.preventDefault(); + jQuery('#capability_list_wrapper input').val(''); + _this.blogTables.capabilities.fnFilter(''); + _this.blogTables.capabilities.fnFilter('', 2); + } + ); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + }, + sLengthMenu: "_MENU_" + } + }); +}; + +/** + * Launch the Delete Capability Dialog + * + * @param {Object} button + * @param {Object} aData + * @param {Object} nRow + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchDeleteCapabilityDialog = function(button, aData, nRow) { + var _this = this; + jQuery('#delete_capability .dialog-content').html( + aamLocal.labels['Delete Capability Message'].replace('%s', aData[3]) + ); + + var buttons = {}; + buttons[aamLocal.labels['Delete Capability']] = function() { + var data = _this.compileAjaxPackage('deleteCapability'); + data.capability = aData[0]; + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.blogTables.capabilities.fnDeleteRow(nRow); + } + _this.highlight('#capability_content', response.status); + }, + error: function() { + _this.highlight('#capability_content', 'failure'); + } + }); + jQuery('#delete_capability').dialog("close"); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#delete_capability').dialog("close"); + }; + + jQuery('#delete_capability').dialog({ + resizable: false, + height: 'auto', + modal: true, + title: aamLocal.labels['Delete Capability'], + buttons: buttons, + close: function() { + } + }); +}; + +/** + * Launch Capability Filter Dialog + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchCapabilityFilterDialog = function(button) { + var _this = this; + + jQuery('#capability_group_list').dataTable({ + sDom: "t", + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + bDestroy: true, + fnRowCallback: function(nRow, aData) { + jQuery('.aam-icon-select', nRow).bind('click', function(event) { + event.preventDefault(); + _this.blogTables.capabilities.fnFilter( + aData[0].replace('&', '&'), 2 + ); + jQuery('#filter_capability_dialog').dialog('close'); + }); + } + }); + var buttons = {}; + buttons[aamLocal.labels['Close']] = function() { + jQuery('#filter_capability_dialog').dialog("close"); + }; + jQuery('#filter_capability_dialog').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch Capability Role Copy dialog + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchRoleCopyDialog = function(button) { + var _this = this; + + this.blogTables.inheritRole = jQuery('#copy_role_list').dataTable({ + sDom: "<'top'f<'clear'>>t<'footer'ip<'clear'>>", + bServerSide: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + bDestroy: true, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'roleList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + }, + fnDrawCallback: function() { + jQuery('#copy_role_list_wrapper .clear-table-filter').bind( + 'click', function(event) { + event.preventDefault(); + jQuery('#copy_role_list_filter input').val(''); + _this.blogTables.inheritRole.fnFilter(''); + } + ); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + } + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1] + } + ], + fnRowCallback: function(nRow, aData, iDisplayIndex) { //format data + jQuery('td:eq(1)', nRow).html(jQuery('
        ', { + 'class': 'aam-list-row-actions' + })); // + jQuery('.aam-list-row-actions', nRow).empty(); + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'select', + aamLocal.labels['Select Role'] + ).bind('click', function(event) { + event.preventDefault(); + _this.showMetaboxLoader('#copy_role_dialog'); + var data = _this.compileAjaxPackage('roleCapabilities'); + data.subject = 'role'; + data.subject_id = aData[0]; + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + //reset the capability list + var oSettings = _this.blogTables.capabilities.fnSettings(); + for (var i in oSettings.aoData) { + var cap = oSettings.aoData[i]._aData[0]; + var ntr = oSettings.aoData[i].nTr; + if (typeof response.capabilities[cap] !== 'undefined') { + _this.blogTables.capabilities.fnUpdate(1, ntr, 1, false); + jQuery('#' + cap).attr('checked', 'checked'); + } else { + _this.blogTables.capabilities.fnUpdate(0, ntr, 1, false); + jQuery('#' + cap).removeAttr('checked'); + } + } + } + _this.highlight('#capability_content', response.status); + }, + error: function() { + _this.highlight('#capability_content', 'failure'); + }, + complete: function() { + //grab the capability list for selected role + _this.hideMetaboxLoader('#copy_role_dialog'); + jQuery('#copy_role_dialog').dialog('close'); + } + }); + })); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); + + var buttons = {}; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#copy_role_dialog').dialog("close"); + }; + + //show the dialog + jQuery('#copy_role_dialog').dialog({ + resizable: false, + height: 'auto', + width: '40%', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch Add Capability Dialog + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchAddCapabilityDialog = function(button) { + var _this = this; + //reset form + jQuery('#capability_name').val(''); + + var buttons = {}; + buttons[aamLocal.labels['Add Capability']] = function() { + var capability = jQuery.trim(jQuery('#capability_name').val()); + if (capability) { + _this.showMetaboxLoader('#capability_form_dialog'); + var data = _this.compileAjaxPackage('addCapability'); + data.capability = capability; + data.unfiltered = (jQuery('#capability_unfiltered').attr('checked') ? 1 : 0); + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.blogTables.capabilities.fnAddData([ + response.capability, + 1, + 'Miscelaneous', + data.capability, + '']); + _this.highlight('#capability_content', 'success'); + jQuery('#capability_form_dialog').dialog("close"); + } else { + _this.highlight('#capability_form_dialog', 'failure'); + } + }, + error: function() { + _this.highlight('#capability_form_dialog', 'failure'); + }, + complete: function() { + _this.hideMetaboxLoader('#capability_form_dialog'); + } + }); + } else { + jQuery('#capability_name').effect('highlight', 2000); + } + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#capability_form_dialog').dialog("close"); + }; + + //show dialog + jQuery('#capability_form_dialog').dialog({ + resizable: false, + height: 'auto', + width: 'auto', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Initialize and Load the Menu Feature + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initMenuTab = function() { + this.initMenuAccordion(false); + + jQuery('.whole_menu').each(function() { + jQuery(this).bind('change', function() { + if (jQuery(this).attr('checked')) { + jQuery('input[type="checkbox"]', '#submenu_' + jQuery(this).attr('id')).attr( + 'checked', 'checked' + ); + } else { + jQuery('input[type="checkbox"]', '#submenu_' + jQuery(this).attr('id')).removeAttr( + 'checked' + ); + } + }); + }); + + this.initTooltip('#main_menu_list'); +}; + +/** + * Init Main Menu Accordion + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initMenuAccordion = function() { + //destroy if already initialized + if (jQuery('#main_menu_list').hasClass('ui-accordion')) { + jQuery('#main_menu_list').accordion('destroy'); + } + + //initialize + jQuery('#main_menu_list').accordion({ + collapsible: true, + header: 'h4', + heightStyle: 'content', + icons: { + header: "ui-icon-circle-arrow-e", + headerSelected: "ui-icon-circle-arrow-s" + }, + active: false + }); +}; + +/** + * Initialize and load Metabox Feature + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initMetaboxTab = function() { + var _this = this; + + jQuery('#retrieve_url').bind('click', function(event) { + event.preventDefault(); + var icon = this; + var link = jQuery.trim(jQuery('#metabox_link').val()); + if (link) { + _this.loadingIcon(icon, 'medium'); + //init metaboxes + var data = _this.compileAjaxPackage('initLink'); + data.link = link; + + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + jQuery('#metabox_link').val(''); + _this.loadMetaboxes(0); + } + _this.highlight('#metabox_content', response.status); + }, + error: function() { + _this.highlight('#metabox_content', 'failure'); + }, + complete: function(){ + _this.removeLoadingIcon(icon); + } + }); + } else { + jQuery('#metabox_link').effect('highlight', 2000); + } + + }); + + jQuery('#refresh_metaboxes').bind('click', function(event) { + event.preventDefault(); + _this.loadMetaboxes(1); + }); + + this.initTooltip('.metabox-top-actions'); + + this.loadMetaboxes(0); +}; + +/** + * Load Metabox list + * + * @param {Boolean} refresh + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadMetaboxes = function(refresh) { + var _this = this; + //init metaboxes + var data = this.compileAjaxPackage('loadMetaboxes', true); + data.refresh = refresh; + //show loader and reset the metabox list holder + jQuery('#metabox_list_container').empty(); + this.showMetaboxLoader('#metabox_content'); + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'html', + data: data, + success: function(response) { + jQuery('#metabox_list_container').html(response); + jQuery('#metabox_list').accordion({ + collapsible: true, + header: 'h4', + heightStyle: 'content', + icons: { + header: "ui-icon-circle-arrow-e", + headerSelected: "ui-icon-circle-arrow-s" + }, + active: false + }); + //init Tooltips + _this.initTooltip('#metabox_list_container'); + }, + error: function() { + _this.highlight('#metabox_content', 'failure'); + }, + complete: function() { + _this.hideMetaboxLoader('#metabox_content'); + } + }); +}; + +/** + * Initialize and Load Event Feature + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initEventTab = function() { + var _this = this; + + jQuery('#event_event').bind('change', function() { + if (jQuery(this).val() === 'status_change') { + jQuery('#status_changed').show(); + } else { + jQuery('#status_changed').hide(); + } + }); + + jQuery('#event_action').bind('change', function() { + jQuery('.event-specifier').hide(); + jQuery('#event_specifier_' + jQuery(this).val() + '_holder').show(); + }); + + this.blogTables.eventList = jQuery('#event_list').dataTable({ + sDom: "<'aam-list-top-actions'><'clear'>t<'footer'p<'clear'>>", + //bProcessing : false, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'eventList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + aoData.push({ + name: 'subject', + value: _this.getSubject().type + }); + aoData.push({ + name: 'subject_id', + value: _this.getSubject().id + }); + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [1, 4] + } + ], + fnInitComplete: function() { + var add = _this.createIcon( + 'medium', + 'add', + aamLocal.labels['Add Event'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchManageEventDialog(this, null); + }); + jQuery('#event_list_wrapper .aam-list-top-actions').append(add); + _this.initTooltip( + jQuery('#event_list_wrapper .aam-list-top-actions') + ); + }, + fnDrawCallback: function() { + jQuery('#event_list_wrapper .clear-table-filter').bind('click', function(event) { + event.preventDefault(); + jQuery('#event_list_filter input').val(''); + _this.blogTables.eventList.fnFilter(''); + }); + }, + fnRowCallback: function(nRow, aData) { + if (jQuery('.event-actions', nRow).length) { + jQuery('.event-actions', nRow).empty(); + } else { + jQuery('td:eq(3)', nRow).html(jQuery('
        ', { + 'class': 'event-actions' + })); + } + jQuery('.event-actions', nRow).append(jQuery('', { + 'href': '#', + 'class': 'event-action event-action-edit', + 'aam-tooltip': aamLocal.labels['Edit Event'] + }).bind('click', function(event) { + event.preventDefault(); + _this.launchManageEventDialog(this, aData, nRow); + })); + jQuery('.event-actions', nRow).append(jQuery('', { + 'href': '#', + 'class': 'event-action event-action-delete', + 'aam-tooltip': aamLocal.labels['Delete Event'] + }).bind('click', function(event) { + event.preventDefault(); + _this.launchDeleteEventDialog(this, aData, nRow); + })); + + _this.initTooltip(nRow); + + //decorate the data in row + jQuery('td:eq(0)', nRow).html( + jQuery('#event_event option[value="' + aData[0] + '"]').text() + ); + jQuery('td:eq(1)', nRow).html( + jQuery('#event_bind option[value="' + aData[2] + '"]').text() + ); + jQuery('td:eq(2)', nRow).html( + jQuery('#event_action option[value="' + aData[3] + '"]').text() + ); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + } + } + }); +}; + +/** + * Launch Add/Edit Event Dialog + * + * @param {Object} button + * @param {Object} aData + * @param {Object} nRow + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchManageEventDialog = function(button, aData, nRow) { + var _this = this; + + //reset form and pre-populate if edit mode + jQuery('input, select', '#manage_event_dialog').val(''); + jQuery('.event-specifier', '#manage_event_dialog').hide(); + jQuery('#status_changed', '#manage_event_dialog').hide(); + + if (aData !== null) { + jQuery('#event_event', '#manage_event_dialog').val(aData[0]); + jQuery('#event_specifier', '#manage_event_dialog').val(aData[1]); + jQuery('#event_bind', '#manage_event_dialog').val(aData[2]); + jQuery('#event_action', '#manage_event_dialog').val(aData[3]); + jQuery('#event_specifier_' + aData[3], '#manage_event_dialog').val(aData[4]); + //TODO - Make this more dynamical + jQuery('#event_event', '#manage_event_dialog').trigger('change'); + jQuery('#event_action', '#manage_event_dialog').trigger('change'); + } + + var buttons = {}; + buttons[aamLocal.labels['Save Event']] = function() { + //validate first + var data = _this.validEvent(); + if (data !== null) { + if (aData !== null) { + _this.blogTables.eventList.fnUpdate(data, nRow); + } else { + _this.blogTables.eventList.fnAddData(data); + } + jQuery('#manage_event_dialog').dialog("close"); + } else { + jQuery('#manage_event_dialog').effect('highlight', 3000); + } + }; + buttons[aamLocal.labels['Close']] = function() { + jQuery('#manage_event_dialog').dialog("close"); + }; + jQuery('#manage_event_dialog').dialog({ + resizable: false, + height: 'auto', + width: '40%', + modal: true, + buttons: buttons, + close: function() { + } + }); +}; + +/** + * Validate Event Form + * + * @returns {Boolean} + * + * @access public + */ +AAM.prototype.validEvent = function() { + var data = new Array(); + + data.push(jQuery('#event_event').val()); + data.push(jQuery('#event_specifier').val()); + data.push(jQuery('#event_bind').val()); + var action = jQuery('#event_action').val(); + data.push(action); + data.push(jQuery('#event_specifier_' + action).val()); + data.push('--'); //Event Actions Cell + + return data; +}; + +/** + * Launch Delete Event Dialog + * + * @param {Object} button + * @param {Object} aData + * @param {Object} nRow + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchDeleteEventDialog = function(button, aData, nRow) { + var _this = this; + var buttons = {}; + buttons[aamLocal.labels['Delete Event']] = function() { + _this.blogTables.eventList.fnDeleteRow(nRow); + jQuery('#delete_event').dialog("close"); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#delete_event').dialog("close"); + }; + jQuery('#delete_event').dialog({ + resizable: false, + height: 'auto', + modal: true, + title: aamLocal.labels['Delete Event'], + buttons: buttons, + close: function() { + } + }); +}; + +/** + * Initialize and Load Post Feature + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initPostTab = function() { + var _this = this; + + this.initPostTree(); + + jQuery('#sidetreecontrol span').bind('click', function() { + jQuery("#tree").replaceWith('
          '); + _this.initPostTree(); + }); + + jQuery('.post-access-area').buttonset(); + jQuery('.post-access-area input', '#access_dialog').each(function() { + jQuery(this).bind('click', function() { + jQuery('#access_dialog .dataTable').hide(); + jQuery('#term_access_' + jQuery(this).val()).show(); + jQuery('#post_access_' + jQuery(this).val()).show(); + }); + }); + + this.blogTables.postList = jQuery('#post_list').dataTable({ + sDom: "<'top'lf<'aam-list-top-actions'><'clear'>><'post-breadcrumb'>t<'footer'ip<'clear'>>", + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + bServerSide: true, + sAjaxSource: true, + fnServerData: function(sSource, aoData, fnCallback, oSettings) { + oSettings.jqXHR = jQuery.ajax({ + "dataType": 'json', + "type": "POST", + "url": aamLocal.ajaxurl, + "data": aoData, + "success": fnCallback + }); + }, + fnServerParams: function(aoData) { + aoData.push({ + name: 'action', + value: 'aam' + }); + aoData.push({ + name: 'sub_action', + value: 'postList' + }); + aoData.push({ + name: '_ajax_nonce', + value: aamLocal.nonce + }); + aoData.push({ + name: 'subject', + value: _this.getSubject().type + }); + aoData.push({ + name: 'subject_id', + value: _this.getSubject().id + }); + aoData.push({ + name: 'term', + value: _this.postTerm + }); + }, + fnInitComplete: function() { + var a = jQuery('#post_list_wrapper .aam-list-top-actions'); + + var filter = _this.createIcon( + 'medium', + 'filter', + aamLocal.labels['Filter Posts by Post Type'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchFilterPostDialog(this); + }); + jQuery(a).append(filter); + + var refresh = _this.createIcon( + 'medium', + 'refresh', + aamLocal.labels['Refresh List'] + ).bind('click', function(event) { + event.preventDefault(); + _this.blogTables.postList.fnDraw(); + }); + jQuery(a).append(refresh); + _this.initTooltip(a); + }, + oLanguage: { + sSearch: "", + oPaginate: { + sFirst: "≪", + sLast: "≫", + sNext: ">", + sPrevious: "<" + }, + sLengthMenu: "_MENU_" + }, + aoColumnDefs: [ + { + bVisible: false, + aTargets: [0, 1, 2, 6] + } + ], + fnRowCallback: function(nRow, aData) { //format data + jQuery('td:eq(0)', nRow).html(jQuery('
          ', { + 'href': "#", + 'class': "post-type-post" + }).bind('click', function(event) { + event.preventDefault(); + var button = jQuery('.aam-icon-manage', nRow); + _this.launchManageAccessDialog(button, nRow, aData, 'post'); + }).text(aData[3])); + + jQuery('td:eq(2)', nRow).append(jQuery('
          ', { + 'class': 'aam-list-row-actions' + })); + + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'manage', + aamLocal.labels['Manage Access'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchManageAccessDialog(this, nRow, aData, 'post'); + })); + + var edit = _this.createIcon( + 'small', + 'pen', + aamLocal.labels['Edit'] + ).attr({ + href: aData[2].replace('&', '&'), + target: '_blank' + }); + jQuery('.aam-list-row-actions', nRow).append(edit); + + if (aData[1] === 'trash') { + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'delete', + aamLocal.labels['Delete Post'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchDeletePostDialog(this, nRow, aData, true); + })); + } else { + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'trash', + aamLocal.labels['Move to Trash'] + ).bind('click', function(event) { + event.preventDefault(); + _this.launchDeletePostDialog(this, nRow, aData, false); + })); + } + + if (parseInt(aData[6]) === 1) { + jQuery('.aam-list-row-actions', nRow).append(_this.createIcon( + 'small', + 'roleback', + aamLocal.labels['Restore Default Access'] + ).bind('click', function(event) { + event.preventDefault(); + _this.restorePostAccess(aData[0], 'post', nRow); + jQuery(this).remove(); + })); + } + + _this.initTooltip(nRow); + }, + fnDrawCallback: function() { + jQuery('.post-breadcrumb').addClass('post-breadcrumb-loading'); + _this.loadBreadcrumb(); + jQuery('#event_list_wrapper .clear-table-filter').bind( + 'click', function(event) { + event.preventDefault(); + jQuery('#event_list_filter input').val(''); + _this.blogTables.postList.fnFilter(''); + } + ); + }, + fnInfoCallback: function(oSettings, iStart, iEnd, iMax, iTotal, sPre) { + return (iMax !== iTotal ? _this.clearFilterIndicator() : ''); + } + }); +}; + +/** + * Launch Filter Post Dialog (Category Tree) + * + * @param {Object} button + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchFilterPostDialog = function(button) { + var _this = this; + var buttons = {}; + buttons[aamLocal.labels['Close']] = function() { + jQuery('#filter_post_dialog').dialog("close"); + }; + jQuery('#filter_post_dialog').dialog({ + resizable: false, + height: 'auto', + width: 'auto', + modal: true, + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Launch Manage Access Control for selected post + * + * @param {Object} button + * @param {Object} nRow + * @param {Array} aData + * @param {String} type + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchManageAccessDialog = function(button, nRow, aData, type) { + var _this = this; + + //reset the Frontend/Backend radio + if (jQuery('.post-access-area', '#access_dialog').length) { + //in case it is Visitor, this section is not rendered + jQuery('.post-access-area #post_area_frontend').attr('checked', true); + jQuery('.post-access-area').buttonset('refresh'); + } + + //retrieve settings and display the dialog + var data = this.compileAjaxPackage('getAccess', true); + data.id = aData[0]; + data.type = type; + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + jQuery('#access_control_area').html(response.html); + jQuery('#access_dialog .dataTable').hide(); + + if (type === 'term') { + jQuery('#term_access_frontend').show(); + if (parseInt(response.counter) !== -1) { + jQuery('.post-access-block', '#access_dialog').show(); + } else { + jQuery('.post-access-block', '#access_dialog').hide(); + } + } else { + jQuery('.post-access-block', '#access_dialog').hide(); + } + + jQuery('#post_access_frontend').show(); + + + var buttons = {}; + buttons[aamLocal.labels['Restore Default']] = function() { + _this.restorePostAccess(aData[0], type, nRow); + jQuery('#access_dialog').dialog("close"); + }; + + if (response.counter <= 10) { + buttons[aamLocal.labels['Apply']] = function() { + _this.showMetaboxLoader('#access_dialog'); + var data = _this.compileAjaxPackage('saveAccess', true); + data.id = aData[0]; + data.type = type; + + jQuery('input', '#access_control_area').each(function() { + data[jQuery(this).attr('name')] = (jQuery(this).prop('checked') ? 1 : 0); + }); + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + _this.highlight(nRow, response.status); + }, + error: function() { + _this.highlight(nRow, 'failure'); + }, + complete: function() { + _this.hideMetaboxLoader('#access_dialog'); + } + }); + jQuery('#access_dialog').dialog("close"); + }; + jQuery('.aam-lock-message', '#access_dialog').hide(); + } else { + jQuery('.aam-lock-message', '#access_dialog').show(); + } + + buttons[aamLocal.labels['Close']] = function() { + jQuery('#access_dialog').dialog("close"); + }; + + jQuery('#access_dialog').dialog({ + resizable: false, + height: 'auto', + width: '25%', + modal: true, + title: 'Manage Access', + buttons: buttons, + close: function() { + } + }); + + _this.doAction('aam_get_access_loaded'); + }, + error: function() { + _this.highlight(nRow, 'failure'); + } + }); +}; + +/** + * Restore Default Post/Term Access + * + * @param {type} id + * @param {type} type + * @param {type} nRow + * + * @returns {void} + */ +AAM.prototype.restorePostAccess = function(id, type, nRow) { + var _this = this; + + //retrieve settings and display the dialog + var data = this.compileAjaxPackage('clearAccess', true); + data.id = id; + data.type = type; + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + _this.highlight(nRow, response.status); + }, + error: function() { + _this.highlight(nRow, 'failure'); + } + }); +}; + +/** + * Launch the Delete Post Dialog + * + * @param {Object} button + * @param {Object} nRow + * @param {Object} aData + * @param {Boolean} force + * + * @returns {void} + * + * @access public + */ +AAM.prototype.launchDeletePostDialog = function(button, nRow, aData, force) { + var _this = this; + + jQuery('#delete_post_dialog .dialog-content').html( + aamLocal.labels[(force ? 'Delete' : 'Trash') + ' Post Message'].replace('%s', aData[3]) + ); + var buttons = {}; + + if (force === false) { + buttons[aamLocal.labels['Delete Permanently']] = function() { + _this.deletePost(aData[0], true, nRow); + }; + } + + buttons[aamLocal.labels[(force ? 'Delete' : 'Trash') + ' Post']] = function() { + _this.deletePost(aData[0], force, nRow); + }; + buttons[aamLocal.labels['Cancel']] = function() { + jQuery('#delete_post_dialog').dialog("close"); + }; + + jQuery('#delete_post_dialog').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + title: aamLocal.labels[(force ? 'Delete' : 'Trash') + ' Post'], + buttons: buttons, + close: function() { + _this.deactivateIcon(button); + } + }); +}; + +/** + * Delete or Trash the Post + * + * @param {type} id + * @param {type} force + * @param {type} nRow + * + * @returns {void} + */ +AAM.prototype.deletePost = function(id, force, nRow) { + var _this = this; + + var data = _this.compileAjaxPackage('deletePost'); + data.post = id; + data.force = (force ? 1 : 0); + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + if (response.status === 'success') { + _this.blogTables.postList.fnDeleteRow(nRow); + } + _this.highlight('#post_list_wrapper', response.status); + }, + error: function() { + _this.highlight('#post_list_wrapper', 'failure'); + } + }); + jQuery('#delete_post_dialog').dialog("close"); +}; + +/** + * Build Post Breadcrumb + * + * @param {Object} response + * + * @returns {void} + * + * @access public + */ +AAM.prototype.buildPostBreadcrumb = function(response) { + var _this = this; + + jQuery('.post-breadcrumb').empty(); + //create a breadcrumb + jQuery('.post-breadcrumb').append(jQuery('
          ', { + 'class': 'post-breadcrumb-line' + })); + + for (var i in response.breadcrumb) { + jQuery('.post-breadcrumb-line').append(jQuery('', { + href: '#' + }).bind('click', { + term: response.breadcrumb[i][0] + }, function(event) { + event.preventDefault(); + _this.postTerm = event.data.term; + _this.blogTables.postList.fnDraw(); + }).html(response.breadcrumb[i][1])).append(jQuery('', { + 'class': 'aam-gt' + }).html('≫')); + } + //deactive last one + jQuery('.post-breadcrumb-line a:last').replaceWith(response.breadcrumb[i][1]); + jQuery('.post-breadcrumb-line .aam-gt:last').remove(); + + jQuery('.post-breadcrumb').append(jQuery('
          ', { + 'class': 'post-breadcrumb-line-actions' + })); + + if (/^[\d]+$/.test(this.postTerm)) { + var edit = _this.createIcon( + 'small', + 'pen', + aamLocal.labels['Edit Term'] + ).attr({ + href: response.link, + target: '_blank' + }); + jQuery('.post-breadcrumb-line-actions').append(edit); + jQuery('.post-breadcrumb-line-actions').append(_this.createIcon( + 'small', + 'manage', + aamLocal.labels['Manage Access'] + ).bind('click', {id: response.breadcrumb[i][0]}, function(event) { + event.preventDefault(); + var aData = new Array(); + aData[0] = event.data.id; + _this.launchManageAccessDialog( + this, jQuery('.post-breadcrumb'), aData, 'term' + ); + })); + } else { + jQuery('.post-breadcrumb-line-actions').append(jQuery('', { + 'href': 'http://wpaam.com', + 'target': '_blank', + 'class': 'post-breadcrumb-line-action post-breadcrumb-line-action-lock', + 'aam-tooltip': aamLocal.labels['Unlock Default Accesss Control'] + })); + this.doAction('aam_breadcrumb_action', response); + } + _this.initTooltip(jQuery('.post-breadcrumb-line-actions')); +}; + +/** + * Load Post Breadcrumb + * + * @returns {void} + * + * @access public + */ +AAM.prototype.loadBreadcrumb = function() { + var _this = this; + var data = this.compileAjaxPackage('postBreadcrumb'); + data.id = _this.postTerm; + //send the request + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: data, + success: function(response) { + _this.buildPostBreadcrumb(response); + }, + complete: function() { + jQuery('.post-breadcrumb').removeClass('post-breadcrumb-loading'); + } + }); +}; + +/** + * Initialize and Load Category Tree + * + * @returns {void} + * + * @access public + */ +AAM.prototype.initPostTree = function() { + var _this = this; + + var data = this.compileAjaxPackage('postTree'); + + jQuery("#tree").treeview({ + url: aamLocal.ajaxurl, + // add some additional, dynamic data and request with POST + ajax: { + data: data, + type: 'post', + complete: function() { + jQuery('#tree li').each(function() { + var id = jQuery(this).attr('id'); + if (id && !jQuery(this).attr('active')) { + jQuery('.important', this).html(jQuery('', { + href: '#' + }).html(jQuery('.important', this).text()).bind('click', { + id: id + }, function(event) { + event.preventDefault(); + _this.postTerm = event.data.id; + _this.blogTables.postList.fnDraw(); + jQuery('#filter_post_dialog').dialog('close'); + })); + jQuery(this).attr('active', true); + } + }); + } + }, + animated: "medium", + control: "#sidetreecontrol", + persist: "location" + }); +}; + +/** + * Create AAM icon + * + * @param string size + * @param string qualifier + * @param string tooltip + * + * @returns {object} + * + * @access public + */ +AAM.prototype.createIcon = function(size, qualifier, tooltip){ + var icon = jQuery('', { + class: 'aam-icon aam-icon-' + size + ' aam-icon-' + size + '-' + qualifier, + href: '#' + }); + //add tooltip if defined + if (typeof tooltip !== 'undefined'){ + icon.attr('aam-tooltip', tooltip); + } + + //add iternal span to apply table-cell css + icon.html(jQuery('')); + + return icon; +}; + +/** + * Mark icons as loading + * + * @param object|string icon + * @param string size + * + * @returns void + * + * @access public + */ +AAM.prototype.loadingIcon = function(icon, size){ + jQuery(icon).addClass('aam-' + size + '-loader'); +}; + +/** + * Remove loading icon + * + * @param object|string icon + * + * @returns void + * + * @access public + */ +AAM.prototype.removeLoadingIcon = function(icon){ + if (jQuery(icon).hasClass('aam-medium-loader')){ + jQuery(icon).removeClass('aam-medium-loader'); + } else if (jQuery(icon).hasClass('aam-small-loader')){ + jQuery(icon).removeClass('aam-small-loader'); + } +}; + +/** + * Launch the button + * + * @param {Object} element + * @param {String} inactive + * + * @returns {void} + * + * @access public + */ +AAM.prototype.activateIcon = function(element, size) { + jQuery(element).addClass('aam-icon-' + size + '-active'); +}; + +/** + * Terminate the button + * + * @param {Object} element + * @param {String} inactive + * + * @returns {void} + * + * @access public + */ +AAM.prototype.deactivateIcon = function(element) { + if (jQuery(element).hasClass('aam-icon-small-active')){ + jQuery(element).removeClass('aam-icon-small-active'); + } else if (jQuery(element).hasClass('aam-icon-medium-active')){ + jQuery(element).removeClass('aam-icon-medium-active'); + } else if (jQuery(element).hasClass('aam-icon-minor-active')){ + jQuery(element).removeClass('aam-icon-minor-active'); + } +}; + +/** + * Highlight the specified DOM area + * + * @param {String} selector + * @param {String} status + * + * @returns {void} + * + * @access public + */ +AAM.prototype.highlight = function(selector, status) { + if (status === 'success') { + jQuery(selector).effect("highlight", { + color: '#98CE90' + }, 3000); + } else { + jQuery(selector).effect("highlight", { + color: '#FFAAAA' + }, 3000); + } +}; + +jQuery(document).ready(function() { + aamInterface = new AAM(); +}); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/js/codemirror.js b/wp-content/plugins/advanced-access-manager/media/js/codemirror.js new file mode 100644 index 0000000..f94c403 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/js/codemirror.js @@ -0,0 +1 @@ +window.CodeMirror=function(){function m(a,b){if(!(this instanceof m))return new m(a,b);this.options=b=b||{};for(var c in Rb)!b.hasOwnProperty(c)&&Rb.hasOwnProperty(c)&&(b[c]=Rb[c]);Sb(b);c=this.display=Td(a,"string"==typeof b.value?0:b.value.first);c.wrapper.CodeMirror=this;Nc(this);b.autofocus&&!Tb&&N(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,draggingText:!1,highlight:new Ub};Oc(this);b.lineWrapping&&(this.display.wrapper.className+= " CodeMirror-wrap");var d=b.value;"string"==typeof d&&(d=new I(b.value,b.mode));t(this,Pc)(this,d);B&&setTimeout(O(Y,this,!0),20);Ud(this);var e;try{e=document.activeElement==c.input}catch(f){}e||b.autofocus&&!Tb?setTimeout(O(ha,this),20):Vb(this);t(this,function(){for(var a in pa)if(pa.propertyIsEnumerable(a))pa[a](this,b[a],Qc);for(a=0;ab.maxLineLength&&(b.maxLineLength=e,b.maxLine=a)})}function Sb(a){for(var b=!1,c=0;cb.scroller.clientWidth+1,e=c>b.scroller.clientHeight+1;e?(b.scrollbarV.style.display="block",b.scrollbarV.style.bottom=d?Na(b.measure)+"px":"0",b.scrollbarV.firstChild.style.height=c-b.scroller.clientHeight+b.scrollbarV.clientHeight+"px"):(b.scrollbarV.style.display= "",b.scrollbarV.firstChild.style.height="0");d?(b.scrollbarH.style.display="block",b.scrollbarH.style.right=e?Na(b.measure)+"px":"0",b.scrollbarH.firstChild.style.width=b.scroller.scrollWidth-b.scroller.clientWidth+b.scrollbarH.clientWidth+"px"):(b.scrollbarH.style.display="",b.scrollbarH.firstChild.style.width="0");d&&e?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=b.scrollbarFiller.style.width=Na(b.measure)+"px"):b.scrollbarFiller.style.display="";d&&a.options.coverGutterNextToScrollbar&& a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=Na(b.measure)+"px",b.gutterFiller.style.width=b.gutters.offsetWidth+"px"):b.gutterFiller.style.display="";Vd&&0===Na(b.measure)&&(b.scrollbarV.style.minWidth=b.scrollbarH.style.minHeight=Wd?"18px":"12px")}function ac(a,b,c){var d=a.scroller.scrollTop,e=a.wrapper.clientHeight;"number"==typeof c?d=c:c&&(d=c.top,e=c.bottom-c.top);d=Math.floor(d-a.lineSpace.offsetTop);a=Math.ceil(d+e);return{from:Oa(b,d),to:Oa(b,a)}} function Yb(a){var b=a.display;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var c=bc(b)-b.scroller.scrollLeft+a.doc.scrollLeft,d=b.gutters.offsetWidth,e=c+"px",f=b.lineDiv.firstChild;f;f=f.nextSibling)if(f.alignable)for(var g=0,h=f.alignable;g=a.display.showingFrom&&h.to<=a.display.showingTo)break;b=[]}g&&(M(a,"update",a),a.display.showingFrom==e&&a.display.showingTo==f||M(a,"viewportChange",a,a.display.showingFrom,a.display.showingTo));return g}function Yd(a,b,c,d){var e=a.display,f=a.doc;if(!e.wrapper.clientWidth)e.showingFrom= e.showingTo=f.first,e.viewOffset=0;else if(d||!(0==b.length&&c.from>e.showingFrom&&c.tok-e.showingFrom&& (k=Math.max(f.first,e.showingFrom));e.showingTo>c&&20>e.showingTo-c&&(c=Math.min(h,e.showingTo));if(Pa)for(k=P($(f,u(f,k)));c=l[0].to?[]:Zd(l,b);if(Pa)for(h=0;hb.from)b.to=n;else{l.splice(h--,1);break}}for(h=f=0;hc&&(b.to=c),b.from>=b.to?l.splice(h--,1):f+=b.to-b.from; if(d||f!=c-k||k!=e.showingFrom||c!=e.showingTo){l.sort(function(a,b){return a.from-b.from});try{var E=document.activeElement}catch(q){}f<0.7*(c-k)&&(e.lineDiv.style.display="none");$d(a,k,c,l,g);e.lineDiv.style.display="";E&&document.activeElement!=E&&E.offsetHeight&&E.focus();if(k!=e.showingFrom||c!=e.showingTo||e.lastSizeC!=e.wrapper.clientHeight)e.lastSizeC=e.wrapper.clientHeight,Ka(a,400);e.showingFrom=k;e.showingTo=c;ae(a);Vc(a);return!0}Vc(a)}}function ae(a){a=a.display;for(var b=a.lineDiv.offsetTop, c=a.lineDiv.firstChild,d;c;c=c.nextSibling)if(c.lineObj){if(ra){var e=c.offsetTop+c.offsetHeight;d=e-b;b=e}else d=y(c),d=d.bottom-d.top;e=c.lineObj.height-d;2>d&&(d=sa(a));if(0.001e)if(R(c.lineObj,d),d=c.lineObj.widgets)for(e=0;e=l.to?f.push(l):(e.from>l.from&&f.push({from:l.from,to:e.from}),e.toq){for(;n.lineObj!=b;)n=f(n);k&&e<=q&&n.lineNumber&&Wc(n.lineNumber,cc(a.options,q));n=n.nextSibling}else{if(b.widgets)for(var C=0,r=n;r&&20>C;++C,r=r.nextSibling)if(r.lineObj==b&&/div/i.test(r.nodeName)){c= r;break}var C=a,u=q,H=c,r=fc(C,b),G=b.gutterMarkers,s=C.display;if(C.options.lineNumbers||G||b.bgClass||b.wrapClass||b.widgets){if(H){H.alignable=null;for(var t=!0,v=0,w=null,x=H.firstChild,z;x;x=z)if(z=x.nextSibling,/\bCodeMirror-linewidget\b/.test(x.className)){for(var y=0;yb&&(b=0);g.appendChild(p("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?h-a:c)+"px; height: "+(d-b)+"px"))}function c(c,d,f){var g=u(e,c),l=g.text.length,n,m;de(V(g),d||0,null==f?l:f,function(e,u,H){var p=rb(a,r(c,e),"div",g,"left"),s,t;e==u?(s=p,H=t=p.left):(s=rb(a,r(c,u-1),"div",g,"right"),"rtl"==H&&(H=p,p=s,s=H),H=p.left,t=s.right);null==d&&0==e&&(H=k);3m.bottom||s.bottom==m.bottom&&s.right>m.right)m=s;H=a.display.showingTo)){var c=+new Date+a.options.workTime,d=wa(b.mode,Ra(a,b.frontier)),e=[],f;b.iter(b.frontier,Math.min(b.first+b.size,a.display.showingTo+500),function(g){if(b.frontier>= a.display.showingFrom){var h=g.styles;g.styles=Xc(a,g,d);for(var k=!h||h.length!=g.styles.length,l=0;!k&&lc)return Ka(a,a.options.workDelay),!0});e.length&&t(a,function(){for(var a=0;ab;--g){if(g<=f.first)return f.first;var h=u(f,g-1);if(h.stateAfter&&(!c||g<=f.frontier))return g;h=xa(h.text,null,a.options.tabSize);if(null==e||d>h)e=g-1,d=h}return e}function Ra(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=fe(a,b,c),g=f>d.first&&u(d,f-1).stateAfter,g=g?wa(d.mode,g):Zc(d.mode);d.iter(f,b,function(c){Yc(a,c,g);c.stateAfter=f==b-1||0==f%5||f>=e.showingFrom&&ff&&0==a&&(f=1)}e=a>c?"left":ac?g.left:g.right,top:g.top,bottom:g.bottom}}function ic(a,b){for(var c=a.display.measureLineCache,d=0;dr&&(c=r);0>b&&(b=0);for(var d=m.length-2;0<=d;d-=2){var e=m[d],f=m[d+ 1];if(!(e>c||f=c||b<=e&&c>=f||Math.min(c,f)-Math.max(b,e)>=c-b>>1)){m[d]=Math.min(b,e);m[d+1]=Math.max(c,f);break}}0>d&&(d=m.length,m.push(b,c));return{left:a.left-pb.left,right:a.right-pb.left,top:d,bottom:null}}function d(a){a.bottom=m[a.top+1];a.top=m[a.top]}var e=a.display,f=$c(b.text.length),g=fc(a,b,f,!0);if(B&&!ra&&!a.options.lineWrapping&&100q&&k;++q)E.appendChild(g.firstChild),--k;h.appendChild(E)}g.appendChild(h)}W(e.measure,g);var pb=y(e.lineDiv),m=[],h=$c(b.text.length),r=g.offsetHeight;Q&&e.measure.first!=g&&W(e.measure,g);for(l=0;lc.from?f(a-1):f(a,d)}d=d||u(a.doc,b.line);e||(e=hc(a,d));var h=V(d);b=b.ch;if(!h)return f(b);var k=mc(h,b),k=g(b,k);null!=ya&&(k.other=g(b,ya));return k}function ub(a,b,c,d){a=new r(a,b);a.xRel=d;c&&(a.outside=!0);return a}function nc(a,b,c){var d=a.doc;c+=a.display.viewOffset;if(0>c)return ub(d.first, 0,!0,-1);var e=Oa(d,c),f=d.first+d.size-1;if(e>f)return ub(d.first+d.size-1,u(d,f).text.length,!0,1);for(0>b&&(b=0);;){var f=u(d,e),e=ie(a,f,e,b,c),g=(f=nb(f))&&f.find();if(f&&(e.ch>g.from.ch||e.ch==g.from.ch&&0d.bottom)return d.left-k;if(gs)return ub(c,q,u,1);for(;;){if(n?q==e||q==oc(b,e,1):1>=q-e){n=dd?-1:d?1:0)}var C=Math.ceil(E/2),t=e+C;if(n)for(var t=e,v=0;vd){q=t;s=v;if(u=h)s+=1E3;E=C}else e=t,m=v,p=h,E-=C}}function sa(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==ja){ja=p("pre");for(var b=0;49>b;++b)ja.appendChild(document.createTextNode("x")),ja.appendChild(p("br")); ja.appendChild(document.createTextNode("x"))}W(a.measure,ja);b=ja.offsetHeight/50;3c.top+k.top?l=!0:c.bottom+k.top>(window.innerHeight||document.documentElement.clientHeight)&&(l= !1),null!=l&&!ke))){if(k="none"==d.cursor.style.display)d.cursor.style.display="",d.cursor.style.left=c.left+"px",d.cursor.style.top=c.top-d.viewOffset+"px";d.cursor.scrollIntoView(l);k&&(d.cursor.style.display="none")}b.selectionChanged&&sb(a);a.state.focused&&b.updateInput&&Y(a,b.userSelChange);c=b.maybeHiddenMarkers;d=b.maybeUnhiddenMarkers;if(c)for(l=0;l+new Date-id))Ya(b);else if(!X(c,b)&&!la(c.display,b)){var d=c.getSelection();b.dataTransfer.setData("Text",d);b.dataTransfer.setDragImage&&!uc&&(d=p("img",null,null,"position: fixed; left: 0; top: 0;"),S&&(d.width=d.height=1,c.display.wrapper.appendChild(d),d._top=d.offsetTop),b.dataTransfer.setDragImage(d,0,0),S&&d.parentNode.removeChild(d))}}), v(g.scroller,"dragenter",e),v(g.scroller,"dragover",e),v(g.scroller,"drop",t(a,oe)));v(g.scroller,"paste",function(b){la(g,b)||(N(a),Ua(a))});v(g.input,"paste",function(){if(K&&!(a.state.fakedLastChar||200>new Date-a.state.lastMiddleDown)){var b=g.input.selectionStart,c=g.input.selectionEnd;g.input.value+="$";g.input.selectionStart=b;g.input.selectionEnd=c;a.state.fakedLastChar=!0}a.state.pasteIncoming=!0;Ua(a)});v(g.input,"cut",f);v(g.input,"copy",f);Xb&&v(g.sizer,"mouseup",function(){document.activeElement== g.input&&g.input.blur();N(a)})}function la(a,b){for(var c=b.target||b.srcElement;c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function Za(a,b,c){var d=a.display;if(!c&&(c=b.target||b.srcElement,c==d.scrollbarH||c==d.scrollbarH.firstChild||c==d.scrollbarV||c==d.scrollbarV.firstChild||c==d.scrollbarFiller||c==d.gutterFiller))return null;var e,f,d=y(d.lineSpace);try{e=b.clientX,f=b.clientY}catch(g){return null}return nc(a,e-d.left,f-d.top)}function me(a){function b(a){if(!x(p, a))if(p=a,"single"==n)F(e.doc,s(g,k),a);else if(q=s(g,q),m=s(g,m),"double"==n){var b=sc(u(g,a.line).text,a);z(a,q)?F(e.doc,b.from,m):F(e.doc,q,b.to)}else"triple"==n&&(z(a,q)?F(e.doc,m,s(g,r(a.line,0))):F(e.doc,q,s(g,r(a.line+1,0))))}function c(a){var d=++qb,h=Za(e,a,!0);if(h)if(x(h,E)){var k=a.clientYw.bottom?20:0;k&&setTimeout(t(e,function(){qb==d&&(f.scroller.scrollTop+=k,c(a))}),50)}else{e.state.focused||ha(e);E=h;b(h);var l=ac(f,g);(h.line>=l.to||h.linel-400&&x(Ab.pos,k)?(n="triple",A(a),setTimeout(O(N,e),20),pe(e,k.line)):Bb&&Bb.time>l-400&&x(Bb.pos,k)?(n="double",Ab={time:l,pos:k},A(a),l=sc(u(g,k.line).text,k),F(e.doc,l.from,l.to)):Bb={time:l,pos:k};var E=k;if(!e.options.dragDrop||!qe||Va(e)||x(h.from,h.to)||z(k,h.from)||z(h.to,k)||"single"!=n){A(a);"single"==n&&F(e.doc,s(g,k));var q=h.from,m=h.to,p=k,w=y(f.wrapper),qb=0,C=t(e,function(a){B||jd(a)?c(a):d(a)}),D=t(e,d);v(document,"mousemove",C);v(document,"mouseup",D)}else{var J= t(e,function(b){K&&(f.scroller.draggable=!1);e.state.draggingText=!1;aa(document,"mouseup",J);aa(f.scroller,"drop",J);10>Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)&&(A(b),F(e.doc,k),N(e))});K&&(f.scroller.draggable=!0);e.state.draggingText=J;f.scroller.dragDrop&&f.scroller.dragDrop();v(document,"mouseup",J);v(f.scroller,"drop",J)}}else(a.target||a.srcElement)==f.scroller&&A(a)}}}function ed(a,b){var c=a.display;try{var d=b.clientX,e=b.clientY}catch(f){return!1}if(d>=Math.floor(y(c.gutters).right))return!1; A(b);if(!ba(a,"gutterClick"))return!0;var g=y(c.lineDiv);if(e>g.bottom)return!0;e-=g.top-c.viewOffset;for(g=0;g=d){c=Oa(a.doc,e);M(a,"gutterClick",a,c,a.options.gutters[g],b);break}}return!0}function oe(a){var b=this;if(!(X(b,a)||la(b.display,a)||b.options.onDragEvent&&b.options.onDragEvent(b,Xa(a)))){A(a);B&&(id=+new Date);var c=Za(b,a,!0),d=a.dataTransfer.files;if(c&&!Va(b))if(d&&d.length&&window.FileReader&&window.File){var e= d.length,f=Array(e),g=0;a=function(a,d){var h=new FileReader;h.onload=function(){f[d]=h.result;++g==e&&(c=s(b.doc,c),Ca(b.doc,{from:c,to:c,text:ka(f.join("\n")),origin:"paste"},"around"))};h.readAsText(a)};for(var h=0;hMath.abs(a.doc.scrollTop-b)||(a.doc.scrollTop=b,Da||ob(a,[],b),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbarV.scrollTop!=b&&(a.display.scrollbarV.scrollTop=b),Da&&ob(a,[]),Ka(a,100))}function Ba(a,b,c){(c?b==a.doc.scrollLeft:2>Math.abs(a.doc.scrollLeft-b))||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,Yb(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft= b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function gd(a,b){var c=b.wheelDeltaX,d=b.wheelDeltaY;null==c&&b.detail&&b.axis==b.HORIZONTAL_AXIS&&(c=b.detail);null==d&&b.detail&&b.axis==b.VERTICAL_AXIS?d=b.detail:null==d&&(d=b.wheelDelta);var e=a.display,f=e.scroller;if(c&&f.scrollWidth>f.clientWidth||d&&f.scrollHeight>f.clientHeight){if(d&&va&&K)for(var g=b.target;g!=f;g=g.parentNode)if(g.lineObj){a.display.currentWheelTarget=g;break}if(!c||Da||S||null==T){if(d&&null!= T){var g=d*T,h=a.doc.scrollTop,k=h+e.wrapper.clientHeight;0>g?h=Math.max(0,h+g-50):k=Math.min(a.doc.height,k+g+50);ob(a,[],{top:h,bottom:k})}20>Cb&&(null==e.wheelStartX?(e.wheelStartX=f.scrollLeft,e.wheelStartY=f.scrollTop,e.wheelDX=c,e.wheelDY=d,setTimeout(function(){if(null!=e.wheelStartX){var a=f.scrollLeft-e.wheelStartX,b=f.scrollTop-e.wheelStartY,a=b&&e.wheelDY&&b/e.wheelDY||a&&e.wheelDX&&a/e.wheelDX;e.wheelStartX=e.wheelStartY=null;a&&(T=(T*Cb+a)/(Cb+1),++Cb)}},200)):(e.wheelDX+=c,e.wheelDY+= d))}else d&&$a(a,Math.max(0,Math.min(f.scrollTop+d*T,f.scrollHeight-f.clientHeight))),Ba(a,Math.max(0,Math.min(f.scrollLeft+c*T,f.scrollWidth-f.clientWidth))),A(b),e.wheelStartX=null}}function Db(a,b,c){if("string"==typeof b&&(b=vc[b],!b))return!1;a.display.pollingFast&&rc(a)&&(a.display.pollingFast=!1);var d=a.doc,e=d.sel.shift,f=!1;try{Va(a)&&(a.state.suppressEdits=!0),c&&(d.sel.shift=!1),f=b(a)!=kd}finally{d.sel.shift=e,a.state.suppressEdits=!1}return f}function ld(a){var b=a.state.keyMaps.slice(0); a.options.extraKeys&&b.push(a.options.extraKeys);b.push(a.options.keyMap);return b}function md(a,b){var c=wc(a.options.keyMap),d=c.auto;clearTimeout(nd);d&&!od(b)&&(nd=setTimeout(function(){wc(a.options.keyMap)==c&&(a.options.keyMap=d.call?d.call(null,a):d,Uc(a))},50));var e=pd(b,!0),f=!1;if(!e)return!1;f=ld(a);if(f=b.shiftKey?ab("Shift-"+e,f,function(b){return Db(a,b,!0)})||ab(e,f,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return Db(a,b)}):ab(e,f,function(b){return Db(a,b)}))A(b), sb(a),Q&&(b.oldKeyCode=b.keyCode,b.keyCode=0),M(a,"keyHandled",a,e,b);return f}function re(a,b,c){var d=ab("'"+c+"'",ld(a),function(b){return Db(a,b,!0)});d&&(A(b),sb(a),M(a,"keyHandled",a,"'"+c+"'",b));return d}function hd(a){this.state.focused||ha(this);if(!(X(this,a)||this.options.onKeyEvent&&this.options.onKeyEvent(this,Xa(a)))){B&&27==a.keyCode&&(a.returnValue=!1);var b=a.keyCode;this.doc.sel.shift=16==b||a.shiftKey;var c=md(this,a);S&&(xc=c?b:null,!c&&88==b&&!cd&&(va?a.metaKey:a.ctrlKey)&&this.replaceSelection(""))}} function ne(a){var b=this;if(!(X(b,a)||b.options.onKeyEvent&&b.options.onKeyEvent(b,Xa(a)))){var c=a.keyCode,d=a.charCode;S&&c==xc?(xc=null,A(a)):(S&&(!a.which||10>a.which)||Xb)&&md(b,a)||(c=String.fromCharCode(null==d?c:d),this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Va(this)&&-1b++?yc=setTimeout(d,500): Y(a)};yc=setTimeout(d,200)}}if(!X(a,b,"contextmenu")){var e=a.display,f=a.doc.sel;if(!la(e,b)){var g=Za(a,b),h=e.scroller.scrollTop;if(g&&!S){(x(f.from,f.to)||z(g,f.from)||!z(g,f.to))&&t(a,ea)(a.doc,g,g);var k=e.input.style.cssText;e.inputDiv.style.position="absolute";e.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(b.clientY-5)+"px; left: "+(b.clientX-5)+"px; z-index: 1000; background: white; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);"; N(a);Y(a,!0);x(f.from,f.to)&&(e.input.value=e.prevInput=" ");B&&!Q&&c();if(tc){Ya(b);var l=function(){aa(window,"mouseup",l);setTimeout(d,20)};v(window,"mouseup",l)}else setTimeout(d,50)}}}}function qd(a,b,c){if(!z(b.from,c))return s(a,c);var d=b.text.length-1-(b.to.line-b.from.line);if(c.line>b.to.line+d)return b=c.line-d,d=a.first+a.size-1,b>d?r(d,u(a,d).text.length):Fb(c,u(a,b).text.length);if(c.line==b.to.line+d)return Fb(c,L(b.text).length+(1==b.text.length?b.from.ch:0)+u(a,b.to.line).text.length- b.to.ch);a=c.line-b.from.line;return Fb(c,b.text[a].length+(a?0:b.from.ch))}function zc(a,b,c){if(c&&"object"==typeof c)return{anchor:qd(a,b,c.anchor),head:qd(a,b,c.head)};if("start"==c)return{anchor:b.from,head:b.from};var d=Ac(b);if("around"==c)return{anchor:b.from,head:d};if("end"==c)return{anchor:d,head:d};c=function(a){if(z(a,b.from))return a;if(!z(b.to,a))return d;var c=a.line+b.text.length-(b.to.line-b.from.line)-1,g=a.ch;a.line==b.to.line&&(g+=d.ch-b.to.ch);return r(c,g)};return{anchor:c(a.sel.anchor), head:c(a.sel.head)}}function rd(a,b,c){b={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};c&&(b.update=function(b,c,f,g){b&&(this.from=s(a,b));c&&(this.to=s(a,c));f&&(this.text=f);void 0!==g&&(this.origin=g)});J(a,"beforeChange",a,b);a.cm&&J(a.cm,"beforeChange",a.cm,b);return b.canceled?null:{from:b.from,to:b.to,text:b.text,origin:b.origin}}function Ca(a,b,c,d){if(a.cm){if(!a.cm.curOp)return t(a.cm,Ca)(a,b,c,d);if(a.cm.state.suppressEdits)return}if(ba(a, "beforeChange")||a.cm&&ba(a.cm,"beforeChange"))if(b=rd(a,b,!0),!b)return;if(d=sd&&!d&&se(a,b.from,b.to)){for(var e=d.length-1;1<=e;--e)Bc(a,{from:d[e].from,to:d[e].to,text:[""]});d.length&&Bc(a,{from:d[0].from,to:d[0].to,text:b.text},c)}else Bc(a,b,c)}function Bc(a,b,c){c=zc(a,b,c);td(a,b,c,a.cm?a.cm.curOp.id:NaN);bb(a,b,c,Cc(a,b));var d=[];Ea(a,function(a,c){c||-1!=ca(d,a.history)||(ud(a.history,b),d.push(a.history));bb(a,b,null,Cc(a,b))})}function vd(a,b){if(!a.cm||!a.cm.state.suppressEdits){var c= a.history,d=("undo"==b?c.done:c.undone).pop();if(d){var e={changes:[],anchorBefore:d.anchorAfter,headBefore:d.headAfter,anchorAfter:d.anchorBefore,headAfter:d.headBefore,generation:c.generation};("undo"==b?c.undone:c.done).push(e);c.generation=d.generation||++c.maxGeneration;for(var f=ba(a,"beforeChange")||a.cm&&ba(a.cm,"beforeChange"),g=d.changes.length-1;0<=g;--g){var h=d.changes[g];h.origin=b;if(f&&!rd(a,h,!1)){("undo"==b?c.done:c.undone).length=0;break}e.changes.push(Dc(a,h));var k=g?zc(a,h,null): {anchor:d.anchorBefore,head:d.headBefore};bb(a,h,k,wd(a,h));var l=[];Ea(a,function(a,b){b||-1!=ca(l,a.history)||(ud(a.history,h),l.push(a.history));bb(a,h,null,wd(a,h))})}}}}function xd(a,b){function c(a){return r(a.line+b,a.ch)}a.first+=b;a.cm&&D(a.cm,a.first,a.first,b);a.sel.head=c(a.sel.head);a.sel.anchor=c(a.sel.anchor);a.sel.from=c(a.sel.from);a.sel.to=c(a.sel.to)}function bb(a,b,c,d){if(a.cm&&!a.cm.curOp)return t(a.cm,bb)(a,b,c,d);if(b.to.linea.lastLine())){if(b.from.linee&&(b={from:b.from,to:r(e,u(a,e).text.length),text:[b.text[0]],origin:b.origin});b.removed=Ec(a,b.from,b.to);c||(c=zc(a,b,null));a.cm?te(a.cm,b,d,c):Fc(a,b,d,c)}}function te(a,b,c,d){var e=a.doc,f=a.display,g=b.from,h=b.to,k=!1,l=g.line;a.options.lineWrapping||(l=P($(e,u(e,g.line))), e.iter(l,h.line+1,function(a){if(a==f.maxLine)return k=!0}));z(e.sel.head,b.from)||z(b.to,e.sel.head)||(a.curOp.cursorActivity=!0);Fc(e,b,c,d,Rc(a));a.options.lineWrapping||(e.iter(l,g.line+b.text.length,function(a){var b=mb(e,a);b>f.maxLineLength&&(f.maxLine=a,f.maxLineLength=b,f.maxLineChanged=!0,k=!1)}),k&&(a.curOp.updateMaxLine=!0));e.frontier=Math.min(e.frontier,g.line);Ka(a,400);D(a,g.line,h.line+1,b.text.length-(h.line-g.line)-1);if(ba(a,"change"))if(b={from:g,to:h,text:b.text,removed:b.removed, origin:b.origin},a.curOp.textChanged){for(a=a.curOp.textChanged;a.next;a=a.next);a.next=b}else a.curOp.textChanged=b}function fa(a,b,c,d,e){d||(d=c);if(z(d,c)){var f=d;d=c;c=f}"string"==typeof b&&(b=ka(b));Ca(a,{from:c,to:d,text:b,origin:e},null)}function r(a,b){if(!(this instanceof r))return new r(a,b);this.line=a;this.ch=b}function x(a,b){return a.line==b.line&&a.ch==b.ch}function z(a,b){return a.linec?r(c,u(a,c).text.length):Fb(b,u(a,b.line).text.length)}function Fb(a,b){var c=a.ch;return null==c||c>b?r(a.line,b):0>c?r(a.line,0):a}function Fa(a,b){return b>=a.first&&b=f.ch:l.to>f.ch))){if(d&&(J(n,"beforeCursorEnter"),n.explicitlyCleared))if(h.markedSpans){--k;continue}else break;if(n.atomic){k=n.find()[0>g?"from":"to"];if(x(k, f)&&(k.ch+=g,0>k.ch?k=k.line>a.first?s(a,r(k.line-1)):null:k.ch>h.text.length&&(k=k.linec&&(c=0);var h=f.scroller.clientHeight-qa,k=f.scroller.scrollTop,l={};a=a.doc.height+(f.mover.offsetHeight-f.lineSpace.offsetHeight);var n=ca-g;ck+h&&(c=Math.min(c,(g?a:e)-h),c!=k&&(l.scrollTop=c));k=f.scroller.clientWidth-qa;c=f.scroller.scrollLeft;b+=f.gutters.offsetWidth;d+=f.gutters.offsetWidth;f=f.gutters.offsetWidth;e=b k+c-3&&(l.scrollLeft=d+10-k);return l}function Hb(a,b,c){a.curOp.updateScrollPos={scrollLeft:null==b?a.doc.scrollLeft:b,scrollTop:null==c?a.doc.scrollTop:c}}function Gc(a,b,c){var d=a.curOp.updateScrollPos||(a.curOp.updateScrollPos={scrollLeft:a.doc.scrollLeft,scrollTop:a.doc.scrollTop});a=a.display.scroller;d.scrollTop=Math.max(0,Math.min(a.scrollHeight-a.clientHeight,d.scrollTop+c));d.scrollLeft=Math.max(0,Math.min(a.scrollWidth-a.clientWidth,d.scrollLeft+b))}function Eb(a,b,c,d){var e=a.doc;null== c&&(c="add");if("smart"==c)if(a.doc.mode.indent)var f=Ra(a,b);else c="prev";var g=a.options.tabSize,h=u(e,b),k=xa(h.text,null,g),l=h.text.match(/^\s*/)[0],n;if("smart"==c&&(n=a.doc.mode.indent(f,h.text.slice(l.length),h.text),n==kd)){if(!d)return;c="prev"}"prev"==c?n=b>e.first?xa(u(e,b-1).text,null,g):0:"add"==c?n=k+a.options.indentUnit:"subtract"==c?n=k-a.options.indentUnit:"number"==typeof c&&(n=k+c);n=Math.max(0,n);c="";d=0;if(a.options.indentWithTabs)for(e=Math.floor(n/g);e;--e)d+=g,c+="\t";d< n&&(c+=zd(n-d));c!=l&&fa(a.doc,c,r(b,0),r(b,l.length),"+input");h.stateAfter=null}function Ib(a,b,c){var d=b,e=b,f=a.doc;"number"==typeof b?e=u(f,Math.max(f.first,Math.min(b,f.first+f.size-1))):d=P(b);if(null!=d&&c(e,d))D(a,d,d+1);else return null;return e}function Hc(a,b,c,d,e){function f(b){var d=(e?oc:Ad)(k,h,c,!0);if(null==d){if(b=!b)b=g+c,b=a.first+a.size?b=l=!1:(g=b,b=k=u(a,b));if(b)h=e?(0>c?wb:vb)(k):0>c?k.text.length:0;else return l=!1}else h=d;return!0}var g=b.line,h=b.ch;b=c; var k=u(a,g),l=!0;if("char"==d)f();else if("column"==d)f(!0);else if("word"==d||"group"==d){var n=null;d="group"==d;for(var E=!0;!(0>c)||f(!E);E=!1){var q=k.text.charAt(h)||"\n",q=cb(q)?"w":d?/\s/.test(q)?null:"p":null;if(n&&n!=q){0>c&&(c=1,f());break}q&&(n=q);if(0 c?1.5:0.5)*sa(a.display))):"line"==d&&(g=0c?0>=g:g>=e.height){h.hitSide=!0;break}g+=5*c}return h}function sc(a,b){var c=b.ch,d=b.ch;if(a){(0>b.xRel||d==a.length)&&c?--c:++d;for(var e=a.charAt(c),e=cb(e)?cb:/\s/.test(e)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!cb(a)};0=e:l.to>e);(k||(k=[])).push({from:l.from,to:E?null:l.to,marker:n})}}c=k;if(d)for(var h=0,m;h=f:k.to>f)||"bookmark"==l.type&&k.from==f&&(!g||k.marker.insertLeft))n=null==k.from||(l.inclusiveLeft?k.from<=f:k.fromb)&&(!d||d.widtha.options.maxHighlightLength?(f=!1,k.pos=Math.min(b.length,k.start+5E4),l=null):l=c.token(k,d),f&&h==l||(ga&&d.splice(f,1,a,d[f+1],n);f+=2;g=Math.min(a,n)}if(b)if(e.opaque)d.splice(c,f-c,a,b),f=c+2;else for(;cq)?(null!=A.to&&v>A.to&&(v=A.to,w=""),F.className&&(C+=" "+F.className),F.startStyle&&A.from==q&&(x+=" "+F.startStyle),F.endStyle&&A.to==v&&(w+=" "+F.endStyle),F.title&&!y&&(y=F.title),F.collapsed&&(!G||G.marker.sizeq&&v>A.from&&(v=A.from);"bookmark"==F.type&&A.from==q&&F.replacedWith&& z.push(F)}if(G&&(G.from||0)==q&&(Ld(e,(null==G.to?m:G.to)-q,G.marker,null==G.from),null==G.to)){e=G.marker.find();break a}if(!G&&z.length)for(D=0;D=m)break;for(z=Math.min(m,v);;){if(s){D=q+s.length;G||(A=D>z?s.slice(0,z-q):s,e.addToken(e,A,t?t+C:C,x,q+A.length==v?w:"",y));if(D>=z){s=s.slice(z-q);q=z;break}q=D;x=""}s=l.slice(n,n=h[r++]);t=Id(h[r++])}}else for(var r=1;rh&&gf-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))){var h=L(g.changes);x(b.from,b.to)&&x(b.from,h.to)?h.to=Ac(b):g.changes.push(Dc(a,b));g.anchorAfter=c.anchor;g.headAfter=c.head}else for(g={changes:[Dc(a,b)],generation:e.generation,anchorBefore:a.sel.anchor,headBefore:a.sel.head,anchorAfter:c.anchor,headAfter:c.head},e.done.push(g),e.generation= ++e.maxGeneration;e.done.length>e.undoDepth;)e.done.shift();e.lastTime=f;e.lastOp=d;e.lastOrigin=b.origin}function ve(a){if(!a)return null;for(var b=0,c;b=b.offsetWidth&&2b||b==c&&g.to==b)d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0}e||d(b,c,"ltr")}function kc(a){return a.level%2?a.to:a.from}function lc(a){return a.level%2?a.from:a.to}function vb(a){return(a=V(a))?kc(a[0]):0}function wb(a){var b=V(a);return b?lc(L(b)):a.text.length}function Rd(a,b){var c=u(a.doc,b),d=$(a.doc,c);d!=c&&(b=P(d));d=(c=V(d))?c[0].level%2?wb(d):vb(d):0;return r(b, d)}function De(a,b){for(var c,d;c=nb(d=u(a.doc,b));)b=c.find().to.line;d=(c=V(d))?c[0].level%2?vb(d):wb(d):d.text.length;return r(b,d)}function mc(a,b){for(var c=0,d;cb)return ya=null,c;if(e.from==b||e.to==b)if(null==d)d=c;else{var e=e.level,f=a[d].level,g=a[0].level,e=e==g?!0:f==g?!1:eg.from&&bb||b>a.text.length?null:b}var Da=/gecko\/\d/i.test(navigator.userAgent),B=/MSIE \d/.test(navigator.userAgent),ra=B&&(null==document.documentMode|| 8>document.documentMode),Q=B&&(null==document.documentMode||9>document.documentMode),K=/WebKit\//.test(navigator.userAgent),Ee=K&&/Qt\/\d+\.\d+/.test(navigator.userAgent),Fe=/Chrome\//.test(navigator.userAgent),S=/Opera\//.test(navigator.userAgent),uc=/Apple Computer/.test(navigator.vendor),Xb=/KHTML\//.test(navigator.userAgent),Vd=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),Wd=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),ke=/PhantomJS/.test(navigator.userAgent),Ia=/AppleWebKit/.test(navigator.userAgent)&& /Mobile\/\w+/.test(navigator.userAgent),Tb=Ia||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),va=Ia||/Mac/.test(navigator.platform),Ge=/win/i.test(navigator.platform),oa=S&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);oa&&(oa=Number(oa[1]));oa&&15<=oa&&(S=!1,K=!0);var Cd=va&&(Ee||S&&(null==oa||12.11>oa)),tc=Da||B&&!Q,sd=!1,Pa=!1,ja,je=0,Bb,Ab,id=0,Cb=0,T=null;B?T=-0.53:Da?T=15:Fe?T=-0.7:uc&&(T=-1/3);var nd,xc=null,yc,Ac=m.changeEnd=function(a){return a.text? r(a.from.line+a.text.length-1,L(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};m.Pos=r;m.prototype={constructor:m,focus:function(){window.focus();N(this);ha(this);Ua(this)},setOption:function(a,b){var c=this.options,d=c[a];if(c[a]!=b||"mode"==a)c[a]=b,pa.hasOwnProperty(a)&&t(this,pa[a])(this,b,d)},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](a)},removeKeyMap:function(a){for(var b=this.state.keyMaps, c=0;c>1;if((e?b[2*e-1]:0)>=a)d=e;else if(b[2*e+1]d&&(a=d,c=!0);d=u(this.doc,a);return jc(this,u(this.doc,a),{top:0,left:0},b||"page").top+(c?d.height:0)},defaultTextHeight:function(){return sa(this.display)},defaultCharWidth:function(){return Sc(this.display)},setGutterMarker:t(null,function(a,b,c){return Ib(this,a,function(a){var e= a.gutterMarkers||(a.gutterMarkers={});e[b]=c;!c&&Qd(e)&&(a.gutterMarkers=null);return!0})}),clearGutter:t(null,function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,D(b,d,d+1),Qd(c.gutterMarkers)&&(c.gutterMarkers=null));++d})}),addLineClass:t(null,function(a,b,c){return Ib(this,a,function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[e]){if(RegExp("(?:^|\\s)"+c+"(?:$|\\s)").test(a[e]))return!1;a[e]+=" "+ c}else a[e]=c;return!0})}),removeLineClass:t(null,function(a,b,c){return Ib(this,a,function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",f=a[e];if(f)if(null==c)a[e]=null;else{var g=f.match(RegExp("(?:^|\\s+)"+c+"(?:$|\\s+)"));if(!g)return!1;var h=g.index+g[0].length;a[e]=f.slice(0,g.index)+(g.index&&h!=f.length?" ":"")+f.slice(h)||null}else return!1;return!0})}),addLineWidget:t(null,function(a,b,c){return we(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"== typeof a){if(!Fa(this.doc,a))return null;var b=a;a=u(this.doc,a);if(!a)return null}else if(b=P(a),null==b)return null;return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=U(this,s(this.doc,a));var g=a.bottom,h=a.left;b.style.position="absolute";f.sizer.appendChild(b); if("over"==d)g=a.top;else if("above"==d||"near"==d){var k=Math.max(f.wrapper.clientHeight,this.doc.height),l=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>k)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=k&&(g=a.bottom);h+b.offsetWidth>l&&(h=l-b.offsetWidth)}b.style.top=g+"px";b.style.left=b.style.right="";"right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/ 2),b.style.left=h+"px");c&&(a=yb(this,h,g,h+b.offsetWidth,g+b.offsetHeight),null!=a.scrollTop&&$a(this,a.scrollTop),null!=a.scrollLeft&&Ba(this,a.scrollLeft))},triggerOnKeyDown:t(null,hd),execCommand:function(a){return vc[a](this)},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);var f=0;for(a=s(this.doc,a);fa?c.from:c.to;F(this.doc,c,c,a)}),deleteH:t(null,function(a,b){var c=this.doc.sel;x(c.from,c.to)?fa(this.doc,"",c.from,Hc(this.doc,c.head,a,b,!1),"+delete"):fa(this.doc,"",c.from,c.to,"+delete");this.curOp.userSelChange=!0}),findPosV:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);var f=0;for(a=s(this.doc,a);f=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.posb},eatSpace:function(){for(var a= this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){a=this.string.indexOf(a,this.pos);if(-1a.display.maxLineLength&&(a.display.maxLine=f,a.display.maxLineLength=g,a.display.maxLineChanged=!0);null!=c&&a&&D(a,c,d+1);this.lines.length=0;this.explicitlyCleared=!0;this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&yd(a));b&&Aa(a)}};ga.prototype.find=function(){for(var a,b,c=0;c=b.display.showingFrom&&a.linethis.size-b&&(c=[],this.collapse(c),this.children=[new Mb(c)],this.children[0].parent=this)},collapse:function(a){for(var b=0,c=this.children.length;b=this.children.length)){var a=this;do{var b=a.children.splice(a.children.length-5,5),b=new hb(b);if(a.parent){a.size-=b.size;a.height-=b.height;var c=ca(a.parent.children,a);a.parent.children.splice(c+1,0,b)}else c=new hb(a.children),c.parent= a,a.children=[c,b],a=c;b.parent=a.parent}while(10=a.ch)&&b.push(e.marker.parent||e.marker)}return b},getAllMarks:function(){var a=[];this.iter(function(b){if(b=b.markedSpans)for(var c=0;ca)return b=a,!0;a-=d;++c});return s(this,r(c,b))},indexFromPos:function(a){a=s(this,a);var b=a.ch;if(a.linea.ch)return 0;this.iter(this.first,a.line,function(a){b+=a.text.length+1});return b},copy:function(a){var b=new I(Kc(this,this.first,this.first+this.size),this.modeOption,this.first);b.scrollTop=this.scrollTop;b.scrollLeft=this.scrollLeft;b.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:!1,goalColumn:this.sel.goalColumn}; a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory()));return b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from);null!=a.to&&a.toca(Ie,lb)&&(m.prototype[lb]=function(a){return function(){return a.apply(this.doc,arguments)}}(I.prototype[lb]));Ha(I);m.e_stop=Ya;m.e_preventDefault=A;m.e_stopPropagation=Od;var da,xb=0;m.on=v;m.off=aa;m.signal=J;var qa=30,kd=m.Pass={toString:function(){return"CodeMirror.Pass"}};Ub.prototype={set:function(a,b){clearTimeout(this.id);this.id=setTimeout(b,a)}};m.countColumn=xa;var Qb=[""],Ce=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,pc=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/; m.replaceGetRect=function(a){y=a};var qe=function(){if(Q)return!1;var a=p("div");return"draggable"in a||"dragDrop"in a}();Da?Lb=function(a,b){return 36==a.charCodeAt(b-1)&&39==a.charCodeAt(b)}:uc&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)?Lb=function(a,b){return/\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(a.slice(b-1,b+1))}:K&&!/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)&&(Lb=function(a,b){if(1,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(a.slice(b-1,b+1))});var Wa,Lc,ka=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)}; m.splitLines=ka;var le=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},cd=function(){var a=p("div");if("oncopy"in a)return!0;a.setAttribute("oncopy","return;");return"function"==typeof a.oncopy}(),na={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc", 32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};m.keyNames=na;(function(){for(var a=0;10>a;a++)na[a+48]=String(a);for(a=65;90>= a;a++)na[a]=String.fromCharCode(a);for(a=1;12>=a;a++)na[a+111]=na[a+63235]="F"+a})();var ya,ze=function(){function a(a){return 255>=a?b.charAt(a):1424<=a&&1524>=a?"R":1536<=a&&1791>=a?c.charAt(a-1536):1792<=a&&2220>=a?"r":"L"}var b="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",c="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr", d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/;return function(b){if(!d.test(b))return!1;for(var c=b.length,n=[],m=0,q;m>t<'footer'p<'clear'>>", + //bProcessing : false, + bStateSave: true, + sPaginationType: "full_numbers", + bAutoWidth: false, + bSort: false, + oLanguage: { + "sSearch": "", + "oPaginate": { + "sFirst": "≪", + "sLast": "≫", + "sNext": ">", + "sPrevious": "<" + } + }, + fnDrawCallback: function() { + jQuery('.add-license-btn').each(function() { + var link = jQuery(this).attr('link'); + var extension = jQuery(this).attr('extension'); + + jQuery(this).bind('click', function(event) { + event.preventDefault(); + + jQuery('.license-error-list').hide(); + //show the dialog + jQuery('#install_license').dialog({ + resizable: false, + height: 'auto', + width: '30%', + modal: true, + buttons: [ + { + text: 'Purchase', + icons: {primary: "ui-icon-cart"}, + click: function() { + window.open(link, '_blank'); + } + }, + { + text: 'Install', + icons: {primary: "ui-icon-check"}, + click: function() { + var license = jQuery.trim( + jQuery('#license_key').val() + ); + + if (license) { + //add loader + jQuery('#install_license').append(jQuery('
          ', { + 'class' : 'loading-extension' + })); + + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: { + action: 'aam', + sub_action: 'installLicense', + extension: extension, + license: license, + _ajax_nonce: aamLocal.nonce + }, + success: function(response) { + if (response.status === 'success') { + location.reload(); + } else { + showErrorMessage( + response.reasons, + '#install_license .license-error-list' + ); + jQuery('#license_key').effect('highlight', 2000); + } + }, + error: function() { + var reasons = new Array(); + reasons.push('Unexpected Application Error'); + showErrorMessage( + reasons, + '#install_license .license-error-list' + ); + jQuery('#license_key').effect('highlight', 2000); + }, + complete: function(){ + jQuery('.loading-extension', '#install_license').remove(); + } + }); + } else { + jQuery('#license_key').effect('highlight', 2000); + } + } + }, + { + text: 'Close', + icons: {primary: "ui-icon-close"}, + click: function() { + jQuery(this).dialog('close'); + } + } + ] + }); + }); + }); + jQuery('.view-license-btn').each(function() { + jQuery(this).bind('click', function(event) { + event.preventDefault(); + + var license = jQuery(this).attr('license'); + var extension = jQuery(this).attr('extension'); + var dialog = this; + + jQuery('#installed_license_key').html( + (license ? license : 'undefined') + ); + jQuery('.license-error-list').hide(); + + //show the dialog + jQuery('#update_license').dialog({ + resizable: false, + height: 'auto', + width: '25%', + modal: true, + buttons: [ + { + text: 'Remove', + icons: {primary: "ui-icon-trash"}, + click: function() { + jQuery.ajax(aamLocal.ajaxurl, { + type: 'POST', + dataType: 'json', + data: { + action: 'aam', + sub_action: 'removeLicense', + extension: extension, + license: license, + _ajax_nonce: aamLocal.nonce + }, + success: function(response) { + if (response.status === 'success') { + location.reload(); + } else { + showErrorMessage( + response.reasons, + '#update_license .license-error-list' + ); + jQuery(dialog).dialog('close'); + } + }, + complete: function() { + jQuery(dialog).dialog('close'); + } + }); + } + }, + { + text: 'Close', + icons: {primary: "ui-icon-close"}, + click: function() { + jQuery(this).dialog('close'); + } + } + ] + }); + }); + }); + } + }); + + initTooltip('#aam'); + +}); + +/** + * Initialize tooltip for selected area + * + * @param {String} selector + * + * @returns {void} + * + * @access public + */ +function initTooltip(selector) { + jQuery('[tooltip]', selector).hover(function() { + // Hover over code + var title = jQuery(this).attr('tooltip'); + jQuery(this).data('tipText', title).removeAttr('tooltip'); + jQuery('
          ', { + 'class': 'aam-tooltip' + }).text(title).appendTo('body').fadeIn('slow'); + }, function() { + //Hover out code + jQuery(this).attr('tooltip', jQuery(this).data('tipText')); + jQuery('.aam-tooltip').remove(); + }).mousemove(function(e) { + jQuery('.aam-tooltip').css({ + top: e.pageY + 15, //Get Y coordinates + left: e.pageX + 15 //Get X coordinates + }); + }); +} + +/** + * Display error list + * + * @param {Array} reasons + * + * @returns void + */ +function showErrorMessage(reasons, container){ + jQuery(container).empty(); + for(var i in reasons){ + jQuery(container).append(jQuery('
        • ').html(reasons[i])); + } + jQuery(container).show(); +} \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/js/jquery.dt.js b/wp-content/plugins/advanced-access-manager/media/js/jquery.dt.js new file mode 100644 index 0000000..02694a4 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/js/jquery.dt.js @@ -0,0 +1,155 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.9.4 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2012 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file 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 license files for details. + */ +(function(X,l,n){var L=function(h){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d], +c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;m(a,d,null)}function m(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),h.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var i=d.mRender?Q(d.mRender):null,f=Q(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?i(c,b,a):c};d.fnSetData= +L(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1== +h.inArray("asc",d.asSorting)&&-1!=h.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;da(a);for(var b=0,c=a.aoColumns.length;bj[f])d(a.aoColumns.length+j[f],b[i]);else if("string"===typeof j[f]){e=0;for(w=a.aoColumns.length;eb&&a[d]--; -1!=c&&a.splice(c,1)}function S(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},v(a,b,c,"display"))}function ea(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&& +(c.nTr.className=c._aData.DT_RowClass);for(var i=0,f=a.aoColumns.length;i=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,y(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g= +a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g
        • ")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('
          ')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),i,f,g,e,w,o,k,m=0;m
          ")[0];w=d[m+ +1];if("'"==w||'"'==w){o="";for(k=2;d[m+k]!=w;)o+=d[m+k],k++;"H"==o?o=a.oClasses.sJUIHeader:"F"==o&&(o=a.oClasses.sJUIFooter);-1!=o.indexOf(".")?(w=o.split("."),e.id=w[0].substr(1,w[0].length-1),e.className=w[1]):"#"==o.charAt(0)?e.id=o.substr(1,o.length-1):e.className=o;m+=k}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)i=ya(a),f=1;else if("f"==g&&a.oFeatures.bFilter)i=za(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)i=Aa(a),f= +1;else if("t"==g)i=Ba(a),f=1;else if("i"==g&&a.oFeatures.bInfo)i=Ca(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)i=Da(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;k=0;for(w=e.length;k'):""===c?'':c+' ',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"""));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value, +g=0,e=c.length;g=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||i.sSearch.length>b.length||1==c||0!==b.indexOf(i.sSearch)){a.aiDisplay.splice(0, +a.aiDisplay.length);la(a,1);for(b=0;b").html(c).text()); +return c.replace(/[\n\r]/g," ")}function ma(a,b,c,d){if(c)return a=b?a.split(" "):oa(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:oa(a);return RegExp(a,d?"i":"")}function Ja(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function oa(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"), +"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:Ka,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ka(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),i=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f?b.sInfoEmpty:b.sInfo;f!=i&&(g+=" "+b.sInfoFiltered);g+=b.sInfoPostFix;g=ja(a,g); +null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,i,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d,i=a.aLengthMenu;if(2==i.length&&"object"===typeof i[0]&&"object"===typeof i[1]){c=0;for(d=i[0].length;c'+i[1][c]+""}else{c=0;for(d=i.length;c'+i[c]+""}b+="";i=l.createElement("div");a.aanFeatures.l|| +(i.id=a.sTableId+"_length");i.className=a.oClasses.sLength;i.innerHTML="";h('select option[value="'+a._iDisplayLength+'"]',i).attr("selected",!0);h("select",i).bind("change.DT",function(){var b=h(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;ca.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a, +b,function(a){y(a);x(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){y(a);x(a)})},sName:"pagination"});return b}function qa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart= +0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLengthh(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width= +q(a.oScroll.sXInner):i==h(d).width()&&h(d).height()i-a.oScroll.iBarWidth&&(a.nTable.style.width=q(i))):a.nTable.style.width=q(i);i=h(a.nTable).outerWidth();C(s,e);C(function(a){p.push(q(h(a).width()))},e);C(function(a,b){a.style.width=p[b]},g);h(e).height(0);null!==a.nTFoot&&(C(s,j),C(function(a){n.push(q(h(a).width()))},j),C(function(a,b){a.style.width=n[b]},o),h(j).height(0));C(function(a,b){a.innerHTML= +"";a.style.width=p[b]},e);null!==a.nTFoot&&C(function(a,b){a.innerHTML="";a.style.width=n[b]},j);if(h(a.nTable).outerWidth()d.offsetHeight||"scroll"==h(d).css("overflow-y")?i+a.oScroll.iBarWidth:i;if(r&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(g-a.oScroll.iBarWidth);d.style.width=q(g);a.nScrollHead.style.width=q(g);null!==a.nTFoot&&(a.nScrollFoot.style.width=q(g));""===a.oScroll.sX?D(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."): +""!==a.oScroll.sXInner&&D(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),a.nScrollHead.style.width=q("100%"),null!==a.nTFoot&&(a.nScrollFoot.style.width=q("100%"));""===a.oScroll.sY&&r&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),r=""!==a.oScroll.sX&&a.nTable.offsetWidth> +d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeightd.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";null!==a.nTFoot&&(R.style.width=q(r),l.style.width=q(r),l.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function C(a,b,c){for(var d= +0,i=0,f=b.length,g,e;itd",b));j=N(a,f);for(f=d=0;fc)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=v(a,c,b,"");return d}return J(a,c)[b]}function Pa(a,b){for(var c=-1,d=-1,i=0;i/g,"");e.length>c&&(c=e.length,d=i)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1); +return 48>b||57/g,""),i=q[c].nTh,i.removeAttribute("aria-sort"),i.removeAttribute("aria-label"),q[c].bSortable?0d&&d++;f=RegExp(f+"[123]");var o;b=0;for(c=a.length;b
          ')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize= +100===h("#DT_BrowserTest",b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Va(a){return function(){var b=[s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var U=/\[.*?\]$/,Wa=X.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,e=[],f=h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Wa(d)),e.push((f?"":'"'+c+'":')+d);return(f? +"[":"{")+e+(f?"]":"}")};this.$=function(a,b){var c,d,e=[],f;d=s(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)y(d),x(d);return g};this.fnDestroy=function(a){var b=s(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,i,f,a=a===n?!1:a;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);if(!a){i=0;for(f=b.aoColumns.length;itr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];P(b);h(T(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc, +b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);i=0;for(f=b.aoData.length;i=t(d);if(!m)for(e=a;et<"F"ip>')):h.extend(g.oClasses,j.ext.oStdClasses);h(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Qa();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart, +g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Sa(g,e),z(g,"aoDrawCallback",ra,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=h.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(g.oLanguage.sUrl,null,function(a){pa(a);h.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),i=!0):h.extend(!0, +g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);b=g.asStripeClasses.length;g.asDestroyStripes=[];if(b){c=!1;d=h(this).children("tbody").children("tr:lt("+b+")");for(a=0;a=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]= +k.asSorting[0]);c=0;for(d=k.asSorting.length;c=parseInt(n,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;me)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k'+k.sPrevious+''+k.sNext+"":'';h(j).append(k);var l=h("a",j), +k=l[0],l=l[1];e.oApi._fnBindAction(k,{action:"previous"},n);e.oApi._fnBindAction(l,{action:"next"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",l.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),l.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k,l=0,n=j.length;l'+k.sFirst+''+k.sPrevious+''+k.sNext+''+k.sLast+"");var t=h("a",j),k=t[0],l=t[1],r=t[2],t=t[3];e.oApi._fnBindAction(k,{action:"first"},n);e.oApi._fnBindAction(l,{action:"previous"},n);e.oApi._fnBindAction(r,{action:"next"},n);e.oApi._fnBindAction(t,{action:"last"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",r.id=e.sTableId+"_next",t.id=e.sTableId+"_last")}, +fnUpdate:function(e,o){if(e.aanFeatures.p){var m=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(m/2),l=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),n=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,t="",r,B=e.oClasses,u,M=e.aanFeatures.p,L=function(h){e.oApi._fnBindAction(this,{page:h+r-1},function(h){e.oApi._fnPageChange(e,h.data.page);o(e);h.preventDefault()})};-1===e._iDisplayLength?n=k=r=1:l=l-k?(r=l-m+1,k=l):(r=n-Math.ceil(m/2)+1,k=r+m-1);for(m=r;m<=k;m++)t+= +n!==m?''+e.fnFormatNumber(m)+"":''+e.fnFormatNumber(m)+"";m=0;for(k=M.length;mh?1:0},"string-desc":function(e,h){return eh?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return eh?1:0},"html-desc":function(e,h){return e< +h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e,h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null; +for(var k=1;k")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext};"function"===typeof define&&define.amd?define(["jquery"],L):jQuery&&!jQuery.fn.dataTable&& +L(jQuery)})(window,document); diff --git a/wp-content/plugins/advanced-access-manager/media/js/jquery.treeview.js b/wp-content/plugins/advanced-access-manager/media/js/jquery.treeview.js new file mode 100644 index 0000000..7e43d4b --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/js/jquery.treeview.js @@ -0,0 +1,123 @@ +/* + * Treeview 1.5pre - jQuery plugin to hide and show branches of a tree + * + * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ + * http://docs.jquery.com/Plugins/Treeview + * + * Copyright (c) 2007 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ + * + */ + +(function(b){b.extend(b.fn,{swapClass:function(c,a){var b=this.filter("."+c);this.filter("."+a).removeClass(a).addClass(c);b.removeClass(c).addClass(a);return this},replaceClass:function(a,b){return this.filter("."+a).removeClass(a).addClass(b).end()},hoverClass:function(a){a=a||"hover";return this.hover(function(){b(this).addClass(a)},function(){b(this).removeClass(a)})},heightToggle:function(a,b){a?this.animate({height:"toggle"},a,b):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")? "show":"hide"]();b&&b.apply(this,arguments)})},heightHide:function(a,b){a?this.animate({height:"hide"},a,b):(this.hide(),b&&this.each(b))},prepareBranches:function(b){b.prerendered||(this.filter(":last-child:not(ul)").addClass(a.last),this.filter((b.collapsed?"":"."+a.closed)+":not(."+a.open+")").find(">ul").hide());return this.filter(":has(>ul)")},applyClasses:function(c,g){this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview",function(a){this==a.target&& g.apply(b(this).next())}).add(b("a",this)).hoverClass();if(!c.prerendered){this.filter(":has(>ul:hidden)").addClass(a.expandable).replaceClass(a.last,a.lastExpandable);this.not(":has(>ul:hidden)").addClass(a.collapsable).replaceClass(a.last,a.lastCollapsable);var d=this.find("div."+a.hitarea);d.length||(d=this.prepend('
          ').find("div."+a.hitarea));d.removeClass().addClass(a.hitarea).each(function(){var a="";b.each(b(this).parent().attr("class").split(" "),function(){a+=this+ "-hitarea "});b(this).addClass(a)})}this.find("div."+a.hitarea).click(g)},treeview:function(c){function g(c,e){function h(e){return function(){d.apply(b("div."+a.hitarea,c).filter(function(){return e?b(this).parent("."+e).length:!0}));return!1}}b("a:eq(0)",e).click(h(a.collapsable));b("a:eq(1)",e).click(h(a.expandable));b("a:eq(2)",e).click(h())}function d(){b(this).parent().find(">.hitarea").swapClass(a.collapsableHitarea,a.expandableHitarea).swapClass(a.lastCollapsableHitarea,a.lastExpandableHitarea).end().swapClass(a.collapsable, a.expandable).swapClass(a.lastCollapsable,a.lastExpandable).find(">ul").heightToggle(c.animated,c.toggle);c.unique&&b(this).parent().siblings().find(">.hitarea").replaceClass(a.collapsableHitarea,a.expandableHitarea).replaceClass(a.lastCollapsableHitarea,a.lastExpandableHitarea).end().replaceClass(a.collapsable,a.expandable).replaceClass(a.lastCollapsable,a.lastExpandable).find(">ul").heightHide(c.animated,c.toggle)}function k(){var a=[];i.each(function(c,d){a[c]=b(d).is(":has(>ul:visible)")?1:0}); b.cookie(c.cookieId,a.join(""),c.cookieOptions)}function l(){var a=b.cookie(c.cookieId);if(a){var d=a.split("");i.each(function(a,c){b(c).find(">ul")[parseInt(d[a])?"show":"hide"]()})}}c=b.extend({cookieId:"treeview"},c);if(c.toggle){var m=c.toggle;c.toggle=function(){return m.apply(b(this).parent()[0],arguments)}}this.data("toggler",d);this.addClass("treeview");var i=this.find("li").prepareBranches(c);switch(c.persist){case "cookie":var j=c.toggle;c.toggle=function(){k();j&&j.apply(this,arguments)}; l();break;case "location":var f=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});f.length&&(f=f.addClass("selected").parents("ul, li").add(f.next()).show(),c.prerendered&&f.filter("li").swapClass(a.collapsable,a.expandable).swapClass(a.lastCollapsable,a.lastExpandable).find(">.hitarea").swapClass(a.collapsableHitarea,a.expandableHitarea).swapClass(a.lastCollapsableHitarea,a.lastExpandableHitarea))}i.applyClasses(c,d);c.control&&(g(this,c.control),b(c.control).show()); return this}});b.treeview={};var a=b.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"}})(jQuery); + +(function($) { + var CLASSES = $.treeview.classes; + var proxied = $.fn.treeview; + $.fn.treeview = function(settings) { + settings = $.extend({}, settings); + if (settings.add) { + return this.trigger("add", [settings.add]); + } + if (settings.remove) { + return this.trigger("remove", [settings.remove]); + } + return proxied.apply(this, arguments).bind("add", function(event, branches) { + $(branches).prev() + .removeClass(CLASSES.last) + .removeClass(CLASSES.lastCollapsable) + .removeClass(CLASSES.lastExpandable) + .find(">.hitarea") + .removeClass(CLASSES.lastCollapsableHitarea) + .removeClass(CLASSES.lastExpandableHitarea); + $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler")); + }).bind("remove", function(event, branches) { + var prev = $(branches).prev(); + var parent = $(branches).parent(); + $(branches).remove(); + prev.filter(":last-child").addClass(CLASSES.last) + .filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end() + .find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end() + .filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end() + .find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea); + if (parent.is(":not(:has(>))") && parent[0] != this) { + parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable) + parent.siblings(".hitarea").andSelf().remove(); + } + }); + }; + +})(jQuery); + +(function($) { + + function load(settings, root, child, container) { + function createNode(parent) { + var current = $("
        • ").attr("id", this.id || "").html("" + this.text + "").appendTo(parent); + if (this.classes) { + current.children("span").addClass(this.classes); + } + if (this.expanded) { + current.addClass("open"); + } + if (this.hasChildren || this.children && this.children.length) { + var branch = $("
            ").appendTo(current); + if (this.hasChildren) { + current.addClass("hasChildren"); + createNode.call({ + classes: "placeholder", + text: " ", + children:[] + }, branch); + } + if (this.children && this.children.length) { + $.each(this.children, createNode, [branch]) + } + } + } + $.ajax($.extend(true, { + url: settings.url, + dataType: "json", + data: { + root: root + }, + success: function(response) { + child.empty(); + $.each(response, createNode, [child]); + $(container).treeview({ + add: child + }); + } + }, settings.ajax)); + } + + var proxied = $.fn.treeview; + $.fn.treeview = function(settings) { + if (!settings.url) { + return proxied.apply(this, arguments); + } + var container = this; + if (!container.children().size()) + load(settings, "source", this, container); + var userToggle = settings.toggle; + return proxied.call(this, $.extend({}, settings, { + collapsed: true, + toggle: function() { + var $this = $(this); + if ($this.hasClass("hasChildren")) { + var childList = $this.removeClass("hasChildren").find("ul"); + load(settings, this.id, childList, container); + } + if (userToggle) { + userToggle.apply(this, arguments); + } + } + })); + }; + +})(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/media/js/properties.js b/wp-content/plugins/advanced-access-manager/media/js/properties.js new file mode 100644 index 0000000..f128aa7 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/media/js/properties.js @@ -0,0 +1,64 @@ +CodeMirror.defineMode("properties", function() { + return { + token: function(stream, state) { + var sol = stream.sol() || state.afterSection; + var eol = stream.eol(); + + state.afterSection = false; + + if (sol) { + if (state.nextMultiline) { + state.inMultiline = true; + state.nextMultiline = false; + } else { + state.position = "def"; + } + } + + if (eol && !state.nextMultiline) { + state.inMultiline = false; + state.position = "def"; + } + + if (sol) { + while (stream.eatSpace()) + ; + } + + var ch = stream.next(); + + if (sol && (ch === "#" || ch === "!" || ch === ";")) { + state.position = "comment"; + stream.skipToEnd(); + return "comment"; + } else if (sol && ch === "[") { + state.afterSection = true; + stream.skipTo("]"); + stream.eat("]"); + return "header"; + } else if (ch === "=" || ch === ":") { + state.position = "quote"; + return null; + } else if (ch === "\\" && state.position === "quote") { + if (stream.next() !== "u") { // u = Unicode sequence \u1234 + // Multiline value + state.nextMultiline = true; + } + } + + return state.position; + }, + startState: function() { + return { + position: "def", // Current position, "def", "quote" or "comment" + nextMultiline: false, // Is the next line multiline value + inMultiline: false, // Is the current line a multiline value + afterSection: false // Did we just open a section + }; + } + + }; +}); + +CodeMirror.defineMIME("text/x-properties", "properties"); +CodeMirror.defineMIME("text/x-ini", "properties"); \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/readme.txt b/wp-content/plugins/advanced-access-manager/readme.txt new file mode 100644 index 0000000..f65e6b5 --- /dev/null +++ b/wp-content/plugins/advanced-access-manager/readme.txt @@ -0,0 +1,458 @@ +=== Advanced Access Manager === +Contributors: vasyl_m +Tags: security, login, access manager, access, access control, capability, role, user, post filter, category +Requires at least: 3.4.2 +Tested up to: 3.9.1 +Stable tag: 2.8.3 + +The powerful and easy-to-use tool to improve security and define access to your +posts, pages and backend areas for single blog or multisite network. + +== Description == + +**Advanced Access Manager** (aka **AAM**) is known nowadays as one of the best +access control and security enhancement tool. It is easy-to-use and at the same +time very powerful plugin that gives you the flexible control over your single +blog or multisite network. + +With **AAM** you can control access to different areas of your website like posts, +pages, categories, widgets or menus. The access can be defined for any user, role +or visitor. + +Below is the list of highlighted features that has been implemented and proved in +current **AAM** version: + +**Secure Admin Login**. +Control the login process to your website. Define the number or possible login +attempts, trace the failed login request's geographical location, lockout IP +addresses for potential hacker attacks. + +**Control Access to Posts, Pages or Categories**. +Restrict access to your posts, pages, custom post types of categories for any +user, role or visitor. Define whether the viewer can ''see'', ''read'' or ''comment'' +on any post or page. For more extended list of possible options consider to get +the [AAM Plus Package](http://wpaam.com/aam-extensions/aam-plus-package/). To +learn more about this feature check our +[Posts and Pages Tutorial](http://wpaam.com/tutorials/posts-pages-general-overview/). + +**Control Access to Media Files**. +Define your custom access to media files for any user, role or visitor. The feature +works without any extra configurations to your server .htaccess file. Find more +information about this topic in our +[Tutorial](http://wpaam.com/tutorials/control-access-to-media-files/). + +**Manage Roles and Capabilities**. +Manage the list of roles and capabilities. This feature has been designed and tested +by hundreds of experienced WordPress user and developers. It gives you possibility +to create, update or delete any role or capability. For security reasons, this +feature is limited by default but can be easily activated. Read more about it in +our [AAM Super Admin Tutorial](http://wpaam.com/tutorials/aam-super-admin/). + +**Track User Activity**. +Track logged in user activities like when user was logged in or logged out. Explore +more tracking options with [AAM Activities](http://wpaam.com/aam-extensions/aam-activities/). + +**Filter Backend Menu**. +Control access to backend menu (including submenus). For more information check +[How to Manage Admin Menu](http://wpaam.com/tutorials/how-to-manage-admin-menu/). + +**Filter Metaboxes and Widgets**. +Filter available metaboxes or widgets for any user, role or visitor. + +And many, many more... + +The **AAM** has multi-language UI: + + * English + * German (by Kolja www.Reggae-Party.de) + * Spanish (by Etruel www.netmdp.com) + * Polish (by Gustaw Lasek www.servitium.pl) + * French (by Moskito7) + * Russian (by Maxim Kernozhickii www.aeromultimedia.com) + * Persian (by Ghaem Omidi www.forum.wp-parsi.com) + * Norwegian (by Christer Berg Johannesen www.improbus.com) + +== Installation == + +1. Upload `advanced-access-manager` folder to the `/wp-content/plugins/` directory +2. Activate the plugin through the 'Plugins' menu in WordPress + +== Frequently Asked Questions == + += What is "Initiate URL" button, under "Metaboxes & Widgets" Tab? = + +Sometimes list of additional metaboxes is conditional on edit post page. Like e.g. +display custom metabox "Photos" only if Post Status is Published. Access Manager +initiates the list of metaboxes for each post in default status ("auto-draft"). +That is why you have to manually initialize the URL to the edit post page where +the list of additional metaboxes can be picked by AAM. + +== Screenshots == + +1. General view of Access Manager +2. List of Metaboxes to Manage +3. List of Capabilities +4. Post/Page Tree View +5. ConfigPress + +== Changelog == + += 2.8.3 = +* Improved ConfigPress security (thanks to Tom Adams from security.dxw.com) +* Added ConfigPress new setting control_permalink + += 2.8.2 = +* Fixed issue with Default acces to posts/pages for AAM Plus Package +* Fixed issue with AAM Plugin Manager for lower PHP version + += 2.8.1 = +* Simplified the Repository internal handling +* Added Development License Support + += 2.8 = +* Fixed issue with AAM Control Manage HTML +* Fixed issue with __PHP_Incomplete_Class +* Added AAM Plugin Manager Extension +* Removed Deprecated ConfigPress Object from the core + += 2.7.3 = +* Added ConfigPress Reference Page + += 2.7.2 = +* Maintenance release + += 2.7.1 = +* Improved SSL handling +* Added ConfigPress property aam.native_role_id +* Fixed bug with countryCode in AAM Security Extension + += 2.7 = +* Fixed bug with subject managing check +* Fixed bug with update hook +* Fixed issue with extension activation hook +* Added AAM Security Feature. First iteration +* Improved CSS + += 2.6 = +* Fixed bug with user inheritance +* Fixed bug with user restore default settings +* Fixed bug with installed extension detection +* Improved core extension handling +* Improved subject inheritance mechanism +* Removed deprecated ConfigPress Tutorial +* Optimized CSS +* Regenerated translation pot file + += 2.5.2 = +* Fixed issue with AAM Media Manager + += 2.5.1 = +* Extended AAM Media Manager Extension +* Adjusted control_area to AAM Media Manager +* Fixed issue with mb_* functions +* Added Contextual Help Menu +* Updated My Feature extension + += 2.5 = +* Fixed issue with AAM Plus Package and Multisite +* Introduced Development License +* Minor internal adjustment for AAM Development Community + += 2.5 Beta = +* Refactored Post & Pages Access List +* Extended ConfigPress with Post & Pages Access List Options +* Refactored internal UI hander +* Fixed issue with Restore Default flag and AAM Plus Package +* Added LIST Restriction for AAM Plus Package +* Added ADD Restriction for AAM Plus Package +* Filter list of editable roles based on current user level +* Gives ability for non-admin users manage AAM if admin granted access +* Removed Backup object. Replaces with Restore Default +* Merged ajax handler with UI manager +* Implemented Clear All Settings feature (one step closer to Import/Export) +* Added Error notification for Extension page +* Fixed bug with Multisite and AAM Plus Package ajax call +* Regenerated language file +* Fixed bug with non-existing term + += 2.4 = +* Added Norwegian language Norwegian (by Christer Berg Johannesen) +* Localize the default Roles +* Regenerated .pod file +* Added AAM Media Manager Extension +* Added AAM Content Manager Extension +* Standardized Extension Modules +* Fixed issue with Media list + += 2.3 = +* Added Persian translation by Ghaem Omidi +* Added Inherit Capabilities From Role drop-down on Add New Role Dialog +* Small Cosmetic CSS changes + += 2.2.3 = +* Improved Admin Menu access control +* Extended ConfigPress with aam.menu.undefined setting +* Fixed issue with Frontend Widget +* Updated Polish Language File + += 2.2.2 = +* Fixed very significant issue with Role deletion +* Added Unfiltered Capability checkbox +* Regenerated language file +* Fixed issue with language encoding +* Fixed issue with Metaboxes tooltips + += 2.2.1 = +* Fixed the issue with Activity include + += 2.2 = +* Fixed issue with jQuery UI Tooltip Widget +* Added AAM Warning Panel +* Added Event Log Feature +* Moved ConfigPress to separate Page (refactored internal handling) +* Reverted back the SSL handling +* Added Post Delete feature +* Added Post's Restore Default Restrictions feature +* Added ConfigPress Extension turn on/off setting +* Russian translation by (Maxim Kernozhitskiy http://aeromultimedia.com) +* Removed Migration possibility +* Refactored AAM Core Console model +* Increased the number of saved restriction for basic version +* Simplified Undo feature + += 2.1.1 = +* Fixed fatal error in caching mechanism +* Extended ConfigPress tutorial +* Fixed error for AAM Plus Package for PHP earlier versions +* Improved Admin over SSL check +* Improved Taxonomy Query handling mechanism + += 2.1 = +* Fixed issue with Admin Menu restrictions (thanks to MikeB2B) +* Added Polish Translation +* Fixed issue with Widgets restriction +* Improved internal User & Role handling +* Implemented caching mechanism +* Extended Update mechanism (remove the AAM cache after update) +* Added New ConfigPress setting aam.caching (by default is FALSE) +* Improved Metabox & Widgets filtering mechanism +* Added French Translation (by Moskito7) +* Added "My Feature" Tab +* Regenerated .pot file + += 2.0 = +* New UI +* Robust and completely new core functionality +* Over 3 dozen of bug fixed and improvement during 3 alpha & beta versions +* Improved Update mechanism + += 1.9.1 = +* Fixed bug with empty event list +* Fixed bug with direct attachment access +* Reverted back the default UI design +* Last release of 1.x AAM Branch + += 1.9 = +* AAM 2.0 alpha 1 Announcement + += 1.8.5 = +* Added Event Manager +* Added ConfigPress parameter "aam.encoding" + += 1.8 = +* Fixed user caching issue +* Fixed issue with encoding +* Clear output buffer to avoid from third party plugins issues +* Notification about new release 2.0 + += 1.7.5 = +* Accordion Fix + += 1.7.3 = +* Fixed reported issue #8894 to PHPSnapshot +* Added Media File access control +* Extended ConfigPress Tutorial + += 1.7.2 = +* Fixed CSS issues + += 1.7.1 = +* Fixed issue with cache removal query +* Silenced Upgrade for release 1.7 and higher +* Removed Capabilities description +* Added .POT file for multi-language support +* Silenced issue in updateRestriction function +* Silenced the issue with phpQuery and taxonomy rendering + += 1.7 = +* Removed Zend Caching mechanism +* Silenced the issue with array_merge in API model +* Removed the ConfigPress reference +* Created ConfigPress PDF Tutorial +* Moved SOAP wsdl to local directory + + += 1.6.9.1 = +* Changed the way AHM displays + += 1.6.9 = +* Encoding issue fixed +* Removed AWM Group page +* Removed .htaccess file +* Fixed bug with Super Admin losing capabilities + += 1.6.8.3 = +* Implemented native WordPress jQuery UI include to avoid version issues + += 1.6.8.2 = +* Fixed JS issue with dialog destroy + += 1.6.8.1 = +* Fixed Javascript issue +* Fixed issue with comment feature + += 1.6.8 = +* Extended ConfigPress +* New view +* Updated ConfigPress Reference Guide + += 1.6.7.5 = +* Implemented alternative way of Premium Upgrade +* Extended ConfigPress + += 1.6.7 = +* New design + += 1.6.6 = +* Bug fixing +* Maintenance work +* Added Multisite importing feature + += 1.6.5.2 = +* Updated jQuery UI lib to 1.8.20 +* Minimized JavaScript +* Implemented Web Service for AWM Group page +* Implemented Web Service for Premium Version +* Fixed bug with User Restrictions +* Fixed bug with Edit Permalink +* Fixed bug with Upgrade Hook +* Reorganized Label Module (Preparing for Russian and Polish transactions) + += 1.6.5.1 (Beta) = +* Bug fixing +* Removed custom error handler + += 1.6.5 = +* Turn off error reporting by default +* More advanced Post/Taxonomy access control +* Added Refresh feature for Post/Taxonomy Tree +* Added Custom Capability Edit Permalink +* Filtering Post's Quick Menu +* Refactored JavaScript + += 1.6.3 = +* Added more advanced possibility to manage comments +* Change Capabilities view +* Added additional checking for plugin's reliability + += 1.6.2 = +* Few GUI changes +* Added ConfigPress reference guide +* Introduced Extended version +* Fixed bug with UI menu ordering +* Fixed bug with ConfigPress caching +* Fixed bugs in filtermetabox class +* Fixed bug with confirmation message in Multisite Setup + += 1.6.1.3 = +* Fixed issue with menu + += 1.6.1.2 = +* Resolved issue with chmod +* Fixed issue with clearing config.ini during upgrade + += 1.6.1.1 = +* Fixed 2 bugs reported by jimaek + += 1.6.1 = +* Silenced few warnings in Access Control Class +* Extended description to Manually Metabox Init feature +* Added possibility to filter Frontend Widgets +* Refactored the Option Page manager +* Added About page + += 1.6 = +* Fixed bug for post__not_in +* Fixed bug with Admin Panel filtering +* Added Restore Default button +* Added Social and Support links +* Modified Error Handling feature +* Modified Config Press Handling + += 1.5.8 = +* Fixed bug with categories +* Addedd delete_capabilities parameter to Config Press + += 1.5.7 = +* Bug fixing +* Introduced error handling +* Added internal .htaccess + += 1.5.6 = +* Introduced _Visitor User Role +* Fixed few core bugs +* Implemented caching system +* Improved API + += 1.5.5 = +* Performed code refactoring +* Added Access Config +* Added User Managing feature +* Fixed bugs related to WP 3.3.x releases + += 1.4.3 = +* Emergency bug fixing + += 1.4.2 = +* Fixed cURL bug + += 1.4.1 = +* Fixed some bugs with checking algorithm +* Maintained the code + += 1.4 = +* Added Multi-Site Support +* Added Multi-Language Support +* Improved checking algorithm +* Improved Super Admin functionality + += 1.3.1 = +* Improved Super Admin functionality +* Optimized main class +* Improved Checking algorithm +* Added ability to change User Role's Label +* Added ability to Exclude Pages from Navigation +* Added ability to spread Post/Category Restriction Options to all User Roles +* Sorted List of Capabilities Alphabetically + += 1.3 = +* Change some interface button to WordPress default +* Deleted General Info metabox +* Improved check Access algorithm for compatibility with non standard links +* Split restriction on Front-end and Back-end +* Added Page Menu Filtering +* Added Admin Top Menu Filtering +* Added Import/Export Configuration functionality + += 1.2.1 = +* Fixed issue with propAttr jQuery IU incompatibility +* Added filters for checkAccess and compareMenu results + += 1.2 = +* Fixed some notice messages reported by llucax +* Added ability to sort Admin Menu +* Added ability to filter Posts, Categories and Pages + += 1.0 = +* Fixed issue with comment editing +* Implemented JavaScript error catching \ No newline at end of file diff --git a/wp-content/plugins/advanced-access-manager/screenshot-1.png b/wp-content/plugins/advanced-access-manager/screenshot-1.png new file mode 100644 index 0000000..e934618 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/screenshot-1.png differ diff --git a/wp-content/plugins/advanced-access-manager/screenshot-2.png b/wp-content/plugins/advanced-access-manager/screenshot-2.png new file mode 100644 index 0000000..d363749 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/screenshot-2.png differ diff --git a/wp-content/plugins/advanced-access-manager/screenshot-3.png b/wp-content/plugins/advanced-access-manager/screenshot-3.png new file mode 100644 index 0000000..0d12867 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/screenshot-3.png differ diff --git a/wp-content/plugins/advanced-access-manager/screenshot-4.png b/wp-content/plugins/advanced-access-manager/screenshot-4.png new file mode 100644 index 0000000..118baa9 Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/screenshot-4.png differ diff --git a/wp-content/plugins/advanced-access-manager/screenshot-5.png b/wp-content/plugins/advanced-access-manager/screenshot-5.png new file mode 100644 index 0000000..b0a1ecd Binary files /dev/null and b/wp-content/plugins/advanced-access-manager/screenshot-5.png differ diff --git a/wp-content/themes/headway/style.css b/wp-content/themes/headway/style.css index c13a26a..e055168 100644 --- a/wp-content/themes/headway/style.css +++ b/wp-content/themes/headway/style.css @@ -1,27 +1,27 @@ -/* -THEME NAME:Headway Base -THEME URI:http://www.headwaythemes.com -VERSION:3.7.10 -AUTHOR:Headway Themes -AUTHOR URI:http://www.headwaythemes.com -DESCRIPTION:Headway is a feature-packed theme with drag and drop layout editing, point and click design capabilities, powerful search engine optimization and much more. For help, you can access our support or go to the Headway documentation. -LICENSE: Terms of Service -LICENSE URI: http://headwaythemes.com/terms-of-service - ------------------------------------------------------------------------- -Copyright 2009-2014 Vesped Inc. - -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 +/* +THEME NAME:Headway Base +THEME URI:http://www.headwaythemes.com +VERSION:3.7.10 +AUTHOR:Headway Themes +AUTHOR URI:http://www.headwaythemes.com +DESCRIPTION:Headway is a feature-packed theme with drag and drop layout editing, point and click design capabilities, powerful search engine optimization and much more. For help, you can access our support or go to the Headway documentation. +LICENSE: Terms of Service +LICENSE URI: http://headwaythemes.com/terms-of-service + +------------------------------------------------------------------------ +Copyright 2009-2014 Vesped Inc. + +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 */ \ No newline at end of file