Skip to content

Instantly share code, notes, and snippets.

@whyisjake
Created November 17, 2011 04:55

Revisions

  1. whyisjake revised this gist Nov 17, 2011. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion gistfile1.aw
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,16 @@ function js_add_review($content) {
    global $post;
    $original = $content;
    $content = js_ratings_box();
    $content .= $original;
    return $content;
    }

    add_filter( 'the_content', 'js_add_review', 15 );


    function js_add_project($content) {
    global $post;
    $original = $content;
    $guide = get_post_custom_values('MakeProjectsGuideNumber');
    if (isset($guide[0])) {
    $content = js_make_project($guide);
    @@ -10,4 +20,4 @@ function js_add_review($content) {
    return $content;
    }

    add_filter( 'the_content', 'js_add_review' );
    add_filter( 'the_content', 'js_add_project', 20 );
  2. whyisjake created this gist Nov 17, 2011.
    13 changes: 13 additions & 0 deletions gistfile1.aw
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    function js_add_review($content) {
    global $post;
    $original = $content;
    $content = js_ratings_box();
    $guide = get_post_custom_values('MakeProjectsGuideNumber');
    if (isset($guide[0])) {
    $content = js_make_project($guide);
    }
    $content .= $original;
    return $content;
    }

    add_filter( 'the_content', 'js_add_review' );