=== AutoDescription ===
Contributors: Cybr
Tags: seo, description, title, og, type, meta, ogtype, multisite, search, engine, optimization, local, manual, canonical, rel, options, domain, mapping, genesis, robots, nofollow, noindex, noarchive, noodp, noydir, redirect, icon, facebook, twitter, author, article, taxonomy, rtl, screenreader
Requires at least: 3.6.0
Tested up to: 4.3.1
Stable tag: 2.2.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

AutoDescription makes sure your SEO is always up-to-date without any configuration needed. It's based upon the Genesis SEO.

== Description ==

= AutoDescription =

**The all in one automatic SEO optimization plugin for WordPress**

**This plugin has just received a huge update, go check it out!**
Now this plugin not only makes sure Google, Bing, DuckDuckGo and other search engines will find your site attractive, but also people will find that through Facebook and Twitter!

**This plugin automatically generates:**

* Description
* Title
* og:image, including the new WP 4.3 Site Icon
* og:locale
* og:type
* og:title
* og:description, the description
* og:url, the real page url
* og:site_name, the site name
* canonical, with full WPMUdev Domain Mapping and HTTPS support
* ld+json, extended search support for Google Search and Chrome
* And various Facebook and Twitter meta tags

**This plugin allows you to manually set these values for each post, page and taxonomy:**

* Title
* Description
* Canonical
* Robots (nofollow,noindex,noarchive,noodp,noydir)
* Redirect, with MultiSite spam filter
* Local search widget settings

**This plugin allows you to adjust various site settings:**

* Document Title Seperator
* Document Title Additions Location
* Robots for Archives
* Robots for the whole site
* Home Page Description, Title and various other options
* Facebook Social integration
* Twitter Social integration
* Open Graph meta output
* Shortlink tag output
* Google/Bing Webmaster verification

**This plugin helps you to create better content, at a glance. By showing you:**

* if the title is too long, too short or automatically generated
* if the description is too long, too short or automatically generated
* if the description uses some words too often
* if the pages are indexed
* if the page is indexed, redirected and/or archived
* if your blog is public
**Check out the screenshots to see how it helps you!**

> <strong>Written for MultiSite & Single site</strong><br />
> This plugin has been primarily written for WordPress Multisite with a WordPress.com like environment in mind.
>
> This means that this plugin is fully compatible with the [Domain Mapping plugin by WPMUdev](https://premium.wpmudev.org/project/domain-mapping/) to **prevent canonical errors**.
>
> This also means that it's completely ad-free and has an WordPress integrated clean layout.
>
> No initial configuration is needed. Either Network Activate this or use it on a single site.
>
> It takes a lot of time to pin down every aspect of SEO optimization so expect this plugin to be updated regularly with new features. The basics are already covered extensively and better than ever.

= Caching =

This plugin's code is optimized on server-level and uses object caching. This means that there's little extra page load time from this plugin, even with more meta tags used.
This plugin can however be heavy on extremely large pages (with book-like content). Therefor *a caching plugin with object cache is advised*.

**If you use object caching:**
The output will be stored for each page, if you've edited a page the meta will stay the same until the object cache expires. So be sure to clear your object cache or wait until it expires.

= Other notes =

*This plugin copies data from the Genesis SEO meta, this means that when you use Genesis, you can easily upgrade to this plugin without editing each page!*

*The Automatic Description Generation will work with any installation. But it will exclude shortcodes. This means that if you use shortcodes or a page builder, be sure to enter your custom description!*

> <strong>Check out the "Other Notes" tab for advanced features</strong>

= Translating =

This plugin is fully translated to Dutch. If you wish to submit a translation, please contact me at the [CyberWire contact page](https://cyberwire.nl/contact/).

== Installation ==

1. Install AutoDescription either via the WordPress.org plugin directory, or by uploading the files to your server.
1. Either Network Activate this plugin or activate it on a single site.
1. That's it!
1. Let the plugin automatically work or fine-tune each page with the meta boxes beneath the content or on the taxonomy pages.

== Screenshots ==
1. This plugin shows you what you can improve, at a glance. Try to aim for all green!
2. Hover over any of the SEO bar's color to see how you can improve the page's SEO.
3. The Post/Page SEO settings box. This box is also neatly implemented in Categories and Tags.

== Changelog ==

= 2.2.4 - Explanatory Webmaster =
**Now I've laid out an SEO Framework, it's easier to add new features:**

* Added: Webmaster Metabox with Webmaster verification tools (Google, Bing).
* Added: The Bing and Google Webmaster Verification instructional pages are also integrated with WPMUdev's Domain Mapping.
* Added: Check for Inpost Home Page Settings to be filled in to eliminate confusion.
* Added: Home Page Robots Meta Settings warning message if they're checked within the Page SEO Settings.
* Added: NoIndex options for every second or later page of an archive. This option is enabled by default.
* Added: Tabbed interface for Robots Meta Settings for a cleaner look. The Tabbed interface will be layered beneath each other when using Screen Readers (no Javascript).
* Added: Options to enable the article:published_time and article:modified_time for Pages and Posts. These options are also moved to General Social Meta Settings and the Posts are enabled by default.
* Added: Options to add Link Relations SEO support, with Domain Mapping integration by WPMUdev. Use '<!--nextpage-->' in your content to add more pages.
* Added: Dynamic Javascript helper for Home Page Settings box so you can see what you've changed.
* Added: Dynamic Javascript helper for HomePage/Post/Page/Tax/Terms Title Length so you can see what the real title length is including the blog Title or Tagline.
* Added: Extra information on the SEO settings to help you make the right decisions.
* Added: Removal of now unused Genesis Settings (Genesis 2.0 and 2.2).
* Added: Extended support for shortlinks in taxonomies and terms.
* Added: Google Help Page information links in the Home Page Settings.
* Added: Warning message if you leave the SEO page with unsaved changed options.
* Added: Trimming of spaces on Title and Description on the beginning and the end in the Custom Post/Page Title and Description.
* Added: New Filters, see "Other Notes"
* Added: Another layer of PHP level cache, now in theme check, also reducing memory usage.
* Added: Title Placeholders for when title is emptied.
* Added: Visibility of Title/Desription characters used even when Javascript is disabled, because a save would change the value anyway.
* Updated: Changed the Robots settings to be within tabs.
* Updated: Textual changes. Mainly removing the ':' symbol above every options for a cleaner look.
* Updated: Dutch Translations, removed typos/double strings, changed D(escription) to B(eschrijving), etc..
* Changed: Made the Site SEO Options' meta boxes smaller so it's easier to read.
* Optimized: Javascript's performance + styling (it's now like how jQuery does it).
* Removed: Deprecated filter hmpl_ad_load_logged_out_only doesn't throw a deprecation warning anymore and had no use anymore since 2.1.5.
* Fixed: Initial Character Count after save to comply with the real output.
* Fixed: Typo's.
* Fixed: This plugin now better handles the default Permalink Structure (although it's not recommended).
* Fixed: Duplicate of robots output when blog isn't set to public (since 2.2.2).
* Fixed: Added back the accidental removal of the Home Page InPost Title.
* Fixed: Home Page Settings title additions example to be like the example.
* Fixed: Unlikely PHP Notice when using WPMUdev Avatars.
* Fixed: PHP Notice when fetching image.
* Fixed: Made sure the output of Publishing Time is always output (when enabled and available).
* Fixed: Unlikely, the Title Example in the SEO Title Settings could be empty (due to SQL error bound with Opcache) and cause confusion. The query for the most recent post has been cached and improved. If it's not found it will show 'Example Post Title'.
* Cleaned up and optimized code.
* Developers notice: I moved around a few functions through classes to maintain readability of the code (It's over 7000 lines of PHP now with 138 functions). This plugin should be extended upon the AutoDescription_Load Class, which calls the parent classes' objects.
* Other: This plugin will soon obtain a new name (which it actually needed after update 1.1.0, because it does so much more now than only "AutoDescription").

= 2.2.3 - Oopsie =
* Fixed: This Readme.
* Fixed: The Facebook article:published_time and article:modified_time output.

= 2.2.2 - Collective Social Autocracy =
* Added: Site SEO option pages! You can now customize this plugin without touching the code, These include:
 * Title Settings:
  * Select your Document Title seperator
  * Select your Document Title additions location
 * Robots Settings:
  * NoIndex per Archive or Site
  * NoFollow per Archive or Site
  * NoArchive per Archive or Site
 * Seperated Home Page options:
  * Also Includes Document Title additions location
 * Social Settings:
  * Shortlink output
  * Open Graph output
  * Facebook, various settings for Businesses
  * Twitter, various settings for Twitter Card
* Added: Genesis-like layout for SEO option pages (metabox layout). Something familiar, clean and you can organize it through the Screen Options and by moving the boxes with your mouse.
* Added: New filters, see other notes.
* Added: Screen-reader improvements. More to come (with focus on the SEO bar) in future updates.
* Added: Better metabox tablet/mobile support.
* Added: RTL support.
* Added: Minified wp-admin AutoDescription CSS and JS files.
* Updated: Language files.
* Updated: AutoDescription API, see Other Notes.
* Fixed: og:image site icon can now fetch on later versions than WordPress 4.3.0.
* Fixed: Unlikely bug in redirect URL.
* Fixed: hmpl_ad_load filter. It now works as intended.
* Fixed: Various Javascript bugs
* Removed: Genesis meta robots support in favor for our own.
* **Note: If you use Genesis and you've adjusted any SEO settings in the Genesis SEO page, please revise them through the new menu this plugin provides. This update doesn't remove the Genesis options.**
* Renamed: PHP Constants. See autodescription.php or the Other Notes tab if you were to have changed them.
* Polished code, a lot. Because of atom.io I had to remove rogue tabs (almost everywhere).
* Optimized code.
* Added: PHP level cache - frequently used code is put in static variables, this means for example that content heavy pages with automated descriptions load much faster.
* Note to developers: If you've extended the plugin through your functions.php or another plugin, please take a look at the new class and functions structure before upgrading. Filters are unchanged.

= 2.2.1 - Iconize =
* Added: WordPress 4.3 Site Icon as og:image if no other images are found. Called before header and WPMUdev's site avatar image.
* Added: Automatic post/page featured image og:image resizing if it exceeds 1500px and called. The featured image is untouched and the new image gets fetched directly.
* Removed: NoIndex and Redirect Post State since it's in the SEO bar.
* Added: Search Excluded Post State.
* Fixed: Text area width in page/post edit screens now correctly align with other elements.
* Fixed: Redirect URL was wrongly parsed after second save. (oops!)
* Fixed: CSS SEO bar layout clip on Edge / Internet Explorer.
* Fixed: CSS Bug in Chrome/Safari caused by the Edge / Internet Explorer bugfix above. Thanks Microsoft :), that took me 24 minutes.
* Added: Magically a filter appeared with the bug fix above, make the bar square or curved! See other notes on the how-to.
* Fixed: Frontpage SEO title placeholder in the admin area.
* Fixed: Frontpage SEO title length in the SEO bar.
* Fixed: bool to string conversion in filters.
* Fixed: Dutch translation typos.
* Cleaned up code. So much code is shining now.

= 2.2.0 - Visually Etymological =
* Changed: Limited the max-width of the SEO bar to 300px so it's less overwhelming.
* Fixed: Other CSS Markup for the SEO Bar. Also changed to a "help" cursor instead of a pointer.
* Cleaned up PHP, specifically i18n.
* Changed some keywords in the language.
* Updated Dutch language.
* Fixed: Auto Generated character count in taxonomies for titles and descriptions.
* Fixed: Auto Generated Taxonomy title and description placeholder in admin area.
* Added: Auto Generated recurring word count.
* Important fix: Caching mistake made in 2.1.9 because of fetching the wrong ID. This means that all pages, tags and posts got the same automatically generated description if you use Object Cache.

= 2.1.9 - Doing it Right =
* Added: SEO status column on the post/page/category/tags page to help you create better SEO.
* Added: Description object cache.
* Added: Title, Description and Canonical placeholders to indicate what SearchEngines see if they're empty.
* Changed: Autodescription is less likely to exceed 165 character length now.
* Changed: AutoDescription seperator from '-' to '|'. Because if you use a - in Google search it will remove the next word.
* Updated: Admin javascript has been put on every admin page for compatibility.
* Added: New filters, see other notes.
* Added short milestone summary titles to this changelog, gimmick.
* Removed: Link type SEO support, because of redundancy.

= 2.1.8 - Taxonomies =
* Big update! Another leap forward to the all-in-one solution.
* Added: AutoDescription SEO settings on taxonomies (category, tags) (copies previous data from Genesis if present).
* Removed: Genesis SEO settings on taxonomies (category, tags)
* Added: Hidden option to flag an updated post/page/tax to use new values. This prevents Genesis fallback output if you have deleted the input.
* Changed: Title seperator from - to |.
* Changed: Switched the title and made the third parameter operable.
* Changed: Title on the front page is reversed. So it's "blogname (seperator) tagline".
* Updated: Dutch Translations.
* Fixed: Now detects Genesis if no child theme is used.
* Fixed: PHP warnings from 2.1.7
* Fixed: PHP notices/warnings on 404 pages.
* Cleaned up code.
* Added: New filters, see "Other Notes".
* Updated: Made a lot of functions more robust and forgiving.

= 2.1.7 - Local Search =
* Added: Option to exclude pages from local on-site search (great for e.g. payment pages or special templates)
* Cleaned up code.

= 2.1.6 - Objects =
* Updated: Completely rewritten
* Unchanged: Filters are kept the same
* Deprecated: All functions but one
* Fixed: PHP Notices
* Removed: Default screen setting for SEO meta box
* Updated: Gave meta tags output a higher priority on non-genesis themes
* Updated: Plugin now uses objects
* Updated: Plugin is 5% faster on PHP5.6 and 30% faster on PHP7
* Updated: Translations

= 2.1.5 - PHP7 =
* Removed: Object Cache bias
* Deprecated: hmpl_ad_load_logged_out_only filter
* Compatibility: PHP7 and WP 4.3 verified

= 2.1.4 - Search title =
* Added search title

= 2.1.3 - Nginx =
* Fixed fatal error caused by undefined function caused in some server configurations

= 2.1.2 - Hide =
* Changed the SEO metabox ID
* Set the SEO metabox to be closed by default for a cleaner look.

= 2.1.1a - XSS =
* Escaped output URL in og:image left out in 2.1.1

= 2.1.1 - Image =
* Pushed the meta tags higher up in the wp_head
* Added WPMUdev's Avatars 'blog avatar' og:image support
* Forced og:image to always output even if the URL is empty for better syntax.
* Other minor improvements

= 2.1.0a - % s =
* Fixed translation

= 2.1.0 - Post States =
* Added a "redirected" post state on edit.php (all posts/all pages admin screen)
* Added a "noindex" post state on edit.php
* Optimized code and filters
* Added more specific post/page sentences for the meta boxes
* Added 404 title
* Updated translation files

= 2.0.9 - Redirect =
* Added a custom 301 redirect URL option field on each page/post. This url accepts no query args by default, but can be activated through a filter. Read "other notes" for more information.
* Cleaned up HTML code in Post/Page edit screen
* Changed the explanation URL's in Post/Page edit screens so they can be easily translated (using Google Search Console help pages)
* Updated translations for Dutch

= 2.0.8 - // =
* Fixed double slash in javascript file call on edit pages

= 2.0.7 - Tagline =
* Removed title tag seperator when blog tagline is missing

= 2.0.6 - og:url =
* Changed og:url output to match canonical output to comply with Facebook standards

= 2.0.5 - og:image =
* Added featured image to og:image (if set)
* Added expanded filter to og:image, read "other notes" for more information
* Fixed all PHP warnings
* Added filter for title seperator (hmpl_ad_title_seperator)

= 2.0.4 - Canonical =
* Fixed Domain Mapping Canonical URL
* Fixed Canonical URL scheme

= 2.0.3 - Title =
* Applied the title output to the Title tag
* Cleaned up code
* Various bugfixes
* Added Dutch translation

= 2.0.2 - Return void =
* Fixed Javascript bug

= 2.0.1 - Generator =
* Fixed bug where Genesis robots & canonical was still being shown
* Made robots output more reliable
* Renamed functions for more consistent plugin recognition
* Improved performance on search and 404 pages by removing some meta
* Added filter to og:image
* Added generator tag with filter, if not used no generator tag will be displayed
* Added filter for before and after output
* The filters can be found under "Other notes" in this plugin's page.
* Added filterable indicators in html code to show where the output starts and ends
* More than 1337 lines :(

= 2.0.0 - 1337 DIY =
* This update is so big, it needs a new number :)
* Added Canonical URL tag with WPMUdev's Domain Mapping support
* Added per page/post options within a meta box beneath the content
 * Add your own SEO meta title
 * Add your own SEO meta description
 * Add your own Canonical URL
 * Disallow indexing by search engines (noindex)
 * Disallow archiving by search engines (noarchive)
 * Disallow link tracking on urls by search engines (nofollow)
 * All these settings are merged with Genesis' and will be overwritten on save
* Each page now has noopd and noydir by default if you're not using Genesis for better SEO consistency
* More filters
* Bugfixes
* Exactly 1337 lines of glory :)

= 1.3.0 - Plugin Detection =
* Added SEO plugin detection (mainly WordPress SEO by Yoast)
* Moved LD+Json script to header, replaced json_encoding with esc_url on urls
* Broadened CDN support
* Broadened support for odd server configurations and older WP versions
* Removed og:image if no header image is found
* Cleaned up code

= 1.2.0 - LD+Json =
* Added language file, English and Dutch are now supported
* Now uses object caching
* Added LD+Json SearchAction scheme
* Added filter hmpl_ad_load_logged_out_only (true/false)
* Now shows output when user's logged in when object caching is available, else only if logged out.

= 1.1.0 - og:type =
* Added dynamic og:type
* Cleaned up PHP notices
* Bugfixes

= 1.0.1 - Exclusion =
* Added filter hmpl_ad_load (return false to disable the plugin output)

= 1.0.0 - AutoDescription =
* Initial Release

== Other Notes ==

> This plugin uses a lot of filters which will slowly but surely be converted into admin pages in the near future.
> This plugin does not yet have robots.txt or sitemap.xml support. Be sure to get those elsewhere for now.
> The moment this plugin will support those features, I'll make sure it's done right.

== Filters ==

= Add any of these filters to your theme's functions.php or a plugin to change this plugin's output. =
These filters are ordered by release version.

= Since 1.0.1 =

***Disable the plugin for a theme or page:***
`add_action( 'plugins_loaded', 'my_autodescription_disable', 4);
function my_autodescription_disable() {
    add_filter('hmpl_ad_load', '__return_false');
}`

= Since 1.2.0 =

***Only allow this plugin to output if the user isn't logged in: (removed)***
`add_filter('hmpl_ad_load_logged_out_only', '__return_true');`

***Always output meta data, regardless of caching of user log in: (removed)***
`add_filter('hmpl_ad_load_logged_out_only', '__return_false');`

= Since 2.0.0 =

***Disable meta boxes in post/page edit screen:***
`add_filter( 'hmpl_ad_seobox', '__return_false' );`

***Disable plugin usage indicator in HTML output:***
`add_filter( 'hmpl_ad_indicator', '__return_false' );`

***Add custom meta before the output, example:***
`add_filter('hmpl_ad_pre', 'my_before_autodescription' );
function my_before_autodescription() {

	//* Add prefetching
	$prefetch 	= 	'<link rel="dns-prefetch" href="//fonts.googleapis.com/">' . "\r\n"
				.	'<link rel="dns-prefetch" href="//fonts.gstatic.com/">' . "\r\n"
				;

	//* Add mobile scaling viewport
	$viewport 	= '<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=no" />' . "\r\n";

	//* Add the two together in another variable
	$output = $prefetch . $viewport;

	//* Return the output
	return $output;
}`

***Add custom meta after the output, example:***
`add_filter('hmpl_ad_pro', 'my_after_autodescription' );
function my_after_autodescription() {

	//* Add your app icons for apple and Windows (Phone) 8, don't forget to escape the urls!
	$appicons 	= '<link rel="icon" type="image/x-icon" href="' .  esc_url(home_url( '/path/to/favicon.ico' ) ) . '" sizes="16x16">' . "\r\n"
				. '<link rel="apple-touch-icon-precomposed" href="' .  esc_url(home_url( '/path/to/yourimage152px.png' ) ) . '" />' . "\r\n"
				. '<meta name="msapplication-TileImage" content="' .  esc_url(home_url( '/path/to/yourimage144px.png' ) ) .'" />' . "\r\n"
				. '<meta name="msapplication-TileColor" content="#f1f1f1" />' . "\r\n"
				;

	return $appicons;
}`

= Since 2.0.1 =

***Add custom og image, example (deprecated, use hmpl_og_image_args ):***
`add_filter('hmpl_og_image', 'my_og_image' );
function my_og_image() {

	//* You don't have to escape this url :)
	$output = home_url( '/path/to/yourimage200px.jpg' );

	return $output;
}`

***Add custom og image arguments, example:***
`add_filter('hmpl_og_image_args', 'my_awesome_og_image' );
function my_awesome_og_image() {

	//* You don't have to escape this url :)
	$args['image'] = home_url( '/path/to/yourimage200_to_1500px.jpg' );

	//* Set this to true if you don't want featured images to be used in og:image
	//* args['image'] has to be set for this to work
	$args['override'] = false;

	//* Set this to false if you wish that the homepage featured image overrides the URL set above
	$args['frontpage'] = true;

	return $args;
}`

***Add custom generator tag, example:***
`add_filter('hmpl_ad_generator', 'my_custom_generator' );
function my_custom_generator() {

	$output = 'MyAwesomeCompany';

	return $output;

}`

= Since 2.0.5 =

***Change Title Seperator***
`add_filter( 'hmpl_ad_title_seperator', 'my_custom_seperator' );
function my_custom_seperator() {
	// Spaces are already added.
	$sep = '-';

	//or
	$sep = '|';

	//or
	$sep = 'on';

	return $sep;
}`

= Since 2.1.0 =

***Allow only local links for custom 301 url (requires WP 4.1.0 and up for best results):***
`add_filter('hmpl_ad_301_external', '__return_false' );`

***Allow query string parameters in custom 301 redirect url:***
`add_filter('hmpl_ad_301_noqueries', '__return_false' );`

***Disallow the appearance of SEO states in the edit.php screen:***
`add_filter('hmpl_ad_states', '__return_false' );`

= Since 2.1.8 =

***Overwrite default taxonomy meta***
`add_filter('autodescription_term_meta_defaults', 'my_term_meta_defaults' );

function my_term_meta_defaults( $args = array() ){
	$args['doctitle'] = 'My Awesome Website'; // Default empty and falls back to "autodescription"
	$args['description'] = 'Some description'; // Default empty and falls back to "autodescription"

	$args['noindex'] = 1; // Default 0
	$args['nofollow'] = 1; // Default 0
	$args['noarchive'] = 1; // Default 0

	return $args;
}`

***Term Sanitation: Very advanced & untested***
`add_filter( 'get_term', 'my_special_term_filter' );
function my_special_term_filter( $term, $taxonomy ) {

	$db = get_option( 'autodescription-term-meta' );
	$term_meta = isset( $db[$term->term_id] ) ? $db[$term->term_id] : array();

	$term->admeta = wp_parse_args($term_meta, apply_filters( 'autodescription_term_meta_defaults', array(
			'doctitle'            => '',
			'description'         => '',
			'noindex'             => 0,
			'nofollow'            => 0,
			'noarchive'           => 0,
		) ) );

	//* Sanitize term meta
	foreach ( $term->admeta as $field => $value )
		add_filter( "autodescription_term_meta_{$field}", 'my_super_special_term_sanitation', $value, $term, $taxonomy );
}

function my_super_special_term_sanitation( $value, $term, $taxonomy ) {
	$value = stripslashes( wp_kses_decode_entities( $value ) );
	return $value;
}`

***Overwrite term meta, untested***
`// This example overwrites term meta on taxonomy pages

add_action( 'init', 'my_init');
function my_init() {
	if ( is_tax() )
		add_filter( 'autodescription_term_meta', 'my_overwrite_term_meta' );
}

function my_overwrite_term_meta( $term ) {
	$terms = $term->admeta

	$terms['doctitle'] = 'Always use this title';
//  $terms['description'] = 'I\'ve commented this out so it\'s back to default';
	$terms['nofollow'] = 1; // I don't want links to be followed here.

	return $terms;
}`


***Put the blog description before the title on front page***
`add_filter( 'hmpl_ad_title_seperator_front', 'my_title_seplocation_frontpage' );

function my_title_seplocation_frontpage() {
	$location = 'right';

	return $location;
}`

***Put the blog description after the title on any other page***
`add_filter( 'hmpl_ad_title_seperator', 'my_title_seplocation' );

function my_title_seplocation() {
	$location = 'left';

	return $location;
}`

= Since 2.1.9 =

***Disable the SEO columns on the post/page/taxonomy selection screens***
`add_filter( 'hmpl_ad_show_seo_column', '__return_false' );`

***Disable the SEO columns support on specific screens***
`add_filter( 'hmpl_ad_column_support', 'my_custom_column_support' );

function my_custom_column_support() {
	// Comment any of these rows to disable support
	$post_types = array(
		'posts' => 'posts',
		'pages' => 'pages',
		'category' => 'edit-category',
		'post_tag'  => 'edit-post_tag',
	);

	return $post_types;
}`

= Since 2.2.1 =

***Makes the SEO bar square instead of rounded***
**This is beautiful with the dashboard theme delivered by [EM Dashboard](https://wordpress.org/plugins/em-dashboard/)**
`add_filter('hmpl_ad_seo_bar_squared', '__return_true')`

= Since 2.2.2 =

***Disable AutoDescription Site SEO Options***
`add_filter('autodescription_options', '__return_false')`

***Start over by renaming the site option group: ADVANCED & untested***
`add_action( 'admin_init', 'my_new_settings_field_group' );

function my_new_settings_field_group() {
	add_filter( 'autodescription_site_settings', 'my_new_settings_field_group_name' );
}

function my_new_settings_field_group_name() {
	//The new settings name, only visible in database
	$name = 'my-new-site-settings-name';

	return $name;
}`

***Start over by renaming the network option group: ADVANCED & untested***
`add_action( 'admin_init', 'my_new_settings_field_group' );

function my_new_settings_field_group() {
	add_filter( 'autodescription_network_settings', 'my_new_settings_field_group_name' );
}

function my_new_settings_field_group_name() {
	//The new settings name, only visible in database
	$name = 'my-new-network-settings-name';

	return $name;
}`

***Change minimum user role to see and edit the plugin admin pages***
`add_filter( 'autodescription_settings_capability', 'my_autodescription_settings_role' );
function my_autodescription_settings_role() {
	// Default is 'manage_options'
	$role = 'publish_pages';

	return $role;
}`

***Change default site options***
`add_filter( 'autodescription_default_site_options', 'my_ad_default_site_options' );
function my_ad_default_site_options() {
	$options = array(
		'title_seperator'		=> 'pipe',	// Title seperator
		'title_location'		=> 'right',	// Title seperation location

		'noodp'					=> 1, 	// Site noopd robots settings
		'noydir'				=> 1, 	// Site noydir robots settings

		'category_noindex'		=> 0,	// Category Archive robots noindex
		'tag_noindex'			=> 0,	// Tag Archive robots noindex
		'author_noindex'		=> 0,	// Author Archive robots noindex
		'date_noindex'			=> 0,	// Date Archive robots noindex
		'search_noindex'		=> 0,	// Search Page robots noindex
		'site_noindex'			=> 0,	// Site Page robots noindex

		'category_nofollow'		=> 0,	// Category Archive robots nofollow
		'tag_nofollow'			=> 0,	// Tag Archive robots nofollow
		'author_nofollow'		=> 0,	// Author Archive robots nofollow
		'date_nofollow'			=> 0,	// Date Archive robots nofollow
		'search_nofollow'		=> 0,	// Search Page robots nofollow
		'site_nofollow'			=> 0,	// Site Page robots nofollow

		'category_noarchive'	=> 0,	// Category Archive robots noarchive
		'tag_noarchive'			=> 0,	// Tag Archive robots noarchive
		'author_noarchive'		=> 0,	// Author Archive robots noarchive
		'date_noarchive'		=> 0,	// Date Archive robots noarchive
		'search_noarchive'		=> 0,	// Search Page robots noarchive
		'site_noarchive'		=> 0,	// Site Page robots noarchive

		'homepage_noindex'		=> 0,	// Home Page robots noindex
		'homepage_nofollow'		=> 0,	// Home Page robots noarchive
		'homepage_noarchive'	=> 0,	// Home Page robots nofollow

		'homepage_title'		=> '',	// Home Page Title string
		'homepage_tagline'		=> 1,	// Home Page add blog Tagline
		'homepage_description'	=> '',	// Home Page Description string
		'home_title_location'	=> 'left',	// Title seperation location

		'shortlink_tag'			=> 0,	// Adds shortlink tag

		'facebook_publisher'	=> '',	// Facebook Business Url
		'facebook_author'		=> '',	// Facebook User URl
		'facebook_appid'		=> '',	// Facebook App ID

		'twitter_card' 			=> 'summary_large_image',	// Twitter Card layout. If no twitter:image image is found, it'll change to 'summary'
		'twitter_site' 			=> '', 	// Twitter business @username
		'twitter_creator' 		=> '', 	// Twitter user @username

		'og_tags' 				=> 1,	// Output of Open Graph meta tags
		'facebook_tags'			=> 0, 	// Output the Facebook meta tags
		'twitter_tags'			=> 0, 	// Output the Twitter meta tags
	);

	return $options;
}`

***Rename the buttons and notices of the admin pages***
`add_filter( 'autodescription_admin_page_defaults', 'my_autodescription_admin_page_defaults' );
function my_autodescription_admin_page_defaults() {
	$defaults = array (
		'save_button_text'  => 'Save Settings',
		'reset_button_text' => 'Reset Settings',
		'saved_notice_text' => 'Settings saved.',
		'reset_notice_text' => 'Settings reset.',
		'error_notice_text' => 'Error saving settings.',
	);
	return $defaults;
}`

***Add or remove social tabs (untested)***
`add_filter( 'social_settings_tabs', 'my_autodescription_social_tabs' )
function my_autodescription_social_tabs( $tabs ) {

	unset $tabs['twitter']; // remove the Twitter tab

	// Add my_social_network within a class
	$tabs['my_social_network'] = array(
		'name'		=> 'My Sharing Network',
		'callback'	=> array( $this, 'my-network-function'),
		'dashicon'	=> 'share', // may be empty for no icon
	);

	// Add my_social_network from a function
	$tabs['my_social_network'] = array(
		'name'		=> 'My Home Network',
		'callback'	=> 'my-network-function',
		'dashicon'	=> 'admin-home', // may be empty for no icon
	);

	return $tabs;
}`

= Since 2.2.4 =

***Add any of these filters to remove the aptly named meta box***
`add_filter( 'autodescription_title_metabox', '__return_false' );
add_filter( 'autodescription_robots_metabox', '__return_false' );
add_filter( 'autodescription_home_metabox', '__return_false' );
add_filter( 'autodescription_social_metabox', '__return_false' );
add_filter( 'autodescription_webmaster_metabox', '__return_false' );`

== Constants ==

= Overwrite any of these constants in your theme's functions.php or a plugin to change this plugin's output by simply defining the constants. =

> The defaults are shown in the examples below.

***The plugin version***
*Used for CDN busting*
`define( 'AUTOD_PLUGIN_VER', '2.2.2' );`

***The site options***
*See the more reliable filter autodescription_site_settings*
`define( 'AUTODESCRIPTION_SITE_OPTIONS', apply_filters( 'autodescription_site_settings', 'autodescription-site-settings' ) );`

***The network options***
*See the more reliable filter autodescription_network_settings*
`define( 'AUTODESCRIPTION_NETWORK_OPTIONS', apply_filters( 'autodescription_network_settings', 'autodescription-network-settings' ) );`

***The plugin directory URL***
*Used for enqueueing admin css and js files.*
`define( 'AUTODESCRIPTION_DIR_URL', plugin_dir_url( __FILE__ ) );`

***The plugin directory Path***
*No use in overwriting, unless you want to overwrite all plugin classes (why not create a plugin branch?)*
`define( 'AUTODESCRIPTION_DIR_PATH', plugin_dir_path( __FILE__ ) );`

***Enable or Disable minified scripts***
`define( 'SCRIPT_DEBUG', FALSE )`

== Actions ==

= Use any of these actions to add your own output. =

> These actions are used for convenience within the plugin, but can be extended upon your input.

= Since 2.2.2 =

***This action can better be left alone, and is used internally***
`toplevel_page_autodescription_settings`

***These actions are fired before and after each of the site admin meta boxes.***
`autodescription_before_siteadmin_metaboxes`
`autodescription_after_siteadmin_metaboxes`
`autodescription_before_siteadmin_metaboxes_side`
`autodescription_after_siteadmin_metaboxes_side`

== Meta Boxes ==

= This plugin allows you to add more meta boxes to the options pages =

> These functions are untested

= Since 2.2.2 =

***Add metaboxes to the left side of the site SEO settings***
`// Use 'main_extra' to prevent re-ordering confusion. However, 'main' is also accepted as a location
add_meta_box( 'autodescription-my-metabox-id', 'My Settings', 'my_metabox_callback', 'toplevel_page_autodescription_settings', 'main_extra' );
function my_metabox_callback() { // Do stuff here }`
