OpenSencillo
2015.002
|
Public Member Functions | |
__construct () | |
keywords ($kw) | |
encode ($ec='UTF-8') | |
title ($t) | |
description ($data) | |
robots () | |
owner ($author) | |
custom ($code) | |
save () | |
lang ($lang) | |
googleLoad () | |
Data Fields | |
$seo | |
Private Attributes | |
$header | |
$body | |
$lang |
Definition at line 118 of file core_functions.php.
__construct | ( | ) |
Create default status for page
Definition at line 129 of file core_functions.php.
{ $this->header='<!DOCTYPE html><html lang="{htmlLang}"><head>'; $this->body='</head>'; }
custom | ( | $ | code | ) |
Add custom code to header
string | $code |
Definition at line 200 of file core_functions.php.
{ $this->header .= $code; }
description | ( | $ | data | ) |
Page description with max size 159 characters
string | $data |
Definition at line 170 of file core_functions.php.
{ if(strlen($data)>159) { $data = substr($data,0,155).'...'; } $this->header .= '<meta name="description" content="'.$data.'">'; }
encode | ( | $ | ec = 'UTF-8' | ) |
Encoding webpage
string | $ec | webpage encoding |
Definition at line 148 of file core_functions.php.
{ $this->header .= '<meta http-equiv="content-type" content="text/html; charset='.$ec.'" />'; }
googleLoad | ( | ) |
Add google load call
Definition at line 226 of file core_functions.php.
{ $this->header.='<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>'; $this->header.='<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>'; }
keywords | ( | $ | kw | ) |
Basic function for generate keywords tag
string | $kw | add keywords |
Definition at line 139 of file core_functions.php.
{ $this->header .= '<meta name="keywords" content="'.$kw.'" />'; }
lang | ( | $ | lang | ) |
Add lang attribute to html
Definition at line 218 of file core_functions.php.
{ $this->header = str_replace('{htmlLang}', $lang, $this->header); }
owner | ( | $ | author | ) |
Add page owner and generator meta tag
string | $author |
Definition at line 191 of file core_functions.php.
{ $this->header .= '<meta name="author" content="'.$author.'"><meta name="generator" content="Sencillo Framework (www.opensencillo.com)">'; }
robots | ( | ) |
Add settings for Google Bot and Bing Bot
Definition at line 182 of file core_functions.php.
{
$this->header .= '<meta name="ROBOTS" content="NOODP"><meta name="Slurp" content="NOYDIR">';
}
save | ( | ) |
Save SEO and generate header content
Definition at line 209 of file core_functions.php.
{
$this->seo = $this->header.$this->body;
return $this->seo;
}
title | ( | $ | t | ) |
Page title
string | $t | title size max 69 characters |
Definition at line 157 of file core_functions.php.
$body [private] |
Definition at line 123 of file core_functions.php.
$header [private] |
Definition at line 122 of file core_functions.php.
$lang [private] |
Definition at line 124 of file core_functions.php.
$seo |
Definition at line 120 of file core_functions.php.