Visual Composer shortcodes are normally not converted within the WordPress REST API rendered output.
This can be accomplished by calling WPBMap::addAllMappedShortcodes();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
add_action( 'rest_api_init', function () { register_rest_field( 'page', 'content', array( 'get_callback' => 'convert_do_shortcodes', 'update_callback' => null, 'schema' => null, ) ); }); function convert_do_shortcodes( $object, $field_name, $request ) { WPBMap::addAllMappedShortcodes(); // This does all the work global $post; $post = get_post ($object['id']); $output['rendered'] = apply_filters( 'the_content', $post->post_content ); return $output; } |
onmount allows you to detect when a DOM element appears and when it exits. No dependencies!
1 2 3 4 5 6 7 |
onmount = require('onmount') onmount('.push-button', function () { $(this).on('click', function () { alert('working...') }) }) |
Player.js is a library that allows you to programmatically control video and audio within iFrames across a number of services.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
var player = new playerjs.Player('iframe'); player.on('ready', function(){ player.on('play', function(){ console.log('play'); }); player.getDuration(function(duration){ console.log(duration); }); if (player.supports('method', 'mute')){ player.mute(); } player.play(); }); |
“Schema.org is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond.”
This shared vocabulary from Google, Bing and Yahoo helps to understand your content!
This shows how to associate your logo with your organization.
1 2 3 |
<a href="http://www.yoursite.com/"> <img src="http://www.yoursite.com/your_logo.jpg" alt="Your logo" /> </a> |
1 2 3 4 5 |
<div itemscope itemtype="http://schema.org/Organization"> <a itemprop="url" href="http://www.yoursite.com/"> <img itemprop="logo" src="http://www.yoursite.com/yourlogo.jpg" alt="Your wonderful logo"/> </a> </div> |
Clients: Facebook Messenger, Twillio, Twitter, WebSocket :)
1 2 3 4 5 6 7 8 9 |
import Bottr from 'bottr'; let Bot = new Bottr.Bot() bot.on('message_received', (message, session) => { session.send('Hello World!') }) bot.listen() |
“Copying text to the clipboard shouldn’t be hard. It shouldn’t require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn’t depend on Flash or any bloated framework. That’s why clipboard.js exists.”
Custom landing pages for new car models, option to request testdrive, get an offer or request additional material.
SpinThatShit is a set of SCSS mixins for single element loaders and spinners.
1 |
<div class="your-loader"></div> |
1 2 3 |
.your-loader { @include loader09($size: 10px, $height: 48px, $gap: 8px, $duration: 1s, $align: middle); } |
Art-list makes it simple and affordable to license high-quality music from real musicians.
For a subscription fee of $199/ yr you can use all of their music for your next video project.