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

lint and update permissions for deploy #2

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
deploy:
needs: bundle
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
deployments: write

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
tools: cs2pr

- name: Install Composer dependencies
uses: 'ramsey/composer-install@v2'
uses: 'ramsey/composer-install@v3'
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

// ===========================================================================
// Custom Functions
// ===========================================================================
// ===========================================================================
12 changes: 6 additions & 6 deletions inc/class-admin-dashboard-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct() {
}

/**
* Remove the dashboard widgets
* Remove the dashboard widgets.
*/
public function remove_dashboard_widgets() {
$meta_boxes = array(
Expand Down Expand Up @@ -57,14 +57,14 @@ public function remove_dashboard_widgets() {
}

/**
* Add a new widget to the dashboard using a custom function
* Add a new widget to the dashboard using a custom function.
*/
public function add_dashboard_widgets() {
$the_title = get_bloginfo( 'name' );
wp_add_dashboard_widget(
'k1_dashboard_welcome_widget', // Widget slug
'Welcome to ' . $the_title, // Widget title
array( $this, 'k1_dashboard_welcome_widget_function' ) // Function name to display the widget
'k1_dashboard_welcome_widget', // Widget slug.
'Welcome to ' . $the_title, // Widget title.
array( $this, 'k1_dashboard_welcome_widget_function' ) // Function name to display the widget.
);
}

Expand All @@ -78,4 +78,4 @@ public function k1_dashboard_welcome_widget_function() {
echo esc_html( "Hey {$first_name}! Welcome to the your site. If you have any troubles, questions, or dream features, be sure to reach out to us at <a href='mailto:{$k1_email}'>{$k1_email}</a>" );
}
}
}
}
2 changes: 1 addition & 1 deletion inc/class-theme-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ public function enqueue_styles() {
public function dequeue_scripts() {
wp_dequeue_style( 'x-child' );
}
}
}