[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwelve/ -> functions.php (summary)

Twenty Twelve functions and definitions Sets up the theme and provides some helper functions, which are used in the theme as custom template tags. Others are attached to action and filter hooks in WordPress to change core functionality.

File Size: 740 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 21 functions

  twentytwelve_setup()
  twentytwelve_get_font_url()
  twentytwelve_scripts_styles()
  twentytwelve_block_editor_styles()
  twentytwelve_resource_hints()
  twentytwelve_mce_css()
  twentytwelve_wp_title()
  twentytwelve_page_menu_args()
  twentytwelve_widgets_init()
  wp_get_list_item_separator()
  twentytwelve_content_nav()
  twentytwelve_comment()
  twentytwelve_entry_meta()
  twentytwelve_body_class()
  twentytwelve_content_width()
  twentytwelve_customize_register()
  twentytwelve_customize_partial_blogname()
  twentytwelve_customize_partial_blogdescription()
  twentytwelve_customize_preview_js()
  twentytwelve_widget_tag_cloud_args()
  wp_body_open()

Functions
Functions that are not part of a class:

twentytwelve_setup()   X-Ref
Twenty Twelve setup.

Sets up theme defaults and registers the various WordPress features that
Twenty Twelve supports.

since: Twenty Twelve 1.0

twentytwelve_get_font_url()   X-Ref
Return the Google font stylesheet URL if available.

The use of Open Sans by default is localized. For languages that use
characters not supported by the font, the font can be disabled.

return: string Font stylesheet or empty string if disabled.
since: Twenty Twelve 1.2

twentytwelve_scripts_styles()   X-Ref
Enqueue scripts and styles for front end.

since: Twenty Twelve 1.0

twentytwelve_block_editor_styles()   X-Ref
Enqueue styles for the block-based editor.

since: Twenty Twelve 2.6

twentytwelve_resource_hints( $urls, $relation_type )   X-Ref
Add preconnect for Google Fonts.

return: array URLs to print for resource hints.
param: array   $urls          URLs to print for resource hints.
param: string  $relation_type The relation type the URLs are printed.
since: Twenty Twelve 2.2

twentytwelve_mce_css( $mce_css )   X-Ref
Filter TinyMCE CSS path to include Google Fonts.

Adds additional stylesheets to the TinyMCE editor if needed.

return: string Filtered CSS path.
param: string $mce_css CSS path to load in TinyMCE.
since: Twenty Twelve 1.2

twentytwelve_wp_title( $title, $sep )   X-Ref
Filter the page title.

Creates a nicely formatted and more specific title element text
for output in head of document, based on current view.

return: string Filtered title.
param: string $title Default title text for current view.
param: string $sep Optional separator.
since: Twenty Twelve 1.0

twentytwelve_page_menu_args( $args )   X-Ref
Filter the page menu arguments.

Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link.

since: Twenty Twelve 1.0

twentytwelve_widgets_init()   X-Ref
Register sidebars.

Registers our main widget area and the front page widget areas.

since: Twenty Twelve 1.0

wp_get_list_item_separator()   X-Ref
Retrieves the list item separator based on the locale.

Added for backward compatibility to support pre-6.0.0 WordPress versions.

since: 6.0.0

twentytwelve_content_nav( $html_id )   X-Ref
Displays navigation to next/previous pages when applicable.

since: Twenty Twelve 1.0

twentytwelve_comment( $comment, $args, $depth )   X-Ref
Template for comments and pingbacks.

To override this walker in a child theme without modifying the comments template
simply create your own twentytwelve_comment(), and that function will be used instead.

Used as a callback by wp_list_comments() for displaying the comments.

since: Twenty Twelve 1.0

twentytwelve_entry_meta()   X-Ref
Set up post entry meta.

Prints HTML with meta information for current post: categories, tags, permalink, author, and date.

Create your own twentytwelve_entry_meta() to override in a child theme.

since: Twenty Twelve 1.0

twentytwelve_body_class( $classes )   X-Ref
Extend the default WordPress body classes.

Extends the default WordPress body class to denote:
1. Using a full-width layout, when no active widgets in the sidebar
or full-width template.
2. Front Page template: thumbnail in use and number of sidebars for
widget areas.
3. White or empty background color to change the layout and spacing.
4. Custom fonts enabled.
5. Single or multiple authors.

return: array Filtered class values.
param: array $classes Existing class values.
since: Twenty Twelve 1.0

twentytwelve_content_width()   X-Ref
Adjust content width in certain contexts.

Adjusts content_width value for full-width and single image attachment
templates, and when there are no active widgets in the sidebar.

since: Twenty Twelve 1.0

twentytwelve_customize_register( $wp_customize )   X-Ref
Register postMessage support.

Add postMessage support for site title and description for the Customizer.

param: WP_Customize_Manager $wp_customize Customizer object.
since: Twenty Twelve 1.0

twentytwelve_customize_partial_blogname()   X-Ref
Render the site title for the selective refresh partial.

return: void
since: Twenty Twelve 2.0

twentytwelve_customize_partial_blogdescription()   X-Ref
Render the site tagline for the selective refresh partial.

return: void
since: Twenty Twelve 2.0

twentytwelve_customize_preview_js()   X-Ref
Enqueue JavaScript postMessage handlers for the Customizer.

Binds JS handlers to make the Customizer preview reload changes asynchronously.

since: Twenty Twelve 1.0

twentytwelve_widget_tag_cloud_args( $args )   X-Ref
Modifies tag cloud widget arguments to display all tags in the same font size
and use list format for better accessibility.

return: array The filtered arguments for tag cloud widget.
param: array $args Arguments for tag cloud widget.
since: Twenty Twelve 2.4

wp_body_open()   X-Ref
Fire the wp_body_open action.

Added for backward compatibility to support pre-5.2.0 WordPress versions.

since: Twenty Twelve 3.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1