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
/** | |
* To make it work you need : | |
* 1 - Set a translation in WPML for the custom post type | |
* 2 - flush permalinks | |
*/ | |
// Example custom post type snippet | |
add_action('init', function(){ | |
// Register 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
jQuery(function($){ | |
setTimeout(function(){ | |
$('.rwmb-clone').each(function(){ | |
var $this = $(this); | |
$this.prepend('<a href="#" class="rwmb-button copy-clone"><span class="dashicons dashicons-controls-repeat"></span></a>'); | |
}); | |
}, 500); | |
}); | |
( function( $, _, document, window, rwmb, i18n ) { |
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 MetaBoxClass { | |
function __construct(){ | |
// Set MetaBox | |
add_filter('rwmb_meta_boxes', array(&$this, 'my_meta_box')); | |
// Add new field 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 | |
class MyMetaBox { | |
function __construct(){ | |
add_filter('rwmb_meta_boxes', array(&$this, 'my_meta_box')); | |
} |
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 MyMetaBox { | |
function __construct(){ | |
add_filter('rwmb_meta_boxes', array(&$this, 'my_meta_box')); | |
add_action('wp_ajax_get_options', array(&$this, 'get_options')); | |
} |
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 MyMetaBox { | |
function __construct(){ | |
add_filter('rwmb_meta_boxes', array(&$this, 'my_meta_box')); | |
add_action('wp_ajax_get_options', array(&$this, 'get_options')); | |
} |
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
__ __ __ __ | |
\ V\ V\ V / Varying Vagrant Vagrants | |
\_/\_/\_/ v2.4.0-git::master | |
Platform: linux-gnu shell:/bin/zshsystemd CaseSensitiveFS | |
Vagrant: 2.2.2 | |
VirtualBox: 5.2.22r126257 | |
Docs: https://varyingvagrantvagrants.org/ | |
Contribute: https://github.com/varying-vagrant-vagrants/vvv |