コード例 #1
0
function DTGAL_tn_f($quer = null)
{
    $post = DTGAL_func::get_post($quer);
    global $tn_img;
    $img_link = $tn_img->get_val();
    $out = "";
    if ($img_link != "" || $img_link != null) {
        $img_link = $tn_img->get_val();
    } else {
        $img_link_ar = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
        $img_link = $img_link_ar[0];
    }
    $out .= "<div class='DTGAL-tn'>";
    $out .= "<a title='" . $post->post_title . "'  href='" . get_permalink($post->ID) . "'>";
    $out .= "<img alt='" . $post->post_title . "' src='" . $img_link . "''>";
    $out .= "</a>";
    $out .= "</div>";
    echo $out;
}
コード例 #2
0
 public function hook_article_start_sc($quer = null)
 {
     $post = DTGAL_func::get_post($quer);
     $classes = implode(" ", get_post_class("", $post->ID));
     echo "<article class='" . $this->classes . " " . $classes . " ar_shortcode'>";
 }
コード例 #3
0
 public static function pc_fimed_a($quer = null)
 {
     $post = DTGAL_func::get_post($quer);
     $out = "";
     if (has_post_thumbnail($post->ID)) {
         $out .= "<div class='" . "DTGAL-image" . "'>";
         $out .= "<a title='" . $post->post_title . "' href='" . get_permalink($post->ID) . "' alt='" . $post->post_title . "'>";
         $out .= get_the_post_thumbnail($post->ID, 'medium');
         $out .= "</a>";
         $out .= "</div>";
     }
     echo $out;
 }