This file contains 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
#!/bin/sh | |
WCPAY_BRANCH=$1 | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
This file contains 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
# docker-compose.override.yml | |
version: '3' | |
services: | |
wordpress: | |
volumes: | |
- ../woocommerce-subscriptions:/var/www/html/wp-content/plugins/woocommerce-subscriptions | |
- ../woocommerce-subscriptions-core:/var/www/html/wp-content/plugins/woocommerce-subscriptions-core | |
- ../woocommerce-payments-dev-tools:/var/www/html/wp-content/plugins/woocommerce-payments-dev-tools |
This file contains 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
YouTube Video | |
https://www.youtube.com/watch?v=bP7vggHJLVM | |
YouTube Playlist | |
https://www.youtube.com/playlist?list=PL75C7F02E0C4EA3E0 | |
Twitter Tweet | |
https://twitter.com/google/status/590225864421482498 | |
blip.tv Video |
This file contains 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
the_archive_title( '<h1 class="page-title">', '</h1>' ); |
This file contains 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 | |
/** | |
* Get the table data | |
* | |
* @return Array | |
*/ | |
private function table_data() { | |
global $wpdb; |
This file contains 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
-- delete any usermeta specific to the other subsites | |
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_'; | |
-- duplicate the wp_usermeta structure in a working data table, | |
-- but add a unique index for filtering out duplicates | |
create table _fix_usermeta like wp_usermeta; | |
alter table _fix_usermeta add unique(user_id, meta_key); | |
-- copy the site-specific usermeta, keeping only the last of each duplicate | |
insert into _fix_usermeta |
This file contains 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 | |
function disable_excerpt_filtering() { | |
// disable excerpt filtering for the "markup" post category | |
if ( has_category( 'markup' ) ) { | |
return true; | |
} | |
return false; | |
} |
This file contains 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 | |
function ca_only_add_more_when_required( $default, $text, $options ) { | |
$text = strip_tags( $text ); | |
if ( 'words' === $options['length_type'] ) { | |
$excerpt_length = str_word_count( $text ); | |
} else { | |
$excerpt_length = strlen( $text ); | |
} |
This file contains 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 | |
function custom_advanced_excerpt_read_more_link_template( $template ) { | |
/* | |
* The Advanced Excerpt plugin code looks like this | |
* apply_filters( 'advanced_excerpt_read_more_link_template', ' <a href="%1$s" class="read-more">%2$s</a>', get_permalink(), $read_more ); | |
*/ | |
return sprintf( '<p style="text-align: right;">%s</p>', $template ); | |
} | |
add_filter( 'advanced_excerpt_read_more_link_template', 'custom_advanced_excerpt_read_more_link_template' ); |
This file contains 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 | |
function custom_preserved_options( $options ) { | |
$options[] = 'blog_public'; | |
return $options; | |
} | |
add_filter( 'wpmdb_preserved_options', 'custom_preserved_options' ); |
NewerOlder