$current_gmt ) { //$limit_class .= ' rs-future'; $limit_style = 'style="background-color: #cfc" '; $title_captions []= sprintf( $starts_caption, agp_date_i18n( $datef, $start_date_gmt + $gmt_seconds ) ); } else $title_captions []= sprintf( $started_caption, agp_date_i18n( $datef, $start_date_gmt + $gmt_seconds ) ); } if ( $date_limits['end_date_gmt'] != SCOPER_MAX_DATE_STRING ) { $limit_class .= ' rs-has_end'; $end_date_gmt = strtotime( $date_limits['end_date_gmt'] ); $datef = ( strpos( $date_limits['end_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; if ( strtotime( $date_limits['end_date_gmt'] ) < $current_gmt ) { //$limit_class .= ' rs-expired'; $limit_style = 'style="background-color: #fcc" '; $title_captions []= sprintf( $expired_caption, agp_date_i18n( $datef, $end_date_gmt + $gmt_seconds ) ); } else $title_captions []= sprintf( $expires_caption, agp_date_i18n( $datef, $end_date_gmt + $gmt_seconds ) ); } } if ( ! empty($date_limits['content_date_limited']) ) { if ( $date_limits['content_min_date_gmt'] != SCOPER_MIN_DATE_STRING ) { $limit_class .= ' rs-has_cmin'; $link_class = 'rs-custom_link'; $content_min_date_gmt = strtotime( $date_limits['content_min_date_gmt'] ); $datef_min = ( strpos( $date_limits['content_min_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; } if ( $date_limits['content_max_date_gmt'] != SCOPER_MAX_DATE_STRING ) { $limit_class .= ' rs-has_cmax'; $content_max_date_gmt = strtotime( $date_limits['content_max_date_gmt'] ); $datef_max = ( strpos( $date_limits['content_max_date_gmt'], $default_gmt_time ) ) ? $datef_no_time : $datef_time; if ( $date_limits['content_min_date_gmt'] != SCOPER_MIN_DATE_STRING ) { $content_title_caption = sprintf( $content_range_caption, agp_date_i18n( $datef_min, $content_min_date_gmt + $gmt_seconds ), agp_date_i18n( $datef_max, $content_max_date_gmt + $gmt_seconds ) ); } else $content_title_caption = sprintf( $content_max_caption, agp_date_i18n( $datef_max, $content_max_date_gmt + $gmt_seconds ) ); } else $content_title_caption = sprintf( $content_min_caption, agp_date_i18n( $datef_min, $content_min_date_gmt + $gmt_seconds ) ); } if ( $title_captions || $content_title_caption ) $title = implode(", ", $title_captions) . ' ' . $content_title_caption; } function restriction_captions( $scope, $tx = '', $item_label_singular = '', $item_label = '') { $table_captions = array(); if ( TERM_SCOPE_RS == $scope ) { if ( ! $item_label ) $item_label = ( 'link_category' == $tx->name ) ? agp_strtolower( __('Categories') ) : agp_strtolower( $tx->labels->name ); if ( ! $item_label_singular ) $item_label_singular = ( 'link_category' == $tx->name ) ? agp_strtolower( __('Category') ) : agp_strtolower( $tx->labels->singular_name ); } $table_captions = array(); $table_captions['restrictions'] = array( // captions for roles which are NOT default strict ASSIGN_FOR_ENTITY_RS => sprintf(__('Restricted for %s', 'scoper'), $item_label_singular), ASSIGN_FOR_CHILDREN_RS => sprintf(__('Unrestricted for %1$s, Restricted for sub-%2$s', 'scoper'), $item_label_singular, $item_label), ASSIGN_FOR_BOTH_RS => sprintf(__('Restricted for selected and sub-%s', 'scoper'), $item_label), false => sprintf(__('Unrestricted by default', 'scoper'), $item_label_singular), 'default' => sprintf(__('Unrestricted', 'scoper'), $item_label_singular) ); $table_captions['unrestrictions'] = array( // captions for roles which are default strict ASSIGN_FOR_ENTITY_RS => sprintf(__('Unrestricted for %s', 'scoper'), $item_label_singular), ASSIGN_FOR_CHILDREN_RS => sprintf(__('Unrestricted for sub-%s', 'scoper'), $item_label), ASSIGN_FOR_BOTH_RS => sprintf(__('Unrestricted for selected and sub-%s', 'scoper'), $item_label), false => sprintf(__('Restricted by default', 'scoper'), $item_label_singular), 'default' => sprintf(__('Restricted', 'scoper'), $item_label_singular) ); return $table_captions; } function role_owners_key($tx_or_otype, $args = array()) { $defaults = array( 'display_links' => true, 'display_restriction_key' => true, 'restriction_caption' => '', 'role_basis' => '', 'agent_caption' => '' ); $args = array_merge( $defaults, (array) $args); extract($args); $item_label = agp_strtolower( $tx_or_otype->labels->name ); $item_label_singular = agp_strtolower( $tx_or_otype->labels->singular_name ); if ( $role_basis ) { if ( ! $agent_caption && $role_basis ) $agent_caption = ( ROLE_BASIS_GROUPS == $role_basis ) ? __('Group', 'scoper') : __('User', 'scoper'); $generic_name = ( ROLE_BASIS_GROUPS == $role_basis ) ? __('Groupname', 'scoper') : __('Username', 'scoper'); } else $generic_name = __awp('Name'); $agent_caption = agp_strtolower($agent_caption); echo '

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

'; } // Role Scoping for NGG calls ScoperAdminUI::dropdown_pages function dropdown_pages($object_id = '', $stored_parent_id = '') { require_once( SCOPER_ABSPATH . '/hardway/hardway-parent-legacy_rs.php'); return ScoperHardwayParentLegacy::dropdown_pages( $object_id, $stored_parent_id ); } } // end class ScoperAdminUI ?>