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
#alright best guess here, i'll be honest. i don't use wp-cli a lot other than what comes packaged in a vagrant | |
wp post meta update <key> upgraded <value> 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
/* | |
honestly, i only use wp-rest now for ajax, so mine would actually look somehting like this: | |
*/ | |
add_action('rest_api_init',function($server){ | |
register_rest_route('my-plugin/v1','/add-email',array( | |
'methods' => 'POST', | |
'callback' => array($this,'add_email') //and i use class-based name-spacing and auto-loading as you can see | |
) ); | |
}); |
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 = array( | |
'post_type' => "company", | |
'nopaging' => false, | |
'posts_per_page' => '100', | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
'orderby' => 'meta_value_num', | |
'meta_key' => 'sponsored', | |
'order' => 'DESC' |