Source Code

PHP:

[sourcecode language=»php»]
<?php
/**
* Pluck a certain field out of each object in a list.
*
* @since 3.1.0
*
* @param array $list A list of objects or arrays
* @param int|string $field A field from the object to place instead of the entire object
* @return array
*/
function wp_list_pluck( $list, $field ) {
foreach ( $list as $key => $value ) {
if ( is_object( $value ) )
$list[ $key ] = $value->$field;
else
$list[ $key ] = $value[ $field ];
}

return $list;
}
?>
[/sourcecode]

CSS:

[sourcecode language=»css»]
/* Alignment */
.alignleft {
display: inline;
float: left;
margin-right: 1.5em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.5em;
}
.aligncenter {
clear: both;
display: block;
margin: 0 auto;
}
[/sourcecode]

Be the first to comment on "Source Code"

Leave a comment

Your email address will not be published.


*