Changeset 13308 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 03/12/2024 02:27:28 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r13259 r13308 1834 1834 $slug = $args['post_name'] ?: sanitize_title( $title ); 1835 1835 1836 // Remove null items (date-related fields) to fallback to the defaults below. 1837 $args = array_filter( 1838 $args, 1839 function( $item ) { 1840 return ! is_null( $item ); 1841 } 1842 ); 1843 1836 1844 $post_date = current_time( 'mysql' ); 1837 1845 $post_date_gmt = current_time( 'mysql', 1 ); … … 1847 1855 ) ); 1848 1856 1849 $update = ! empty( $args['ID'] );1850 1857 $result = wp_insert_post( $args, true ); 1851 1858 1852 1859 if ( ! is_wp_error( $result ) ) { 1853 1860 wp_cache_set( $result, $slug, 'plugin-slugs' ); 1861 1854 1862 $result = get_post( $result ); 1855 1856 if ( ! $update ) {1857 $owner = get_userdata( $result->post_author );1858 Tools::audit_log( sprintf(1859 'Submitted by <a href="%s">%s</a>.',1860 esc_url( 'https://profiles.wordpress.org/' . $owner->user_nicename . '/' ),1861 $owner->user_login1862 ), $result->ID );1863 }1864 1863 } 1865 1864
Note: See TracChangeset
for help on using the changeset viewer.