p-scripts.php">functions.wp-scripts.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky functions.wp-styles.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky general-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky http.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky https-detection.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky https-migration.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky kses.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky l10n.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky link-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky load.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky locale.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky media-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky media.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky meta.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-blogs.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-default-constants.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-default-filters.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-deprecated.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-files.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-functions.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-load.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-network.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-settings.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky ms-site.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky nav-menu-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky nav-menu.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky option.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky pluggable-deprecated.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky pluggable.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky plugin.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky post-formats.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky post-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky post-thumbnail-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky post.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky query.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky registration-functions.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky registration.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky rest-api.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky revision.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky rewrite.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky robots-template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky rss-functions.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky rss.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky script-loader.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky session.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky shortcodes.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky sitemaps.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky spl-autoload-compat.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky taxonomy.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky template-canvas.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky template-loader.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky template.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky theme-i18n.json d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky theme-templates.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky theme.json d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky theme.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky update.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky user.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky vars.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky version.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky widgets.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky wlwmanifest.xml d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky wp-db.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky wp-diff.php d01d7cf85d first commit %!s(int64=4) %!d(string=před) roky tum/whitesports - Gogs: Simplico Git Service

暫無描述

duplicate-post-gutenberg.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Gutenberg (Block editor)/Classic Editor compatibility functions
  4. *
  5. * @package Duplicate Post
  6. * @since 4.0
  7. */
  8. add_filter( 'duplicate_post_get_clone_post_link', 'duplicate_post_classic_editor_clone_link', 10, 4 );
  9. /**
  10. * Edits the clone link URL to enforce Classic Editor legacy support.
  11. *
  12. * @see duplicate_post_get_clone_post_link()
  13. *
  14. * @param string $url The duplicate post link URL.
  15. * @param int $post_id The original post ID.
  16. * @param string $context The context in which the URL is used.
  17. * @param bool $draft Whether the link is "New Draft" or "Clone".
  18. *
  19. * @return string
  20. */
  21. function duplicate_post_classic_editor_clone_link( $url, $post_id, $context, $draft ) {
  22. $post = get_post( $post_id );
  23. if ( ! $post ) {
  24. return $url;
  25. }
  26. if ( isset( $_GET['classic-editor'] ) // phpcs:ignore WordPress.Security.NonceVerification
  27. || ( $draft && function_exists( 'gutenberg_post_has_blocks' ) && ! gutenberg_post_has_blocks( $post ) )
  28. || ( $draft && function_exists( 'has_blocks' ) && ! has_blocks( $post ) ) ) {
  29. if ( 'display' === $context ) {
  30. $url .= '&amp;classic-editor';
  31. } else {
  32. $url .= '&classic-editor';
  33. }
  34. }
  35. return $url;
  36. }