I hereby claim:
- I am aldolat on github.
- I am aldolat (https://keybase.io/aldolat) on keybase.
- I have a public key whose fingerprint is 3CEA 2AAB 56A7 929A A0E9 2AAA 2E15 B621 E350 BA44
To claim this, I am signing this object:
| <?php | |
| /** | |
| * Register scripts. | |
| * Add this function to your functions.php file or to your functions plugin. | |
| * | |
| * @since 1.0.0 | |
| */ | |
| function posts_in_sidebar_hacks() { | |
| wp_register_script( | |
| 'pis_scripts', |
I hereby claim:
To claim this, I am signing this object:
| diff -rq -x ".git" -x ".directory" /path/to/first/directory/ /path/to/second/directory/ |
| <?php | |
| /** | |
| * Remove empty keys from an array recursively. | |
| * | |
| * @param array $array The array to be checked. | |
| * @param boolean $make_empty If the output is to return as an empty string. | |
| * @since 1.29 | |
| * @see http://stackoverflow.com/questions/7696548/php-how-to-remove-empty-entries-of-an-array-recursively | |
| */ | |
| function pis_array_remove_empty_keys( $array, $make_empty = false ) { |
| jQuery(document).on('widget-updated', function(event, widget){ | |
| var widget_id = jQuery(widget).attr('id'); | |
| // any code that needs to be run when a widget gets updated goes here | |
| // widget_id holds the ID of the actual widget that got updated | |
| // be sure to only run the code if one of your widgets got updated | |
| // otherwise the code will be run when any widget is updated | |
| }); | |
| jQuery(document).on('widget-added', function(event, widget){ | |
| var widget_id = jQuery(widget).attr('id'); |
| <?php | |
| /** | |
| * Compare a string and an array and return the common elements as a string. | |
| * | |
| * @param string $string The string to be compared. | |
| * @param array $array The array to be compared. | |
| * | |
| * @return string $output The string containing the common values. | |
| * |
| <?php | |
| /** | |
| * Create the shortcode to embed a Gist. | |
| * | |
| * @example [gist]https://gist.github.com/aldolat/8625342[/gist] | |
| * @since 4.5 | |
| */ | |
| function aldolat_gist_embed( $atts, $content = null ) { | |
| extract( shortcode_atts( array(), $atts ) ); |
| <?php | |
| /** | |
| * Create a "Fork me on GitHub" ribbon. | |
| * | |
| * @example [forkmeribbon url="http://www.example.com" color="red" position="right"] | |
| * @since 1.0 | |
| */ | |
| function forkmeribbon_function( $atts ) { | |
| extract( shortcode_atts( array( | |
| 'url' => '', |
| <?php | |
| // Add this function to your functions.php file or to your functions plugin. | |
| function posts_in_sidebar_hacks() { | |
| wp_enqueue_script( 'pis-add-hacks', get_template_directory_uri() . '/js/pis-hacks.js', array( 'jquery' ), false, true ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'posts_in_sidebar_hacks' ); |