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 | |
/* | |
############################## | |
########### Search ########### | |
############################## | |
Included are steps to help make this script easier for other to follow | |
All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10 | |
I also updated this work to include XSS and SQL injection projection | |
[list_searcheable_acf list all the custom fields we want to include in our search query] |
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 | |
// get month name from number | |
function month_name($month_number){ | |
return date('F', mktime(0, 0, 0, $month_number, 10)); | |
} | |
// get get last date of given month (of year) | |
function month_end_date($year, $month_number){ |
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 | |
//---------------------------------------------------------- | |
// Display Posts Shortcode plugin: add H2 to title | |
//---------------------------------------------------------- | |
add_filter( 'display_posts_shortcode_output', 'format_dps_title', 10, 9 ); | |
function format_dps_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) { | |
// Make Title and H2 | |
$title = ' <h3>'. $title .'</h3>'; |
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 | |
/** | |
* | |
* Infinite Scroll | |
* | |
* @since 1.0.0 | |
* | |
* @author Lauren Gray | |
* @author Bill Erickson |
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 | |
// Add to existing function.php file | |
// Disable support for comments and trackbacks in post types | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ($post_types as $post_type) { | |
if(post_type_supports($post_type, 'comments')) { | |
remove_post_type_support($post_type, 'comments'); |
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
# ---------------------------------------------------------------------- | |
# Password protect staging server | |
# Use one .htaccess file across multiple environments | |
# (e.g. local, dev, staging, production) | |
# but only password protect a specific environment. | |
# ---------------------------------------------------------------------- | |
SetEnvIf Host staging.domain.com passreq | |
AuthType Basic |
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
/** | |
* Generate and return a random characters string | |
* | |
* Useful for generating passwords or hashes. | |
* | |
* The default string returned is 8 alphanumeric characters string. | |
* | |
* The type of string returned can be changed with the "type" parameter. | |
* Seven types are - by default - available: basic, alpha, alphanum, num, nozero, unique and md5. | |
* |
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
// Browser Prefixes | |
@mixin transform($transforms) { | |
-webkit-transform: $transforms; | |
-moz-transform: $transforms; | |
-ms-transform: $transforms; | |
transform: $transforms; | |
} | |
// Rotate | |
@mixin rotate ($deg) { |
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
//Add Instructions to Featured Image Box | |
add_filter( 'admin_post_thumbnail_html', 'add_featured_image_html'); | |
function add_featured_image_html( $html ) { | |
return $html .= '<p>This is some sample text that can be displayed within the feature image box.</p>'; | |
} |
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
<header> | |
<a href="http://blog.sarasoueidan.com/horizontal-portfolio-layout">Read Tutorial</a> | |
</header> | |
<div class="demo-wrapper"> | |
<!-- <h1>Horizontal Portfolio Layout With CSS3 Animations and jQuery</h1> --> | |
<ul class="portfolio-items"> | |
<li class="item"> |
OlderNewer