Plugin / Powerful Gutenberg Blocks and Templates – Ghost Kit

nK

Frequently Asked Questions (FAQ)

There are some plugins, enqueued with Ghost Kit on your page. If you don’t like the plugin and/or want to change it to your alternate plugin, you can disable it using filters. Example: add_filter( 'gkt_enqueue_plugin_font_awesome', '__return_false' ); Available filters: gkt_enqueue_plugin_font_awesome gkt_enqueue_plugin_object_fit_images gkt_enqueue_plugin_jarallax gkt_enqueue_plugin_swiper gkt_enqueue_plugin_gist_simple gkt_enqueue_plugin_scrollreveal
You can add templates in your theme, so users will be able to insert it on pages with a single click. This is a simple example of theme templates structure: wp-content/themes/YOUR_THEME/ghostkit/templates/ /first-template/ /content.php /thumbnail.png /second-template/ /content.php /thumbnail.png … content.php file content example: content thumbnail.png is not required, but strongly recommended, because users will see what template will look like after insertion.
By default Typography options used for Body, Headings, and Buttons. You can add custom options by extending typography using PHP filter: add_filter( 'gkt_custom_typography', 'my_gkt_custom_typography' ); function my_gkt_custom_typography( $custom_typography ) { // Add typography options for `.my-selector`. $custom_typography['my-selector'] = array( 'label' => esc_html__( 'My Selector', 'ghostkit' ), 'defaults' => array( 'font-family-category' => 'default', 'font-family' => '', 'font-size' => '', 'font-weight' => '', 'line-height' => '', 'letter-spacing' => '', ), 'output' => array( array( 'selectors' => '.my-selector', ), array( 'selectors' => '.editor-styles-wrapper .my-selector', 'editor' => true, ), ), ); // Add typography options for `.my-selector-2` with Font Size and Font Weight control only. $custom_typography['my-selector-2'] = array( 'label' => esc_html__( 'My Selector 2', 'ghostkit' ), 'defaults' => array( 'font-size' => '10px', 'font-weight' => '600', ), 'output' => array( array( 'selectors' => '.my-selector-2', ), array( 'selectors' => '.editor-styles-wrapper .my-selector-2', 'editor' => true, ), ), ); return $icons; }
By default icon picker contains FontAwesome icons. You can add any icons you want. First of all you need to enqueue these icons in editor and frontend pages to see it, then extend icon picker using PHP filter: // add icons list. add_filter( 'gkt_icons_list', 'my_gkt_icons' ); function my_gkt_icons( $icons ) { $icons['my-icons-pack'] = array( 'name' => 'My Icons', 'icons' => array( array( 'class' => 'fab fa-500px', 'keys' => '500px', ), array( 'class' => 'fab fa-500px', 'keys' => '500px', ), ... ), ); return $icons; } // add icons assets // will be automatically added in Editor and Frontend add_action( 'gkt_icons_enqueue_assets__my-icons-pack', 'my_gkt_icons_enqueue_assets' ); function my_gkt_icons_enqueue_assets( $icons ) { wp_register_script( 'my-icons-pack', plugins_url( '/assets/my-icons-pack/script.min.js', __FILE__ ), array(), '1.0.0' ); }
You should use default Gutenberg hooks to extend blocks functionality. Read more here: https://wordpress.org/gutenberg/handbook/designers-developers/developers/filters/block-filters/#block-style-variations
You can extend Gutenberg blocks save attributes using core hooks. Read more here: https://developer.wordpress.org/block-editor/developers/filters/block-filters/#blocks-getsavecontent-extraprops
On frontend there are a lot of jQuery events. Usage example: jQuery( document ).on( 'afterInitBlocks.ghostkit', function( evt, classObject ) { console.log( evt, classObject ); } ); Available events: beforeInit.ghostkit afterInit.ghostkit beforeInitBlocks.ghostkit afterInitBlocks.ghostkit beforePrepareCounters.ghostkit afterPrepareCounters.ghostkit beforeRunCounters.ghostkit afterRunCounters.ghostkit beforePrepareTabs.ghostkit afterPrepareTabs.ghostkit beforePrepareAccordions.ghostkit afterPrepareAccordions.ghostkit beforePrepareCarousels.ghostkit afterPrepareCarousels.ghostkit beforePrepareVideo.ghostkit afterPrepareVideo.ghostkit beforePrepareGist.ghostkit afterPrepareGist.ghostkit beforePrepareChangelog.ghostkit afterPrepareChangelog.ghostkit beforePrepareGoogleMaps.ghostkit beforePrepareGoogleMapsStart.ghostkit beforePrepareGoogleMapsEnd.ghostkit afterPrepareGoogleMaps.ghostkit beforePrepareSR.ghostkit beforePrepareSRStart.ghostkit beforeInitSR.ghostkit beforePrepareSREnd.ghostkit afterPrepareSR.ghostkit

Ratings

4.9
16 reviews

Rating breakdown

Details Information

Version

2.7.1

First Released

23 Jul, 2018

Total Downloads

23,536

Wordpress Version

4.9.0 or higher

Tested up to:

5.3

Require PHP Version:

5.4 or higher

Tags

Contributors

nK

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.