Changeset 3416968
- Timestamp:
- 12/11/2025 05:05:44 AM (3 months ago)
- Location:
- liaison-site-prober/trunk
- Files:
-
- 13 added
- 4 edited
-
.github (added)
-
.github/workflows (added)
-
.github/workflows/plugin-test-actions.yml (added)
-
README.txt (modified) (2 diffs)
-
bin (added)
-
bin/install-wp-tests.sh (added)
-
bin/setup.sh (added)
-
composer.json (added)
-
includes/class-liaison-site-prober-actions.php (modified) (2 diffs)
-
includes/class-liaison-site-prober-list-table.php (modified) (6 diffs)
-
liaison-site-prober.php (modified) (2 diffs)
-
phpunit.xml.dist (added)
-
tests (added)
-
tests/bootstrap.php (added)
-
tests/test-actions.php (added)
-
tests/test-admin.php (added)
-
tests/test-list-table.php (added)
Legend:
- Unmodified
- Added
- Removed
-
liaison-site-prober/trunk/README.txt
r3408825 r3416968 62 62 == Screenshots == 63 63 64 1. Dashboard: Liaison Site Prober Settings panel. 65 2. Example view of logged activities. 64 1. Dashboard: Liaison Site Prober Settings panel. Example view of logged activities. 66 65 67 66 == Changelog == 67 68 = 1.1.0 = 69 * Add PHPUnit test cases. 68 70 69 71 = 1.0.0 = … … 72 74 == Upgrade Notice == 73 75 76 = 1.1.0 = 77 * Add PHPUnit test cases. 78 74 79 = 1.0.0 = 75 80 First stable release. -
liaison-site-prober/trunk/includes/class-liaison-site-prober-actions.php
r3408825 r3416968 36 36 //add_action( 'export_wp', [ $this, 'wpsp_export_csv' ] ); 37 37 38 if ( defined('WP_RUNNING_PHPUNIT') ) { 39 return; 40 } 38 41 add_action( 'activated_plugin', [ $this, 'wpsp_plugin_activated' ], 10, 2 ); 39 42 add_action( 'deactivated_plugin', [ $this, 'wpsp_plugin_deactivated' ], 10, 2 ); … … 204 207 205 208 $action = 'created'; 209 $term_id = $comment->comment_post_ID; 206 210 switch ( current_filter() ) { 207 211 case 'wp_insert_comment' : -
liaison-site-prober/trunk/includes/class-liaison-site-prober-list-table.php
r3408825 r3416968 21 21 ); 22 22 23 $this->table_name = $wpdb->wpsp_activity; 23 //$this->table_name = $wpdb->wpsp_activity; 24 $this->table_name = $args['table_name'] ?? $wpdb->wpsp_activity; 24 25 } 25 26 … … 169 170 echo '<div class="alignleft actions">'; 170 171 171 //$table = sanitize_key( $this->table_name );172 172 $cache_key = 'site_prober_logs_page_'; 173 173 $cache_group = 'liaison-site-prober'; … … 230 230 $output[ $user->ID ] = $user->user_nicename; 231 231 } 232 233 // if ( ! empty( $output ) ) {234 // echo '<select name="usershow" id="hs-filter-usershow">';235 // printf( '<option value="">%s</option>', __( 'All Users', 'aryo-activity-log' ) );236 // foreach ( $output as $key => $value ) {237 // printf( '<option value="%s"%s>%s</option>', $key, selected( $_REQUEST['usershow'], $key, false ), $value );238 // }239 // echo '</select>';240 // }241 232 242 233 $selected_value = isset( $_REQUEST['usershow'] ) … … 271 262 } 272 263 273 // echo '<select name="typeshow" id="hs-filter-typeshow">';274 // printf( '<option value="">%s</option>', __( 'All Objects', 'liaison-site-prober' ) );275 // echo implode( '', $output );276 // echo '</select>';277 264 $output = array(); 278 265 … … 362 349 363 350 $items_per_page = 20; 364 //$table = $this->table_name;365 351 366 352 $clear = isset( $_POST['clearLogs'] ) ? sanitize_text_field( wp_unslash( $_POST['clearLogs'] ) ) : ''; 367 353 if ( $clear ){ 368 //error_log( 'clearLogs');369 354 check_admin_referer( 'wpsp_list_table_action', 'wpsp_nonce' ); 370 355 $this->delete_all_items(); … … 412 397 $results = wp_cache_get( $cache_key, $cache_group ); 413 398 414 if ( ( is_array( $results['items'] ) ) 415 && ( false !== $results['total_items'] ) 416 ) { 399 if ( is_array( $results ) 400 && isset( $results['items'], $results['total_items'] ) 401 && is_array( $results['items'] ) ) 402 { 417 403 $this->items = $results['items']; 418 404 $total_items = $results['total_items']; -
liaison-site-prober/trunk/liaison-site-prober.php
r3408825 r3416968 9 9 * that starts the plugin. 10 10 * 11 * @link https://github.com/liaisontw/ wp-site-prober11 * @link https://github.com/liaisontw/liaison-site-prober_svn_git 12 12 * @since 1.0.0 13 13 * @package liaison-site-prober … … 15 15 * @wordpress-plugin 16 16 * Plugin Name: Liaison Site Prober 17 * Plugin URI: https://github.com/liaisontw/ wp-site-prober17 * Plugin URI: https://github.com/liaisontw/liaison-site-prober_svn_git 18 18 * Description: Simple activity / audit logger for WordPress. Creates activity table, hooks common events, admin UI and CSV export. 19 * Version: 1. 0.019 * Version: 1.1.0 20 20 * Author: liason 21 21 * Author URI: https://github.com/liaisontw/
Note: See TracChangeset
for help on using the changeset viewer.