public/wordpress/wp-content/plugins/h5p/admin/class-h5p-content-admin.php
/**
   * Load content and alter page title for certain pages.
   *
   * @since 1.1.0
   * @param string $page
   * @param string $admin_title
   * @param string $title
   * @return string
   */
Load content and alter page title for certain pages.
Load content and alter page title for certain pages .
public function alter_title($page, $admin_title, $title) {
    $task = filter_input(INPUT_GET, 'task', FILTER_SANITIZE_STRING);
    $id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
    $show = ($page === 'h5p' && ($task === 'show' || $task === 'results'));
    $edit = ($page === 'h5p_new');
    if (($show || $edit) && $id !== NULL) {
      if ($this->content === NULL) {
        $this->load_content($id);
      }
      if (!is_string($this->content)) {
        if ($edit) {
          $admin_title = str_replace($title, 'Edit', $admin_title);
        }
        $admin_title = esc_html($this->content['title']) . ' &lsaquo; ' . $admin_title;
      }
    }
    return $admin_title;
  }
public function alter_title ( $ page , $ admin_title , $ title ) { $ task = filter_input ( INPUT_GET , 'task' , FILTER_SANITIZE_STRING ) ; $ id = filter_input ( INPUT_GET , 'id' , FILTER_SANITIZE_NUMBER_INT ) ; $ show = ( $ page === 'h5p' && ( $ task === 'show' || $ task === 'results' ) ) ; $ edit = ( $ page === 'h5p_new' ) ; if ( ( $ show || $ edit ) && $ id !== NULL ) { if ( $ this -> content === NULL ) { $ this -> load_content ( $ id ) ; } if ( ! is_string ( $ this -> content ) ) { if ( $ edit ) { $ admin_title = str_replace ( $ title , 'Edit' , $ admin_title ) ; } $ admin_title = esc_html ( $ this -> content [ 'title' ] ) . ' &lsaquo; ' . $ admin_title ; } } return $ admin_title ; }
Load content and alter page title for certain pages.
Load content and alter page title for certain pages .
// Find content title