Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1472700

    Or is only forgotten to change the style.css entry?
    i downloaded today from envato.

    #1472707

    Hey Guenter,

    Yes – I forgot to remove the -dev.

    It is the latest production version.
    I apologize for this.

    Best regards,
    Günter

    #1472712

    Danke

    #1472714

    Hi,

    See private.

    Best regards,
    Günter

    #1472722

    Hi,

    See private.

    Best regards,
    Günter

    #1472724

    Hi,

    Final implementation:

    
    	function avia_add_metadata_to_body_class( array $body_classes )
    	{
    		global $post;
    
    		if( ! $post instanceof WP_Post )
    		{
    			return $body_classes;
    		}
    
    		$classes = [];
    
    		if( is_singular() )
    		{
    			$classes[] = 'post-type-' . sanitize_html_class( $post->post_type );
    
    			$taxonomies = get_object_taxonomies( $post->post_type, 'objects' );
    
    			foreach( $taxonomies as $taxonomy )
    			{
    				$terms = get_the_terms( $post->ID, $taxonomy->name );
    
    				if( ! is_wp_error( $terms ) && ! empty( $terms ) )
    				{
    					foreach( $terms as $term )
    					{
    						$classes[] = sanitize_html_class( $taxonomy->name ) . '-' . sanitize_html_class( $term->slug );
    					}
    				}
    			}
    		}
    
    		/**
    		 * @since 6.0.8
    		 * @param array $classes
    		 * @return array
    		 */
    		$classes = apply_filters( 'avf_metadata_to_body_class', $classes );
    
    		return array_merge( $body_classes, $classes );
    	}
    
    	add_filter( 'body_class', 'avia_add_metadata_to_body_class', 10, 1 );
    

    Best regards,
    Günter

    #1472727

    Ja – schön !

    #1472730

    Hi,

    Best regards,
    Günter

    #1472749

    kann geschlossen werden – danke

    #1472772

    Hi,

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Version 6.0.7-dev ?’ is closed to new replies.