What values can we use in `formattingControls` parameter in RichText component

So what is the complete list of supported values? The list of available format types is maintained in the core/rich-text store. You can query the store by running this code in your browser’s console, which will return an array containing the format types: wp.data.select( ‘core/rich-text’ ).getFormatTypes(); And as of writing, there are 10 default/core format … Read more

How to get multiple Action Hooks in an Array

If you want to hook into multiple actions, you have to call add_action multiple times. However, this is not so hard. Let’s take your plugin class as an example: class WPSE6526_getStatic // Always prefix your plugin with something unique, like your name. Here I used the question number { var $_renderTasksOn = array( ‘wp_insert_post’, ‘wp_insert_comment’, … Read more

How can I get the page url slug when ‘post_name’ returns an id?

Try this : $menu = get_term( $locations[$theme_location], ‘nav_menu’ ); $menu_items = wp_get_nav_menu_items($menu->term_id); foreach( $menu_items as $menu_item ) { $link = $menu_item->url; $title = $menu_item->title; $slug = basename($menu_item->url); } Pass the whole permalink to the basename function, which will automatically process the URL and give us only the slug.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)