Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getevents()
- {
- $query = new WP_Query('post_type=event');
- $meta = array();
- if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
- array_push($meta, get_metadata('post', get_the_ID(), '', true) );
- endwhile;endif;
- // return $output;
- var_dump($meta);
- //echo $meta;
- }
- array(6) { [0]=> array(9) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1560795466:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_cost"]=> array(1) { [0]=> string(1) "0" } ["_sgbcards_type"]=> array(1) { [0]=> string(9) "commander" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "185" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(56) "http://sgb.dev/wp-content/uploads/2019/06/sgb_com_04.jpg" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "187" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(57) "http://sgb.dev/wp-content/uploads/2019/06/sgb_com_04m.jpg" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"4";}" } } [1]=> array(12) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1558819840:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"6";}" } ["_sgbcards_cost"]=> array(1) { [0]=> string(1) "8" } ["_sgbcards_prizepool"]=> array(1) { [0]=> string(28) "Pack Per Win + Showdown Pack" } ["_sgbcards_type"]=> array(1) { [0]=> string(8) "standard" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "165" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(63) "http://sgb.dev/wp-content/uploads/2019/05/sgb_stnd_may_june.jpg" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "167" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(64) "http://sgb.dev/wp-content/uploads/2019/05/sgb_stnd_may_junem.jpg" } ["_sgbcards_startdate"]=> array(1) { [0]=> string(10) "05/18/2019" } ["_sgbcards_enddate"]=> array(1) { [0]=> string(10) "06/15/2019" } } [2]=> array(9) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1558807866:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"7";}" } ["_sgbcards_cost"]=> array(1) { [0]=> string(4) "Free" } ["_sgbcards_type"]=> array(1) { [0]=> string(9) "commander" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "160" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(56) "http://sgb.dev/wp-content/uploads/2019/05/sgb_com_07.jpg" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "162" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(57) "http://sgb.dev/wp-content/uploads/2019/05/sgb_com_07m.jpg" } } [3]=> array(9) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1558795217:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"2";}" } ["_sgbcards_cost"]=> array(1) { [0]=> string(2) "10" } ["_sgbcards_type"]=> array(1) { [0]=> string(8) "expanded" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "155" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(59) "http://sgb.dev/wp-content/uploads/2019/05/sgb_modern_q3.jpg" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "157" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(60) "http://sgb.dev/wp-content/uploads/2019/05/sgb_modern_q3m.jpg" } } [4]=> array(9) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1560027295:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"2";}" } ["_sgbcards_cost"]=> array(1) { [0]=> string(1) "5" } ["_sgbcards_type"]=> array(1) { [0]=> string(8) "standard" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "179" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(64) "http://sgb.dev/wp-content/uploads/2019/06/sgb_pkmn_stnd_ub-1.png" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "181" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(66) "http://sgb.dev/wp-content/uploads/2019/06/sgb_pkmn_stnd_ub_m-1.png" } } [5]=> array(10) { ["_edit_lock"]=> array(1) { [0]=> string(12) "1559232241:1" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_sgbcards_day"]=> array(1) { [0]=> string(18) "a:1:{i:0;s:1:"5";}" } ["_sgbcards_cost"]=> array(1) { [0]=> string(1) "5" } ["_sgbcards_prizepool"]=> array(1) { [0]=> string(12) "Pack Per Win" } ["_sgbcards_type"]=> array(1) { [0]=> string(8) "standard" } ["_sgbcards_banner_normal_id"]=> array(1) { [0]=> string(3) "170" } ["_sgbcards_banner_normal"]=> array(1) { [0]=> string(56) "http://sgb.dev/wp-content/uploads/2019/05/sgb_fnm_q3.jpg" } ["_sgbcards_banner_mobile_id"]=> array(1) { [0]=> string(3) "172" } ["_sgbcards_banner_mobile"]=> array(1) { [0]=> string(57) "http://sgb.dev/wp-content/uploads/2019/05/sgb_fnm_q3m.jpg" } } } NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement