umchal
Forum Replies Created
-
Thanks!
Forum: Hacks
In reply to: Acessing Options from External PHP FileThanks bsworkz,
It seems to work and faster than loading the whole admin panel.
I’m not sure about the part you mentioned sanitizing and including nonce. Would you mind giving an example?
This is what I achieved so far. There are two files: the main plugin file and the target file for iframe. It’s working great. But I really like to know how to prevent SQL injection exploits.
iframeadmin.php
<?php /* Plugin Name: Iframe Admin Panel Sample Description: This is a sample plugin to demonstrate an iframe administration page. Version: 1.0 Author: umchal */ /* Option Menu and Panel */ add_action('admin_menu','iframe_admin_panel_menu'); function iframe_admin_panel_menu() { add_options_page( 'Iframe Admin Panel Sample Setting Page', 'Iframe Admin Panel', 'manage_options', __FILE__, 'iframe_admin_panel_optionpage' ); } function iframe_admin_panel_optionpage() { $frametarget = plugins_url('frame01.php', __FILE__); ?> <div class="wrap"> <div id="icon-themes" class="icon32"></div> <h2>Iframe Admin Panel Sample</h2> <iframe name="inlineframe" src="<?php echo $frametarget . '?abspath=' . ABSPATH ;?>" frameborder="0" scrolling="auto" width="500" height="600" marginwidth="5" marginheight="5" ></iframe> </div> <?php } ?>frame01.php
<?php // require( $_GET["abspath"] . '/wp-load.php'); require( $_GET["abspath"] . '/wp-admin/admin.php'); if(isset($_POST['submitform']) && $_POST['submitform'] == 1){ update_option('iframeadmin_option1', $_POST['saved_option1']); update_option('iframeadmin_option2',$_POST['saved_option2']); echo '<div class="updated"><p>the options are updated.</p></div>'; } ?> <html> <body> <form action="" method="post"> <input type="text" name="saved_option1" value="" /> <input type="text" name="saved_option2" value="" /> <input type="hidden" name="abspath" value="<?php $_GET["abspath"]; ?>" /> <input type="hidden" name="submitform" value="1" /> <input type="submit" value="save" class="button-primary" /> </form> <p>Option1: <?php echo get_option('iframeadmin_option1');?></p> <p>Option2: <?php echo get_option('iframeadmin_option2');?></p> </body> </html>Forum: Plugins
In reply to: [WP RSS Multi Importer] [Plugin: WP RSS Multi Importer] Multiple Feed GroupsYes, I have FTP access but am not sure why it is needed. What about uploading the beta version somewhere so that I can download it and install it on the server manually.
Forum: Plugins
In reply to: [WP RSS Multi Importer] [Plugin: WP RSS Multi Importer] Multiple Feed GroupsThat’s nice to hear it. I don’t mind doing some tests. 🙂
Thanks, it worked.
Forum: Themes and Templates
In reply to: Why Should Not Edit Twenty Eleven?I see, WordPress also updates the default theme too. Thanks!