translate_nooped_plural example

if ( ! $post_status ) {
                continue;
            }

            $total_status_requests = absint( $counts->{$status} );

            if ( ! $total_status_requests ) {
                continue;
            }

            $status_label = sprintf(
                translate_nooped_plural( $post_status->label_count, $total_status_requests ),
                number_format_i18n( $total_status_requests )
            );

            $status_link = add_query_arg( 'filter-status', $status$admin_url );

            $views[ $status ] = array(
                'url'     => esc_url( $status_link ),
                'label'   => $status_label,
                'current' => $status === $current_status,
            );
        }

        
if ( isset( $_GET['post_mime_type'] ) && wp_match_mime_types( $mime_type$_GET['post_mime_type'] ) ) {
                $class = ' class="current"';
            }

            $type_links[] = '<li><a href="' . esc_url(
                add_query_arg(
                    array(
                        'post_mime_type' => $mime_type,
                        'paged'          => false,
                    )
                )
            ) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2]$num_posts[ $mime_type ] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[ $mime_type ] ) . '</span>' ) . '</a>';
        }
        /** * Filters the media upload mime type list items. * * Returned values should begin with an `<li>` tag. * * @since 3.1.0 * * @param string[] $type_links An array of list items containing mime type link HTML. */
        echo implode( ' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
        
if ( isset( $_REQUEST['post_status'] ) && $status_name === $_REQUEST['post_status'] ) {
                $class = 'current';
            }

            $status_args = array(
                'post_status' => $status_name,
                'post_type'   => $post_type,
            );

            $status_label = sprintf(
                translate_nooped_plural( $status->label_count, $num_posts->$status_name ),
                number_format_i18n( $num_posts->$status_name )
            );

            $status_links[ $status_name ] = array(
                'url'     => esc_url( add_query_arg( $status_args, 'edit.php' ) ),
                'label'   => $status_label,
                'current' => isset( $_REQUEST['post_status'] ) && $status_name === $_REQUEST['post_status'],
            );
        }

        if ( ! empty( $this->sticky_posts_count ) ) {
            


    // Assemble the data that will be used to generate the tag cloud markup.     $tags_data = array();
    foreach ( $tags as $key => $tag ) {
        $tag_id = isset( $tag->id ) ? $tag->id : $key;

        $count      = $counts[ $key ];
        $real_count = $real_counts[ $key ];

        if ( $translate_nooped_plural ) {
            $formatted_count = sprintf( translate_nooped_plural( $translate_nooped_plural$real_count )number_format_i18n( $real_count ) );
        } else {
            $formatted_count = call_user_func( $args['topic_count_text_callback']$real_count$tag$args );
        }

        $tags_data[] = array(
            'id'              => $tag_id,
            'url'             => ( '#' !== $tag->link ) ? $tag->link : '#',
            'role'            => ( '#' !== $tag->link ) ? '' : ' role="button"',
            'name'            => $tag->name,
            'formatted_count' => $formatted_count,
            'slug'            => $tag->slug,
            
'Deleted <span class="count">(%s)</span>'
            ),
        );

        $view_links       = array();
        $requested_status = isset( $_REQUEST['status'] ) ? wp_unslash( trim( $_REQUEST['status'] ) ) : '';
        $url              = 'sites.php';

        foreach ( $statuses as $status => $label_count ) {
            if ( (int) $counts[ $status ] > 0 ) {
                $label = sprintf(
                    translate_nooped_plural( $label_count$counts[ $status ] ),
                    number_format_i18n( $counts[ $status ] )
                );

                $full_url = 'all' === $status ? $url : add_query_arg( 'status', $status$url );

                $view_links[ $status ] = array(
                    'url'     => esc_url( $full_url ),
                    'label'   => $label,
                    'current' => $requested_status === $status || ( '' === $requested_status && 'all' === $status ),
                );
            }
        }


            /* // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark if ( !empty( $_REQUEST['s'] ) ) $link = add_query_arg( 's', esc_attr( wp_unslash( $_REQUEST['s'] ) ), $link ); */

            $status_links[ $status ] = array(
                'url'     => esc_url( $link ),
                'label'   => sprintf(
                    translate_nooped_plural( $label$num_comments->$status ),
                    sprintf(
                        '<span class="%s-count">%s</span>',
                        ( 'moderated' === $status ) ? 'pending' : $status,
                        number_format_i18n( $num_comments->$status )
                    )
                ),
                'current' => $status === $comment_status,
            );
        }

        /** * Filters the comment status links. * * @since 2.5.0 * @since 5.1.0 The 'Mine' link was added. * * @param string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine', * 'Pending', 'Approved', 'Spam', and 'Trash'. */
// Count how many times this attachment is used in widgets.         $use_count = 0;
        foreach ( $this->get_settings() as $instance ) {
            if ( isset( $instance['attachment_id'] ) && $instance['attachment_id'] === $post->ID ) {
                $use_count++;
            }
        }

        if ( 1 === $use_count ) {
            $states[] = $this->l10n['media_library_state_single'];
        } elseif ( $use_count > 0 ) {
            $states[] = sprintf( translate_nooped_plural( $this->l10n['media_library_state_multi']$use_count )number_format_i18n( $use_count ) );
        }

        return $states;
    }

    /** * Enqueue preview scripts. * * These scripts normally are enqueued just-in-time when a widget is rendered. * In the customizer, however, widgets can be dynamically added and rendered via * selective refresh, and so it is important to unconditionally enqueue them in * case a widget does get added. * * @since 4.8.0 */
Home | Imprint | This part of the site doesn't use cookies.