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' | |
], |
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
<?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 | |
$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 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 | |
namespace sejoli; | |
Class PostType | |
{ | |
protected static $labels = []; | |
protected static $args = []; | |
protected static $post_type = ''; | |
protected static $valid = true; | |
protected static $exists = true; |
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 JBSF\Admin; | |
class Taxonomy | |
{ | |
private $label = []; | |
/** | |
* Construction | |
*/ |
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 | |
/** | |
* Plugin Name: WooCommerce - Display Variation Price in Dropdown | |
* Plugin URI: https://ridwanarifandi.com | |
* Description: Display price in variation dropdown | |
* Version: 1.0.0 | |
* Author: Ridwan Arifandi | |
* Author URI: https://ridwanarifandi | |
* Text Domain: woocommerce | |
* |
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 | |
/** | |
* Return with custom template path | |
* Hooked via filter wc_get_template, priority 100 | |
* @param string $located [description] | |
* @param string $template_name [description] | |
* @param string $args [description] | |
* @param string $template_path [description] | |
* @param string $default_path [description] | |
* @return string [description] |
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 | |
/** | |
* | |
* Change 'custom-request' to anything you want | |
* | |
* Register custom rules | |
* Hooked via filter generate_rewrite_rules, priority 999 | |
* @param Object $wp_rewrite | |
*/ | |
function set_custom_rules($wp_rewrite) |
OlderNewer