Permalink
Commits on Oct 12, 2018
  1. Flux Layout: Add ol.nested-list + refactor core

    Jonnyauk committed Oct 12, 2018
    Added very cute ol CSS class for auto incremental numbered ordered lists (like 1, 1.1, 1.1.1)… thank Crunchie it’s Friday ;)
Commits on Aug 28, 2018
  1. wfx_get_image() new parameter

    Jonnyauk committed Aug 28, 2018
    New parameter ‘return’ - defines type of data to return (optional):
    
    - 'path' default behaviour, just returns string of image path (if valid)
    - 'detail' returns array with keys of 'path', 'width' and 'height' of image
Commits on Aug 15, 2018
  1. Fix bug in wfx_background_divs()

    Jonnyauk committed Aug 15, 2018
    Fix bug where it was not assigning correct ID’s and counters for multiple wrappers.
Commits on Aug 9, 2018
  1. Wonderflux is now PHP7.2 fully compatible ;)

    Jonnyauk committed Aug 9, 2018
    Replace depreciated create_function() code
  2. Version check feed update

    Jonnyauk committed Aug 9, 2018
    We should be accessing via https ;)
  3. Update copyright

    Jonnyauk committed Aug 9, 2018
  4. Remove legacy social media functionality

    Jonnyauk committed Aug 9, 2018
    All wfx_social_xxxx display functions removed - you should be doing this at theme level, it’s not a framework function - sorry!
Commits on Aug 8, 2018
  1. New filter wflux_css_theme_dependencies

    Jonnyauk committed Aug 8, 2018
    New filter ‘wflux_css_theme_dependencies’ allows us to set CSS dependencies of style.css automatically, which then get loaded BEFORE style.css (using WP standard enqueue always loads them after style.css).
    
    Saves overhead of using wp_dequeue_style() on your main style.css and then enqueing it again - that’s just spaghetti code!
    
    NOTE: Requires an array to be supplied if using this filter as per standard WordPress enqueue_styles()
    
    Example (functions.php - IMPORTANT ensure you have used wp_register_style() to register your additional CSS file first!):
    
    add_filter( 'wflux_css_theme_dependencies', 'mywfx_style_dependencies' );
    function mywfx_style_dependencies( $input ) {
    
    	return array( 'my-css-file' );
    
    }
Commits on Jul 12, 2018
  1. Fix bug in wfx_filter_post_class()

    Jonnyauk committed Jul 12, 2018
    This was bumping certain RestAPI requests and other custom generated queries… now it does not ;)
Commits on May 30, 2018
  1. Extend wfx_allowed_simple_tags()

    Jonnyauk committed May 30, 2018
    Extend to allow ‘style’ tag on span and a when using ‘textnolinks’ or ‘text’ parameters.
Commits on Apr 3, 2018
  1. Make float CSS rules consistently named

    Jonnyauk committed Apr 3, 2018
    We append everything with full ‘left’ and ‘right’ CSS class definitions - so lets do that for the float classes too (old classes retained for backwards compatibility)
Commits on Feb 8, 2018
  1. Flux Layout: ‘flush-‘ CSS rules amends

    Jonnyauk committed Feb 8, 2018
    Yea yea yea, no-one likes !important in CSS, but sometimes it’s actually fine to use them you know… not naughty! In this case we want to ensure that regardless of other CSS rules, if you apply any of the core ‘flush-‘ css classses they always apply - see, not naughty after all ;)
Commits on Feb 2, 2018
  1. Extend wfx_get_image()

    Jonnyauk committed Feb 2, 2018
    New parameter $fallback = path to fallback image if image fetching fails. This is relative to your current active theme directory (already has trailing slash), for instance:
    
    Image path: wf-content/themes/mywfxtheme/assets/images/fallback-image.png
    
    $fallback=assets/images/fallback-image.png
Commits on Jan 15, 2018
  1. Fix HTML5 validation for no-js functionality

    Jonnyauk committed Jan 15, 2018
    Fixes the javascript detection script output - html5 validation fails if you use <script type="text/javascript"> - actually should just be defined as <script> - it’s presumed it’s js ;)
Commits on Jan 4, 2018
  1. New function wfx_get_image()

    Jonnyauk committed Jan 4, 2018
    Useful new function for getting (and validating) paths to custom images. Works for post thumbnails, site options table entries, attachments and ACF stored images (including inside repeater fields) and allows for definition of custom image size.
Commits on Dec 11, 2017
  1. wfx_background_divs() new $classes param

    Jonnyauk committed Dec 11, 2017
    Add a new parameter, $classes - allows for additional CSS classes to be added to optional wrapper <div> created when using this function.
    
    Example:
    
    add_action( 'get_header', 'mywfx_wf_wrappers', 1 );
    function mywfx_wf_wrappers() {
    
    	// Will create:
    	// <div class="wrapper custom-class-1 custom-class-2" id="header-bg-1">
    	// <div class="wrapper" id="header-bg-2">
    	// and automatically apply closing </div>
    	$args_header = array(
    		'depth'		=> 2,
    		'location'	=> 'header',
    		'classes'	=> array(
    			'custom-class-1 custom-class-2'
    		)
    	);
    
    	// Will create:
    	// <div class="wrapper custom-class-a custom-class-b" id="footer-bg-1">
    	// <div class="wrapper custom-class-c" id="footer-bg-2">
    	// and automatically apply closing </div>
    	$args_footer = array(
    		'depth'		=> 2,
    		'location'	=> 'footer',
    		'classes'	=> array(
    			'custom-class-a custom-class-b',
    			'custom-class-c'
    		)
    	);
    
    	wfx_background_divs( $args_header );
    	wfx_background_divs( $args_footer );
    
    }
Commits on Dec 4, 2017
  1. Make loop.php content aware

    Jonnyauk committed Dec 4, 2017
    Most template parts now support advanced replacement of loop.php - just like other tempalte parts in Wonderflux.
    
    This is only really for advanced edge cases - the standard loop.php in Wonderflux will do in 99% of use cases… but this allows you to do really cool things like extending WP_Query and using files like loop-archive-yourcustomposttype.php to do fancy things with your loop otherwise not possible.
    
    TIP: Just to re-iterate, 99% of cases just need loop-content.php in your child theme, see documentation in readme. You can create files like loop-content-archive-posttype.php which will give you full control of ‘inside’ the loop - this update relates to the whole WordPress ’loop’.
    
    TIP: Ensure you start by duplicating loop.php so you retain all Wonderflux hooks, otherwise it will be stormy waters!
Commits on Nov 28, 2017
  1. New filters for wfx_get_template_part() + refactor

    Jonnyauk committed Nov 28, 2017
    New filters to allow alterning of file to include - allows re-use of template parts. Instead of including a file with the right filename and then get_template_file() inside that to point to your custom file, just use filters instead, it’s what the cool kids do (and saves your sanity!)
    
    New filter: 'wflux_template_part_main' - string containing first part of filename to get (slug), eg 'loop-content' (filename example loop-content-archive.php).
    
    New filter: 'wflux_template_part_fragment' - string containing second part of filename to get (name) eg 'archive' (filename example loop-content-archive.php).
    
    New filter: 'wflux_template_part_array' - array of values used to build filename to get (tip - most useful for advanced filtering!), eg array(0 => 'loop-content', 1 => 'archive') (filename example loop-content-archive.php).
    
    NOTE: 'wflux_template_part_array' filter is probably most useful, here is a code example:
    
    <?php
    
    /**
     *
     * Filter template parts so we re-use certain files for consistency.
     *
     * This will make 'my-taxonomy' and date based archives use the file
     * 'loop-content-archive-special.php' in your child theme instead of
     * 'loop-content-archive.php' which is default behaviour in Wonderflux.
     *
     */
    function mywfx_file_parts_filter( $val ) {
    
    	if ( is_tax( 'my-taxonomy' ) || is_date() ) {
    
    		if ( is_array( $val ) && ( array_key_exists( 0, $val ) && array_key_exists( 1, $val ) ) ) {
    
    			// Check we just going to filter loop-content-archive.php
    			if ( $val[0] == 'loop-content' && $val[1] == 'archive' ) {
    
    				$val[1] = 'archive-special';
    
    			}
    
    		}
    
    	}
    
    	return $val;
    
    }
    add_filter( 'wflux_template_part_array', 'mywfx_file_parts_filter' );
    
    ?>
Commits on Nov 22, 2017
  1. Move wfx_page_counter() out of loop.php to hooks

    Jonnyauk committed Nov 22, 2017
    IMPORTANT - This may need you to tweek your child theme on Wonderflux upgrade depending on how your child theme is coded. I’ve moved this out of loop.php, because:
    - it can cause layout issues when archive results are not full width
    - it’s not flexible - moving this to a hooked function means it can be removed more easily
    - No need to override loop.php just to remove the pagination now - just remove_action() for custom pagination layout, much neater… it’s a framework don’t you know!
Commits on Nov 1, 2017
  1. Remove debug info

    Jonnyauk committed Nov 1, 2017
    Ooops, that shouldn’t be in there!
  2. Add post classes to WP REST API JSON output

    Jonnyauk committed Nov 1, 2017
    Adds new data attribute ‘wfx_post_class’ to WP REST API JSON output.
    
    Also adds new filter ‘wflux_restapi_post_types’ to control which post types ‘wfx_post_class’ gets added to.
    
    Final fix for full WP REST API compatibility - see issue #70
  3. Fix file mode/permissions

    Jonnyauk committed Nov 1, 2017
    Files should be 644 (regular) not 775 (executable)
Commits on Oct 25, 2017
  1. Fix WP REST API bug - wfx_remove_page_templates()

    Jonnyauk committed Oct 25, 2017
    Weirdly this function ran when generating a REST API query (which is unexpected!) - added check for admin area as it’s only applicable when in the admin area.
    
    Relates to issue #70
Commits on Oct 4, 2017
  1. Readme update

    Jonnyauk committed Oct 4, 2017
    Link BrowserStack image ;)
  2. Readme formatting

    Jonnyauk committed Oct 4, 2017
    Love markdown formatting… not.
  3. Give some love to BrowserStack

    Jonnyauk committed Oct 4, 2017
    BrowserStack rocks - you should check out their realtime testing ;) Make
    sure your website looks beautiful for all your visitors no matter what they are using!
Commits on Sep 28, 2017
  1. Fix output bug in ‘files in use’ menu

    Jonnyauk committed Sep 28, 2017
    ID was not escaped properly in the Wonderflux > Files in use admin bar menu list items. An ID must not contain white space ;)
Commits on Sep 20, 2017
  1. wfx_debug() strict comparison to zero

    Jonnyauk committed Sep 20, 2017
    More strict detection of 0 for debugging output.
Commits on Sep 8, 2017
  1. Extend wfx_edit_meta() - new users parameter

    Jonnyauk committed Sep 8, 2017
    New parameter for wfx_edit_meta() - ‘usercontrols’ - shows admin link to edit users (default is ’N’ - accepted values ‘Y’/’N’)
Commits on Sep 6, 2017
  1. Remove bug in wfx_debug()

    Jonnyauk committed Sep 6, 2017
    Ah, the irony - debugging the debug function!!
Commits on Sep 4, 2017
  1. Update copyright notice

    Jonnyauk committed Sep 4, 2017
  2. New filter wflux_range_core

    Jonnyauk committed Sep 4, 2017
    ‘wflux_doc_type’ default value is (currently) ‘transitional’ which defines the HTML document type in the admin Advanced Wonderflux options.
    
    Note - must supply as string - accepted values are:
    - transitional
    - strict
    - frameset
    - 1.1
    - 1.1basic
    - html5
    - XHTML/RDFa
Commits on Aug 29, 2017
  1. Remove ’projection’ from CSS media types

    Jonnyauk committed Aug 29, 2017
    This is now an invalid media type for CSS files, ‘screen’ will more than suffice thanks.
Commits on Aug 22, 2017
  1. New filter wflux_range_core

    Jonnyauk committed Aug 22, 2017
    wflux_range_core
    
    ‘wflux_range_core’ default value is ‘1-2-4-5-8-10’ which defines the ‘additional column sizes’ admin Stylelab option. This generates additional CSS column layouts in flux-layout.css
    
    Note - must supply as string in the format ‘1-3-9’ = integers seperated by ’-‘.