Skip to content

Instantly share code, notes, and snippets.

  • plugin-name
    • README.md
    • assets
      • banner-772x250.png
      • screenshot-1.png
    • branches
    • tags
    • trunk
      • admin
  • css
<?php
// Dequeue parent theme responsive style and enqueue in the child theme
function cyberchimps_child_responsive_style() {
$directory_uri = get_stylesheet_directory_uri();
if( cyberchimps_get_option( 'responsive_design', 'checked' ) ) {
wp_dequeue_style( 'cyberchimps_responsive' );
wp_enqueue_style( 'cyberchimps_responsive', $directory_uri . '/cyberchimps-responsive.css', array( 'bootstrap-responsive-style', 'bootstrap-style' ), '1.0' );
}
else {
{
"Version": "2008-10-17",
"Id": "Policy1390863004147",
"Statement": [
{
"Sid": "Stmt1390862961939",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;
}
<?php
/**
* Plugin Name.
*
* @package Plugin_Name_Admin
* @author Your Name <[email protected]>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2013 Your Name or Company Name
*/
<?php
if ( ! function_exists( '_s_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*/
function _s_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
<?php
/*
* Template Name: News
*/
?>
<?php get_header(); ?>
<div class="security-banner">
<div class="wrapper">
<h2>Vacant Property In The Media</h2>
<script src="//cdn.jsdelivr.net/jwplayer/6.7/jwplayer.js"></script>
<div id="player_6"></div>
<script>
jwplayer("player_6").setup({
image: "http://testing.grappler.tk/files/2013/01/trailer_1080p.jpg",
file: "http://testing.grappler.tk/files/2013/01/trailer_1080p.mp4",
width: "100%",
aspectratio: "16:9"
});
</script>
@grappler
grappler / functions.php
Created October 20, 2013 12:00
Load only one translations file.
<?php
function theme_name_setup(){
$domain = 'theme-name';
if ( $loaded = load_theme_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain ) ) {
return $loaded;
} elseif ( $loaded = load_theme_textdomain( $domain, get_stylesheet_directory() . '/languages' ) {
return $loaded;
} else {