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
const axios = require('axios'); | |
const baseURL = 'https://wordpress.org/photos/wp-json/wp/v2/photos'; | |
const params = { | |
after: '2024-02-01T00:00:00-04:00', | |
per_page: 100 | |
}; | |
async function fetchPhotosWithKeyword(keyword) { | |
try { |
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
sudo: false | |
language: php | |
matrix: | |
include: | |
- php: 5.6 | |
before_install: | |
- WP_CORE_DIR=/tmp/wordpress/ | |
- git clone https://github.com/WordPress/twentysixteen.git src/wp-content/themes/twentysixteen | |
- | | |
if [[ true ]]; then |
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 | |
/* | |
Plugin Name: Jorbishiza | |
*/ | |
add_filter( 'publishiza_format_post_content_for_twitter', 'jorbishiza_format_post_content_for_twitter', 10, 3); | |
function jorbishiza_format_post_content_for_twitter( $tweets, $text, $length ){ | |
$tweets = array(); |
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
Index: object-cache.php | |
=================================================================== | |
--- object-cache.php (revision 1548389) | |
+++ object-cache.php (working copy) | |
@@ -374,9 +374,9 @@ | |
else : // No APC | |
function apc_not_actually_running() { | |
$GLOBALS['_wp_using_ext_object_cache'] = false; | |
- unset( $GLOBALS['wp_filter']['all'][-100]['apc_not_actually_running'] ); | |
+ remove_action( 'all', 'apc_not_actually_running', -100, 0 ); |
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 | |
namespace Symfony\Component\Yaml; | |
class Yaml | |
{ | |
public static function dump() | |
{ | |
die( 'Bad File' ); |
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
let t1 = 1433116798; // 2 seconds before midnight d1 | |
let t2 = 1433116799; // 1 second before midnight d1 | |
let t3 = 1433116801; // 1 seoncd after midnight d2 | |
let t4 = 1433203201; // 1 second after midnight d3 | |
const DAY_IN_SECONDS = 86400; | |
let days_since_epoch = t => { | |
return Math.floor( t / DAY_IN_SECONDS ); | |
} |
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 | |
/** | |
* @package Hello_Dolly | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Hello Dolly | |
Plugin URI: http://wordpress.org/plugins/hello-dolly/ | |
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page. | |
Author: Matt Mullenweg |
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 | |
/* | |
Plugin Name: update versioning | |
Description: Example of an update routine for a plugin | |
Author: Aaron Jorbin | |
Version: 0.1 | |
Author URI: http://aaron.jorb.in | |
*/ | |
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 | |
/* | |
Plugin Name: Color Rotator | |
Description: Change the color scheme every time you login | |
Author: Aaron Jorbin | |
Version: 1.0 | |
Author URI: http://aaron.jorb.in/ | |
License: GPLv2 or later | |
*/ |
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 | |
// embed the javascript file that makes the AJAX request | |
wp_enqueue_script( 'my-ajax-request', plugin_dir_url( __FILE__ ) . 'js/ajax.js', array( 'jquery' ) ); | |
// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php) | |
wp_localize_script( 'my-ajax-request', 'ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); |
NewerOlder