rveitch
2/28/2018 - 7:41 PM

CoSchedule WordPress Plugin - Get Full Post Example (Debug Bar Console)

CoSchedule WordPress Plugin - Get Full Post Example (Debug Bar Console)

<?php
// Debug the CoSchedule Plugin
$post_id = 522; // Replace this ID with an ID of a post you want to check.
if (class_exists( 'TM_CoSchedule' )) {
  $coschedule = new TM_CoSchedule;
  $full_post = $coschedule->get_full_post( $post_id );
  echo '$full_post:<br><pre>'; print_r(json_encode($full_post, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT)); echo '</pre><br><br>';
} else {
  echo 'Class does not exist.';
}

// Debug the Upload Directory
$upload_dir = wp_upload_dir();
echo '$upload_dir:<br><pre>'; print_r(json_encode($upload_dir, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT)); echo '</pre>';
?>