Genesis Framework Hooks列表
需要Genesis Framework中的动作钩子和过滤器的完整参考吗?这是Genesis Framework建站中可能使用到的Hooks列表,作为参考指南,而不是教程。目的是让您知道可以连接到 Genesis 的所有位置以及可过滤的内容。由您决定如何处理这些钩子,但如果您想知道从哪里开始,请复制钩子并在框架文件中进行通用搜索以查看它的使用位置。
如果您对如何使用钩子自定义或创建 Genesis 子主题更感兴趣 ,请查看本文的Genesis Framework Hooks列表参考。
推荐:Genesis主题Genesis Simple Hooks插件教程
Genesis 模板动作钩子
Genesis Framework Hooks列表-模板动作钩子。如果你打开Genesis Framework文件,你会发现根目录下有标准的模板文件。这些文件中存在各种钩子,因此由于缺乏更具创造性的术语,我将称它们为“模板钩子”。
提示:要在任何主题或插件中找到可用的动作挂钩,请在代码库中搜索do_action
.
genesis/comments.php
- genesis_before_comments
- genesis_comments
- genesis_after_comments
- Genesis_before_pings
- Genesis_pings
- genesis_after_pings
- genesis_before_comment_form
- genesis_comment_form
- genesis_after_comment_form
genesis/footer.php
- genesis_before_footer
- genesis_footer
- genesis_after_footer
- genesis_after
genesis/header.php
- genesis_doctype
- genesis_title
- genesis_meta
- genesis_before
- genesis_before_header
- genesis_header
- genesis_after_header
genesis/sidebar-alt.php
- genesis_before_sidebar_alt_widget_area
- genesis_sidebar_alt
- genesis_after_sidebar_alt_widget_area
genesis/sidebar.php
- genesis_before_sidebar_widget_area
- genesis_sidebar
- genesis_after_sidebar_widget_area
Genesis 结构动作钩子
前面的一组钩子是专门在 Genesis 的主题模板文件中使用的。以下挂钩是在 /lib/ 文件夹中找到的挂钩。大多数处理面向前端的内容,很少只处理 WP 管理区域。
genesis/lib/framework.php
- genesis_before_content_sidebar_wrap
- genesis_before_content
- genesis_before_loop
- genesis_loop
- genesis_after_loop
- genesis_after_content
- genesis_after_content_sidebar_wrap
genesis/lib/init.php
- genesis_pre
- genesis_pre_framework
- genesis_init
- genesis_setup
Genesis/lib/structure/archive.php
- genesis_archive_title_descriptions
Genesis/lib/structure/comments.php
- genesis_list_comments
- genesis_list_pings
- genesis_before_comment
- genesis_after_comment
Genesis/lib/structure/header.php
- genesis_site_title
- genesis_site_description
- genesis_header_right
Genesis/lib/structure/loops.php
请注意,我只包括在 Genesis 2.0+ 中添加的 HTML5 钩子。
- Genesis_before_while
- Genesis_before_entry
- genesis_entry_header
- genesis_before_entry_content
- genesis_entry_content
- genesis_after_entry_content
- genesis_entry_footer
- Genesis_after_entry
- genesis_after_endwhile
- genesis_loop_else
- Genesis_before_post
- genesis_before_post_title
- Genesis_post_title
- genesis_after_post_title
- genesis_before_post_content
- genesis_post_content
- genesis_after_post_content
- genesis_after_post
- genesis_after_endwhile
- genesis_loop_else
genesis/lib/structure/post.php
- genesis_reset_loops
Genesis/lib/structure/menu.php
- genesis_register_nav_menus
Genesis/lib/admin/menu.php
- genesis_admin_menu
Genesis/lib/classes/admin.php
- genesis_admin_init
Genesis过滤器挂钩
Genesis Framework Hooks列表-过滤器钩子。大多数时候,当开发人员谈论钩子时,他们专门谈论动作钩子。但是钩子有两种风格:动作和过滤器。这就是包含过滤器参考的原因。
提示:要搜索任何主题或插件中可用的过滤器钩子,请在代码库中搜索apply_filters
.
/genesis/404.php
- genesis_404_entry_title
- genesis_404_entry_content
/genesis/lib/admin/cpt-archive-settings.php
- genesis_cpt_archive_settings_page_label
- genesis_cpt_archive_settings_menu_label
- genesis_cpt_archive_settings_capability_ 。$this->post_type->name
- genesis_cpt_archive_settings_label
/genesis/lib/admin/import-export.php
- genesis_export_options
/genesis/lib/admin/term-meta.php
- genesis_term_meta_defaults
- genesis_term_meta
- genesis_term_meta_{$meta_key}
/genesis/lib/admin/user-meta.php
- genesis_user_meta_defaults
/genesis/lib/classes/breadcrumb.php
- genesis_breadcrumb_args
- genesis_build_crumbs
- genesis_archive_crumb
- genesis_single_crumb
- genesis_home_crumb
- genesis_blog_crumb
- genesis_search_crumb
- genesis_404_crumb
- genesis_page_crumb
- genesis_attachment_crumb
- Genesis_post_crumb
- genesis_cpt_crumb
- genesis_category_crumb
- genesis_tag_crumb
- genesis_tax_crumb
- genesis_year_crumb
- genesis_month_crumb
- genesis_day_crumb
- genesis_author_crumb
- genesis_post_type_crumb
- genesis_breadcrumb_link
/genesis/lib/classes/class-genesis-script-loader.php
- genesis_superfish_args_url
- genesis_toggles
/genesis/lib/classes/sanitization.php
- genesis_available_sanitizer_filters
/genesis/lib/functions/formatting.php
- get_the_content_limit_allowedtags
- get_the_content_more_link
- get_the_content_limit
- the_content_limit
/genesis/lib/functions/general.php
- genesis_sitemap_output
- genesis_canonical_url
/genesis/lib/functions/head.php
- genesis_get_seo_meta_description
- genesis_get_seo_meta_keywords
- genesis_get_robots_meta_content
- genesis_pre_load_favicon
- genesis_favicon_url
/genesis/lib/functions/image.php
- genesis_get_image_default_args
- genesis_pre_get_image
- genesis_get_image
/genesis/lib/functions/layout.php
- genesis_initial_layouts
- genesis_get_layouts
- genesis_site_layout
- genesis_structural_wrap-{$context}
/genesis/lib/functions/markup.php
- genesis_markup_{$args[‘context’]}
- genesis_markup_{$args[‘context’]}_output
- genesis_markup_{$args[‘context’]}_open
- genesis_markup_{$args[‘context’]}_close
- genesis_markup_open
- genesis_markup_close
- genesis_attr_{$context}
- genesis_attr_{$context}_output
/genesis/lib/functions/menu.php
- genesis_superfish_enabled
/genesis/lib/functions/options.php
- genesis_pre_get_option_{$key}
- genesis_options
/genesis/lib/functions/widgetize.php
- genesis_register_sidebar_defaults
- genesis_register_widget_area_defaults
- genesis_widget_area_defaults
- genesis_sidebar_title_output
/genesis/lib/init.php
- genesis_theme_support_menus
- genesis_theme_support_structural_wraps
- genesis_settings_field
- genesis_seo_settings_field
- genesis_cpt_archive_settings_field_prefix
/genesis/lib/shortcodes/footer.php
- genesis_footer_backtotop_shortcode
- genesis_footer_copyright_shortcode
- genesis_footer_childtheme_link_shortcode
- genesis_footer_genesis_link_shortcode
- genesis_footer_studiopress_link_shortcode
- genesis_footer_wordpress_link_shortcode
- genesis_footer_site_title_shortcode
- genesis_footer_home_link_shortcode
- genesis_footer_loginout_shortcode
/genesis/lib/shortcodes/post.php
- genesis_post_date_shortcode
- genesis_post_time_shortcode
- genesis_post_modified_date_shortcode
- genesis_post_modified_time_shortcode
- genesis_post_author_shortcode
- genesis_post_author_link_shortcode
- genesis_post_author_posts_link_shortcode
- genesis_post_comments_shortcode
- genesis_post_tags_shortcode
- genesis_post_categories_shortcode
- genesis_post_terms_shortcode
- genesis_edit_post_link
- genesis_post_edit_shortcode
/genesis/lib/structure/archive.php
- genesis_term_intro_text_output
- genesis_author_intro_text_output
- genesis_cpt_archive_intro_text_output
/genesis/lib/structure/comments.php
- genesis_title_comments
- genesis_prev_comments_link_text
- genesis_next_comments_link_text
- genesis_no_comments_text
- genesis_comments_closed_text
- genesis_title_pings
- genesis_no_pings_text
- genesis_comment_list_args
- genesis_ping_list_args
- comment_author_says_text
- genesis_comment_awaiting_moderation
- genesis_show_comment_date
- genesis_comment_awaiting_moderation
- genesis_comment_form_args
/genesis/lib/structure/footer.php
- genesis_footer_widget_areas
- genesis_footer_backtotop_text
- genesis_footer_creds_text
- genesis_footer_output
- genesis_footer_scripts
/genesis/lib/structure/header.php
- genesis_viewport_value
- Genesis_canonical
- genesis_header_scripts
- genesis_site_title_wrap
- genesis_seo_title
- genesis_site_description_wrap
- genesis_seo_description
- genesis_skip_links_output
/genesis/lib/structure/loops.php
- genesis_custom_loop_args
- genesis_grid_loop_post_class
/genesis/lib/structure/post.php
- genesis_post_title_text
- genesis_link_post_title
- genesis_entry_title_wrap
- genesis_post_title_output
- Genesis_post_info
- genesis_edit_post_link
- genesis_post_permalink
- genesis_noposts_text
- Genesis_post_meta
- genesis_author_box_gravatar_size
- genesis_author_box_title
- genesis_author_box
- genesis_prev_link_text
- genesis_next_link_text
/genesis/lib/structure/search.php
- genesis_search_text
- genesis_search_button_text
- genesis_search_form_label
- genesis_search_form
/genesis/lib/widgets/featured-page-widget.php
- genesis_featured_page_title
/genesis/lib/widgets/featured-post-widget.php
- genesis_featured_post_title
/genesis/lib/widgets/user-profile-widget.php
- genesis_gravatar_sizes
/genesis/search.php
- genesis_search_title_text
- genesis_search_title_output
总结
以上是晓得博客为你介绍的Genesis Framework Hooks列表的全部内容,通过Hooks的学习,可以为你的WordPress建站提供更多的可能性,希望对你的网站有所帮助。
推荐:Genesis主题建站
Claude、Netflix、Midjourney、ChatGPT Plus、PS、Disney、Youtube、Office 365、多邻国Plus账号购买,ChatGPT API购买,优惠码XDBK,用户购买的时候输入优惠码可以打95折