Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Font Awesome Icons Array (4.3.0)
* @author Monzurul Haque
* @author_uri https://github.com/farukham
**/
$icons_arr = array(
__("None", "fifothemes") => "none",
__("Adjust", "fifothemes") => "fa-adjust",
<?php
/* add this on init hook */
register_taxonomy_for_object_type( 'category', 'attachment' );
?>
/* Set Default Mail From Name */
function custom_wp_mail_from_name( $original_email_from ){
return 'Danny Wilson';
}
add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
/* Set Default Mail From email */
function custom_wp_mail_from( $original_email_address ){
return 'danny@iamdannywilson.com';
}
@jeweltheme
jeweltheme / LICENSE
Last active August 31, 2015 20:28 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@jeweltheme
jeweltheme / wordpress-plugin-svn-to-git.md
Last active September 2, 2015 19:54 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@jeweltheme
jeweltheme / vps-setup.sh
Created October 26, 2015 08:55 — forked from EmranAhmed/vps-setup.sh
Simple and Straightforward VPS ( ubuntu and debian ) setup :)
#!/bin/bash
# Upload vps-setup.sh file
# open terminal and change permission like: chmod +x ./setup.sh
# ./vps-setup.sh
# delete this file after setup :)
COLOR_RESET="\033[33;0m"
COLOR_RED="\033[33;31m"
COLOR_GREEN="\033[33;32m"
@jeweltheme
jeweltheme / Galaxy Of Tutorial Torrents
Created September 1, 2016 15:46 — forked from iHassan/Galaxy Of Tutorial Torrents
Ultimate Galaxy Of Tutorial Torrents
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
function elevation_google_fonts_url() {
$font_url = '';
if ( 'off' !== _x( 'on', 'Google font: on or off', 'elevation' ) ) {
$font_url = add_query_arg( 'family', urlencode( 'Montserrat:400,700,800|Open Sans:400,300,600,700,800|Roboto:300,400,500,700' ), "//fonts.googleapis.com/css" );
}
return $font_url;
}
function elevation_scripts() {
wp_enqueue_style( 'elevation-google-fonts', elevation_google_fonts_url() );
[text* your-name placeholder "Name*"]
[email* your-email placeholder "Email*"]
[text your-subject placeholder "Subject*"]
<div class="message-body">
[textarea* your-message placeholder "Message*"]
</div>
<div class="submit-button">
<?php
// Example 1
$show_after_p = 2;
$content = apply_filters('the_content', $post->post_content);
if(substr_count($content, '<p>') > $show_after_p)
{
$contents = explode("</p>", $content);
$p_count = 1;
foreach($contents as $content)
{