PATH:
var
/
www
/
vhosts
/
sandbox.dos-group.com
/
httpdocs
/
mendrisio
/
wp-content
/
plugins
/
vfbp-create-post
/
admin
<?php /** * Class that handles all AJAX calls and admin settings * * This is called directly from vfb-pro/admin/class-addons.php and * vfb-pro/admin/class-ajax.php * * @since 3.0 */ class VFB_Pro_Addon_Create_Post_Admin_Settings { /** * mobile_settings function. * * @access public * @param mixed $data * @return void */ public function settings( $data ) { $post_enable = isset( $data['post-enable'] ) ? $data['post-enable'] : ''; $post_type = isset( $data['post-type'] ) ? $data['post-type'] : ''; $post_status = isset( $data['post-status'] ) ? $data['post-status'] : 'draft'; $post_author = isset( $data['post-author'] ) ? $data['post-author'] : ''; ?> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"> <label for="post-enable"><?php _e( 'Enable Create Post' , 'vfbp-create-post' ); ?></label> </th> <td> <fieldset> <label> <input type="hidden" name="settings[post-enable]" value="0" /> <!-- This sends an unchecked value to the meta table --> <input type="checkbox" name="settings[post-enable]" id="post-enable" value="1"<?php checked( $post_enable, 1 ); ?> /> <?php _e( "Enable Create Post for this form.", 'vfbp-create-post' ); ?> </label> </fieldset> </td> </tr> </tbody> <tbody class="vfb-create-post-settings<?php echo !empty( $post_enable ) ? ' active' : ''; ?>"> <tr valign="top"> <th scope="row"> <label for="post-type"><?php _e( 'Post Type' , 'vfbp-create-post' ); ?></label> </th> <td> <select name="settings[post-type]" id="post-type"> <?php $wp_post_types = get_post_types( '', 'names' ); foreach ( $wp_post_types as $wp_post_type ) { printf( '<option value="%1$s"%2$s>%1$s</option>', $wp_post_type, selected( $post_type, $wp_post_type, 0 ) ); } ?> </select> <p class="description"><?php _e( 'Set the default post type for posts created with this form.' , 'vfbp-create-post' ); ?></p> </td> </tr> <tr valign="top"> <th scope="row"> <label for="post-status"><?php _e( 'Post Status' , 'vfbp-create-post' ); ?></label> </th> <td> <select name="settings[post-status]" id="post-status"> <?php $wp_post_stati = get_post_stati(); foreach ( $wp_post_stati as $wp_post_status ) { printf( '<option value="%1$s"%2$s>%1$s</option>', $wp_post_status, selected( $post_status, $wp_post_status, 0 ) ); } ?> </select> <p class="description"><?php _e( 'Set the default post status for posts created with this form.' , 'vfbp-create-post' ); ?></p> </td> </tr> <tr valign="top"> <th scope="row"> <label for="post-author"><?php _e( 'Post Author' , 'vfbp-create-post' ); ?></label> </th> <td> <select name="settings[post-author]" id="post-author"> <?php $wp_post_users = get_users(); foreach ( $wp_post_users as $wp_post_user ) { printf( '<option value="%1$s"%3$s>%2$s</option>', $wp_post_user->ID, $wp_post_user->display_name, selected( $post_author, $wp_post_user->ID, 0 ) ); } ?> </select> <p class="description"><?php _e( 'Set the default author for posts created with this form.' , 'vfbp-create-post' ); ?></p> </td> </tr> </tbody> </table> <?php } }
[-] class-create-post.php
[open]
[+]
..
[-] class-admin-settings.php
[open]
[-] index.php
[open]