I want to force secondary rows using WP_List_Table

My recommendation is to structure the array so that your variations become “regular rows”. I would use your implementation of prepare_items for that. Here your array is changed to something like that: $this->items = array( array( ‘id’ => 2, ‘page’ => ‘page2’, ‘url’ => ‘page2’, ‘alt-id’ => null, ‘alt-title’ => null ), array( ‘id’ => … Read more

Custom fields in the billing address section woocommerce

I have run into these issues before myself. I am not entirely sure it’s possible to get adjust the billing address box directly unless you adjust the actual email template for the emails. Specifically, if you have access to the file structure, look in the “/wp-content/plugins/woocommerce/templates/emails” folder of the WooCommerce Plugin. They are made to … Read more

Import bootstrap 5 and bootstrap icons in wp-admin backend

Basically, to add admin-style.css to admin: function wpdocs_enqueue_custom_admin_style() { wp_register_style( ‘custom_wp_admin_css’, get_template_directory_uri() . ‘/admin-style.css’, false, ‘1.0.0’ ); wp_enqueue_style( ‘custom_wp_admin_css’ ); } add_action( ‘admin_enqueue_scripts’, ‘wpdocs_enqueue_custom_admin_style’ ); Do approximately the same for Javascript. See https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/ And see https://wordpress.stackexchange.com/search?q=custom+css+admin

BuddyPress Edit activity function good practice

Looking at https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-functions.php there’s several functions: Activity Meta I found bp_activity_add_meta, bp_activity_delete_meta and bp_activity_update_meta in that file, e.g. bp_activity_update_meta: // Update activity meta counts. if ( bp_activity_update_meta( $activity_id, ‘favorite_count’, $fav_count ) ) { Activities It looks like these can be updated the same way wp_insert_post can be used to update a post, by calling bp_activity_add … Read more

Best approach to change mobile background image and adding its class

As I am extending core/group block to add option for setting different image for smaller displays I used render_block_core/group filter to add style tag. I am already adding data-mobile-background-image to each group for its mobile view background image so there is no need for updating it through ID as suggested by Tom J Nowell. Final … Read more