function admin_enqueue_scripts() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-slider'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-selectable'); wp_enqueue_script('jquery-ui-autocomplete'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_script('jquery-ui-spinner'); wp_enqueue_script('jquery-effects-core'); wp_register_script('socialchef-admin', SocialChef_Theme_Utils::get_file_uri('/includes/admin/admin.js'), false, '1.0.0'); wp_enqueue_script('socialchef-admin'); wp_register_script('socialchef-widgets', SocialChef_Theme_Utils::get_file_uri('/includes/admin/widgets.js'), false, '1.0.0'); wp_enqueue_script('socialchef-widgets'); wp_enqueue_style('socialchef-admin-css', SocialChef_Theme_Utils::get_file_uri('/css/admin-custom.css'), false); wp_enqueue_style('socialchef-admin-ui-css', SocialChef_Theme_Utils::get_file_uri('/css/jquery-ui.min.css'), false); }
function get_group_avatar($avatar) { global $bp, $groups_template; if (strpos($avatar, 'group-avatars')) { return $avatar; } else { $custom_avatar = SocialChef_Theme_Utils::get_file_uri('/images/avatar.jpg'); if ($bp->current_action == "") { return '<img class="avatar" alt="' . esc_attr($groups_template->group->name) . '" src="' . esc_url($custom_avatar) . '" width="' . BP_AVATAR_THUMB_WIDTH . '" height="' . BP_AVATAR_THUMB_HEIGHT . '" />'; } else { return '<img class="avatar" alt="' . esc_attr($groups_template->group->name) . '" src="' . esc_url($custom_avatar) . '" width="' . BP_AVATAR_FULL_WIDTH . '" height="' . BP_AVATAR_FULL_HEIGHT . '" />'; } } }
/** * Display the upload post form */ function upload_form($content_type = 'recipe') { if ($content_type == 'recipe') { $this->_initialize_recipe_fields(); } // Reset postdata in case it got polluted somewhere wp_reset_postdata(); $form_post_id = get_the_id(); $post_id = (int) $form_post_id; ob_start(); ?> <script> window.adminAjaxUrl = '<?php echo home_url() . "/wp-admin/admin-ajax.php"; ?> '; </script> <form action="<?php echo esc_url(admin_url('admin-ajax.php')); ?> " method="post" id="fes-upload-form-<?php echo esc_attr($content_type); ?> " name="fes-upload-form-<?php echo esc_attr($content_type); ?> " class="fes-upload-form fes-form-<?php echo esc_attr($content_type); ?> " enctype="multipart/form-data"> <div class="alert alert-danger" style="display:none"> <?php _e('Errors were encountered when processing your submission. Please correct them and submit again.', 'socialchef'); ?> </div> <?php if (!empty($_GET) && isset($_GET['response']) && ($_GET['response'] == 'fes-sent' || $_GET['response'] == 'fes-recipe-sent' || $_GET['response'] == 'fes-recipe-updated')) { $this->_display_response_notices($_GET); } else { $this->_display_response_notices($_GET); ?> <section> <script> window.enableNutritionalElements = <?php echo esc_js($this->sc_theme_globals->enable_nutritional_elements()); ?> ; window.ingredientQuantityText = '<?php echo esc_js(__('Quantity', 'socialchef')); ?> '; window.ingredientNameText = '<?php echo esc_js(__('Ingredient', 'socialchef')); ?> '; window.nutritionalElementQuantityText = '<?php echo esc_js(__('Quantity', 'socialchef')); ?> '; window.nutritionalElementNameText = '<?php echo esc_js(__('Nutritional element', 'socialchef')); ?> '; window.instructionText = '<?php echo esc_js(__('Enter instruction', 'socialchef')); ?> '; </script> <p><?php _e('Tous les champs sont requis.', 'socialchef'); ?> </p> <?php $atts = array('type' => 'hidden', 'role' => 'internal', 'name' => 'post_author', 'id' => 'fes_post_author', 'value' => $this->get_current_user_id()); echo $this->_render_input($atts); $atts = array('type' => 'hidden', 'role' => 'internal', 'name' => 'content_type', 'id' => 'fes_content_type', 'value' => $content_type); echo $this->_render_input($atts); if ($this->entry_id > 0) { $atts = array('type' => 'hidden', 'role' => 'internal', 'name' => 'entry_id', 'value' => $this->entry_id, 'id' => 'fes_entry_id'); echo $this->_render_input($atts); } $atts = array('type' => 'text', 'role' => 'title', 'name' => 'post_title', 'id' => 'fes_post_title', 'class' => '', 'description' => __('Titre', 'socialchef')); echo '<div class="f-row">'; echo $this->_render_input($atts); echo '</div>'; $this->_render_extra_fields(); ?> </section> <section> <h2><?php _e('Description', 'socialchef'); ?> </h2> <div class="f-row"> <div class="full"> <?php $atts = array('role' => 'content', 'name' => 'post_content', 'id' => 'fes_post_content', 'class' => '', 'description' => __('Description', 'socialchef'), 'wysiwyg_enabled' => true); echo $this->_render_textarea($atts); ?> </div> </div> </section> <section> <h2><?php _e('Photo', 'socialchef'); ?> </h2> <div class="f-row full"> <?php $atts = array('type' => 'file', 'role' => 'file', 'name' => 'featured_image', 'id' => 'fes_featured_image', 'multiple' => false); echo $this->_render_input($atts); ?> </div> <div class="f-row full"> <?php $atts = array('type' => 'submit', 'role' => 'internal', 'name' => 'submitRecipe', 'id' => 'submit_recipe', 'class' => 'button', 'value' => __('Enregistrer cette offre', 'socialchef')); echo $this->_render_input($atts); if (isset($_GET['fesid'])) { $atts = array('type' => 'hidden', 'role' => 'internal', 'name' => 'fesid', 'id' => 'fesid', 'value' => wp_kses($_GET['fesid'], '')); echo $this->_render_input($atts); } $atts = array('type' => 'hidden', 'role' => 'internal', 'name' => 'action', 'id' => 'fes_action', 'value' => 'frontend_recipe_submit'); echo $this->_render_input($atts); wp_nonce_field(FES_NONCE, 'fes_nonce'); ?> <input type="hidden" name="form_post_id" value="<?php echo (int) $form_post_id; ?> " /> <div class="recipe_saving" style="display:none"><img src="<?php echo SocialChef_Theme_Utils::get_file_uri('/images/ico/ajax-loader.gif'); ?> " alt="..." /></div> </div> <?php } ?> <div class="clear"></div> </form> <?php return ob_get_clean(); }
public function get_theme_logo_src() { $logo_src = of_get_option('website_logo_upload', ''); $logo_src = empty($logo_src) ? SocialChef_Theme_Utils::get_file_uri('/images/ico/logo.png') : $logo_src; return $logo_src; }
$sc_is_custom_home = true; } ?> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?> ; charset=<?php bloginfo('charset'); ?> " /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="<?php echo esc_url(SocialChef_Theme_Utils::get_file_uri('/js/html5shiv.js')); ?> "></script> <script src="<?php echo esc_url(SocialChef_Theme_Utils::get_file_uri('/js/respond.min.js')); ?> "></script> <![endif]--> <title><?php wp_title(); ?> </title> <link rel="shortcut icon" href="<?php echo esc_url(SocialChef_Theme_Utils::get_file_uri('/images/favicon.ico')); ?>