2017 © Pedro Peláez
 

library wp-yahoo-feed

image

megumi/wp-yahoo-feed

  • Saturday, July 18, 2015
  • by miya0001
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

megumi/wp-yahoo-feed

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Helper class Generates the custom feed for Yahoo Japan for WordPress plugin., (*2)

  • Cut the title in 28 chars.
  • Replace the guid from uri to ID.
  • Filter the HTML of <description /> that is allowed by Yahoo.
  • Set post-thumbnail to <enclosure /> and add it to <item />.
  • Add caption attribute to <img /> in <description />;
  • Set post modified date to <pubDate />.
  • Add metabox for Yahoo's categories and set it to <category />.
  • Add trashed items to the feed.

Installation

Create a composer.json in your plugin root or mu-plugins, (*3)

{
    "require": {
        "megumi/wp-yahoo-feed": "*"
    }
}

Place the following code into your plugin., (*4)

require_once dirname( __FILE__ ) . '/vendor/autoload.php';

Then:, (*5)

$ composer install

How to use

require_once dirname( __FILE__ ) . '/vendor/autoload.php';

$yahoo_feed = new Megumi\WP\Yahoo_Feed( 'my-feed' );
$yahoo_feed->set_categories( array(
    '0' => 'Empty Category',
    '1' => 'Life Style'
) );
$yahoo_feed->register();

Then access to:, (*6)

http://example.com/feed/my-feed or http://example.com/feed/?type=my-feed, (*7)

Customization

Filter Hooks

  • yahoo_feed_template_{$feed_name} - Filters the feed template.
  • yahoo_feed_item_title_width_{$feed_name} - Filters the width of item's title.
  • yahoo_feed_item_category_{$feed_name} - Filters the category of the item.
  • yahoo_feed_item_enclosure_image_size_{$feed_name} - Filters the image size of post-thumbnail.
  • yahoo_feed_item_default_enclosure_{$feed_name} - Filters the default post-thumbnail.
  • yahoo_feed_item_excerpt_{$feed_name} - Filters the descrption of the item.
  • yahoo_feed_item_allowed_html_{$feed_name} - Filters the allowed html.

Action Hooks

  • yahoo_feed_item_{$feed_name} - Fires at item node in the feed.

Contributing

Clone this project., (*8)

$ git clone git@github.com:megumi-wp-composer/wp-yahoo-feed.git

Run testing

Initialize the testing environment locally:, (*9)

(you'll need to already have mysql, svn and wget available), (*10)

$ bash bin/install-wp-tests.sh wordpress_test root '' localhost latest

Install phpunit., (*11)

$ composer install

The unit test files are in the tests/ directory., (*12)

To run the unit tests, just execute:, (*13)

$ phpunit

Issue

https://github.com/megumi-wp-composer/wp-yahoo-feed/issues, (*14)

The Versions

18/07 2015

dev-stable

dev-stable

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

18/07 2015

1.1.3

1.1.3.0

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

18/07 2015

dev-master

9999999-dev

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

18/07 2015

1.1.2

1.1.2.0

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

18/07 2015

1.1.1

1.1.1.0

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

18/07 2015

1.1.0

1.1.0.0

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

17/07 2015

1.0

1.0.0.0

  Sources   Download

GPL2

The Requires

  • php >=5.3