<?php

# PLUGIN PREVIEW BY TEXTPATTERN.INFO


if(class_exists('\Textpattern\Tag\Registry')) {
    
Txp::get('\Textpattern\Tag\Registry')
        ->
register('soo_if_frontpage');
}

function 
soo_if_frontpage ($atts$thing)
{
    
$atts lAtts(array(
        
'section'   =>  '',
        
'pg'        => false,
    ), 
$atts);

    global 
$s$pg$c$q$author$month$id$p;

    if (! 
$section $atts['section']) {
        
$section 'default';
    }

    return 
parse(EvalElse($thing,
        (
$section == '*' || in_list($s$section)) &&
        (! 
$atts['pg'] || $pg 2) &&
        ! (
$c or $q or $author or $month or $id or $p)
    ));
}