Author: super_admin_v3x

wppizza / markup / loop / posts.content.php

Menu items – displaying the content/text as set in each menu item Note: many display options are also available by simply using the relevant shortcode attributes or setting options in WPPizza -> Layout instead of using filters CSS Targeting element ID: #wppizza-article-content-[post_id] element class: .wppizza-article-content 

wppizza / markup / loop / posts.permalink.php

Menu items – displaying the permalink to single menu item Note: many display options are also available by simply using the relevant shortcode attributes or setting options in WPPizza -> Layout instead of using filters If you display the permalink you – most probably – 

wppizza / markup / loop / additives.php

Menu items – displaying the list of additives after all menu items

Note: many display options are also available by simply using the relevant shortcode attributes or setting options in WPPizza -> Layout instead of using filters

CSS Targeting

  • element class: .wppizza-additives
  • element class: .wppizza-additives-[style]

if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout

Structure

<div>

	/* each additive */
	<span>
		<sup>(ident)</sup>
		additive name 
	</span>

</div>

Filters available

apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).

  • filter name: wppizza_filter_menu_additives_class
    purpose: modify classes used

    @param: $classes array (array of classes used in wrapper div)

    @return: array

    examples:

    
    add_filter('wppizza_filter_menu_additives_class', 'prefix_filter_menu_additives_class');
    function prefix_filter_menu_additives_class($classes){
    	/* adding your own class name */
    	$classes[] ='my-class';
    return $classes;
    }
    		
  • filter name: wppizza_filter_menu_additives_markup
    purpose: modify output of element

    @param: $markup array (array of markup elements)
    @param: $style string (style used – default|responsive|grid)
    @return: array

    examples:

    
    
    add_filter('wppizza_filter_menu_additives_markup', 'prefix_filter_menu_additives_markup', 10 ,2);
    function prefix_filter_menu_additives_markup($markup, $style){
    
    	/* 
    		notes: 
    		use print_r($markup) to view markup array keys with their respective markup
    		use print_r($style) to view style used ( default|responsive|grid )
    		use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin 
    	*/
    
    
    	/* example: adding a paragraph AFTER all elements */
    	$markup['my_new_markup'] = '<p>more text after</p>'; 
    
    	/* example: adding a paragraph BEFORE all elements */
    	$new_markup = array();
    	$new_markup['my_new_markup'] = '<p>more text before</p>'; 
    	$new_markup += $markup; # add original markup after
    	return $new_markup ; # return new markup
    
    	/* example: adding a another paragraph BEFORE element using helper function*/
    	$splice_before['my_new_markup']  = '<p>more text before</p>'; 
    	$markup = wppizza_array_splice($markup, $splice_before, 'additives_', true );
    
    	/* example: adding a another paragraph AFTER element using helper function*/
    	$splice_after['my_new_markup']  = '<p>more text after</p>'; 
    	$markup = wppizza_array_splice($markup, $splice_after, '_additives');
    
    
    	/* example: using actions of another plugin that by default outputs html to add it after  all elements */
    	ob_start(); # start buffering
    	do_action('other_plugin_output'); # run action of other plugin that outputs things
    	$buffer= ob_get_contents(); # capture buffer in variable
    	ob_end_clean(); # clean buffer			
    	$markup['my_new_markup'] = $buffer; # add buffered output 
    
    
    
    
    return $markup;
    }
    		

Actions available

  • none

Editing files directly

ensure you have also read the Modify/Edit Templates

basepath: [plugin-path]/wppizza/templates/markup

filepath: [plugin-path]/wppizza/templates/markup/loop/additives.php

Modules used in file

  • none

Module used by other template file(s)

  • none

wppizza / markup / loop / pagination.php

Menu items Pagination/Navigation – display pagination/navigation under menu items if necessary pagination display is dependent on settings in WPPizza -> Layout -> General -> Menu Items per page CSS Targeting element class: .wppizza-navigation element class: .wppizza-navigation-[style] if you simply want to edit some styles/layout (text-sizes, 

wppizza / markup / loop / theme-wrapper.php

Menu items Theme Wrapper Template – to be used in conjunction with Install Option 2 or if you want to use the Navigation widget WP -> Appearance -> Widgets -> WPPizza : Type=Navigation display menu categories dynamically utilising your theme’s layout/templates NOTE: although the below 

wppizza / markup / cart

The main cart using shortcode [wppizza type='cart'] or the widget available from Appearance -> Widgets -> Wppizza -> Widget Type='Cart'

For shortcode attributes please refer to the shortcode section

CSS Targeting

  • Wrapper div element class: wppizza-cart (used by all instances of widget)
    Wrapper div element class: wppizza-cart-nocache (used by instances of widget if cart loaded via ajax)

if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout

Filters available

apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
many display options are also available by simply using the relevant shortcode attributes instead of filters

  • filter name: wppizza_filter_cart_outer_markup
    purpose: modify the html markup of the html as required

    @param: $markup array (array of markup elements)
    @param: $atts array (attributes)
    @param: $id int (unique id for each instance)
    @return: array

  • Note: the cart itself is made up of modules with opening hours added before (if enabled in widget/shortcode), pickup choice selection after (if pickup enabled) and orderinfo (discounts, charges) at end (if enabled).
    Therefore , the visible structure will be something like this:

     <div> .wppizza-opening-hours </div> # opening times - if enabled
    
     <div> .wppizza-cart # wrapper div - filled with below cart info - dynamically
    
    	 <div> .wppizza-cart-info </div> # cart container div - has it's own filter and uses other template files!
    
     </div> # end wrapper div
    
     <div> .wppizza-orders-pickup-choice </div> # pickup/delivery choice checkbox/radio - if enabled
    
     <div> .wppizza-orders-info </div> # order info - if enabled
    
  • filter examples:

    
    
    add_filter('wppizza_filter_cart_outer_markup', 'prefix_filter_cart_outer_markup', 10, 3);
    function prefix_filter_totals_widget_markup($markup, $atts, $id){
    
    	/* 
    		notes: 
    		use print_r($markup) to view array keys with their respective markup
    		use print_r($atts) to view attributes
    		use print_r($id) to view id of cart instance
    		use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin 
    	*/
    
    	/* example: adding a paragraph AFTER cart container div element using standard php concatenation */
    	$markup['_div'] .= '<p>more text after div</p>'; 
    
    	/* example: adding a paragraph BEFORE cart container div element  using standard php concatenation */
    	$markup['div_'] = '<p>more text before div</p>' . $markup['div_']; 
    
    	/* example: adding a paragraph AFTER cart container div element using wppizza array_splice helper function */
    	$splice_after['myprefix_paragraph'] = '<p>more text after div</p>'; 
    	$markup = wppizza_array_splice($markup, $splice_after, '_div' );
    
    	/* example: adding a paragraph BEFORE cart container div element  using wppizza array_splice helper function */
    	$splice_before['myprefix_paragraph'] = '<p>more text buttons div</p>'; 	
    	$markup = wppizza_array_splice($markup, $splice_before, 'div_' , true);
    
    
    	/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
    	ob_start(); # start buffering
    	do_action('other_plugin_output'); # run action of other plugin that outputs things
    	$buffer= ob_get_contents(); # capture buffer in variable
    	ob_end_clean(); # clean buffer			
    	$markup['_div'] = $markup['_div'] . $buffer; # add buffered output after end of wrapper
    
    return $markup;
    }
    		

Actions available

  • none

Editing files directly

ensure you have also read the Modify/Edit Templates

basepath: [plugin-path]/wppizza/templates/markup

filepath: [plugin-path]/wppizza/classes/markup/maincart.php – Not a template/editable file

Modules used in file

  • [basepath]/global/openingtimes.php
  • [basepath]/global/orderinfo.php
  • [basepath]/cart/cart.container.php (has it’s own filter, uses other modules/files)
  • [basepath]/global/pickup_choice.php

Module used by file(s)

  • None

wppizza / markup / cart / cart.container.php

Main cart element containing order details using shortcode [wppizza type=’cart’] or the widget available from Appearance -> Widgets -> Wppizza -> Widget Type=’Cart’ This is the inner cart element excluding the “opening hours”, “pickup choices” and/or “orders info”(discounts, charges) elements that will be displayed before 

wppizza / markup / cart / cart.shopclosed.php

Text displayed (paragraph element) in main cart widget when shop is closed If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization. CSS Targeting paragraph element class: .wppizza-closed if you simply want to edit some styles/layout 

wppizza / markup / cart / cart.empty.php

Text displayed (paragraph element) in main cart widget when cart is empty

If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization.

CSS Targeting

  • paragraph element class: .wppizza-cart-empty

if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout

Filters available

apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).

  • filter name: wppizza_filter_maincart_cartempty_markup
    purpose: modify the html markup of the html as required

    @param: $markup array (array of markup elements)
    @return: array

  • examples:

    
    
    add_filter('wppizza_filter_maincart_cartempty_markup', 'prefix_filter_cartempty_markup');
    function prefix_filter_cartempty_markup($markup){
    
    	/* 
    		notes: 
    		use print_r($markup) to view array keys with their respective markup
    		use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin 
    	*/
    
    	/* example: adding a paragraph AFTER  paragraph element using standard php concatenation */
    	$markup['_p'] .= '<p>more text after</p>'; 
    
    	/* example: adding a paragraph BEFORE paragraph element  using standard php concatenation */
    	$markup['p_'] = '<p>more text before</p>' . $markup['p_']; 
    
    	/* example: adding a paragraph AFTER paragraph element using wppizza array_splice helper function */
    	$splice_after['myprefix_paragraph'] = '<p>more text after</p>'; 
    	$markup = wppizza_array_splice($markup, $splice_after, '_p' );
    
    	/* example: adding a paragraph BEFORE paragraph element  using wppizza array_splice helper function */
    	$splice_before['myprefix_paragraph'] = '<p>more text before</p>'; 	
    	$markup = wppizza_array_splice($markup, $splice_before, 'p_' , true);
    
    	/* example: changing html from using p element to span */
    	$markup['p_'] = str_replace('<p', '<span', $markup['p_']);
    	$markup['_p'] = str_replace('</p', '</span', $markup['_p']);
    
    	/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
    	ob_start(); # start buffering
    	do_action('other_plugin_output'); # run action of other plugin that outputs things
    	$buffer= ob_get_contents(); # capture buffer in variable
    	ob_end_clean(); # clean buffer			
    	$markup['_p'] = $markup['_p'] . $buffer; # add buffered output after end of paragraph
    
    return $markup;
    }
    		

Actions available

  • none

Editing files directly

ensure you have also read the Modify/Edit Templates

basepath: [plugin-path]/wppizza/templates/markup

filepath: [plugin-path]/wppizza/templates/markup/cart/cart.empty.php

Modules used in file

  • none

Module used by file(s)

  • [basepath]/cart/cart.container.php

wppizza / markup / cart / cart.pickup_note.php

Text displayed (paragraph element) in main cart widget when pickup is selected If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization. CSS Targeting paragraph element class: .wppizza-pickup-note if you simply want to edit some styles/layout