SlideShare ist ein Scribd-Unternehmen logo
1 von 30
WordPress Beirut 16th Meetup - September
7:00 - Mingle/Networking/coffee/Hello
7:10 - Intro
7:15 - How Gutenberg will Change WordPress
8:00 - Break
8:15 - WordPress Performance
9:00 - Closing
fb.com/wpbeirut
wpbeirut.org
WhatsApp Group
Ali Basheer @alibasheer
WordPress Developer
At Strategies dC
How did you heard about the
meetup
● Previous WP Meetup
● Facebook
● Friend
● WordPress admin widget
WordPress Beirut
● Contribution
● Every 1st Tuesday/Month
● Started July 2017
● One of 600 WP Meetups
Arabic community
status:
● Lebanon
○ active since June 2017
● Egypt
○ active since January 2018
● Jordan
○ 1 meetup on February 2016
● UAE
○ 1 meetup on Aug 2014
do_action Beirut
July 2017
● Volunteering to build
website for NGOs
● In 1 day
● 30+ volunteer
● 3 websites created
● We will announce new one
soon
do_action Beirut 2018
Saturday 20th of October
8:00am to 8:00pm
● Saida or Beirut
● Co-organizers and Volunteers:
○ Ghassan Hashem
○ Hiyam Matar
○ Rani Barbir
○ Mohamed Farhat
● NGOs
● Event day volunteers
You can Help:
● Speak at meetup (45min)
○ No level of experience
○ Your Story with WP
○ SEO topic
○ Business & Freelance
○ Content & branding
● Suggest ideas/topics
● Spread the word
● Start a meetup
Gutenberg
Johannes Gutenberg
Fadi Zahhar
Modern Full-
Stack Developer
Softwares claims
WYSIWYG in 90’s
● Fireworks
● Dreamweaver
● Flash
● Front Page
WYSIWYG
Wordpress
WYSIWYG
● Is it a true WYSIWYG!
WYSIWYG
Wordpress
WYSIWYG
● It is another lie!
● We can call it what you
see is why you get
without the header, or
footer or sidebar or any
option in the theme only
content… bla bla bla.
WYSIWYG
Wordpress is old
15 Years ago.
● Used for old screens
● Today, we have Laptops,
Tablets, Mobile, VR
WYSIWYG
Purpose
● Provide users with a
more modern toolset
● Allowing for greater
freedom
Aims
● To transform the core
content editing system
Is Not
● Looking to make the
entirety of wordpress into
a drag-and-drop builder.
Purpose, Aims and what is not
Gutenberg
Blocks and Embeds
● The new blocks contain many of
the old favorites when it comes
to content: text, images,
galleries, hero images,
corresponding service embeds,
and more. In addition, new
blocks can be easily created,
allowing developers to give
clients highly customized
building blocks for their own
site.
Blocks and Embeds
Developers would previously have been required to create any
page-specific templates, but these can now be created by most
users.
Possibilities
Imagine defining a whole page
template as a set of default
blocks, ready to be filled once
the user creates a page. (Matias
Ventura)
You can feed in a template of
wordpress.
Contextual Enhancements
Yoast is trying to put notifications into blocks and tell you
if they are good for SEO or not.
Possibilities
Gutenberg aims to give
developers a way to define and
protect structural markup and
their design while giving users
the ability to directly edit the
information intuitively. (Matias
Ventura)
You can feed in a template of
wordpress.
Be your own builder
https://wordpress.org/gutenberg/files/2018/07/Insert-
Block-2-1.gif
https://wordpress.org/gutenberg/files/2018/08/Builder.gi
f
Possibilities
● Layout Selector
● Repeatable Block
● The web won’t be a rectanglar
screen, in the future will be in all
view, and then possible VR.
Gutenberg have the possibility
for that, since it is a block
concept.
Warning for WP 5.0
● Metaboxes won’t be the same
● Which plugins need updating for
Gutenberg?
○ Custom post types
○ Complex metaboxes
○ Shortcodes
○ Editor featuers
How to Prepare Your Plugins for
WordPress Gutenberg
Simple metaboxes should
work with Gutenberg out of
the box, although they will be
displayed differently.
However, if you have
complex Metaboxes such as
the one in the Yoast SEO
plugin, then you'll have to test
it against Gutenberg and
maybe create a new one just
for Gutenberg.
Support or do not
support this is the
question!
● Support Gutenberg
● Disable Gutenberg
Two approaches no third.
Supporting Gutenberg
would mean that we will put
extra effort into refactoring
our code (maybe even
duplicating some) so that
our plugin users won't have
any difficulty using it..
Disabling
Gutenberg
● Completely
● Per Post Type
How to Disable Gutenberg
We can disable Gutenberg
completely or only where
our plugin is being used. In
this section, I will take my
own plugin "Simple
Giveaways" that has a
custom post type and also
metaboxes.
Disabling
Gutenberg
● Completely
<?php
add_filter(
'gutenberg_can_edit_post_type',
'__return_false' );
Disabling Gutenberg Completely
This is something I would
not recommend doing
from your plugin. Instead,
you might want to inform
your plugin users with an
admin notice that your
plugin doesn't work with
Gutenberg so that they can
revert back to the Classic
Editor.
Reverting can be done by
installing the plugin Classic
Editor.
This filter can be found in the function
gutenberg_can_edit_post_type which is
used to check if Gutenberg can be
loaded on that particular post type. If
we always return false, then it means
that we won't support Gutenberg at all.
Disabling
Gutenberg
● Per Post Type
<?php
$args = array(
'label' => __( 'Simple Giveaways',
'giveasap' ),
'labels' => $labels,
'supports' => array(
'title',
//'editor', Disabling Gutenberg
'thumbnail',
),
'hierarchical' => false,
// ...
);
register_post_type( 'giveasap', $args );
Disabling Gutenberg per Post Type
If your plugin has a custom
post type, then you may
want to disable Gutenberg
for that particular post
type. To disable Gutenberg
for your custom post type,
you can just change your
post type configuration.
Maybe you need the editor but you don't
need it in the REST API? Gutenberg
won't load if you don't support the REST
API. Similarly to the above example, we
will do that in the post type
configuration.
<?php
$args = array(
'label' => __( 'Simple
Giveaways', 'giveasap' ),
// ...
'show_in_rest' => false, //
Disable Gutenberg
// ...
);
register_post_type( 'giveasap',
Disabling
Gutenberg
● Per Post Type
<?php
add_filter(
'gutenberg_can_edit_post_type',
function( $can_edit, $post_type ){
if ( $can_edit && 'giveasap' ===
$post_type ) {
return false;
}
return $can_edit;
}, 20, 2 );
Disabling Gutenberg per Post Type
We can use the previously
mentioned filter to disable
Gutenberg only for our
custom post type.
With this code, we are checking if we are on our custom post type. If
we are, then just return false. This won't affect any other post types.
Disabling
Gutenberg
● With Metaboxes
<?php
add_meta_box(
'giveasap_users',
__( 'Users', 'giveasap' ),
'giveasap_metabox_users',
array( 'giveasap' ),
'side',
'high',
array(
// Not Compatible. Disable
Gutenberg.
'__block_editor_compatible_meta_box'
=> false,
)
);
Disabling Gutenberg With Metaboxes
If you have complex
metaboxes, maybe it would
take too long for you to
create a version of your
plugin that could support
Gutenberg. If that's the
case, you can disable
Gutenberg until you have
something that works with
Gutenberg.
Support Gutenberg
● What is Static Block
● What is Dynamic Block
● Demo in writing gutenberg Block
● Introduction video:
https://www.youtube.com/watc
h?v=yXBTE2hBnII
● Demo Repository:
https://github.com/wpbeirut/Un
derstanding_Gutenberg_Plugin
How to Support Gutenberg
Work on making new
blocks for your shortcodes
and even widgets.
Create Static and dynamic
blocks.
Questions?
Thank You.

Weitere ähnliche Inhalte

Ähnlich wie WordPress Beirut 16th meetup September

Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
Hristo Chakarov
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Session
pamselle
 

Ähnlich wie WordPress Beirut 16th meetup September (20)

Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
 
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
 
Introducing gutenberg
Introducing gutenbergIntroducing gutenberg
Introducing gutenberg
 
Embracing the Change: How to Win with Gutenberg
Embracing the Change: How to Win with GutenbergEmbracing the Change: How to Win with Gutenberg
Embracing the Change: How to Win with Gutenberg
 
Word press gutenberg tutorial
Word press gutenberg tutorialWord press gutenberg tutorial
Word press gutenberg tutorial
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for Clients
 
Content Architectures in WordPress 5
Content Architectures in WordPress 5Content Architectures in WordPress 5
Content Architectures in WordPress 5
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Session
 
Wordpress Setup Guide
Wordpress Setup GuideWordpress Setup Guide
Wordpress Setup Guide
 
Word press beirut 12th meetup june
Word press beirut 12th meetup   juneWord press beirut 12th meetup   june
Word press beirut 12th meetup june
 
Power of mu plugins
Power of mu pluginsPower of mu plugins
Power of mu plugins
 
WordPress: After The Install
WordPress: After The InstallWordPress: After The Install
WordPress: After The Install
 
Wordpress beirut 22th meetup april
Wordpress beirut 22th meetup   aprilWordpress beirut 22th meetup   april
Wordpress beirut 22th meetup april
 
Blog Farm Pro Review
Blog Farm Pro ReviewBlog Farm Pro Review
Blog Farm Pro Review
 
10 rocking word press plugins that you might have missed wp-stuffs.com
10 rocking word press plugins that you might have missed   wp-stuffs.com10 rocking word press plugins that you might have missed   wp-stuffs.com
10 rocking word press plugins that you might have missed wp-stuffs.com
 
Why you should prefer Blogger
Why you should prefer Blogger Why you should prefer Blogger
Why you should prefer Blogger
 
Angular.js for beginners
Angular.js for beginners Angular.js for beginners
Angular.js for beginners
 
SEO for WordPress Blogs
SEO for WordPress BlogsSEO for WordPress Blogs
SEO for WordPress Blogs
 
Magento 2 Blog Manager
Magento 2 Blog ManagerMagento 2 Blog Manager
Magento 2 Blog Manager
 
ChatGPT Is Quite Good At Writing WordPress Plugins!
ChatGPT Is Quite Good At Writing WordPress Plugins!ChatGPT Is Quite Good At Writing WordPress Plugins!
ChatGPT Is Quite Good At Writing WordPress Plugins!
 

Mehr von Fadi Nicolas Zahhar

Mehr von Fadi Nicolas Zahhar (19)

Wordpress deployment on aws
Wordpress deployment on awsWordpress deployment on aws
Wordpress deployment on aws
 
Word press beirut 23st meetup may
Word press beirut 23st meetup   mayWord press beirut 23st meetup   may
Word press beirut 23st meetup may
 
Choose a template
Choose a templateChoose a template
Choose a template
 
Word press beirut 21st meetup march
Word press beirut 21st meetup   marchWord press beirut 21st meetup   march
Word press beirut 21st meetup march
 
Wordpress Beirut 21th meetup February
Wordpress Beirut 21th meetup   FebruaryWordpress Beirut 21th meetup   February
Wordpress Beirut 21th meetup February
 
Word press beirut 19th meetup January 2019
Word press beirut 19th meetup   January 2019Word press beirut 19th meetup   January 2019
Word press beirut 19th meetup January 2019
 
Design for devs psych
Design for devs psychDesign for devs psych
Design for devs psych
 
The Hiking Calendar - Christian Hölzl
 The Hiking Calendar - Christian Hölzl The Hiking Calendar - Christian Hölzl
The Hiking Calendar - Christian Hölzl
 
Word press beirut 17th meetup october
Word press beirut 17th meetup   octoberWord press beirut 17th meetup   october
Word press beirut 17th meetup october
 
WordPress 15th Meetup - Build a Child Theme
WordPress 15th Meetup - Build a Child ThemeWordPress 15th Meetup - Build a Child Theme
WordPress 15th Meetup - Build a Child Theme
 
WordPress 15th Meetup - Build a Theme
WordPress 15th Meetup - Build a ThemeWordPress 15th Meetup - Build a Theme
WordPress 15th Meetup - Build a Theme
 
Embarking on your own journey
Embarking on your own journeyEmbarking on your own journey
Embarking on your own journey
 
Word press beirut 14th meetup July
Word press beirut 14th meetup JulyWord press beirut 14th meetup July
Word press beirut 14th meetup July
 
14th Meetup WordPress Beirut - How WordPress helped us reach $200k in yearly ...
14th Meetup WordPress Beirut - How WordPress helped us reach $200k in yearly ...14th Meetup WordPress Beirut - How WordPress helped us reach $200k in yearly ...
14th Meetup WordPress Beirut - How WordPress helped us reach $200k in yearly ...
 
Wordpress Beirut understanding Gutenberg plugin
Wordpress Beirut understanding Gutenberg pluginWordpress Beirut understanding Gutenberg plugin
Wordpress Beirut understanding Gutenberg plugin
 
Wordpress 15th Anniversary - Wordpress Beirut Community 13th Meetup June - 2018
Wordpress 15th Anniversary - Wordpress Beirut Community 13th Meetup  June - 2018Wordpress 15th Anniversary - Wordpress Beirut Community 13th Meetup  June - 2018
Wordpress 15th Anniversary - Wordpress Beirut Community 13th Meetup June - 2018
 
Word press beirut 11th meetup may
Word press beirut 11th meetup   mayWord press beirut 11th meetup   may
Word press beirut 11th meetup may
 
Analytics webmaster tagmanager
Analytics webmaster tagmanagerAnalytics webmaster tagmanager
Analytics webmaster tagmanager
 
Word press beirut 9th meetup march
Word press beirut 9th meetup   marchWord press beirut 9th meetup   march
Word press beirut 9th meetup march
 

Kürzlich hochgeladen

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 

WordPress Beirut 16th meetup September

  • 1. WordPress Beirut 16th Meetup - September 7:00 - Mingle/Networking/coffee/Hello 7:10 - Intro 7:15 - How Gutenberg will Change WordPress 8:00 - Break 8:15 - WordPress Performance 9:00 - Closing fb.com/wpbeirut wpbeirut.org WhatsApp Group
  • 2. Ali Basheer @alibasheer WordPress Developer At Strategies dC
  • 3. How did you heard about the meetup ● Previous WP Meetup ● Facebook ● Friend ● WordPress admin widget
  • 4. WordPress Beirut ● Contribution ● Every 1st Tuesday/Month ● Started July 2017 ● One of 600 WP Meetups
  • 5.
  • 6. Arabic community status: ● Lebanon ○ active since June 2017 ● Egypt ○ active since January 2018 ● Jordan ○ 1 meetup on February 2016 ● UAE ○ 1 meetup on Aug 2014
  • 7. do_action Beirut July 2017 ● Volunteering to build website for NGOs ● In 1 day ● 30+ volunteer ● 3 websites created ● We will announce new one soon
  • 8. do_action Beirut 2018 Saturday 20th of October 8:00am to 8:00pm ● Saida or Beirut ● Co-organizers and Volunteers: ○ Ghassan Hashem ○ Hiyam Matar ○ Rani Barbir ○ Mohamed Farhat ● NGOs ● Event day volunteers
  • 9. You can Help: ● Speak at meetup (45min) ○ No level of experience ○ Your Story with WP ○ SEO topic ○ Business & Freelance ○ Content & branding ● Suggest ideas/topics ● Spread the word ● Start a meetup
  • 12. Softwares claims WYSIWYG in 90’s ● Fireworks ● Dreamweaver ● Flash ● Front Page WYSIWYG
  • 13. Wordpress WYSIWYG ● Is it a true WYSIWYG! WYSIWYG
  • 14. Wordpress WYSIWYG ● It is another lie! ● We can call it what you see is why you get without the header, or footer or sidebar or any option in the theme only content… bla bla bla. WYSIWYG
  • 15. Wordpress is old 15 Years ago. ● Used for old screens ● Today, we have Laptops, Tablets, Mobile, VR WYSIWYG
  • 16. Purpose ● Provide users with a more modern toolset ● Allowing for greater freedom Aims ● To transform the core content editing system Is Not ● Looking to make the entirety of wordpress into a drag-and-drop builder. Purpose, Aims and what is not Gutenberg
  • 17. Blocks and Embeds ● The new blocks contain many of the old favorites when it comes to content: text, images, galleries, hero images, corresponding service embeds, and more. In addition, new blocks can be easily created, allowing developers to give clients highly customized building blocks for their own site. Blocks and Embeds Developers would previously have been required to create any page-specific templates, but these can now be created by most users.
  • 18. Possibilities Imagine defining a whole page template as a set of default blocks, ready to be filled once the user creates a page. (Matias Ventura) You can feed in a template of wordpress. Contextual Enhancements Yoast is trying to put notifications into blocks and tell you if they are good for SEO or not.
  • 19. Possibilities Gutenberg aims to give developers a way to define and protect structural markup and their design while giving users the ability to directly edit the information intuitively. (Matias Ventura) You can feed in a template of wordpress. Be your own builder https://wordpress.org/gutenberg/files/2018/07/Insert- Block-2-1.gif https://wordpress.org/gutenberg/files/2018/08/Builder.gi f
  • 20. Possibilities ● Layout Selector ● Repeatable Block ● The web won’t be a rectanglar screen, in the future will be in all view, and then possible VR. Gutenberg have the possibility for that, since it is a block concept.
  • 21. Warning for WP 5.0 ● Metaboxes won’t be the same ● Which plugins need updating for Gutenberg? ○ Custom post types ○ Complex metaboxes ○ Shortcodes ○ Editor featuers How to Prepare Your Plugins for WordPress Gutenberg Simple metaboxes should work with Gutenberg out of the box, although they will be displayed differently. However, if you have complex Metaboxes such as the one in the Yoast SEO plugin, then you'll have to test it against Gutenberg and maybe create a new one just for Gutenberg.
  • 22. Support or do not support this is the question! ● Support Gutenberg ● Disable Gutenberg Two approaches no third. Supporting Gutenberg would mean that we will put extra effort into refactoring our code (maybe even duplicating some) so that our plugin users won't have any difficulty using it..
  • 23. Disabling Gutenberg ● Completely ● Per Post Type How to Disable Gutenberg We can disable Gutenberg completely or only where our plugin is being used. In this section, I will take my own plugin "Simple Giveaways" that has a custom post type and also metaboxes.
  • 24. Disabling Gutenberg ● Completely <?php add_filter( 'gutenberg_can_edit_post_type', '__return_false' ); Disabling Gutenberg Completely This is something I would not recommend doing from your plugin. Instead, you might want to inform your plugin users with an admin notice that your plugin doesn't work with Gutenberg so that they can revert back to the Classic Editor. Reverting can be done by installing the plugin Classic Editor. This filter can be found in the function gutenberg_can_edit_post_type which is used to check if Gutenberg can be loaded on that particular post type. If we always return false, then it means that we won't support Gutenberg at all.
  • 25. Disabling Gutenberg ● Per Post Type <?php $args = array( 'label' => __( 'Simple Giveaways', 'giveasap' ), 'labels' => $labels, 'supports' => array( 'title', //'editor', Disabling Gutenberg 'thumbnail', ), 'hierarchical' => false, // ... ); register_post_type( 'giveasap', $args ); Disabling Gutenberg per Post Type If your plugin has a custom post type, then you may want to disable Gutenberg for that particular post type. To disable Gutenberg for your custom post type, you can just change your post type configuration. Maybe you need the editor but you don't need it in the REST API? Gutenberg won't load if you don't support the REST API. Similarly to the above example, we will do that in the post type configuration. <?php $args = array( 'label' => __( 'Simple Giveaways', 'giveasap' ), // ... 'show_in_rest' => false, // Disable Gutenberg // ... ); register_post_type( 'giveasap',
  • 26. Disabling Gutenberg ● Per Post Type <?php add_filter( 'gutenberg_can_edit_post_type', function( $can_edit, $post_type ){ if ( $can_edit && 'giveasap' === $post_type ) { return false; } return $can_edit; }, 20, 2 ); Disabling Gutenberg per Post Type We can use the previously mentioned filter to disable Gutenberg only for our custom post type. With this code, we are checking if we are on our custom post type. If we are, then just return false. This won't affect any other post types.
  • 27. Disabling Gutenberg ● With Metaboxes <?php add_meta_box( 'giveasap_users', __( 'Users', 'giveasap' ), 'giveasap_metabox_users', array( 'giveasap' ), 'side', 'high', array( // Not Compatible. Disable Gutenberg. '__block_editor_compatible_meta_box' => false, ) ); Disabling Gutenberg With Metaboxes If you have complex metaboxes, maybe it would take too long for you to create a version of your plugin that could support Gutenberg. If that's the case, you can disable Gutenberg until you have something that works with Gutenberg.
  • 28. Support Gutenberg ● What is Static Block ● What is Dynamic Block ● Demo in writing gutenberg Block ● Introduction video: https://www.youtube.com/watc h?v=yXBTE2hBnII ● Demo Repository: https://github.com/wpbeirut/Un derstanding_Gutenberg_Plugin How to Support Gutenberg Work on making new blocks for your shortcodes and even widgets. Create Static and dynamic blocks.

Hinweis der Redaktion

  1. Send co-organizers do_action documentation and resources - by Ali