Skip to content

Commit

Permalink
Merge pull request #1569 from INN/1534-tag-0.6
Browse files Browse the repository at this point in the history
Bump version number to 0.6
  • Loading branch information
benlk authored Nov 10, 2018
2 parents 7e7b4cd + 2951cf8 commit 3e09306
Show file tree
Hide file tree
Showing 25 changed files with 643 additions and 388 deletions.
30 changes: 23 additions & 7 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,44 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
though this project doesn't succeed in adhering to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/INN/largo/compare/0.5...0.5-dev)
## [Largo 0.6](https://github.com/INN/largo/compare/v0.5.5.4...v0.6)

Special thanks to our community contributors:
- Mike Schinkel for his work on [pull request #1469](https://github.com/INN/largo/pull/1469) at WordCamp for Publishers 2017's Contributor Day
- GitHub user [fenriz07](https://github.com/fenriz07) for their work in [PR #1541](https://github.com/INN/largo/pull/1541) on updating links in our documentation

Thanks to Mike Schinkel for his work on [pull request 1469](https://github.com/INN/largo/pull/1469) at WordCamp for Publishers 2017's Contributor Day.

### New Features
- Adds Gutenberg support, with
- editor styles
- support for the `.alignwide` and `.alignfull` CSS classes and their use in blocks
- pullquote styles

## Changes
- Fixes numerous undefined variable errors, as part of [issue 1492](https://github.com/INN/largo/issues/1492).
### Changes
- Fixes numerous undefined variable errors, as part of [issue #1492](https://github.com/INN/largo/issues/1492).
- Users who have the capability to edit a given post will see the edit link on the frontend, where before users with the capability to edit published posts in general saw the link to edit the post in the frontend. [PR #1559](https://github.com/INN/largo/pull/1559) for [issue #1543](https://github.com/INN/largo/issues/1543).
- Largo now uses WordPress' `title-tag` support for `<title>` tag output, which means that site title tags shoud now be modifiable by plugins. [PR #1566](https://github.com/INN/largo/pull/1566) for [issue 1470](https://github.com/INN/largo/issues/1470).
- Largo now uses WordPress' `title-tag` support for `<title>` tag output, which means that site title tags shoud now be modifiable by plugins. [PR #1566](https://github.com/INN/largo/pull/1566) for [issue #1470](https://github.com/INN/largo/issues/1470).
- If the [Yoast SEO plugin](https://wordpress.org/plugins/wordpress-seo/) is active, Largo's default [Open Graph Protocol](http://ogp.me/) and [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards) tags will not be output. [PR #1567](https://github.com/INN/largo/pull/1567) for issues [#1437](https://github.com/INN/largo/issues/1437) and [#1470](https://github.com/INN/largo/issues/1470)
- Adds support for WordPress' `.screen-reader-text` CSS class. [PR #1530](https://github.com/INN/largo/pull/1530) for [issue #1528](https://github.com/INN/largo/issues/1528) as part of [issue #844](https://github.com/INN/largo/issues/844).
- Updates `.visuallyhidden` CSS styles in accordance with [the latest recommended technique](https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/). [PR #1530](https://github.com/INN/largo/pull/1530) for [issue #1528](https://github.com/INN/largo/issues/1528) as part of [issue #844](https://github.com/INN/largo/issues/844).
- Thins the homepage stylesheets with LESS `(reference)` imports. [PR #1530](https://github.com/INN/largo/pull/1530) for [issue #1528](https://github.com/INN/largo/issues/1528) as part of [issue #844](https://github.com/INN/largo/issues/844).
- Adds a text domain to `style.css`. [PR #1527](https://github.com/INN/largo/pull/1527) as part of [issue #844](https://github.com/INN/largo/issues/844).
- Fixes a "WP_Admin_Bar::add_node was called incorrectly" warning message. [PR #1504](https://github.com/INN/largo/pull/1504) for [issue #1349](https://github.com/INN/largo/issues/1349).
- Modernizes Travis CI configuration to cover PHP 5.6, 7.0 and 7.1, and WordPress 4.6 through 5.0. Drops support for PHP 5.5 and earlier and WordPress 4.5 and earlier. [PR #1503](https://github.com/INN/largo/pull/1503) and [#1554](https://github.com/INN/largo/pull/1554).
- Where `largo_remove_hero()` removed duplicate hero images from the top of `the_content()`, the funciton no longer outputs empty paragraph tags, and now works on `img` tags without `src=""` attributes. [PR #1503](https://github.com/INN/largo/pull/1503/files#diff-751911f6a0ebcc05da47094668329397) for [issue #1404](https://github.com/INN/largo/issues/1404).
- Alphabetizes the contributor list in `readme.md`.

### Removed
- Deprecates `largo_fb_user_is_followable()`, [because Facebook changed their API](https://github.com/INN/largo/pull/1503#issuecomment-407869218).
- Removes the default inclusion of Google Analytics with INN's Largo Project IDs. [PR #1502](https://github.com/INN/largo/pull/1502) as part of [issue #1495](https://github.com/INN/largo/issues/1495), and by request.
- Removes the INN Member RSS widget, because the RSS feed it draws from is no longer supported or maintained by INN. Because the RSS feed was occasionally empty, the widget would result in 500 errors. [RP #1535](https://github.com/INN/largo/pulls/1535) for [issue #1511](https://github.com/INN/largo/issues/1511) and [#893](https://github.com/INN/largo/issues/893).
- Removes lingering traces of the Largo Featured Widget. [PR #1563](https://github.com/INN/largo/pull/1563) and [#1469](https://github.com/INN/largo/pull/1469) for [issue 1467](https://github.com/INN/largo/issues/1467), from Github user [mikeschinkel](https://github.com/mikeschinkel).
- Removes lingering traces of the Largo Featured Widget. [PR #1563](https://github.com/INN/largo/pull/1563) and [#1469](https://github.com/INN/largo/pull/1469) for [issue #1467](https://github.com/INN/largo/issues/1467), from Github user [mikeschinkel](https://github.com/mikeschinkel).
- Removes many uses of `extract()` in widgets and theme functions, and improves code quality in widgets.
- Removes the `<title>` element from `header.php`, since Largo declares `title-tag` theme support. [PR #1566](https://github.com/INN/largo/pull/1566) for [issue 1470](https://github.com/INN/largo/issues/1470).
- Removes uses of `screen_icon()` and `get_screen_icon()`, deprecated in WordPress 4.8. [PR #1523](https://github.com/INN/largo/pull/1531) for [issue #1523](https://github.com/INN/largo/issues/1523) as part of [issue #844](https://github.com/INN/largo/issues/844).
- Removes the `<title>` element from `header.php`, since Largo declares `title-tag` theme support. [PR #1566](https://github.com/INN/largo/pull/1566) for [issue #1470](https://github.com/INN/largo/issues/1470).
- Removes two remaining PHP short tags. [PR #1525](https://github.com/INN/largo/pull/1525) for [issue #844](https://github.com/INN/largo/issues/844).
- Removes some deprecated `style.css` metadata tags. [PR #1524](https://github.com/INN/largo/pull/1524) for [issue #844](https://github.com/INN/largo/issues/844).
- Removes Hipchat support from `.travis.yml`. [PR #1503](https://github.com/INN/largo/pull/1503).

### Upgrade notices
- If your child theme has significant custom styling, or has custom post templates, your theme may need to provide additional styles to ensure Gutenberg compatibility.
Expand Down
10 changes: 9 additions & 1 deletion docs/api/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ functions.php
Helper for setting specific theme options (optionsframework).

Would be nice if optionsframework included this natively
See https://github.com/devinsays/options-framework-plugin/issues/167
See https://github.com/devinsays/options-framework-plugin/issues/167

.. php:function:: theme_gallery_defaults()
Gallery Default Settings

:param Array $settings:

:returns: Array $settings
4 changes: 2 additions & 2 deletions docs/api/inc/avatars/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ inc/avatars/functions.php
Get the avatar image HTML for the given user id/email and size

:param int|string $id_or_email: a wordpress user ID or user email address;
:param int $string: The size of the avatar
:param int|string|WP_Comment $id_or_email: a wordpress user ID or user email address, or a comment.
:param int $string: The size of the avatar.
116 changes: 116 additions & 0 deletions docs/api/inc/byline_class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
inc/byline_class.php
====================

.. php:attr:: $author_id
Temporary variable used for the author ID;
This must be public, because Largo_CoAuthors_Byline's methods incorporate methods from Largo_Byline, and parent classes cannot see private or protected members of extending classes.
:var: int $he ID of the author for this post
.. php:method:: Largo_Byline::populate_variables()
Set us up the vars

- 'post_id': an integer post ID
- 'exclude_date': boolean whether or not to include the date in the byline

:param array $args: Associative array containing following keys:

:see: $post_id $ets this from $args

:see: $exclude_date $ets this from $args

:see: $custom $ills this array with the output of get_post_custom

:see: $author_id $ets this from the post meta

.. php:method:: Largo_Byline::generate_byline()
this creates the byline text and adds it to $this->output

:see: $output $reates this

.. php:method:: Largo_Byline::__toString()
This is what turns the whole class into a string

:see: $output

:see: generate_byline()

.. php:method:: Largo_Byline::avatar()
On single posts, output the avatar for the author object
This supports both Largo_Byline and Largo_CoAuthors_Byline

.. php:method:: Largo_Byline::author_link()
a wrapper around largo_author_link

.. php:method:: Largo_Byline::job_title()
If job titles are enabled by Largo's theme option, display the one for this author

.. php:method:: Largo_Byline::twitter()
If this author has a twitter ID, output it as a link on an i.icon-twitter

.. php:method:: Largo_Byline::maybe_published_date()
Determine whether to display the date

.. php:method:: Largo_Byline::published_date()
A wrapper around largo_time to determine when the post was published

.. php:method:: Largo_Byline::edit_link()
Output the edit link for this post, only to admin users

.. php:method:: Largo_Custom_Byline::generate_byline()
differs from Largo_Byline in following ways:
- no avatar
- no job title
- no twitter

.. php:class:: Largo_CoAuthors_Byline
Bylines for Co-Authors Plus guest authors
.. php:attr:: $author
Temporary variable used to contain the coauthor being rendered by the loop inside generate_byline();

:see: $this->generate_byline();

.. php:attr:: $author_id
Temporary variable used for the author ID;
This must be public, because Largo_CoAuthors_Byline's methods incorporate methods from Largo_Byline, and parent classes cannot see private or protected members of extending classes.

:see: $this->generate_byline();

.. php:method:: Largo_CoAuthors_Byline::generate_byline()
Differs from Largo_Byline in following ways:

- gets list of coauthors, runs avatar, author_link, job_title, organization, twitter for each of those
- joins list of coauthors with commas and 'and' as appropriate

.. php:method:: Largo_CoAuthors_Byline::author_link()
A coauthors-specific byline link method

.. php:method:: Largo_CoAuthors_Byline::job_title()
Job title from the coauthors object

.. php:method:: Largo_CoAuthors_Byline::organization()
Output coauthor users's organization

.. php:method:: Largo_CoAuthors_Byline::twitter()
twitter link from the coauthors object
6 changes: 6 additions & 0 deletions docs/api/inc/dashboard.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
inc/dashboard.php
=================

.. php:function:: largo_dashboard_quick_links()
Largo dashboard quick links
20 changes: 19 additions & 1 deletion docs/api/inc/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,22 @@ inc/deprecated.php
:deprecated: Use $argo_nav_menu()

:see: largo_nav_menu()
:param array $args:
:param array $args:

.. php:function:: largo_fb_user_is_followable()
Deprecated function to check whether a Facebook user/page was followable.

This function used to use the Facebook Follow button's HTML markup
https://developers.facebook.com/docs/archive/docs/plugins/follow-button/
to determine whether a page or user could be followed. The button was
deprecated by Facebook on February 5, 2018, and as a result, this function
stopped working.

There are no plans to provide similar functionality in the future, because
the relevant Facebook Graph API calls require Facebook API tokens,
and it seems excessive to require theme users to get one just for this check.

:param string $username: a valid Facebook username or page name. They're generally indistinguishable, except pages get to use '-'

:returns: bool $alse
38 changes: 36 additions & 2 deletions docs/api/inc/enqueue.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ inc/enqueue.php

:global: LARGO_DEBUG

.. php:function:: largo_gallery_enqueue()
Enqueue Largo gallery CSS & JS

:since: 0.5.5.3

.. php:function:: largo_enqueue_child_theme_css()
Enqueue Largo child theme CSS
Expand All @@ -35,6 +41,34 @@ inc/enqueue.php

.. php:function:: largo_google_analytics()
Add Google Analytics code to the footer, you need to add your GA ID to the theme settings for this to work
Add Google Analytics code to the footer

:since: 1.0
You need to add your GA ID to the theme settings for this to work.

Through version 0.5.5.4, this function output a Google Analytics
tag even if the site didn't have GA configured in the theme. This
tag was used to send GA tracking events to properties for INN and
for the Largo Project.

In this current version of the plugin, it only outputs a GA tag
if you've added a GA ID to the theme settings. If you're using a different
GA script, leave that setting blank.

If you're using Largo, please send us an email to say hi!
https://labs.inn.org/contact/

:since: 0.3

.. php:function:: largo_gutenberg_frontend_css_js()
Enqueue Largo's Gutenberg-supporting stylesheets and scripts, for the frontend

:since: 0.6

.. php:function:: largo_gutenberg_editor_css_js()
Enqueue Largo's Gutenberg-supporting stylesheets and scripts, for the admin editor

:since: 0.6

:see: https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type/#enqueuing-block-scripts
16 changes: 0 additions & 16 deletions docs/api/inc/helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ inc/helpers.php

:since: 0.4

.. php:function:: largo_fb_user_is_followable()
Checks to see if a given Facebook username or ID has following enabled by
checking the iframe of that user's "Follow" button for <table>.
Usernames that can be followed have <tables>.
Users that can't be followed don't.
Users that don't exist don't.

:param string $username: a valid Facebook username or page name. They're generally indistinguishable, except pages get to use '-'

:uses: wp_remote_get

:returns: bool $he user specified by the username or ID can be followed

.. php:function:: clean_user_fb_username()
Cleans a Facebook url to the bare username or id when the user is edited
Expand All @@ -50,8 +36,6 @@ inc/helpers.php
Checks that the Facebook URL submitted is valid and the user is followable and causes an error if not

:uses: largo_fb_url_to_username

:uses: largo_fb_user_is_followable
:param $errors $he: error object
:param bool $update: whether this is a user update
:param object $user: a WP_User object
Expand Down
2 changes: 1 addition & 1 deletion docs/api/inc/metabox-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ inc/metabox-api.php

.. php:function:: _largo_metaboxes_content()
Private function to generate fields/markup within largo metaboxes
Private function to generate fields/markup within largo metaboxes
13 changes: 13 additions & 0 deletions docs/api/inc/open-graph.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
inc/open-graph.php
==================

.. php:function:: largo_wp_title_parts_filter()
Filter wp_title() to add our custom metadata

:since: 0.6

:link: https://github.com/INN/largo/issues/1470
:param Array $parts: An array of title parts.

:returns: Array.
4 changes: 4 additions & 0 deletions docs/api/inc/post-tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ inc/post-tags.php
Output largo_edited_date() on the single post template

This is disabled in Largo by default. To add it to your child theme, paste in this:

#add_action( 'largo_after_hero', 'largo_after_hero_largo_edited_date', 5 );

:since: 0.5.5

:action: largo_after_hero
Expand Down
11 changes: 0 additions & 11 deletions docs/api/inc/post-templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ inc/post-templates.php

:returns: String $iltered post content.

.. php:function:: largo_url_to_attachmentid()
Retrieves the attachment ID from the file URL
(or that of any thumbnail image)

:since: 0.4

:see: https://pippinsplugins.com/retrieve-attachment-id-from-image-url/

:returns: Int $D of post attachment (or false if not found)

.. php:function:: largo_get_partial_by_post_type()
Given a post type and an optional context, return the partial that should be loaded for that sort of post.
Expand Down
1 change: 1 addition & 0 deletions docs/api/inc/related-content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ inc/related-content.php
:param object $term: A term object.
:param int $max: Maximum number of posts to return.
:param int $min: Minimum number of posts. If not met, returns false.
:param Array $post__not_in: Array of integer post IDs to be excluded from the query

:returns: array|false $f post objects.

Expand Down
Loading

0 comments on commit 3e09306

Please sign in to comment.