function ajax_modal() { if (!isset($_POST['url'])) { echo json_encode(array('title' => __('Request Fail'), 'content' => __('No post url'))); die; } $post_id = url_to_postid($_POST['url']); echo json_encode(posts::getPost($post_id)); die; }
<?php $contact_id = 71; $contact = posts::getPost($contact_id); if ($contact) { $contact_bg = wp_get_attachment_image_url(get_post_thumbnail_id($contact_id), 'full'); $contact_bg = $contact_bg ? 'background-image: url(' . $contact_bg . ');' : ''; ?> <div style="<?php echo $contact_bg; ?> " class="container-fluid contact-wrap"> <div class="trans-bg"></div> <div class="container"> <form action="<?php echo home_url('/'); ?> " class="row"> <div class="col-md-12 header-wrap"> <h2><?php echo $contact['title']; ?> </h2> </div> <div class="col-sm-12 col content visible-xs"> <?php echo $contact['content']; ?> </div> <div class="col-sm-6 col-md-5 col"> <div class="form-group">
?> <?php } ?> <?php wp_reset_postdata(); ?> </div> </div> <?php } ?> <?php $whois_id = 65; $whois = posts::getPost($whois_id); if ($whois) { $twitter_href = get_theme_mod('twitter_href'); $twitter_href = $twitter_href ? $twitter_href : '#'; $google_href = get_theme_mod('google_href'); $google_href = $google_href ? $google_href : '#'; $facebook_href = get_theme_mod('facebook_href'); $facebook_href = $facebook_href ? $facebook_href : '#'; $youtube_href = get_theme_mod('youtube_href'); $youtube_href = $youtube_href ? $youtube_href : '#'; $whois_bg = wp_get_attachment_image_url(get_post_thumbnail_id($whois_id), 'full'); $whois_bg = $whois_bg ? 'background-image: url(' . $whois_bg . ');' : ''; $site_descr = get_bloginfo('description'); ?> <div style="<?php echo $whois_bg;
<div id="center"> <!-- center --> <?php if (isset($_SESSION['logIn']) || isset($confUser)) { // center display on first commers $bb->getPostStatus(); // STATUS | ADD PHPTO PANE //$bb->getUserProfile(); // USER PROFILE PANE ?> <div id="postMast"> <?php //THE MAIN POST MAST-------------- if (isset($_GET['post']) && isset($_GET['user'])) { $bb->checkPost($_GET['post'], $_GET['user']); // echo for url calls } $bb->getPost(); //call post here ?> </div> <?php //THE END OF POST MAST ------------------------ } else { // DISPLAY REGISTERED USERS require "incl/displayUsers.php"; } ?> </div> <!----------------------------- center ends ------------------------------------------ --> </div>