Gutenberg 14.3 Improves Image Drag and Drop

Category Image 091

Gutenberg 14.3 was released this week with drag-and-drop improvements for both the block editor and the site editor. Automattic-sponsored contributor Aaron Robertshaw published a video, illustrating how the block editor now supports  dropping an image onto an empty paragraph block to replace it with a new Image block.

The site editor has also added drag-and-drop capabilities for blocks and patterns in the new zoomed-out view, which was added in Gutenberg version 14.1. It zooms out to focus on building and composing patterns, allowing users to move sections around without affecting the inner blocks. It can be enabled under “Experiments.” In 14.3, users can drag blocks and patterns right onto the canvas with an overhead view that makes it easy to place in between existing blocks.

video source: Gutenberg PR #44402

This version also introduces new support for alt + arrow keyboard combinations for navigating blocks. Robertshaw explained how they work:

For example, if your cursor is towards the end of a long paragraph, you can quickly press alt + up arrow to move to the beginning of that paragraph. If you are already at the beginning of a text block, you’ll move to the start of the previous paragraph. Similarly, alt + down arrow will move you to the end of a block of text.

The Styles typography controls have been updated to include the Tools Panels that users have available in the Block Settings interface. This makes the experience more consistent and expands the capabilities to allow for resetting the values.

This release includes dozens of fixes and improvements to design tools, components, the Block API, and more. Check out the changelog in the announcement post for the full list of updates.

Gutenberg 14.3 will not be included in the upcoming WordPress 6.1 release but will be rolled into core the next time around. If you want these features now, you can install the Gutenberg plugin.

Shortcodes Ultimate Plugin Patches CSRF Vulnerability in Version 5.12.1

Wp Plugins

The Shortcodes Ultimate plugin, used on more than 700,000 WordPress sites for creating things like tabs, buttons, and accordions, has patched a vulnerability in version 5.12.1. The plugin’s changelog simply says, “This update fixes a security vulnerability in the shortcode generator. To the author’s credit, the changelog clearly denotes it as a security update, although it doesn’t offer specific details.

The vulnerability was reported by researcher Dave Jong at Patchstack and is logged at the National Vulnerability Database (NVD) as a Cross-Site Request Forgery (CSRF) vulnerability leading to plugin preset settings change. It was patched two weeks ago and the NVD published the advisory this week.

At this time, the vulnerability is not known to have been exploited, but users are advised to update to the latest version. Based on WordPress.org stats, 46% of the plugin’s user base is running on versions older than 5.12.x. The Shortcodes Ultimate plugin author has since released version 5.12.2, which fixes an issue with the Shortcode Generator Presets that was introduced in the previous update.

Smooth Panel Scroll Effects

Category Image 052

If you have browsed through our latest website roundup you might have seen the amazing website of Margot Priolet. I absolutely love the hero section effect when scrolling and I wanted to remake it and explore some variations including playing with transforms and filter effects.

So the initial view is a hero section like this:

When scrolling, an image section is revealed with an opacity effect. Here, there are many possibilities for variations.

After scrolling for a bit and triggering the effects on the images, we reach the final section.

This is how it all comes together:

This demo shows how to play with smaller images and the black and white filter.

Hope you enjoy this and find it useful!

Early Days of Container Style Queries

Featured Imgs 25

We’re still in suuuuuper early days with container queries. Too early for broad browser support, but Chromium already supports it, Safari started supporting it in version 16, and Firefox is presumably not far behind.

Most early days conversations revolving around container queries usually compare the syntax to media queries.

/* Stacked flex container */
.post {
  display: flex;
  flex-direction: column;
}

/* Change direction when viewport is 600px or wider */
@media(min-width: 600px) {
  .post {
    flex-direction: row;
  }
}

/* Define the container */
.posts {
  container-name: posts;
  container-type: inline-size;
}

.post {
  display: flex;
  flex-direction: column;
}

/* Query the container's min-width */
@container posts (min-width: 600px) {
  /* Change styles when `posts` container is 600px or wider */
  .post {
    flex-direction: row;
  }
}

Both of these are making queries for min-width: 600. The difference is that the media query is looking at the viewport’s width to trigger those style changes while the container query is looking at the computed width of the .posts element. Sweet!

But after listening to CSS Podcast Episode 59, Una and Adam poked at the future of container queries: style queries! The current working draft of the CSS Containment Module Level 3 spec defines container style queries:

container style query allows querying the computed values of the query container. It is a boolean combination of individual style features (<style-feature>) that each query a single, specific property of the query container.

But no examples on syntax just yet — only a brief description:

The syntax of a <style-feature> is the same as for a declaration, and its query is true if the computed value of the given property on the query container matches the given value (which is also computed with respect to the query container), unknown if the property or its value is invalid or unsupported, and false otherwise. The boolean syntax and logic combining style features into a style query is the same as for CSS feature queries. (See @supports.)

So, yes, given time we should expect to pull off something like this:

.posts {
  container-name: posts;
}

@container posts (background-color: #f8a100) {
  /* Change styles when `posts` container has an orange background */
  .post {
    color: #fff;
  }
}

That’s a pretty dumb example. One thing to note is that the container-type is no longer based on the container’s inline-size but by style. We could delcare that like so:

.posts {
  container-name: posts;
  container-type: style; /* unnecessary */
}

…but all container queries are style queries by default. Well. at least as it stands today. Miriam Suzanne has a nice outline of the possible issues that might pop up with that.

Where might querying a container’s styles come in handy? I don’t know yet! But my mind gos to a few places:

  • Custom property values: We’ve seen custom properties used like state indicators, such as the DRY-switching method Ana covered a while back. The value changes, and so do styles.
  • Alternate dark mode approach: Instead of basing it all on a body class change that re-assigns custom property values, maybe we can change an entire color palette if, say, the body background changes color.
  • More complex query conditions: Like, say, we want to apply styles when the size and style conditions for a container are met.

Una also mentioned in the CSS Podcast that container style queries could help prevent some awkward styling situations, like if we happen to have italicized text in an already italicized blockquote:

blockquote {
  container-name: quote;
}

@container quote (font-style: italic) {
  em, i, q, address {
    font-style: normal;
  }
}

Early Days of Container Style Queries originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Save Time and Engage Visitors with Content Sliders

Featured Imgs 13

Save Time and Engage Visitors with Content SlidersContent sliders are everywhere these days! They can also be very polarizing. Tons of people love them, while others despise them. But it’s important to realize that sliders aren’t a cure, they are merely a tool. This means that they need to be used appropriately and populated with great content in order for you to realize their main […]

The post Save Time and Engage Visitors with Content Sliders appeared first on WPExplorer.

Automate Boring Tasks With Hooks

Featured Imgs 23

Most developers hate doing things that could be automated.

As emphasized in this tweet, we often have to accept that we cannot do it. Fortunately, in the case of code reviews, a lot of things can indeed be automated. As my previous CTO told me once:

How to Add a Login Form in Your WordPress Sidebar

Category Image 091

Do you want to add a login form to your WordPress sidebar?

A login form in the WordPress sidebar allows users to quickly log in from anywhere on your website. Having easy access to a login form can increase sales for ecommerce sites, boost retention for online courses, and more.

In this article, we will show you how to easily add a custom login form to your WordPress sidebar.

How to add a login form in your WordPress

When and Why Do You Need a Custom Login Form in WordPress?

If you run membership websites, online stores, or sell online courses, then you likely need your users to login to perform certain actions.

Since the sidebar appears throughout a website, it makes the login form more noticeable and easily accessible from every page on the site.

Adding a login form to your WordPress sidebar makes it easy for users to sign in to their accounts quickly. This boosts engagement, provides a better user experience, and increases form conversions.

That said, let’s look at how to add a login form to your WordPress sidebar easily. We’ll show you how to add the default login form in the sidebar and create a custom login form.

You can click the links below to jump ahead to your preferred section.

Method 1: Adding Default WordPress Login Form in Sidebar

You can show the default WordPress login form in the sidebar of your website. This makes it super easy for users to enter their username and password to access the WordPress admin area.

For this tutorial, we’ll use the Astra theme. Do note that the options may vary depending on the WordPress theme you’re using.

To start, you need to go to Appearance » Widgets from your WordPress dashboard.

From here, you can click the ‘+’ button and scroll under the ‘Theme’ heading and click on the ‘Login/out’ widget block to add it to your sidebar.

Add a login out widget block

Next, you’ll see the ‘Login/out’ block in your widgets area. You can then enable the options to display login as a form.

When you’ve made the changes, click the ‘Update’ button at the top.

See a logout option and update widgets area

After that, you can visit your website to see the default WordPress login form in action.

Do note that you’ll be logged in if you immediately go check the form. Simply log out of your site to see how the form will appear to your members.

Default login form preview

Method 2: Adding a Custom Login Form Using WPForms Plugin

The default WordPress login form only offers a username and password field. However, you can create a custom user registration form with more fields and customization options.

The best way to do that is by using WPForms. It is the most popular WordPress form plugin, and the premium version of WPForms allows you to easily create WordPress login and registration forms with custom fields.

WPBeginner users can use the WPForms Coupon: SAVE50 to get 50% off on their purchases.

The first thing you need to do is install and activate the WPForms plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit WPForms » Settings page to enter your license key. You can get your license key from your WPForms account on their website.

Entering the WPForms license key

After verification, you need to go to WPForms » Addons page.

From here, you need to scroll down to the ‘User Registration Addon’ and click on the ‘Install Addon’ button.

The WPForms user registration addon

The addon will now automatically install and activate on your website.

You are now ready to create a custom WordPress login form. Simply visit WPForms » Add New page to launch the WPForms builder.

First, you need to enter a form name at the top and then select the built-in ‘User Login Form’ template. Simply hover over it and click the ‘Use Template’ button.

Select the user login form template

It will display the login fields pre-loaded in your form. You can click on a field to edit it or add new fields from the left column.

WPForms offers multiple form fields you can add using the drag-and-drop builder. For example, you can add a name or CAPTCHA form fields to the login form.

Customize your user login form

Afterward, head to the ‘Settings’ tab and click on the Confirmation section.

This is where you need to define what to do once a user successfully logs in to your site.

Go to confirmation settings

The options include a message, a custom page, or a redirect URL to any page on your site.

Ideally, you would want to redirect users to a page once they are logged in. This could be your homepage, WordPress admin panel, or any other page on your website such as their membership dashboard or client portal.

Next, you can click the ‘Save’ button at the top and exit the form builder.

Your login form is now ready. From here, you can add it to your WordPress sidebar.

Simply visit the Appearance » Widgets page in your WordPress admin area. On this page, add the ‘WPForms’ widget block in the sidebar widget area of your site.

Add WPForms widget block

Next, you can select your user login form from the dropdown menu.

You can view more options in the settings panel on your right. For instance, there are options to show the form title and description.

Edit form settings and update

Don’t forget to click the ‘Update’ button when you’re done.

You can now visit your website to see the custom login form.

Custom login form preview

You can also use WPForms to create a custom user registration form with anti-spam features.

We hope this article helped you learn how to add a login form in your WordPress sidebar. You may also want to see our step-by-step guide on how to start a WordPress blog and the best email marketing services for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add a Login Form in Your WordPress Sidebar first appeared on WPBeginner.

Why Do WordPress Themes Have to Be So Hard to Use on the Backend? (Hint: They Don’t!)

Featured Imgs 25

Whether you’ve designed websites with only a small handful of WordPress themes or have used dozens of them over the years, we can all agree on one thing: Many WordPress themes that are visually stunning on the frontend of a website end up being ugly as sin and difficult to use on the backend.

Why does it have to be that way?

It doesn’t. If a WordPress theme looks and feels great on the frontend, there’s no reason why its backend doesn’t as well. BeTheme is proof of this.

BeTheme is one of the top 5 best-selling WordPress themes of all time, with more than 260,000 sales and a 4.83-star user rating. In this post, we’re going to show you some of the ways in which this WordPress theme backend is going to make your life easier as a web designer.

Upgrade your workflow with a WordPress theme backend that doesn’t suck

After you install BeTheme, you’re going to notice something is different. Gone is the drab and oftentimes cluttered and unintuitive backend of WordPress. In its place, you’ll find a clean, attractive, and useful theme dashboard and tools.

Don’t worry. WordPress and all of its content management tools are still there. But when you’re inside of BeTheme, you’ll find yourself in a space that is at once visually appealing and so easy to use you’ll wonder why the rest of WordPress isn’t built this way.

If you haven’t been inside of BeTheme before (or even lately), join us as we walk through some of its best and most useful backend features:

1. Dashboard design

Your BeTheme dashboard will appear directly under the main WordPress Dashboard link. So there’s no need to sift through the sidebar trying to figure out where your theme settings are.

It’s not just convenient access that makes the BeTheme dashboard great. Click on BeTheme or the Dashboard link and you’ll discover:

  • Navigation bar that takes you to the most commonly used BeTheme tools
  • Status and plugin updates
  • Step-by-step website creator
  • New feature announcements
  • Latest pre-built websites
  • Theme registration information
  • Popular BeTheme integrations

Everything in the dashboard is here for the express purpose of helping you get more out of your WordPress theme. Whether it’s streamlining your website setup or discovering new features to use, the dashboard is there to help.

2. Dark/light mode

The research on dark mode and the benefits associated with it is inconclusive. That said, enough people have shown a preference for dark mode (which is why popular devices and apps offer the option now), so it could demonstrate big benefits on an individual basis.

The most common benefits that users report are reduced eye strain, better sleep, and longer lasting device batteries when using dark mode.

As a web designer, you’re working in front of a computer screen all day. If you find dark mode to be beneficial for any of these reasons, then you should find yourself a WordPress theme backend like BeTheme’s that enables you to toggle on dark mode.

3. Step-by-step website creator

When you first install a WordPress theme, it’s not always clear where you should go next. For instance, you know that your theme comes with demos, but where do you go to find them? Some themes bury their demos or pre-built websites inside their settings panel, so it can take some digging around.

BeTheme removes all the guesswork.

You’ll find the Setup Wizard under BeTheme as well as in the dashboard. Click on it and the step-by-step website creator will help you:

  • Name your website.
  • Choose your preferred editing mode.
  • Select a page builder to work in.
  • Pick the perfect pre-built website for your industry/niche.
  • Remove existing content and replace it with your new site.

This whole process takes less than 30 seconds to complete — from the moment you click the setup wizard button to the time it takes to load your new site and page builder into WordPress.

4. Pre-built site previews

BeTheme has over 650 pre-built websites, with new ones being added to the collection all the time. You’ll find them under the Websites link in the dashboard or under Pre-built websites under the BeTheme sidebar menu.

As a web designer, you’ll quickly become acquainted with the options that are available — and you may even find favorites you prefer to start with.

That said, you want to make sure you’re always designing websites using the latest and greatest design trends and styles. Because of this, BeTheme places previews of its newest pre-built sites in your dashboard.

Having the newest themes front and center will be useful in a number of ways. For starters, you’ll know when you have new sites to design with. Even if you choose not to use those sites (because you already have one you like, for instance), seeing the latest styles and features will be a good source of inspiration. Either way, this will enable you to utilize the latest design trends in your website designs going forward.

5. Plugin manager

The Plugins area of BeTheme isn’t the same thing as the Plugins area in WordPress. While there is some overlap, the purpose of the BeTheme plugins manager is to give you a place to:

  • View your actively installed plugins.
  • Update plugins that need it.
  • Install and activate recommended plugins for your pre-built website only when you need them.

It’s the last point that’s important to take note of. You won’t see any of these plugins in the WordPress plugins manager until you’ve installed them.

These recommendations come directly from BeTheme and can help you get more out of your theme and pre-built site. On the flipside of that, not installing them can also help you cut back on unnecessary plugins which will allow you to keep website performance high.

6. BeTheme support

WordPress might be the most powerful and popular content management system in the world. However, it’s a mostly community-driven platform when it comes to themes, plugins, and even providing support.

You shouldn’t have to dig through forum after forum on the WordPress.org website to find help or get answers to your questions. You shouldn’t need to leave your WordPress admin if you can help it at all either.

You won’t need to go far to get support for BeTheme.

Manual & Support are available from the BeTheme sidebar as well as the dashboard. From the support center, you’ll have access to self-support options like FAQs and Documentation. You can also submit a ticket for direct assistance.

7. Theme options

Many popular WordPress themes give users the ability to customize the theme settings. With BeTheme, in particular, you can set brand colors, choose custom fonts, establish global layouts, and configure things that are important for the user experience and SEO, like responsiveness, accessibility, and performance.

The one thing that can be annoying about these theme options is that the only way to modify them is from the main WordPress dashboard. So if you happen to be working on a page and realize the global button design hasn’t been configured or you’re dissatisfied with the default sidebar design, you have to save your changes and go to your theme’s backend.

With BeTheme, you don’t have to disrupt your workflow. You can modify your Theme Options right from where you are — be it the BeTheme dashboard or from inside the BeBuilder.

8. White label mode

The last area of the BeTheme WordPress theme backend you should know about is called BeCustom. You won’t find this under the dashboard, but you will find it under BeTheme on the sidebar.

This tool gives you the ability to white label BeTheme in certain areas. Here are some of the things you can do with BeCustom:

  • Swap out Be’s branding for your design business’s own.
  • Disable features that your client won’t need or that you don’t want them to have access to.
  • Create a custom WordPress login and change the look of it, simultaneously making it more user-friendly and secure.
  • Customize the “Welcome” message on the dashboard.

White labeling allows you to do a number of things.

First, by adding your own branding, it’ll give you a chance to reinforce your name with clients long after you complete their site. While BeTheme may be a name that designers know and trust, your clients will benefit more from seeing yours in there.

In addition, white labeling helps you make WordPress more user-friendly. If you want your clients to feel confident in owning and managing their websites after handoff, removing features they don’t need and making the WordPress theme backend more attractive will help.

Make your WordPress design projects easier to manage with BeTheme

What doesn’t BeTheme do?

For starters, it’s a multipurpose WP theme with hundreds of pre-built websites.

Secondly, it’s the fastest, most powerful page builder for WordPress, giving users control over every element within the UI.

And now BeTheme has become the best way to manage a web design project within WordPress.

Five Ways of Synchronising Multithreaded Integration Tests

558fe5180e0e8fc922d31c23ef84d240

A few weeks ago I wrote a blog on synchronizing multithreaded integration tests, which was republished on DZone Javalobby from where it received a comment from Robert Saulnier who quite rightly pointed out that you can also use join() to synchronize a worker thread and its unit tests. This got me thinking, just how many ways can you synchronise multi-threaded integration tests? So, I started counting... and came up with:

  1. Using a random delay.
  2. Adding a CountDownLatch
  3. Thread.join()
  4. Acquiring a Semaphore
  5. With a Future and ExecutorService


Build a WebAssembly Language for Fun and Profit: Lexing

Featured Imgs 23

WebAssembly (wasm) is a high-performance assembly-like format optimized for the web. Code targeting WebAssembly can run at near-native speeds while still benefiting from the safe environment of a browser VM. Wasm has opened up a whole new world of demanding desktop-class apps that can comfortably run in the browser. For example, AutoCAD was able to port decades of code to the web using wasm. Cases like AutoCAD’s have made it clear that wasm will be a major disruptive force in how web apps are developed.

To facilitate the adoption of wasm, WebAssembly team developed a powerful compiler toolchain library called binaryen. Binaryen does a huge amount of heavy lifting for compiler authors. It offers dead code removal, code size reduction, and various performance optimizations out of the box.

Top Tips for Powerful Data-Driven Storytelling

Featured Imgs 23

Do you struggle to communicate the insights behind your data powerfully? Is it a challenge getting the business to take action using the data at your disposal?

Data storytelling is the critical "last mile" of communication that transforms your findings into actionable insights that will drive change and add value.