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 | |
namespace Ridwan; | |
class WP_Query | |
{ | |
protected static $chunk = 10; | |
protected static $args = []; | |
protected static $posts = []; | |
protected static $respond = []; |
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 | |
$found_posts = true; // Set as true | |
$offset = 0; // Set start post | |
$posts_per_page = 20; // Chunk for each 20 posts | |
while($found_posts) : | |
$query = new WP_Query([ | |
'posts_per_page' => $posts_per_page, | |
'offset' => $offset | |
]); |
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 | |
namespace WP; | |
class CLI | |
{ | |
/** | |
* Construction | |
*/ | |
public function __construct() |
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 | |
namespace WP_Endpoint; | |
class Notifier | |
{ | |
protected $valid = true; | |
protected $messages = []; | |
public $email = ''; |
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
$args = [ | |
'post_type' => 'company', | |
'posts_per_page' => 100, | |
'meta_query' => [ | |
'relation' => 'AND', | |
[ | |
'key' => 'sponsored', | |
'value' => [0,1] | |
'compare' => 'IN' | |
], |
NewerOlder