IP : 18.191.100.220Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
public_html/
wp-includes/
widgets/
../
theme-templates.php/
/
<?php
/** * Sets a custom slug when creating auto-draft template parts. * * This is only needed for auto-drafts created by the regular WP editor. * If this page is to be removed, this will not be necessary. * * @since 5.9.0 * * @param int $post_id Post ID. */ function wp_set_unique_slug_on_create_template_part( $post_id ) { $post = get_post( $post_id ); if ( 'auto-draft' !== $post->post_status ) { return; }
/** * Generates a unique slug for templates. * * @access private * @since 5.8.0 * * @param string $override_slug The filtered value of the slug (starts as `null` from apply_filter). * @param string $slug The original/un-filtered slug (post_name). * @param int $post_id Post ID. * @param string $post_status No uniqueness checks are made if the post is still draft or pending. * @param string $post_type Post type. * @return string The original, desired slug. */ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_id, $post_status, $post_type ) { if ( 'wp_template' !== $post_type && 'wp_template_part' !== $post_type ) { return $override_slug; }
if ( ! $override_slug ) { $override_slug = $slug; }
/* * Template slugs must be unique within the same theme. * TODO - Figure out how to update this to work for a multi-theme environment. * Unfortunately using `get_the_terms()` for the 'wp-theme' term does not work * in the case of new entities since is too early in the process to have been saved * to the entity. So for now we use the currently activated theme for creation. */ $theme = get_stylesheet(); $terms = get_the_terms( $post_id, 'wp_theme' ); if ( $terms && ! is_wp_error( $terms ) ) { $theme = $terms[0]->name; }
// Early exit if a skip-link target can't be located. if ( ! skipLinkTarget ) { return; }
/* * Get the site wrapper. * The skip-link will be injected in the beginning of it. */ sibling = document.querySelector( '.wp-site-blocks' );
// Early exit if the root element was not found. if ( ! sibling ) { return; }
// Get the skip-link target's ID, and generate one if it doesn't exist. skipLinkTargetID = skipLinkTarget.id; if ( ! skipLinkTargetID ) { skipLinkTargetID = 'wp--skip-link--target'; skipLinkTarget.id = skipLinkTargetID; }
// Create the skip link. skipLink = document.createElement( 'a' ); skipLink.classList.add( 'skip-link', 'screen-reader-text' ); skipLink.id = 'wp-skip-link'; skipLink.href = '#' + skipLinkTargetID; skipLink.innerText = '<?php /* translators: Hidden accessibility text. Do not use HTML entities ( , etc.). */ esc_html_e( 'Skip to content' ); ?>';