This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// cron_lib.php — shared helper for cron job scripts | |
/** | |
* Call a remote job URL with cURL and exit with a proper status code. | |
* Optional cooldown: skip run if last run is too recent. | |
* | |
* exit(0) = success (or intentionally skipped due to cooldown) | |
* exit(1) = failure | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
/* Sticky panel: stays below the header, then pins at the bottom of the anchor */ | |
const STICKY_BREAKPOINT = 992; | |
const STICKY_OFFSET = 95; | |
if (window.innerWidth < STICKY_BREAKPOINT) return; | |
const anchor = document.querySelector('.js-sticky-anchor'); | |
const panel = document.querySelector('.js-sticky-floating'); | |
if (!anchor || !panel) return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PhpXmlRpc\Value; | |
use PhpXmlRpc\Client; | |
use PhpXmlRpc\Request; | |
/** | |
* This class is used to interact with an Odoo server using XML-RPC protocol. | |
* It provides methods to login and fetch data from the Odoo server. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Replaces the default `Description` field in the `Add New Term` form. | |
* | |
* @param string $taxonomy The taxonomy of the new term. | |
*/ | |
function replace_description_field_add( $taxonomy ) { | |
?> | |
<div class="form-field term-description-wrap"> | |
<label for="tag-description"><?php _e( 'Description' ); ?></label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disables Gutenberg for posts. | |
*/ | |
add_filter( 'use_block_editor_for_post', '__return_false' ); | |
/** | |
* Disables Gutenberg for widgets. | |
*/ | |
add_filter( 'use_widgets_block_editor', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Displays a custom comment form. | |
*/ | |
function custom_comment_form() { | |
?> | |
<div id="custom-comment-form" class="wrap"> | |
<h1>Add to comments</h1> | |
<form method="post"> | |
<table class="form-table"> |