expose acf

function expose_acf_to_rest() { register_rest_field(‘game_state’, ‘acf’, [ ‘get_callback’ => function($post_arr) { return get_fields($post_arr[‘id’]); }, ‘update_callback’ => null, ‘schema’ => null, ]); } add_action(‘rest_api_init’, ‘expose_acf_to_rest’);Continue reading

fundamentals

Game State Round: 0/10 Cash: $0 Automobile Production: 0 units Industry Level: 0 Start New Game Save Game Load Game Restart Game Progress to Next RoundContinue reading

game_start

Round: 1/5 Cash: $5000 Automobile Production: 1000 units Industry Level: 5 Start New Game Save Game Load Game Restart GameContinue reading

add 2 nos

function addNumbers() { // Get input values const num1 = parseFloat(document.getElementById(‘num1’).value); const num2 = parseFloat(document.getElementById(‘num2’).value); // Check if inputs are valid numbers if (isNaN(num1) || isNaN(num2)) { alert(‘Please enter valid numbers.’); return; } // Perform addition const sum = num1…Continue reading

Dynamic Copyright Date

if ( ! function_exists( ‘wpb_copyright’ ) ) { function wpb_copyright() { // Cache the output so we don’t have to run the query on every page load. $output = get_transient( ‘wpb_copyright_text’ ); if ( false !== $output ) { //…Continue reading

cmplz_show_banner_on_click

function addEvent(event, selector, callback, context) { document.addEventListener(event, e => { if ( e.target.closest(selector) ) { callback(e); } }); } addEvent(‘click’, ‘.cmplz-show-banner’, function(){ document.querySelectorAll(‘.cmplz-manage-consent’).forEach(obj => { obj.click(); }); });Continue reading

TranslatePress Shortcode Styler MINIMAL

/* Grundlegende Anpassungen für den Sprachumschalter */ .trp-language-switcher { all: unset !important; display: inline-block !important; position: relative !important; /* Verhindert Verschiebungen */ } /* Entfernt alle Padding-, Margin- und Rahmenwerte */ .trp-language-switcher a { all: unset !important; display: inline-block !important;…Continue reading