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 | |
foreach ( $form_data['products'] as $id => $prod ): | |
if ( strpos( $fields[ $id ]['cssClass'], 'exclude' ) & $year !== false ) { | |
continue; | |
} | |
?> | |
//I need to be able to write it with and & condition something like this... | |
<?php foreach ( $form_data['products'] as $id => $prod ): |
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 | |
// d.) settings | |
add_settings_field( | |
'woonumday_wndtaxbase_field', | |
esc_attr__('Tax Options', 'woonumday'), | |
'woonumday_wndtaxbase_field_cb', | |
'woonumday_options', | |
'woonumday_options_section', | |
array( | |
'type' => 'select', |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"><style type="text/css"> | |
table tr td{border-bottom: 1px solid #ccc; }</style> | |
</head> | |
<body> | |
<div class="post-entry entry-content"> | |
<h2>Template Hooks</h2> | |
<h4>Actions</h4> |
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 | |
/*** | |
SETUP | |
custom fields | |
@hook woocommerce_register_form_start | |
@hook woocommerce_edit_account_form | |
@hook woocommerce_save_account_detail | |
@altUse woocommerce_after_order_notes to add to checkout | |
****/ |
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 | |
/** | |
* Replace default Gravatar with branding logo. | |
*/ | |
function wordness_new_default_gravatar($avatar_defaults) | |
{ | |
//be safe default | |
$def = esc_url( plugin_dir_url( dirname(__FILE__) ) | |
. 'css/poplogin-default-logo.png' ); | |
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
<form action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST" id="filter"> | |
<?php | |
if( $terms = get_terms( 'category', 'orderby=name' ) ) : | |
echo '<select name="categoryfilter"><option>Select category...</option>'; | |
foreach ( $terms as $term ) : | |
echo '<option value="' . $term->term_id . '">' . $term->name . '</option>'; | |
endforeach; | |
echo '</select>'; | |
endif; |
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 | |
session_start(); | |
if (!isset($_SESSION['user_session'])) | |
{ | |
header('Location: ../login.php'); | |
} | |
?> | |
<?php | |
/** | |
* TSW Listing Nano Directory |
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
<div id="container"> | |
<?php | |
// simple but effective for string outputting to html page | |
function esc($s){ | |
return htmlentities(trim($s), ENT_QUOTES, 'UTF-8'); | |
} | |
function countFolder($dir) { | |
$get = (count(scandir($dir)) - 2); | |
if ($get == -2) { |
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
function my_disable_wp_emojicons() { | |
// all actions related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); | |
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); |
This file has been truncated, but you can view the full file.
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
<IfModule mod_deflate.c> | |
# Force compression for mangled `Accept-Encoding` request headers | |
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html | |
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding | |
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding |