_list_meta_row example

?> <table id="list-table"> <thead> <tr> <th class="left"><?php _ex( 'Name', 'meta name' ); ?></th> <th><?php _e( 'Value' ); ?></th> </tr> </thead> <tbody id='the-list' data-wp-lists='list:meta'> <?php     foreach ( $meta as $entry ) {
        echo _list_meta_row( $entry$count );
    }
    ?> </tbody> </table> <?php }

/** * Outputs a single row of public meta data in the Custom Fields meta box. * * @since 2.5.0 * * @param array $entry An array of meta data keyed on 'meta_key' and 'meta_value'. * @param int $count Reference to the row number. * @return string A single row of public meta data. */

        }

        $meta = get_metadata_by_mid( 'post', $mid );
        $pid  = (int) $meta->post_id;
        $meta = get_object_vars( $meta );

        $x = new WP_Ajax_Response(
            array(
                'what'         => 'meta',
                'id'           => $mid,
                'data'         => _list_meta_row( $meta$c ),
                'position'     => 1,
                'supplemental' => array( 'postid' => $pid ),
            )
        );
    } else { // Update?         $mid   = (int) key( $_POST['meta'] );
        $key   = wp_unslash( $_POST['meta'][ $mid ]['key'] );
        $value = wp_unslash( $_POST['meta'][ $mid ]['value'] );

        if ( '' === trim( $key ) ) {
            wp_die( __( 'Please provide a custom field name.' ) );
        }
Home | Imprint | This part of the site doesn't use cookies.