Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Metabox::process_fields()
Process fields to setup navigation and content with minimal PHP loops.
Description Description
Called by $this->output()
before actually outputting html.
Return Return
(void)
Source Source
File: includes/abstracts/abstract.llms.admin.metabox.php
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | } delete_option( $this ->error_opt_key ); } /** * Process fields to setup navigation and content with minimal PHP loops. * * Called by `$this->output()` before actually outputting html. * * @since 3.0.0 * @since 3.16.14 Unknown. * @since 6.0.0 Move single field processing logic to a specific method {@see LLMS_Admin_Metabox::process_field()}. * * @return void */ private function process_fields() { // Create a filter-safe ID that conforms to WordPress coding standards for hooks. $id = str_replace ( '-' , '_' , $this ->id ); /** * Customize metabox fields prior to field processing. * * The dynamic portion of this filter, `$id`, corresponds to the classes `$id` property with * dashes (`-`) replaced with underscores (`_`). If the class id is "my-metabox" the filter would be * "llms_metabox_fields_my_metabox". * * @since Unknown * * @param array $fields Array of metabox fields. */ $fields = apply_filters( "llms_metabox_fields_{$id}" , $this ->get_fields() ); $this ->total_tabs = count ( $fields ); foreach ( $fields as $i => $tab ) { $i ++; $current = 1 === $i ? ' llms-active' : '' ; $this ->navigation .= '<li class="llms-nav-item tab-link ' . $current . '" data-tab="' . $this ->id . '-tab-' . $i . '"><span class="llms-nav-link">' . $tab [ 'title' ] . '</span></li>' ; $this ->content .= '<div id="' . $this ->id . '-tab-' . $i . '" class="tab-content' . $current . '"><ul>' ; foreach ( $tab [ 'fields' ] as $field ) { $this ->content .= $this ->process_field( $field ); } $this ->content .= '</ul></div>' ; } } /** * Process single field. |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.14 | Unknown. |
3.0.0 | Introduced. |