you need to remove the call of absint
at beginning. you should do more debugging to avoid this mistake.
after that the division $number / $step
always returns a float. then to round the value, use something like that :
$number = floor($number / $atts['step']) * $atts['step'];
return ( $min <= $number && $number <= $max ) ? $number : $setting->default;
Related Posts:
- Need help setting default setting value for radio button in theme customizer
- Is having multiple theme customizers for different pages possible?
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Dynamically change feature image in customiser
- One button to change all settings in theme customizer?
- Design view breaking on Pages
- Dynamically loaded Theme components based on Customizer Settings values : changes not appearing in Customizer preview – (Workaround found)
- Show different Customizer Settings on Page-Tamplates
- How to get custom image size for image uploaded in Customizer
- Passing array in add_option()
- How do I get current page ID in WordPress customizer file?
- Customizer: active_callback and sanitize_callback incompatibility?
- Skt full width basic slideshow problem
- WordPress Customizer Default Image
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Need advice on theme customizer and child themes
- Getting text from custom field from customizer
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Use Custiomizer to setup meta theme color tag
- How to add button to top of theme customizer?
- How to store the_post_thumbnail() value in a variable
- Function to return true if current page has child pages
- How to determine if WP_DEBUG is enabled? [duplicate]
- Get author full name
- How to export/import theme customizer settings?
- How to get the registered sidebar’s name by its id?
- is there a simple way to list every templates / php files used to generate a specific page?
- Check if Favicon is set in Customizer
- WordPress Customizer: How can you have multiple active callbacks on one control?
- How to use copy() function and paste file in /wp-content/themes directory
- How can I add a class to a single menu item?
- How to add default images into theme customizer image control?
- I think emoji are killing my WordPress site… How can I debug?
- Am I not understanding plugins?
- How can I use a $wp_customize to edit my homepage image slider?
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- Customizer Show/Hide
- Why is this Ajax not working?
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Displaying theme options in css
- max_input_vars: how many am I using?
- How to load a template-part based on a url wildcard?
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Multiple WordPress Menus that will only display all pages
- Customizer – Prefix Class Extension
- How to output widget
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- How to show part of the_content?
- get_the_tags() not iterating through for/while loop, but will with foreach
- Hide categories that are not used in the post type
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- post created but no permalink
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- Menu jumping when calling it via PHP
- Problem custom control Customizer
- Is there a way to conditionally check whether a WordPress post title is empty?
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- How to set up a If is_singular statement?
- Underscore – Self hosted fonts
- Get title attribute from galleries
- Why in my theme I can’t see all the statics content under the posts?
- Theme not calling Jquery properly
- How can I use a sliced image As banner? [closed]
- Double Curly Brackets in Php
- Please show me how to use an if/else statement in combination with wp_enqueue
- Get post categories
- Output only links using wp_nav_menu()
- How to add aria role and schema markup to custom walker container
- jQuery accordion menu
- Removed jQuery script from header.php , any problems?
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Get options from database using php class
- Trying to change featured image from 180×180 to full width on home page
- Remove the Tag from wp_nav_menu
- WordPress redirects page query parameter in URL
- WordPress navigation wont appear with wp_head
- Need help for some PHP code
- How do you get the current post taxonomy so I can get the current post taxonomy? into a variable to THEN loop through all post with that taxonomy.,
- how to replace h1 entry title with h2 in category pages only
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Unable to retrieve get_author_posts_url
- Display post date also if the date it’s the same for each post
- Submit remote form to wordpress REST API and save data to custom post type
- alternate left – right content inside the loop
- Store user form submitted information in post type
- Add a custom link to each image in WordPress gallery
- register dependency css and js inside a plugin class
- WordPress files break if I edit them, but adding a closing PHP tag fixes it
- Collapsible menu on post sidebar only expands and does not collapse
- Using get_theme_mod with checkbox to display content
- Not able to get the exact URL of the file on server located in active wordpress theme
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- need help to arabic text in wordpress
- Using is home to get content [closed]
- How I can give a php page a style from my theme
- How can I fix my pagination?
- Variable ++ in query loop
- functions.php doesn’t load all custom theme assets