예제 #1
0
<script src="https://bizyhood-common.s3.amazonaws.com/bizyhood-net/init.js"></script>
<div id="main">
      <?php 
Bizyhood_View::load('admin/global/header');
?>
      <div class="left_column">
         <?php 
if ($errors) {
    ?>
             <div class="box">
                    <div class="shadow_column">
                        <div class="title" style="padding-left: 27px; background: #F1F1F1 url('<?php 
    echo Bizyhood_Utility::getImageBaseURL();
    ?>
info.png') no-repeat scroll 7px center;">
                            Alerts
                        </div>
                        <div class="content">
                            <p>
                                Nice to have you! We've noticed some things you may want to take
                                care of:
                            </p>
                            <ol>
                                <?php 
    foreach ($errors as $error) {
        ?>
                                    <li><?php 
        echo $error;
        ?>
</li>
                                <?php 
예제 #2
0
 /**
  * Handler used for modifying the way business listings are displayed
  * @param string $content The post content
  * @return string Content
  */
 public function postTemplate($content)
 {
     global $post, $wp_query;
     $api_url = Bizyhood_Utility::getApiUrl();
     # Override content for the view business page
     $post_name = $post->post_name;
     if ($post_name === 'business-overview') {
         $signup_page_id = Bizyhood_Utility::getOption(self::KEY_SIGNUP_PAGE_ID);
         // get the bizyhood_id
         if (isset($wp_query->query_vars['bizyhood_id'])) {
             $bizyhood_id = urldecode($wp_query->query_vars['bizyhood_id']);
         } else {
             $bizyhood_id = isset($_REQUEST['bizyhood_id']) ? $_REQUEST['bizyhood_id'] : '';
         }
         $response = wp_remote_retrieve_body(wp_remote_get($api_url . "/business/" . $bizyhood_id));
         $business = json_decode($response);
         return Bizyhood_View::load('listings/single/default', array('content' => $content, 'business' => $business, 'signup_page_id' => $signup_page_id), true);
     }
     return $content;
 }