WC_Install::plugin_row_meta()
Show row meta on the plugin screen.
Метод класса: WC_Install{}
Хуки из метода
Возвращает
Массив
.
Использование
$result = WC_Install::plugin_row_meta( $links, $file );
- $links(разное) (обязательный)
- Plugin Row Meta.
- $file(разное) (обязательный)
- Plugin Base file.
Код WC_Install::plugin_row_meta() WC Install::plugin row meta WC 9.4.2
public static function plugin_row_meta( $links, $file ) { if ( WC_PLUGIN_BASENAME !== $file ) { return $links; } /** * The WooCommerce documentation URL. * * @since 2.7.0 */ $docs_url = apply_filters( 'woocommerce_docs_url', 'https://woocommerce.com/documentation/plugins/woocommerce/' ); /** * The WooCommerce API documentation URL. * * @since 2.2.0 */ $api_docs_url = apply_filters( 'woocommerce_apidocs_url', 'https://woocommerce.com/wc-apidocs/' ); /** * The community WooCommerce support URL. * * @since 2.2.0 */ $community_support_url = apply_filters( 'woocommerce_community_support_url', 'https://wordpress.org/support/plugin/woocommerce/' ); /** * The premium support URL. * * @since 6.7.0 */ $support_url = apply_filters( 'woocommerce_support_url', 'https://woocommerce.com/my-account/create-a-ticket/' ); $row_meta = array( 'docs' => '<a href="' . esc_url( $docs_url ) . '" aria-label="' . esc_attr__( 'View WooCommerce documentation', 'woocommerce' ) . '">' . esc_html__( 'Docs', 'woocommerce' ) . '</a>', 'apidocs' => '<a href="' . esc_url( $api_docs_url ) . '" aria-label="' . esc_attr__( 'View WooCommerce API docs', 'woocommerce' ) . '">' . esc_html__( 'API docs', 'woocommerce' ) . '</a>', 'support' => '<a href="' . esc_url( $community_support_url ) . '" aria-label="' . esc_attr__( 'Visit community forums', 'woocommerce' ) . '">' . esc_html__( 'Community support', 'woocommerce' ) . '</a>', ); if ( WCConnectionHelper::is_connected() ) { $row_meta['premium_support'] = '<a href="' . esc_url( $support_url ) . '" aria-label="' . esc_attr__( 'Visit premium customer support', 'woocommerce' ) . '">' . esc_html__( 'Premium support', 'woocommerce' ) . '</a>'; } return array_merge( $links, $row_meta ); }