Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: theme_mod_{$name}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
912            * The dynamic portion of the hook name, `$name`, refers to
913            * the key name of the modification array. For example,
914            * 'header_textcolor', 'header_image', and so on depending
915            * on the theme options.
916            *
917            * @since 2.2.0
918            *
919            * @param string $current_mod The value of the current theme modification.
920            */
921           return apply_filters( "theme_mod_{$name}", $mods[$name] );
922      }
923
924      if ( is_string( $default ) )
925           $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
926
927      /** This filter is documented in wp-includes/theme.php */
928      return apply_filters( "theme_mod_{$name}", $default );
929 }
930
931 /**
932  * Update theme modification value for the current theme.
933  *
934  * @since 2.1.0
935  *
936  * @param string $name Theme modification name.
937  * @param mixed  $value theme modification value.