Support » Developing with WordPress » Rendering a block with PHP instead of Javascript

  • I just discovered that blocks don’t update their HTML code when changes to the CSS and frontend Javascript are made. I want to prevent this by rewritng the block render functions from Javascript to PHP.

    However, one of the block attributes specify a source, e.g.

    	someText: {
    		type: 'array',
    		source: 'children',
    		selector: '.container-for-some-text'
    	}

    and that one attribute is the only one whose value can’t be read by the PHP script. Is there anything I could do to be able to use the attribute in PHP?

  • You must be logged in to reply to this topic.