Snippets frequently used with Sage
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
<!-- // The HTML (could be part of page content) // --> | |
<input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input> | |
<div id="datafetch">Search results will appear here</div> |
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
add_action('plugins_loaded', function() { | |
$action = is_user_admin() ? 'user_admin_notices' : 'admin_notices'; | |
add_action($action, function () { | |
ob_start(); | |
}); | |
add_action('all_admin_notices', function () { | |
$log = strip_tags(trim(ob_get_clean())); |
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 App\Livewire; | |
use Livewire\Attributes\Url; | |
use Livewire\Component; | |
use WP_Query; | |
class PostSearch extends Component | |
{ |