| @@ -142,9 +142,9 @@ | ||
| 142 | 142 | return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE title=%s", esc_attr( $title ) ) ); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | public static function update( $data, $where, $data_formats ): void { |
| 146 | - if ( ! current_user_can( 'unfiltered_html' ) ) { | |
| 146 | + if ( ! WPCoder::user_can_manage() ) { | |
| 147 | 147 | return; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | global $wpdb; |
| @@ -152,9 +152,9 @@ | ||
| 152 | 152 | $result = $wpdb->update( $table, $data, $where, $data_formats ); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | public static function insert( $data, $data_formats ) { |
| 156 | - if ( ! current_user_can( 'unfiltered_html' ) ) { | |
| 156 | + if ( ! WPCoder::user_can_manage() ) { | |
| 157 | 157 | return false; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | global $wpdb; |