Plugin Directory

Changeset 1820910


Ignore:
Timestamp:
02/12/2018 11:29:32 PM (8 years ago)
Author:
andrezrv
Message:

Tagging version 1.1.3

Location:
hide-this/tags/1.1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hide-this/tags/1.1.3/README.md

    r1263269 r1820910  
    1111**Basic usage:**
    1212
    13 `[hide]Lorem ipsum dolor sit amet.[/hide]`
     13```
     14[hide]Lorem ipsum dolor sit amet.[/hide]
     15```
    1416
    1517This example will hide that content for all the site visitors. But you can be more specific by using attributes.
     
    2426
    2527Hide your content to all visitors:
    26 `[hide]Lorem ipsum dolor sit amet.[/hide]`
     28
     29```
     30[hide]Lorem ipsum dolor sit amet.[/hide]
     31```
    2732
    2833Hide your content to all visitors, except for a specific user:
    29 `[hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]`
     34
     35```
     36[hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     37```
    3038
    3139Hide your content to all non-logged visitors:
    32 `[hide for="!logged"]Lorem ipsum dolor sit amet.[/hide]`
     40
     41```
     42[hide for="!logged"]Lorem ipsum dolor sit amet.[/hide]
     43```
    3344
    3445Hide your content to all logged in visitors:
    35 `[hide for="logged"]Lorem ipsum dolor sit amet.[/hide]`
     46
     47```
     48[hide for="logged"]Lorem ipsum dolor sit amet.[/hide]
     49```
    3650
    3751Hide your content to all logged in visitors, except for a specific user:
    38 `[hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]`
     52
     53```
     54[hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     55```
    3956
    4057Hide your content for some specific role:
    41 `[hide for="contributor"]Lorem ipsum dolor sit amet.[/hide]`
     58
     59```
     60[hide for="contributor"]Lorem ipsum dolor sit amet.[/hide]
     61```
    4262
    4363Hide your content for two specific roles:
    44 `[hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide]`
     64
     65```
     66[hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide]
     67```
    4568
    4669Hide your content for all visitors except for a specific role:
    47 `[hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide]`
    48 `[hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide]`
     70
     71```
     72[hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide]
     73[hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide]
     74```
    4975
    5076Hide your content for all visitors except for two specific roles:
    51 `[hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide]`
    52 `[hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide]`
     77
     78```
     79[hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide]
     80[hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide]
     81```
    5382
    5483Hide your content for users with a specific role and a specific capability:
    55 `[hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     84
     85```
     86[hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     87```
    5688
    5789Hide your content for users with a specific role, not having a specific capability:
    58 `[hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     90
     91```
     92[hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     93```
    5994
    6095Hide your content for users with a specific capability:
    61 `[hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     96
     97```
     98[hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     99```
    62100
    63101Hide your content for a specific user by user name:
    64 `[hide for="username:foo"]`
     102
     103```
     104[hide for="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     105```
    65106
    66107Hide your content for a specific user by user ID:
    67 `[hide for="userid:42"]`
     108
     109```
     110[hide for="userid:42"]Lorem ipsum dolor sit amet.[/hide]
     111```
    68112
    69113Hide your content for a specific user by user email:
    70 `[hide for="useremail:foo@mail.com"]`
     114
     115```
     116[hide for="useremail:foo@mail.com"]Lorem ipsum dolor sit amet.[/hide]
     117```
    71118
    72119Hide your content for everyone except for a specific user by user name:
    73 `[hide for="username:!foo"]`
     120
     121```
     122[hide for="username:!foo"]Lorem ipsum dolor sit amet.[/hide]
     123```
    74124
    75125You should get the idea by now. Notice how you can use `!` to deny values such as login status, roles, capabilities and user values.
     
    79129This plugin offers hooks for filters, so you can modify its functionality or add your own.
    80130
    81 * `hide_this_attributes`: Modify the attributes that the shortcode receives. 
     131* `hide_this_attributes`: Modify the attributes that the shortcode receives.
    82132* `hide_this_content`: Modify the full content that the shortcode prints.
    83133* `hide_this_hide_rules`: Modify rules for hiding content.
  • hide-this/tags/1.1.3/readme.txt

    r1638289 r1820910  
    44Tags: hide, content, user, role, capability
    55Requires at least: 3.0
    6 Tested up to: 4.7
     6Tested up to: 4.9
    77Stable tag: 1.1.3
    88License: GPLv2 or later
     
    3434
    3535Hide your content to all visitors:
    36 `[hide]Lorem ipsum dolor sit amet.[/hide]`
     36
     37`
     38[hide]Lorem ipsum dolor sit amet.[/hide]
     39`
    3740
    3841Hide your content to all visitors, except for a specific user:
    39 `[hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]`
     42
     43`
     44[hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     45`
    4046
    4147Hide your content to all non-logged visitors:
    42 `[hide for="!logged"]Lorem ipsum dolor sit amet.[/hide]`
     48
     49`
     50[hide for="!logged"]Lorem ipsum dolor sit amet.[/hide]
     51`
    4352
    4453Hide your content to all logged in visitors:
    45 `[hide for="logged"]Lorem ipsum dolor sit amet.[/hide]`
     54
     55`
     56[hide for="logged"]Lorem ipsum dolor sit amet.[/hide]
     57`
    4658
    4759Hide your content to all logged in visitors, except for a specific user:
    48 `[hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]`
     60
     61`
     62[hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     63`
    4964
    5065Hide your content for some specific role:
    51 `[hide for="contributor"]Lorem ipsum dolor sit amet.[/hide]`
     66
     67`
     68[hide for="contributor"]Lorem ipsum dolor sit amet.[/hide]
     69`
    5270
    5371Hide your content for two specific roles:
    54 `[hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide]`
     72
     73`
     74[hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide]
     75`
    5576
    5677Hide your content for all visitors except for a specific role:
    57 `[hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide]`
    58 `[hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide]`
     78
     79`
     80[hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide]
     81[hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide]
     82`
    5983
    6084Hide your content for all visitors except for two specific roles:
    61 `[hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide]`
    62 `[hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide]`
     85
     86`
     87[hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide]
     88[hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide]
     89`
    6390
    6491Hide your content for users with a specific role and a specific capability:
    65 `[hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     92
     93`
     94[hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     95`
    6696
    6797Hide your content for users with a specific role, not having a specific capability:
    68 `[hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     98
     99`
     100[hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     101`
    69102
    70103Hide your content for users with a specific capability:
    71 `[hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]`
     104
     105`
     106[hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide]
     107`
    72108
    73109Hide your content for a specific user by user name:
    74 `[hide for="username:foo"]`
     110
     111`
     112[hide for="username:foo"]Lorem ipsum dolor sit amet.[/hide]
     113`
    75114
    76115Hide your content for a specific user by user ID:
    77 `[hide for="userid:42"]`
     116
     117`
     118[hide for="userid:42"]Lorem ipsum dolor sit amet.[/hide]
     119`
    78120
    79121Hide your content for a specific user by user email:
    80 `[hide for="useremail:foo@mail.com"]`
     122
     123`
     124[hide for="useremail:foo@mail.com"]Lorem ipsum dolor sit amet.[/hide]
     125`
    81126
    82127Hide your content for everyone except for a specific user by user name:
    83 `[hide for="username:!foo"]`
     128
     129`
     130[hide for="username:!foo"]Lorem ipsum dolor sit amet.[/hide]
     131`
    84132
    85133You should get the idea by now. Notice how you can use `!` to deny values such as login status, roles, capabilities and user values.
Note: See TracChangeset for help on using the changeset viewer.