add( 'sfw-backtrace', wp_debug_backtrace_summary() ); //$error->add( 'sfw-debug', 'sfw-debug' ); return $error; } /** * Creates specific WP_Error * * @ignore * @since 1.0.0 */ function sfw_item_error( $el = 'Unknown Item', $id = null ) { return sfw_create_error( 'retrieval', sprintf( _x('Could not retrieve %s.', 'Could not retrieve item like Article, Design etc.', 'apparelcuts-spreadshirt' ), is_null( $id ) ? $el : sprintf( __( '%s with ID %s', 'apparelcuts-spreadshirt' ), $el, $id ) ) ); } /** * Creates specific WP_Error * * @ignore * @since 1.0.0 */ function sfw_novalue_error( $el = 'unknown' ) { return sfw_create_error( 'retrieval', sprintf( __('Variable %s can not be empty', 'apparelcuts-spreadshirt' ), $el ) ); } /** * Creates specific WP_Error * * @ignore * @since 1.0.0 */ function sfw_value_error( $data = '' ) { return sfw_create_error( 'retrieval', __('Type of variable not accepted', 'apparelcuts-spreadshirt' ), $data ); }