You appear to be a bot. Output may be restricted
Description
Cache load of plugin info – new version- If no response then try our registered plugins
- If we can find the server then we try talking to that
- If no response then try WordPress -
Usage
$XML = bw_get_plugin_info_cache2( $plugin_slug );
Parameters
- $plugin_slug
- ( string ) required – the plugin slug e.g. oik or jetpack
Returns
XML XML form of information about the pluginSource
File name: oik-bob-bing-wide/shortcodes/oik-plug.phpLines:
1 to 42 of 42
function bw_get_plugin_info_cache2( $plugin_slug ) { bw_trace2(); //$response_xml = wp_cache_get( "bw_plug2", $plugin_slug ); $response_xml = get_transient( 'bw_plug2_'. $plugin_slug ); if ( is_array( $response_xml ) ) { $response_xml = (object) $response_xml; } bw_trace2( $response_xml, "response_xml" ); if ( empty( $response_xml ) || !is_object( $response_xml ) ) { $response = bw_get_oik_plugins_info( $plugin_slug ); if ( $response ) { $response_xml = null; //$cache_xml = bw_get_response_as_xml( $response ); //wp_cache_set( "bw_plug2", $response, $plugin_slug, 43200 ); set_transient( "bw_plug2_" . $plugin_slug, $response, 43200 ); //gobang(); } else { $response_xml = bw_get_plugin_info2( $plugin_slug ); } if ( !empty( $response_xml ) ) { $response_xml = _bw_tidy_response_xml( $response_xml ); //wp_cache_set( "bw_plug2", $response_xml, $plugin_slug, 43200 ); set_transient( "bw_plug2_" . $plugin_slug, $response_xml, 43200 ); } } else { bw_trace2( $response_xml, "response_xml from cache" ); } bw_trace2( $response_xml, "response_xml" ); if ( $response_xml ) { $simple_xml = $response_xml; //simplexml_load_string( $response_xml ); } else { $simple_xml = $response; } bw_trace2( $simple_xml, "simple_xml", false ); return( $simple_xml ); }View on GitHub