Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the featured media to the two-column classic post #1140

Merged
merged 16 commits into from
Apr 12, 2016
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 43 additions & 36 deletions css/editor-style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/editor-style.min.css

Large diffs are not rendered by default.

79 changes: 43 additions & 36 deletions css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/style.min.css

Large diffs are not rendered by default.

40 changes: 28 additions & 12 deletions docs/developers/hooksfilters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ filter: **largo_archive_rounduplink_title**

**Usage:** ::

function filter_rounduplink_title($title) {
function filter_rounduplink_title( $title ) {
return "Custom title here";
}
add_action('largo_archive_rounduplink_title', 'filter_rounduplink_title');
add_action( 'largo_archive_rounduplink_title', 'filter_rounduplink_title' );

filter: **largo_registration_extra_fields**

Expand All @@ -58,10 +58,10 @@ filter: **largo_registration_extra_fields**

Also passed in is a WP_Error object that stores all the generated errors for the page. Use this if you'd like to display an error message on the erroneous field. ::

function filter_function_name($values, $errors) {
function filter_function_name ($values, $errors ) {
# ...
}
add_filter('largo_registration_extra_fields', 'filter_function_name');
add_filter( 'largo_registration_extra_fields', 'filter_function_name' );

action: **largo_validate_user_signup_extra_fields**

Expand All @@ -73,10 +73,10 @@ action: **largo_validate_user_signup_extra_fields**

Also passed in is an array that contains only the extra fields that were present. This is an easy way to check only the extra data. ::

function action_function_name($result,$extras) {
function action_function_name( $result, $extras ) {
# ...
}
add_action('largo_validate_user_signup_extra_fields', 'action_function_name');
add_action( 'largo_validate_user_signup_extra_fields', 'action_function_name' );

filter: **largo_lmp_args**

Expand All @@ -94,11 +94,11 @@ filter: **largo_lmp_template_partial**

When building your own filter, you must set the fourth parameter of add_filter to 2: ::

function your_filter_name($partial, $post_type, $context) {
function your_filter_name( $partial, $post_type, $context ) {
// things
return $partials;
}
add_filter( 'largo_lmp_template_partial', 'your_filter_name', 10, 2);
add_filter( 'largo_lmp_template_partial', 'your_filter_name', 10, 2 );
^

Without setting '2', your filter will not be passed the $post_type or $context arguments.
Expand All @@ -114,11 +114,11 @@ filter: **largo_partial_by_post_type**

When building your own filter, you must set the fourth parameter of add_filter to 3: ::

function your_filter_name($partial, $post_type, $context) {
function your_filter_name( $partial, $post_type, $context ) {
// things
return $partial;
}
add_filter('largo_partial_by_post_type', 'your_filter_name', 10, 3);
add_filter( 'largo_partial_by_post_type', 'your_filter_name', 10, 3 );
^

Without setting '3', your filter will not be passed the $post_type or $context arguments.
Expand Down Expand Up @@ -182,11 +182,27 @@ filter: **largo_post_social_more_social_links**

Adding new social media networks is as simple as adding a new item to the array: ::

function add_linkedin($more) {
function add_linkedin( $more ) {
$more[] = '<li><a href=""><i class="icon-linkedin"></i> <span>Your text here!</span></a></li>';
}
add_filter('largo_post_social_more_social_links', 'add_linkedin');
add_filter( 'largo_post_social_more_social_links', 'add_linkedin' );

.. php:function:: filter largo_remove_hero

Filter to disable largo_remove_hero based on the global $post at the time the function is run

:since: 0.5.5
:param Boolean $run: Whether the function should run against the current post
:param WP_Post $post: The global ``$post`` object at the time the function is run

When building your own filter, you must set the fourth parameter of add_filter to 2: ::

function filter_largo_remove_hero( $run, $post ) {
# determine whether or not to run largo_remove_hero based on $post
return $run;
}
add_filter( 'largo_remove_hero', 'filter_largo_remove_hero', 10, 2 );
^


Template Hooks
Expand Down
2 changes: 1 addition & 1 deletion homepages/assets/css/single.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion homepages/assets/css/top-stories.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading