Disable Posts in Admin

add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘new-post’ ); }, 100 ); add_action( ‘admin_menu’, function () { remove_menu_page( ‘edit.php’ ); } );Continue reading

Disable the Excerpt in RSS Feeds

// Make sure we display the excerpt in the feed. add_filter( ‘pre_option_rss_use_excerpt’, ‘__return_true’ ); // Remove the excerpt content for feeds. add_filter( ‘the_excerpt_rss’, ‘__return_empty_string’ );Continue reading

Add recaptcha policy to all gravity forms

add_filter( ‘gform_submit_button’, ‘add_recaptcha_branding’, 10, 2 ); function add_recaptcha_branding( $button, $form ) { return $button .= ‘ This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. ‘; }Continue reading

link dinámico

function custom_canonical_link() { $canonical_url = esc_url(home_url(‘/default-link’)); echo ‘‘; echo ‘‘; } add_action(‘wp_head’, ‘custom_canonical_link’);Continue reading

Canónica

require_once ‘vendor/autoload.php’; use League\Uri\Uri; // URL de ejemplo $urlOriginal = “https://aclaraciondigital.net/5854576289”; // Parsear la URL utilizando la biblioteca league/uri $parsedUrl = Uri::createFromString($urlOriginal); // Normalizar la URL $normalizedUrl = (string) $parsedUrl; // Mostrar la URL original y la URL normalizada echo…Continue reading

mensajePrueba

/** * Plugin Name: Mi Plugin de Prueba * Description: Este es un plugin de prueba para WPCode Snippet. * Version: 1.0 * Author: Tu Nombre */ // Agrega un shortcode para mostrar el mensaje. function mensaje_de_prueba_shortcode() { return ‘…Continue reading

Untitled Snippet

i want a on off button that when press each other send logical true if press on and false when press off …i want this for local web page that control IoT thing with microcontroller that writted with c++ and…Continue reading