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
var resizeTimer; | |
// foo | |
function foo() { | |
console.log( 'delayed' ); | |
} | |
// initially run foo | |
foo(); |
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
/** | |
* Order Admin Menu Items | |
*/ | |
function custom_menu_order( $menu_ord ) { | |
if ( ! $menu_ord ) { | |
return true; | |
} | |
return array( |
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
{ | |
"overlay_scroll_bars": "enabled", | |
"line_padding_top": 3, | |
"line_padding_bottom": 3, | |
"always_show_minimap_viewport": true, | |
"font_options": [ "gray_antialias" ], | |
"bold_folder_labels": true, | |
"caret_extra_width": 2, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker-OceanicNext.tmTheme", |
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 | |
/** | |
* Local / Staging Environment | |
* | |
* Used in conjunction with mu-plugins/disable-plugins-dev-environment.php | |
* Disables plugins specified in plugin file | |
* | |
* SET TO FALSE ON PRODUCTION | |
*/ |
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 related menu | |
* | |
* Displays immediate children or siblings | |
* | |
* @param boolean $echo echo or return result | |
* @return str $r | |
*/ | |
function prefix_related_menu( $echo = true ) { |
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 | |
/** | |
* Change order of Yoast SEO plugin meta box | |
* | |
* Plugin: Yoast SEO | |
*/ | |
function prefix_yoast_meta_order() { | |
return 'low'; |
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 | |
/** | |
* | |
* Safe Search and Replace on Database with Serialized Data v2.1.1 | |
* | |
* This script is to solve the problem of doing database search and replace when | |
* developers have only gone and used the non-relational concept of serializing | |
* PHP arrays into single database columns. It will search for all matching | |
* data on the database and change it, even if it's within a serialized PHP | |
* array. |
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
/** | |
* Set custom upload directory | |
* | |
* Images => /img | |
* PDF => /pdf | |
* Misc => /misc | |
* | |
* Note: Doesn't work with 'browser uploader' | |
* Note: Use with 'wp_update_attachment_metadata' hook if we want to define our own attachment metadata | |
* Allowed file types: http://codex.wordpress.org/Uploading_Files#About_Uploading_Files_on_Dashboard |
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 attachment metadata | |
* | |
* By default, WordPress only adds '_wp_attachment_metadata' metadata to images, audio and video files. | |
* This hooks into 'wp_update_attachment_metadata' and sets 'file' to the value of '_wp_attached_file'. | |
*/ | |
function prefix_update_attachment_metadata( $data, $post_id ) { | |
// only set 'file' if needed | |
if ( isset( $data['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
/** | |
* Hook into Admin_footer on taxonomy edit screens | |
* | |
* @return void | |
*/ | |
function prefix_hide_term_metabox() { | |
global $current_screen; | |
$output = false; |
OlderNewer