$value) { $this->{$key} = $value; } $this->label_all_wordpress_plugins = __('All Wordpress plugins by F13Dev.', 'f13-github'); $this->label_api_notice = __('This plugin can be used without an API token, although it is recommended to use one as the number of API calls is quite restrictive without one.', 'f13-github'); $this->label_api_step_1 = __('Log-in to your GitHub account.', 'f13-github'); $this->label_api_step_2 = __('Visit https://github.com/settings/tokens.', 'f13-github'); $this->label_api_step_3 = __('Click the \'Generate new token\' button at the top of the page/', 'f13-github'); $this->label_api_step_4 = __('Re-enter your GitHub password for security.', 'f13-github'); $this->label_api_step_5 = __('Enter a description, such as \'my wordpress site\'.', 'f13-github'); $this->label_api_step_6 = __('Click the \'Generate token\' button at the bottom of the page, no other setting changes are required.', 'f13-github'); $this->label_api_step_7 = __('Copy and paste your new API token. Please note, your access token will only be visible once.', 'f13-github'); $this->label_cache_timeout = __('Cache Timeout (minutes)', 'f13-github'); $this->label_github = __('GitHub', 'f13-github'); $this->label_github_api_token = __('GitHub API Token', 'f13-github'); $this->label_instructions = __('Instructions', 'f13-github'); $this->label_obtain_key = __('To obtain a GitHub API token', 'f13-github'); $this->label_plugins_by_f13 = __('Plugins by F13', 'f13-github'); $this->label_save_changes = __('Save Changes', 'f13-github'); $this->label_widget_user = __('Username for profile widget', 'f13-github'); } public function f13_settings() { $v = '
'; $v .= '

'.$this->label_plugins_by_f13.'

'; foreach ($this->data->results as $item) { $v .= '
'; $v .= '
'; $v .= ''; $v .= '
'; $v .= '

'; $v .= $item->description; $v .= '

'; $v .= '.

'; $v .= ' By Jim Valentine - f13dev'; $v .= '

'; $v .= '
'; $v .= '
'; $v .= '
'; } $v .= '
'; return $v; } public function github_settings() { $v = '
'; $v .= '

F13 GitHub Settings

'; $v .= '

'.$this->label_api_notice.'

'; $v .= '
'; $v .= $this->label_obtain_key.':'; $v .= '
    '; $v .= '
  1. '.$this->label_api_step_1.'
  2. '; $v .= '
  3. '.$this->label_api_step_2.'
  4. '; $v .= '
  5. '.$this->label_api_step_3.'
  6. '; $v .= '
  7. '.$this->label_api_step_4.'
  8. '; $v .= '
  9. '.$this->label_api_step_5.'
  10. '; $v .= '
  11. '.$this->label_api_step_6.'
  12. '; $v .= '
  13. '.$this->label_api_step_7.'
  14. '; $v .= '
'; $v .= '
'; $v .= '
'; $v .= '
'; $v .= ''; $v .= ''; $v .= ''; do_settings_sections( 'f13-github-group' ); $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= ''; $v .= '
'.$this->label_github_api_token.':'; $v .= ''; $v .= '
'.$this->label_cache_timeout.':'; $v .= ''; $v .= '
'.$this->label_widget_user.':'; $v .= ''; $v .= '
'; $v .= '

'; $v .= '
'; $v .= '

'.$this->label_instructions.'

'; $v .= __('Repository shortcode:
[github user=gituser repo=reponame files=none|names|full|compact cache=time_in_minutes]
', 'f13-github').'
'; $v .= __('Gist:
[gist id=gist_id cache=time_in_minutes]
', 'f13-github'); $v .= ''; return $v; } public function widget_settings() { } }