This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Auto generates routes from files under ./pages | |
// https://vitejs.dev/guide/features.html#glob-import | |
const pages = import.meta.glob('./pages/*.jsx', { eager: true }) | |
const routes = Object.keys(pages).map((path) => { | |
const name = path.match(/\.\/pages\/(.*)\.jsx$/)[1] | |
return { | |
name, | |
path: name === 'Home' ? '/' : `/${name.toLowerCase()}`, | |
component: pages[path].default, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>ciao</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$orderby = 'name'; | |
$order = 'asc'; | |
$hide_empty = true ; | |
$cat_args = array( | |
'orderby' => $orderby, | |
'order' => $order, | |
'hide_empty' => $hide_empty, | |
'exclude' => array(15 ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hap_hide_the_archive_title( $title ) { | |
// Skip if the site isn't LTR, this is visual, not functional. | |
// Should try to work out an elegant solution that works for both directions. | |
if ( is_rtl() ) { | |
return $title; | |
} | |
// Split the title into parts so we can wrap them with spans. | |
$title_parts = explode( ': ', $title, 2 ); | |
// Glue it back together again. | |
if ( ! empty( $title_parts[1] ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore fix" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |