Last active
August 29, 2015 13:56
-
-
Save calliaweb/8886080 to your computer and use it in GitHub Desktop.
Revisions
-
calliaweb revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ add_filter( 'soliloquy_output_single_item', 'jmw_soliloquy_add_custom_slides', 10, 5 ); /** * Filter the Soliloquy slide html to append another slide. Works with version 2 of Soliloquy. * * @link http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ * -
calliaweb revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ * * @return string Amended slider HTML. */ function jmw_soliloquy_add_custom_slides( $slider_html, $slider_id, $image, $data, $slide_id ) { // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( 2843 !== $data['id']) { -
calliaweb revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ * * @return string Amended slider HTML. */ function jmw_soliloquy_add_custom_slides( $slider_html, $slider_id, $image, $$dataa, s$lide_id ) { // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( 2843 !== $data['id']) { -
calliaweb revised this gist
May 7, 2014 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php // Do NOT include the opening php tag above add_filter( 'soliloquy_output_single_item', 'jmw_soliloquy_add_custom_slides', 10, 5 ); /** * Filter the slide html to append another slide. * @@ -10,14 +10,15 @@ * @param string $slider_html Existing slide HTML. * @param string $slider_id ID of the slider. * @param array $image Array of slide image details. * @param array $data Array of slider config data. * @param integer $slide_id ID of the slide. * * @return string Amended slider HTML. */ function jmw_soliloquy_add_custom_slides( $slider_html, $slider_id, $image, $$ata, s$lide_id ) { // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( 2843 !== $data['id']) { return $slider_html; } -
calliaweb revised this gist
Feb 9, 2014 . 1 changed file with 40 additions and 46 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,55 +1,49 @@ <?php // Do NOT include the opening php tag above add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); /** * Filter the slide html to append another slide. * * @link http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ * * @param string $slider_html Existing slide HTML. * @param string $slider_id ID of the slider. * @param array $image Array of slide image details. * @param integer $slide_id ID of the slide. * * @return string Amended slider HTML. */ function jmw_soliloquy_add_custom_slides( $slider_html, $slider_id, $image, $slide_id ) { // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( '2843' !== $slider_id ) { return $slider_html; } if ( 1 == $slide_id ) { // Add a slide after first post slide $slider_html .= jmw_soliloquy_generate_slide_html( '2763' ); } elseif ( 2 == $slide_id ) { // Add a slide after second post slide $slider_html .= jmw_soliloquy_generate_slide_html( '2769' ); } // Return the amended slider HTML with our custom slides. return $slider_html; } /** * Generate slide html string for given page id. * * @param string $page_id The Page ID to generate the slide from. * * @return string The HTML string for the slide. */ function jmw_soliloquy_generate_slide_html( $page_id ) { return sprintf( '<li class="soliloquy-item"><a href="%1$s"><img class="soliloquy-item-image" src="%2$s" title="%3$s" alt="%3$s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%4$s</h2></div></div></li>', esc_url( get_permalink( $page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id( $page_id ) ) ), esc_attr( get_the_title( $page_id ) ), get_the_title( $page_id ) ); } -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 6 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); /* * Filters the slide html to append another slide. * * @param string $slider Existing slide html * @param string $id ID of the slider @@ -21,20 +21,17 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { if ( '2843' !== $id ) return $slider; if ( $i == 1 ) // Add a slide after first post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2763' ); // generates the slide html using the page with id 2763 if ($i == 2 ) // Add a slide after second post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2769' ); // generates the slide html using the page with id 2769 // Append our additional slide HTML to the original $slider HTML $slider .= $add_slide_html; // Return the amended slider HTML with our custom slides. return $slider; } /* -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); /* * Filters the slide html to append another slide * @@ -13,6 +13,8 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { * @param array $image Array of slide image details * @param integer $i ID of the slide */ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { global $soliloquy_data; // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. @@ -35,14 +37,15 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { } /* * Generates slide html string for given page id * * @param string $ss_page_id The featured page id to generate the slide from * @returns string $add_slide_html The html string for the slide * */ function jmw_soliloquy_generate_slide_html( $ss_page_id ) { $add_slide_html = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 9 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,23 +15,23 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { */ global $soliloquy_data; // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( '2843' !== $id ) return $slider; if ( $i == 1 ) { // Add a slide after first post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2763' ); // generates the slide html using the page with id 2763 } if ($i == 2 ) { // Add a slide after second post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2769' ); // generates the slide html using the page with id 2769 } // Append our additional slide HTML to the original $slider HTML $slider .= $add_slide_html; // Return the amended slider HTML with our custom slides. return $slider; } @@ -43,7 +43,6 @@ function jmw_soliloquy_generate_slide_html( $ss_page_id ) { * @returns string $add_slide_html The html string for the slide * */ $add_slide_html = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { * * @param string $slider Existing slide html * @param string $id ID of the slider * @param array $image Array of slide image details * @param integer $i ID of the slide */ global $soliloquy_data; -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 42 additions and 30 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,40 +5,52 @@ // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { /* * Filters the slide html to append another slide * * @param string $slider Existing slide html * @param string $id ID of the slider * @param string $image * @param string $i ID of the slide */ global $soliloquy_data; // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( '2843' !== $id ) return $slider; if ( $i == 1 ) { // Add a slide after first post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2763' ); // generates the slide html using the page with id 2763 } if ($i == 2 ) { // Add a slide after second post slide $add_slide_html = jmw_soliloquy_generate_slide_html( '2769' ); // generates the slide html using the page with id 2769 } // Append our additional slide HTML to the original $slider HTML $slider .= $add_slide_html; // Return the amended slider HTML with our custom slides. return $slider; } function jmw_soliloquy_generate_slide_html( $ss_page_id ) { /* * Generates slide html string for given page id * * @param string $ss_page_id The featured page id to generate the slide from * @returns string $add_slide_html The html string for the slide * */ $add_slide_html = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) ); return $add_slide_html; } -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { $ss_page_id = 2763; // Page ID of Page you want to insert $add_slider = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id( $ss_page_id ) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) @@ -29,7 +29,7 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { $ss_page_id = 2769; // Page ID of Page you want to insert $add_slider = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id( $ss_page_id ) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 10 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,13 @@ <?php //* Do NOT include the opening php tag // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { global $soliloquy_data; // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( '2843' !== $id ) return $slider; @@ -23,20 +26,19 @@ function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { // Add a slide after second post slide if ( 2 == $i ) { $ss_page_id = 2769; // Page ID of Page you want to insert $add_slider = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) ); } // Append our additional slide HTML to the original $slider HTML $slider .= $add_slider; // Return the amended slider HTML with our custom slides. return $slider; } -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,3 @@ // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); -
calliaweb renamed this gist
Feb 8, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ <?php //* Do NOT include the opening php tag // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); -
calliaweb revised this gist
Feb 8, 2014 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,3 @@ // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); -
calliaweb created this gist
Feb 8, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ <?php //* Do NOT include the opening php tag // Add additional pages to the featured content slider // Original reference http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); function jmw_soliloquy_add_custom_slides( $slider, $id, $image, $i ) { global $soliloquy_data; // Bail out early if we are not targeting our specific slider. Remove this if you want it to apply to all sliders. if ( '2843' !== $id ) return $slider; // Add a slide after first post slide if ( 1 == $i ) { $ss_page_id = 2763; // Page ID of Page you want to insert $add_slider = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) ); } // Add a slide after second post slide if ( 2 == $i ) { $ss_page_id = 2769; // Page ID of Page you want to insert $add_slider = sprintf('<li class="soliloquy-item"><a href="%s"><img class="soliloquy-item-image" src="%s" title="%s" alt="%s" /></a><div class="soliloquy-caption"><div class="soliloquy-caption-inside soliloquy-fc-caption"><h2 class="soliloquy-fc-title">%s</h2></div></div></li>', esc_url( get_permalink( $ss_page_id ) ), esc_url( wp_get_attachment_url( get_post_thumbnail_id($ss_page_id) ) ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ), get_the_title( $ss_page_id ) ); } // Append our additional slide HTML to the original $slider HTML $slider .= $add_slider; // Return the amended slider HTML with our custom slides. return $slider; }