Skip to content

Instantly share code, notes, and snippets.

View nilsbosman's full-sized avatar

Nils Bosman nilsbosman

View GitHub Profile
@lgladdy
lgladdy / acf_enable_detailed_escape_logging_to_php_error_log.php
Last active April 8, 2024 08:48
Always log the post ID and value of a HTML escaped field
<?php
add_action( 'acf/will_remove_unsafe_html', 'acf_enable_detailed_escape_logging_to_php_error_log', 10, 4 );
add_action( 'acf/removed_unsafe_html', 'acf_enable_detailed_escape_logging_to_php_error_log', 10, 4 );
function acf_enable_detailed_escape_logging_to_php_error_log( $function, $selector, $field_object, $post_id ) {
if ( $function === 'the_sub_field' ) {
$field = get_sub_field_object( $selector, true );
$value = ( is_array( $field ) && isset( $field['value'] ) ) ? $field['value'] : false;
} else {
$value = get_field( $selector, $post_id );
}
@Neo23x0
Neo23x0 / wpwatcher.py
Last active November 26, 2022 15:42
Wordpress Watcher - WPScan Vulnerabilty Scan on Wordpress Sites and Reporting
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# -*- coding: utf-8 -*-
#
# Wordpress Watcher
# Automating WPscan to scan and report vulnerable Wordpress sites
# Florian Roth
# v0.1
# March 2015
#