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

PHP set_meta函数代码示例

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

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



在下文中一共展示了set_meta函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:31,代码来源:Tendoo_update.Class.php


示例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);
 }
开发者ID:quetzyg,项目名称:foundation,代码行数:14,代码来源:ConfigureController.php


示例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']);
 }
开发者ID:dinghua,项目名称:crm,代码行数:14,代码来源:PostsController.php


示例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'));
 }
开发者ID:quetzyg,项目名称:foundation,代码行数:19,代码来源:PasswordBrokerController.php


示例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);
    }
}
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:9,代码来源:output_handling_include.php


示例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);
 }
开发者ID:dinghua,项目名称:crm,代码行数:16,代码来源:ContentController.php


示例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));
     }
 }
开发者ID:blupl,项目名称:franchises,代码行数:16,代码来源:ApprovalController.php


示例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'));
     }
 }
开发者ID:blupl,项目名称:printmedia,代码行数:16,代码来源:ApprovalController.php


示例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);
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:45,代码来源:backend.php


示例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();
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:41,代码来源:tags.php


示例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);
 }
开发者ID:quetzyg,项目名称:foundation,代码行数:12,代码来源:UsersController.php


示例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;
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:opengraph.php


示例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');
 }
开发者ID:azraai,项目名称:foundation,代码行数:12,代码来源:CredentialController.php


示例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);
 }
开发者ID:quetzyg,项目名称:control,代码行数:12,代码来源:AuthorizationController.php


示例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');
}
开发者ID:vitalysemenov,项目名称:giftwishes-theme,代码行数:7,代码来源:start.php


示例16: showDashboard

 /**
  * Response to show dashboard.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showDashboard(array $data)
 {
     set_meta('title', trans('orchestra/foundation::title.home'));
     return view('orchestra/foundation::dashboard.index', $data);
 }
开发者ID:stevebauman,项目名称:foundation,代码行数:12,代码来源:DashboardController.php


示例17: foreach

    }
    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;
        set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $content['images']['article']['hash'] . '.' . $content['images']['article']['ext'], 'property');
    }
    if (!$content['opengraph']['has_image'] && is_file(PHPWCMS_TEMPLATE . 'img/opengraph-default.png')) {
        set_meta('og:image', PHPWCMS_URL . TEMPLATE_PATH . 'img/opengraph-default.png', 'property');
    }
}
set_meta('generator', 'phpwcms ' . PHPWCMS_VERSION);
// replace Print URL
if (strpos($content["all"], '[PRINT]') !== false) {
    $content["all"] = str_replace('[PRINT]', '<a href="' . rel_url(array('print' => 1), array(), PHPWCMS_ALIAS) . '" class="' . $template_default['classes']['link-print'] . '" target="_blank" rel="nofollow">', $content["all"]);
    $content["all"] = str_replace('[/PRINT]', '</a>', $content["all"]);
}
if (strpos($content["all"], '[PRINT_PDF]') !== false) {
    $content["all"] = str_replace('[PRINT_PDF]', '<a href="' . rel_url(array('print' => 2), array(), PHPWCMS_ALIAS) . '" class="' . $template_default['classes']['link-print-pdf'] . '" target="_blank" rel="nofollow">', $content["all"]);
    $content["all"] = str_replace('[/PRINT_PDF]', '</a>', $content["all"]);
}
// some article related "global" replacement tags
if (isset($content['article_livedate'])) {
    $content['all'] = render_cnt_template($content['all'], 'AUTHOR', html_specialchars($content['article_username']));
    $content['all'] = render_cnt_date($content['all'], $content["article_date"], $content['article_livedate'], $content['article_killdate']);
    $content['all'] = render_cnt_template($content['all'], 'CATEGORY', $content['cat']);
} else {
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:content.func.inc.php


示例18: add_permission

 public function add_permission($role_id, $action)
 {
     $role = $this->get($role_id);
     if ($role) {
         $roles_permissions = get_meta('roles_permissions');
         $permissions = riake($role_id, $roles_permissions, array($role_id => array()));
         if (!in_array($action, force_array($permissions))) {
             $roles_permissions[$role_id][] = $action;
             set_meta('roles_permissions', $roles_permissions);
             return true;
         }
     }
     return false;
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:14,代码来源:Roles.Class.php


示例19: redirect

            $data['download_title'] = "<a class='text-dark' href='" . INFUSIONS . "downloads/downloads.php?readmore=" . $data['download_id'] . "'>" . $data['download_title'] . "</a>";
            $info['download_item'] = $data;
        } else {
            redirect(INFUSIONS . "downloads/downloads.php");
        }
    } else {
        redirect(INFUSIONS . "downloads/downloads.php");
    }
} else {
    $condition = '';
    if (isset($_GET['author']) && isnum($_GET['author'])) {
        $condition = "AND download_user = '" . intval($_GET['author']) . "'";
    }
    if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
        set_title($locale['download_1000']);
        set_meta("name", $locale['download_1000']);
        downloadCats_breadcrumbs(get_downloadCatsIndex());
        $res = dbarray(dbquery("SELECT * FROM " . DB_DOWNLOAD_CATS . " " . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE ") . "\n\t\t\tdownload_cat_id='" . intval($_GET['cat_id']) . "'"));
        if (!empty($res)) {
            $info += $res;
        } else {
            redirect(FUSION_SELF);
        }
        $info['download_title'] = $info['download_cat_name'];
        $info['download_max_rows'] = dbcount("('download_id')", DB_DOWNLOADS, "download_cat='" . intval($_GET['cat_id']) . "' AND " . groupaccess('download_visibility'));
        $_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $info['download_max_rows'] ? $_GET['rowstart'] : 0;
        if ($info['download_max_rows']) {
            switch ($_GET['type']) {
                case 'recent':
                    $filter_condition = 'download_datestamp DESC';
                    break;
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:downloads.php


示例20: ftp

 /**
  * Show FTP configuration form or run the queue.
  *
  * @return mixed
  */
 public function ftp()
 {
     set_meta('title', trans('orchestra/foundation::title.publisher.ftp'));
     set_meta('description', trans('orchestra/foundation::title.publisher.description'));
     return view('orchestra/foundation::publisher.ftp');
 }
开发者ID:quetzyg,项目名称:foundation,代码行数:11,代码来源:PublisherController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP set_modified_headers函数代码示例发布时间:2022-05-15
下一篇:
PHP set_message_success函数代码示例发布时间: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