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_action('pre_get_posts', function ($query) { | |
global $wp; | |
if (!is_admin() && $query->is_main_query()) : | |
if ($wp->request == '.custom-hidden-endpoint-wordpress-way-is-a-death-trap') { | |
header('Content-Type: application/json'); | |
echo json_encode(array('hi' => 'mathias')); | |
exit; | |
endif; |
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 | |
class Feed_Controller extends Base_Controller | |
{ | |
public $layout = 'layouts.feed'; | |
public function get_index() | |
{ | |
$records = Record::where_deleted(0) | |
->order_by('updated_at', 'desc') |
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
/* | |
* Instructions: | |
* Paste one of the following snippets in your browsers Javascript console | |
*/ | |
// Remove all others than yourself | |
var n = "Mathias Hansen"; $("li.todo").each(function () { if ($.trim($(this).find("span .pill").find("span span").html()) != n) { $(this).remove(); } }); | |
// Mark your name with a color | |
var n = "Mathias Hansen"; $("li.todo").each(function () { var o = $(this).find("span .pill").find("span span"); if ($.trim(o.html()) == n) { o.css('color', '#000'); o.parent().css('background-color', 'yellow'); } }); |