Move into wp-content path
Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
92
wp-content/plugins/Pirate-Crew/includes/member-details.php
Normal file
92
wp-content/plugins/Pirate-Crew/includes/member-details.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<div class="member-details-section">
|
||||
<p>
|
||||
<label for="pirate-crew-designation"><?php _e( "Position", 'pirate-crew' ); ?></label>
|
||||
<input class="widefat" type="text" name="pirate-crew-designation" id="pirate-crew-designation" value="<?php echo esc_attr(get_post_meta($post->ID, 'pirate-crew-designation', true));?>"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="pirate-crew-short-desc"><?php _e( 'Short Description (in 140 characters or less)', 'pirate-crew' ); ?></label><br/>
|
||||
<textarea id="pirate-crew-short-desc" name="pirate-crew-short-desc" class="widefat" type="text" maxlength="140"><?php echo esc_attr(get_post_meta($post->ID, 'pirate-crew-short-desc', true));?></textarea>
|
||||
</p>
|
||||
</div>
|
||||
<h3><?php _e('Additional Information (for Email, Telephone, Fax, etc)','pirate-crew');?></h3>
|
||||
<div class="member-details-section">
|
||||
<table id="repeatable-fieldset-one" class="picrew-sorable-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="3%"></td>
|
||||
<td width="45%"><?php _e('Label','pirate-crew');?></td>
|
||||
<td width="42%"><?php _e('Content','pirate-crew');?></td>
|
||||
<td width="10%"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( $pirate_crew_contact ) :
|
||||
foreach ( $pirate_crew_contact as $field ) { ?>
|
||||
<tr>
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td><input type="text" placeholder="<?php _e('ex: Email','pirate-crew');?>" class="widefat" name="pirate-crew-label[]" value="<?php if(isset($field['label'])) echo esc_attr( $field['label'] ); ?>"/></td>
|
||||
<td><input type="text" placeholder="<?php _e('mail@example.com','pirate-crew');?>" class="widefat" name="pirate-crew-content[]" value="<?php if(isset($field['content'])) echo esc_attr( $field['content'] ); ?>"/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
<?php } else:?>
|
||||
<tr>
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td><input type="text" placeholder="<?php _e('ex: Email','pirate-crew');?>" class="widefat" name="pirate-crew-label[]" value=""/></td>
|
||||
<td><input type="text" placeholder="<?php _e('mail@example.com','pirate-crew');?>" class="widefat" name="pirate-crew-content[]" value=""/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr class="empty-row screen-reader-text">
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td><input type="text" class="widefat" placeholder="<?php _e('ex: Email','pirate-crew');?>" name="pirate-crew-label[]" /></td>
|
||||
<td><input type="text" class="widefat" placeholder="<?php _e('mail@example.com','pirate-crew');?>" name="pirate-crew-content[]" value=""/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a class="button picrew-add-row" href="#" data-table="repeatable-fieldset-one"><?php _e('Add row','pirate-crew');?></a></p>
|
||||
</div>
|
||||
<h3><?php _e('Links (Twitter, LinkedIn, etc)','pirate-crew');?></h3>
|
||||
<div class="member-details-section">
|
||||
<table id="repeatable-fieldset-two" class="picrew-sorable-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th><?php _e('Icon','pirate-crew');?></th>
|
||||
<th><?php _e('Link','pirate-crew');?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( $pirate_crew_social ) :
|
||||
foreach ( $pirate_crew_social as $field ) { ?>
|
||||
<tr>
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td>
|
||||
<?php $this->selectbuilder('pirate-crew-icon[]',$socialicons,$field['icon'],__('Select icon','pirate-crew'),'widefat picrew-icon-select');?>
|
||||
</td>
|
||||
<td><input type="text" placeholder="<?php _e('ex: http://www.twitter.com/piratenpartei','pirate-crew');?>" class="widefat" name="pirate-crew-link[]" value="<?php if(isset($field['link'])) echo esc_attr( $field['link'] ); ?>"/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
<?php } else: ?>
|
||||
<tr>
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td>
|
||||
<?php $this->selectbuilder('pirate-crew-icon[]',$socialicons,'',__('Select icon','pirate-crew'),'widefat picrew-icon-select');?>
|
||||
</td>
|
||||
<td><input type="text" placeholder="<?php _e('ex: http://www.twitter.com/piratenpartei','pirate-crew');?>" class="widefat" name="pirate-crew-link[]" value=""/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr class="empty-row screen-reader-text">
|
||||
<td><span class="dashicons dashicons-move"></span></td>
|
||||
<td>
|
||||
<?php $this->selectbuilder('pirate-crew-icon[]',$socialicons,'',__('Select icon','pirate-crew'),'widefat');?>
|
||||
</td>
|
||||
<td><input type="text" placeholder="<?php _e('ex: http://www.twitter.com/piratenpartei','pirate-crew');?>" class="widefat" name="pirate-crew-link[]" value=""/></td>
|
||||
<td><a class="button remove-row" href="#"><?php _e('Remove','pirate-crew');?></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a class="button picrew-add-row" href="#" data-table="repeatable-fieldset-two"><?php _e('Add row','pirate-crew');?></a></p>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="wrap">
|
||||
<div class="pirate-crew-customize">
|
||||
<div class="pirate-crew-customize-inner">
|
||||
<div class="pirate-crew-customize-member">
|
||||
<div class="picrew-heading-group">
|
||||
<p><?php _e('Select a member from the list to add as author to the post', 'pirate-crew');?></p>
|
||||
</div>
|
||||
<div class="picrew-select-members">
|
||||
<?php
|
||||
if($members->have_posts()): ?>
|
||||
<select name="pirate_crew_member_id" id="picrew-members">
|
||||
<?php
|
||||
echo '<option value="" data-img="'.$defaultimage.'">'.__('Select a member','pirate-crew').'</option>';
|
||||
while($members->have_posts()): $members->the_post();
|
||||
$disabled ="";
|
||||
if($members->post->ID ==$preauthor ) $disabled ='selected = "selected"';
|
||||
|
||||
$thumb = $this->pirate_team_get_thumbnail($members->post->ID,'thumbnail');
|
||||
echo '<option value="'.$members->post->ID.'" data-img="'.$thumb.'" '.$disabled.'>'.get_the_title().'</option>';
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</select>
|
||||
<?php else:
|
||||
$addmember = admin_url('post-new.php?post_type=pirate_crew_member');
|
||||
echo '<p>';
|
||||
_e('You haven\'t added any crew members yet.','pirate-crew');
|
||||
echo '<a href="'.$addmember.'">'.__("Add a crew member",'pirate-crew').'</a>';
|
||||
echo '</p>';
|
||||
endif;?>
|
||||
</div><!-- .picrew-select-members -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
125
wp-content/plugins/Pirate-Crew/includes/team-details.php
Normal file
125
wp-content/plugins/Pirate-Crew/includes/team-details.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<div class="wrap">
|
||||
<div class="pirate-crew-customize">
|
||||
<div class="pirate-crew-customize-inner">
|
||||
<div class="pirate-crew-customize-member">
|
||||
<div class="picrew-heading-group">
|
||||
<h2 class="sub-h"><?php _e('Members', 'pirate-crew');?></h2>
|
||||
<span><?php _e('Select members from the dropdown, drag and drop them to reorder.', 'pirate-crew');?></span>
|
||||
</div>
|
||||
<div class="picrew-select-members">
|
||||
<?php
|
||||
if($members->have_posts()): ?>
|
||||
<select name="members" id="picrew-members">
|
||||
<?php
|
||||
echo '<option value="" data-img="'.$defaultimage.'">'.__('Select a member','pirate-crew').'</option>';
|
||||
while($members->have_posts()): $members->the_post();
|
||||
$disabled ="";
|
||||
if(in_array($members->post->ID, $options['memberlist']) ) $disabled ="disabled";
|
||||
echo '<option value="'.$members->post->ID.'" data-img="'.$this->pirate_team_get_thumbnail($members->post->ID,'thumbnail').'" '.$disabled.'>'.get_the_title().'</option>';
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</select>
|
||||
<?php else:
|
||||
$addmember = admin_url('post-new.php?post_type=pirate_crew_member');
|
||||
echo '<p>';
|
||||
_e('You haven\'t added any crew members yet.','pirate-crew');
|
||||
echo '<a href="'.$addmember.'">'.__("Add a crew member",'pirate-crew').'</a>';
|
||||
echo '</p>';
|
||||
endif;?>
|
||||
</div><!-- .picrew-select-members -->
|
||||
<ul class="picrew-members-list-selected">
|
||||
<div class="picrew-members-info"><?php echo __('No Members Selected' ,'pirate-crew'); ?></div>
|
||||
<script type="text/html" id="tmpl-picrew-member-list">
|
||||
<li data-member-id="{{{data.id}}}" class="">
|
||||
<img width="31" height="31" src="{{{data.src}}}"/>
|
||||
<p>{{{data.title}}}</p><span class="remove-member-to-list" data-member="{{{data.id}}}"><i class="picrew-icon-close"></i></span>
|
||||
<input type="hidden" name="memberlist[]" value='{{{data.id}}}'>
|
||||
</li>
|
||||
</script>
|
||||
<?php
|
||||
if($options['memberlist']):
|
||||
$teamargs = array(
|
||||
'orderby' => 'post__in',
|
||||
'post_type' => 'pirate_crew_member',
|
||||
'post__in' => $options['memberlist'],
|
||||
);
|
||||
$team = new WP_Query($teamargs);
|
||||
if($team->have_posts()):
|
||||
while($team->have_posts()): $team->the_post();?>
|
||||
<li data-member-id="<?php echo $team->post->ID;?>" class="">
|
||||
<img width="31" height="31" src="<?php echo $this->pirate_team_get_thumbnail($team->post->ID,'thumbnail');?>"/>
|
||||
<p><?php the_title();?></p><span class="remove-member-to-list" data-member="<?php echo $team->post->ID; ?>"><i class="picrew-icon-close"></i></span>
|
||||
<input type="hidden" name="memberlist[]" value="<?php echo $team->post->ID;?>">
|
||||
</li>
|
||||
<?php endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
</ul><!-- .picrew-members-list-selected -->
|
||||
</div><!-- .pirate-crew-customize-member -->
|
||||
<div class="pirate-crew-customize-style">
|
||||
<div class="picrew-heading-group">
|
||||
<h2 class="sub-h"><?php echo __('Presets', 'pirate-crew');?></h2>
|
||||
<span><?php echo __('Choose a preset from below.', 'pirate-crew');?></span>
|
||||
</div>
|
||||
<div class="picrew-preset-list picrew-clearfix">
|
||||
<?php
|
||||
$styles = array(
|
||||
'Cards' => array(4, 1),
|
||||
'List' => array(2, 0),
|
||||
'Table' => array(3, 0),
|
||||
);
|
||||
foreach ($styles as $key => $set):
|
||||
$val = strtolower($key);?>
|
||||
<input class="picrew-radio-hidden" id="rad-<?php echo $val;?>" type="radio" data-style="<?php echo $set[0];?>" data-column="<?php echo $set[1];?>" name="team-style" value="<?php echo $val;?>" <?php checked($val,$options['team-style']);?>>
|
||||
<label for="rad-<?php echo $val;?>"><img src="<?php echo $this->settings['plugin_url'] . '/images/' . $val . '.jpg';?>">
|
||||
<span data-type="<?php echo $val;?>"><?php echo $key;?></span>
|
||||
</label>
|
||||
<?php endforeach;?>
|
||||
</div><!-- .picrew-preset-list -->
|
||||
<div class="picrew-section picrew-clearfix">
|
||||
<div class="picrew-heading-group">
|
||||
<h2 class="sub-h"><?php echo __('Style', 'pirate-crew');?></h2>
|
||||
</div><!-- .picrew-heading-group -->
|
||||
<div class="picrew-row">
|
||||
<div class="picrew-col-2">
|
||||
<?php
|
||||
$preset = array(
|
||||
'style-1' => sprintf(__('Style %d', 'pirate-crew'), 1),
|
||||
'style-2' => sprintf(__('Style %d', 'pirate-crew'), 2),
|
||||
'style-3' => sprintf(__('Style %d', 'pirate-crew'), 3),
|
||||
'style-4' => sprintf(__('Style %d', 'pirate-crew'), 4));
|
||||
$this->selectbuilder('preset', $preset, $options['preset'], '', "picrew-select-default dyn-sel picrew-styles",'key');
|
||||
?>
|
||||
</div><!-- .picrew-col-2 -->
|
||||
<div class="picrew-col-2 picrew-columns-wrap">
|
||||
<?php
|
||||
$columns = array(
|
||||
'2' => sprintf(__('%d Columns', 'pirate-crew'), 2),
|
||||
'3' => sprintf(__('%d Columns', 'pirate-crew'), 3),
|
||||
'4' => sprintf(__('%d Columns', 'pirate-crew'), 4),
|
||||
'5' => sprintf(__('%d Columns', 'pirate-crew'), 5));
|
||||
$this->selectbuilder('columns', $columns, $options['columns'], '', "picrew-select-default dyn-sel picrew-columns",'key');
|
||||
?>
|
||||
</div><!-- .picrew-col-2 -->
|
||||
</div><!-- .picrew-row -->
|
||||
</div><!-- .picrew-row -->
|
||||
|
||||
</div><!-- .pirate-crew-customize-style -->
|
||||
<div class="picrew-clearfix"></div>
|
||||
</div><!-- .pirate-crew-customize-inner -->
|
||||
</div><!-- .pirate-crew-customize -->
|
||||
</div><!-- wrap -->
|
||||
<script type="text/html" id="tmpl-picrew-member-select">
|
||||
<div class="select2-result-repository clearfix">
|
||||
<# if ( data.src ) { #>
|
||||
<img class="select2-result-repository__avatar" width="31" height="31" src="{{{data.src}}}" />
|
||||
<# } #>
|
||||
<p class="select2-result-repository__title">{{{data.title}}}</p>
|
||||
<# if ( data.disabled ) { #>
|
||||
<span class="select2-result-repository__disabled"><?php _e('Added','pirate-crew');?></span>
|
||||
<# } #>
|
||||
</div>
|
||||
</script>
|
||||
Reference in New Issue
Block a user