Permalink
Browse files

v1.5.0 changes

  • Loading branch information...
1 parent a1a33c6 commit 97e741342d6b9fdd232ac34ea0bc9c84a86ac1ba Pete Nelson committed Sep 13, 2015
@@ -7,7 +7,7 @@
*/
-if ( !defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( !defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( !class_exists( 'WPAnyIpsumAPI' ) ) {
@@ -89,10 +89,19 @@ function handle_api_request() {
$content_type = 'application/javascript';
}
+ $output = $output_prefix . $output . $output_suffix;
+
header( 'Content-Type: ' . $content_type . '; charset=' . get_bloginfo( 'charset' ) );
- header( 'Content-Length: ' . strlen( $output_prefix . $output . $output_suffix ) );
+ header( 'Content-Length: ' . strlen( $output ) );
+
+ echo $output;
+
+ // send notification for anything else that's hooked in
+ $args['source'] = 'api';
+ $args['format'] = $format;
+ $args['output'] = $output;
- echo $output_prefix . $output . $output_suffix;
+ do_action( 'anyipsum-filler-generated', $args );
exit;
@@ -7,7 +7,7 @@
*/
-if ( ! defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( ! class_exists( 'WPAnyIpsumCore' ) ) {
@@ -7,7 +7,7 @@
*/
-if ( ! defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( !class_exists( 'WPAnyIpsumForm' ) ) {
@@ -45,14 +45,22 @@ private function add_generated_output() {
$paragraphs = apply_filters( 'anyipsum-generate-filler', $args );
$output = '<div class="anyipsum-output">';
- foreach ( $paragraphs as $paragraph )
+ foreach ( $paragraphs as $paragraph ) {
$output .= '<p>' . $paragraph . '</p>';
+ }
$output .= '</div>';
// customize/override output
$output = apply_filters( 'anyipsum-form-output', $output, $paragraphs );
+ // send notification for anything else that's hooked in
+ $args['source'] = 'web';
+ $args['format'] = 'html';
+ $args['output'] = $output;
+
+ do_action( 'anyipsum-filler-generated', $args );
+
}
return $output;
@@ -1,6 +1,6 @@
<?php
-if ( ! defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( ! class_exists( 'WPAnyIpsumOEmbed' ) ) {
@@ -1,6 +1,6 @@
<?php
-if ( ! defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( ! class_exists( 'WPAnyIpsumSettings' ) ) {
View
@@ -3,8 +3,8 @@ Contributors: gungeekatx, shooper
Tags: content, ipsum
Donate link: http://baconipsum.com/
Requires at least: 4.0
-Tested up to: 4.2
-Stable tag: 1.4.0
+Tested up to: 4.3
+Stable tag: 1.5.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -35,6 +35,9 @@ The plugin installs Bacon Ipsum filler by default, so be sure to check Settings/
== Changelog ==
+= v1.5.0 June 19, 2015 =
+* Action 'anyipsum-filler-generated' is fired after either the shortcode or API generates any custom filler (useful for logging)
+
= v1.4.0 June 9, 2015 =
* Added 'html' format to API, which wraps each paragraph in p tags.
* Added range values for the 'paras' parameter to allow random number of paragraphs, ex: paras=3-7
@@ -75,13 +78,9 @@ The plugin installs Bacon Ipsum filler by default, so be sure to check Settings/
== Upgrade Notice ==
-= v1.4.0 June 9, 2015 =
-* Added 'html' format to API, which wraps each paragraph in p tags.
-* Added range values for the 'paras' parameter to allow random number of paragraphs, ex: paras=3-7
-* Added charset to Content-Type header for all API calls
-* Added Content-Length header for all API calls
+= v1.5.0 June 19, 2015 =
+* Action 'anyipsum-filler-generated' is fired after either the shortcode or API generates any custom filler (useful for logging)
-Thanks to Shawn Hooper for the new text and HTML formats.
== Frequently Asked Questions ==
View
@@ -1,5 +1,5 @@
<?php
-if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) die( 'restricted access' );
$keys = array(
'anyipsum-settings-general',
View
@@ -3,13 +3,13 @@
Plugin Name: Any Ipsum
Description: Roll your own custom lorem ipsum generator
Plugin URI: https://wordpress.org/plugins/any-ipsum/
-Version: 1.4.0
+Version: 1.5.0
Author: Pete Nelson <a href="https://twitter.com/GunGeekATX">(@GunGeekATX)</a>
Text Domain: any-ipsum
Domain Path: /lang
*/
-if ( ! defined( 'ABSPATH' ) ) wp_die( 'restricted access' );
+if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
// include required files
$includes = array( 'Generator', 'Settings', 'Core', 'Form', 'API', 'Oembed' );

0 comments on commit 97e7413

Please sign in to comment.