Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Oct 24, 2024
1 parent 751e771 commit 69cb749
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion classes/admin/class-dashboard-widget-score.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function render_widget() {
(string) filemtime( PROGRESS_PLANNER_DIR . "/assets/css/dashboard-widgets/{$this->id}.css" )
);

\progress_planner()->the_template( "dashboard-widgets/{$this->id}.php" );
\progress_planner()->the_view( "dashboard-widgets/{$this->id}.php" );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/admin/class-dashboard-widget-todo.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public function render_widget() {
(string) filemtime( PROGRESS_PLANNER_DIR . '/assets/css/page-widgets/todo.css' )
);

\progress_planner()->the_template( "dashboard-widgets/{$this->id}.php" );
\progress_planner()->the_view( "dashboard-widgets/{$this->id}.php" );
}
}
2 changes: 1 addition & 1 deletion classes/admin/class-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function add_page() {
* @return void
*/
public function render_page() {
\progress_planner()->the_template( 'admin-page.php' );
\progress_planner()->the_view( 'admin-page.php' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/class-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function add_action_links( $actions ) {
* @param array $args The arguments to pass to the template.
* @return void
*/
public function the_template( $template, $args = [] ) {
public function the_view( $template, $args = [] ) {
$this->the_file( [ $template, "/views/{$template}" ], $args );
}

Expand Down
2 changes: 1 addition & 1 deletion classes/class-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ protected function should_render() {
* @return void
*/
public function the_content() {
\progress_planner()->the_template( "page-widgets/{$this->id}.php" );
\progress_planner()->the_view( "page-widgets/{$this->id}.php" );
}
}
2 changes: 1 addition & 1 deletion classes/widgets/class-activity-scores.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function get_color( $number, $date ) {
* @return void
*/
public function print_score_gauge() {
\progress_planner()->the_template( 'page-widgets/parts/activity-scores-gauge.php' );
\progress_planner()->the_view( 'page-widgets/parts/activity-scores-gauge.php' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion views/admin-page-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class="prpl-pages-item prpl-pages-item-<?php echo esc_attr( $prpl_setting['page'] ); ?>"
data-page-item="<?php echo esc_attr( $prpl_setting['page'] ); ?>"
>
<?php \progress_planner()->the_template( "setting/{$prpl_setting['type']}.php" ); ?>
<?php \progress_planner()->the_view( "setting/{$prpl_setting['type']}.php" ); ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down
4 changes: 2 additions & 2 deletions views/admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<div class="wrap prpl-wrap">
<h1 class="screen-reader-text"><?php \esc_html_e( 'Progress Planner', 'progress-planner' ); ?></h1>
<?php \progress_planner()->the_template( 'admin-page-header.php' ); ?>
<?php \progress_planner()->the_template( 'welcome.php' ); ?>
<?php \progress_planner()->the_view( 'admin-page-header.php' ); ?>
<?php \progress_planner()->the_view( 'welcome.php' ); ?>

<?php \do_action( 'progress_planner_admin_after_header' ); ?>

Expand Down
2 changes: 1 addition & 1 deletion views/page-widgets/activity-scores.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class="prpl-info-icon"
</h2>

<div style="--background: var(--prpl-background-orange)">
<?php \progress_planner()->the_template( 'page-widgets/parts/activity-scores-gauge.php' ); ?>
<?php \progress_planner()->the_view( 'page-widgets/parts/activity-scores-gauge.php' ); ?>
<p class="hidden" id="prpl-activity-details">
<?php \esc_html_e( 'Your website activity score is based on the amount of website maintenance work you have done over the past 30 days.', 'progress-planner' ); ?>
</p>
Expand Down
2 changes: 1 addition & 1 deletion views/page-widgets/suggested-tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class="prpl-activities-gauge"
</h2>

<ul style="display:none">
<?php \progress_planner()->the_template( 'views/suggested-tasks-item.php' ); ?>
<?php \progress_planner()->the_view( 'views/suggested-tasks-item.php' ); ?>
</ul>
<ul class="prpl-suggested-tasks-list"></ul>

Expand Down

0 comments on commit 69cb749

Please sign in to comment.