/**
     * Callback for the 'espresso_people_type' taxonomy metabox content.
     *
     * @param WP_Post $post
     * @param array       $box  metabox args
     *
     * @return string metabox content.
     */
    public static function people_type_metabox_content($post, $box)
    {
        ?>
		<div class="metabox-help-description">
			<p class="description"><?php 
        _e('When you assign a person to a people type here, it just indicates that this person fulfills that role in your organization and this person will be listed on the archive page for that person type.', 'event_espresso');
        ?>
</p>
		</div>
		<?php 
        post_categories_meta_box($post, $box);
    }
 /** 
  * Replaces default input box for tags.
  * Includes metabox for categories
  * 
  * @since 0.1
  * 
  * @param array $form_fields
  * @param object $post
  * @return array
  */
 public static function attachment_fields_to_edit($form_fields, $post)
 {
     /** TODO: Hack against the form field upload **/
     if ('media' != get_current_screen()->id) {
         unset($form_fields['media_category']);
         return $form_fields;
     }
     $box = array('id' => 'categorydiv', 'title' => 'Cat', 'callback' => 'post_categories_meta_box', 'args' => array('taxonomy' => 'media_category'));
     ob_start();
     include 'includes/meta-boxes.php';
     post_categories_meta_box($post, $box);
     $html = ob_get_clean();
     $form_fields['media_category']['input'] = 'html';
     $form_fields['media_category']['html'] = apply_filters('media_category_html', $html, $form_fields['media_category'], $post);
     return $form_fields;
 }
 /**
  * Taxonomies meta box callback
  * @param object $post
  * @param array $tax
  */
 public function taxonomy_meta_boxes($post, $tax)
 {
     if (isset($tax['args']['taxonomy'])) {
         do_action('fa_tax_meta_box_cb_' . $tax['args']['taxonomy'], $post, $tax);
     }
     post_categories_meta_box($post, $tax);
 }
    public function widget($args, $instance)
    {
        $title = apply_filters('widget_title', $instance['title']);
        // before and after widget arguments are defined by themes
        echo $args['before_widget'];
        if (!empty($title)) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
        // Creación formulario
        $user_ID = get_current_user_id();
        if ($user_ID != 0) {
            $user_info = get_userdata($user_ID);
            $nombre = $user_info->first_name . " " . $user_info->last_name;
            $email = $user_info->user_email;
            ?>
            <a class="popup-with-form" href="#form-send-f">Open form</a>

            <div id="form-send-f" class="mfp-hide white-popup-block">
                <h3>Envío de link por email</h3>

                <form name="login" id="login" class="forma-login-envio">
                    <input class="box-text" type="hidden" id="user_name" name="user_name" required="required"
                           placeholder="De:" value="<?php 
            echo $nombre;
            ?>
">
                    <input class="box-text" type="hidden" id="user_from" name="user_from" required="required"
                           placeholder="Nombre:" value="<?php 
            echo $email;
            ?>
">
                    <ul class="login_wid">

                        <li><input class="box-text" type="email" id="user_to" name="user_to" required="required"
                                   placeholder="Para:"></li>
                        <li><input class="box-text" type="text" id="user_asunto" name="user_asunto" required="required"
                                   placeholder="Asunto:"></li>
                        <li><input class="box-text" type="text" id="user_cuerpo" name="user_cuerpo" required="required"
                                   placeholder="Mensaje:"></li>
                        <li>
                            <div><input class="btn-ingreso" name="login" type="submit" value="Enviar"></div>
                        </li>
                        <li>
                            <div id='mensaje-envio'></div>
                        </li>

                    </ul>
                    <div class="campos-reservados">
                        <input class="box-text" type="text" id="user_file_name" name="user_file_name"
                               required="required"
                               placeholder="Nombre archivo">
                        <input class="box-text" type="text" id="user_file" name="user_file" required="required"
                               placeholder="Archivo">
                    </div>

                </form>
                <?php 
            global $current_user;
            get_currentuserinfo();
            //echo 'Username: '******'stylesheet'
                  href='<?php 
            echo get_site_url();
            ?>
/wp-admin/load-styles.php?c=0&amp;dir=ltr&amp;load=dashicons,buttons,media-views,wp-admin,wp-auth-check,wp-pointer,wp-jquery-ui-dialog&amp;ver=4.2.4'
                  type='text/css' media='all'/>

            <link rel='stylesheet' id='jqui-css-css'
                  href='<?php 
            echo get_site_url();
            ?>
/wp-content/plugins/download-manager/jqui/theme/jquery-ui.css?ver=4.2.4'
                  type='text/css' media='all'/>
            <script type="text/javascript">
                jQuery(document).ready(function () {
                    jQuery('.popup-with-form').magnificPopup({
                        type: 'inline',
                        preloader: false,
                        focus: '#name',
                        // When elemened is focused, some mobile browsers in some cases zoom in
                        // It looks not nice, so we disable it:
                        callbacks: {
                            beforeOpen: function () {
                                if (jQuery(window).width() < 700) {
                                    this.st.focus = false;
                                } else {
                                    this.st.focus = '#name';
                                }
                            }
                        }
                    });
                    botonVar = '<div class=" " style="float: left; padding: 10px">' +
                        '<input type="submit" name="publish" id="publish"' +
                        ' class="button button-primary button-large  btn-subir-archivos" value="Subir archivos">' +
                        '</div>';
                    jQuery('.mostrarcategorias .navbar-header').append(botonVar)
                });
                <?php 
            global $current_user;
            get_currentuserinfo();
            echo "var user ='******';";
            ?>
            </script>
            <style>
                .input-group {
                    display: none !important;
                }

                #wpdm-activate-shop, #ftabs .ui-tabs-nav, #tabs .ui-tabs-nav, #lock-options, #package-icons {
                    display: none
                }

                #link_label_row, #stock_row, #downliad_limit_row, #view_count_row {
                    display: none
                }

                .margen0 {
                    padding: 0 !important;
                    margin: 10px 0 0 0;
                }

                .margentabla {
                    border: 1px solid #e7e7e7;
                    padding: 10px;
                    border-radius: 5px;
                    background-color: #f5f5f5;
                    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
                    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
                }

                .plupload-browse-button {
                    width: 100%;
                }

            </style>
            <div class="w3eden">
                <!--<div class="col-md-12 col-sm-12 col-xs-12">
                    <input type="submit" name="publish" id="publish"
                           class="button button-primary button-large  btn-subir-archivos" value="Subir archivos">
                </div>-->
                <div class="subir-archiuvos col-md-12 col-sm-12 col-xs-12 margentabla ">
                    <div class="col-md-8 col-sm-12 col-xs-12 margen0">
                        <div class="col-md-12 col-sm-12 col-xs-12 margen0">
                            <div id="post-body-content" style="position: relative;">
                                <div id="titlediv">
                                    <div id="titlewrap">
                                        <input type="text" name="post_title" size="30" value="" id="title"
                                               spellcheck="true"
                                               placeholder="Introduce el título aquí">
                                    </div>
                                </div>

                                <div id="postdivrich" class="postarea wp-editor-expand">
                                    <div>
                                        <label for="content">Descripción</label>
                                    <textarea class="wp-editor-area" style="height:150px; margin: 5px; padding: 5px 0;"
                                              cols="40" name="content" id="content"
                                              aria-hidden="false"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12 margen0">
                            <?php 
            // interface de agregar archivo
            include ABSPATH . "wp-content/plugins/download-manager/tpls/metaboxes/attach-file.php";
            ?>

                        </div>
                    </div>
                    <div class="col-md-4 col-sm-12 col-xs-12 margen0">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <?php 
            // pone categorias
            require_once ABSPATH . 'wp-content/plugins/misiva-mini/recursos/meta-boxes-misiva.php';
            require_once ABSPATH . 'wp-admin/includes/template.php';
            $post = (object) array('ID' => '4444');
            $box = array('args' => array('taxonomy' => 'wpdmcategory'));
            post_categories_meta_box($post, $box);
            //remove_meta_box( 'wpdmcategory', 'slides', 'side' );
            //add_meta_box('wpdmcategory',  'Slide Image' , 'post_thumbnail_meta_box', 'slides', 'normal', 'high');
            $file = get_post_meta($post->ID, "_filedata", true);
            //fin  pone categorias
            ?>
                            <div id="delete-action">
                            </div>
                            <div id="major-publishing-actions  ">


                                <div id="publishing-action row col-md-12 col-sm-12 col-xs-12 margen0">
                                    <div class="col-md-6 col-sm-6 col-xs-12 margen0">
                                        <span class="messageSave"></span>
                                    </div>
                                    <div class="col-md-6 col-sm-6 col-xs-12 pull-right margen0">
                                        <input type="submit" value="Publicar"
                                               class="button button-primary button-large  btn-subir-archivos pull-right"
                                               id="publicar"
                                               name="publicar">
                                    </div>
                                </div>
                                <div class="clear"></div>
                                <?php 
            // interface que muestra el archivo subido
            include ABSPATH . "wp-content/plugins/download-manager/tpls/metaboxes/attached-files.php";
            ?>
                            </div>
                            <div class="col-md-12 col-sm-12 col-xs-12 hidden">
                                <?php 
            // interface de parametros que la vamos a usar oculta
            //                            include(ABSPATH . "wp-content/plugins/download-manager/tpls/metaboxes/package-settings.php");
            ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <?php 
        } else {
            echo "No log ";
        }
    }
Exemple #5
0
 public function WPCB_mb_taxonomy($post, $vars)
 {
     post_categories_meta_box($post, array("id" => "WPCB_mb_taxonomy", "title" => "", "args" => $vars['args']));
 }
Exemple #6
0
    _e('Post templates are stored in the "templates" directory of the plugin.', 'event_espresso');
    ?>
</p>
		<?php 
} else {
    ?>
		<input name="espresso_post_type" type="hidden" value="post" />
		<?php 
}
?>
        <p class="create-post post-tags"><label><?php 
_e('Tags:', 'event_espresso');
?>
</label> <span><input  type="text" id="post_tags" name="post_tags" size="20" value="<?php 
echo $tags;
?>
"></span></p>
        <p class="section-heading"><?php 
_e('Post Categories:', 'event_espresso');
?>
 </p>
        <?php 
require_once 'includes/meta-boxes.php';
post_categories_meta_box($post_data, $box);
?>

        <!-- if post templates installed, post template -->

    </div>
</div>
<!-- /event-post -->
 /**
  * bbt_link_categories_meta_box
  * metabox view template
  * @access public
  */
 public function bbt_categories_meta_box($post)
 {
     post_categories_meta_box($post, array());
 }
 /**
  * Display a single item sub page; prepare the form to 
  * change the meta data for a single attachment.
  * 
  * This function is not used in WordPress 3.5 and later.
  *
  * @since 0.1
  * 
  * @param	int		The WordPress Post ID of the attachment item
  *
  * @return	array	message and/or HTML content
  */
 private static function _display_single_item($post_id)
 {
     global $post;
     /*
      * This function sets the global $post
      */
     $post_data = MLAData::mla_get_attachment_by_id($post_id);
     if (!isset($post_data)) {
         return array('message' => 'ERROR: Could not retrieve Attachment.', 'body' => '');
     }
     if (!current_user_can('edit_post', $post_id)) {
         return array('message' => 'You are not allowed to edit this Attachment.', 'body' => '');
     }
     if (!empty($post_data['mla_wp_attachment_metadata'])) {
         $page_template_array = MLAData::mla_load_template(MLA_PLUGIN_PATH . 'tpls/admin-display-single-image.tpl');
         $width = isset($post_data['mla_wp_attachment_metadata']['width']) ? $post_data['mla_wp_attachment_metadata']['width'] : '';
         $height = isset($post_data['mla_wp_attachment_metadata']['height']) ? $post_data['mla_wp_attachment_metadata']['height'] : '';
         $image_meta = var_export($post_data['mla_wp_attachment_metadata'], true);
         if (!isset($post_data['mla_wp_attachment_image_alt'])) {
             $post_data['mla_wp_attachment_image_alt'] = '';
         }
     } else {
         $page_template_array = MLAData::mla_load_template(MLA_PLUGIN_PATH . 'tpls/admin-display-single-document.tpl');
         $width = '';
         $height = '';
         $image_meta = '';
     }
     if (array($page_template_array)) {
         $page_template = $page_template_array['page'];
         $authors_template = $page_template_array['authors'];
         $postbox_template = $page_template_array['postbox'];
     } else {
         error_log("ERROR: MLA::_display_single_item \$page_template_array = " . var_export($page_template_array, true), 0);
         $page_template = $page_template_array;
         $authors_template = '';
         $postbox_template = '';
     }
     if (empty($post_data['mla_references']['parent_title'])) {
         $parent_info = $post_data['mla_references']['parent_errors'];
     } else {
         $parent_info = sprintf('(%1$s) %2$s %3$s', $post_data['mla_references']['parent_type'], $post_data['mla_references']['parent_title'], $post_data['mla_references']['parent_errors']);
     }
     if ($authors = self::_authors_dropdown($post_data['post_author'], 'attachments[' . $post_data['ID'] . '][post_author]')) {
         $args = array('ID' => $post_data['ID'], 'authors' => $authors);
         $authors = MLAData::mla_parse_template($authors_template, $args);
     } else {
         $authors = '';
     }
     if (MLAOptions::$process_featured_in) {
         $features = '';
         foreach ($post_data['mla_references']['features'] as $feature_id => $feature) {
             if ($feature_id == $post_data['post_parent']) {
                 $parent = 'PARENT ';
             } else {
                 $parent = '';
             }
             $features .= sprintf('%1$s (%2$s %3$s), %4$s', $parent, $feature->post_type, $feature_id, $feature->post_title) . "\r\n";
         }
         // foreach $feature
     } else {
         $features = 'disabled';
     }
     if (MLAOptions::$process_inserted_in) {
         $inserts = '';
         foreach ($post_data['mla_references']['inserts'] as $file => $insert_array) {
             $inserts .= $file . "\r\n";
             foreach ($insert_array as $insert) {
                 if ($insert->ID == $post_data['post_parent']) {
                     $parent = '  PARENT ';
                 } else {
                     $parent = '  ';
                 }
                 $inserts .= sprintf('%1$s (%2$s %3$s), %4$s', $parent, $insert->post_type, $insert->ID, $insert->post_title) . "\r\n";
             }
             // foreach $insert
         }
         // foreach $file
     } else {
         $inserts = 'disabled';
     }
     if (MLAOptions::$process_gallery_in) {
         $galleries = '';
         foreach ($post_data['mla_references']['galleries'] as $gallery_id => $gallery) {
             if ($gallery_id == $post_data['post_parent']) {
                 $parent = 'PARENT ';
             } else {
                 $parent = '';
             }
             $galleries .= sprintf('%1$s (%2$s %3$s), %4$s', $parent, $gallery['post_type'], $gallery_id, $gallery['post_title']) . "\r\n";
         }
         // foreach $gallery
     } else {
         $galleries = 'disabled';
     }
     if (MLAOptions::$process_mla_gallery_in) {
         $mla_galleries = '';
         foreach ($post_data['mla_references']['mla_galleries'] as $gallery_id => $gallery) {
             if ($gallery_id == $post_data['post_parent']) {
                 $parent = 'PARENT ';
             } else {
                 $parent = '';
             }
             $mla_galleries .= sprintf('%1$s (%2$s %3$s), %4$s', $parent, $gallery['post_type'], $gallery_id, $gallery['post_title']) . "\r\n";
         }
         // foreach $gallery
     } else {
         $mla_galleries = 'disabled';
     }
     /*
      * WordPress doesn't look in hidden fields to set the month filter dropdown or sorting parameters
      */
     if (isset($_REQUEST['m'])) {
         $url_args = '&m=' . $_REQUEST['m'];
     } else {
         $url_args = '';
     }
     if (isset($_REQUEST['post_mime_type'])) {
         $url_args .= '&post_mime_type=' . $_REQUEST['post_mime_type'];
     }
     if (isset($_REQUEST['order'])) {
         $url_args .= '&order=' . $_REQUEST['order'];
     }
     if (isset($_REQUEST['orderby'])) {
         $url_args .= '&orderby=' . $_REQUEST['orderby'];
     }
     /*
      * Add the current view arguments
      */
     if (isset($_REQUEST['detached'])) {
         $view_args = '<input type="hidden" name="detached" value="' . $_REQUEST['detached'] . "\" />\r\n";
     } elseif (isset($_REQUEST['status'])) {
         $view_args = '<input type="hidden" name="status" value="' . $_REQUEST['status'] . "\" />\r\n";
     } else {
         $view_args = '';
     }
     if (isset($_REQUEST['paged'])) {
         $view_args .= sprintf('<input type="hidden" name="paged" value="%1$s" />', $_REQUEST['paged']) . "\r\n";
     }
     $side_info_column = '';
     $taxonomies = get_object_taxonomies('attachment', 'objects');
     foreach ($taxonomies as $tax_name => $tax_object) {
         ob_start();
         if ($tax_object->hierarchical && $tax_object->show_ui) {
             $box = array('id' => $tax_name . 'div', 'title' => esc_html($tax_object->labels->name), 'callback' => 'categories_meta_box', 'args' => array('taxonomy' => $tax_name), 'inside_html' => '');
             post_categories_meta_box($post, $box);
         } elseif ($tax_object->show_ui) {
             $box = array('id' => 'tagsdiv-' . $tax_name, 'title' => esc_html($tax_object->labels->name), 'callback' => 'post_tags_meta_box', 'args' => array('taxonomy' => $tax_name), 'inside_html' => '');
             post_tags_meta_box($post, $box);
         }
         $box['inside_html'] = ob_get_contents();
         ob_end_clean();
         $side_info_column .= MLAData::mla_parse_template($postbox_template, $box);
     }
     $page_values = array('ID' => $post_data['ID'], 'post_mime_type' => $post_data['post_mime_type'], 'menu_order' => $post_data['menu_order'], 'post_date' => $post_data['post_date'], 'post_modified' => $post_data['post_modified'], 'post_parent' => $post_data['post_parent'], 'menu_order' => $post_data['menu_order'], 'attachment_icon' => wp_get_attachment_image($post_id, array(160, 120), true), 'file_name' => esc_html($post_data['mla_references']['file']), 'width' => $width, 'height' => $height, 'post_title_attr' => esc_attr($post_data['post_title']), 'post_name_attr' => esc_attr($post_data['post_name']), 'image_alt_attr' => '', 'post_excerpt_attr' => esc_attr($post_data['post_excerpt']), 'post_content' => esc_textarea($post_data['post_content']), 'image_meta' => esc_textarea($image_meta), 'parent_info' => esc_attr($parent_info), 'guid_attr' => esc_attr($post_data['guid']), 'authors' => $authors, 'features' => esc_textarea($features), 'inserts' => esc_textarea($inserts), 'galleries' => esc_textarea($galleries), 'mla_galleries' => esc_textarea($mla_galleries), 'mla_admin_action' => self::MLA_ADMIN_SINGLE_EDIT_UPDATE, 'form_url' => admin_url('upload.php') . '?page=' . self::ADMIN_PAGE_SLUG . $url_args, 'view_args' => $view_args, 'wpnonce' => wp_nonce_field(self::MLA_ADMIN_NONCE, '_wpnonce', true, false), 'side_info_column' => $side_info_column);
     if (!empty($post_data['mla_wp_attachment_image_alt'])) {
         $page_values['image_alt_attr'] = esc_attr($post_data['mla_wp_attachment_image_alt']);
     }
     return array('message' => '', 'body' => MLAData::mla_parse_template($page_template, $page_values));
 }