Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //wp-admin/custom-background.php Alterations (starting at line 139)
- /* ADDED BY SHARON MURPHY 03/30/2012 */
- // if ( isset($_POST['background-position-x']) ) {
- // check_admin_referer('custom-background');
- // if ( in_array($_POST['background-position-x'], array('center', 'right', 'left')) )
- // $position = $_POST['background-position-x'];
- // else
- // $position = 'left';
- // set_theme_mod('background_position_x', $position);
- // }
- if ( isset($_POST['background-position-x']) ) {
- check_admin_referer('custom-background');
- if ( in_array($_POST['background-position-x'], array('center', 'right', 'left')) )
- $xPosition = $_POST['background-position-x'];
- else
- $xPosition = 'left';
- set_theme_mod('background_position_x', $xPosition);
- }
- if ( isset($_POST['background-position-y']) ) {
- check_admin_referer('custom-background');
- if ( in_array($_POST['background-position-y'], array('top', 'center', 'bottom')) )
- $yPosition = $_POST['background-position-y'];
- else
- $yPosition = 'top';
- set_theme_mod('background_position_y', $yPosition);
- }
- /* END ADDON BY SHARON MURPHY 03/30/2012 */
- //wp-admin/custom-background.php Alterations (starting at line 223)
- // BEGIN EDIT BY SHARON MURPHY 03/30/2012
- // . ' background-position: top ' . get_theme_mod('background_position_x', 'left');
- . ' background-position: ' . get_theme_mod('background_position_y', 'top') . ' ' . get_theme_mod('background_position_x', 'left');
- // END EDIT BY SHARON MURPHY 03/30/2012
- //wp-admin/custom-background.php Alterations (starting at line 283)
- <!-- BEGIN EDITS BY SHARON MURPHY 03/30/2012 -->
- <!-- <tr valign="top">
- <th scope="row"><?php //_e( 'Position' ); ?></th>
- <td><fieldset><legend class="screen-reader-text"><span><?php //_e( 'Background Position' ); ?></span></legend>
- <label>
- <input name="background-position-x" type="radio" value="left"<?php //checked('left', get_theme_mod('background_position_x', 'left')); ?> />
- <?php //_e('Left') ?>
- </label>
- <label>
- <input name="background-position-x" type="radio" value="center"<?php //checked('center', get_theme_mod('background_position_x', 'left')); ?> />
- <?php //_e('Center') ?>
- </label>
- <label>
- <input name="background-position-x" type="radio" value="right"<?php //checked('right', get_theme_mod('background_position_x', 'left')); ?> />
- <?php //_e('Right') ?>
- </label>
- </fieldset></td>
- </tr> -->
- <tr valign="top">
- <th scope="row"><?php _e( 'Horizontal Position' ); ?></th>
- <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend>
- <label>
- <input name="background-position-x" type="radio" value="left"<?php checked('left', get_theme_mod('background_position_x', 'left')); ?> />
- <?php _e('Left') ?>
- </label>
- <label>
- <input name="background-position-x" type="radio" value="center"<?php checked('center', get_theme_mod('background_position_x', 'left')); ?> />
- <?php _e('Center') ?>
- </label>
- <label>
- <input name="background-position-x" type="radio" value="right"<?php checked('right', get_theme_mod('background_position_x', 'left')); ?> />
- <?php _e('Right') ?>
- </label>
- </fieldset></td>
- </tr>
- <tr valign="top">
- <th scope="row"><?php _e( 'Vertical Position' ); ?></th>
- <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend>
- <label>
- <input name="background-position-y" type="radio" value="top"<?php checked('top', get_theme_mod('background_position_y', 'top')); ?> />
- <?php _e('Top') ?>
- </label>
- <label>
- <input name="background-position-y" type="radio" value="center"<?php checked('center', get_theme_mod('background_position_y', 'top')); ?> />
- <?php _e('Center') ?>
- </label>
- <label>
- <input name="background-position-y" type="radio" value="bottom"<?php checked('bottom', get_theme_mod('background_position_y', 'top')); ?> />
- <?php _e('Bottom') ?>
- </label>
- </fieldset></td>
- </tr>
- <!-- END EDITS BY SHARON MURPHY 03/30/2012 -->
Advertisement
Add Comment
Please, Sign In to add comment