Content Visibility
Your Content. Your Rules. Decide who sees what and when. No setup or complex settings. Write content, decide who should see it, and press publish. Content Visibility provides a set of controls to say whether each discrete piece of content (or ‘block’ in WordPress parlance) should be shown to users who are signed in to your site or not. Additional add-ons provide controls for role-based visibility, time-based visibility, and location-based visibility. You can also show or hide blocks to folks using RSS Readers. Individual Block Controls Every individual block on all posts and pages (and custom post types) on your site can have their own controls. Mix and match the visibility of blocks on a single page. Need some blocks to show to everyone and a few to only be available to your site’s subscribers? No problem. Only want a message to appear on Christmas Day? You got it. Only want those who are signed in to your site to see certain pieces of content? Easy peasy. At a glance An icon next to each block with active rules allows your content authors to see which blocks may or may not be shown to certain audiences at a glance. Reusable blocks Use Reusable Blocks? No problem, Content Visibility handles those too. Columns and Nested Blocks Do you use columns and put other blocks in them? Content Visibility allows you to control both the ‘nested’ blocks (such as a paragraph block in a column block) or the ‘parent’ block themselves (perhaps hide an entire column for users who aren’t signed in?). Other examples of nested blocks are the Group Block or if you use an accordion or tabs block; all work! Widgets Since version 0.1.7 you are now able to control the visibility of your widgets. As long as you have version 9.9 or above of the Gutenberg plugin you are able to use content visibility on all of your widgets, just like you can with all of your blocks in the content editor. Limit display of your widgets on specific URLs on your site. Want to show a specific text block to only people who are signed in and ONLY on search results? You got it. Version 0.2.5 adds the ability to show or hide your widgets on posts that are in specific category or tags. Coming Soon [ ] A way to set replacement content when a block is hidden [ ] REST API exploration. Should be fine for non-authenticated requests, but need to dive deeper for auth’d requests [ ] Non-trivial dates. Think things like “Every Wednesday between 3pm and 4pm” or “First two weeks in November” [x] Geolocation: Show this block only to users whose connection is in France. [x] Specific Users: Show or hide a block to one or more specific users. [ ] Specific 3rd-party plugin integrations. Show a block when someone has purchased something from your WooCommerce store. Or when someone has submitted a specific Gravity Form. [ ] Do you have any feature requests? Let me know! Development Development is mostly done on github and releases are made there and here to the WordPress plugins directory.
Syntax-highlighting Code Block (with Server-side Rendering)
This plugin extends the Code block in WordPress core to add syntax highlighting which is rendered on the server. Pre-existing Code blocks on a site are automatically extended to include syntax highlighting. Doing server-side syntax highlighting eliminates the need to enqueue any JavaScript on the frontend (e.g. Highlight.js or Prism.js) and this ensures there is no flash of unhighlighted code (FOUC?). Reducing script on the frontend improves frontend performance, and it also allows for the syntax highlighted code to appear properly in AMP pages as rendered by the official AMP plugin (see also ampproject/amp-wp#972) or when JavaScript is turned off in the browser. This extended Code block uses language auto-detection to add syntax highlighting, but you can override the language in the block’s settings sidebar. (There is currently no syntax highlighting of the Code block in the editor, but see #8.) The plugin supports all programming languages that highlight.php supports (being a port of highlight.js). The Code block also is extended to support specifying lines to highlight which get marked up with mark elements (including in RSS feeds). There is also a checkbox for whether to show line numbers on the frontend (with the numbers being non-selectable). Lastly, given inconsistencies across themes regarding whether lines in a Code block should be wrapped, this plugin adds styling to force them to no-wrap by default, with a checkbox to opt in to wrapping when desired. For advanced usage, please see the plugin wiki. This plugin is developed on GitHub. See list of current issues with the plugin. Please feel free to file any additional issues or requests that you may come across. Pull requests are welcome. See contributing information. Credits This is a fork of Code Syntax Block by Marcus Kazmierczak (mkaz), which is also available on WordPress.org. Copyright (c) 2018 Marcus Kazmierczak. Licensed under GPL 2.0 or later. highlight.php is released under the BSD 3-Clause License. Copyright © 2006-2013, Ivan Sagalaev (maniac@softwaremaniacs.org), highlight.js (original author). Copyright © 2013, Geert Bergman (geert@scrivo.nl), highlight.php