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
905            * The dynamic portion of the hook name, $name, refers to
906            * the key name of the modification array. For example,
907            * 'header_textcolor', 'header_image', and so on depending
908            * on the theme options.
909            *
910            * @since 2.2.0
911            *
912            * @param string $current_mod The value of the current theme modification.
913            */
914           return apply_filters( "theme_mod_{$name}", $mods[$name] );
915      }
916
917      if ( is_string( $default ) )
918           $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
919
920      /** This filter is documented in wp-includes/theme.php */
921      return apply_filters( "theme_mod_{$name}", $default );
922 }
923
924 /**
925  * Update theme modification value for the current theme.
926  *
927  * @since 2.1.0
928  *
929  * @param string $name Theme modification name.
930  * @param string $value theme modification value.