public static function ShareaholicUtilities::get_default_rec_on_locations in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3
Same name and namespace in other branches
- 8 utilities.php \ShareaholicUtilities::get_default_rec_on_locations()
Get recommendations locations that should be turned on by default
Return value
{Array}
2 calls to ShareaholicUtilities::get_default_rec_on_locations()
- ShareaholicUtilities::get_or_create_api_key in ./
utilities.php - Returns the api key or creates a new one.
- ShareaholicUtilities::set_default_location_settings in ./
utilities.php - Given an object, set the default on/off locations for share buttons and recommendations
File
- ./
utilities.php, line 297
Class
Code
public static function get_default_rec_on_locations() {
$page_types = self::page_types();
$turned_on_recommendations_locations = array();
foreach ($page_types as $key => $page_type) {
$page_type_name = $page_type->type;
if ($page_type_name === 'article' || $page_type_name === 'page') {
$turned_on_recommendations_locations[] = array(
'name' => $page_type_name . '_below_content',
);
}
}
return $turned_on_recommendations_locations;
}