Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Pfefferle committed Dec 18, 2017
1 parent 98d6812 commit d2309cf
Show file tree
Hide file tree
Showing 10 changed files with 782 additions and 92 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
**Tags:** ostatus, federated, mastodon, social, gnusocial, statusnet
**Donate link:** http://14101978.de
**Requires at least:** 4.5
**Tested up to:** 4.8
**Stable tag:** 2.2.3
**Tested up to:** 4.9.1
**Stable tag:** 2.3.0
**License:** MIT
**License URI:** https://opensource.org/licenses/MIT

Expand Down Expand Up @@ -63,6 +63,11 @@ If you are the author of a relevant plugin, or are planning one, contact us to g

## Changelog ##

### 2.3.0 ###

* nicer feeds
* enable/disable the feed summary in the settings

### 2.2.3 ###

* add main OStatus feed URL
Expand Down
69 changes: 51 additions & 18 deletions languages/ostatus-for-wordpress.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# This file is distributed under the MIT.
msgid ""
msgstr ""
"Project-Id-Version: OStatus 2.0.0\n"
"Project-Id-Version: OStatus 2.3.0\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/ostatus-for-wordpress\n"
"POT-Creation-Date: 2017-05-01 11:49:43+00:00\n"
"POT-Creation-Date: 2017-12-18 21:20:12+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -14,38 +14,55 @@ msgstr ""
"Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: grunt-wp-i18n 0.5.4\n"

#: templates/feed-ostatus-comments.php:37
#. translators: Comments feed title. 1: Post title
msgid "Comments on %s"
msgstr ""

#: templates/feed-ostatus-comments.php:40
#. translators: Comments feed title. 1: Site name, 2: Search query
msgid "Comments for %1$s searching on %2$s"
msgstr ""

#: templates/feed-ostatus-comments.php:43
#. translators: Comments feed title. 1: Site name
msgid "Comments for %s"
msgstr ""

#: templates/feed-ostatus-comments.php:91
#. translators: Individual comment title. 1: Post title, 2: Comment author name
msgid "Comment on %1$s by %2$s"
msgstr ""

#: templates/feed-ostatus-comments.php:94
#. translators: Comment author title. 1: Comment author name
msgid "By: %s"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "OStatus"
msgstr ""

#: templates/admin.php:12
#: templates/settings-page.php:12
msgid ""
"OStatus for WordPress turns your blog into a federated social network.\n"
"\tThis means you can share and talk to everyone using the OStatus protocol,\n"
"\tincluding users of Status.net and Identi.ca"
msgstr ""

#: templates/admin.php:16
msgid "Some Links:"
msgstr ""

#: templates/admin.php:18
msgid "w3.org community page"
"\tincluding users of Status.net, Identi.ca and Mastodon"
msgstr ""

#: templates/admin.php:19
msgid "How to OStatus-enable Your Application"
#: templates/settings-page.php:16
msgid "Settings"
msgstr ""

#: templates/admin.php:20
msgid "Give us feedback"
#: templates/settings-page.php:28
msgid "Show feed summary"
msgstr ""

#: templates/admin.php:24
#: templates/settings-page.php:36
msgid "Dependencies"
msgstr ""

#: templates/admin.php:26
#: templates/settings-page.php:38
msgid ""
"OStatus is like a <em>Best of OpenWeb Standards</em> and so is this plugin.\n"
"\tIf there is a plugin available that already implements one of these "
Expand All @@ -57,6 +74,22 @@ msgid ""
"style</em> ;)"
msgstr ""

#: templates/settings-page.php:70
msgid "Further readings"
msgstr ""

#: templates/settings-page.php:72
msgid "w3.org community page"
msgstr ""

#: templates/settings-page.php:73
msgid "How to OStatus-enable Your Application"
msgstr ""

#: templates/settings-page.php:74
msgid "Give us feedback"
msgstr ""

#. Plugin URI of the plugin/theme
msgid "https://github.com/pfefferle/wordpress-ostatus"
msgstr ""
Expand Down
60 changes: 24 additions & 36 deletions ostatus-for-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: http://notiz.blog/
* License: MIT
* License URI: http://opensource.org/licenses/MIT
* Version: 2.2.3
* Version: 2.3.0
* Text Domain: ostatus-for-wordpress
* Domain Path: /languages
*/
Expand All @@ -34,17 +34,19 @@ public static function init() {
add_filter( 'webfinger_user_data', array( 'Ostatus', 'webfinger' ), 10, 3 );
add_filter( 'host_meta', array( 'Ostatus', 'host_meta' ) );

add_action( 'atom_ns', array( 'Ostatus', 'atom_add_namespaces' ) );
add_action( 'atom_head', array( 'Ostatus', 'atom_add_global_author' ) );
add_action( 'atom_author', array( 'Ostatus', 'atom_add_entry_author' ) );

add_feed( 'ostatus', array( 'Ostatus', 'do_feed_ostatus' ) );
add_action( 'do_feed_ostatus', array( 'Ostatus', 'do_feed_ostatus' ), 10, 1 );

add_filter( 'pubsubhubbub_feed_urls', array( 'Ostatus', 'pubsubhubbub_feed_urls' ), 10, 2 );

add_action( 'admin_init', array( 'Ostatus', 'text_domain' ) );
add_action( 'admin_menu', array( 'Ostatus', 'admin_menu' ) );
add_action( 'admin_init', array( 'Ostatus', 'register_settings' ) );

add_filter( 'the_excerpt_rss', array( 'Ostatus', 'the_feed_content' ), 99 );
add_filter( 'the_title_rss', array( 'Ostatus', 'the_feed_content' ), 99 );
add_filter( 'the_content_feed', array( 'Ostatus', 'the_feed_content' ), 99 );
add_filter( 'comment_text', array( 'Ostatus', 'the_feed_content' ), 99 );
}

/**
Expand Down Expand Up @@ -114,35 +116,6 @@ public static function pubsubhubbub_feed_urls( $feeds, $post_id ) {
return $feeds;
}

/**
* Added PortableContacts namespace
*/
public static function atom_add_namespaces() {
if ( is_author() && is_feed( 'ostatus' ) ) {
echo 'xmlns:poco="http://portablecontacts.net/spec/1.0/"' . PHP_EOL;
echo 'xmlns:media="http://purl.org/syndication/atommedia/"' . PHP_EOL;
echo 'xmlns:ostatus="http://ostatus.org/schema/1.0/"' . PHP_EOL;
}
}

/**
* Add global author area to the OStatus Atom feed
*/
public static function atom_add_global_author() {
if ( is_author() && is_feed( 'ostatus' ) ) {
load_template( dirname( __FILE__ ) . '/templates/feed-ostatus-author.php' );
}
}

/**
* Extend entry author of the OStatus Atom feed
*/
public static function atom_add_entry_author() {
if ( is_author() && is_feed( 'ostatus' ) ) {
load_template( dirname( __FILE__ ) . '/templates/feed-ostatus-entry-author.php' );
}
}

/**
* Load plugin text domain
*/
Expand Down Expand Up @@ -175,9 +148,24 @@ public static function settings_page() {
*/
public static function do_feed_ostatus( $for_comments ) {
if ( $for_comments ) {
load_template( ABSPATH . WPINC . '/feed-atom-comments.php' );
load_template( dirname( __FILE__ ) . '/templates/feed-ostatus-comments.php' );
} else {
load_template( ABSPATH . WPINC . '/feed-atom.php' );
load_template( dirname( __FILE__ ) . '/templates/feed-ostatus.php' );
}
}

public static function the_feed_content( $output ) {
if ( is_feed( 'ostatus' ) ) {
return htmlentities( $output );
}

return $output;
}

/**
* Register PubSubHubbub settings
*/
public static function register_settings() {
register_setting( 'ostatus', 'ostatus_feed_use_excerpt' );
}
}
Loading

0 comments on commit d2309cf

Please sign in to comment.