Skip to content

Commit

Permalink
Merge pull request #126 from dshanske/dec18fixes
Browse files Browse the repository at this point in the history
Dec18fixes
  • Loading branch information
dshanske committed Dec 3, 2018
2 parents 292d401 + 2fa302f commit b5ed4af
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 22 deletions.
6 changes: 6 additions & 0 deletions includes/class-hcard-author-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function form( $instance ) {
'notes' => 1,
'avatar_size' => '125',
'email' => 0,
'me' => 0,
);

$instance = wp_parse_args( (array) $instance, $defaults );
Expand Down Expand Up @@ -133,6 +134,11 @@ public function form( $instance ) {
<label for="<?php echo esc_attr( $this->get_field_id( 'email' ) ); ?>"><?php esc_html_e( 'Show Email:', 'indieweb' ); ?></label>
<input type="hidden" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'email' ) ); ?>" value="0" />
<input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'email' ) ); ?>" value="1" <?php checked( $instance['email'], 1 ); ?> />
</p>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'me' ) ); ?>"><?php esc_html_e( 'Show Rel-Me:', 'indieweb' ); ?></label>
<input type="hidden" name="<?php echo esc_attr( $this->get_field_name( 'me' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'me' ) ); ?>" value="0" />
<input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'me' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'me' ) ); ?>" value="1" <?php checked( $instance['me'], 1 ); ?> />
</p>
<?php
}
Expand Down
15 changes: 13 additions & 2 deletions includes/class-hcard-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,16 @@ public static function get_rel_me( $author_id = null ) {
}

/**
* prints a formatted <ul> list of rel=me to supported silos
* returns a formatted <ul> list of rel=me to supported silos
*/
public static function rel_me_list( $author_id = null, $include_rel = false ) {
echo self::get_me_list( $author_id, $include_rel );
}

/**
* returns a formatted <ul> list of rel=me to supported silos
*/
public static function get_rel_me_list( $author_id = null, $include_rel = false ) {
$list = self::get_rel_me( $author_id );
if ( ! $list ) {
return false;
Expand All @@ -419,7 +426,7 @@ public static function rel_me_list( $author_id = null, $include_rel = false ) {

$r = "<div class='relme'><ul>\n<li>" . join( "</li>\n<li>", $r ) . "</li>\n</ul></div>";

echo apply_filters( 'indieweb_rel_me', $r, $author_id, $list ); // phpcs:ignore
return apply_filters( 'indieweb_rel_me', $r, $author_id, $list ); // phpcs:ignore
}

/**
Expand Down Expand Up @@ -482,6 +489,7 @@ public static function get_hcard_display_defaults() {
'location' => true, // Display location elements
'notes' => true, // Display Bio/Notes
'email' => false, // Display email
'me' => true, // Display rel-me links inside h-card
);
return apply_filters( 'hcard_display_defaults', $defaults );
}
Expand Down Expand Up @@ -545,6 +553,9 @@ public static function hcard( $user, $args = array() ) {
$return .= '<li><a class="p-tel tel" href="tel:' . $user->get( 'tel' ) . '">' . $user->get( 'tel' ) . '</a></li>';
}
$return .= '</ul>';
if ( $args['me'] ) {
$return .= '<p>' . self::get_rel_me_list( $user->ID ) . '</p>';
}
if ( $args['notes'] ) {
$return .= '<p class="p-note note">' . $user->get( 'description' ) . '</p>';
}
Expand Down
2 changes: 1 addition & 1 deletion includes/getting-started.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ol>
<li><?php _e( 'Install and activate the Webmentions and Semantic Linkbacks plugins. These will allow you to receive responses such as replies, likes, etc from other Indieweb sites. You can configure it in the Discussion Settings', 'indieweb' ); ?></li>
<li><?php _e( 'Install and activate the Micropub and IndieAuth plugins. The Micropub plugin will allow you to publish to your website using Micropub and the IndieAuth plugin adds an IndieAuth endpoint to allow it to authenticate to your site. Without it, the Micropub plugin will use a third-party IndieAuth server to authenticate to your site.', 'indieweb' ); ?></li>
<li><?php _e( 'You can now install the Bridgy plugin. It will add its settings options under Indieweb and allow you to directly register for Bridgy to connect your blog to responses from sites such as Facebook and Twitter.', 'indieweb' ); ?></li>
<li><?php _e( 'You can now install the Syndication Links plugin. It will add its settings options under Indieweb and allow you to connect your blog to responses from sites such as Flickr, Twitter and Github.', 'indieweb' ); ?></li>
<li><?php _e( 'Browse the Extensions page for a list of other recommended Indieweb plugins that can expand your functionality.', 'indieweb' ); ?></li>
</ol>

Expand Down
3 changes: 3 additions & 0 deletions includes/simple-icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function simpleicons_iw_get_names() {
'bing' => 'Bing',
'bitbucket' => 'Bitbucket',
'bitcoin' => 'Bitcoin',
'bitdefender' => 'Bitdefender',
'bitly' => 'Bitly',
'blender' => 'Blender',
'blogger' => 'Blogger',
Expand All @@ -74,6 +75,7 @@ function simpleicons_iw_get_names() {
'clojure' => 'Clojure',
'cloudflare' => 'Cloudflare',
'coop' => 'Co-op',
'codacy' => 'Codacy',
'codeigniter' => 'CodeIgniter',
'codepen' => 'CodePen',
'codecademy' => 'Codecademy',
Expand Down Expand Up @@ -166,6 +168,7 @@ function simpleicons_iw_get_names() {
'googlekeep' => 'Google Keep',
'googlepay' => 'Google Pay',
'googleplay' => 'Google Play',
'googlepodcasts' => 'Google Podcasts',
'googleplus' => 'Google+',
'grafana' => 'Grafana',
'graphql' => 'GraphQL',
Expand Down
3 changes: 0 additions & 3 deletions indieweb.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ public static function register_plugins() {
array(
'slug' => 'syndication-links',
),
array(
'slug' => 'bridgy-publish',
),
array(
'slug' => 'indieauth',
),
Expand Down
24 changes: 14 additions & 10 deletions languages/wordpress-indieweb.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: IndieWeb 3.3.12\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/indieweb\n"
"POT-Creation-Date: 2018-11-13 01:50:13+00:00\n"
"POT-Creation-Date: 2018-12-03 03:04:13+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -127,26 +127,30 @@ msgstr ""
msgid "A widget that allows you to display author profile marked up as an h-card"
msgstr ""

#: includes/class-hcard-author-widget.php:114
#: includes/class-hcard-author-widget.php:115
msgid "Avatar Size:"
msgstr ""

#: includes/class-hcard-author-widget.php:118
#: includes/class-hcard-author-widget.php:119
msgid "Show Avatar:"
msgstr ""

#: includes/class-hcard-author-widget.php:123
#: includes/class-hcard-author-widget.php:124
msgid "Show Location:"
msgstr ""

#: includes/class-hcard-author-widget.php:128
#: includes/class-hcard-author-widget.php:129
msgid "Show Notes:"
msgstr ""

#: includes/class-hcard-author-widget.php:133
#: includes/class-hcard-author-widget.php:134
msgid "Show Email:"
msgstr ""

#: includes/class-hcard-author-widget.php:139
msgid "Show Rel-Me:"
msgstr ""

#: includes/class-hcard-user.php:53
msgid "Github username"
msgstr ""
Expand Down Expand Up @@ -356,9 +360,9 @@ msgstr ""

#: includes/getting-started.php:28
msgid ""
"You can now install the Bridgy plugin. It will add its settings options "
"under Indieweb and allow you to directly register for Bridgy to connect "
"your blog to responses from sites such as Facebook and Twitter."
"You can now install the Syndication Links plugin. It will add its settings "
"options under Indieweb and allow you to connect your blog to responses from "
"sites such as Flickr, Twitter and Github."
msgstr ""

#: includes/getting-started.php:29
Expand Down Expand Up @@ -458,7 +462,7 @@ msgid ""
"functionality."
msgstr ""

#: indieweb.php:186
#: indieweb.php:183
msgid ""
"Users can optionally add additional information to their profile. As this "
"is part of your user profile you have control of this information and can "
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ One could certainly download, install, and activate some or all of these plugins
* Syndication Links - Automatically adds syndication links from a supported syndication plugin or by manual entry in the post editor. Support for NextScripts: Social Networks Auto-Poster (aka SNAP), the Medium plugin, and a few others.
* MicroPub - A MicroPub Server for publishing posts using third-party Micropub clients
* IndieAuth - Adds an IndieAuth endpoint to WordPress. Alternatively, if you do not want to enable this, you can use a third-party endpoint to login to the WordPress backend via IndieAuth.
* Bridgy - User Interface for the Brid.gy Web Service
* Microformats 2 - provides basic mf2 support for any WordPress theme that does not support mf2 already. Note, due to inability to access every element via a filter or action, an [IndieWeb theme](http://indieweb.org/WordPress/Themes) is recommended.
* Simple Location - adds basic location and weather support to WordPress posts

Expand All @@ -85,7 +84,8 @@ Project maintained on github at [indieweb/wordpress-indieweb](https://github.com

### 3.3.12 ###
* Update icon file

* Add option to show rel-me icons inside h-card
* Remove Bridgy from Suggested Plugins

### 3.3.11 ###
* Code cleanups
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ One could certainly download, install, and activate some or all of these plugins
* Syndication Links - Automatically adds syndication links from a supported syndication plugin or by manual entry in the post editor. Support for NextScripts: Social Networks Auto-Poster (aka SNAP), the Medium plugin, and a few others.
* MicroPub - A MicroPub Server for publishing posts using third-party Micropub clients
* IndieAuth - Adds an IndieAuth endpoint to WordPress. Alternatively, if you do not want to enable this, you can use a third-party endpoint to login to the WordPress backend via IndieAuth.
* Bridgy - User Interface for the Brid.gy Web Service
* Microformats 2 - provides basic mf2 support for any WordPress theme that does not support mf2 already. Note, due to inability to access every element via a filter or action, an [IndieWeb theme](http://indieweb.org/WordPress/Themes) is recommended.
* Simple Location - adds basic location and weather support to WordPress posts

Expand All @@ -85,7 +84,8 @@ Project maintained on github at [indieweb/wordpress-indieweb](https://github.com

= 3.3.12 =
* Update icon file

* Add option to show rel-me icons inside h-card
* Remove Bridgy from Suggested Plugins

= 3.3.11 =
* Code cleanups
Expand Down
11 changes: 10 additions & 1 deletion sass/_simple-icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
.svg-bitcoin {
color: #F7931A;
}
.svg-bitdefender {
color: #ED1C24;
}
.svg-bitly {
color: #EE6123;
}
Expand Down Expand Up @@ -217,6 +220,9 @@
.svg-coop {
color: #00B1E7;
}
.svg-codacy {
color: #222F29;
}
.svg-codeigniter {
color: #EE4623;
}
Expand Down Expand Up @@ -479,7 +485,7 @@
color: #4285F4;
}
.svg-googledrive {
color: #4386FC;
color: #4285F4;
}
.svg-googlehangouts {
color: #0C9D58;
Expand All @@ -493,6 +499,9 @@
.svg-googleplay {
color: #607D8B;
}
.svg-googlepodcasts {
color: #4285F4;
}
.svg-googleplus {
color: #DC4E41;
}
Expand Down
2 changes: 1 addition & 1 deletion static/img/simple-icons.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b5ed4af

Please sign in to comment.