Giter Club home page Giter Club logo

wordpress's Introduction

Twitter plugin for WordPress

The Twitter plugin for WordPress optimizes your website for a Twitter audience through easy to use sharing buttons, embedded Tweets, embedded timelines, auto-generated markup indexed by Twitter, and Follow buttons to help grow your Twitter audience. All features are deeply integrated with WordPress APIs to make building your webpages and administrative features as easy as possible with the extensibility you expect from WordPress.

The Twitter plugin for WordPress requires PHP 5.6 or greater to take advantage of traits, late static bindings for extensibility, namespaces, and Twitter libraries. Embedded Tweets require a server capable of communicating with Twitter's servers over TLS/SSL; the cURL library typically works best.

Current version: 2.0.5

status: retired

Features

Individual features may be toggled off through the twitter_features filter.

Features built on top of oEmbed APIs omit JavaScript from the oEmbed response, asynchronously loading JavaScript through the WordPress JavaScript queue. An asynchronous JavaScript function queue is available for Twitter's widgets JavaScript and universal website tracking JavaScript to register dependencies such as an analytics tracker.

Embedded Tweet

Add an embedded Tweet to your site by URL or by using the tweet shortcode macro. Shortcode syntax is compatible with Jetpack, allowing flexible migration for WordPress.com or Jetpack sites.

Customize an embedded Tweet color scheme to match your site's color palette. Choose a theme type, link color, and border color in the WordPress administrative interface.

Twitter profile

Add an embedded profile timeline to your site by URL, using the [twitter_profile] shortcode macro, or adding a widget to your theme's widget area.

Twitter list

Add an embedded list timeline to your site by URL, using the [twitter_list] shortcode macro, or adding a widget to your theme's widget area.

Collection

Display a Twitter collection by URL, using the twitter_collection shortcode macro, or adding widget to a theme's widget area.

Embedded Moment

Add a Twitter Moment to an article by URL or by using the twitter_moment shortcode macro.

Twitter Cards

The Twitter plugin for WordPress will automatically generate Twitter Twitter Cards markup to highlight your post content when shared on Twitter. Add your site and author Twitter usernames through the WordPress administrative interface to attribute content to Twitter authors and drive followers.

Add your site's Twitter username through the WordPress administrative interface to enable free Twitter Analytics for your site. Twitter Analytics shows the popularity of your site's URLs shared on Twitter, the Twitter accounts growing your content's reach, and how your content spreads across Twitter.

Customize each post's Twitter Card title and description directly from the WordPress editor to fine-tune your content marketing for the Twitter audience.

Tweet Button

Add a Tweet Button to any page using the twitter_share shortcode macro to encourage sharing of your content on Twitter. The Twitter plugin for WordPress automatically pulls in site and author Twitter accounts to credit in the Tweet and grow followers.

Customize Tweet text and add hashtags Tweet Button shares for your post through a custom editor in the WordPress post editing interface.

Follow Button

Add a Follow Button to your site by configuring a Follow button WordPress widget for use in an eligible widget area. Add a Follow button anywhere in your post content or theme using the twitter_follow shortcode macro.

Periscope On Air Button

Add a Periscope On Air Button to any page using a Periscope profile URL or the periscope_on_air shortcode macro to help your website audience discover your Periscope account. The button will automatically display your account's on air status when you broadcast.

Advertising Tracking

WordPress-powered sites with Twitter advertising accounts can use the twitter_tracking shortcode with a campaign identifier to track advertising conversions or build a custom audience for later targeting in a Twitter advertisement. Easily track activity on your WordPress site with JavaScript and other resources optimally loaded through WordPress.

Code structure

The plugin is split into PHP object builders for constructing buttons, widgets, and cards and validating parameters. WordPress-specific code exists under src/Twitter/WordPress/. Coding standards therefore vary between PSR style (e.g. space indent) and WordPress style (e.g. tab indent) based on directory and its target runtime environment.

Code of Conduct

This, and all github.com/twitter projects, are under the Twitter Open Source Code of Conduct. Additionally, see the Typelevel Code of Conduct for specific examples of harassing behavior that are not tolerated.

Authors

Former maintainer

A full list of contributors can be found on GitHub.

License

Copyright 2015- Twitter, Inc.

Licensed under the MIT License: http://opensource.org/licenses/MIT

wordpress's People

Contributors

andypiper avatar benward avatar coliff avatar danieljin-twitter avatar evansobkowicz avatar niallkennedy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress's Issues

get_the_excerpt filter call should pass two args

PHP: 7.2.21
Wordpress: 5.3.2

As of Wordpress 4.5 the get_the_excerpt filter expects two arguments to be passed: $post_excerpt and $post.

This line in the Twitter Wordpress plugin produces a fatal error when an add_filter call to the get_the_excerpt hook expects the two arguments. Passing the expected, second param $post in Generator.php resolves the error.

$description = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );

Remove URL handler for follow button

It has been possible to create a Twitter follow button when text containing a Twitter profile URL is passed through an embed handler. The follow button URL-based embed handler should be removed to allow an embedded profile timeline to reliably be included in its place.

In June 2016 Twitter added oEmbed support for profile timeline URLs and added oEmbed discovery to the profile URL's returned HTML. Profile URLs are supported oEmbed providers as of WordPress 4.7.

Why don't use interface ?

For example, in registerShortcodeHandlers(), you use the method "init" on multiple class. Why don't use interface and make a loop while on this interface ?

Remove photo, product, and gallery cards

Twitter announced the deprecation of photo, product, and gallery Twitter Card template types effective July 3, 2015. The Twitter plugin for WordPress should remove mappings to these template types and prevent an attempt to map to a deprecated type. Mapping to an active card template instead of an old template with a compatibility layer helps ensure a site's content will continue to be displayed as intended.

A Twitter Card template is specified in the twitter:card meta element. The selection of a specific card type affects the supported properties to be extracted from WordPress and placed into other meta elements.

The deprecation of the product card template will result in label-data pairs specified in meta elements having no effect on the rendered card.

The deprecation of the gallery card template removes the need to retrieve and specify multiple images for a post. All card templates now support a maximum of one image.

The previously supported photo card template properties map onto the summary_large_image card template, adding the possibility of an additional description property.

Display a notice to site administrators if plugin does not meet minimum PHP requirements

Add a visual indication of purposeful non-execution of the plugin for WordPress administrators who have installed and activated the plugin on a server which does not meet the plugin's minimum PHP requirements.

The issue

The plugin requires PHP 5.4. The plugin loader currently stops loading plugin files and triggers an E_USER_NOTICE with a compatibility notice if the plugin executes in with a PHP version before 5.4.

The plugin short description and long description both note the PHP 5.4 requirement. WordPress supports PHP 5.2.4 or greater. Plugins are able to specify a range of WordPress releases of known compatibility: a minimum supported version specified by Requires at least up to the maximum known compatibility of Tested up to. Plugins are not able to list other compatibility requirements programmatically.

It is possible some WordPress sites may install and activate the plugin without meeting the plugin's minimum requirements. The described functionality of the plugin will not function: no settings menu, no shortcode handlers, etc. The person installing the plugin may blame the plugin without understanding the minimum requirements needed for plugin execution.

Available messaging areas

Admin notice

The plugin may display a notice to a WordPress user with manage_plugins viewing the WordPress administrative interface or just the plugins listing page. WordPress Core displays an update nag with a warning-level highlight in yellow. An error-level highlight may make sense to draw attention to the likely just-executed action of plugin activation.

Plugin listing

The plugin listing row could display additional information about the plugin state while the plugin is activated. A site administrator would be able to see an incompatibility warning alongside the plugin listing wherever it appears.

Additional considerations

The plugin can self deactivate if the minimum requirements are not met. The site administrator would see no new messages about incompatibility until the plugin is reactivated.

A message or possible notice should not be output during an Ajax request at the risk of breaking the expected format of the response.

Twitter list not showing up

I added the widget and it's doesn't load the content. Configuration is correct as it did show up before. Nothing was changed on the page expect updating WordPress.

Conversation Param Not Functioning

When setting the conversation to false I expect the previous tweet to not be displayed. However that is not what is happening. I have also attempted to set a site-wide default using the filter, but that isn't working either.

Current version not saving limit and height.

When saving changes in the wordpress interface, I can change the values for limit, width and height. However, when I click save, only the width saves. The other two values are cleared out and have no effect.

Let me specify the card type

At the moment it is inserting a twitter card summary tag, but I want to use summary large image tag.

If I use another plugin to stick the summary large image tag in then this plugin still inserts the summary tag and that takes precedence.

Because of this reason I'm unable to use the plugin.

If the plugin had a configuration option to choose the tag type to insert (summary, summary large, or perhaps "none") then this wouldn't be a problem.

Error thrown for large images

Reported error thrown for large featured images. No issue when using smaller featured images.

PHP Fatal error: Call to a member function attachmentToTwitterImage() on a non-object in /var/www/example.com/wp-content/plugins/twitter/src/Twitter/WordPress/Cards/ImageHandler.php on line 318

Is this plugin still supported or has it been abandoned?

Is this plugin still supported or has it been abandoned?

WordPress 5.4 support PR #45 has not been merged. WordPress 5.8 has been out for a while now.

Last commit Jul 25, 2019.

Is this plugin dead, abandoned or replaced with something better. Would be good to know what Twitter wants to people to use on their WordPress sites, if not the official Twitter plugin.

Submit to packagist

Hey there! Thanks for the awesome plugin! Any chance you could list it on packagist? Thanks!

Three feature requests: user-specified font, no URL, hypertext links to users/hashtags

  1. I would like the font of the Wordpress widget to match the rest of my site. It would be good if users could specify a CSS font import applied to the Twitter timeline iframe.

  2. My Twitter timeline widget includes hypertext links in my tweets in addition to the cards. I would like to disable this, similar to how tweeted URLs are hidden on Twitter.com.

  3. @ and # tags are not displayed in the Twitter widget as hypertext links, like they are on Twitter.com. In addition to being harder to read , you can't easily jump to the Twitter user or hashtag. If you include this, there should be a way for users to style these links similar to their blog.

How to disable media in list mode?

There is no settings in widget or plugin option that allows to disable embedded media from tweets.
It would be helpful in displaying a clean list of tweet.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.