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 | |
class Prefix_Custom_Admin_Columns extends MB_Admin_Columns_Post { | |
public function columns( $columns ) { | |
$columns = parent::columns( $columns ); | |
/** | |
* Add more column in a specific position | |
* | |
* @param string $position New column position. Empty to not specify the position. Could be 'before', 'after' or 'replace' | |
* @param string $target The target column. Used with combination with $position |
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 | |
/** | |
* 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 | |
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 | |
$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
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_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' ); |