How to make repeated component/block in Gutenberg

I think the best way to approach this is by creating 2 blocks with a parent -> child relationship. The child block would be a nested block only available within its parent block. Note the parent defined below. registerBlockType( ‘prefix/childblock’, { title: __( ‘Inner Child Block’ ), parent: [‘prefix/parentblock’], attributes:{ …//the rest of your block … Read more

How to edit the properties of a page programmatically?

If you look at the documentation, you can insert title, content, slug, etc. using wp_insert_post then use update_post_meta to assign the template to that post. You can write like this $post_arr = array( ‘post_title’=>’My title goes here’, ‘post_content’=>’This is my long content.’, ‘post_excerpt’ => ‘My Excerpt’, ‘post_status’ => ‘publish’, ); $new_post_id = wp_insert_post($post_arr); Then set … Read more

“Donate to this plugin” for WordPress.org Plugin Authors

It is read from the infos on your plugins readme.txt. Example from my Default Values for Attachments === Plugin Name === Contributors: moraleida.me Donate link: http://moraleida.me/ Tags: attachments, default values, caption, title, description Requires at least: 2.5 Tested up to: 3.3.2 Stable tag: 0.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html

Add content to /wp-admin/plugin-install.php admin screens

Without extending the class, what can be done is adding a Custom Action Link: add_filter( ‘plugin_install_action_links’, ‘action_links_wpse_119218’, 10, 2 ); function action_links_wpse_119218( $links, $plugin ) { if( isset( $_GET[‘tab’] ) ) { switch( $_GET[‘tab’] ) { case ‘featured’: $links[‘my-action’] = “Tested up to <a href=”#”>{$plugin[‘tested’]}</a>”; break; case ‘popular’: $links[‘my-action’] = “Requires <a href=”#”>{$plugin[‘requires’]}</a>”; break; case … Read more

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