Type: php
Use a WooCommerce Product Attribute as the Brand in Product Schema
add_filter( ‘aioseo_schema_output’, ‘aioseo_filter_schema_output’ ); function aioseo_filter_schema_output( $graph ) { if ( ! function_exists( ‘is_product’ ) || ! is_product() ) { return $graph; } foreach ( $graph as &$item ) { if ( ‘Product’ !== $item[‘@type’] ) { continue; } if…Continue reading
Disable Auto-Scaling Oversized Images
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading
Tablepress_get_cell
function tablepress_cell_to_url_shortcode( $atts ) { $atts = shortcode_atts( array( ‘table_id’ => ”, ‘row’ => 1, ‘col’ => 1, ‘page’ => ”, // Zielseite ‘param’ => ‘wert’, // Parametername ), $atts, ‘tablepress_link’ ); $table_data = tablepress_get_table( $atts[‘table_id’], true ); if (…Continue reading
List of all Users
Test Look at logged in user
Donation Form Email Check (Advanced)
add_filter(‘charitable_validate_donation_form_submission_email_check’, ‘charitable_test_for_email’, 10, 2 ); function charitable_test_for_email( $valid, $submitted ) { $email = $submitted->get_submitted_value( ’email’ ); if ( ! is_valid_email( $email ) ) { return false; } return $valid; } function is_valid_email($email) { // Use PHP’s built-in function to split…Continue reading
meta description audit
Add Extra Facebook Pixel
add_filter(‘wpcode_get_snippets_for_location’, function( $snippets, $location ) { if (‘site_wide_header’ === $location ) { foreach ($snippets as $key => $snippet) { if (‘pixel_facebook’ === $snippet->id) { $snippets[$key]->code = str_replace(“fbq(‘init’”, “fbq(‘init’, ‘NEW_PIXEL_ID’); fbq(‘init’”, $snippet->code); } } } return $snippets; }, 12, 2);Continue reading