Frage

Can someone please break this line down for me.

<div class="container" class="<?php wpp_css('property::content', "property_content"); ?>" role="main">

Many thanks.

War es hilfreich?

Lösung

Explanation:

<div 

It's a div element

class="container"

with the CSS class container.

class="<?php wpp_css('property::content', "property_content"); ?>"

This is wrong! An element can have only one class attribute! But it seems that you try to add custom CSS classes with the PHP function wpp_css.

role="main">

Your div has the attribute role with value main. More info about roles here.

Corrected div:

<div class="container <?php wpp_css('property::content', "property_content"); ?>" role="main">

Andere Tipps

wpp_css is a function, first parameter is 'property::content' second parameter is "property_content"

i think it is used to pass the right content to the container

You create a div with a dynamic class. The class is being generated ny a PHP function called wpp_css and the div's role is main

I am guessing your using "WordPress Popular Posts" plugin and the method wpp_css() is a method of this plugin to determining which CSS class should be applied to your container div.

It first checks that whether any value is set for the 'property::content' property or not. If it is set then it returns that otherwise it returns 'property_content'.

You also have two class attributes in your div. You should change them like this.

<div class="container <?php wpp_css('property::content', "property_content"); ?>" role="main">
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top