function twitter_profile_widget_help in Twitter Profile Widget 8.2
Same name and namespace in other branches
- 8 twitter_profile_widget.module \twitter_profile_widget_help()
- 6 twitter_profile_widget.module \twitter_profile_widget_help()
- 7 twitter_profile_widget.module \twitter_profile_widget_help()
- 3.x twitter_profile_widget.module \twitter_profile_widget_help()
Implements hook_help().
File
- ./
twitter_profile_widget.module, line 16 - Contains twitter_profile_widget.module.
Code
function twitter_profile_widget_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the twitter_profile_widget module.
case 'help.page.twitter_profile_widget':
$output = '';
$output .= '<h3>' . t('Installation') . '</h3>';
$output .= '<p>' . t('<ol><li>Install as you would normally install a contributed drupal module. See the <a href=":docs">documentation</a> for further information.</li><li>Go to Manage > Extend, and enable the Twitter Profile Widget module (drush en twitter_profile_widget).</li></ol>', [
':docs' => 'https://www.drupal.org/documentation/install/modules-themes/modules-8',
]) . '</p>';
$output .= '<h3>' . t('Configuration') . '</h3>';
$output .= '<p>' . t('<ol><li>You first need a Twitter App. This is different from the Twitter widget ID, and allows you to connect to the Twitter API. To get a Twitter App, sign in to Twitter and go to <a href=":twitter">https://apps.twitter.com/</a>. Copy the "key" and "secret" associated with your new app.</li><li>After installing the module in Drupal, go to Configuration > Media > Twitter Widgets (<a href=":config">/admin/config/media/twitter_profile_widget</a>). Enter the Twitter App key and secret you created in step 1.</li><li>Go to Strucure > Block Layout > Custom Block Library (<a href=":widgets">/admin/structure/block/block-content</a>) and create one or more widgets. The "description" is internal, to identify different widgets.</li></ol>', [
':config' => '/admin/config/media/twitter_profile_widget',
':blocks' => '/admin/structure/block/block-content',
':twitter' => 'https://apps.twitter.com/',
]) . '</p>';
$output .= '<h3>' . t('Theming') . '</h3>';
$output .= '<p>' . t("By design, the display of tweets provided by this module is minimal. Developers can copy the twitter_widget.html.twig file from the /templates directory and add it to their theme and customize as necessary. To remove the CSS provided by this module, remove the <code>{{ attach_library('twitter_profile_widget/twitter-profile-widget') }}</code> from the twig file, or point it to your own defined library.") . '</p>';
return $output;
default:
}
}