/home/techb158/on-time-movers.com/wp-includes
NameSizeModeActions
abilities-api/-0755rm
ai-client/-0755rm
assets/-0755rm
block-bindings/-0755rm
block-patterns/-0755rm
block-supports/-0755rm
blocks/-0755rm
build/-0755rm
certificates/-0755rm
css/-0755rm
customize/-0755rm
fonts/-0755rm
html-api/-0755rm
ID3/-0755rm
images/-0755rm
interactivity-api/-0755rm
IXR/-0755rm
js/-0755rm
l10n/-0755rm
php-ai-client/-0755rm
php-compat/-0755rm
PHPMailer/-0755rm
pomo/-0755rm
Requests/-0755rm
rest-api/-0755rm
SimplePie/-0755rm
sitemaps/-0755rm
sodium_compat/-0755rm
style-engine/-0755rm
Text/-0755rm
theme-compat/-0755rm
widgets/-0755rm
.htaccess1780644editdlrm
abilities-api.php328000644editdlrm
abilities.php117970644editdlrm
admin-bar.php400670644editdlrm
ai-client.php25490644editdlrm
atomlib.php121810644editdlrm
author-template.php198440644editdlrm
block-bindings.php76320644editdlrm
block-editor.php287240644editdlrm
block-i18n.json3160644editdlrm
block-patterns.php156060644editdlrm
block-template-utils.php631680644editdlrm
block-template.php182570644editdlrm
blocks.php1242050644editdlrm
bookmark-template.php127680644editdlrm
bookmark.php154270644editdlrm
cache-compat.php110210644editdlrm
cache.php134860644editdlrm
canonical.php347860644editdlrm
capabilities.php435840644editdlrm
category-template.php569900644editdlrm
category.php128340644editdlrm
class-avif-info.php300080644editdlrm
class-feed.php5390644editdlrm
class-http.php3670644editdlrm
class-IXR.php26090644editdlrm
class-json.php436760644editdlrm
class-oembed.php4010644editdlrm
class-phpass.php67710644editdlrm
class-phpmailer.php6640644editdlrm
class-pop3.php211000644editdlrm
class-requests.php22370644editdlrm
class-simplepie.php4530644editdlrm
class-smtp.php4570644editdlrm
class-snoopy.php377150644editdlrm
class-walker-category-dropdown.php24690644editdlrm
class-walker-category.php84770644editdlrm
class-walker-comment.php142210644editdlrm
class-walker-nav-menu.php120440644editdlrm
class-walker-page-dropdown.php27100644editdlrm
class-walker-page.php76120644editdlrm
class-wp-admin-bar.php180020644editdlrm
class-wp-ajax-response.php52880644editdlrm
class-wp-application-passwords.php170990644editdlrm
class-wp-block-bindings-registry.php82630644editdlrm
class-wp-block-bindings-source.php29920644editdlrm
class-wp-block-editor-context.php13500644editdlrm
class-wp-block-list.php47130644editdlrm
class-wp-block-metadata-registry.php118460644editdlrm
class-wp-block-parser-block.php25550644editdlrm
class-wp-block-parser-frame.php19940644editdlrm
class-wp-block-parser.php115250644editdlrm
class-wp-block-pattern-categories-registry.php43830644editdlrm
class-wp-block-patterns-registry.php102650644editdlrm
class-wp-block-processor.php699140644editdlrm
class-wp-block-styles-registry.php64190644editdlrm
class-wp-block-supports.php75780644editdlrm
class-wp-block-template.php21110644editdlrm
class-wp-block-templates-registry.php70800644editdlrm
class-wp-block-type-registry.php53050644editdlrm
class-wp-block-type.php172220644editdlrm
class-wp-block.php282360644editdlrm
class-wp-classic-to-block-menu-converter.php40260644editdlrm
class-wp-comment-query.php490400644editdlrm
class-wp-comment.php172490644editdlrm
class-wp-connector-registry.php151810644editdlrm
class-wp-customize-control.php261120644editdlrm
class-wp-customize-manager.php2029080644editdlrm
class-wp-customize-nav-menus.php580340644editdlrm
class-wp-customize-panel.php107030644editdlrm
class-wp-customize-section.php112090644editdlrm
class-wp-customize-setting.php299560644editdlrm
class-wp-customize-widgets.php725960644editdlrm
class-wp-date-query.php359700644editdlrm
class-wp-dependencies.php170890644editdlrm
class-wp-dependency.php26530644editdlrm
class-wp-duotone.php408360644editdlrm
class-wp-editor.php722280644editdlrm
class-wp-embed.php159080644editdlrm
class-wp-error.php75140644editdlrm
class-wp-exception.php2530644editdlrm
class-wp-fatal-error-handler.php81500644editdlrm
class-wp-feed-cache-transient.php33040644editdlrm
class-wp-feed-cache.php9690644editdlrm
class-wp-filter-sentinel.php7600644editdlrm
class-wp-hook.php174720644editdlrm
class-wp-http-cookie.php72690644editdlrm
class-wp-http-curl.php132610644editdlrm
class-wp-http-encoding.php66890644editdlrm
class-wp-http-ixr-client.php35160644editdlrm
class-wp-http-proxy.php59800644editdlrm
class-wp-http-requests-hooks.php20220644editdlrm
class-wp-http-requests-response.php42430644editdlrm
class-wp-http-response.php29770644editdlrm
class-wp-http-streams.php167640644editdlrm
class-wp-http.php416410644editdlrm
class-wp-icon-collections-registry.php58050644editdlrm
class-wp-icons-registry.php99030644editdlrm
class-wp-image-editor-gd.php207410644editdlrm
class-wp-image-editor-imagick.php434540644editdlrm
class-wp-image-editor.php174560644editdlrm
class-wp-list-util.php74430644editdlrm
class-wp-locale-switcher.php67760644editdlrm
class-wp-locale.php168480644editdlrm
class-wp-matchesmapregex.php18280644editdlrm
class-wp-meta-query.php305070644editdlrm
class-wp-metadata-lazyloader.php68330644editdlrm
class-wp-navigation-fallback.php91930644editdlrm
class-wp-network-query.php199890644editdlrm
class-wp-network.php124110644editdlrm
class-wp-object-cache.php175240644editdlrm
class-wp-oembed-controller.php69050644editdlrm
class-wp-oembed.php343720644editdlrm
class-wp-paused-extensions-storage.php50670644editdlrm
class-wp-phpmailer.php43480644editdlrm
class-wp-plugin-dependencies.php252090644editdlrm
class-wp-post-type.php306720644editdlrm
class-wp-post.php88060644editdlrm
class-wp-query.php1641480644editdlrm
class-wp-recovery-mode-cookie-service.php68770644editdlrm
class-wp-recovery-mode-email-service.php111620644editdlrm
class-wp-recovery-mode-key-service.php49140644editdlrm
class-wp-recovery-mode-link-service.php35230644editdlrm
class-wp-recovery-mode.php114600644editdlrm
class-wp-rewrite.php636930644editdlrm
class-wp-role.php25230644editdlrm
class-wp-roles.php93260644editdlrm
class-wp-script-modules.php407430644editdlrm
class-wp-scripts.php367540644editdlrm
class-wp-session-tokens.php73190644editdlrm
class-wp-simplepie-file.php35520644editdlrm
class-wp-simplepie-sanitize-kses.php19030644editdlrm
class-wp-site-query.php314820644editdlrm
class-wp-site.php78360644editdlrm
class-wp-speculation-rules.php78840644editdlrm
class-wp-styles.php133160644editdlrm
class-wp-tax-query.php195770644editdlrm
class-wp-taxonomy.php185590644editdlrm
class-wp-term-query.php407510644editdlrm
class-wp-term.php52630644editdlrm
class-wp-text-diff-renderer-inline.php9790644editdlrm
class-wp-text-diff-renderer-table.php189250644editdlrm
class-wp-textdomain-registry.php104810644editdlrm
class-wp-theme-json-data.php18050644editdlrm
class-wp-theme-json-resolver.php356920644editdlrm
class-wp-theme-json-schema.php73670644editdlrm
class-wp-theme-json.php2215060644editdlrm
class-wp-theme.php658110644editdlrm
class-wp-token-map.php290320644editdlrm
class-wp-url-pattern-prefixer.php48020644editdlrm
class-wp-user-meta-session-tokens.php29540644editdlrm
class-wp-user-query.php441020644editdlrm
class-wp-user-request.php23420644editdlrm
class-wp-user.php231890644editdlrm
class-wp-view-config-data.php294270644editdlrm
class-wp-walker.php132920644editdlrm
class-wp-widget-factory.php33430644editdlrm
class-wp-widget.php184520644editdlrm
class-wp-xmlrpc-server.php2162720644editdlrm
class-wp.php263710644editdlrm
class-wpdb.php1214370644editdlrm
class.wp-dependencies.php3730644editdlrm
class.wp-scripts.php3430644editdlrm
class.wp-styles.php3380644editdlrm
comment-template.php1032110644editdlrm
comment.php1506300644editdlrm
compat-utf8.php193860644editdlrm
compat.php224790644editdlrm
connectors.php329220644editdlrm
cron.php462660644editdlrm
date.php4000644editdlrm
default-constants.php113650644editdlrm
default-filters.php395000644editdlrm
default-widgets.php22880644editdlrm
deprecated.php1939770644editdlrm
embed-template.php3380644editdlrm
embed.php392150644editdlrm
error-protection.php40920644editdlrm
error_log101880644editdlrm
feed-atom-comments.php55040644editdlrm
feed-atom.php31140644editdlrm
feed-rdf.php26680644editdlrm
feed-rss.php11890644editdlrm
feed-rss2-comments.php41360644editdlrm
feed-rss2.php37990644editdlrm
feed.php251890644editdlrm
fonts.php97890644editdlrm
formatting.php3576520644editdlrm
functions.php2954810644editdlrm
functions.wp-scripts.php204920644editdlrm
functions.wp-styles.php86540644editdlrm
general-template.php1834720644editdlrm
global-styles-and-settings.php207800644editdlrm
http.php289610644editdlrm
https-detection.php58570644editdlrm
https-migration.php47410644editdlrm
icons.php63340644editdlrm
json-schema.php78020644editdlrm
kses.php884970644editdlrm
l10n.php714150644editdlrm
link-template.php1601430644editdlrm
load.php564750644editdlrm
locale.php1620644editdlrm
media-template.php657590644editdlrm
media.php2368040644editdlrm
meta.php667390644editdlrm
ms-blogs.php263240644editdlrm
ms-default-constants.php49210644editdlrm
ms-default-filters.php66360644editdlrm
ms-deprecated.php217870644editdlrm
ms-files.php28570644editdlrm
ms-functions.php925300644editdlrm
ms-load.php200550644editdlrm
ms-network.php37820644editdlrm
ms-settings.php41970644editdlrm
ms-site.php417290644editdlrm
nav-menu-template.php259830644editdlrm
nav-menu.php442690644editdlrm
option.php1052460644editdlrm
pluggable-deprecated.php63240644editdlrm
pluggable.php1279190644editdlrm
plugin.php366690644editdlrm
post-formats.php70700644editdlrm
post-template.php691290644editdlrm
post-thumbnail-template.php108790644editdlrm
post.php3052150644editdlrm
query.php375540644editdlrm
registration-functions.php2000644editdlrm
registration.php2000644editdlrm
rest-api.php1029510644editdlrm
revision.php312410644editdlrm
rewrite.php195670644editdlrm
robots-template.php51850644editdlrm
rss-functions.php2770644editdlrm
rss.php232030644editdlrm
script-loader.php1635500644editdlrm
script-modules.php123110644editdlrm
session.php2580644editdlrm
shortcodes.php240340644editdlrm
sitemaps.php32380644editdlrm
speculative-loading.php118800644editdlrm
spl-autoload-compat.php4410644editdlrm
style-engine.php80450644editdlrm
taxonomy.php1783070644editdlrm
template-canvas.php5440644editdlrm
template-loader.php42670644editdlrm
template.php368240644editdlrm
theme-i18n.json18920644editdlrm
theme-previews.php28870644editdlrm
theme-templates.php40600644editdlrm
theme.json94800644editdlrm
theme.php1346410644editdlrm
update.php382690644editdlrm
user.php1803010644editdlrm
utf8.php69770644editdlrm
vars.php66000644editdlrm
version.php11010644editdlrm
view-config.php190870644editdlrm
view-transitions.php6020644editdlrm
widgets.php708660644editdlrm
wp-db.php4450644editdlrm
wp-diff.php7920644editdlrm
Edit: /home/techb158/on-time-movers.com/wp-includes/view-config.php (19087B)
array( 'type' => 'panel' ), 'fields' => array( array( 'id' => 'featured_media', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), array( 'id' => 'post-content-info', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), array( 'id' => 'excerpt', 'layout' => array( 'type' => 'panel', 'labelPosition' => 'top', ), ), array( 'id' => 'status', 'label' => __( 'Status' ), 'children' => array( array( 'id' => 'status', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), 'scheduled_date', 'password', 'sticky', ), ), 'date', 'slug', 'author', 'template', array( 'id' => 'discussion', 'label' => __( 'Discussion' ), 'children' => array( array( 'id' => 'comment_status', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), 'ping_status', ), ), 'parent', 'format', 'revisions', ), ); } /** * Returns the view configuration for the given entity. * * Builds the default configuration shared by all entities and then exposes it * through the dynamic `get_entity_view_config_{$kind}_{$name}` filter — with the * dynamic portions lowercased, see wp_get_entity_view_config_hook_name() * — so that core and third parties can provide the configuration for a * specific entity. * * @since 7.1.0 * * @param string $kind The entity kind (e.g. `postType`). * @param string $name The entity name (e.g. `page`). * @return array { * The view configuration for the entity. * * @type array $default_view Default view configuration. * @type array $default_layouts Default layouts configuration. * @type array $view_list List of available views. * @type array $form Form configuration. * } */ function wp_get_entity_view_config( $kind, $name ) { $default_view = array( 'type' => 'table', 'filters' => array(), 'sort' => array( 'field' => 'title', 'direction' => 'asc', ), 'perPage' => 20, 'fields' => array( 'author', 'status' ), 'titleField' => 'title', ); $default_layouts = array( 'table' => array(), 'grid' => array(), 'list' => array(), ); $all_items_title = __( 'All items' ); if ( 'postType' === $kind ) { $post_type_object = get_post_type_object( $name ); if ( $post_type_object && ! empty( $post_type_object->labels->all_items ) ) { $all_items_title = $post_type_object->labels->all_items; } } $view_list = array( array( 'title' => $all_items_title, 'slug' => 'all', ), ); $config = array( 'default_view' => $default_view, 'default_layouts' => $default_layouts, 'view_list' => $view_list, 'form' => 'postType' === $kind ? _wp_get_default_posttype_form() : array(), ); $data = new WP_View_Config_Data( $config ); return $data->apply_filters( $kind, $name ); } /** * Provides the view configuration for the `page` post type. * * @since 7.1.0 * * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ function _wp_get_entity_view_config_posttype_page( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( 'styles' => array( 'author' => array( 'align' => 'start', ), ), ), ), 'grid' => array(), 'list' => array(), ); $default_view = array( 'type' => 'list', 'filters' => array(), 'perPage' => 20, 'sort' => array( 'field' => 'title', 'direction' => 'asc', ), 'showLevels' => true, 'titleField' => 'title', 'mediaField' => 'featured_media', 'fields' => array( 'author', 'status' ), ); $view_list = array( array( 'title' => __( 'Published' ), 'slug' => 'published', 'view' => array( 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'publish', 'isLocked' => true, ), ), ), ), array( 'title' => __( 'Scheduled' ), 'slug' => 'future', 'view' => array( 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'future', 'isLocked' => true, ), ), ), ), array( 'title' => __( 'Drafts' ), 'slug' => 'drafts', 'view' => array( 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'draft', 'isLocked' => true, ), ), ), ), array( 'title' => __( 'Pending' ), 'slug' => 'pending', 'view' => array( 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'pending', 'isLocked' => true, ), ), ), ), array( 'title' => __( 'Private' ), 'slug' => 'private', 'view' => array( 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'private', 'isLocked' => true, ), ), ), ), array( 'title' => __( 'Trash' ), 'slug' => 'trash', 'view' => array( 'type' => 'table', 'layout' => $default_layouts['table']['layout'], 'filters' => array( array( 'field' => 'status', 'operator' => 'isAny', 'value' => 'trash', 'isLocked' => true, ), ), ), ), ); $data->set( array( 'default_view' => $default_view, 'default_layouts' => $default_layouts, ), 1 ); // Append the status views, thereby preserving the base "all items" view, // so its post-type-specific title is kept. $data->merge( array( 'view_list' => $view_list ), 1 ); return $data; } /** * Provides the view configuration for the `wp_block` post type. * * @since 7.1.0 * * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ function _wp_get_entity_view_config_posttype_wp_block( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( 'styles' => array( 'author' => array( 'width' => '1%', ), ), ), ), 'grid' => array( 'layout' => array( 'badgeFields' => array( 'sync-status' ), ), ), ); $default_view = array( 'type' => 'grid', 'perPage' => 20, 'titleField' => 'title', 'mediaField' => 'preview', 'fields' => array( 'sync-status' ), 'filters' => array(), 'layout' => $default_layouts['grid']['layout'], ); $view_list = array( array( 'title' => __( 'All patterns' ), 'slug' => 'all-patterns', ), array( 'title' => __( 'My patterns' ), 'slug' => 'my-patterns', ), ); // Gather categories from the block pattern categories registry. $registry = WP_Block_Pattern_Categories_Registry::get_instance(); $categories = array(); foreach ( $registry->get_all_registered() as $category ) { $categories[ $category['name'] ] = $category['label']; } // Ensure "Uncategorized" is always included for patterns // that have no category assigned. $categories['uncategorized'] ??= __( 'Uncategorized' ); // Also gather user-created pattern categories (wp_pattern_category taxonomy). $user_terms = get_terms( array( 'taxonomy' => 'wp_pattern_category', 'hide_empty' => false, ) ); if ( ! is_wp_error( $user_terms ) ) { foreach ( $user_terms as $term ) { $categories[ $term->slug ] = $term->name; } } // Sort categories alphabetically by label. asort( $categories, SORT_NATURAL | SORT_FLAG_CASE ); foreach ( $categories as $category_name => $label ) { $view_list[] = array( 'title' => $label, 'slug' => $category_name, ); } $form = array( 'layout' => array( 'type' => 'panel' ), 'fields' => array( array( 'id' => 'excerpt', 'layout' => array( 'type' => 'panel', 'labelPosition' => 'top', ), ), array( 'id' => 'post-content-info', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), 'sync-status', 'revisions', ), ); $data->set( array( 'default_view' => $default_view, 'default_layouts' => $default_layouts, 'view_list' => $view_list, 'form' => $form, ), 1 ); return $data; } /** * Provides the view configuration for the `wp_template_part` post type. * * @since 7.1.0 * * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ function _wp_get_entity_view_config_posttype_wp_template_part( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( 'styles' => array( 'author' => array( 'width' => '1%', ), ), ), ), 'grid' => array( 'layout' => array(), ), ); $default_view = array( 'type' => 'grid', 'perPage' => 20, 'titleField' => 'title', 'mediaField' => 'preview', 'fields' => array( 'author' ), 'filters' => array(), 'layout' => $default_layouts['grid']['layout'], ); $view_list = array( array( 'title' => __( 'All template parts' ), 'slug' => 'all-parts', ), ); $areas = get_allowed_block_template_part_areas(); // Ensure default areas appear in a consistent order. $preferred_order = array( 'header', 'footer', 'sidebar', 'navigation-overlay', 'uncategorized' ); $ordered_areas = array(); $remaining_areas = array(); foreach ( $areas as $area ) { $position = array_search( $area['area'], $preferred_order, true ); if ( false !== $position ) { $ordered_areas[ $position ] = $area; } else { $remaining_areas[] = $area; } } ksort( $ordered_areas ); $areas = array_merge( array_values( $ordered_areas ), $remaining_areas ); foreach ( $areas as $area ) { $view_list[] = array( 'title' => $area['label'], 'slug' => $area['area'], 'view' => array( 'filters' => array( array( 'field' => 'area', 'operator' => 'is', 'value' => $area['area'], 'isLocked' => true, ), ), ), ); } $form = array( 'layout' => array( 'type' => 'panel' ), 'fields' => array( array( 'id' => 'last_edited_date', 'layout' => array( 'type' => 'panel', 'labelPosition' => 'none', ), ), 'revisions', ), ); $data->set( array( 'default_view' => $default_view, 'default_layouts' => $default_layouts, 'view_list' => $view_list, 'form' => $form, ), 1 ); return $data; } /** * Provides the view configuration for the `wp_template` post type. * * @since 7.1.0 * * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ function _wp_get_entity_view_config_posttype_wp_template( $data ) { $default_view = array( 'type' => 'grid', 'perPage' => 20, 'sort' => array( 'field' => 'title', 'direction' => 'asc', ), 'titleField' => 'title', 'descriptionField' => 'description', 'mediaField' => 'preview', 'fields' => array( 'author', 'active', 'slug', 'theme' ), 'filters' => array(), 'showMedia' => true, ); $default_layouts = array( 'table' => array( 'showMedia' => false ), 'grid' => array( 'showMedia' => true ), 'list' => array( 'showMedia' => false ), ); $view_list = array( array( 'title' => __( 'All templates' ), 'slug' => 'all', ), ); $templates = get_block_templates( array(), 'wp_template' ); // Collect unique authors, tracking whether they come from a registered // source (theme, plugin, site) so we can sort those before user ones. $seen_authors = array(); $registered_authors = array(); $user_authors = array(); foreach ( $templates as $template ) { /* * Determine the original source of the template ('theme', 'plugin', * 'site', or 'user'). */ $original_source = 'user'; if ( 'wp_template' === $template->type || 'wp_template_part' === $template->type ) { if ( $template->has_theme_file && ( 'theme' === $template->origin || ( empty( $template->origin ) && in_array( $template->source, array( 'theme', 'custom', ), true ) ) ) ) { /* * Added by theme. * Template originally provided by a theme, but customized by a user. * Templates originally didn't have the 'origin' field so identify * older customized templates by checking for no origin and a 'theme' * or 'custom' source. */ $original_source = 'theme'; } elseif ( 'plugin' === $template->origin ) { // Added by plugin. $original_source = 'plugin'; } elseif ( empty( $template->has_theme_file ) && 'custom' === $template->source && empty( $template->author ) ) { /* * Added by site. * Template was created from scratch, but has no author. Author support * was only added to templates in WordPress 5.9. Fallback to showing the * site logo and title. */ $original_source = 'site'; } } // Determine a human readable text for the author of the template. $author_text = ''; switch ( $original_source ) { case 'theme': $theme_name = wp_get_theme( $template->theme )->get( 'Name' ); $author_text = empty( $theme_name ) ? $template->theme : $theme_name; break; case 'plugin': if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $plugin_name = ''; if ( isset( $template->plugin ) ) { $plugins = wp_get_active_and_valid_plugins(); foreach ( $plugins as $plugin_file ) { $plugin_basename = plugin_basename( $plugin_file ); list( $plugin_slug, ) = explode( '/', $plugin_basename ); if ( $plugin_slug === $template->plugin ) { $plugin_data = get_plugin_data( $plugin_file ); if ( ! empty( $plugin_data['Name'] ) ) { $plugin_name = $plugin_data['Name']; } break; } } } /* * Fall back to the theme name if the plugin is not defined. That's needed to keep backwards * compatibility with templates that were registered before the plugin attribute was added. */ if ( '' === $plugin_name ) { $plugins = get_plugins(); $plugin_basename = plugin_basename( sanitize_text_field( $template->theme . '.php' ) ); if ( isset( $plugins[ $plugin_basename ] ) && isset( $plugins[ $plugin_basename ]['Name'] ) ) { $plugin_name = $plugins[ $plugin_basename ]['Name']; } else { $plugin_name = $template->plugin ?? $template->theme; } } $author_text = $plugin_name; break; case 'site': $author_text = get_bloginfo( 'name' ); break; case 'user': $author = get_user_by( 'id', $template->author ); if ( ! $author ) { $author_text = __( 'Unknown author' ); } else { $author_text = $author->get( 'display_name' ); } break; } if ( ! empty( $author_text ) && ! isset( $seen_authors[ $author_text ] ) ) { $seen_authors[ $author_text ] = true; $entry = array( 'title' => $author_text, 'slug' => $author_text, 'view' => array( 'filters' => array( array( 'field' => 'author', 'operator' => 'is', 'value' => $author_text, 'isLocked' => true, ), ), ), ); if ( 'user' === $original_source ) { $user_authors[] = $entry; } else { $registered_authors[] = $entry; } } } $form = array( 'layout' => array( 'type' => 'panel' ), 'fields' => array( array( 'id' => 'description', 'layout' => array( 'type' => 'panel', 'labelPosition' => 'top', ), ), array( 'id' => 'description_readonly', 'layout' => array( 'type' => 'regular', 'labelPosition' => 'none', ), ), array( 'id' => 'last_edited_date', 'layout' => array( 'type' => 'panel', 'labelPosition' => 'none', ), ), 'revisions', // The following fields are only meaningful in the `home`/`index` // template summary. They edit other entities (`root/site` and the // posts page); the editor merges those records into the form data // under a namespace and controls when the fields are shown. 'posts_page_title', 'posts_per_page', 'default_comment_status', ), ); $data->set( array( 'default_view' => $default_view, 'default_layouts' => $default_layouts, 'view_list' => array_merge( $view_list, $registered_authors, $user_authors ), 'form' => $form, ), 1 ); return $data; }