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
sam3d@DESKTOP-OU7IM78 MINGW64 /c/vvv-local (develop) | |
$ vagrant ssh --debug | |
INFO global: Vagrant version: 2.4.1 | |
INFO global: Ruby version: 3.1.4 | |
INFO global: RubyGems version: 3.3.26 | |
INFO global: VAGRANT_EXECUTABLE="C:\\Program Files (x86)\\Vagrant\\embedded\\gems\\gems\\vagrant-2.4.1\\bin\\vagrant" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\Program Files (x86)\\Vagrant\\embedded" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_LOG="debug" |
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
c:\vvv-local>vagrant up | |
__ __ __ __ | |
\ V\ V\ V / v3.12 Ruby:3.1.4, Path:"c:/vvv-local" | |
\_/\_/\_/ git::stable(aee9a695) | |
Platform: mingw32 windows missingWinAdminPriv vagrant-goodhosts monochrome-terminal shared_db_folder_disabled | |
Vagrant: v2.4.1, virtualbox: v7.0.18 | |
Docs: https://varyingvagrantvagrants.org/ |
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
// Remove init rest routes | |
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); | |
// Remove oembed rest routes | |
function remove_json_api () { | |
// Remove the REST API lines from the HTML Header | |
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); | |
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); |
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
function pat_filter_notifications_get_registered_components( $component_names = array() ) { | |
if ( ! is_array( $component_names ) ) { | |
$component_names = array(); | |
} | |
array_push( $component_names, 'events' ); | |
return $component_names; |
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 | |
// this is to add a fake component to BuddyPress. A registered component is needed to add notifications | |
function custom_filter_notifications_get_registered_components( $component_names = array() ) { | |
// Force $component_names to be an array | |
if ( ! is_array( $component_names ) ) { | |
$component_names = array(); | |
} | |
// Add 'custom' component to registered components array |
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
// Using the Nouveau template pack | |
// Add a count bubble on a custom tab on a user profile is straightforward | |
$count = get_the_count_profile( $group_id ); | |
$class = ( 0 === $count ) ? 'no-count' : 'count'; | |
$name = sprintf( __( 'Events <span class="%s">%s</span>', 'bp-simple-events' ), esc_attr( $class ), number_format_i18n( $count ) ); | |
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
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: wordpress |
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
/* | |
* Paste in your theme functions.php or in bp-custom.php. | |
* Load the site in a browser | |
* Remove from your theme functions.php or bp-custom.php. | |
*/ | |
function buddypress_add_last_activity() { | |
$members = get_users( 'fields=ID' ); | |
// $members = get_users( 'fields=ID&role=subscriber' ); |
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
function add_members_directory_tab_nouveau( $nav_items ) { | |
$nav_items['custom'] = array( | |
'component' => 'members', | |
'slug' => 'custom', | |
'li_class' => array('custom no-ajax'), | |
'link' => trailingslashit( bp_get_members_directory_permalink() . 'custom' ), | |
'text' => __( 'Custom', 'buddypress' ), | |
'count' => false, | |
'position' => 15.8, |
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
be specific re php version: sudo apt-get install php7.0-tidy | |
vagrant@vvv:~$ sudo apt-get install php-tidy | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
libtidy5 php7.1-common php7.1-tidy | |
The following NEW packages will be installed: | |
libtidy5 php-tidy php7.1-common php7.1-tidy |
NewerOlder