PHP calling function within a class

You can merge this two json objects via array_merge. But you must decode before to a array. You have this inside your example, below as single source function. This should get the merged json object. A example function, usable for your mix_cat()method. function mergeToJSON( $obj1, $obj2 ) { $json1 = $this->test_cat(); $json2 = $this->test_cat1(); if … Read more

Enqueue script not working

Your upload.js is not being added because there is already an script added by wordpress as default for the handler upload. So I suggest you to change the handler. If not, you can de-register the upload handler registered by wordpress wp_deregister_script( ‘upload’ ); and then register yours as usual. But I highly recommend you to … Read more

Exclude specifed files from plugin editor

Those constants are set in wp-config.php like define( ‘DISALLOW_FILE_EDIT’, true ); define( ‘DISALLOW_FILE_MODS’, true ); The first line disables file editing in the wp backend, whereas the second line disables plugin installation or deletion entirely. If you want to disable editing of files from the backend only partly, you’d have to do it another way.