View getwid-add-custom-fonts.js
// hook allows to disable Google Fonts | |
wp.hooks.addFilter('getwid.fontsControl.enableGoogleFonts', 'getwid', function (enabled) { | |
// current Google Fonts status(load or not) is passed to function as parameter | |
// should return true or false | |
// if return false - Google Fonts won't be loaded | |
return enabled; | |
}); | |
// hook allows to filter lists of fonts and add custom | |
wp.hooks.addFilter('getwid.fontsControl.fonts', 'getwid', function (fonts) { |
View getwid-dequeue-styles.php
<?php | |
/** | |
* The code below removes the loading of some assets | |
* needed for the Getwid blocks on frontend | |
* | |
* Uncomment the element of the array that you want | |
* to prevent from loading | |
*/ | |
add_filter( 'getwid/blocks_style_css/dependencies', 'my_theme_dequeue_getwid_styles', 99 ); |
View motopress-demo-add-user-to-blog.php
<?php | |
/* | |
* Plugin Name: MotoPress Demo - Add User to Sandbox | |
* Plugin URI: https://motopress.com | |
* Description: This plugin allows you to add registered user to a new Sandbox. | |
* Author: MotoPress | |
* Version: 1.0 | |
* Author URI: https://motopress.com | |
* Network: True |
View Add font with icons to Getwid plugin
<?php | |
/* | |
* Add font with icons to Getwid plugin. | |
* Use this code in functions.php or custom plugin. | |
*/ | |
// add hook | |
add_action( 'getwid/icons-manager/init', 'my_theme_getwid_add_custom_icons' ); |
View gist:9137cef5ace249833ce462b4bbb6ec0a
add_action( 'wp_print_styles', 'my_theme_wp_print_styles' ); | |
function my_theme_wp_print_styles() { | |
if ( is_front_page() ) { | |
wp_dequeue_style('mpce-theme'); | |
wp_dequeue_style('mpce-bootstrap-grid'); | |
wp_dequeue_style('mpce-font-awesome'); | |
} | |
} |
View gist:d5bf1e7d6d6bf7dc0b5e
<?php | |
/* | |
Plugin Name: MotoPress Visual Controls Example | |
Plugin URI: http://www.getmotopress.com/ | |
Description: Example of the visual controls for object | |
Version: 1.0 | |
Author: MotoPress | |
Author URI: http://www.getmotopress.com/ | |
*/ |
View gist:c54efbc51aa126083479
<?php | |
/* | |
Plugin Name: MotoPress Nested Shortcodes Example | |
Plugin URI: http://www.getmotopress.com/ | |
Description: Example of the Nested Shortcodes in MotoPress Content Editor plugin | |
Version: 1.0 | |
Author: MotoPress | |
Author URI: http://www.getmotopress.com/ | |
*/ |
View gist:e659a8cb30165c73d1d1
// mp_code & mp_text can be hidden only | |
$motopressCELibrary->getObject('mp_code')->setShow(false); | |
$motopressCELibrary->getObject('mp_text')->setShow(false); | |
$motopressCELibrary->removeObject('mp_heading'); | |
$motopressCELibrary->removeObject('mp_image'); | |
$motopressCELibrary->removeObject('mp_grid_gallery'); | |
$motopressCELibrary->removeObject('mp_image_slider'); | |
$motopressCELibrary->removeObject('mp_video'); | |
$motopressCELibrary->removeObject('mp_space'); |
View gist:93aa797aefaf7f4ed3d1
<?php | |
/* | |
Plugin Name: MotoPress Copyright Proof Fix | |
Plugin URI: http://www.getmotopress.com/ | |
Description: Disable Copyright Proof plugin (frustrate_copy.js) in MotoPress visual editor | |
Version: 1.0 | |
Author: MotoPress | |
Author URI: http://www.getmotopress.com/ | |
*/ |
View gist:e8236f4109cf90a222a2
<?php | |
/* | |
Plugin Name: MotoPress PressTicket Fix | |
Plugin URI: http://www.getmotopress.com/ | |
Description: Fixes an issue with PressTicket plugin by Toan Nguyen http://wpoffice.net/contact/. PressTicket plugin adds custom div to each the_content filter call. | |
Version: 1.0 | |
Author: MotoPress | |
Author URI: http://www.getmotopress.com/ | |
*/ |
NewerOlder