WordPress 6.1 Retires Default Site Tagline in Favor of Empty String

Featured Imgs 23

WordPress’ default site tagline, “Just another WordPress site,” is now a thing of the past, though not yet fully retired to the realm of nostalgia. The recent 6.1 release resolved a ticket that lead developer Mark Jaquith opened 15 years ago to encourage people to change their taglines. The tagline has now been changed to an empty string for new installations. This was added as a note of interest in the 6.1 release post, which was the first place many learned about it:

“The site tagline is empty by default in new sites but can be modified in General Settings.”

For those who are sentimental about the tagline, rest assured that it has been preserved as placeholder text in the admin.

“I do think the easier solution is to replace the ‘Just another WordPress site’ value with a placeholder,” WordPress Core Committer Jb Audras said in the discussion on the ticket. “By doing this, we keep this sentence which is in my opinion part of the WordPress history —by doing so, it would at least appear on the Settings screen, so we keep this signature sentence somewhere on the admin— but the value is empty by default for new installs.”

This is the solution he committed, which landed in 6.1. The commit message identifies the reasoning behind the change:

Administration: Change default site tagline to an empty string.

This changeset replaces the default “Just another WordPress site” tagline with an empty string for new installations. The reasoning is:

  1. Not all themes display the tagline;
  2. Not everyone changes the default tagline;
  3. When people don’t see the tagline in their theme, they may not realize it is still visible in some places, like feeds.

The string “Just another WordPress site” and the related multisite string: “Just another {NETWORK} site” are now only used as a placeholder for the tagline admin option.

The advent of block themes was also another factor, since the Customizer was where users often managed their taglines in the past. Contributors concluded that the increasing use of block themes might result in more people who have the default tagline on their sites without even knowing about it. The conclusion was it is better to make it an empty string than to add a bunch of admin prompts to update it.

This is a welcome change to how taglines are presented, and it was past time to update it. Although most WordPress professionals had become accustomed to it, more casual users often searched for how to get rid of it, sometimes without knowing it could be customized. The message also wasn’t doing WordPress any favors, unless it was originally written to imply WordPress’ ubiquity on the web – a claim that was aspirational at the time it was first committed to core. In that case, it has long since served its purpose. An empty string ensures that the only taglines showing up for new installations are ones that admins intentionally wrote for their sites.

Tired of focus styles applying on mouse clicks? :focus-visible is the trick.

Category Image 091

Having focus styles for any interactive element is crucial on a website. Hidde de Vries:

Focus indicators make the difference between day and night for people who rely on them. […]

Focus outlines help users figure out where they are on a page. They show which form field is currently filled in, or which button is about to be pressed. People who use a mouse, might use their cursor for this, but not everyone uses a mouse. For instance, there are many keyboard users: a person with a baby on one arm, people with chronic diseases that prevent the use of a mouse, and of course… developers and other power users.

You don’t have to create your own :focus styles in CSS, although you can. By default, browsers apply their own styles to interactive elements. But if you don’t like that look, the temptation is to style your own. So if you do something like this, boom, we’ve got focus styles under our control:

button:focus {
  outline: 5px solid red;
}

(By the way, outline is a great friend to focus styles for reasons Manuel Matuzovic gets into.)

But by doing this, we’ve also done something else: we’ve made it so when you click (like with a mouse on a desktop computer, otherwise known as a fine pointer) those :focus styles apply to the element. This can be highly undesirable, leading to the CEO being all like why does the button change looks when I click it??? Fair enough, CEO, let’s fix it.

The trick is using :focus-visible which is relatively new but has pretty solid browser support. The whole point of it is applying focus styles that apply at all times an element takes focus, except when a fine pointer clicks it. Which is kinda perfect really. But if you’re nervous about going all-in on only using :focus-visible, a way to continue to use :focus styles too is to wrap them in an @supports block like:

@supports not selector(:focus-visible) {
    button:focus {
        
    }
}

Fortunately, the browser support for @supports and the selector() function is a bit better than :focus-visible, so this buys some additional browser support 🎉.

Pen:

The post Tired of focus styles applying on mouse clicks? :focus-visible is the trick. appeared first on CodePen Blog.

LEFT JOIN 3 tables with where date GROUP BY and SUM

Category Image 101

i have 3 tables : users, deposit, withdraw
table users :

id , username, referral
  1. 1, a1, null
  2. 2, a2, a1
  3. 3, a3, a2
  4. 4, a4, a1
  5. 5, a5, a2

table deposit :

id, users_id, amount, status, approve_date
  1. 1, 1, 10000.00, approve, 2022-10-01 14:52:53
  2. 2, 3, 10000.00, approve, 2022-10-01 14:52:53
  3. 3, 3, 10000.00, approve, 2022-10-01 14:52:53
  4. 4, 3, 10000.00, approve, 2022-10-01 14:52:53
  5. 5, 5, 10000.00, approve, 2022-10-01 14:52:53

table withdraw :

id, users_id, amount, status, approve_date
  1. 1, 1, 20000.00, approve, 2022-10-01 14:52:53
  2. 2, 3, 10000.00, approve, 2022-10-01 14:52:53
  3. 3, 3, 30000.00, approve, 2022-10-01 14:52:53
  4. 4, 3, 40000.00, approve, 2022-10-01 14:52:53
  5. 5, 5, 100000.00, approve, 2022-10-01 14:52:53

I would like to have the below end result, how do I combine the 3 tables together? The end result is sorted by SUM(deposit.amount) SUM(withdraw.amount) and where by approve date and search by referral . I apologize for couldn't display table data in a nice format for easier viewing. Thank you for your help.
what is try is like this sql code :

SELECT a.`referral`, a.`id`, a.`username`, SUM(b.`amount`) AS Total,SUM(c.`amount`) AS Totals FROM users a 
LEFT JOIN  `deposit` b ON a.`id` = b.`user_id` 
LEFT JOIN  `withdraw` c ON a.`id` = c.`user_id` 
WHERE 1
AND b.`approve_date` >= '2022-10-01 00:00:00' 
AND b.`approve_date` <= '2022-11-04 23:59:59' 
AND b.`status` = 'approve'
AND c.`status` = 'approve'
AND a.`referral` = 'a1' 
GROUP BY b.user_id,c.user_id
ORDER BY a.`id` DESC 
LIMIT 500 OFFSET 0

the result i want is like this:

username, total_deposit, total_withdraw

  1. a3, 30000, 80000