.
*/
/*
certain attributes may be filtered out upon saving
declare them as safe here
of course, you should move any of your changes to another
files so future updates don't overwrite your changes
*/
//add_filter( 'safe_style_css', 'miniloops_more_safe_css');
function miniloops_more_safe_css( $attr ) {
$attr[] = 'list-style-type';
return $attr;
}
/*
Example for customizing the output based on post format
*/
//add_filter( 'miniloops_item_format', 'miniloops_post_formats', 10, 2 );
function miniloops_post_formats( $item_format, $post_format ) {
switch ( $post_format ) {
case 'aside' :
$item_format = '
aside: [title]';
break;
case 'gallery' :
$item_format = 'gallery: [title]';
break;
case 'link' :
$item_format = 'link: [title]';
break;
case 'image' :
$item_format = 'image: [title]';
break;
case 'quote' :
$item_format = 'quote: [title]';
break;
case 'status' :
$item_format = 'status: [title]';
break;
case 'video' :
$item_format = 'video: [title]';
break;
case 'audio' :
$item_format = 'audio: [title]';
break;
case 'chat' :
$item_format = 'chat: [title]';
break;
case 'standard' :
case false :
/*
the standard format should be what you put in the widget
but you could change it here if you really wanted
*/
//$item_format = 'standard: [title]';
default :
}
return $item_format;
}
add_action( 'widgets_init', 'miniloops_load' );
function miniloops_load() {
register_widget( 'miniloops' );
}
load_plugin_textdomain( 'mini-loops', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
include_once('widget.php');
include_once('helpers.php');