Dizin Yönetimi
Mevcut Dizin:
/home/kumasan2525/kaisen-nakora.jp/public_html/wp-includes
🔼 Üst Dizin
Dosya İşlemleri
Dosya Yükle
Yükle
Dosyalar ve Dizinler
📁
ID3
📁
IXR
📁
PHPMailer
📁
Requests
📁
SimplePie
📁
Text
📁
abilities-api
📁
assets
📁
block-bindings
📁
block-patterns
📁
block-supports
📁
blocks
📁
certificates
📁
css
📁
customize
📁
fonts
📁
html-api
📁
images
📁
interactivity-api
📁
js
📁
l10n
📁
php-compat
📁
pomo
📁
rest-api
📁
sitemaps
📁
sodium_compat
📁
style-engine
📁
theme-compat
📁
widgets
📄 abilities-api.php
İzinleri Güncelle
Düzenle
Sil
📄 abilities.php
İzinleri Güncelle
Düzenle
Sil
📄 admin-bar.php
İzinleri Güncelle
Düzenle
Sil
📄 atomlib.php
İzinleri Güncelle
Düzenle
Sil
📄 author-template.php
İzinleri Güncelle
Düzenle
Sil
📄 block-bindings.php
İzinleri Güncelle
Düzenle
Sil
📄 block-editor.php
İzinleri Güncelle
Düzenle
Sil
📄 block-i18n.json
İzinleri Güncelle
Sil
📄 block-patterns.php
İzinleri Güncelle
Düzenle
Sil
📄 block-template-utils.php
İzinleri Güncelle
Düzenle
Sil
📄 block-template.php
İzinleri Güncelle
Düzenle
Sil
📄 blocks.php
İzinleri Güncelle
Düzenle
Sil
📄 bookmark-template.php
İzinleri Güncelle
Düzenle
Sil
📄 bookmark.php
İzinleri Güncelle
Düzenle
Sil
📄 cache-compat.php
İzinleri Güncelle
Düzenle
Sil
📄 cache.php
İzinleri Güncelle
Düzenle
Sil
📄 canonical.php
İzinleri Güncelle
Düzenle
Sil
📄 capabilities.php
İzinleri Güncelle
Düzenle
Sil
📄 category-template.php
İzinleri Güncelle
Düzenle
Sil
📄 category.php
İzinleri Güncelle
Düzenle
Sil
📄 class-IXR.php
İzinleri Güncelle
Düzenle
Sil
📄 class-avif-info.php
İzinleri Güncelle
Düzenle
Sil
📄 class-feed.php
İzinleri Güncelle
Düzenle
Sil
📄 class-http.php
İzinleri Güncelle
Düzenle
Sil
📄 class-json.php
İzinleri Güncelle
Düzenle
Sil
📄 class-oembed.php
İzinleri Güncelle
Düzenle
Sil
📄 class-phpass.php
İzinleri Güncelle
Düzenle
Sil
📄 class-phpmailer.php
İzinleri Güncelle
Düzenle
Sil
📄 class-pop3.php
İzinleri Güncelle
Düzenle
Sil
📄 class-requests.php
İzinleri Güncelle
Düzenle
Sil
📄 class-simplepie.php
İzinleri Güncelle
Düzenle
Sil
📄 class-smtp.php
İzinleri Güncelle
Düzenle
Sil
📄 class-snoopy.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-category-dropdown.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-category.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-comment.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-nav-menu.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-page-dropdown.php
İzinleri Güncelle
Düzenle
Sil
📄 class-walker-page.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-admin-bar.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-ajax-response.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-application-passwords.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-bindings-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-bindings-source.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-editor-context.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-list.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-metadata-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-parser-block.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-parser-frame.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-parser.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-pattern-categories-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-patterns-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-processor.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-styles-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-supports.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-template.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-templates-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-type-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block-type.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-block.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-classic-to-block-menu-converter.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-comment-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-comment.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-control.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-manager.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-nav-menus.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-panel.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-section.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-setting.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-customize-widgets.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-date-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-dependencies.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-dependency.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-duotone.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-editor.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-embed.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-error.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-exception.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-fatal-error-handler.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-feed-cache-transient.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-feed-cache.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-hook.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-cookie.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-curl.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-encoding.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-ixr-client.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-proxy.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-requests-hooks.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-requests-response.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-response.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http-streams.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-http.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-image-editor-gd.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-image-editor-imagick.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-image-editor.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-list-util.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-locale-switcher.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-locale.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-matchesmapregex.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-meta-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-metadata-lazyloader.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-navigation-fallback.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-network-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-network.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-object-cache.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-oembed-controller.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-oembed.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-paused-extensions-storage.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-phpmailer.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-plugin-dependencies.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-post-type.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-post.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-recovery-mode-cookie-service.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-recovery-mode-email-service.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-recovery-mode-key-service.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-recovery-mode-link-service.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-recovery-mode.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-rewrite.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-role.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-roles.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-script-modules.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-scripts.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-session-tokens.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-simplepie-file.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-simplepie-sanitize-kses.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-site-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-site.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-speculation-rules.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-styles.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-tax-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-taxonomy.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-term-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-term.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-text-diff-renderer-inline.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-text-diff-renderer-table.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-textdomain-registry.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-theme-json-data.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-theme-json-resolver.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-theme-json-schema.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-theme-json.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-theme.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-token-map.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-url-pattern-prefixer.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-user-meta-session-tokens.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-user-query.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-user-request.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-user.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-walker.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-widget-factory.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-widget.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp-xmlrpc-server.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wp.php
İzinleri Güncelle
Düzenle
Sil
📄 class-wpdb.php
İzinleri Güncelle
Düzenle
Sil
📄 class.wp-dependencies.php
İzinleri Güncelle
Düzenle
Sil
📄 class.wp-scripts.php
İzinleri Güncelle
Düzenle
Sil
📄 class.wp-styles.php
İzinleri Güncelle
Düzenle
Sil
📄 comment-template.php
İzinleri Güncelle
Düzenle
Sil
📄 comment.php
İzinleri Güncelle
Düzenle
Sil
📄 compat-utf8.php
İzinleri Güncelle
Düzenle
Sil
📄 compat.php
İzinleri Güncelle
Düzenle
Sil
📄 cron.php
İzinleri Güncelle
Düzenle
Sil
📄 date.php
İzinleri Güncelle
Düzenle
Sil
📄 default-constants.php
İzinleri Güncelle
Düzenle
Sil
📄 default-filters.php
İzinleri Güncelle
Düzenle
Sil
📄 default-widgets.php
İzinleri Güncelle
Düzenle
Sil
📄 deprecated.php
İzinleri Güncelle
Düzenle
Sil
📄 embed-template.php
İzinleri Güncelle
Düzenle
Sil
📄 embed.php
İzinleri Güncelle
Düzenle
Sil
📄 error-protection.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-atom-comments.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-atom.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-rdf.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-rss.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-rss2-comments.php
İzinleri Güncelle
Düzenle
Sil
📄 feed-rss2.php
İzinleri Güncelle
Düzenle
Sil
📄 feed.php
İzinleri Güncelle
Düzenle
Sil
📄 fonts.php
İzinleri Güncelle
Düzenle
Sil
📄 formatting.php
İzinleri Güncelle
Düzenle
Sil
📄 functions.php
İzinleri Güncelle
Düzenle
Sil
📄 functions.wp-scripts.php
İzinleri Güncelle
Düzenle
Sil
📄 functions.wp-styles.php
İzinleri Güncelle
Düzenle
Sil
📄 general-template.php
İzinleri Güncelle
Düzenle
Sil
📄 global-styles-and-settings.php
İzinleri Güncelle
Düzenle
Sil
📄 http.php
İzinleri Güncelle
Düzenle
Sil
📄 https-detection.php
İzinleri Güncelle
Düzenle
Sil
📄 https-migration.php
İzinleri Güncelle
Düzenle
Sil
📄 kses.php
İzinleri Güncelle
Düzenle
Sil
📄 l10n.php
İzinleri Güncelle
Düzenle
Sil
📄 link-template.php
İzinleri Güncelle
Düzenle
Sil
📄 load.php
İzinleri Güncelle
Düzenle
Sil
📄 locale.php
İzinleri Güncelle
Düzenle
Sil
📄 media-template.php
İzinleri Güncelle
Düzenle
Sil
📄 media.php
İzinleri Güncelle
Düzenle
Sil
📄 meta.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-blogs.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-default-constants.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-default-filters.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-deprecated.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-files.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-functions.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-load.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-network.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-settings.php
İzinleri Güncelle
Düzenle
Sil
📄 ms-site.php
İzinleri Güncelle
Düzenle
Sil
📄 nav-menu-template.php
İzinleri Güncelle
Düzenle
Sil
📄 nav-menu.php
İzinleri Güncelle
Düzenle
Sil
📄 option.php
İzinleri Güncelle
Düzenle
Sil
📄 pluggable-deprecated.php
İzinleri Güncelle
Düzenle
Sil
📄 pluggable.php
İzinleri Güncelle
Düzenle
Sil
📄 plugin.php
İzinleri Güncelle
Düzenle
Sil
📄 post-formats.php
İzinleri Güncelle
Düzenle
Sil
📄 post-template.php
İzinleri Güncelle
Düzenle
Sil
📄 post-thumbnail-template.php
İzinleri Güncelle
Düzenle
Sil
📄 post.php
İzinleri Güncelle
Düzenle
Sil
📄 query.php
İzinleri Güncelle
Düzenle
Sil
📄 registration-functions.php
İzinleri Güncelle
Düzenle
Sil
📄 registration.php
İzinleri Güncelle
Düzenle
Sil
📄 rest-api.php
İzinleri Güncelle
Düzenle
Sil
📄 revision.php
İzinleri Güncelle
Düzenle
Sil
📄 rewrite.php
İzinleri Güncelle
Düzenle
Sil
📄 robots-template.php
İzinleri Güncelle
Düzenle
Sil
📄 rss-functions.php
İzinleri Güncelle
Düzenle
Sil
📄 rss.php
İzinleri Güncelle
Düzenle
Sil
📄 script-loader.php
İzinleri Güncelle
Düzenle
Sil
📄 script-modules.php
İzinleri Güncelle
Düzenle
Sil
📄 session.php
İzinleri Güncelle
Düzenle
Sil
📄 shortcodes.php
İzinleri Güncelle
Düzenle
Sil
📄 sitemaps.php
İzinleri Güncelle
Düzenle
Sil
📄 speculative-loading.php
İzinleri Güncelle
Düzenle
Sil
📄 spl-autoload-compat.php
İzinleri Güncelle
Düzenle
Sil
📄 style-engine.php
İzinleri Güncelle
Düzenle
Sil
📄 taxonomy.php
İzinleri Güncelle
Düzenle
Sil
📄 template-canvas.php
İzinleri Güncelle
Düzenle
Sil
📄 template-loader.php
İzinleri Güncelle
Düzenle
Sil
📄 template.php
İzinleri Güncelle
Düzenle
Sil
📄 theme-i18n.json
İzinleri Güncelle
Sil
📄 theme-previews.php
İzinleri Güncelle
Düzenle
Sil
📄 theme-templates.php
İzinleri Güncelle
Düzenle
Sil
📄 theme.json
İzinleri Güncelle
Sil
📄 theme.php
İzinleri Güncelle
Düzenle
Sil
📄 update.php
İzinleri Güncelle
Düzenle
Sil
📄 user.php
İzinleri Güncelle
Düzenle
Sil
📄 utf8.php
İzinleri Güncelle
Düzenle
Sil
📄 vars.php
İzinleri Güncelle
Düzenle
Sil
📄 version.php
İzinleri Güncelle
Düzenle
Sil
📄 widgets.php
İzinleri Güncelle
Düzenle
Sil
📄 wp-db.php
İzinleri Güncelle
Düzenle
Sil
📄 wp-diff.php
İzinleri Güncelle
Düzenle
Sil
Dosya Düzenle: class-wp-error.php
<?php /** * WordPress Error API. * * @package WordPress */ /** * WordPress Error class. * * Container for checking for WordPress errors and error messages. Return * WP_Error and use is_wp_error() to check if this class is returned. Many * core WordPress functions pass this class in the event of an error and * if not handled properly will result in code errors. * * @since 2.1.0 */ #[AllowDynamicProperties] class WP_Error { /** * Stores the list of errors. * * @since 2.1.0 * @var array */ public $errors = array(); /** * Stores the most recently added data for each error code. * * @since 2.1.0 * @var array */ public $error_data = array(); /** * Stores previously added data added for error codes, oldest-to-newest by code. * * @since 5.6.0 * @var array[] */ protected $additional_data = array(); /** * Initializes the error. * * If `$code` is empty, the other parameters will be ignored. * When `$code` is not empty, `$message` will be used even if * it is empty. The `$data` parameter will be used only if it * is not empty. * * Though the class is constructed with a single error code and * message, multiple codes can be added using the `add()` method. * * @since 2.1.0 * * @param string|int $code Error code. * @param string $message Error message. * @param mixed $data Optional. Error data. Default empty string. */ public function __construct( $code = '', $message = '', $data = '' ) { if ( empty( $code ) ) { return; } $this->add( $code, $message, $data ); } /** * Retrieves all error codes. * * @since 2.1.0 * * @return array List of error codes, if available. */ public function get_error_codes() { if ( ! $this->has_errors() ) { return array(); } return array_keys( $this->errors ); } /** * Retrieves the first error code available. * * @since 2.1.0 * * @return string|int Empty string, if no error codes. */ public function get_error_code() { $codes = $this->get_error_codes(); if ( empty( $codes ) ) { return ''; } return $codes[0]; } /** * Retrieves all error messages, or the error messages for the given error code. * * @since 2.1.0 * * @param string|int $code Optional. Error code to retrieve the messages for. * Default empty string. * @return string[] Error strings on success, or empty array if there are none. */ public function get_error_messages( $code = '' ) { // Return all messages if no code specified. if ( empty( $code ) ) { $all_messages = array(); foreach ( (array) $this->errors as $code => $messages ) { $all_messages = array_merge( $all_messages, $messages ); } return $all_messages; } if ( isset( $this->errors[ $code ] ) ) { return $this->errors[ $code ]; } else { return array(); } } /** * Gets a single error message. * * This will get the first message available for the code. If no code is * given then the first code available will be used. * * @since 2.1.0 * * @param string|int $code Optional. Error code to retrieve the message for. * Default empty string. * @return string The error message. */ public function get_error_message( $code = '' ) { if ( empty( $code ) ) { $code = $this->get_error_code(); } $messages = $this->get_error_messages( $code ); if ( empty( $messages ) ) { return ''; } return $messages[0]; } /** * Retrieves the most recently added error data for an error code. * * @since 2.1.0 * * @param string|int $code Optional. Error code. Default empty string. * @return mixed Error data, if it exists. */ public function get_error_data( $code = '' ) { if ( empty( $code ) ) { $code = $this->get_error_code(); } if ( isset( $this->error_data[ $code ] ) ) { return $this->error_data[ $code ]; } } /** * Verifies if the instance contains errors. * * @since 5.1.0 * * @return bool If the instance contains errors. */ public function has_errors() { if ( ! empty( $this->errors ) ) { return true; } return false; } /** * Adds an error or appends an additional message to an existing error. * * @since 2.1.0 * * @param string|int $code Error code. * @param string $message Error message. * @param mixed $data Optional. Error data. Default empty string. */ public function add( $code, $message, $data = '' ) { $this->errors[ $code ][] = $message; if ( ! empty( $data ) ) { $this->add_data( $data, $code ); } /** * Fires when an error is added to a WP_Error object. * * @since 5.6.0 * * @param string|int $code Error code. * @param string $message Error message. * @param mixed $data Error data. Might be empty. * @param WP_Error $wp_error The WP_Error object. */ do_action( 'wp_error_added', $code, $message, $data, $this ); } /** * Adds data to an error with the given code. * * @since 2.1.0 * @since 5.6.0 Errors can now contain more than one item of error data. {@see WP_Error::$additional_data}. * * @param mixed $data Error data. * @param string|int $code Error code. */ public function add_data( $data, $code = '' ) { if ( empty( $code ) ) { $code = $this->get_error_code(); } if ( isset( $this->error_data[ $code ] ) ) { $this->additional_data[ $code ][] = $this->error_data[ $code ]; } $this->error_data[ $code ] = $data; } /** * Retrieves all error data for an error code in the order in which the data was added. * * @since 5.6.0 * * @param string|int $code Error code. * @return mixed[] Array of error data, if it exists. */ public function get_all_error_data( $code = '' ) { if ( empty( $code ) ) { $code = $this->get_error_code(); } $data = array(); if ( isset( $this->additional_data[ $code ] ) ) { $data = $this->additional_data[ $code ]; } if ( isset( $this->error_data[ $code ] ) ) { $data[] = $this->error_data[ $code ]; } return $data; } /** * Removes the specified error. * * This function removes all error messages associated with the specified * error code, along with any error data for that code. * * @since 4.1.0 * * @param string|int $code Error code. */ public function remove( $code ) { unset( $this->errors[ $code ] ); unset( $this->error_data[ $code ] ); unset( $this->additional_data[ $code ] ); } /** * Merges the errors in the given error object into this one. * * @since 5.6.0 * * @param WP_Error $error Error object to merge. */ public function merge_from( WP_Error $error ) { static::copy_errors( $error, $this ); } /** * Exports the errors in this object into the given one. * * @since 5.6.0 * * @param WP_Error $error Error object to export into. */ public function export_to( WP_Error $error ) { static::copy_errors( $this, $error ); } /** * Copies errors from one WP_Error instance to another. * * @since 5.6.0 * * @param WP_Error $from The WP_Error to copy from. * @param WP_Error $to The WP_Error to copy to. */ protected static function copy_errors( WP_Error $from, WP_Error $to ) { foreach ( $from->get_error_codes() as $code ) { foreach ( $from->get_error_messages( $code ) as $error_message ) { $to->add( $code, $error_message ); } foreach ( $from->get_all_error_data( $code ) as $data ) { $to->add_data( $data, $code ); } } } }
Kaydet