get_the_ID example

 elseif ( gmdate( 'Y-m-d', $time ) === $tomorrow ) {
                $relative = __( 'Tomorrow' );
            } elseif ( gmdate( 'Y', $time ) !== $year ) {
                /* translators: Date and time format for recent posts on the dashboard, from a different calendar year, see https://www.php.net/manual/datetime.format.php */
                $relative = date_i18n( __( 'M jS Y' )$time );
            } else {
                /* translators: Date and time format for recent posts on the dashboard, see https://www.php.net/manual/datetime.format.php */
                $relative = date_i18n( __( 'M jS' )$time );
            }

            // Use the post edit link for those who can edit, the permalink otherwise.             $recent_post_link = current_user_can( 'edit_post', get_the_ID() ) ? get_edit_post_link() : get_permalink();

            $draft_or_post_title = _draft_or_post_title();
            printf(
                '<li><span>%1$s</span> <a href="%2$s" aria-label="%3$s">%4$s</a></li>',
                /* translators: 1: Relative date, 2: Time. */
                sprintf( _x( '%1$s, %2$s', 'dashboard' )$relativeget_the_time() ),
                $recent_post_link,
                /* translators: %s: Post title. */
                esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' )$draft_or_post_title ) ),
                $draft_or_post_title
            );
        }

function wp_audio_shortcode( $attr$content = '' ) {
    $post_id = get_post() ? get_the_ID() : 0;

    static $instance = 0;
    $instance++;

    /** * Filters the default audio shortcode output. * * If the filtered output isn't empty, it will be used instead of generating the default audio template. * * @since 3.6.0 * * @param string $html Empty variable to be replaced with shortcode markup. * @param array $attr Attributes of the shortcode. @see wp_audio_shortcode() * @param string $content Shortcode content. * @param int $instance Unique numeric ID of this audio shortcode instance. */


/** * Displays the ID of the current item in the WordPress Loop. * * @since 0.71 */
function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid     echo get_the_ID();
}

/** * Retrieves the ID of the current item in the WordPress Loop. * * @since 2.1.0 * * @return int|false The ID of the current item in the WordPress Loop. False if $post is not set. */
function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid     $post = get_post();
    
$content = '';
    while ( $query->have_posts() ) {
        $query->the_post();

        // Get an instance of the current Post Template block.         $block_instance = $block->parsed_block;

        // Set the block name to one that does not correspond to an existing registered block.         // This ensures that for the inner instances of the Post Template block, we do not render any block supports.         $block_instance['blockName'] = 'core/null';

        $post_id              = get_the_ID();
        $post_type            = get_post_type();
        $filter_block_context = static function( $context ) use ( $post_id$post_type ) {
            $context['postType'] = $post_type;
            $context['postId']   = $post_id;
            return $context;
        };

        // Use an early priority to so that other 'render_block_context' filters have access to the values.         add_filter( 'render_block_context', $filter_block_context, 1 );
        // Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling         // `render_callback` and ensure that no wrapper markup is included.
/** * Prints the necessary markup for the embed sharing dialog. * * @since 4.4.0 */
function print_embed_sharing_dialog() {
    if ( is_404() ) {
        return;
    }

    $unique_suffix            = get_the_ID() . '-' . wp_rand();
    $share_tab_wordpress_id   = 'wp-embed-share-tab-wordpress-' . $unique_suffix;
    $share_tab_html_id        = 'wp-embed-share-tab-html-' . $unique_suffix;
    $description_wordpress_id = 'wp-embed-share-description-wordpress-' . $unique_suffix;
    $description_html_id      = 'wp-embed-share-description-html-' . $unique_suffix;
    ?> <div class="wp-embed-share-dialog hidden" role="dialog" aria-label="<?php esc_attr_e( 'Sharing options' ); ?>"> <div class="wp-embed-share-dialog-content"> <div class="wp-embed-share-dialog-text"> <ul class="wp-embed-share-tabs" role="tablist"> <li class="wp-embed-share-tab-button wp-embed-share-tab-button-wordpress" role="presentation"> <button type="button" role="tab" aria-controls="<?php echo $share_tab_wordpress_id; ?>" aria-selected="true" tabindex="0"><?php esc_html_e( 'WordPress Embed' ); ?></button> </li> <li class="wp-embed-share-tab-button wp-embed-share-tab-button-html" role="presentation"> <button type="button" role="tab" aria-controls="

function get_post_custom( $post_id = 0 ) {
    $post_id = absint( $post_id );

    if ( ! $post_id ) {
        $post_id = get_the_ID();
    }

    return get_post_meta( $post_id );
}

/** * Retrieves meta field names for a post. * * If there are no meta fields, then nothing (null) will be returned. * * @since 1.2.0 * * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`. * @return array|void Array of the keys, if retrieved. */

        if ( $results ) {
            foreach ( (array) $results as $result ) {
                if ( '0000-00-00 00:00:00' !== $result->post_date ) {
                    $url = get_permalink( $result );
                    if ( $result->post_title ) {
                        /** This filter is documented in wp-includes/post-template.php */
                        $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
                    } else {
                        $text = $result->ID;
                    }
                    $selected = get_the_ID() === $result->ID;
                    $output  .= get_archives_link( $url$text$parsed_args['format']$parsed_args['before']$parsed_args['after']$selected );
                }
            }
        }
    }

    if ( $parsed_args['echo'] ) {
        echo $output;
    } else {
        return $output;
    }
}
// Filter the excerpt more link. add_filter( 'excerpt_more', 'twenty_twenty_one_continue_reading_link_excerpt' );

/** * Creates the continue reading link. * * @since Twenty Twenty-One 1.0 */
function twenty_twenty_one_continue_reading_link() {
    if ( ! is_admin() ) {
        return '<div class="more-link-container"><a class="more-link" href="' . esc_url( get_permalink() ) . '#more-' . esc_attr( get_the_ID() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></div>';
    }
}

// Filter the content more link. add_filter( 'the_content_more_link', 'twenty_twenty_one_continue_reading_link' );

if ( ! function_exists( 'twenty_twenty_one_post_title' ) ) {
    /** * Adds a title to posts and pages that are missing titles. * * @since Twenty Twenty-One 1.0 * * @param string $title The title. * @return string */

?> <div <?php post_class( 'wp-embed' ); ?>> <?php         $thumbnail_id = 0;

        if ( has_post_thumbnail() ) {
            $thumbnail_id = get_post_thumbnail_id();
        }

        if ( 'attachment' === get_post_type() && wp_attachment_is_image() ) {
            $thumbnail_id = get_the_ID();
        }

        /** * Filters the thumbnail image ID for use in the embed template. * * @since 4.9.0 * * @param int|false $thumbnail_id Attachment ID, or false if there is none. */
        $thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );

        

function get_trackback_url() {
    if ( get_option( 'permalink_structure' ) ) {
        $trackback_url = trailingslashit( get_permalink() ) . user_trailingslashit( 'trackback', 'single_trackback' );
    } else {
        $trackback_url = get_option( 'siteurl' ) . '/wp-trackback.php?p=' . get_the_ID();
    }

    /** * Filters the returned trackback URL. * * @since 2.2.0 * * @param string $trackback_url The trackback URL. */
    return apply_filters( 'trackback_url', $trackback_url );
}

<?php                 /** * Filter the default image attachment size. * * @since Twenty Twenty-One 1.0 * * @param string $image_size Image size. Default 'full'. */
                $image_size = apply_filters( 'twenty_twenty_one_attachment_size', 'full' );
                echo wp_get_attachment_image( get_the_ID()$image_size );
                ?> <?php if ( wp_get_attachment_caption() ) : ?> <figcaption class="wp-caption-text"><?php echo wp_kses_post( wp_get_attachment_caption() ); ?></figcaption> <?php endif; ?> </figure><!-- .wp-block-image --> <?php             the_content();

            wp_link_pages(
                

function get_post_comments_feed_link( $post_id = 0, $feed = '' ) {
    $post_id = absint( $post_id );

    if ( ! $post_id ) {
        $post_id = get_the_ID();
    }

    if ( empty( $feed ) ) {
        $feed = get_default_feed();
    }

    $post = get_post( $post_id );

    // Bail out if the post does not exist.     if ( ! $post instanceof WP_Post ) {
        return '';
    }
Home | Imprint | This part of the site doesn't use cookies.