コード例 #1
0
    $slides = array_filter($slideset->slides, array('SEOSlides_Slide', 'slide_is_published'));
    if (count($slides) === 0) {
        SEOSlides_Util::redirect_404();
    }
    reset($slides);
    $first_id = key($slides);
    /** @var SEOSlides_Slide $slide  */
    $slide = $slides[$first_id];
    header("HTTP/1.1 307 Temporary Redirect");
    header("Location: " . trailingslashit(trailingslashit(get_permalink()) . $slide->slug));
    die;
} else {
    // Get the slide based on its slug
    $found = get_posts(array('name' => $slide_slug, 'post_type' => 'seoslides-slide', 'post_status' => 'publish', 'numberposts' => 1));
    if (count($found) === 0) {
        SEOSlides_Util::redirect_404();
    }
    $slide = $found[0];
    $slide = new SEOSlides_Slide($slide);
    $slideset_bg = $slide->parent('default_fill_color');
}
?>
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php 
language_attributes();
?>
><![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php 
language_attributes();