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/bash | |
# @link https://remkusdevries.com/wp-cli/run-wp-cli-scripts-in-bulk-across-various-servers | |
# List of iTerm2 profile names | |
profiles=( | |
"Example 1" | |
"Example 2" | |
"Example 3" | |
# ...add all profiles here |
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/bash | |
# Author: Birgit Olzem aka @CoachBirgit | |
# Version: 1.0 | |
# Created on: January 19th 2022 | |
# Requires WP-CLI, cURL, wget | |
# credits for the origin idea to Jeremy Herve: https://jeremy.hu/dev-environment-laravel-valet-wp-cli/ | |
### How to use |
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 | |
/** | |
* Estimated Reading Time | |
* | |
* Use by adding it to a hook like add_action( 'genesis_after_entry', 'fm_estimated_reading_time' ); | |
* | |
* @link http://briancray.com/posts/estimated-reading-time-web-design/ | |
* @return void | |
*/ |
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 | |
add_filter( 'get_header', 'bp_guest_redirect', 1 ); | |
/** | |
* Redirect BuddyPress guests to register page | |
* @return [type] [description] | |
*/ | |
function bp_guest_redirect() { | |
global $bp; | |
if ( bp_is_activity_component() || bp_is_user_profile() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) { |
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 | |
/** | |
* For more information, as always, check the codex | |
* @link: http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants | |
**/ | |
define( 'FTP_USER', 'username' ); | |
define( 'FTP_PASS', 'password' ); | |
define( 'FTP_HOST', 'ftp.example.org' ); // this usually can be 127.0.0.1 |
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
# Redirect from HTTP to HTTPS | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} ^80$ | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301,NC] |
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 | |
add_filter( 'body_class', 'tax_body_class' ); | |
/** | |
* This function adds category nicenames to body class. | |
* | |
* @access public | |
* @author Remkus de Vries | |
* @param mixed $classes | |
* @return void |
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 | |
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { | |
include( dirname( __FILE__ ) . '/local-config.php' ); | |
define( 'WP_LOCAL_DEV', true ); | |
} else { | |
define( 'DB_NAME', $_SERVER["DB_NAME"] ); | |
define( 'DB_USER', $_SERVER["DB_USER"] ); | |
define( 'DB_PASSWORD', $_SERVER["DB_PASSWORD"] ); | |
define( 'DB_HOST', 'localhost' ); |
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 | |
add_filter( 'the_content_more_link', 'remove_more_link_scroll' ); | |
/** | |
* Remove the #more jump when clicking to full post in WordPress | |
* | |
*/ | |
function remove_more_link_scroll( $link ) { | |
$link = preg_replace( '|#more-[0-9]+|', '', $link ); |
NewerOlder