Plugin Directory

Changeset 885664


Ignore:
Timestamp:
04/01/2014 02:47:08 PM (12 years ago)
Author:
factorypattern
Message:

Added "dovetail_skip_content_check" filter, which allows theme developers to skip authorisation checks in certain page templates if they want to (e.g. add "add_filter( "dovetail_skip_content_check", 'return_true', 10 );" at the top of the template to skip the auth check)

Location:
dovetail/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dovetail/trunk/FP-members.php

    r885585 r885664  
    283283                $allowed_roles = get_post_meta( $post->ID, "available_roles", true );
    284284
     285
     286                // This allows theme developers to skip authorisation checks in certain page templates if they want to
     287                $skip_check = apply_filters( "dovetail_skip_content_check", false, $post );
     288               
     289                if ( $skip_check ) {
     290                    return $content;
     291                }
     292
    285293                // No restriction; allow all to view
    286294                if ( empty( $allowed_roles ) )
  • dovetail/trunk/readme.txt

    r885585 r885664  
    3838If you're not wild about parting with your cash then Dovetail should work nicely with any other plugin which lets you theme the Wordpress user signup process.
    3939
     40= I need to skip checking whether a user can view a page on pages with a certain type; can I do that? =
     41
     42Just add "add_filter( "dovetail_skip_content_check", '__return_true', 10 );" (without the speech marks) above where it says "get_header" in the template file.
     43
    4044== Screenshots ==
    4145
     
    4852
    4953== Changelog ==
     54
     55= 1.2.3 =
     56
     57* Added "dovetail_skip_content_check" filter, which allows theme developers to skip authorisation checks in certain page templates if they want to (e.g. add "add_filter( "dovetail_skip_content_check", '__return_true', 10 );" at the top of the template to skip the auth check)
    5058
    5159= 1.2.2 =
Note: See TracChangeset for help on using the changeset viewer.