A Pen by Ryan Niswonger on CodePen.
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
/** | |
* Restrict Customizer menu search to titles | |
* Based on: https://stackoverflow.com/questions/54155517/how-to-limit-wp-admin-to-search-only-titles | |
* Added Customizer screen detection | |
*/ | |
add_filter( | |
'posts_search', | |
function( $search, $wp_query ) { | |
global $wp_customize; | |
global $wpdb; |
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 | |
/** | |
* CPT: Custom columns for post_slug | |
* replace all occurances of "post_slug" with your post type's slug and "theme_domain" with your theme's domain | |
*/ | |
function set_custom_edit_post_slug_columns( $columns ) { | |
// unset( $columns['date'] ); // disable existing column | |
$columns['image'] = __( 'Image', 'theme_domain' ); | |
$columns['date'] = __( 'Custom Date', 'theme_domain' ); |
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
/** | |
* Saves post type and taxonomy data to JSON files in the theme directory. | |
* @param array $data Array of post type data that was just saved. | |
* Code originally provided by the author of the plugin | |
*/ | |
function cptui_local_json( $data = array() ) { | |
$theme_dir = get_stylesheet_directory(); | |
// Create our directory if it doesn't exist | |
if ( ! is_dir( $theme_dir .= '/cptui-json' ) ) { | |
mkdir( $theme_dir ); |
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 | |
// encode email link with rot13 | |
$encoded_email_link = str_rot13( 'mailto:' . strtolower( $email_address ) ); | |
?> | |
<script> | |
// decode rot13-encoded text | |
decodeText = text => { | |
return text.replace(/[a-z]/gi, letter => { | |
return String.fromCharCode( |
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
/** | |
* Gravity Forms: Filters the submit button. | |
* Replaces the <input> button with a <button> while maintaining attributes from original <input>. | |
* | |
* @param string $button Contains the <input> tag to be filtered. | |
* @param object $form Contains all the properties of the current form. | |
* | |
* @return string The filtered button. | |
* | |
* GF provides sample code for doing this under Examples at the following link but this dodn't work in my environment. |
A Pen by Ryan Niswonger on CodePen.
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
/* | |
# To do: | |
* Chat windows | |
* Settings page | |
* ... probably a lot more | |
# Note: | |
After saving the custom CSS in BGA, the format of this code will be altered | |
and these comments will be removed. This is expected. | |
Also, some games define their own colors which will cause some contrast issues. | |
*/ |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide] | |
"PreferExternalManifest"=dword:00000001 |
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
javascript:$('.content-scope-line:contains("Classifieds")').parents('.post-container').hide();$('.classifieds-single-item-content').hide();$('.content-scope-line:contains("Free items")').parents('.post-container').hide();$('.content-scope-line:contains("Recommendations")').parents('.post-container').hide();$('.content-scope-line:contains("Lost & Found")').parents('.post-container').hide();$('.post-byline:contains("Sponsored")').parents('.post-container').hide(); |