original_string: public static function get_applicable_publish_states() {
          global $CFG;
          $options = array();
  
          // Everyone gets draft access.
          if ($CFG->bloglevel >= BLOG_USER_LEVEL) {
              $options['draft'] = get_string('publishtonoone', 'blog');
          }
  
          if ($CFG->bloglevel > BLOG_USER_LEVEL) {
              $options['site'] = get_string('publishtosite', 'blog');
          }
  
          if ($CFG->bloglevel >= BLOG_GLOBAL_LEVEL) {
              $options['public'] = get_string('publishtoworld', 'blog');
          }
  
          return $options;
      }
code: public static function get_applicable_publish_states() {
          global $CFG;
          $options = array();
  
          // Everyone gets draft access.
          if ($CFG->bloglevel >= BLOG_USER_LEVEL) {
              $options['draft'] = get_string('publishtonoone', 'blog');
          }
  
          if ($CFG->bloglevel > BLOG_USER_LEVEL) {
              $options['site'] = get_string('publishtosite', 'blog');
          }
  
          if ($CFG->bloglevel >= BLOG_GLOBAL_LEVEL) {
              $options['public'] = get_string('publishtoworld', 'blog');
          }
  
          return $options;
      }
code_tokens: public static function get_applicable_publish_states ( ) { global $ CFG ; $ options = array ( ) ; // Everyone gets draft access. if ( $ CFG -> bloglevel >= BLOG_USER_LEVEL ) { $ options [ 'draft' ] = get_string ( 'publishtonoone' , 'blog' ) ; } if ( $ CFG -> bloglevel > BLOG_USER_LEVEL ) { $ options [ 'site' ] = get_string ( 'publishtosite' , 'blog' ) ; } if ( $ CFG -> bloglevel >= BLOG_GLOBAL_LEVEL ) { $ options [ 'public' ] = get_string ( 'publishtoworld' , 'blog' ) ; } return $ options ; }
docstring: Use this function to retrieve a list of publish states available for
  the currently logged in user.
  
  @return array This function returns an array ideal for sending to moodles'
  choose_from_menu function.
docstring_tokens: Use this function to retrieve a list of publish states available for the currently logged in user .