• Resolved mardito

    (@mardito)


    Hi,
    even if I know a bit about php coding and developement, I am a wp beginner. I was reviewing the plugin code (current version 1.4.2), before installing, and trying to understand better the “meta” auth process (using meta_key/meta_value), which I was interested in, noted that the line 122 in remote-content-shortcode.php is:

    if ( false!==( $meta_userpwd = get_post_meta( $userpwd, $post->ID, true ) ) ) {

    but looking at the function reference (https://developer.www.ads-software.com/reference/functions/get_post_meta/) it seems the function is defined as

    get_post_meta( int $post_id, string $key = ”, bool $single = false )

    so, maybe the first parameter passed (mandatory) should be the post “id”, while above it seems to be passed as second, after the “password” we’re looking for in meta fields…

    is this right? would this work?

    Thanks, Marco

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mardito

    (@mardito)

    update: it doesn’t work, I tried with custom code in wp.
    the correct form is only that stated in the reference ??

    Plugin Author doublesharp

    (@doublesharp)

    Hi @mardito,

    The post meta option should be stored with username and password as “username:password”. When you specify it in the short code you give the key that the value is stored under, and it automatically inserts the post_id when fetching the meta value.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘meta key option code’ is closed to new replies.