Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: install_theme_overwrite_comparison

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
280           /**
281            * Filters the compare table output for overwriting a theme package on upload.
282            *
283            * @since 5.5.0
284            *
285            * @param string $table              The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
286            * @param array  $current_theme_data Array with current theme data.
287            * @param array  $new_theme_data     Array with uploaded theme data.
288            */
289           echo apply_filters( 'install_theme_overwrite_comparison', $table, $current_theme_data, $new_theme_data );
290
291           $install_actions = array();
292           $can_update      = true;
293
294           $blocked_message  = '<p>' . esc_html( __( 'The theme cannot be updated due to the following:' ) ) . '</p>';
295           $blocked_message .= '<ul class="ul-disc">';
296
297           $requires_php = isset( $new_theme_data['RequiresPHP'] ) ? $new_theme_data['RequiresPHP'] : null;
298           $requires_wp  = isset( $new_theme_data['RequiresWP'] ) ? $new_theme_data['RequiresWP'] : null;