Plugin Directory

Changeset 1845813


Ignore:
Timestamp:
03/23/2018 04:18:47 PM (8 years ago)
Author:
livehelpnow
Message:

Add fix causing ID interference

Location:
livehelpnow-helpdesk/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • livehelpnow-helpdesk/trunk/plugin.php

    r1819233 r1845813  
    22/**
    33 * Plugin Name:     Livehelpnow Help Desk
    4  * Version:         0.1.6
     4 * Version:         0.1.7
    55 * Plugin URI:      https://wordpress.org/plugins/livehelpnow-helpdesk/
    66 * Description:     Include LiveHelpNow chat system on your WordPress website.
  • livehelpnow-helpdesk/trunk/readme.txt

    r1819233 r1845813  
    55Requires PHP: 5.4
    66Tested up to: 4.9.1
    7 Stable tag: 0.1.6
     7Stable tag: 0.1.7
    88License GPLv2 or later
    99License URI http://www.gnu.org/licenses/gpl-2.0.html
     
    8888== Changelog ==
    8989
     90= 0.1.7 =
     91* Fixed problem WordPress bug, not allowing template tags in side metabox, causing interference with global object ID.
     92
    9093= 0.1.6 =
    9194* Fixed problem with not saving option when checkbox is not selected
  • livehelpnow-helpdesk/trunk/src/class/Settings.php

    r1819233 r1845813  
    9999    public function display_chat_display_metabox( $post ) {
    100100
    101         $display = get_post_meta( get_the_ID(), 'chat_display', true );
     101        $display = get_post_meta( $post->ID, 'chat_display', true );
    102102        require_once LHN_CHAT_PLUGIN_DIR_PATH . 'src/templates/admin/chat-display-settings.php';
    103103
     
    140140    public function display_chat_hide_metabox( $post ) {
    141141
    142         $hide = get_post_meta( get_the_ID(), 'chat_hide', true );
     142        $hide = get_post_meta( $post->ID, 'chat_hide', true );
    143143        require_once LHN_CHAT_PLUGIN_DIR_PATH . 'src/templates/admin/chat-hide-settings.php';
    144144
     
    177177    public function display_chat_widget_metabox( $post ) {
    178178
    179         $hide = get_post_meta( get_the_ID(), 'chat_widget_id', true );
     179        $hide = get_post_meta( $post->ID, 'chat_widget_id', true );
    180180        require_once LHN_CHAT_PLUGIN_DIR_PATH . 'src/templates/admin/chat-widget-settings.php';
    181181
  • livehelpnow-helpdesk/trunk/src/templates/admin/chat-widget-settings.php

    r1806916 r1845813  
    1616<?php if ( $chats->have_posts() ) : ?>
    1717    <select name="chat_widget_id">
    18         <?php while ( $chats->have_posts() ) : ?>
    19             <?php $chats->the_post(); ?>
    20             <option value="<?php echo get_the_ID(); ?>" <?php selected( get_the_ID(), $meta_widget_id ); ?>>
    21                 <?php the_title(); ?>
     18        <?php foreach ( $chats->get_posts() as $chat ) : ?>
     19            <option value="<?php echo $chat->ID; ?>" <?php selected( $chat->ID, $meta_widget_id ); ?>>
     20                <?php echo apply_filters( 'the_title', $chat->post_title ); ?>
    2221            </option>
    23         <?php endwhile; ?>
     22        <?php endforeach; ?>
    2423    </select>
    2524<?php endif;
Note: See TracChangeset for help on using the changeset viewer.