This file contains hidden or 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 -e | |
| clear | |
| echo "============================================" | |
| echo "WordPress Install Script" | |
| echo "============================================" | |
| echo "Database Name: " | |
| read -e dbname | |
| echo "Database User: " | |
| read -e dbuser | |
| echo "Database Password: " |
This file contains hidden or 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: Name Of The Plugin | |
| * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
| * Description: A brief description of the Plugin. | |
| * Version: The Plugin's Version Number, e.g.: 1.0 | |
| * Author: Name Of The Plugin Author | |
| * Author URI: http://URI_Of_The_Plugin_Author | |
| * License: A "Slug" license name e.g. GPL2 | |
| */ |
This file contains hidden or 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 | |
| # Fill our vars and run on cli | |
| # $ php -f db-connect-test.php | |
| $dbname = 'name'; | |
| $dbuser = 'user'; | |
| $dbpass = 'pass'; | |
| $dbhost = 'host'; | |
| $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
This file contains hidden or 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
| /* start new bbpress */ | |
| .bbp-topic-voice-count { | |
| display: none; | |
| } | |
| .bbp-topic-reply-count { | |
| color: #aaa; | |
| font-size: 80%; | |
| margin-right: 20px !important; | |
| width: inherit !important; |
This file contains hidden or 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 | |
| //* Front page for smtwo | |
| add_action( 'genesis_meta', 'rgc_fp_meta' ); | |
| function rgc_fp_meta() { | |
| if (is_active_sidebar( 'home-main') ) { | |
| add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
| remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
| add_action( 'genesis_loop', 'rgc_home_loop' ); | |
| } |
This file contains hidden or 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 | |
| session_start(); | |
| add_filter( 'posts_orderby', 'randomise_with_pagination' ); | |
| function randomise_with_pagination( $orderby ) { | |
| if( is_front_page() ) { | |
| // Reset seed on load of initial archive page |
This file contains hidden or 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( 'wooslider_slides_layout_html', 'wooslider_custom_content', 10, 3); | |
| function wooslider_custom_content ( $content, $args, $post ) { | |
| global $post; | |
| $image = get_the_post_thumbnail( get_the_ID() ); | |
| if ( 'true' == $args['link_slide'] || 1 == $args['link_slide'] ) { | |
| $wooslider_url = get_post_meta( get_the_ID(), '_wooslider_url', true ); |
This file contains hidden or 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 | |
| PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r'); | |
| wp plugin update-all; | |
| for plugin in $PLUGINS; do | |
| git add -A "wp-content/plugins/$plugin"; | |
| git commit -m "Update plugin: $plugin"; | |
| done; |
This file contains hidden or 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: Disable plugins when doing local dev | |
| Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
| Version: 0.1 | |
| License: GPL version 2 or any later version | |
| Author: Mark Jaquith | |
| Author URI: http://coveredwebservices.com/ | |
| */ |
This file contains hidden or 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 | |
| // See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
| // Start a session (which should use cookies over HTTP only). | |
| session_start(); | |
| // Create a new CSRF token. | |
| if (! isset($_SESSION['csrf_token'])) { | |
| $_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
| } |
OlderNewer