[wordpress插件] DevBuddy Twitter FeedDevBuddy Twitter提要

wordpress 插件 文章 2020-04-16 02:30 480 0 全屏看文

AI助手支持GPT4.0

评分
90
描述

NOTE: This plugin requires your server to have cURL enabled to work.

注意:此插件要求您的服务器启用cURL才能正常工作。

Features:

功能

    • Supports User timelines, Search timelines and Lists
    • 支持用户时间表,搜索时间表和列表

    • Use either a template tag or a shortcode to render feeds
    • 使用模板标签或简码来呈现提要

    • Developers can utilise the plugin system to fully customise the plugin’s functionality
    • 开发人员可以利用插件系统完全自定义插件的功能

    • A default stylesheet is included that you can use either for display or for study when creating your own
    • 其中包含默认样式表,您可以在创建自己的样式表时进行显示或研究

    • Sensitive OAuth and Consumer data is masked within the WordPress admin to prevent unauthorised access to your app data
    • WordPress管理员中掩盖了敏感的OAuth和消费者数据,以防止未经授权访问您的应用程序数据

    • All feeds are cached on first render to reduce subsequent load times, along with the option to choose who many hours the cache lasts
    • 所有提要都缓存在第一个渲染器上,以减少后续的加载时间,并可以选择缓存可以持续几个小时的选项

    • Embed multiple Twitter timelines on one page
    • 在一页上嵌入多个Twitter时间轴

    • Nice and simple settings page, which can also be hidden
    • 简单易用的设置页面,也可以隐藏

    • Perfect for theme developers wanting a truly white label solution
    • 对于想要真正的白标解决方案的主题开发人员来说是完美的

    Before this plugin can be used the end user will need to offer it Consumer and OAuth keys that can be obtained by creating an application at the Twitter developers site.

    在使用此插件之前,最终用户需要向其提供Consumer和OAuth密钥,这些密钥可以通过在Twitter开发人员站点上创建应用程序来获取。

    Further information on this can be found under the “Installation” tab.

    可以在“安装”标签下找到有关此内容的更多信息。

安装步骤

Getting Started

入门

Before this plugin can be used the end user will need to offer it Consumer and OAuth keys that are used to authenticate your communication with Twitter.

在使用此插件之前,最终用户将需要向其提供Consumer和OAuth密钥,这些密钥用于验证您与Twitter的通信。

To obtain these:

要获得这些:

    1. Visit the create application page on the Twitter developers site.

    2. 在Twitter开发人员网站上访问创建应用程序页面

      You may be required to sign in, your usual Twitter.com login credentials will work here.

    3. 您可能需要登录,您通常的Twitter.com登录凭据将在此处运行。

    4. Fill in the necessary details and click the “Create your Twitter application” button at the bottom.

    5. 填写必要的详细信息,然后单击底部的“创建Twitter应用程序”按钮。

      Don’t worry about being creative here, the details you put in won’t be public (unless you make them public, that is).

    6. 不必担心在这里具有创造力,您输入的详细信息不会公开(除非您将其公开)。

    7. If all goes well you’ll be taken to the “Details” tab of the new app.

    8. 如果一切顺利,您将进入新应用的“详细信息”标签。

      Scroll down and look for the “Create my access token” button near the bottom of the page and click on it.

    9. 向下滚动并在页面底部附近找到“创建我的访问令牌”按钮,然后单击它。

    10. Finally, click on the “OAuth Tool” tab.

    11. 最后,单击“ OAuth工具”选项卡。

      This page holds the Consumer Key, Consumer Secret, Access Token, and Access Token Secret necessary for this plugin to function.

      该页面包含此插件起作用所需的使用者密钥,使用者密钥,访问令牌和访问令牌密钥。

      Copy them over into your settings.

    12. 将它们复制到您的设置中。

    Rendering the feed

    呈现提要

    You can use either the:

    您可以使用:

      • template tag, which takes an associative array as its only parameter;

      • <?php db_twitter_feed()?> 模板标签,该模板标签将关联数组作为唯一参数;

        or the

      • [db_twitter_feed] shortcode
      • [db_twitter_feed] 简码

      Both accept the same arguments/attributes which are all listed and explained below.

      两者都接受相同的参数/属性,所有参数/属性均在下面列出并说明。

      All arguments/attributes are optional.

      所有参数/属性都是可选的。

      Options set via tempate tag or shortcode take highest priority.

      通过tempate标签或简码设置的选项具有最高优先级。

      If an option is not set in the tag/shortcode this plugin will then check to see if the option is set in the WordPress admin.

      如果未在标签/短代码中设置选项,则此插件将检查以查看是否在WordPress管理员中设置了该选项。

      If no options have been set the plugin will render with the defaults, listed below

      如果未设置任何选项,则该插件将使用默认值呈现,如下所示

      feed_type (string);

      feed_type(字符串)

      user_timeline, search, list default: user_timeline

      user_timeline search list 默认 user_timeline

      The type of feed that is to be rendered.

      要呈现的提要的类型。

      user_timeline produces a feed based on what is set for the user option, and search produces a feed based on what is set for the

      user_timeline 根据为 user 选项设置的内容生成供稿,而 search 根据为设置的内容生成供稿。

      search_term option, list produces a feed based on what is set for the list option.

      search_term 选项, list 根据为 list 选项设置的内容生成供稿。

      user (string);

      用户(字符串)

      default: twitter

      默认:twitter

      Any valid Twitter username.

      任何有效的Twitter用户名。

      search_term (string);

      search_term(字符串)

      default: #twitter

      默认:#twitter

      The term you wish to search Twitter for, with or without a hashtag.

      您希望在Twitter上搜索的术语,带有或不带有井号。

      list (string);

      列表(字符串)

      default: twitter-ir/twitter

      默认:twitter-ir / twitter

      The slug of a list followed by the username of the owner, separated by a “/”.

      列表的列表,后跟所有者的用户名,并用“ /”分隔。

      count (int);

      计数(整数)

      default: 10

      默认:10

      The number of tweets you want displayed.

      要显示的推文数量。

      The maximum Twitter allows per request is at 200. Page speed can be substantially affected when loading multiple feeds on one page.

      Twitter每次请求允许的最大数量为200。在一页上加载多个提要时,页面速度会受到很大影响。

      exclude_replies (string): yes or no;

      排除_答复(字符串)

      default: no

      默认

      The option of whether or not to keep replies out of the feed displayed.

      是否在显示的提要中保留答复的选项。

      Go with no to keep replies in, yes to take them out.

      选择保留答复,选择保留答复。

      exclude_retweets (string): yes or no;

      exclude_retweets(字符串)

      default: no

      默认

      The option of whether or not to keep retweets out of the feed displayed.

      是否在显示的提要中保留转发消息的选项。

      Go with no to keep retweets in, yes to take them out.

      选择 no 保留转发,单击 yes 保留转发。

      relative_times (string): yes or no;

      相对时间(字符串)

      default: yes

      默认

      The option of whether or not to display times as relative to when they were posted or as absolute times.

      是否显示相对于发布时间还是绝对时间的选项。

      As an example, a relative time would be “10 mins ago”, while an absolute time would be “17:38, Tue”.

      例如,相对时间将是“ 10分钟前”,而绝对时间将是“ 17:38,星期二”。

      An absolute time is useful where feeds are being cached where relative times can quickly become inaccurate.

      绝对时间在要缓存Feed的地方很有用,因为相对时间会很快变得不准确。

      show_images (string): yes or no;

      show_images(字符串)

      default: no

      默认

      The option of whether or not to display embedded images within the rendered feed.

      是否在渲染的提要中显示嵌入图像的选项。

      The caching of images is left to the browser to handle.

      图像缓存留给浏览器处理。

      https (string): yes or no;

      https(字符串)

      default: no

      默认

      The option of whether or not to load media from Twitter over their secure connection.

      是否通过安全连接从Twitter加载媒体的选项。

      default_styling (string): yes or no;

      默认样式(字符串)

      default: no

      默认

      The option of whether or not to load the default stylesheet bundled with this plugin.

      是否加载此插件捆绑的默认样式表的选项。

      Go with yes to load it, no to skip loading it.

      选择 yes 进行加载,选择 no 跳过加载。

      Bear in mind that once the stylesheet is loaded it is loaded to the page so all feeds on the page will be affected by it.

      请记住,一旦加载样式表,它就会被加载到页面上,因此页面上的所有提要都会受到它的影响。

      Hence, when rendering multiple feeds you only need to yes with one, and leave it out of the others.

      因此,当呈现多个提要时,您只需要对其中的一个,而将其保留在其他提要之外。

      cache_hours (int);

      cache_hours(int)

      default: 0

      默认:0

      The number of hours you would like the feed cached for.

      您希望Feed缓存的小时数。

      The cache is saved using WordPress’ own set_transient() function.

      缓存是使用WordPress自己的 set_transient()函数保存的。

      clear_cache (string): yes or no;

      clear_cache(字符串)

      default: no

      默认

      Clears the cached version of the feed.

      清除提要的缓存版本。

      If a cached version exists this plugin skips looking at the options altogether so this is a must if you’re changing any options.

      如果存在缓存版本,则此插件将完全跳过所有选项,因此,如果您要更改任何选项,则必须这样做。

      If you're using either the template tag or the shortcode without passing information (ie all settings from settings page), the cache will be cleared each time the “Save Changes” button is clicked on the plugin's settings

      如果您使用模板标签或短代码没有传递信息(即设置页面中的所有设置),则每次在插件设置上单击“保存更改”按钮时,都会清除缓存。

      page.

      页面。

      consumer_key,

      consumer_key

      consumer_secret,

      consumer_secret

      oauth_access_token,

      oauth_access_token

      oauth_access_token_secret (string);

      oauth_access_token_secret(字符串)

      default: N/A

      默认:不适用

      See the first part of the “Installation” tab to find out how to get these.

      请参阅“安装”选项卡的第一部分,以了解如何获取这些内容。

      They are necessary for authenticating your communication with Twitter and this plugin unfortunately won’t work without them.

      它们对于验证您与Twitter的通信是必不可少的,不幸的是,没有它们,该插件将无法工作。

下载地址
https://downloads.wordpress.org/plugin/devbuddy-twitter-feed.zip
-EOF-

AI助手支持GPT4.0