Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. add_action( 'init', 'register_shortcodes');
  2.  
  3. add_shortcode( 'recent-posts', 'recent_posts_function' );
  4.  
  5. /**
  6. * Register all of the hooks related to the admin area functionality
  7. * of the plugin
  8. */
  9.  
  10. private function define_admin_hooks() {
  11.  
  12. $plugin_admin = new instance( $this->get_plugin_name(), $this->get_version() );
  13.  
  14. $this->loader->add_action( 'init', $plugin_admin, 'register_shortcodes');
  15. }
  16.  
  17. public function register_shortcodes(){
  18.  
  19. add_shortcode('recent-posts', array($this, 'recent_posts_function'));
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement