Viewing 5 replies - 1 through 5 (of 5 total)
  • plugin folder

    open > admin.php

    del line 59
    this line:
    $r = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $cf_key ) );

    and edit this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter Rami Yushuvaev

    (@ramiy)

    ?

    Plugin Author scribu

    (@scribu)

    You could just replace the line he mentioned with this:

    $r = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = %s", $cf_key ) );
    Thread Starter Rami Yushuvaev

    (@ramiy)

    yes, i understand that part, but what about

    and edit this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    can’t find the line 59 mentioned by wellbrasil
    no such line…what i found is this(line 56~61):

    $rows = $wpdb->get_results( $wpdb->prepare( “
    SELECT post_id, GROUP_CONCAT( meta_value ) as terms
    FROM $wpdb->postmeta
    WHERE meta_key = %s
    GROUP BY post_id
    “, $cf_key ) );

    the only line with “DELETE” inside admin.php is :

    line 92 return $wpdb->query( $wpdb->prepare( “DELETE FROM $wpdb->postmeta WHERE meta_key = %s”, $cf_key ) );

    Mr.Scribu or Mr.Wellbrasil, would you pls help tell me what to do now in my situation? i also don’t want to delete the custom fields just the same as Mr.Rami Y

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Custom Field Taxonomies] Don't delete Custom Fields’ is closed to new replies.