cat *.sql >> ../backup/contacted.sql
find . -type f -name "*.sql" -print0 | xargs -0 cat >> ../backup/concated.sql
Cypress.Commands.add('login', () => { | |
cy.request({ | |
url: '/wp-login.php', | |
method: 'POST', | |
form: true, | |
body: { | |
log: Cypress.env('wp_user'), | |
pwd: Cypress.env('wp_pass'), | |
rememberme: 'forever', | |
testcookie: 1, |
<?php | |
/** | |
* Configure "Paste" plugin before TinyMCE init. | |
* | |
* @param array $mceInit | |
* @return array $mceInit | |
*/ | |
add_filter( 'tiny_mce_before_init', function( $mceInit ) { | |
$mceInit['paste_as_text'] = true; |
<?php | |
// If you can edit pages, you can edit widgets | |
add_filter( 'user_has_cap', | |
function( $caps ) { | |
if ( ! empty( $caps['edit_pages'] ) ) | |
$caps['edit_theme_options'] = true; | |
return $caps; | |
} ); |
<?php | |
namespace Mamaduka\ProjectName\Helpers; | |
use const Mamaduka\ProjectName\PLUGIN_DIR; | |
/** | |
* Render a view. | |
* | |
* @param string $name Name of the view. |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/mamaduka/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
<?php | |
add_filter( 'block_type_metadata', function( $metadata ) { | |
if ( in_array( $metadata['name'], [ 'core/paragraph', 'core/heading'], true ) ) { | |
$metadata['supports']['typography']['__experimentalFontFamily'] = true; | |
} | |
return $metadata; | |
} ); |
const { posts, isLoading } = useSelect( ( select ) => { | |
const { getEntityRecords, isResolving } = select( 'core' ); | |
return { | |
posts: getEntityRecords( 'postType', 'post' ), | |
isLoading: isResolving( 'getEntityRecords', [ 'postType', 'post' ] ), | |
}; | |
}, [] ); |