Plugin Directory

Changeset 1855329


Ignore:
Timestamp:
04/09/2018 05:25:03 PM (8 years ago)
Author:
dunar21
Message:

Fixed issue with meta key displaying as meta value

Location:
wpr-general-posts-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpr-general-posts-widget/trunk/README.txt

    r1842285 r1855329  
    77Tags: posts widget,recent posts, recent post, recent posts widget, popular posts, popular posts widget, posts sidebar, sidebar post widget, custom post type widget, recent posts custom post type, newest posts, newest posts widget
    88Requires at least: 3.0.1
    9 Tested up to: 4.9.4
    10 Stable tag: 1.2.0
     9Tested up to: 4.9.5
     10Stable tag: 1.3.0
    1111License: GPLv2 or later
    1212License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wpr-general-posts-widget/trunk/wpr-general-posts.php

    r1842285 r1855329  
    44Plugin URI: http://worldpressrevolution.com/wpr_myplugins/wpr-general-posts-widget/
    55Description: Full wp_query parameters for a post listing widget.  Completely customize a post/post_type list in the widget area.  Used for latest posts, popular posts, posts by taxonomy or category, posts by meta query, whatever.
    6 Version: 1.2.0
     6Version: 1.3.0
    77Author: Aryan Duntley
    88Author URI: http://worldpressrevolution.com
     
    3030        $post_taxterm = $instance['taxterm'];
    3131        $post_typed = $instance['ptipe'];
    32         $post_metakey = $instance['metakey'];
    33         $post_metavalue = $instance['metavalue'];
     32        $post_metakey = $instance['thmetakey'];
     33        $post_metavalue = $instance['thmetavalue'];
    3434        $post_comparison = $instance['metacompare'];
    3535        $post_widgeid = $instance['widgetidentifier'];
     
    175175        $instance['taxterm'] = strip_tags( $new_instance['taxterm']);
    176176        $instance['ptipe'] = strip_tags( $new_instance['ptipe']);
    177         $instance['metakey'] = strip_tags( $new_instance['metakey']);
    178         $instance['metavalue'] = strip_tags( $new_instance['metavalue']);
     177        $instance['thmetakey'] = strip_tags( $new_instance['thmetakey']);
     178        $instance['thmetavalue'] = strip_tags( $new_instance['thmetavalue']);
    179179        $instance['metacompare'] = strip_tags( $new_instance['metacompare']);
    180180        $instance['widgetidentifier'] = strip_tags( $new_instance['widgetidentifier']);
     
    188188    function form( $instance ) {
    189189    // outputs the options form on admin
    190         $defaults = array( 'title' => 'General Posts', 'show' => '3', 'orderby'=> 'date', 'order'=>'DESC', 'catin' => '', 'catout' => '', 'pagecount' => '3', 'taxis' => '', 'taxterm' => '', 'ptipe' => 'post', 'metakey'=> '', 'metavalue' => '', 'metacompare' => '=', 'widgetidentifier' => '', 'widgetclassifier' => '', 'readmoretitle' => '', 'readmorelink' => '');//'term' => ' ',
     190        $defaults = array( 'title' => 'General Posts', 'show' => '3', 'orderby'=> 'date', 'order'=>'DESC', 'catin' => '', 'catout' => '', 'pagecount' => '3', 'taxis' => '', 'taxterm' => '', 'ptipe' => 'post', 'thmetakey'=> '', 'thmetavalue' => '', 'metacompare' => '=', 'widgetidentifier' => '', 'widgetclassifier' => '', 'readmoretitle' => '', 'readmorelink' => '');//'term' => ' ',
    191191        $instance = wp_parse_args( (array) $instance, $defaults );
    192192        $title = $instance['title'];
     
    200200        $post_taxterm = $instance['taxterm'];
    201201        $post_typed = $instance['ptipe'];
    202         $post_metakey = $instance['metakey'];
    203         $post_metavalue = $instance['metavalue'];
     202        $post_metakey = $instance['thmetakey'];
     203        $post_metavalue = $instance['thmetavalue'];
    204204        $post_comparison = $instance['metacompare'];
    205205        $post_widgeid = $instance['widgetidentifier'];
     
    278278       
    279279        <p>For tax queries, this widget interface only supports one tax query, for multiple use wpr_adjust_genposts_query filter<br/>
    280         Meta Key: <input class="widefat" name="<?php echo $this->get_field_name( 'metakey' ); ?>" value="<?php echo $post_metavalue; ?>" />
     280        Meta Key: <input class="widefat" name="<?php echo $this->get_field_name( 'metakey' ); ?>" value="<?php echo $post_metakey; ?>" />
    281281        <br/>
    282282        Meta Value: <input class="widefat" name="<?php echo $this->get_field_name( 'metavalue' ); ?>" value="<?php echo $post_metavalue; ?>" />
Note: See TracChangeset for help on using the changeset viewer.