This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -eo pipefail | |
main() { | |
local folder=/path/to/backup/folder/ | |
local today=$(date +%F) | |
local user="YOUR MYSQL USERNAME" | |
local password="YOUR MYSQL PASSWORD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = [ | |
'title' => 'Group', | |
'fields' => [ | |
[ | |
'type' => 'group', | |
'id' => 'group', | |
'clone' => true, | |
'fields' => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = array( | |
'title' => 'Test', | |
'fields' => array( | |
array( | |
'type' => 'select_tree', // or checkbox_list | |
'id' => 'cb', | |
'name' => 'Hierarchical checkboxes', | |
'options' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This demo shows you how to save WYSIWYG field content created by Meta Box plugin as post content. | |
* | |
* @link https://metabox.io/docs/how-to-save-wysiwyg-content-as-post-content | |
*/ | |
add_action( 'init', function () { | |
// Remove the editor for the post type. | |
remove_post_type_support( 'post', 'editor' ); // Change 'post' to your custom post type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_boxes[] = array( | |
'title' => __( 'Content blocks' ), | |
'post_types' => 'page', | |
'fields' => array( | |
array( | |
'id' => 'content-block', | |
'type' => 'group', | |
'clone' => true, | |
'sort_clone' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_dequeue_style( 'font-awesome' ); | |
wp_dequeue_script( 'jquery-magnificpopup' ); | |
wp_dequeue_style( 'jquery-magnificpopup' ); | |
wp_dequeue_script( 'jquery-waypoints' ); | |
wp_dequeue_script( 'imagesloaded' ); | |
wp_dequeue_script( 'jquery-throttle' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = array( | |
'title' => 'Section Hero', | |
'post_types' => 'page', | |
'fields' => array( | |
array( | |
'id' => 'hero_title', | |
'name' => 'Title', | |
'type' => 'text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); | |
function your_prefix_register_meta_boxes( $meta_boxes ) { | |
$meta_boxes[] = array ( | |
'title' => 'Flexible Field Example', | |
'post_types' => 'page', | |
'fields' => array( | |
array ( | |
'id' => 'sections', | |
'type' => 'group', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove styles of plugin | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
add_filter( 'bbp_default_styles', '__return_empty_array' ); | |
// Remove bbPress scripts on non-bbPress pages | |
add_filter( 'bbp_default_scripts', function ( $scripts ) | |
{ | |
return is_bbpress() ? $scripts : [ ]; | |
} ); |