function act_attachment_access()
 {
     if (is_admin() || defined('DISABLE_QUERYFILTERS_RS') || is_content_administrator_rs() || !scoper_get_option('file_filtering')) {
         return;
     }
     // if ( is_attachment() ) {  as of WP 2.6, is_attachment() returns false for custom permalink attachment URL
     if (is_attachment_rs()) {
         //rs_errlog( 'IS an attachment:' );
         require_once dirname(__FILE__) . '/attachment-template_rs.php';
         AttachmentTemplate_RS::attachment_access();
     }
 }
 function _get_teaser_object_types($src_name, $object_types, $args = array())
 {
     $args = (array) $args;
     if (!empty($args['skip_teaser']) || is_admin() || is_content_administrator_rs() || is_attachment_rs() || defined('XMLRPC_REQUEST') || !empty($this->skip_teaser)) {
         return array();
     }
     if (is_feed() && defined('SCOPER_NO_FEED_TEASER')) {
         return array();
     }
     if (!empty($args['required_operation']) && 'read' != $args['required_operation']) {
         return array();
     }
     if (empty($object_types)) {
         $object_types = $this->_get_object_types($src_name);
     }
     $tease_otypes = array();
     if (scoper_get_otype_option('do_teaser', $src_name)) {
         global $current_user;
         foreach ($object_types as $object_type) {
             if (scoper_get_otype_option('use_teaser', $src_name, $object_type)) {
                 $teased_users = scoper_get_otype_option('teaser_logged_only', $src_name, $object_type);
                 if (empty($teased_users) || 'anon' == $teased_users && empty($current_user->ID) || 'anon' != $teased_users && !empty($current_user->ID)) {
                     $tease_otypes[] = $object_type;
                 }
             }
         }
     }
     return $tease_otypes;
 }