“Notice: Undefined variable: content” is showing [closed]

Although the actual question is off topic, I would make a few alterations to the code to make it more reliable and a bit faster and less resource intensive: Add $content=””; right at the top of the function, this will take care off the Notice: Undefined variable notice Only get the term id’s from wp_get_post_terms(). … Read more

Enable/Disable WP options programmatically

I understand what you are trying, to make changing the WP config settings more convenient but I do not think it is possible to change them from a plugin. Constants like WP_DEBUG and DISALLOW_FILE_EDIT are defined in core files, specifically in wp-config.php, according to the Codex and, looking over the source code of this file … Read more

Debugging PHP object during Ajax call in WordPress

If you want to see your object in that variable you have to convert it to a string: $data_str = print_r( $this, true ); Then you can include it on your error array, or if you’re just debugging your code you can send it to your web server’s error log file using error_log: error_log( $data_str … Read more

WordPress visual editor broke due to non standard port?

I had exactly same issue with Visual Editor but my site was working on port 80. This is what I did : Edited wp-config.php and added the following : define( ‘CONCATENATE_SCRIPTS’, false ); and everything worked fine. Additionally you can check if wp-includes/js/tinymce/wp-tinymce.js.gz file exists or not. If not, then upload it via FTP

Using FirePHP with WordPress

I use it including the file (Match you actual file location): require ‘../../FirePHPCore/fb.php’; and then call by using fb( $variable, ‘Message Title’); Be sure that you’ve installed and activated the FirePHP addon on Firefox. There’s also a WordPress plugin for FirePHP, but I’ve never used it.

Where’s The Best Place to use Register_Shutdown_Function()?

WordPress core register a shutdown function on its own (source) the function shutdown_action_hook registered to be ran on shutdown, call do_action( ‘shutdown’ ); and little more (source). So, if you want to register a shutdown function in WordPress way just add your function on ‘shutdown’ hook: add_action( ‘shutdown’, ‘my_shutdown_callback’ ); function my_shutdown_callback() { error_log(‘Goodbye’); } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)