Skip to content

Instantly share code, notes, and snippets.

@yasaryousuf
Last active March 28, 2018 06:41
Show Gist options
  • Save yasaryousuf/2c7d1b6c2ead55571657e78cf0b1d164 to your computer and use it in GitHub Desktop.
Save yasaryousuf/2c7d1b6c2ead55571657e78cf0b1d164 to your computer and use it in GitHub Desktop.
[WPDB SHORT CODES]
<?php
/**
*
*/
class ShortCode
{
public static function init()
{
$self = new self;
add_shortcode( 'payment-form',array($self, 'PaymentForm') );
add_shortcode( 'login',array($self, 'login') );
add_shortcode( 'view-logs',array($self, 'viewlogs') );
add_shortcode( 'admin-event-table',array($self, 'adminEventTable') );
}
public function PaymentForm() {
ob_start();
include_once OP_VIEW_PATH . "content-payment-form.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment