hasDependencies() статический публичный Метод

Dependency check.
static public hasDependencies ( ) : boolean
Результат boolean
 /**
  * Returns a filtered array of tabs that we should be loading.
  * @returns array
  */
 static function getTabs()
 {
     $tabs = array('global' => '\\Pressbooks\\Modules\\ThemeOptions\\GlobalOptions', 'web' => '\\Pressbooks\\Modules\\ThemeOptions\\WebOptions', 'pdf' => '\\Pressbooks\\Modules\\ThemeOptions\\PDFOptions', 'mpdf' => '\\Pressbooks\\Modules\\ThemeOptions\\MPDFOptions', 'ebook' => '\\Pressbooks\\Modules\\ThemeOptions\\EbookOptions');
     if (!\Pressbooks\Modules\Export\Prince\Pdf::hasDependencies()) {
         unset($tabs['pdf']);
     }
     if (!\Pressbooks\Modules\Export\Mpdf\Pdf::hasDependencies()) {
         unset($tabs['mpdf']);
     }
     return apply_filters('pressbooks_theme_options_tabs', $tabs);
 }
Пример #2
0
/><label for="print_pdf"> <?php 
_e('PDF (for print)', 'pressbooks');
?>
</label><br />
				<input type="checkbox" id="pdf" name="export_formats[pdf]" value="1" <?php 
if (false == $prince) {
    ?>
disabled <?php 
}
?>
/><label for="pdf"> <?php 
_e('PDF (for digital distribution)', 'pressbooks');
?>
</label><br />
				<?php 
if (true == \Pressbooks\Modules\Export\Mpdf\Pdf::hasDependencies()) {
    ?>
					<input type="checkbox" id="mpdf" name="export_formats[mpdf]" value="1" /><label for="mpdf"> <?php 
    _e('PDF (mPDF)', 'pressbooks');
    ?>
</label><br />
				<?php 
}
?>
				<input type="checkbox" id="epub" name="export_formats[epub]" value="1" <?php 
if (false == $epub) {
    ?>
disabled <?php 
}
?>
/><label for="epub"> <?php