Props to @pento mentioning this method in comment.
cd /srv/www/wp-cli
git checkout -- .
git pull origin master
composer update
<?php | |
$key = $wpdb->get_blog_prefix( get_current_blog_id() ) . 'capabilities'; | |
// Setup new meta query for user Roles | |
$meta_query = array( | |
'relation' => 'OR', | |
array( | |
'key' => $key, | |
'value' => 'administrator', | |
'compare' => 'LIKE' |
<section> | |
<div class="newspaper"> | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. | |
</div> | |
</section> |
<?php | |
/** | |
* Register Team Members metabox as repeatable group fields. | |
*/ | |
function maintainn_team_members_metabox() { | |
$prefix = '_maintainn_team_'; | |
$cmb_group = new_cmb2_box( array( | |
'id' => $prefix . 'metabox', | |
'title' => __( 'Team Members', 'maintainn-demo' ), |
<?php | |
/** | |
* Handle Team shortcode. | |
* | |
* @param array $attr Array of shortcode attributes. | |
* @return string $output HTML | |
*/ | |
function maintainn_team_shortcode( $attr = array() ) { | |
// Get post object. |
http://jontai.me/blog/2013/01/advanced-scoring-in-elasticsearch/ | |
https://www.elastic.co/blog/stop-stopping-stop-words-a-look-at-common-terms-query | |
http://gibrown.com/2013/01/24/elasticsearch-five-things-i-was-doing-wrong/ | |
https://www.elastic.co/blog/searching-with-shingles | |
https://gist.github.com/jenwachter/30fe30d6714781a3d0ed |
Props to @pento mentioning this method in comment.
cd /srv/www/wp-cli
git checkout -- .
git pull origin master
composer update
<?php | |
function mamaduka_register_bp_component( $components, $type ) { | |
// Only display custom component when viewing 'All' and 'Optional'. | |
if ( ! in_array( $type, array( 'all', 'optional' ) ) ) { | |
return $components; | |
} | |
$components[] = array( | |
'bp-select-home' array( | |
'title' => __( 'Select Home', 'fp-stroke-community' ), |
<?php | |
namespace Mamdauka\WpQuerySpeed\Command; | |
use WP_CLI; | |
use WP_CLI\Utils; | |
use WP_CLI_Command; | |
use WP_Query; | |
use Symfony\Component\Stopwatch\Stopwatch; |
WooCommerce 3.5 introduced a new scalable, traceable job queue. This queue can be used by extensions and custom code to process large sets of jobs in the background, and track the lifecycle of those jobs. The default handler can also be replaced.
This guide explains how to use the queue APIs for adding jobs, and how to replace the default queue handler.
For flexibility and simplicity, each job is defined by an action hook.
const form = document.getElementById( 'acme-form' ); | |
// Checkboxe, select and radios are handled differently | |
const dataArray = Array | |
.from( form.elements ) | |
.filter( input => ( input.type === 'text' || input.type === 'textarea' ) ) | |
.map( input => { | |
return { [input.name] : input.value } | |
} ); |