Making WordPress.org

Changeset 10090


Ignore:
Timestamp:
07/22/2020 08:18:32 PM (6 years ago)
Author:
ryelle
Message:

Plugin Directory: Add wp_add_inline_script to warning function list in block checker

See #5303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-block-plugin-checker.php

    r10089 r10090  
    847847                $warning_functions = array(
    848848                        'wp_localize_script',
     849                        'wp_add_inline_script',
    849850                );
    850851                $error_functions = array(
     
    859860                                        __FUNCTION__,
    860861                                        'warning',
    861                                         sprintf( __( 'Found PHP call <a href="%s">%s</a>. This may cause problems.', 'wporg-plugins' ), $this->get_browser_url( $call[2] ) . '#L' . $call[1], $call[0] . '()' ),
     862                                        sprintf(
     863                                                // translators: %s is the function name.
     864                                                __( 'Found PHP call %s. This may cause problems.', 'wporg-plugins' ),
     865                                                '<a href="' . $this->get_browser_url( $call[2] ) . '#L' . $call[1] . '"><code>' . $call[0] . '()</code></a>'
     866                                        ),
    862867                                        $call
    863868                                );
     
    866871                                        __FUNCTION__,
    867872                                        'error',
    868                                         sprintf( __( 'Found PHP call <a href="%s">%s</a>. This is likely to prevent your plugin from working as expected.', 'wporg-plugins' ), $this->get_browser_url( $call[2] ) . '#L' . $call[1], $call[0] . '()' ),
     873                                        sprintf(
     874                                                // translators: %s is the function name.
     875                                                __( 'Found PHP call %s. This is likely to prevent your plugin from working as expected.', 'wporg-plugins' ),
     876                                                '<a href="' . $this->get_browser_url( $call[2] ) . '#L' . $call[1] . '"><code>' . $call[0] . '()</code></a>'
     877                                        ),
    869878                                        $call
    870879                                );
    871880                        }
    872                        
    873881                }
    874882
Note: See TracChangeset for help on using the changeset viewer.