Advertisement
simonwheatley

admin_notices – Jigoshop validation

Dec 3rd, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. /**
  2.  * Hooks the WP admin_notices action to add in a notice
  3.  * if the Mediaburst credentials aren't added in settings.
  4.  *
  5.  * @return void
  6.  **/
  7. public function admin_notices() {
  8.     if ( 'yes' == get_option( 'mbesms_jigobase_admin_notifications' ) && ! trim( get_option( 'mbesms_jigobase_admin_number' ) ) ) {
  9.         $url = admin_url( '/admin.php?page=settings' );
  10.         $this->render_admin_error( sprintf( __( '<strong>Jigoshop SMS error:</strong> To enable Admin SMS notifications, please enter an admin mobile number and admin country on the “SMS” tab in the <a href="%s">Jigoshop Settings</a>, alternatively set “admin SMS notifications” to “no”.', 'jigoshopsms' ), $url ) );
  11.     }
  12.     if ( strlen( get_option( 'mbesms_jigobase_from' ) ) > 11 )
  13.         $this->show_from_length_error();
  14. }
  15.  
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement