<?xml version="1.0"?> | |
<ruleset name="WPSE 286375 Plugin"> | |
<rule ref="WordPress-Core" /> | |
<rule ref="WordPress.WP.I18n"> | |
<properties> | |
<property name="text_domain" value="wpse-286375,default" /> | |
</properties> | |
</rule> | |
<rule ref="WordPress-Docs" /> |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; | |
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; | |
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; | |
$wp_customize->get_control( 'background_color' )->section = 'background_image'; | |
$wp_customize->get_section( 'background_image' )->title = 'Background Settings'; | |
$wp_customize->get_section( 'title_tagline' )->title = 'Site Title / Logo'; | |
$wp_customize->get_section( 'static_front_page' )->title = 'Home Page Settings'; | |
$wp_customize->get_section( 'static_front_page' )->priority = 29; |
<?php | |
$file = '/path/to/file.png'; | |
$filename = basename($file); | |
$upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
if (!$upload_file['error']) { | |
$wp_filetype = wp_check_filetype($filename, null ); | |
$attachment = array( | |
'post_mime_type' => $wp_filetype['type'], | |
'post_parent' => $parent_post_id, |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.