WordPress.org

Plugin Directory

Changeset 1471306


Ignore:
Timestamp:
08/10/16 06:12:16 (16 months ago)
Author:
kishores
Message:

new version

Location:
wp-review-restaurant
Files:
91 added
5 edited

Legend:

Unmodified
Added
Removed
  • wp-review-restaurant/trunk/includes/admin/class-wp-review-restaurant-writepanels.php

    r1043602 r1471306  
    7373        ) ); 
    7474    } 
    75      
    76     /** 
    77      * restaurant_listing_opening_hours_fields function. 
    78      * 
    79      * @access public 
    80      * @return void 
    81      */ 
    82     public function restaurant_listing_opening_hours_fields() { 
    83         return apply_filters( 'review_restaurant_restaurant_listing_opening_hours_fields', array( 
    84             '_restaurant_opening_hours_mon' => array( 
    85                 'label' => __( 'Monday', 'wp-review-restaurant' ), 
    86                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    87                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    88             ), 
    89             '_restaurant_opening_hours_tue' => array( 
    90                 'label' => __( 'Tuesday', 'wp-review-restaurant' ), 
    91                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    92                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    93             ), 
    94             '_restaurant_opening_hours_wed' => array( 
    95                 'label' => __( 'Wednesday', 'wp-review-restaurant' ), 
    96                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    97                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    98             ), 
    99             '_restaurant_opening_hours_thu' => array( 
    100                 'label' => __( 'Thursday', 'wp-review-restaurant' ), 
    101                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    102                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    103             ), 
    104             '_restaurant_opening_hours_fri' => array( 
    105                 'label' => __( 'Friday', 'wp-review-restaurant' ), 
    106                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    107                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    108             ), 
    109             '_restaurant_opening_hours_sat' => array( 
    110                 'label' => __( 'Saturday', 'wp-review-restaurant' ), 
    111                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    112                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    113             ), 
    114             '_restaurant_opening_hours_sun' => array( 
    115                 'label' => __( 'Sunday', 'wp-review-restaurant' ), 
    116                 'placeholder' => __( 'e.g. "12 Noon to 3 PM, 6:30 PM to 11 PM"', 'wp-review-restaurant' ), 
    117                 'description' => __( '<br />Add restaurant opening hours', 'wp-review-restaurant' ) 
    118             ), 
    119         ) ); 
    120     } 
    12175 
    12276    /** 
     
    12882    public function add_meta_boxes() { 
    12983        add_meta_box( 'restaurant_listing_data', __( 'Restaurant Listing Data', 'wp-review-restaurant' ), array( $this, 'restaurant_listing_data' ), 'restaurant_listing', 'normal', 'high' ); 
    130         add_meta_box( 'restaurant_listing_opening_hours', __( 'Opening hours', 'wp-review-restaurant' ), array( $this, 'restaurant_listing_opening_hours' ), 'restaurant_listing', 'normal', 'high' ); 
    13184    } 
    13285 
     
    353306 
    354307        do_action( 'review_restaurant_restaurant_listing_data_end', $thepostid ); 
    355  
    356         echo '</div>'; 
    357     } 
    358      
    359     /** 
    360      * restaurant_listing_opening_hours function. 
    361      * 
    362      * @access public 
    363      * @param mixed $post 
    364      * @return void 
    365      */ 
    366     public function restaurant_listing_opening_hours( $post ) { 
    367         global $post, $thepostid; 
    368  
    369         $thepostid = $post->ID; 
    370  
    371         echo '<div class="wp_review_restaurant_meta_data">'; 
    372  
    373         wp_nonce_field( 'save_meta_data', 'review_restaurant_nonce' ); 
    374  
    375         do_action( 'restaurant_listing_opening_hours_start', $thepostid ); 
    376  
    377         foreach ( $this->restaurant_listing_opening_hours_fields() as $key => $field ) { 
    378             $type = ! empty( $field['type'] ) ? $field['type'] : 'text'; 
    379  
    380             if ( method_exists( $this, 'input_' . $type ) ) 
    381                 call_user_func( array( $this, 'input_' . $type ), $key, $field ); 
    382             else 
    383                 do_action( 'review_restaurant_input_' . $type, $key, $field ); 
    384         } 
    385  
    386         do_action( 'restaurant_listing_opening_hours_end', $thepostid ); 
    387308 
    388309        echo '</div>'; 
     
    473394            } 
    474395        } 
    475          
    476         foreach ( $this->restaurant_listing_opening_hours_fields() as $key => $field ) { 
    477             // Everything else 
    478             $type = ! empty( $field['type'] ) ? $field['type'] : ''; 
    479  
    480             switch ( $type ) { 
    481                 case 'textarea' : 
    482                     update_post_meta( $post_id, $key, wp_kses_post( stripslashes( $_POST[ $key ] ) ) ); 
    483                 break; 
    484                 case 'checkbox' : 
    485                     if ( isset( $_POST[ $key ] ) ) { 
    486                         update_post_meta( $post_id, $key, 1 ); 
    487                     } else { 
    488                         update_post_meta( $post_id, $key, 0 ); 
    489                     } 
    490                 break; 
    491                 default :  
    492                     if ( is_array( $_POST[ $key ] ) ) { 
    493                         update_post_meta( $post_id, $key, array_map( 'sanitize_text_field', $_POST[ $key ] ) ); 
    494                     } else { 
    495                         update_post_meta( $post_id, $key, sanitize_text_field( $_POST[ $key ] ) ); 
    496                     } 
    497                 break; 
    498             } 
    499         } 
    500396    } 
    501397} 
  • wp-review-restaurant/trunk/readme.txt

    r1044815 r1471306  
    55Requires at least: 3.8 
    66Tested up to: 4.0.1 
    7 Stable tag: 1.3 
     7Stable tag: 1.4 
    88 
    99Manage restaurant listings from the WordPress admin panel, and allow users to post restaurants directly to your site. 
     
    1414 
    1515<blockquote> 
    16   <p><strong>Priority Support</strong></p> 
    17   <p>If you are looking for more features, paid support or Custom WordPress Work, then you can hire me too. My email id : babunsahoo@gmail.com .</p> 
    18   <strong>Also any new features you need it, you can mail me or add it in support sections</strong> 
     16  <p> 
     17We are woking on completely new version of it. It is still in beta. 
     18<a href="https://github.com/opentuteplus/restaurants-listings">Restaurants Listings</a> 
     19</p> 
     20  <strong>We are not supporting this plugin any more.Thanks</strong> 
    1921</blockquote> 
    2022 
     
    8991 
    9092== Changelog == 
     93= 1.4 = 
     94* We are working on a new plugin, so dumping this version soon. 
    9195= 1.3 = 
    9296* Added restaurant options for search and bug fix 
     
    99103 
    100104== Upgrade Notice == 
     105= 1.4 = 
     106* We are working on a new plugin, so dumping this version soon. 
    101107= 1.3 = 
    102108* Added restaurant options for search and bug fix 
  • wp-review-restaurant/trunk/templates/content-single-restaurant_listing.php

    r1043602 r1471306  
    4343        <div class="restaurant_description" itemprop="description"> 
    4444            <?php echo apply_filters( 'the_restaurant_description', get_the_content() ); ?> 
    45             <?php the_restaurant_opening_hours(); ?> 
    4645        </div> 
    4746 
  • wp-review-restaurant/trunk/wp-review-restaurant-template.php

    r1043602 r1471306  
    495495 
    496496/** 
    497  * Display or retrieve the current restaurant opening hours. 
    498  * 
    499  * @access public 
    500  * @param mixed $id (default: null) 
    501  * @return void 
    502  */ 
    503 function the_restaurant_opening_hours( $before = '', $after = '', $echo = true, $post = null ) { 
    504     $restaurant_opening_hours = get_the_restaurant_opening_hours( $post ); 
    505  
    506     if ( ! empty( $restaurant_opening_hours ) == 0 ) 
    507         return; 
    508      
    509     $restaurant_opening_hours_mon = $restaurant_opening_hours['_restaurant_opening_hours_mon']; 
    510     $restaurant_opening_hours_tue = $restaurant_opening_hours['_restaurant_opening_hours_tue']; 
    511     $restaurant_opening_hours_wed = $restaurant_opening_hours['_restaurant_opening_hours_wed']; 
    512     $restaurant_opening_hours_thu = $restaurant_opening_hours['_restaurant_opening_hours_thu']; 
    513     $restaurant_opening_hours_fri = $restaurant_opening_hours['_restaurant_opening_hours_fri']; 
    514     $restaurant_opening_hours_sat = $restaurant_opening_hours['_restaurant_opening_hours_sat']; 
    515     $restaurant_opening_hours_sun = $restaurant_opening_hours['_restaurant_opening_hours_sun']; 
    516      
    517     $restaurant_opening_hours = $before . '<div class="restaurant_opening_hours">'; 
    518     $restaurant_opening_hours .= '<span itemprop="hours">'; 
    519     $restaurant_opening_hours .= __( 'Opening hours', 'wp-review-restaurant'); 
    520     $restaurant_opening_hours .= '</span>'; 
    521     $restaurant_opening_hours .= '<ul>'; 
    522     if ( ! empty( $restaurant_opening_hours_mon ) ) 
    523         $restaurant_opening_hours .= '<li>' . __( 'Monday : ', 'wp-review-restaurant') . $restaurant_opening_hours_mon . '</li>'; 
    524     if ( ! empty( $restaurant_opening_hours_tue ) ) 
    525         $restaurant_opening_hours .= '<li>' . __( 'Tuesday : ', 'wp-review-restaurant') . $restaurant_opening_hours_tue . '</li>'; 
    526     if ( ! empty( $restaurant_opening_hours_wed ) ) 
    527         $restaurant_opening_hours .= '<li>' . __( 'Wednesday : ', 'wp-review-restaurant') . $restaurant_opening_hours_wed . '</li>'; 
    528     if ( ! empty( $restaurant_opening_hours_thu ) ) 
    529         $restaurant_opening_hours .= '<li>' . __( 'Thursday : ', 'wp-review-restaurant') . $restaurant_opening_hours_thu . '</li>'; 
    530     if ( ! empty( $restaurant_opening_hours_fri ) ) 
    531         $restaurant_opening_hours .= '<li>' . __( 'Friday : ', 'wp-review-restaurant') . $restaurant_opening_hours_fri . '</li>'; 
    532     if ( ! empty( $restaurant_opening_hours_sat ) ) 
    533         $restaurant_opening_hours .= '<li>' . __( 'Saturday : ', 'wp-review-restaurant') . $restaurant_opening_hours_sat . '</li>'; 
    534     if ( ! empty( $restaurant_opening_hours_sun ) ) 
    535         $restaurant_opening_hours .= '<li>' . __( 'Sunday : ', 'wp-review-restaurant') . $restaurant_opening_hours_sun . '</li>'; 
    536     $restaurant_opening_hours .= '</ul>'; 
    537     $restaurant_opening_hours .= '</div>' . $after; 
    538      
    539     $restaurant_opening_hours = apply_filters( 'the_restaurant_opening_hours', $restaurant_opening_hours ); 
    540  
    541     if ( $echo ) 
    542         echo $restaurant_opening_hours; 
    543     else 
    544         return $restaurant_opening_hours; 
    545 } 
    546  
    547 /** 
    548  * get_the_restaurant_opening_hours function. 
    549  * 
    550  * @access public 
    551  * @param int $post (default: 0) 
    552  * @return void 
    553  */ 
    554 function get_the_restaurant_opening_hours( $post = null ) { 
    555     $post = get_post( $post ); 
    556     if ( $post->post_type !== 'restaurant_listing' ) 
    557         return; 
    558          
    559     $restaurant_opening_hours = array(); 
    560      
    561     $restaurant_opening_hours['_restaurant_opening_hours_mon'] = $post->_restaurant_opening_hours_mon; 
    562     $restaurant_opening_hours['_restaurant_opening_hours_tue'] = $post->_restaurant_opening_hours_tue; 
    563     $restaurant_opening_hours['_restaurant_opening_hours_wed'] = $post->_restaurant_opening_hours_wed; 
    564     $restaurant_opening_hours['_restaurant_opening_hours_thu'] = $post->_restaurant_opening_hours_thu; 
    565     $restaurant_opening_hours['_restaurant_opening_hours_fri'] = $post->_restaurant_opening_hours_fri; 
    566     $restaurant_opening_hours['_restaurant_opening_hours_sat'] = $post->_restaurant_opening_hours_sat; 
    567     $restaurant_opening_hours['_restaurant_opening_hours_sun'] = $post->_restaurant_opening_hours_sun; 
    568  
    569     if ( ! empty( $restaurant_opening_hours ) == 0 ) 
    570         return; 
    571  
    572     return apply_filters( 'get_the_restaurant_opening_hours', $restaurant_opening_hours, $post ); 
    573 } 
    574  
    575 /** 
    576497 * restaurant_listing_class function. 
    577498 * 
  • wp-review-restaurant/trunk/wp-review-restaurant.php

    r1042641 r1471306  
    44Plugin URI: http://opentuteplus.com/wp-review-restaurant 
    55Description: Manage restaurant review from the WordPress admin panel, and allow users to post reviews directly to your listed restaurant. 
    6 Version: 1.3 
     6Version: 1.4 
    77Author: Kishore 
    88Author URI: http://blog.kishorechandra.co.in/ 
    99Requires at least: 3.8 
    10 Tested up to: 4.0.1 
     10Tested up to: 4.5 
    1111Text Domain: wp-review-restaurant 
    1212Domain Path: /languages 
     
    3131    public function __construct() { 
    3232        // Define constants 
    33         define( 'REVIEW_RESTAURANT_VERSION', '1.1' ); 
     33        define( 'REVIEW_RESTAURANT_VERSION', '1.4' ); 
    3434        define( 'REVIEW_RESTAURANT_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); 
    3535        define( 'REVIEW_RESTAURANT_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) ); 
Note: See TracChangeset for help on using the changeset viewer.