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
/* | |
Theme Name: | |
Theme URI: | |
Author: | |
Author URI: | |
Description: | |
Version: 1.0 | |
License: GNU General Public License | |
License URI: licensep | |
Tags: |
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 | |
if(function_exists('wp_nav_menu')): | |
wp_nav_menu( | |
array( | |
'menu' =>'primary_nav', | |
'container'=>'', | |
'depth' => 2, | |
'menu_id' => '' ) | |
); | |
else: |
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
# Move style.css to parent (root) directory of theme | |
require 'fileutils' | |
on_stylesheet_saved do |file| | |
if File.exists?(file) && File.basename(file) == "style.css" | |
puts "Moving: #{file}" | |
FileUtils.mv(file, File.dirname(file) + "/../" + File.basename(file)) | |
end | |
end |
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
@mixin mq($point, $IE9: false, $query1: min, $query2: width) { | |
@if $IE9 == true{ | |
.lt-ie9 & { | |
@content; | |
} | |
@media screen and (#{$query1}-#{$query2}: $point / $base-font-size +em) { | |
@content; | |
} | |
} |
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
// Place in functions.php | |
remove_filter( 'the_content', 'wpautop' ); | |
add_filter( 'the_content', 'wpautop' , 12); | |
// Place in your shortcode (in functions.php) | |
$content = wpautop(trim($content)) |
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
/** | |
* Don't auto-p wrap shortcodes that stand alone | |
* | |
* Ensures that shortcodes are not wrapped in <<p>>...<</p>>. | |
* | |
* @since 2.9.0 | |
* | |
* @param string $pee The content. | |
* @return string The filtered content. | |
*/ |
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
<time datetime="<?php the_time('Y-m-d'); echo('T'); the_time('h:i:s'); ?>"><?php the_time('F j, Y') ?></time> |
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 | |
function SearchFilter($query) { | |
if ($query->is_search) { | |
$query->set('post_type',array('post','page')); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','SearchFilter'); | |
?> |
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 | |
$imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "Full"); | |
echo $imgsrc[0]; | |
?> |
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
package com.ps; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class Main { | |
// Parent and child logger | |
static Logger pkgLogger = Logger.getLogger("com.ps"); | |
static Logger logger = Logger.getLogger("com.ps.Main"); | |