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 | |
/** | |
* Customization for Avatar Tooltip plugin, for WordPress | |
* How to show only user bio and social links. Put this file in /wp-content/mu-plugins folder | |
* | |
* More info and screenshot: | |
* http://www.eventualo.net/blog/2013/01/avatar-tooltip-plugin-how-to-show-only-user-bio-and-social-links/ | |
* | |
* Avatar Tooltip plugin: | |
* http://wordpress.org/extend/plugins/avatar-tooltip/ |
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 | |
/** | |
* Quick maintenance mode in WordPress, using a bit of custom css and html | |
* | |
* Only admin can browse the blog, other people get a maintenance message | |
* | |
* Put this file in /wp-content/mu-plugins folder | |
*/ | |
function alo_maintenance_mode() { |
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 | |
/** | |
* DB Configuration | |
*/ | |
$Host ='localhost'; | |
$Username = 'root'; | |
$Password = 'root'; | |
$DatabaseName = 'test'; |
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 | |
/* | |
// ------------------------------------------------------------------------------- | |
// EXTRA: add the "open-easymail-popup" class to have a link that opens newsletter dialog | |
// ------------------------------------------------------------------------------- | |
<a href="" class="open-easymail-popup">Newsletter</a> | |
*/ | |
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 | |
/********************************************************************** | |
* zTranslate integration | |
**********************************************************************/ | |
function alo_em_ztrans_set_plugin( $multilang_plugin ){ | |
if ( function_exists('ztrans_init') ) |
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
#!/usr/bin/php -q | |
<?php | |
require "../gump.class.php"; | |
$validator = new GUMP(); | |
$_POST = array( | |
'first_name' => 'Joe', | |
'last_name' => 'Black', |
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 | |
# Check wp-cli installed | |
type wp >/dev/null 2>&1 || { echo >&2 "This script requires wp-cli but it's not installed. Aborting."; exit 1; } | |
printf "\e[32mLet's go installing WP...\n\e[0m" | |
printf "\nTo install in a subfolder, write the folder name.\n" | |
echo "Otherwise leave empty to install in root:" |
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
/** | |
* Register your custom post type: write all the settings you like in $args. | |
* | |
* Note the 'slug' set to '/' to remove custom post type slug from url e.g. | |
* "/post-slug" instead of default "/custom-type-slug/post-slug" | |
*/ | |
public function register_my_custom_type() { | |
$args = 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
<?php | |
/** | |
* Flush permalink on EVERY site on a mulsitite, so you don't have to visit | |
* Permalink dashboard page of every single blog. | |
* | |
* How to use: | |
* - upload it in /wp-content/mu-plugins/ | |
* - leave the file there for some days | |
* - then REMOVE the file! | |
*/ |
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 | |
/* | |
* Plugin name: Test Rewrite Plugin | |
* Source: https://jeremyfelt.com/2015/07/17/flushing-rewrite-rules-in-wordpress-multisite-for-fun-and-profit/ | |
* */ | |
add_action( 'admin_bar_menu', 'toolbar_link_to_mypage', 999 ); | |
function toolbar_link_to_mypage( $wp_admin_bar ) { |
OlderNewer