• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP matthewruddy_image_resize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中matthewruddy_image_resize函数的典型用法代码示例。如果您正苦于以下问题:PHP matthewruddy_image_resize函数的具体用法?PHP matthewruddy_image_resize怎么用?PHP matthewruddy_image_resize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了matthewruddy_image_resize函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: shoestrap_icons

    function shoestrap_icons()
    {
        $favicon_item = shoestrap_getVariable('favicon');
        $apple_icon_item = shoestrap_getVariable('apple_icon');
        // Add the favicon
        if (!empty($favicon_item['url']) && $favicon_item['url'] != '') {
            $favicon = matthewruddy_image_resize($favicon_item['url'], 64, 64, true, false);
            echo '<link rel="shortcut icon" href="' . $favicon['url'] . '" type="image/x-icon" />';
        }
        // Add the apple icons
        if (!empty($apple_icon_item['url'])) {
            $iphone_icon = matthewruddy_image_resize($apple_icon_item['url'], 57, 57, true, false);
            $iphone_icon_retina = matthewruddy_image_resize($apple_icon_item['url'], 57, 57, true, true);
            $ipad_icon = matthewruddy_image_resize($apple_icon_item['url'], 72, 72, true, false);
            $ipad_icon_retina = matthewruddy_image_resize($apple_icon_item['url'], 72, 72, true, true);
            ?>
    <!-- For iPhone --><link rel="apple-touch-icon-precomposed" href="<?php 
            echo $iphone_icon['url'];
            ?>
">
    <!-- For iPhone 4 Retina display --><link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php 
            echo $iphone_icon_retina['url'];
            ?>
">
    <!-- For iPad --><link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php 
            echo $ipad_icon['url'];
            ?>
">
    <!-- For iPad Retina display --><link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php 
            echo $ipad_icon_retina['url'];
            ?>
">
    <?php 
        }
    }
开发者ID:Jhorton4,项目名称:Bohldfeys_Portfolio,代码行数:35,代码来源:functions.icons.php


示例2: the_ID

    <article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
        <div class="cs-portfolio-header <?php 
echo $extra_class_1column;
?>
">
            <?php 
if (has_post_thumbnail()) {
    $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', false);
    if ($crop_image == true || $crop_image == 1) {
        $image_resize = matthewruddy_image_resize($attachment_image[0], $width_image, $height_image, true, false);
        echo '<img alt="" class="attachment-featuredImageCropped" src="' . esc_attr($image_resize['url']) . '" />';
    } else {
        echo '<img alt="" src="' . esc_attr($attachment_image[0]) . '" />';
    }
    $image_large = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large');
}
?>

            <div class="cs-portfolio-meta">
                <div class="cs-portfolio-meta-box">
                    <?php 
if ($show_title == "true") {
    echo '<h4 class="cs-portfolio-title"><a title="' . esc_attr(get_the_title()) . '" href="' . esc_url(get_permalink(get_the_ID())) . '" rel="">' . get_the_title() . '</a></h4>';
}
if ($show_category == "true") {
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:31,代码来源:post-style2.php


示例3: while

?>

                <ul class="blog-posts">
                    <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
                        <li class="post-item">
                            <article class="entry">
                                <div class="row">
                                    <div class="col-sm-5">
                                    <?php 
        if (has_post_thumbnail()) {
            $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'single-post-thumbnail');
            $image = matthewruddy_image_resize($image[0], 345, 243, true, false);
            ?>
                                        <div class="entry-thumb image-hover2">
                                            <a href="<?php 
            the_permalink();
            ?>
">
                                                <img src="<?php 
            echo $image['url'];
            ?>
" alt="<?php 
            the_title();
            ?>
">
                                            </a>
                                        </div>
开发者ID:hikaram,项目名称:wee,代码行数:31,代码来源:index.php


示例4: get_the_ID

$post_id = get_the_ID();
?>

<article id="post_<?php 
echo esc_attr($post_id);
?>
" <?php 
post_class();
?>
>
    <div class="cs-carousel-portfolio-header">               
        <?php 
$options = get_option(OPTIONS);
if (has_post_thumbnail()) {
    $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full', false);
    $image_resize = matthewruddy_image_resize($attachment_image[0], 600, 400, true, false);
    echo '<img class="attachment-featuredImageCropped" src="' . esc_attr($image_resize['url']) . '" />';
}
?>

        <div class="cs-carousel-portfolio-info">
            <a title="<?php 
the_title();
?>
" href="<?php 
the_permalink();
?>
" rel=""><i class="fa fa-share"></i></a>
        </div>
    </div>
    <div class="cs-carousel-portfolio-content">
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:31,代码来源:entry.php


示例5: shoestrap_image_resize

 function shoestrap_image_resize($data)
 {
     $defaults = array("url" => "", "width" => "", "height" => "", "crop" => true, "retina" => "");
     $settings = wp_parse_args($data, $defaults);
     if (empty($settings['url'])) {
         return;
     }
     // Generate the @2x file if retina is enabled
     if (shoestrap_getVariable('retina_toggle') == 1 && empty($settings['retina'])) {
         $results['retina'] = matthewruddy_image_resize($settings['url'], $settings['width'], $settings['height'], $settings['crop'], true);
     }
     return matthewruddy_image_resize($settings['url'], $settings['width'], $settings['height'], $settings['crop'], false);
 }
开发者ID:Jhorton4,项目名称:Bohldfeys_Portfolio,代码行数:13,代码来源:functions.images.php


示例6: foreach

                                <i class="fa fa-folder-o"></i>
                                <?php 
        foreach (get_the_category() as $cat) {
            echo "<a href='" . get_category_link($cat->cat_ID) . "'>" . $cat->cat_name . '</a> ';
        }
        ?>
                            </span>
                            <span class="date"><i class="fa fa-calendar"></i> <?php 
        echo get_the_date();
        ?>
</span>
                        </div>
                        <?php 
        if (has_post_thumbnail()) {
            $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'single-post-thumbnail');
            $image = matthewruddy_image_resize($image[0], 870, 613, true, false);
            ?>
                            <div class="entry-photo">
                                <img src="<?php 
            echo $image['url'];
            ?>
" alt="<?php 
            the_title();
            ?>
">
                            </div>
                        <?php 
        }
        ?>
                        <div class="content-text clearfix">
                            <?php 
开发者ID:hikaram,项目名称:wee,代码行数:31,代码来源:single.php



注:本文中的matthewruddy_image_resize函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP max函数代码示例发布时间:2022-05-15
下一篇:
PHP matching_page_type_patterns函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap