/** * Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide * or change the default buttons on bottom form. * * @brief Buttons Reset and Update * * @return string */ public function buttonsUpdateReset() { $args = array('name' => 'update-preferences'); $button_update = WPDKUI::button(__('Update', WPDK_TEXTDOMAIN), $args); /** * Filter the HTML markup for update button. * * The dynamic portion of the hook name, $branch, refers to the branch property name. * * @param string $branch The HTML markup for button update. */ $button_update = apply_filters('wpdk_preferences_button_update-' . $this->branch_property, $button_update); // Confirm message for reset to defaul $confirm = __("Are you sure to reset this preferences to default values?\n\nThis operation is not reversible!", WPDK_TEXTDOMAIN); /** * Filter the reset to default confirm message. * * @param string $confirm The reset to default confirm message. */ $confirm = apply_filters('wpdk_preferences_reset_to_default_confirm_message', $confirm); $args = array('name' => 'reset-to-default-preferences', 'classes' => 'button-secondary', 'data' => array('confirm' => $confirm)); $button_reset = WPDKUI::button(__('Reset to default', WPDK_TEXTDOMAIN), $args); /** * Filter the HTML markup for reset button. * * The dynamic portion of the hook name, $branch, refers to the branch property name. * * @param string $branch The HTML markup for button reset. */ $button_reset = apply_filters('wpdk_preferences_button_reset-' . $this->branch_property, $button_reset); /** * Filter the array with bottom buttons. * * @param array $buttons List of bottom buttons. */ $buttons = apply_filters('wpdk_preferences_buttons-' . $this->branch_property, array($button_reset, $button_update)); // Avoid the paragraph if (empty($buttons)) { return; } return sprintf('<p>%s</p>', implode('', $buttons)); }
/** * Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide * or change the default buttons on bottom form. * * @brief Buttons Reset and Update * @since 1.0.0.b3 * @note You can overide this method * * @return string */ public function buttonsUpdateReset() { return WPDKUI::buttonsUpdateReset(); }