/** * Custom Post Type UI Admin UI. * * @package CPTUI * @subpackage AdminUI * @author WebDevStudios * @since 1.0.0 * @license GPL-2.0+ * * phpcs:disable WebDevStudios.All.RequireAuthor */ /** * Custom Post Type UI Admin UI * * @since 1.0.0 */ class cptui_admin_ui { /** * Return an opening `` tag. * * @since 1.0.0 * @since 1.13.0 Added attributes parameter * * @param array $atts Array of custom attributes to add to the tag. * @return string $value Opening `` tag with attributes. */ public function get_tr_start( $atts = [] ) { $atts_str = ''; if ( ! empty( $atts ) ) { $atts_str = ' ' . $this->get_custom_attributes( $atts ); } return ''; } /** * Return a closing `` tag. * * @since 1.0.0 * * @return string $value Closing `` tag. */ public function get_tr_end() { return ''; } /** * Return an opening `` tag. * * @since 1.0.0 * @since 1.13.0 Added attributes parameter. * * @param array $atts Array of attributes to add to the tag. * @return string $value Opening `` tag with attributes. */ public function get_th_start( $atts = [] ) { $atts_str = ''; if ( ! empty( $atts ) ) { $atts_str = ' ' . $this->get_custom_attributes( $atts ); } return ""; } /** * Return a closing `` tag. * * @since 1.0.0 * * @return string $value Closing `` tag. */ public function get_th_end() { return ''; } /** * Return an opening `` tag. * * @since 1.0.0 * @since 1.13.0 Added attributes parameter. * * @param array $atts Array of attributes to add to the tag. * @return string $value Opening `` tag. */ public function get_td_start( $atts = [] ) { $atts_str = ''; if ( ! empty( $atts ) ) { $atts_str = ' ' . $this->get_custom_attributes( $atts ); } return ""; } /** * Return a closing `` tag. * * @since 1.0.0 * * @return string $value Closing `` tag. */ public function get_td_end() { return ''; } /** * Return an opening `
` tag. * * @since 1.2.0 * @since 1.3.0 Added $args parameter. * @since 1.13.0 Added $atts parameter * * @param array $args Array of arguments. * @param array $atts Array of custom attributes for the tag. * @return string $value Opening `
` tag. */ public function get_fieldset_start( $args = [], $atts = [] ) { $fieldset = 'get_custom_attributes( $atts ); } $fieldset .= ' tabindex="0">'; return $fieldset; } /** * Return an closing `
` tag. * * @since 1.2.0 * * @return string $value Closing `
` tag. */ public function get_fieldset_end() { return '
'; } /** * Return an opening `` tag. * * @since 1.3.0 * * @return string */ public function get_legend_start( $atts = [] ) { $atts_str = ''; if ( ! empty( $atts ) ) { $atts_str = ' ' . $this->get_custom_attributes( $atts ); } return ""; } /** * Return a closing `` tag. * * @since 1.3.0 * * @return string */ public function get_legend_end() { return ''; } /** * Return string wrapped in a `

` tag. * * @since 1.0.0 * * @param string $text Content to wrap in a `

` tag. * @return string $value Content wrapped in a `

` tag. */ public function get_p( $text = '' ) { return '

' . $text . '

'; } /** * Return a form