One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
<?php | |
/** | |
* All custom functions should be defined in this class | |
* and tied to WP hooks/filters w/in the constructor method | |
*/ | |
class Custom_Functions { | |
// Custom metaboxes and fields configuration |
If you are running a large website where you will need to test new features on a seperate url before pushing them live then the following instructions are for you ;) | |
For this example imagine your url is apple.com and you want a development/staging site on a subdomain which is dev.apple.com | |
#Setup# | |
1. First thing you'll want to do is go ahead and create your website in plesk and add the subdomain dev.apple.com at the same time. | |
2. ssh into the server e.g. $ ssh username@ipaddress | |
3. Once logged in cd into the private directory (this will be where all git repos are stored) e.g. $ cd ~/private | |
4. Create the main repo e.g. $ git init --bare apple.git | |
5. Now to clone this new repo on your local machine. $ git clone ssh://username@ipaddres/~/private/apple.com |
/***************************** | |
*Add a custom Welcome Dashboard Panel | |
*****************************/ | |
function my_welcome_panel() { | |
?> | |
<div class="top-welcome-panel-content"> | |
<div class="top-welcome-panel-logo" style="height: 120px; padding: 5px;text-align: center;"> | |
<!-- Adds a logo top left--> |
/** | |
* Display ACF field names for development | |
*/ | |
function action_function_name( $field ) { | |
echo $field['_name']; | |
} | |
add_action( 'acf/render_field', 'action_function_name', 10, 1 ); |
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
function theme_styles() | |
{ | |
wp_enqueue_style( 'boostrap_css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' ); | |
wp_enqueue_style( 'theme_css', get_template_directory_uri() . '/css/theme.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'theme_styles' ); | |
function theme_js() | |
{ |
<?php | |
add_action( 'edit_form_advanced', 'force_post_title' ); | |
function force_post_title( $post ) { | |
// List of post types that we want to require post titles for. | |
$post_types = array( | |
'post', | |
'report', | |
// 'event', |
Electoral college history stolen from someone on Slashdot that I forgot to get their name to credit them. Felt it was a unique historical perspective and wanted to share it:
[T]he Electoral College operated differently at the beginning, and if you read the various proposals and debates among the Founders, it's very clear that their motivations were quite different.
I'll try to sum it up briefly. There were some of the Founders who wanted Congress to choose the President. There were others who wanted more diverse voices from state government representatives. Few really wanted to entrust it to "the people," because they had all read their ancient Greek and Roman history and knew that democracies were largely disasters that eventually ended up putting tyrants into power.
There is NOTHING in the Constitution saying how Electoral College members are chosen, only that the state legislatures decide how. In the majority of states for the first few decades of the U.S., Electors were mostly chosen by state governmen