Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: content_save_pre

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
979                          break;
980                     default:
981                          return(new IXR_Error(401, __("Invalid post type.")));
982                          break;
983                }
984                $post_author = $content_struct["wp_author_id"];
985           }
986
987        $post_title = $content_struct['title'];
988        $post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
989        $post_status = $publish ? 'publish' : 'draft';
990
991        $post_excerpt = $content_struct['mt_excerpt'];
992        $post_more = $content_struct['mt_text_more'];
993
994           $tags_input = $content_struct['mt_keywords'];
995
996           if(isset($content_struct["mt_allow_comments"])) {
997                if(!is_numeric($content_struct["mt_allow_comments"])) {
 
Line Code
1261                               break;
1262                          default:
1263                               $ping_status = get_option("default_ping_status");
1264                               break;
1265                     }
1266                }
1267           }
1268
1269        $post_title = $content_struct['title'];
1270        $post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
1271        $catnames = $content_struct['categories'];
1272
1273        $post_category = array();
1274
1275        if (is_array($catnames)) {
1276          foreach ($catnames as $cat) {
1277            $post_category[] = get_cat_ID($cat);
1278          }
1279        }