"; echo "

Warning: You're blocking robots!! You must set your blog visible to everyone. Go to Settings.

"; } function _as() { ?>
_wp2ns(); $this->_wpguid(); $this->_wp2np(); ?>



'.$_m.'.

'; } $_x = get_option('au_seo'); if(!empty($_x) && is_array($_x)){ /* Authenticate!! */ } ?>

'; settings_fields($_o); $this->_cp = $_k; } } function _sbc($_ct, $_bs = true, $_up=false) { if ($_bs) { ?>
" />
_hi('_updfxx_','x1097bc');} ?>
_as(); ?> get_results("SELECT * FROM $wpdb->postmeta WHERE meta_key = '$old_key'"); foreach ($old_keys as $key) { $exists = $wpdb->get_var("SELECT count(*) FROM $wpdb->postmeta WHERE meta_key = '$new_key' AND post_id = ".$old->post_id); if ($exists == 0) $wpdb->query("INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) VALUES (".$key->post_id.",'".$new_key."','".addslashes($key->meta_value)."')"); } if ($replace_key){ $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '$old_key'"); } } function delete_meta($key) { global $wpdb; $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '$key'"); } function _g_gsp(){ $_os = _gso(); $this->_stc('Dashboard', false); ksort($_os); $_h = ''; $_x_ = get_option('permalink_structure'); if(!$_x_ || (strpos(get_option('permalink_structure'), '%postname%') === false && !isset($_os['_ipm_']))){ $_h .= '

' .'Oops, seems you have not set your permalink structures. Consider setting ' .'Permalink Settings' .'

'; } if(get_option('page_comments') && $_os['_ipc_'] == ''){ $_h .= '

' .'Comments paging is enabled. It is not a common practice in general. Please disable it. ' .'Comments Settings' .'

'; } if ($_h != '') $this->_cpb('Settings/Suggestions','Wordpress Settings Suggestions',$_h); $_h = $this->_hn('_ipb_'); $_h .= $this->_hn('_ipc_'); $_h .= $this->_hn('_ipm_'); //Keywords are allowed by default. Hide it! //$_h .= $this->_cb('_umkw_', 'Allow meta keywords tag?'); $_h .= $this->_cb('_dds_', 'Disable date in snippet preview for posts'); $_h .= '

Hide SEO Metabox in the following post types:

'; foreach(get_post_types() as $_t){ if(in_array($_t, array('revision','nav_menu_item','post_format'))) continue; $_h .= $this->_cb('_'.$_t.'-h-eb_', $_t); } $this->_cpb('_g_gsp','SEO Settings',$_h); do_action('g', $this); $this->_sbc(''); } function _g_ttp(){ $this->_stc('Title Tag Settings', false, true, 'au_seo_global_options_t', 'au_seo_t'); $_os = _gso(); $_h = '

In order to enable Alquemie SEO to modify your site titles, the title tag in your header.php file should look like this:

'; $_h .= '
<title><?php wp_title(''); ?></title>
'; $_h .= '

Otherwise enable a forceful rewrite of your titles by checking the checkbox below.

'; $_h .= $this->_cb('_rtf_','Rewrite titles forcefully'); $_h .= '

Individual Pages

'; $_h .= '

You may want to set titles and information for individual pages and posts. To do that fill, out the Alquemie SEO area on that page or post. To create a template to use on all other pages and posts, fill out the area below

'; if('posts' == get_option('show_on_front')){ $_h .= '

Landing Page (Latest Blog Posts)

'; $_h .= $this->_ti('_ht_','Title'); $_h .= $this->_ta('_hmd_','Meta description'); //if(isset($_os['_umkw_']) && $_os['_umkw_']) //Metakeywords are allowed sitewide!! $_h .= $this->_ta('_hmkw_','Meta keywords'); }else{ $_h .= '

Landing Page (Home Page)

'; $_h .= '

You can set the templates for the front page (' . get_option('page_on_front') . ')by editing the page SEO settings.

'; if(is_numeric(get_option('page_for_posts'))){ $_l = get_edit_post_link(get_option('page_for_posts')); if($_l != ''){ $_h .= '

You can set the templates for the front page (' . get_option('page_on_front') . ')by editing the page SEO settings.

'; } } } foreach(get_post_types() as $_t){ if(in_array($_t, array('revision','nav_menu_item','post_format'))) continue; if($_t == 'attachment') continue; $_h .= '

'.ucfirst($_t).'

'; $_h .= $this->_ti('_'.$_t.'-t_','Title'); $_h .= $this->_ta('_'.$_t.'-m-d_','Meta description'); //if(isset($_os['_umkw_']) && $_os['_umkw_']) //Metakeywords are allowed by default!! $_h .= $this->_ta('_'.$_t.'-m-k_','Meta keywords'); $_h .= '
'; } $_h .= '
'; foreach(get_taxonomies() as $_x){ if(in_array($_x, array('link_category','nav_menu'))) continue; $_h .= '

'.ucfirst($_x).'

'; $_h .= $this->_ti('_'.$_x.'-t_','Title'); $_h .= $this->_ta('_.'.$_x.'-m-d_','Meta description'); //if(isset($_os['_umkw_']) && $_os['_umkw_']) //Metakeywords are allowed by default!! $_h .= $this->_ta('_'.$_x.'-m-k_','Meta keywords'); $_h .= '
'; } $_h .= '
'; $_h .= '

Author Archives

'; $_h .= $this->_ti('_author-t_','Title'); $_h .= $this->_ta('_author-m-d_','Meta description'); //if(isset($_os['_umkw_']) && $_os['_umkw_']) //Metakeywords are allowed by default $_h .= $this->_ta('_author-m-k_','Meta keywords'); $_h .= '
'; $_h .= '

Date Archives

'; $_h .= $this->_ti('_archive-t_','Title'); $_h .= $this->_ta('_archive-m-d_','Meta description'); $_h .= '
'; $_h .= '

Search Pages

'; $_h .= $this->_ti('_search-t_','Title'); $_h .= '

404 Pages

'; $_h .= $this->_ti('_404-t_','Title'); $_h .= '
'; $this->_cpb('_g_ttp','Title Tag Settings', $_h); $_h = '

Reference templates

%%date%% Date of Post/Page
%%title%% Title of Post/Page
%%sitename%% Site Name
%%sitedesc%% Site Tagline/Description
%%excerpt%% Excerpt of Post/Page (Generates automatically if it doesn\'t exist)
%%excerpt_noauto%% Excerpt of Post/Page (Won\'t generate automatically if it doesn\'t exist)
%%tag%% Tags
%%category%% Post Categories
%%category_description%% Category Description
%%tag_description%% Tag Description
%%term_description%% Term Description
%%term_title%% Term Title
%%modified%% Post/Page Modification Date
%%id%% Post/Page ID
%%name%% Post/Page Author\'s Name
%%userid%% Post/Page Author\'s user id
%%searchphrase%% Search Phrase
%%currenttime%% Current Time
%%currentdate%% Current Date
%%currentmonth%% Current Month
%%currentyear%% Current Year
%%page%% Current Page Number
%%pagetotal%% Current Page Total
%%caption%% Attachment Caption
'; $this->_cpb('_g_ttp_r','Title Templates', $_h); $this->_sbc('Title Tag'); } function _g_plp() { if(isset($_GET['settings-updated'])){ delete_option('rewrite_rules'); } $this->_stc('Permalinks', true, true, 'au_seo_global_options_p', 'au_seo_p'); $_h = $this->_cb('_rcb_','Remove category base /category/) from the category URL.'); $_h .= $this->_cb('_tsh_','Put a trailing slash on all category and tag URLs'); $_h .= '

If there is .html at the end of you links, or anything else but a / on the end, this will force WordPress to add a trailing slash to non-post pages.

'; $_h .= $this->_cb('_rat_','Redirect attachments URLs to parent post URLs.'); $_h .= '

Attachments to posts are stored as posts. This means they have their own accessible URLs. Checking this option will force the attachment\'s URL to point to the post URL it belong to.

'; $_h .= $this->_cb('_cln_','Redirect untidy links to pretty permalinks.'); $this->_cpb('_g_plp','Permalink Settings',$_h); $this->_sbc('Permalinks'); } function _g_inp() { $this->_stc('Indexing', true, true, 'au_seo_global_options_i', 'au_seo_i'); $_h = '

You can specify the section that you want to block search engines from indexing.

'; $_h .= $this->_cb('_sr_','Search Results'); $_h .= '

Block search engines from indexing search results.

'; $_h .= $this->_cb('_li_','Login/Register Pages'); $_h .= '

Block login/register pages from being indexed

'; $_h .= $this->_cb('_ad_','Admin Pages'); $_h .= '

Block admin pages from being indexed

'; $_h .= $this->_cb('_sp_','Subpages from Home/Landing Page'); $_h .= '

Block search engines from indexing sub pages.

'; $_h .= $this->_cb('_nia_','Authors Archives'); $_h .= '

Block search engines from indexing author archives.

'; $_h .= $this->_cb('_nid_','Dated Archives'); $_h .= '

Block search engines from indexing date based archives.

'; $_h .= $this->_cb('_nie_','Category Archives'); $_h .= '

Block Category Archive indexing

'; $_h .= $this->_cb('_nit_','Tag Archives'); $_h .= '

Block Tag Archive indexing

'; $this->_cpb('g_inp','Indexing Rules',$_h); $this->_sbc('Indexing'); } function _g_nfp(){ $this->_stc('Follow/NoFollow Rules', true, true, 'au_seo_global_options_n', 'au_seo_n'); $_h = $this->_cb('_nfm_','Nofollow Login/Registration Pages'); $_h .= $this->_cb('_nfcl_','Nofollow Comment Links'); $_h .= $this->_cb('_rmw_','Nofollow links in the Meta Widget'); $this->_cpb('_g_nfp','NoFollow Settings',$_h); $this->_sbc('Follow/NoFollow Rules'); } function _g_rsp(){ $this->_stc('Robot Settings', true, true, 'au_seo_global_options_r', 'au_seo_r'); $_h = '

You can individually add these settings on each each page/post from edit screens. Here you can do sitewide settings. (Not Recommended)

'; $_h .= $this->_cb('_ndp_','Add noodp robot tag sitewide'); $_h .= $this->_cb('_nyd_','Add noydir robot tag sitewide'); $_h .= $this->_cb('_nsp_','Add nosnippet robot tag sitewide'); $_h .= $this->_cb('_nar_','Add noarchiverobot tag sitewide'); $this->_cpb('_g_rsp','Robot Tag Settings',$_h); $this->_sbc('Robot Settings'); } function _g_301p(){ $this->_stc('301 Redirects', true, true, 'au_seo_global_options_3', 'au_seo_3'); $_h = $this->_cb('_dsa_','301 Redirect Author Archives to default to the home page'); $_h .= '

If your theme does not have a template for author archives, you can simply redirect an author\'s link to the home page.

'; $_h .= $this->_cb('_dsd_','301 Redirect Date Based Archives to default to the home page'); $_h .= '

If your theme does not have a template for date based archives, you can simply redirect a date archive link to the home page.

'; $this->_cpb('_g_301p','301 Redirects',$_h); $this->_sbc('301 Redirects'); } function _g_xsp(){ } function _g_bcp() { $this->_stc('Breadcrumbs', false, true, 'au_seo_global_options_b', 'au_seo_b'); $_h = $this->_cb('_tbc_','Enable Breadcrumbs'); $_h .= '
'; $_h .= $this->_ti('_bsp_','Separator'); $_h .= $this->_ti('_hbc_','Alias for the Homepage'); $_h .= $this->_ti('_pbc_','Prefix for the breadcrumb path'); $_h .= $this->_ti('_apbc_','Prefix for Archive breadcrumbs'); $_h .= $this->_ti('_spbc_','Prefix for Search Page breadcrumbs'); $_h .= $this->_ti('_4pbc_','Alias for 404 Page'); $_h .= $this->_cb('_rbp_','Remove Blogroll from breadcrumbs'); $_h .= '

'; $_h .= 'Taxonomy to show in breadcrumbs:
'; foreach(get_post_types() as $_t){ if (in_array($_t, array('revision', 'attachment', 'nav_menu_item', 'post_format'))) continue; $_x = get_object_taxonomies($_t); if(count($_x) > 0) { $_vs = array(0 => 'None'); foreach(get_object_taxonomies($_t) as $_x){ $_xx = get_taxonomy($_x); $_vs[$_x] = $_xx->labels->singular_name; } $_j = get_post_type_object($_t); $_h .= $this->_st('_m-t-p_t-'.$_t.'_', $_j->labels->name, $_vs); } } $_h .= '
'; $_h .= $this->_cb('_bcbl_','Bold last page in the breadcrumb'); $_h .= '
'; $_h .= '

Usage

'; $_h .= '

Put this code into your theme anywhere you want to show the breadcruumbs:

'; $_h .= '
<?php if(function_exists('au_breadcrumbs')){

                        au_breadcrumbs('<p id="breadcrumbs">','</p>');

            } ?>
'; $this->_cpb('_g_bcp','Breadcrumbs Settings',$_h); $this->_sbc('Breadcrumbs'); } function _g_chp(){ $this->_stc('Head Tag Cleaner', true, true, 'au_seo_global_options_h', 'au_seo_h'); $_h = '

You can clean your <head> tag.

'; $_h .= $this->_cb('_hrsd_','Hide RSD Links'); $_h .= $this->_cb('_hwlm_','Hide WLW Manifest Links'); $_h .= $this->_cb('_hwpg_','Hide WordPress Generator'); $_h .= $this->_cb('_hir_','Hide Index Relation Links'); $_h .= $this->_cb('_hsr_','Hide Start Relation Links'); $_h .= $this->_cb('_hpnp_','Hide Previous/Next Post Links'); $_h .= $this->_cb('_hsl_','Hide Shortlink for posts'); $_h .= $this->_cb('_hfl_','Hide RSS Links'); $this->_cpb('_g_chp','Clean <head> Section',$_h); $this->_sbc('Head Tag Cleaning'); } function _g_wbp(){ $this->_stc('Webmaster Tools', false, true, 'au_seo_global_options_w', 'au_seo_w'); $_h = '

Enter verification codes from different webmaster tools.

'; $_h .= $this->_ti('_gv_', 'Google Webmaster Tools'); $_h .= $this->_ti('_yv_','Yahoo! Site Explorer'); $_h .= $this->_ti('_bv_','Bing Webmaster Tools'); $this->_cpb('_wbt_','Webmaster Tools',$_h); $this->_sbc('Webmaster Tool'); } function _g_fdp() { $_os = _gso(); $this->_stc('RSS Settings', false, true, 'au_seo_global_options_f', 'au_seo_f'); $_h = $this->_cb('_cmf_','noindex comments RSS Feed'); $_h .= $this->_cb('_alf_','noindex All RSS feeds'); $_h .= $this->_cb('_pif_','Ping Search Engines with feed on new post'); $this->_cpb('_g_fdp_1','RSS Feed Settings',$_h); $_h = '

'."You can put custom html into your feed such as your blog links to let search engines identify the original source of the contents in case someone steals your content by coping and pasting your feed into their blog or website".'

'; $_r = array(); $_rbf = ''; if(isset($_os['_rbf_'])) $_rbf = stripslashes(htmlentities($_os['_rbf_'])); $_raf = ''; if(isset($_os['_raf_'])) $_raf = stripslashes(htmlentities($_os['_raf_'])); $_r[] = array( "_i" => "_rbf_", "_l" => "Contents before post in the feed", "_d" => "(HTML allowed)", "_c" => '', ); $_r[] = array( "_i" => "_raf_", "_l" => "Contents after post in the feed", "_d" => "(HTML allowed)", "_c" => '', ); $_r[] = array( "_l" => 'Help', "_c" => '

Use the following variables within the content, to replace with original values:

'. '' ); $this->_cpb('_g_fdp_2','Custom Contents in the RSS Feed',$_h.$this->_ft($_r)); $this->_sbc('RSS'); } function _g_cip(){ $this->_stc('Custom Code Inserter', true, true, 'au_seo_global_options_c', 'au_seo_c'); $_h = $this->_ta('_htc_','<head> Tag'); $_h .= '

Enter the code you want to insert into the <head> tag.

'; $_h .= $this->_ta('_bitc_','Before Item\'s Contents'); $_h .= '

Enter the code you want to insert before any item\'s contents.

'; $_h .= $this->_ta('_aitc_','After Item\'s Contents'); $_h .= '

Enter the code you want to insert after any item\'s contents.

'; $_h .= $this->_ta('_ftc_','Before </body> Tag (Footer)'); $_h .= '

Enter the code you want to insert in the footer before </body> tag.

'; $this->_cpb('_g_cip','Custom Code Inserter',$_h); $this->_sbc('Custom Code'); } function _g_pap(){ } function _g_fep(){ $this->_stc('File Editor', true, true, 'au_seo_global_options_e', 'au_seo_e'); $_h = '

Note:
Editing the robots.txt file incorrectly can block search engines from your site. Also incorrectly edited .htaccess file will disable your entire website. DON\'T EDIT IF YOU ARE NOT FAMILIAR WITH THESE FILES.

'; $_h .= $this->_fe('_hrw_','.htaccess','.htaccess'); $_h .= $this->_fe('_rbt_','robots.txt','robots.txt'); $this->_cpb('_g_fep','File Editor',$_h); $this->_sbc('.htaccess & robots.txt file',true,true); } function _g_bkp(){ $this->_stc('Backup/Restore Settings', false, false); $_h .= 'Backup
'; $_h .= '
'; $_h .= '

Backup your Alquemie SEO settings.

'; $_h .= ''; $_h .= '
'; if ( isset($_POST['au_seo_exp']) ) { $_itm_ = false; $_u = _exps(); if($_u){ $_h .= ''; }else{ $_h .= 'An Error Occured: '.$_u; } } $_h .= '

Restore
'; if(!isset($_FILES['_sif_']) || empty($_FILES['_sif_']) ) { $_h .= '

Restore by locating b2seo.zip and clicking Restore settings:

'; $_h .= '
'; $_h .= ''; $_h .= ''; $_h .= ''; $_h .= '
'; } else { $_f = wp_handle_upload($_FILES['_sif_']); if(isset($_f['file'] ) && !is_wp_error($_f)){ require_once (ABSPATH . 'wp-admin/includes/class-pclzip.php'); $_z = new PclZip($_f['file']); $_uz = $_z->extract(PCLZIP_OPT_PATH,'restore'); if($_uz[0]['stored_filename'] == 'b2seo.ini'){ if(file_exists($_uz[0]['filename'])){ $_ss = parse_ini_file($_uz[0]['filename'], true); foreach($_ss as $_k => $_v) { if($_k != 'au_seo_m') { update_option($_k, $_v); } else { update_option($_k, json_decode(urldecode($_v['au_seo_m']), true)); } } $_h .= '

Restored successfully.

'; }else{ $_h .= "

File: " . $_uz[0]['filename'] . " doesn't exist"; } } else { $_h .= '

Error occured while restoring. Please try again later.

'; } } else { if(is_wp_error($_f)) $_h .= '

Restore failed: '.$_f['error'].'

'; else $_h .= '

Restore failed: Can\'t upload

'; } } $this->_cpb('_g_bkp','File Editor',$_h); $this->_sbc('Backup/Restore',false); } function _g_gup($_u){ if(!current_user_can('edit_users')) return; $_os = _gso(); ?>

Alquemie SEO settings

Author Page Title
Meta description for Author page
Author Meta Keywords