Skip to content

Instantly share code, notes, and snippets.

View aristath's full-sized avatar
🏠

Ari Stathopoulos aristath

🏠
View GitHub Profile
@aristath
aristath / gist:7339556
Last active December 27, 2015 14:19 — forked from anonymous/gist:7339547
<a href="http://smithcodevelopment.com/smithco/wp-content/uploads/2013/08/homepage.jpg"><img class="size-full wp-image-428 aligncenter" alt="homepage" src="http://smithcodevelopment.com/smithco/wp-content/uploads/2013/08/homepage.jpg" width="960" height="800" style="width: 100%; height: auto; max-width: 100%;" /></a>
<?php
class UPME {
function __construct() {
$this->logged_in_user = 0;
$this->allow_search = false;
$this->login_code_count = 0;
@aristath
aristath / CP-Hooks.php
Last active December 21, 2015 10:29 — forked from anonymous/CP Hooks
<?php
/**
* CubePoints plugin hooks and filters
*/
/** Misc logs hook */
add_action('cp_logs_description','cp_admin_logs_desc_misc', 10, 4);
function cp_admin_logs_desc_misc($type,$uid,$points,$data){
if($type!='misc') { return; }
echo $data;
<div class="span5 cf-image">
<?php
if(has_post_thumbnail()){
$imageurl = wp_get_attachment_image_src(get_the_post_thumbnail($post->ID, 'medium' ));
$thumbnail = '<img title="no image" alt="no image" class="cf-no-image wp-post-image" src="' . $imageurl . '">';
} else {
$thumbnail = '<img width="300" height="300" title="no image" alt="no image" class="cf-no-image wp-post-image" src="' . $field_image . ' rel=lightbox[<?php echo $post->ID; ?>]">';
}
?>
<?php echo $thumbnail; ?>
$label = 'pwbox-' . rand();
return '<form action="' . admin_url('admin-ajax.php') . '" method="post"><input type="hidden" name="action" value="psc-set" />
<p>' . __("This content is password protected. To view it please email us here: <a href="mailto:charlie@example.com">charlie@example.com</a> and we'll email you the password", 'psc') . '</p>
<p><label for="' . $label . '">' . __("Password:", 'psc') . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit", 'psc') . '" /></p>
</form>
';
<?php
// Sets up the WordPress Environment.
require( '../../../wp-load.php' );
require( '../../../wp-blog-header.php' );
add_action( 'wp_head', 'wp_no_robots' );
if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
wp_redirect( network_home_url() );
<?php
// Exit if accessed directly
if ( !defined('ABSPATH')) exit;
/**
* Pages Template
*
*
* @file page.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the