Skip to content

Instantly share code, notes, and snippets.

View pinalj's full-sized avatar

Pinal pinalj

  • Tyche Softwares
  • Mumbai
View GitHub Profile
@pinalj
pinalj / add-notice.php
Last active November 3, 2017 10:39
Adding an error notice
<?php
add_action( 'admin_notices', 'my_error_notice' );
function my_error_notice() {
?>
<div class="notice notice-error">
<p><?php _e( 'There has been an error.', 'my-text-domain' );?></p>
</div>
<?php
}
@pinalj
pinalj / notice.html
Created November 2, 2017 10:10
HTML for notices
<div class='notice notice-error'>
<p>Uh oh! We just received an error.</p>
</div>
<div class='notice notice-success'>
<p>This is an awesome way to add notices!</p>
</div>
<div class='notice notice-info'>
<p>This is supposed to be some informative text.</p>
@pinalj
pinalj / custom-email-manager.php
Last active October 29, 2021 13:52
This file contains the code to include email classes and trigger custom emails.
<?php
/**
* Handles email sending
*/
class Custom_Email_Manager {
/**
* Constructor sets up actions
*/
public function __construct() {