function set_usm_utm_cookie() { if (!isset($_COOKIE[‘utm_params’])) { $current_path = $_SERVER[‘REQUEST_URI’]; $path_parts = explode(‘?’, $current_path, 2); $current_path = $path_parts[0]; $utm_params_value = “utm_source=us_mobile&utm_medium=organic&utm_campaign=” . urlencode($current_path); // Set a cookie with URL-encoded path for 1 year setcookie(‘utm_params’, $utm_params_value, time() + (365 * 24 *…Continue reading
function enqueue_jquery() { if (!wp_script_is(‘jquery’, ‘enqueued’)) { wp_enqueue_script(‘jquery’); } } add_action(‘wp_enqueue_scripts’, ‘enqueue_jquery’);Continue reading
/**Change Author Slug */ function new_author_base() { global $wp_rewrite; $author_slug = ‘about’; $wp_rewrite->author_base = $author_slug; } add_action(‘init’, ‘new_author_base’);Continue reading
//* Evitar que WP cree tamaños de imagen adicionales add_action(‘intermediate_image_sizes_advanced’, function ($sizes) { unset($sizes[‘1536×1536’]); // desactivar tamaño medio-grande x2 unset($sizes[‘2048×2048’]); // desactivar tamaño grande x2 return $sizes; }); //* Evitar que se creen los tamaños escalados add_filter(‘big_image_size_threshold’, ‘__return_false’, PHP_INT_MAX-20); //*…Continue reading
/** Customize the from email address for the Save and Resume addon. @param string $from_address The current from email address. @param object $email The email object. @return string */ function wpf_save_resume_change_from_email( $from_address, $email ) { // Check if this is…Continue reading
/** * Class deleteuploadedfiles to delete uploaded files from the server * * @link https://wpforms.com/developers/class-deleteuploadedfiles/ */ namespace WPF; class DeleteUploadedFiles { /** * Should we delete files from the WordPress Media Library? * Change the constant to true to delete…Continue reading
/** * Return post types with default meta boxes for The7 theme * * @author Golden Oak Web Design * @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2+ */ function golden_oak_web_design_presscore_pages_with_basic_meta_boxes( $post_type_array ) { $post_type_array = array( ‘page’, ‘post’, ‘mec-events’ ); return $post_type_array; } add_filter(…Continue reading
!function (w, d, t) { w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=[“page”,”track”,”identify”,”instances”,”debug”,”on”,”off”,”once”,”ready”,”alias”,”group”,”enableCookie”,”disableCookie”,”holdConsent”,”revokeConsent”,”grantConsent”],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for( var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script") ;n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)}; ttq.load('D0TAVPBC77UC6ES2KLK0'); ttq.page(); }(window, document, 'ttq');Continue reading