-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1688 from greenpeace/post-category-links
Add setting to link to category directly
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace P4\MasterTheme\Features; | ||
|
||
use P4\MasterTheme\Feature; | ||
use P4\MasterTheme\Settings\InformationArchitecture; | ||
|
||
/** | ||
* @see description() | ||
*/ | ||
class PostPageCategoryLinks extends Feature { | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function id(): string { | ||
return 'post_page_category_links'; | ||
} | ||
|
||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected static function name(): string { | ||
return __( 'Post Page Category Links', 'planet4-master-theme-backend' ); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected static function description(): string { | ||
return __( | ||
'On post pages, link to the categories, instead of a page that has the same category ("issue pages").', | ||
'planet4-master-theme-backend' | ||
); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected static function options_key(): string { | ||
return InformationArchitecture::OPTIONS_KEY; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function show_toggle_production(): bool { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters