Skip to content

Commit

Permalink
Merge pull request #292 from christianwach/lab-wp-139
Browse files Browse the repository at this point in the history
Use custom actions for rendering admin pages
  • Loading branch information
kcristiano authored May 11, 2023
2 parents ae13c1b + 55b108a commit e00c2f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions includes/admin-pages/civicrm.page.error.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct($logo, $position) {
$this->add_menu_items($logo, $position);

// Add our meta boxes.
add_action('add_meta_boxes', [$this, 'meta_boxes_error_add']);
add_action('civicrm/page/error/add_meta_boxes', [$this, 'meta_boxes_error_add']);

}

Expand Down Expand Up @@ -177,7 +177,7 @@ public function page_error() {
*
* @param str $screen_id The ID of the current screen.
*/
do_action('add_meta_boxes', $screen->id, NULL);
do_action('civicrm/page/error/add_meta_boxes', $screen->id);

// Grab columns.
$columns = (1 == $screen->get_columns() ? '1' : '2');
Expand Down
4 changes: 2 additions & 2 deletions includes/admin-pages/civicrm.page.integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function register_hooks() {
add_action('admin_menu', [$this, 'add_menu_items'], 9);

// Add our meta boxes.
add_action('add_meta_boxes', [$this, 'meta_boxes_integration_add']);
add_action('civicrm/page/integration/add_meta_boxes', [$this, 'meta_boxes_integration_add']);

}

Expand Down Expand Up @@ -201,7 +201,7 @@ public function page_integration() {
*
* @param str $screen_id The ID of the current screen.
*/
do_action('add_meta_boxes', $screen->id, NULL);
do_action('civicrm/page/integration/add_meta_boxes', $screen->id);

// Get the column CSS class.
$columns = absint($screen->get_columns());
Expand Down
4 changes: 2 additions & 2 deletions includes/admin-pages/civicrm.page.options.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function register_hooks() {
add_action('admin_menu', [$this, 'add_menu_items'], 9);

// Add our meta boxes.
add_action('add_meta_boxes', [$this, 'meta_boxes_options_add']);
add_action('civicrm/page/options/add_meta_boxes', [$this, 'meta_boxes_options_add']);

// Add AJAX handlers.
add_action('wp_ajax_civicrm_basepage', [$this, 'ajax_save_basepage']);
Expand Down Expand Up @@ -240,7 +240,7 @@ public function page_options() {
*
* @param str $screen_id The ID of the current screen.
*/
do_action('add_meta_boxes', $screen->id, NULL);
do_action('civicrm/page/options/add_meta_boxes', $screen->id);

// Get the column CSS class.
$columns = absint($screen->get_columns());
Expand Down

0 comments on commit e00c2f4

Please sign in to comment.