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


PHP Text::isNotEmpty方法代码示例

本文整理汇总了PHP中Text::isNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP Text::isNotEmpty方法的具体用法?PHP Text::isNotEmpty怎么用?PHP Text::isNotEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Text的用法示例。


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

示例1: __construct

 function __construct()
 {
     parent::__construct();
     global $Url;
     // Disable the plugin IF ...
     $this->disable = false;
     if (!$this->getDbField('enablePosts') && $Url->whereAmI() == 'post') {
         $this->disable = true;
     } elseif (!$this->getDbField('enablePages') && $Url->whereAmI() == 'page') {
         $this->disable = true;
     } elseif (!$this->getDbField('enableDefaultHomePage') && $Url->whereAmI() == 'page') {
         global $Site;
         if (Text::isNotEmpty($Site->homePage())) {
             $this->disable = true;
         }
     } elseif ($Url->whereAmI() != 'post' && $Url->whereAmI() != 'page') {
         $this->disable = true;
     }
 }
开发者ID:acrox999,项目名称:bludit-plugins,代码行数:19,代码来源:plugin.php

示例2:

</a></h2>
					<div class="post-meta">

						<span class="post-date"><a href="<?php 
    echo $Post->permalink();
    ?>
" title="<?php 
    echo $Post->date();
    ?>
"><?php 
    echo $Post->date();
    ?>
</a></span>
						<span class="date-sep"> / </span>
						<span class="post-author"><?php 
    if (Text::isNotEmpty($Post->user('firstName')) || Text::isNotEmpty($Post->user('lastName'))) {
        echo $Post->user('firstName') . ' ' . $Post->user('lastName');
    } else {
        echo $Post->user('username');
    }
    ?>
</span>
												
					</div>
				</div>
				
				<div class="post-content">
					<?php 
    echo $Post->content(false);
    ?>
					
开发者ID:acrox999,项目名称:lingonberry,代码行数:30,代码来源:home.php

示例3:

echo $Post->title();
?>
</a></h2>
			<p><?php 
echo $Post->description();
?>
</p>
		</div>
		<div class="meta">
	                <?php 
// Get the user who created the post.
$User = $Post->user();
// Default author is the username.
$author = $User->username();
// If the user complete the first name or last name this will be the author.
if (Text::isNotEmpty($User->firstName()) || Text::isNotEmpty($User->lastName())) {
    $author = $User->firstName() . ' ' . $User->lastName();
}
?>
			<time class="published" datetime="2015-11-01"><?php 
echo $Post->date();
?>
</time>
			<div class="author"><span class="name"><?php 
echo $author;
?>
</span><img src="<?php 
echo $User->profilePicture();
?>
" alt=""></div>
		</div>
开发者ID:BogusCurry,项目名称:bludit,代码行数:31,代码来源:post.php

示例4:

 -->            <?php 
echo $Post->title();
?>
<!--             </a>
 -->        </h1>

            <!-- Post date and author -->
            <div class="post-meta">
                <span class="date"><?php 
echo $Post->date();
?>
</span>
                <span class="author">
                    <?php 
echo $Language->get('Posted By') . ' ';
if (Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName())) {
    echo $Post->authorFirstName() . ' ' . $Post->authorLastName();
} else {
    echo $Post->username();
}
?>
                </span>
            </div>

        </header>

        <!-- Post content -->
        <div class="post-content">
            <?php 
echo $Post->content();
?>
开发者ID:clstrfcuk,项目名称:bludit-themes,代码行数:31,代码来源:post.php

示例5: buildPage

    $dbPages->cliMode();
}
// Build specific page.
if ($Url->whereAmI() === 'page' && $Url->notFound() === false) {
    $Page = buildPage($Url->slug());
    // The page doesn't exist.
    if ($Page === false) {
        $Url->setNotFound(true);
        unset($Page);
    } elseif (!$Page->published()) {
        $Url->setNotFound(true);
        unset($Page);
    }
}
// Homepage
if ($Url->whereAmI() === 'home' && $Url->notFound() === false) {
    // The user defined as homepage a particular page.
    if (Text::isNotEmpty($Site->homepage())) {
        $Url->setWhereAmI('page');
        $Page = buildPage($Site->homepage());
        if ($Page === false) {
            $Url->setWhereAmI('home');
        }
    }
}
if ($Url->notFound()) {
    $Url->setWhereAmI('page');
    $Page = new Page('error');
}
// Build all pages
$pages = buildAllPages();
开发者ID:vorons,项目名称:bludit,代码行数:31,代码来源:71.pages.php

示例6:

?>
</h4>

			<!-- Social networks
			-->
			<?php 
if (Text::isNotEmpty($User->twitter())) {
    echo '<div class="social"><a href="' . $User->twitter() . '">Twitter</a></div>';
}
if (Text::isNotEmpty($User->facebook())) {
    echo '<div class="social"><a href="' . $User->facebook() . '">Facebook</a></div>';
}
if (Text::isNotEmpty($User->googleplus())) {
    echo '<div class="social"><a href="' . $User->googleplus() . '">Google+</a></div>';
}
if (Text::isNotEmpty($User->instagram())) {
    echo '<div class="social"><a href="' . $User->instagram() . '">Instagram</a></div>';
}
?>
		</div>
	</div>

	<!-- Post content
	-->
	<div class="col-md-9 col-md-pull-3">

		<!-- Load plugins
		- Hook: Post Begin
		-->
		<?php 
Theme::plugins('pageBegin');
开发者ID:vorons,项目名称:bludit,代码行数:31,代码来源:post.php

示例7:

	<!-- Post's header -->
	<header>
		<div class="title">
			<h1><a href="<?php 
echo $Post->permalink();
?>
"><?php 
echo $Post->title();
?>
</a></h1>
			<div class="info"><span><i class="fa fa-clock-o"></i> <?php 
echo $Post->date();
?>
</span><span><i class="fa fa-user"></i> <?php 
echo Text::isNotEmpty($Post->user('firstName')) ? $Post->user('firstName') : $Post->user('username');
?>
</span></div>
		</div>
	</header>

	<div class="cover-image">
	<!-- Cover Image -->
	<?php 
if ($Post->coverImage()) {
    echo '<img src="' . $Post->coverImage() . '" alt="Cover Image">';
}
?>
	</div>

	<!-- Post's content, the first part if has pagebrake -->
开发者ID:acrox999,项目名称:bludit,代码行数:30,代码来源:post.php

示例8: build_page

// Search for changes on pages by the user.
if ($Site->cliMode()) {
    $dbPages->regenerateCli();
}
// Filter by page, then build it
if ($Url->whereAmI() === 'page' && $Url->notFound() === false) {
    $Page = build_page($Url->slug());
    if ($Page === false) {
        $Url->setNotFound(true);
        unset($Page);
    } elseif (!$Page->published()) {
        $Url->setNotFound(true);
        unset($Page);
    }
}
// Default homepage
if ($Url->notFound() === false) {
    if (Text::isNotEmpty($Site->homepage()) && $Url->whereAmI() === 'home') {
        $Url->setWhereAmI('page');
        $Page = build_page($Site->homepage());
        if ($Page === false) {
            $Url->setWhereAmI('home');
        }
    }
}
if ($Url->notFound()) {
    $Url->setWhereAmI('page');
    $Page = new Page('error');
}
// Build all pages
build_all_pages();
开发者ID:CryssDOTnet,项目名称:bludit,代码行数:31,代码来源:70.pages.php

示例9: elseif

		</div>
	</div>

	<!-- Introduction -->
	<div class="intro">
		<div class="container">
			<div class="units-row">
			    <div class="unit-10">
			    	<img class="img-intro" src="<?php 
echo HTML_PATH_THEME . 'img/avatar.png';
?>
" alt="">
			    </div>
			    <div class="unit-90">
			    	<p class="p-intro"><?php 
echo Text::isNotEmpty($Site->description()) ? $Site->description() : 'Welcome to the machine';
?>
</p>
			    </div>
			</div>
		</div>
	</div>

	<!-- Content -->
	<div class="content">
		<div class="container">
	        <?php 
if ($Url->whereAmI() == 'home' || $Url->whereAmI() == 'tag') {
    include PATH_THEME_PHP . 'home.php';
} elseif ($Url->whereAmI() == 'post') {
    include PATH_THEME_PHP . 'post.php';
开发者ID:clstrfcuk,项目名称:bludit-themes,代码行数:31,代码来源:index.php


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