start new:
tmux
start new with session name:
tmux new -s myname
| DELETE FROM wp_usermeta | |
| WHERE NOT EXISTS ( | |
| SELECT * FROM wp_users | |
| WHERE wp_usermeta.user_id = wp_users.ID | |
| ) |
| <?php | |
| // ---------------------------------------------------------------------------------------- | |
| // Redirect all non-logged-in users to the login page (private site). Add to functions.php. | |
| // ---------------------------------------------------------------------------------------- | |
| function admin_redirect() { | |
| if ( !is_user_logged_in()) { | |
| wp_redirect( home_url('/wp-admin/') ); | |
| exit; | |
| } |
| <?php | |
| /*-----------------------------------------------------------------------------------*/ | |
| /* Conditional Logic to Detect Various Event Related Views/Pages | |
| /*-----------------------------------------------------------------------------------*/ | |
| if( tribe_is_month() && !is_tax() ) { // Month View Page | |
| echo 'were on the month view page'; | |
| } elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
| # config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
| # added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com) | |
| # clearly this could be cleaner, but it does work | |
| require 'rack' | |
| require 'rack-legacy' | |
| require 'rack-rewrite' | |
| # patch Php from rack-legacy to substitute the original request so | |
| # WP's redirect_canonical doesn't do an infinite redirect of / |
| # pgbackups client from heroku gem | |
| require 'pgbackups/client' | |
| desc 'Backup database' | |
| task(:backup_database => :environment) { backup_database } | |
| desc 'cron' | |
| task :cron => :backup_database | |
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |