Categories
Linux Mastering Development

birth/crtime timestamp is recorded on one xfs but not the other xfs filesystem

Two different xfs filesystems on two different Fedora. Why one of them records Birth(crtime) in the inode and why the other one doesn’t? How to find the configuration/attribute differences between the two filesystems? #1 XFS v5 (Fedora 30): # stat tea.txt File: tea.txt Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fd01h/64769d […]

Categories
CMS Mastering Development Wordpress

How to contol an elments classes from multiple Gutenberg sidebar controls?

I am trying to extend the core/table block and copy-pasted, trail and errored me into something that is close to what I am trying to do. But I it’s not quite working as I like. I like to extend the Block to have toggle elements that control the classes on the <table> the block already […]

Categories
Mastering Development

How do I call a modal from a custom quill editor button

I have a custom button (embed) in my quill editor that uses the prompt to call the windows popup Now, I want to change the windows popup to a modal on the click of the embed button. I honestly don’t know how to go about this as this is my first time using a quill. […]

Categories
CMS Development Wordpress

Wrap post images with a link, not figure (image_send_to_editor doesn’t work)

The new version of WP wraps all images put into a post with a figure element, instead of a href. I tried to use this hook in my functions.php if( is_admin() ) { add_filter( ‘image_send_to_editor’, ‘wp_link_wrap’, 10, 8 ); function wp_link_wrap( $html, $id, $caption, $title, $align, $url, $size, $alt ) { return ‘<a href=”‘. $url […]

Categories
Development

TCPDF Image goes black after having a prior hidden image of the same source

TCPDF Image goes black after having a prior hidden image of the same source I need to hide an image to get its dimensions to then dynamically adjust the image coordinates based on the image size so it is 10px from the right of the page border Only when I change the image hidden from […]

Categories
Development

React TypeScript: Correct ref type for HTML Select with an OnChange with useRef

Ive not used the useRef hook on a select box before, typescript seems to be complaining that I’ve got the wrong type for the ref? import React, {useState, useRef} from ‘react’; const App: React.FC = () => { const [state, setState] = useState({country: ”}); const formValue = (event: React.ChangeEvent<HTMLInputElement>) => {setState({…state, [event.target.name]: event.target.value.trim()})} const country […]

Categories
CSS Development

How to include @media in Grunt-Uncss Ignore Function

I’m using Grunt to remove unused CSS on my page. Everything works pretty good, but unfortunately sometimes a few code snippets get removed, although being crucial for the website. I would like Grunt to ignore all @media (min-width: …) CSS Attributes, but I don’t know how to phrase that in my Gruntfile.JS. For Example: styles.css […]