Plugin Directory

Changeset 1142507


Ignore:
Timestamp:
04/22/2015 07:29:16 PM (11 years ago)
Author:
OpenMenu
Message:

v2.0 update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • open-menu/trunk/templates/default/single-openmenu.php

    r794960 r1142507  
    1515    $custom = get_post_custom();
    1616    $restaurant_name = (isset($custom["_restaurant_name"][0])) ? $custom["_restaurant_name"][0] : '' ;
    17     $omf_url = (isset($custom["_omf_url"][0])) ? $custom["_omf_url"][0] : '' ;
     17    $openmenu_id = (isset($custom["_openmenu_id"][0])) ? $custom["_openmenu_id"][0] : '' ;
     18    $omf_url = (isset($custom["_omf_url"][0])) ? $custom["_omf_url"][0] : '' ; // backwards compatibility
    1819    $menu_filter = ( !empty($custom["_menu_filter"][0]) ) ? htmlentities($custom["_menu_filter"][0]) : false ;
    1920    $group_filter = ( !empty($custom["_group_filter"][0]) ) ? htmlentities($custom["_group_filter"][0]) : false ;
    20    
     21
     22    if (!$openmenu_id && !empty($omf_url) ) {
     23        $openmenu_id = str_replace('http://openmenu.com/menu/', '', $omf_url);
     24    }
     25           
    2126    // Get the Open Menu Options
    2227    $options = get_option( 'openmenu_options' );
     
    3540   
    3641    // Get the menu
    37     $omf_details = _get_menu_details( $omf_url );
     42    $omf_details = _get_menu_details( $openmenu_id );
    3843?>
    39 
     44   
    4045<?php get_header() ?>
    4146
    4247    <style type="text/css">
    4348        #om_menu, #om_menu dt, #om_menu dd.price { background-color:<?php echo $background_color; ?> }
     49        #om_menu dd.price { padding-top:2px; }
    4450    </style>
    45 
     51   
    4652    <div id="container">
    4753        <div id="content" class="openmenu" <?php echo $content_width_css; ?>>
Note: See TracChangeset for help on using the changeset viewer.