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 arf_defaultpagination() { | |
global $wp_query; | |
$big = 999999999; | |
$pages = paginate_links(array( | |
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), | |
'format' => '?page=%#%', | |
'current' => max(1, get_query_var('paged')), | |
'total' => $wp_query->max_num_pages, | |
'prev_next' => false, |
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
<IfModule mod_headers.c> | |
Header set X-XSS-Protection "1; mode=block" | |
Header always append X-Frame-Options SAMEORIGIN | |
Header set X-Content-Type-Options: "nosniff” | |
#Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure | |
Header always edit Set-Cookie (.*) "$1; HTTPOnly" | |
Header always edit Set-Cookie (.*) "$1; Secure" | |
</IfModule> | |
#from: http://codex.wordpress.org/Hardening_WordPress |
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
########################### | |
# WP htaccess Boilerplate # | |
#Slightly modified to improve hardening# | |
########################### | |
### https://github.com/Creare/WP-htaccess/ | |
############ | |
# Security # | |
############ |
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
#User-agent: * | |
Disallow: /cgi-bin | |
Disallow: /wp-admin | |
Disallow: /wp-includes | |
Disallow: /wp-content/plugins/ | |
Disallow: /wp-content/cache/ | |
Disallow: /wp-content/themes/ | |
Disallow: */trackback/ | |
Disallow: */feed/ | |
Disallow: /*/feed/rss/$ |
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="caption lfb boxshadow" data-x="center" data-y="center" data-speed="900" data-start="500" data-easing="easeOutBack"> | |
<iframe width="1280" height="720" src="https://www.youtube.com/embed/F5lFIr9fC50" frameborder="0" allowfullscreen></iframe> | |
</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
// Register Custom Post Type | |
function custom_services_post_type() { | |
$labels = array( | |
'name' => _x( 'Services', 'Post Type General Name', 'custom_textdomain' ), | |
'singular_name' => _x( 'Service', 'Post Type Singular Name', 'custom_textdomain' ), | |
'menu_name' => __( 'Services', 'custom_textdomain' ), | |
'name_admin_bar' => __( 'Services', 'custom_textdomain' ), | |
'archives' => __( 'Item Archives', 'custom_textdomain' ), | |
'parent_item_colon' => __( 'Parent Item:', 'custom_textdomain' ), |
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
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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_filter( 'woocommerce_shipping_calculator_enable_postcode', '__return_false' ); |
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 | |
/** | |
* Hide free shipping if others methods exists. | |
* | |
* @param array $available_methods | |
*/ | |
function custom_shipping_rules( $available_methods ) { | |
if ( isset( $available_methods['PAC'] ) || isset( $available_methods['SEDEX'] ) ) { | |
unset( $available_methods['free_shipping'] ); |
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 | |
/** Sets up 'direct' method for WordPress to FTP, without requiring credentials */ | |
define('FS_METHOD', 'direct'); | |
/** Defines permissions for WordPress to apply to new directories */ | |
define('FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); | |
/** Defines permissions for WordPress to apply to new files */ | |
define('FS_CHMOD_FILE', ( 0664 & ~ umask() ) ); |
OlderNewer