__( 'For individuals', 'wporg-5ftf' ), 'url' => '/for-individuals/', ); $menu[] = array( 'label' => __( 'For organizations', 'wporg-5ftf' ), 'url' => '/for-organizations/', ); $menu[] = array( 'label' => __( 'Handbook', 'wporg-5ftf' ), 'url' => '/handbook/', ); $menu[] = array( 'label' => __( 'Pledges', 'wporg-5ftf' ), 'url' => '/pledges/', ); $menu[] = array( 'label' => __( 'Contact', 'wporg-5ftf' ), 'url' => '/contact/', ); $menu[] = array( 'label' => __( 'My pledges', 'wporg-5ftf' ), 'url' => '/my-pledges/', 'className' => 'has-separator', ); return array( 'main' => $menu, ); } /** * Update the excerpt block content, replacing the placeholder string with * dynamic text including the pledge title for unique link text. * * @param string $block_content The block content. * @param array $block The full block, including name and attributes. * @param WP_Block $instance The block instance. * * @return string Updated block content. */ function inject_excerpt_more_link( $block_content, $block, $instance ) { $more_text = sprintf( __( 'Continue reading %s', 'wporg-5ftf' ), get_the_title( $instance->context['postId'] ) ); return str_replace( '[MORE]', $more_text, $block_content ); }