Skip to content

Commit

Permalink
Merge pull request #171 from PRX/feat/add-link-shortcut-tw-program-page
Browse files Browse the repository at this point in the history
Adds admin sidebar link to TW Program page
  • Loading branch information
brandonhundt authored Mar 15, 2024
2 parents 3efb92f + 0fe3219 commit 73c789b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 38 deletions.
85 changes: 47 additions & 38 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,50 @@
{
"cSpell.words": [
"ABSPATH",
"DOCROOT",
"jetpack",
"Lando",
"multidev",
"multidevs",
"newspack",
"pullquote",
"SITEURL",
"ssot",
"uncategorized",
"untrailingslashit",
"wpcfm",
"WPINC",
"WPMU"
],
"cSpell.ignorePaths": [
"package-lock.json",
"node_modules",
"vscode-extension",
".git/objects",
".vscode",
".vscode-insiders",
"wp-content/plugins",
"vendor"
],
"phpcs.composerJsonPath": "composer.json",
"phpcs.executablePath": "./vendor/bin/phpcs",
"phpcs.standard": "WordPress",
"phpSniffer.autoDetect": true,
"phpSniffer.standard": "WordPress",
"editorconfig.generateAuto": false,
"editor.formatOnSave": true,
"[php]": {
"editor.defaultFormatter": "wongjn.php-sniffer"
},
"cSpell.words": [
"ABSPATH",
"blockembed",
"dashicons",
"DOCROOT",
"httponly",
"jetpack",
"Lando",
"multidev",
"multidevs",
"newspack",
"pagename",
"postname",
"pullquote",
"shortcode",
"SITEURL",
"ssot",
"theworld",
"uncategorized",
"untrailingslashit",
"wlwmanifest",
"wpcfm",
"WPINC",
"WPMU",
"wpseo"
],
"cSpell.ignorePaths": [
"package-lock.json",
"node_modules",
"vscode-extension",
".git/objects",
".vscode",
".vscode-insiders",
"wp-content/plugins",
"vendor"
],
"phpcs.composerJsonPath": "composer.json",
"phpcs.executablePath": "./vendor/bin/phpcs",
"phpcs.standard": "WordPress",
"phpSniffer.autoDetect": true,
"phpSniffer.standard": "WordPress",
"editorconfig.generateAuto": false,
"editor.formatOnSave": true,
"[php]": {
"editor.defaultFormatter": "wongjn.php-sniffer"
},
"[html]": {
"editor.defaultFormatter": "co6x0.vscode-wp-block-html"
},
Expand All @@ -45,7 +54,7 @@
"editor.quickSuggestions": {
"strings": "on"
},
"editor.defaultFormatter": null,
"editor.defaultFormatter": null,
"eslint.format.enable": true,
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
Expand Down
12 changes: 12 additions & 0 deletions wp-content/themes/the-world/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,15 @@ function tw_remove_core_block_patterns() {

// Remove Windows Live Writer manifest link.
remove_action( 'wp_head', 'wlwmanifest_link' );

if ( ! function_exists( 'tw_add_edit_homepage_menu_link' ) ) :
/**
* Add convenient link for editors to edit homepage.
*
* @uses add_menu_page() Add links to the menu.
*/
function tw_add_edit_homepage_menu_link() {
add_menu_page('tw_edit_homepage_link', 'The World Homepage', 'publish_posts', "/wp-admin/term.php?taxonomy=program&tag_ID=2&post_type=post", '', 'dashicons-admin-site-alt3', 8);
}
endif;
add_action('admin_menu', 'tw_add_edit_homepage_menu_link');

0 comments on commit 73c789b

Please sign in to comment.