コード例 #1
0
ファイル: ajax.php プロジェクト: venturepact/blog
/**
 * Retrieves and generates the HTML for adding an image to an optin along
 * with editing buttons for editing or removing the image.
 *
 * @since 2.0.0
 *
 * @param int $optin_id The optin ID to target.
 * @param string $type  The type of theme to target.
 * @param string $theme The theme to target for the thumbnail size.
 * @return string       HTML markup for the image and editing buttons.
 */
function optin_monster_ajax_get_image_thumbnail($optin_id, $type, $theme)
{
    $html = '<div class="optin-monster-image-preview wp-core-ui">';
    $html .= optin_monster_ajax_get_optin_image($optin_id, 'optin-monster-' . $type . '-theme-' . $theme, $type, $theme);
    $html .= '<a href="#" class="button button-primary button-small om-button-modify" title="' . esc_attr__('Modify Image', 'optin-monster') . '" data-om-theme="' . $theme . '" data-om-type="' . $type . '">' . __('Modify', 'optin-monster') . '</a>';
    $html .= '<a href="#" class="button button-secondary button-small om-button-remove" title="' . esc_attr__('Remove Image', 'optin-monster') . '" data-om-theme="' . $theme . '" data-om-type="' . $type . '">' . __('Remove', 'optin-monster') . '</a>';
    $html .= '</div>';
    return $html;
}
コード例 #2
0
ファイル: theme.php プロジェクト: venturepact/blog
 /**
  * Gets the HTML output for the optin image.
  *
  * @since 2.0.0
  *
  * @param int $optin_id The optin ID.
  * @param string $size  The optin image size registered with WordPress.
  * @return string 		The image placeholder interface.
  */
 public function get_optin_image($optin_id, $size)
 {
     return optin_monster_ajax_get_optin_image($optin_id, $size, $this->type, $this->theme);
 }