Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap images for dashicons #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions meta-box-class/my-meta-box-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,23 +413,17 @@ public function show_field_repeater( $field, $meta ) {
}
echo '</table>';
if ($field['sortable'])
echo '<span class="re-control"><img src="'.$plugin_path.'/images/move.png" alt="sort" title="sort" class="at_re_sort_handle" /></span>';
echo '<span class="re-control dashicons dashicons-randomize at_re_sort_handle"></span>';

echo'
<span class="re-control at-re-toggle"><img src="'.$plugin_path.'/images/edit.png" alt="Edit" title="Edit"/></span>
<span class="re-control"><img src="'.$plugin_path.'/images/remove.png" alt="'.__('Remove','mmb').'" title="'.__('Remove','mmb').'" id="remove-'.$field['id'].'"></span>
<span class="re-control at-re-toggle dashicons dashicons-welcome-write-blog"></span>
<span class="re-control dashicons dashicons-no" id="remove-'.$field['id'].'"></span>
<span class="re-control-clear"></span></div>';
$c = $c + 1;
}
}

echo '<img src="';
if ($this->_Local_images){
echo $plugin_path.'/images/add.png';
}else{
echo 'http://i.imgur.com/w5Tuc.png';
}
echo '" alt="'.__('Add','mmb').'" title="'.__('Add','mmb').'" id="add-'.$field['id'].'"><br/></div>';
echo '<div class="dashicons dashicons-plus" id="add-'.$field['id'].'"></div></div>';

//create all fields once more for js function and catch with object buffer
ob_start();
Expand All @@ -456,7 +450,7 @@ public function show_field_repeater( $field, $meta ) {
if ($field['inline']){
echo '</tr>';
}
echo '</table><img src="'.$plugin_path.'/images/remove.png" alt="'.__('Remove','mmb').'" title="'.__('Remove','mmb').'" id="remove-'.$field['id'].'"></div>';
echo '</table><div class="dashicons dashicons-no" id="remove-'.$field['id'].'"></div></div>';
$counter = 'countadd_'.$field['id'];
$js_code = ob_get_clean ();
$js_code = str_replace("\n","",$js_code);
Expand Down Expand Up @@ -1873,4 +1867,4 @@ public function load_textdomain(){
load_textdomain( 'mmb', dirname(__FILE__) . '/lang/' . get_locale() .'.mo' );
}
} // End Class
endif; // End Check Class Exists
endif; // End Check Class Exists