";
}
// A. Execute the function assigned to the subsection
if ( isset( $active_section_array['subsections'][ $active_subsection ]['function'] ) ) {
$class_name = $active_section_array['subsections'][ $active_subsection ]['function']['class'];
$section_object = new $class_name();
$section_content = call_user_func( array( $section_object, $active_section_array['subsections'][ $active_subsection ]['function']['method'] ) );
} // B. Execute the function assigned to the section
else if ( isset( $active_section_array['function'] ) ) {
$class_name = $active_section_array['function']['class'];
$section_object = new $class_name();
$section_content = call_user_func( array( $section_object, $active_section_array['function']['method'] ) );
} // C. Display the raw HTMl output of subsection
else if ( isset( $active_section_array['subsections'][ $active_subsection ]['html'] ) ) {
$section_content = $active_section_array['subsections'][ $active_subsection ]['html'];
} // D. Try to display the raw HTMl output of section
else {
$section_content = ( isset( $active_section_array['html'] ) ) ? $active_section_array['html'] : "";
}
$html .= "
{$section_content}
";
$html .= "
";
// Display alerts and another content if needed and close .wrap container
$html .= $permalink_manager_after_sections_html;
$html .= "
";
return $html;
}
/**
* Display the array or HTML table with updated slugs after one of the actions is triggered
*
* @param array $updated_array
* @param bool $return_array
* @param bool $display_full_table
* @param bool $preview_mode
*
* @return array|string
*/
static function display_updated_slugs( $updated_array, $return_array = false, $display_full_table = true, $preview_mode = false ) {
global $permalink_manager_before_sections_html, $adjust_id_url_filter_off;
$updated_slugs_count = 0;
$html = $main_content = $alert = "";
// Disable "Adjust IDs for multilingual functionality" in WPML to make sure that the correct URLs are displayed in the results table
$adjust_id_url_filter_off = true; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
if ( is_array( $updated_array ) ) {
// Check if slugs should be displayed
$first_slug = reset( $updated_array );
$show_slugs = ( ! empty( $_POST['mode'] ) && $_POST['mode'] == 'slugs' ) ? true : false; // phpcs:ignore WordPress.Security.NonceVerification.Missing
$header_footer = '