本文整理汇总了PHP中set_meta函数的典型用法代码示例。如果您正苦于以下问题:PHP set_meta函数的具体用法?PHP set_meta怎么用?PHP set_meta使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_meta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
function check()
{
// Get Repo from Blair2004
// Check Version Releases
// http://api.github.com/repos/Blair2004/tendoo-cms/releases
$json_api = $this->curl->security(false)->get('https://api.github.com/repos/Blair2004/tendoo-cms/releases');
if ($json_api != '') {
$array_api = json_decode($json_api, true);
$lastest_release = return_if_array_key_exists(0, $array_api);
$release_tag_name = return_if_array_key_exists('tag_name', $lastest_release);
$release_id = (double) substr($release_tag_name, 1);
$lastest_release = array('id' => $release_id, 'name' => return_if_array_key_exists('name', $lastest_release), 'description' => return_if_array_key_exists('body', $lastest_release), 'beta' => return_if_array_key_exists('prerelease', $lastest_release), 'published' => return_if_array_key_exists('published_at', $lastest_release), 'link' => return_if_array_key_exists('zipball_url', $lastest_release));
$tendoo_update['core'] = $lastest_release;
set_meta('tendoo_core_update', $tendoo_update);
}
$core_id = (double) get('core_id');
if ($tendoo_update = get_meta('tendoo_core_update')) {
$array = array();
// Setting Core Warning
if ($release = return_if_array_key_exists('core', $tendoo_update)) {
if ($release['id'] > $core_id) {
//
if ($release['beta'] == false) {
$array[] = array('link' => $release['link'], 'content' => $release['description'], 'title' => $release['name'], 'date' => $release['published']);
}
}
}
return $array;
}
return false;
}
示例2: showConfigurationChanger
/**
* Response for extension configuration.
*
* @param array $data
*
* @return mixed
*/
public function showConfigurationChanger(array $data)
{
$name = $data['extension']->name;
set_meta('title', Foundation::memory()->get("extensions.available.{$name}.name", $name));
set_meta('description', trans('orchestra/foundation::title.extensions.configure'));
return view('orchestra/foundation::extensions.configure', $data);
}
示例3: edit
/**
* Edit a post.
*
* @param int $id
*
* @return mixed
*/
public function edit($id = null)
{
set_meta('title', 'Write a Post');
$content = Content::post()->where('id', $id)->firstOrFail();
$this->authorize('update', $content);
return view('orchestra/story::admin.editor', ['content' => $content, 'url' => handles("orchestra::storycms/posts/{$content->getAttribute('id')}"), 'method' => 'PUT']);
}
示例4: showResetForm
/**
* Once user actually visit the reset my password page, we now should be
* able to make the operation to create a new password.
*
* GET (:orchestra)/forgot/reset/(:hash)
*
* @param string $token
*
* @return mixed
*/
public function showResetForm($token = null)
{
if (is_null($token)) {
return $this->showLinkRequestForm();
}
$email = Request::input('email');
set_meta('title', trans('orchestra/foundation::title.reset-password'));
return view('orchestra/foundation::forgot.reset', compact('email', 'token'));
}
示例5: add_to_meta
function add_to_meta($name, $addition = "")
{
global $fusion_page_meta;
if (isset($fusion_page_meta[$name])) {
$fusion_page_meta[$name] .= $addition;
} else {
set_meta($name, $addition);
}
}
示例6: show
/**
* Show the content.
*
* @return mixed
*/
public function show()
{
$params = static::$router->current()->parameters();
$id = Arr::get($params, 'id');
$slug = Arr::get($params, 'slug');
$page = $this->getRequestedContent($id, $slug);
$id = $page->getAttribute('id');
$slug = $page->getAttribute('slug');
set_meta('title', $page->getAttribute('title'));
return $this->getResponse($page, $id, $slug);
}
示例7: showFranchise
public function showFranchise($franchise, $cateegory, $id)
{
$item = Franchise::find($franchise)->{$cateegory}->find($id);
set_meta('title', trans('blupl/franchises::title.media.reporter'));
if ($item != null && $item->status == 0) {
return view('blupl/franchises::franchise', compact('item'));
} else {
if ($item->status == 1) {
$massage = "Already Approve";
} else {
$massage = "Reporter Not Found";
}
Flash::error($massage);
return $this->redirect(handles('blupl/franchise::approval/franchise/' . $franchise . '/' . $cateegory));
}
}
示例8: showReporter
public function showReporter($reporterId)
{
$reporter = MediaReporter::find($reporterId);
set_meta('title', trans('blupl/printmedia::title.media.reporter'));
if ($reporter != null && $reporter->status == 0) {
return view('blupl/printmedia::reporter', compact('reporter'));
} else {
if ($reporter->status == 1) {
$massage = "Already Approve";
} else {
$massage = "Reporter Not Found";
}
Flash::error($massage);
return $this->redirect(handles('blupl/printmedia::approval'));
}
}
示例9: index
public function index()
{
$active_theme = get_core_vars('active_theme');
$setting_key = $active_theme['namespace'] . '_theme_settings';
$this->load->library('form_validation');
$this->form_validation->set_rules('api_limit', 'API LIMIT', 'required');
$this->form_validation->set_rules('declared_apis', 'Declared API', 'required');
$this->form_validation->set_rules('declared_item', 'Declared Item', 'required');
// For Static using API
if ($this->form_validation->run()) {
if ($active_theme) {
$datas_get = get_meta($setting_key);
$saved_settings = $datas_get ? $datas_get : array();
// If there are same setting already saved, they'll be overwrited
$saved_settings[$this->input->post('declared_item')] = array('api_limit' => $this->input->post('api_limit'), 'declared_apis' => $this->input->post('declared_apis'), 'declared_item' => $this->input->post('declared_item'));
if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) {
notice('push', fetch_notice_output('done'));
}
}
}
// For Static not draggable
if ($this->input->post('is_static_item')) {
$this->load->library('form_validation');
if ($static = return_if_array_key_exists('static', $_POST)) {
if (is_array($static)) {
$active_theme = get_core_vars('active_theme');
$saved_settings = get_meta($active_theme['namespace'] . '_theme_settings');
foreach ($static as $namespace => $item) {
if (is_array($item)) {
foreach ($item as $name => $fields) {
$saved_settings[$namespace][$name] = $fields;
}
}
}
if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) {
notice('push', fetch_notice_output('done'));
}
}
}
}
// Add Settings to Core vars
push_core_vars('active_theme', 'theme_settings', get_meta($setting_key));
set_page('title', 'TIM | ' . get('core_version'));
return $this->load->view($this->module_metas['uri_path'] . 'views/body', $this->data, true, true);
}
示例10: set_TagInfo
/**
* Fetches all Forum Tag Table records
*
* @param bool|TRUE $setTitle
*/
public function set_TagInfo($setTitle = TRUE)
{
$locale = fusion_get_locale("", FORUM_LOCALE);
$locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
if ($setTitle == TRUE) {
set_title($locale['forum_0000']);
add_to_title($locale['global_201'] . $locale['forum_tag_0100']);
add_breadcrumb(array('link' => FORUM . "index.php", 'title' => $locale['forum_0000']));
add_breadcrumb(array('link' => FORUM . "tags.php", 'title' => $locale['forum_tag_0100']));
}
$thread_result = NULL;
if (isset($_GET['tag_id']) && isnum($_GET['tag_id'])) {
$tag_query = "SELECT * FROM " . DB_FORUM_TAGS . " WHERE tag_status=1 AND tag_id='" . intval($_GET['tag_id']) . "'\n " . (multilang_table("FO") ? "AND tag_language='" . LANGUAGE . "'" : "") . "\n ";
$tag_result = dbquery($tag_query);
if (dbrows($tag_result) > 0) {
$data = dbarray($tag_result);
add_to_title($locale['global_201'] . $data['tag_title']);
add_breadcrumb(array('link' => FORUM . "tags.php?tag_id=" . $data['tag_id'], 'title' => $data['tag_title']));
if (!empty($data['tag_description'])) {
set_meta('description', $data['tag_description']);
}
$data['tag_link'] = FORUM . "tags.php?tag_id=" . $data['tag_id'];
$data['tag_active'] = isset($_GET['viewtags']) && isset($_GET['tag_id']) && $_GET['tag_id'] == $data['tag_id'] ? TRUE : FALSE;
$this->tag_info['tags'][$data['tag_id']] = $data;
$this->tag_info['tags'][0] = array('tag_id' => 0, 'tag_link' => FORUM . "tags.php", 'tag_title' => fusion_get_locale("global_700") . "…", 'tag_active' => '', 'tag_color' => '');
$this->tag_info['filter'] = $this->filter()->get_FilterInfo();
$filter_sql = $this->filter()->get_filterSQL();
// get forum threads.
$this->tag_info = array_merge_recursive($this->tag_info, self::get_tag_thread($_GET['tag_id'], array("condition" => $filter_sql['condition'], "order" => $filter_sql['order'])));
} else {
redirect(FORUM . "index.php");
}
} else {
$this->cache_tags();
}
}
示例11: showUserChanger
/**
* Response when edit user page succeed.
*
* @param array $data
*
* @return mixed
*/
public function showUserChanger(array $data)
{
set_meta('title', trans('orchestra/foundation::title.users.update'));
return view('orchestra/foundation::users.edit', $data);
}
示例12: set_meta
// maybe clean description by sanitize_replacement_tags()
set_meta('og:description', $content['opengraph']['description'], 'property');
}
// Open Graph images
$content['opengraph']['has_image'] = false;
if (isset($content['images']['shop']) && count($content['images']['shop'])) {
foreach ($content['images']['shop'] as $og_img) {
$content['opengraph']['has_image'] = true;
set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['hash'] . '.' . $og_img['ext'], 'property', false, true);
}
}
if (isset($content['images']['news']) && count($content['images']['news'])) {
foreach ($content['images']['news'] as $og_img) {
$content['opengraph']['has_image'] = true;
set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['id'] . '.' . $og_img['ext'], 'property', false, true);
}
}
if (isset($content['images']['article']['image'])) {
$content['opengraph']['has_image'] = true;
// Based on default article detail / zoom image
//set_meta('og:image', PHPWCMS_URL . $content['images']['article'][ isset($content['images']['article']) ? 'zoom' : 'image' ]['src'], 'property');
// This can be set dynamically ad allow always the same size
set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $content['images']['article']['hash'] . '.' . $content['images']['article']['ext'], 'property');
}
if (!$content['opengraph']['has_image']) {
// Default Open Graph image
set_meta('og:image', PHPWCMS_URL . TEMPLATE_PATH . 'img/opengraph-default.png', 'property');
}
// Disable the built-in Open Graph rendering
$content['opengraph']['support'] = false;
}
示例13: index
/**
* Login page.
*
* GET (:orchestra)/login
*
* @return mixed
*/
public function index()
{
set_meta('title', trans('orchestra/foundation::title.login'));
return view('orchestra/foundation::credential.login');
}
示例14: indexSucceed
/**
* Response when lists ACL page succeed.
*
* @param array $data
*
* @return mixed
*/
public function indexSucceed(array $data)
{
set_meta('title', trans('orchestra/control::title.acls.list'));
return view('orchestra/control::acl.index', $data);
}
示例15: defined
<?php
defined('LARAVEL_START') or die('No direct script access allowed');
set_meta('GIFTWISHES::SKIN', 'skin-blue');
if (!App::bound('orchestra.avatar') && class_exists('Orchestra\\Avatar\\AvatarServiceProvider')) {
App::register('Orchestra\\Avatar\\AvatarServiceProvider');
}