Forum Replies Created
-
AuthorPosts
-
Tonny KeukenMemberhere is the patch you can apply to it, please fix it
diff --git a/piklist/parts/fields/hidden.php b/piklist/parts/fields/hidden.php index daffa8d..1b8d39a 100644 --- a/piklist/parts/fields/hidden.php +++ b/piklist/parts/fields/hidden.php @@ -1,8 +1,8 @@ -<input +<input type="hidden" - id="<?php echo piklist_form::get_field_id($arguments); ?>" + id="<?php echo piklist_form::get_field_id($arguments); ?>" name="<?php echo piklist_form::get_field_name($arguments); ?>" - value="<?php echo esc_attr($value); ?>" + value="<?php echo is_array($value) ? esc_attr(end($value)) : esc_attr($value); ?>" <?php echo piklist_form::attributes_to_string($attributes); ?> />regards,
Tonny
Tonny KeukenMemberThis reply has been marked as private.
Tonny KeukenMemberHi Steve,
I have tried this out, and it will work.
touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 );
It works for every post whatever it’s type as long $for_post value will be 1 or true.
@line 699 in wp_root/wp-admin/includes/template.php this value will be checked with:
$post_date = ($for_post) ? $post->post_date : get_comment()->comment_date;
if the item to check is not a “comment” then the notice (error) will be thrown because a post is not a comment
and get_comment()->comment_date does not existSelf I choose to change line 218 in piklist/parts/meta-boxes/submitdiv.php with the following:
touch_time(($action == ‘edit’), false === isset( get_comment()->comment_date ), 4);
I hope this info helps
Kind regards,
Tonny
Tonny KeukenMemberThis reply has been marked as private.
Tonny KeukenMemberHi everyone,
I am using version 0.9.9.9 at this moment and the above notice came up in the log files.
I figured it out, is was another query_var that was causing this.
I also use WooCommerce, and their plugin using also the query_vars, but without setting query_vars[‘order’]
So I changed the pre_get_posts(&$query) function in class-piklist-wordpress.php, and it solved my problem.
Just added the && isset($query->query_vars[‘order’]) to the statement
it’s about the lines 178 to 202
function now looks like:
/** * pre_get_posts * Get the order parameter if it has to do with meta * * @param object $query The current query object. * * @access public * @static * @since 1.0 */ public static function pre_get_posts(&$query) { if (isset($query->query_vars['orderby'])) { if (in_array($query->query_vars['orderby'], array('meta_value', 'meta_value_num')) && isset($query->query_vars['order']) && !is_null($query->query_vars['order'])) { self::$meta_order = $query->query_vars['order']; } if ( isset($query->query_vars['meta_key']) && !is_null($query->query_vars['meta_key'])) { self::$meta_key = $query->query_vars['meta_key']; } } }Hope it helps
Tonny
Tonny KeukenMemberHi morganrt,
Did you try to compare with the code below, already?
piklist('field', array( 'type' => 'html', 'field' => 'recorder', 'label' => 'A label...', 'help' => 'This is help text.', 'scope' => 'comment_meta', 'reset' => 'false', 'value' => '<div>Some HTML goes here</div>', 'conditions' => array( array( 'field' => 'response_structured', 'scope' => 'comment_meta', 'value' => array( '', null ), //This will compare against an empty string and no value at all 'compare' => '!=' )) ));Kind regards,
Tonny
Tonny KeukenMemberThis reply has been marked as private.
Tonny KeukenMemberThis reply has been marked as private. -
AuthorPosts