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


PHP Theme::plugins方法代码示例

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


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

示例1: deletePage

function deletePage($key)
{
    global $dbPages;
    global $Language;
    if ($dbPages->delete($key)) {
        // Call the plugins after post created.
        Theme::plugins('afterPageDelete');
        Alert::set($Language->g('The page has been deleted successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to delete the page.');
    }
}
开发者ID:bayramlielxan,项目名称:bludit,代码行数:13,代码来源:edit-page.php

示例2: deletePost

function deletePost($key)
{
    global $dbPosts;
    global $Language;
    if ($dbPosts->delete($key)) {
        // Reindex tags, this function is in 70.posts.php
        reIndexTagsPosts();
        // Call the plugins after post created.
        Theme::plugins('afterPostDelete');
        Alert::set($Language->g('The post has been deleted successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to delete the post.');
    }
}
开发者ID:bayramlielxan,项目名称:bludit,代码行数:15,代码来源:edit-post.php

示例3: addPage

function addPage($args)
{
    global $dbPages;
    global $Language;
    // Add the page, if the $key is FALSE the creation of the post failure.
    $key = $dbPages->add($args);
    if ($key) {
        // Call the plugins after page created.
        Theme::plugins('afterPageCreate');
        // Alert the user
        Alert::set($Language->g('Page added successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the page.');
    }
}
开发者ID:bayramlielxan,项目名称:bludit,代码行数:16,代码来源:new-page.php

示例4: addPost

function addPost($args)
{
    global $dbPosts;
    global $Language;
    // Add the page, if the $key is FALSE the creation of the post failure.
    $key = $dbPosts->add($args);
    if ($key) {
        // Reindex tags, this function is in 70.posts.php
        reIndexTagsPosts();
        // Call the plugins after post created.
        Theme::plugins('afterPostCreate');
        // Alert for the user
        Alert::set($Language->g('Post added successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the post.');
    }
    return false;
}
开发者ID:bayramlielxan,项目名称:bludit,代码行数:19,代码来源:new-post.php

示例5: array

        <?php 
echo $Post->content();
?>

	<div class="foot-post">
		<div class="units-row">
		    <div class="unit-100">
		    	<strong><?php 
$Language->p('Tags');
?>
</strong>
		    	<?php 
$links = array();
$tags = $Post->tags(true);
foreach ($tags as $tagKey => $tagName) {
    $links[] = '<a href="' . HTML_PATH_ROOT . $Url->filters('tag') . '/' . $tagKey . '">' . $tagName . '</a>';
}
echo implode(', ', $links);
?>
		    </div>
		</div>
	</div>

	<!-- Plugins Post End -->
	<?php 
Theme::plugins('postEnd');
?>

</div>
<!-- /post -->
开发者ID:clstrfcuk,项目名称:bludit-themes,代码行数:30,代码来源:post.php

示例6:

Theme::plugins('pageBegin');
?>

	<!-- Post's header -->
	<header>
		<div class="title">
			<h2><a href="<?php 
echo $Page->permalink();
?>
"><?php 
echo $Page->title();
?>
</a></h2>
			<p><?php 
echo $Page->description();
?>
</p>
		</div>
	</header>

	<!-- Post's content, the first part if has pagebrake -->
	<?php 
echo $Page->content();
?>

	<!-- Plugins Page End -->
	<?php 
Theme::plugins('pageEnd');
?>

</article>
开发者ID:hxii,项目名称:bludit-themes,代码行数:31,代码来源:page.php

示例7:

?>
</head>
<body class="uk-height-1-1">

<!-- Plugins -->
<?php 
Theme::plugins('loginBodyBegin');
?>

<div class="uk-vertical-align uk-text-center uk-height-1-1">
<div class="uk-vertical-align-middle login-box">
<h1>BLUDIT</h1>
<?php 
if (Alert::defined()) {
    echo '<div class="uk-alert uk-alert-danger">' . Alert::get() . '</div>';
}
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'] . '.php')) {
    include PATH_ADMIN_VIEWS . $layout['view'] . '.php';
}
?>
</div>
</div>

<!-- Plugins -->
<?php 
Theme::plugins('loginBodyEnd');
?>

</body>
</html>
开发者ID:rayblo,项目名称:bludit,代码行数:30,代码来源:login.php

示例8:

echo HTML_PATH_ADMIN_ROOT . 'about';
?>
"><?php 
$L->p('About');
?>
</a></li>
	</ul>
</div>
</div>

<!-- View -->
<div class="uk-container uk-container-center">
<?php 
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'] . '.php')) {
    include PATH_ADMIN_VIEWS . $layout['view'] . '.php';
}
?>
</div>

<!-- Javascript -->
<?php 
include PATH_JS . 'functions.php';
?>

<!-- Plugins -->
<?php 
Theme::plugins('adminBodyEnd');
?>

</body>
</html>
开发者ID:veshinak,项目名称:bludit,代码行数:31,代码来源:index.php

示例9: elseif

if ($Url->whereAmI() == 'home') {
    include 'php/home.php';
} elseif ($Url->whereAmI() == 'post') {
    include 'php/post.php';
} elseif ($Url->whereAmI() == 'page') {
    include 'php/page.php';
}
?>
    </div>

    <!-- Footer -->
    <div class="footer">
        <p><?php 
echo $Site->footer();
?>
 | <?php 
echo $Language->get('Powered by');
?>
 <a target="_blank" href="http://www.bludit.com">Bludit</a></p>
    </div>

</div>


<!-- Plugins Site Body End -->
<?php 
Theme::plugins('siteBodyEnd');
?>

</body>
</html>
开发者ID:hxii,项目名称:bludit-themes,代码行数:31,代码来源:index.php

示例10: elseif

</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<?php 
echo $Site->description();
?>
">
<meta name="author" content="Bludit - Theme design by Afnizar Nur Ghifari">

<?php 
// <meta name="keywords" content="HTML,CSS,XML,JavaScript">
if ($Url->whereAmI() == 'post') {
    Theme::keywords($Post->tags());
} elseif ($Url->whereAmI() == 'page') {
    Theme::keywords($Page->tags());
}
/*
<link rel="stylesheet" href="css/kube.min.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/custom.min.css" />
*/
Theme::css(array('kube.min.css', 'font-awesome.min.css', 'custom.css'));
/*
<link href="http://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
*/
Theme::css(array('http://fonts.googleapis.com/css?family=Lato:400,700', 'http://fonts.googleapis.com/css?family=Open+Sans:400,700'), false);
Theme::favicon();
// Plugins Site Head
Theme::plugins('siteHead');
开发者ID:clstrfcuk,项目名称:bludit-themes,代码行数:30,代码来源:head.php

示例11:

<div class="sidebar-content">
<h1 class="title"><?php 
echo $Site->title();
?>
</h1>
<h2 class="slogan"><?php 
echo $Site->slogan();
?>
</h2>
<!-- Plugins Sidebar -->
<?php 
Theme::plugins('siteSidebar');
?>
</div>
开发者ID:Aquafortis,项目名称:aqua,代码行数:14,代码来源:sidebar.php

示例12: defined

<?php

defined('BLUDIT') or die('Bludit CMS.');
// Boot rules
include PATH_RULES . '70.posts.php';
include PATH_RULES . '70.pages.php';
include PATH_RULES . '80.plugins.php';
include PATH_RULES . '99.header.php';
include PATH_RULES . '99.paginator.php';
include PATH_RULES . '99.themes.php';
// Plugins before site loaded
Theme::plugins('beforeSiteLoad');
// Theme init.php
if (Sanitize::pathFile(PATH_THEMES, $Site->theme() . DS . 'init.php')) {
    include PATH_THEMES . $Site->theme() . DS . 'init.php';
}
// Theme HTML
if (Sanitize::pathFile(PATH_THEMES, $Site->theme() . DS . 'index.php')) {
    include PATH_THEMES . $Site->theme() . DS . 'index.php';
} else {
    $Language->p('Please check your theme configuration');
}
// Plugins after site loaded
Theme::plugins('afterSiteLoad');
开发者ID:roberthchan,项目名称:bludit,代码行数:24,代码来源:site.php

示例13:

    // User not logged.
    // Slug is login.
    // Slug is login-email.
    if ($Url->notFound() || !$Login->isLogged() || $Url->slug() === 'login' || $Url->slug() === 'login-email') {
        $layout['controller'] = 'login';
        $layout['view'] = 'login';
        $layout['template'] = 'login.php';
        if ($Url->slug() === 'login-email') {
            $layout['controller'] = 'login-email';
            $layout['view'] = 'login-email';
        }
        // Generate the tokenCSRF for the user not logged, when the user log-in the token will be change.
        $Security->generateTokenCSRF();
    }
    // Load plugins before the admin area will be load.
    Theme::plugins('beforeAdminLoad');
    // Load init.php if the theme has one.
    if (Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme() . DS . 'init.php')) {
        include PATH_ADMIN_THEMES . $Site->adminTheme() . DS . 'init.php';
    }
    // Load controller.
    if (Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'] . '.php')) {
        include PATH_ADMIN_CONTROLLERS . $layout['controller'] . '.php';
    }
    // Load view and theme.
    if (Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme() . DS . $layout['template'])) {
        include PATH_ADMIN_THEMES . $Site->adminTheme() . DS . $layout['template'];
    }
    // Load plugins after the admin area is loaded.
    Theme::plugins('afterAdminLoad');
}
开发者ID:rayblo,项目名称:bludit,代码行数:31,代码来源:admin.php

示例14: foreach

// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
$_Plugin = false;
$pluginClassName = $layout['parameters'];
foreach ($plugins['all'] as $P) {
    if ($P->className() == $pluginClassName) {
        $_Plugin = $P;
    }
}
// Check if the plugin exists.
if ($_Plugin === false) {
    Redirect::page('admin', 'plugins');
}
// Check if the plugin has the method form()
if (!method_exists($_Plugin, 'form')) {
    Redirect::page('admin', 'plugins');
}
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $_Plugin->setDb($_POST);
    Theme::plugins('afterFormSave');
    Alert::set($Language->g('the-changes-have-been-saved'));
}
// ============================================================================
// Main after POST
// ============================================================================
开发者ID:vorons,项目名称:bludit,代码行数:31,代码来源:configure-plugin.php


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