当前位置: 首页>>代码示例>>PHP>>正文


PHP escAttr函数代码示例

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


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

示例1: render

    public function render($doctype, $environment)
    {
        $languages = ipContent()->getLanguages();
        $answer = '';
        foreach ($languages as $language) {
            $langValue = '';
            $fieldValue = $this->getValue();
            if (is_array($fieldValue)) {
                if (!empty($fieldValue[$language->getCode()])) {
                    $langValue = $fieldValue[$language->getCode()];
                }
            }
            if (!is_string($langValue)) {
                //just in case we have an array or something else incompatible with below code in the database
                $langValue = '';
            }
            $answer .= '
<div class="input-group">
  <span class="input-group-addon">' . esc($language->getAbbreviation()) . '</span>
  <input ' . $this->getAttributesStr($doctype) . ' class="form-control ' . implode(' ', $this->getClasses()) . '" name="' . escAttr($this->getName() . '[' . $language->getCode() . ']" ') . $this->getValidationAttributesStr($doctype) . ' type="text" value="' . escAttr($langValue) . '" />
</div>
            ';
        }
        return $answer;
    }
开发者ID:Umz,项目名称:ImpressPages,代码行数:25,代码来源:TextLang.php

示例2: render

 public function render($doctype, $environment)
 {
     $input = '<input ' . $this->getAttributesStr($doctype) . ' class="form-control ' . implode(' ', $this->getClasses()) . '" name="' . escAttr($this->getName()) . '" ' . $this->getValidationAttributesStr($doctype) . ' type="text" value="' . escAttr($this->getValue()) . '" />';
     $buttons = '<div class="input-group-btn">
         <button type="button" class="btn btn-default ipsSelectSourceFile"><i class="fa fa-file-o"> </i></button>
         <button type="button" class="btn btn-default ipsRemoveSourceFile"><i class="fa fa-trash-o"> </i></button>
     </div>';
     return '<div class="input-group">' . $input . $buttons . '</div>';
 }
开发者ID:hmuralt,项目名称:DataTableWidget,代码行数:9,代码来源:SingleFile.php

示例3: img

 function img($varname, $default, $width, $height, $class = '', $tagname = 'img')
 {
     $varname = $this->num != -1 ? $varname . '-' . $this->num : $varname;
     $defaultval = ipThemeUrl('assets/') . $default;
     if (array_key_exists($varname, $this->data)) {
         $fileName = $this->data[$varname]['fileName'];
         $transform = array('type' => 'crop', 'x1' => $this->data[$varname]['crop']['x1'], 'y1' => $this->data[$varname]['crop']['y1'], 'x2' => $this->data[$varname]['crop']['x2'], 'y2' => $this->data[$varname]['crop']['y2'], 'width' => $width, 'height' => $height);
         $url = ipFileUrl(ipReflection($fileName, $transform, $fileName));
         $imgdata = escAttr(json_encode($this->data[$varname]));
     } else {
         $url = $defaultval;
         $imgdata = "";
     }
     return "<{$tagname} class=\"ipsEditable {$class}\" data-type=\"Image\" data-varname=\"{$varname}\"\n\t\t\t\t\tdata-cssclass=\"{$class}\" data-image=\"{$imgdata}\" src=\"{$url}\"/>";
 }
开发者ID:greybyte,项目名称:IP-CustomSection,代码行数:15,代码来源:Controller.php

示例4: foreach

<div class="slick">
    <?php 
foreach ($images as $imageKey => $image) {
    ?>
        <div>
            <img data-lazy="<?php 
    echo escAttr($image['imageBig']);
    ?>
" alt="<?php 
    echo escAttr($image['title']);
    ?>
" />
            <?php 
    echo isset($image['description']) ? '<div>' . escAttr($image['description']) . '</div>' : '';
    ?>
        </div>
    <?php 
}
?>
</div>
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:20,代码来源:slider.php

示例5: getAttributesStr

 /**
  * Get field attributes as HTML string
  *
  * @param $doctype \Ip\View doctype constant
  * @return string
  */
 public function getAttributesStr($doctype)
 {
     $answer = '';
     foreach ($this->getAttributes() as $attributeKey => $attributeValue) {
         $answer .= ' ' . htmlspecialchars($attributeKey) . '="' . escAttr($attributeValue) . '"';
     }
     return $answer;
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:14,代码来源:Fieldset.php

示例6: esc

                <?php 
            echo $image['nofollow'] ? ' rel="nofollow" ' : '';
            ?>
            <?php 
        }
        ?>
            class="_link"
            title="<?php 
        echo esc($image['title']);
        ?>
"
            data-description="<?php 
        echo isset($image['description']) ? escAttr($image['description']) : '';
        ?>
"
            >
            <img class="_image ipsImage" src="<?php 
        echo escAttr($image['imageSmall']);
        ?>
" alt="<?php 
        echo escAttr($image['title']);
        ?>
" />
        </a>
    </div>
<?php 
    }
    ?>
</div>
<?php 
}
开发者ID:Umz,项目名称:ImpressPages,代码行数:31,代码来源:default.php

示例7: escAttr

if (!empty($description)) {
    ?>
    <meta property="og:description" content="<?php 
    echo escAttr($description);
    ?>
" />
<?php 
}
if (!empty($siteName)) {
    ?>
    <meta property="og:site_name" content="<?php 
    echo escAttr($siteName);
    ?>
" />
<?php 
}
if (!empty($images)) {
    ?>
    <?php 
    foreach ($images as $imageUrl) {
        ?>
        <meta property="og:image" content="<?php 
        echo escAttr($imageUrl);
        ?>
?v=0<?php 
        echo \Ip\ServiceLocator::storage()->get('Ip', 'cacheVersion', 1);
        ?>
" />
    <?php 
    }
}
开发者ID:impresspages-plugins,项目名称:FacebookTags,代码行数:31,代码来源:tags.php

示例8: esc

><a href="#" class="ipsAction" data-method="page" data-params="<?php 
            echo esc(json_encode(array('page' => $page['page'])));
            ?>
"><?php 
            echo esc(isset($page['text']) ? $page['text'] : $page['page']);
            ?>
</a></li>
            <?php 
        }
        ?>
        <?php 
    }
    ?>

        <?php 
    if ($currentPage < $totalPages) {
        ?>
            <li><a href="#" class="ipsAction" data-method="page" data-params="<?php 
        echo escAttr(json_encode(array('page' => $currentPage + 1)));
        ?>
">&raquo;</a></li>
        <?php 
    } else {
        ?>
            <li class="disabled"><a href="#">&raquo;</a></li>
        <?php 
    }
    ?>
    </ul>
<?php 
}
开发者ID:Umz,项目名称:ImpressPages,代码行数:31,代码来源:pagination.php

示例9: __

            break;
        case 'warning':
            $typeLabel = __('Warning', 'Install');
            $class = 'warning';
            break;
        case 'error':
            $typeLabel = __('Error', 'Install');
            $class = 'danger';
            break;
    }
    ?>
        <tr><th><?php 
    echo $row['name'] . (!empty($row['helpUrl']) ? ' <a href="' . $row['helpUrl'] . '" target="_blank">(?)</a>' : '');
    ?>
</th><td class="text-center <?php 
    echo escAttr($class);
    ?>
"><?php 
    echo esc($typeLabel);
    ?>
</td></tr>
    <?php 
}
?>
</table>
<p class="text-right">
    <?php 
if ($showNextStep) {
    ?>
        <a class="btn btn-primary ipsAutoForward" href="?step=3"><?php 
    _e('Next', 'Install');
开发者ID:Umz,项目名称:ImpressPages,代码行数:31,代码来源:system.php

示例10: escAttr

<?php

/**
 * This is an HTML of widget management pupup. Please look at AdminController.php to see how $form variable is created.
 * Feel free to modify this file, but leave intact ID attributes and classes with 'ips' prefix.
 *
 */
?>
<div class="ip ipPluginSlideShowPopup" id="ipSlideShowPopup">
    <div class="modal fade ipsModal">
        <div class="modal-dialog">
            <div class="modal-content">
                    <iframe frameBorder="0" border="0" hspace="0" vspace="0" marginwidth="0" marginheight="0" src="<?php 
echo escAttr($gridUrl);
?>
"></iframe>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal"><?php 
_e('Ok', 'SlideShow');
?>
</button>
                </div>
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                </div>
            </div>
        </div>
    </div>
</div>
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:29,代码来源:editPopup.php

示例11: escAttr

<iframe src="<?php 
echo escAttr($repositoryUrl);
?>
" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px">

</iframe>
开发者ID:impresspages-plugins,项目名称:RepositoryManager,代码行数:6,代码来源:index.php

示例12: html

 /**
  * HTML to be displayed in payment selection window. All this HTML will be surrounded by A tag to be clickable.
  * @return string
  */
 public function html()
 {
     return '<img src="' . escAttr($this->icon()) . '" alt="' . escAttr($this->name()) . '" />';
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:8,代码来源:SubscriptionPayment.php

示例13: isset

        echo $nofollow ? ' rel="nofollow" ' : '';
        ?>
        <?php 
    }
    ?>
        title="<?php 
    echo isset($title) ? escAttr($title) : '';
    ?>
"
        data-description="<?php 
    echo isset($description) ? escAttr($description) : '';
    ?>
"
        >
        <img class="ipsImage" src="<?php 
    echo escAttr($imageSmall);
    ?>
" alt="<?php 
    echo isset($title) ? escAttr($title) : '';
    ?>
" title="<?php 
    echo isset($title) ? escAttr($title) : '';
    ?>
" />
    </a>
<?php 
} else {
    ?>
    <div class="ipsImage">&nbsp;</div>
<?php 
}
开发者ID:Umz,项目名称:ImpressPages,代码行数:31,代码来源:default.php

示例14: foreach

<?php

if (!empty($breadcrumb) && is_array($breadcrumb)) {
    ?>
    <ol class="breadcrumb">
        <?php 
    foreach ($breadcrumb as $key => $crumb) {
        ?>
            <li><a href="<?php 
        echo escAttr($crumb['url']);
        ?>
"><?php 
        echo esc($crumb['title']);
        ?>
</a></li>
        <?php 
    }
    ?>
    </ol>
<?php 
}
?>
<h1><?php 
echo esc($title);
?>
</h1>
开发者ID:vizo,项目名称:ImpressPages,代码行数:26,代码来源:header.php

示例15: escAttr

<?php 
if (isset($markerlat)) {
    ?>
    data-markerlat="<?php 
    echo escAttr($markerlat);
    ?>
"
<?php 
}
?>

<?php 
if (isset($markerlng)) {
    ?>
    data-markerlng="<?php 
    echo escAttr($markerlng);
    ?>
"
<?php 
}
?>

style="height: <?php 
echo $height;
?>
;"
data-initialized="0"
class="ipsMap">
</div>
<?php 
if (ipIsManagementState()) {
开发者ID:Umz,项目名称:ImpressPages,代码行数:31,代码来源:default.php


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