Hi Riteshoatel,
It seems multi-site switching issue.
I added error recovery flow if we can’t get $rtmedia_points.
It seems working good now. Thanks!
Regards,
Yoshi
+ /*
+ * 2014/11/22: add cp_rtmedia_install by Yoshi.Sakai @ bluemooninc
+ */
function cp_rtmedia_config()
{
$rtmedia_points = maybe_unserialize(get_site_option("rtmedia_points"));
+ if (!$rtmedia_points) {
+ $this->cp_rtmedia_install();
+ }
?>
<br />
<h3 id="rtmedia-cp"><?php _e( 'Points for rtMedia','cp' ); ?></h3>
Add a comment to this line
</table>
<?php
}
-
+ /*
+ * 2014/11/22: add cp_rtmedia_install by Yoshi.Sakai @ bluemooninc
+ */
function cp_rtmedia_config_process()
{
$rtmedia_points = maybe_unserialize(get_site_option("rtmedia_points"));
- foreach ($rtmedia_points as $key => $val) {
- $rtmedia_points[$key]['points']['cp_points'] = (int)$_POST['rtmedia_points'][$key];
- }
- rtmedia_update_site_option( 'rtmedia_points', $rtmedia_points );
+ if (!$rtmedia_points) {
+ $this->cp_rtmedia_install();
+ }
+ if ($rtmedia_points) {
+ foreach ($rtmedia_points as $key => $val) {
+ $rtmedia_points[$key]['points']['cp_points'] = (int)$_POST['rtmedia_points'][$key];
+ }
+ rtmedia_update_site_option( 'rtmedia_points', $rtmedia_points );
+ }
}