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
<html> | |
<head> | |
<style> | |
.fadecontentwrapper{ | |
position: relative; | |
width: 350px; | |
height: 250px; /* Set height to be able to contain height of largest content shown*/ | |
border: 5px solid maroon; | |
overflow: hidden; |
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 | |
function my_scripts_method() { | |
wp_enqueue_style( 'style', get_stylesheet_uri()); | |
wp_enqueue_style( 'fonts', get_template_directory_uri() . '/css/fonts.css'); | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
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 | |
class Mobile_Detect { | |
protected $accept; | |
protected $userAgent; | |
protected $isMobile = false; | |
protected $isAndroid = null; | |
protected $isBlackberry = null; |
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 | |
class litho_textarea_control extends WP_Customize_Control { | |
public $type = 'textarea'; | |
public function render_content() { ?> | |
<label> | |
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> | |
<textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea> |
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 | |
/** | |
* Limit previous/next post title character length and append a ellipsis if trunicated | |
*/ | |
$previous_post = get_adjacent_post( false, '', true ); | |
$next_post = get_adjacent_post( false, '', false ); | |
$previous_post_title= get_the_title($previous_post); | |
$next_post_title = get_the_title($next_post); | |
$max_length = 75; | |
$previous_post_length = strlen($previous_post_title); |
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
/* Second Post Editor TinyMCE Editor */ | |
class SubContentEditor { | |
public $meta_key = 'subcontent'; | |
public $meta_label = 'Right Side'; // Headline above editor | |
public $post_type = array( 'page' ); // The post type in which the editor should display | |
public $wpautop = true; // Automatically create paragraphs? | |
function __construct() { | |
add_action( 'edit_form_after_editor', array( &$this, 'edit_form_after_editor' ) ); |
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
<div class="post-editor-block" id="post-editor-audio-fields" style="display: none;"> | |
<label for="post-editor-audio-embed"><?php _e('Audio URL (oEmbed) or Embed Code', 'post-format'); ?></label> | |
<textarea name="_format_audio_embed" id="post-editor-audio-embed" tabindex="1"><?php echo esc_textarea(get_post_meta($post->ID, '_format_audio_embed', true)); ?></textarea> | |
</div> |
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
#hero { width:100%;height:100%;background:url('{$img_ps_dir}cms/how-it-works/hero.jpg') no-repeat top center; } | |
.videoWrapper { position:relative;padding-bottom:56.25%;padding-top:25px;max-width:100%; } | |
@media (min-width:1000px) { | |
#hero { background-size:cover; } | |
} | |
@media (max-width:767px) { | |
#hero { width:100%;height:94%!important;background:url('{$img_ps_dir}cms/how-it-works/hero-mobile.jpg') no-repeat top center;background-position: 0 -155px;height: 273px!important;background-position:0 -209px; } | |
} | |
@media (max-width:540px) { |
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
jQuery(document).ready( function($) { | |
$('.entry-title a').after( ' <button class="edit-title">EDIT</button>'); | |
$('.entry-title').on( 'click', '.edit-title', function(ev) { | |
ev.preventDefault(); | |
var postId = $(this).closest('article.post').attr('id').replace('post-',''); | |
$a = $(this).prev('a'), | |
title = $a.text(), | |
newTitle = prompt( 'New Title', title ); |
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
(function() { | |
tinymce.create('tinymce.plugins.WRAP', { | |
init : function(ed, url) { | |
/* wrapping button take 1 */ | |
ed.addButton('demobutton0', { | |
title : 'Wrap Selection in green!', | |
cmd : 'mceWRAP', | |
image : url + '/coffee.png' | |
}); |
OlderNewer