* @license GNU General Public License, version 2 * @link http://addthis.com AddThis website */ class AddThisRecommendedContentFeature extends AddThisFeature { //addthis_follow_settings, widget_addthis-follow-widget, addthis_settings protected $oldConfigVariableName = 'addthis_settings'; protected $settingsVariableName = 'addthis_recommended_content_settings'; protected $settingsPageId = 'addthis_recommended_content'; protected $name = 'Related Content'; protected $RecommendedContentHorizontalToolObject = null; protected $RecommendedContentVerticalToolObject = null; protected $RecommendedContentDrawerToolObject = null; protected $RecommendedContentFooterToolObject = null; protected $RecommendedContentJumboFooterToolObject = null; protected $RecommendedContentToasterToolObject = null; protected $RecommendedContentWhatsNextMobileToolObject = null; protected $RecommendedContentWhatsNextToolObject = null; protected $filterPriority = 2; protected $filterNamePrefix = 'addthis_recommended_content_'; protected $enableBelowContent = true; // a list of all settings fields used for this feature that aren't tool // specific protected $settingsFields = array( 'quick_tag', 'startUpgradeAt', ); // used for temporary compatability with the Sharing Buttons plugin public $globalLayersJsonField = 'addthis_layers_recommended_json'; public $globalEnabledField = 'recommended_content_feature_enabled'; // require the files with the tool and widget classes at the top of this // file for each tool protected $tools = array( 'RecommendedContentHorizontal', 'RecommendedContentVertical', 'RecommendedContentDrawer', 'RecommendedContentFooter', 'RecommendedContentJumboFooter', 'RecommendedContentToaster', 'RecommendedContentWhatsNextMobile', 'RecommendedContentWhatsNext', ); protected $quickTagId = 'addthis_recommend'; /** * Review https://codex.wordpress.org/Quicktags_API for access keys used * by WordPress */ protected $quickTagAccessKey = 'z'; /** * Builds the class used for recommended content below content on posts. * * @param string $location Is this for a sharing button above or below * content/excerpts? * @param array $track Optional. Used by reference. If the * filter changes the value in any way the filter's name will be pushed * * @return string a class */ public function getClassForTypeAndLocation( $location = 'above', &$track = false ) { $pageTypeClean = AddThisTool::currentTemplateType(); if ($pageTypeClean == 'posts') { $toolClass = 'at-below-post-recommended'; } else { $toolClass = false; } $toolClass = $this->applyToolClassFilters($toolClass, $location, $track); return $toolClass; } } }