Adding Image Alternate Text into WordPress Image Attachment using python-wordpress-xmlrpc Library
Problem I'm using python-wordpress-xmlrpc to create a post remotely into WordPress, all doing fine except when I'm uploading an attachment image, I can't set image alternate text ( alt="" ) to the corresponding image. Solution Create a custom WordPress plugin to extend the built-in WordPress XMLRPC method. Create a class in your python script to access that custom method. Example Here is the custom plugin I mentioned above [ link ]: <?php /** * Plugin Name: xmlrpc-extend * Description: xmlrpc-extend * Author: edgar galliamov * Author URI: * Version: 0.1 * Plugin URI: https://github.com/g-gabber */ /*************************************************************** * SECURITY : Exit if accessed directly ***************************************************************/ if ( ! defined ( 'ABSPATH' ) ) { die ( 'Direct acces not allowed!' ); } function wp_editMedia ( $args ) { global $wp_xmlrpc_server ; ...