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
/* | |
https://www.w3.org/TR/css-content-3/#alt | |
Support: https://caniuse.com/mdn-css_properties_content_alt_text | |
This particular element is presentational only, so an empty string | |
is used so that the symbol is not read by a screen reader. | |
*/ | |
&:before { | |
content: "{" / ""; | |
} |
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
/** | |
* Add horizontal scrollbar to TOP of WPDataTables, when scrolling is enabled. | |
* Useful if the number of visible rows is large, because otherwise you can't access | |
* the whole table unless you scroll to the very bottom to use the scrollbar. | |
*/ | |
window.addEventListener('load', function(){ | |
/** | |
* Add additional horizontal scrollbar to top of an element. | |
* Inserts a "dummy" div above the element that has horizontal scrolling, then syncs scrolling between the two. | |
* * Based on stackoverflow answer: https://stackoverflow.com/a/56952952/835996 |
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 | |
/** | |
* Add additional 'download-count' column to the table of downloads on the customer's order email. | |
* @param Array $columns Associative array of key "column_id" and value with the display name https://goo.gl/TDxPLE | |
*/ | |
function add_order_email_dl_cols($columns) { | |
return array( | |
'download-product' => __( 'Product', 'woocommerce' ), | |
'download-expires' => __( 'Expires', 'woocommerce' ), |
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
AK, Alaska | |
AL, Alabama | |
AR, Arkansas | |
AS, American Samoa | |
AZ, Arizona | |
CA, California | |
CO, Colorado | |
CT, Connecticut | |
DC, District of Columbia | |
DE, Delaware |
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
// Add to application in appDelegate.m to log all font names as you would use them in CSS | |
for (NSString* family in [UIFont familyNames]) | |
{ | |
NSLog(@"%@", family); | |
for (NSString* name in [UIFont fontNamesForFamilyName: family]) | |
{ | |
NSLog(@" %@", name); | |
} | |
} |
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
private int _jointHealth; | |
public int startingJointHealth = 2; | |
// The setter here helps by making sure our health never goes below zero. | |
private int JointHealth { | |
get { return _jointHealth; } | |
set { _jointHealth = Mathf.Max(value, 0); } | |
} | |
void Reset(){ | |
JointHealth = startingJointHealth; | |
} |
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
void OnDrawGizmos (){ | |
// In Editor | |
if (!Application.isPlaying){ | |
// Draw custom gizmo | |
Gizmos.DrawIcon(transform.position, "spawn_gizmo.png", true); | |
// Draw yellow box at size of character, for easier placement in level | |
Gizmos.color = Color.yellow; | |
Gizmos.DrawWireCube(transform.position, new Vector3(0.8f, 2.0f, 0.8f)); | |
} | |
} |
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
[Header("Movement and Speeds")] | |
[Tooltip("Player speeds, etc")] | |
public Movement movement; | |
[Tooltip("Determines maximum jog over time until timeToMaxJog (1.0 is max on curve)")] | |
public AnimationCurve rampToFullJog = new AnimationCurve(new Keyframe(0,0.1f),new Keyframe(1,1)); | |
[Tooltip("Time in seconds before maximum jog speed is reached")] | |
public float timeToMaxJog = 2.0f; |
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 class="checkbox"><label><input name="regionStates[]" type="checkbox" value="AK">Alaska</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="AL">Alabama</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="AR">Arkansas</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="AZ">Arizona</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="CA">California</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="CO">Colorado</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="CT">Connecticut</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="DC">District Of Columbia</label></div> | |
<div class="checkbox"><label><input name="regionStates[]" type="checkbox" value="DE">Delaware</label></div> | |
<div class="checkbox"><label><input nam |
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 | |
/** | |
* Get the Yoast primary category from its post meta value, and displays it, with HTML markup. | |
* If there is no primary category set, it displays the first assigned category. | |
* | |
* @param boolean $useCatLink Whether to link the category, if it exists | |
* @return void | |
*/ | |
function yourtheme_display_yoast_primary_category( $useCatLink = true ) { |
NewerOlder