|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////; a1 n( [: c$ _" Y# h
// Theme Option) ?' J6 I( P6 i) B) h) u. p
////////////////////////////////////////////////////////////////////////////////
$ l& ^7 k& U7 M ~7 X5 L- C1 i) _6 R2 i! G% o2 a- U
$themename = "Zenx";# L! l+ ^4 |/ w( s& f) i2 R( }5 M& F7 g
$shortname = str_replace(' ', '_', strtolower($themename));1 R4 X D# t: H/ R+ y
. A7 ~! s" v; T: a2 _$ pfunction get_theme_option($option)4 y; \# K3 R! Q
{
8 j2 ]0 h9 M3 W3 v global $shortname;( r5 j. W* D2 u: o
return stripslashes(get_option($shortname . '_' . $option));
$ n) Q0 [$ D9 {, Y; j( K b}2 M3 H6 f' ?4 o) t7 I: _. O- s! g
/ P6 f) x) p2 I# ^. u
function get_theme_settings($option)
: \& V6 X4 k3 w5 z$ o- o2 F6 N) m1 h{
2 d2 k( C9 \ ~$ G+ \+ M9 N return stripslashes(get_option($option));7 }6 p5 L: F" ]) Q4 ?
}
0 @3 U+ _# `4 K& O- m% W" m$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
: K M3 r9 u2 F5 K5 k$wp_getcat = array();
( x1 l7 x+ b/ H# Y* U6 Zforeach ($wp_dropdown_rd_admin as $category_list) {8 Y' Y& M9 z0 h1 H
$wp_getcat[$category_list->term_id] = $category_list->name;
% [7 j' T, u l6 S! g& Y; j7 C}' W( ^0 _$ C p) E
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
1 o; Y5 E+ i% C: h {$ K2 P( v8 ]$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");# x! ~1 U9 x- @- _/ ~" c2 a
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
8 I2 l" g7 |1 G% G; D- i$ L* D* e7 \& ^
$options = array (# }0 b9 T9 h& x6 H [" v( O( X+ ~1 T
7 J, A" m, x0 G m8 Y4 ~9 ]$ K+ I6 ]: _4 I
array( "name" => "Blog Header Settings",; m) x% H+ H% j3 ^
"type" => "heading",1 \8 C% h% f, n0 ~# u% Y5 S
),( V; N( k3 P1 v# P* I
, H" ^8 T; |8 b- n7 e4 c' _$ {" u+ q
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 i1 D& e! ~1 o3 U0 C/ Q: X "id" => $shortname."_header_logo_activate",
7 _! E2 b$ ^* U6 F "type" => "select",
/ R" s9 ~' G; u% E "std" => "No",
$ ~ r/ ?6 `7 E5 O0 i, { "options" => array("No", "Yes")),1 ^: f) L- \; \* b7 ^7 Z! g
6 _# q8 y s' T! g9 u6 g( p. N
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
+ j- X/ S: M4 o1 D" ?& P0 F0 P "id" => $shortname."_logo_url",
' |6 Y4 c2 d0 K4 n7 F "type" => "text",5 L# u) [, `* K( e
"box" => "social",
% W" R# I9 {: \0 }, F "std" => "",
. L8 r! `, o- v/ \4 { ),
7 t, w* _7 Z3 n4 b: l ( n* F6 ]7 i# J$ T4 u
array( "name" => "Insert Header Banner HTML Code (Header)" h4 Y3 o+ ^3 w$ Z9 E: W# A
<br /><em>*Recommended Size 468 x 60</em>6 ~/ v, S8 _; t( e7 E3 n
<br /><em>*leave blank if not use</em>",
4 C7 z3 ?# S1 |/ k "id" => $shortname."_header_banner",
% ^* K8 \+ T5 D/ [ "type" => "textarea",- G8 _! h H% v) n6 e, w/ b: w0 ]; Y
"std" => "",
# S: N0 g) T+ P p1 t ),+ c w- A- P% q7 K7 X- A
6 K% f a: P1 G0 \' p array( "name" => "</div></div>",
- c# Y6 M+ m+ D: F! z& t+ E "type" => "close",
- S) F h3 U( J- K% o" I4 P9 @/ f ),
& D' Z' R, d+ O2 C" ^3 @$ g2 G- z+ N) |( f
! f/ S2 n# \7 R' r! F
array( "name" => "Header Navigation Settings",5 x( j; {+ j4 i7 p
"type" => "heading",5 |' ^! t& b, d+ t. I6 n
),2 T& W: X( L: `
' U) m8 L4 X) ~7 x7 m, |) n
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
! F' S# j2 f" O4 k( X" ?4 F <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
+ ]* {1 r2 l V) s) T, F/ R <em>*Enter the page post ID number only</em><br />
. Y* M+ m) r/ g" \ <em>*separate by comma</em><br />
4 S! M! v4 p' u" C <em>*Exclude pages which you don't want to show on the header navigation</em>",
: T: t+ R; M4 _9 m "id" => $shortname."_header_page_navigation",
: ~0 h8 x5 ?5 U5 f! u( I "type" => "text",' s, O9 N+ e+ d$ `
"std" => "",
- l! p9 K) a& h% ~; t y ),0 P6 Q0 d% M* e% L4 F3 `$ M2 ?
/ d3 N5 x4 F) s- c- g2 P
array( "name" => "</div></div>",; f/ f$ Z6 e# _8 m/ B' G. c! ^# e0 l3 e
"type" => "close",& m' ^5 @$ [) S8 c8 U; m
),
9 u% ^- O7 T! s; Z0 ]
6 k0 m* R) v7 _/ J8 S
4 s- ^& W- a% w; ] array( "name" => "Post Auto Thumbnails Settings",
/ i5 t8 f" e) j; U9 z "type" => "heading",1 C0 S. C7 R7 V. \4 C
),
$ v0 o# K% i$ V) @8 i 6 f: Y5 Y+ Z' U! F" e- _& O8 M7 L' ^
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
9 n/ M0 P' f% g' Q% m. W3 } "id" => $shortname."_timthumb_activate",
0 j( `- B0 P! q- A "type" => "select",# ^6 w% q9 \8 M8 f7 I; a( @
"std" => "No",
$ q$ h8 b) ]$ ~4 A4 n "options" => array("No", "Yes")),! P! S9 a& G9 O9 d
5 `0 f' |- {8 R
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
" v: K' m) {; u( A9 `$ j "id" => $shortname."_timthumb_cropping",7 w1 e7 h4 z7 q% T$ H0 y& E, C
"type" => "select",
2 O) a- C# @7 J6 i4 K* Z "std" => "",) M& |9 w! I; v# M* k, M
"options" => $crop_position),$ }0 i7 ?3 D: `' a* O( t
[$ k5 a5 o; c' v0 T0 }
array( "name" => "Insert Width Of Thumbnail Image<br />0 |- q; R$ ^( V* W8 A
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
! Y: u9 _' A9 \0 U <em>*Leave Blank To Use Default: 250</em><br />",& y& I$ k! |! v& u
"id" => $shortname."_thumb_width",
/ _' V9 m7 |, i0 S* b "type" => "text",1 J9 b, X2 O; {# w- W
"std" => "",
. V2 M4 l' D4 V ),
9 H3 L" l/ S2 ?6 r+ f5 V& k
$ ^- b: i7 d) Y+ ^0 @ array( "name" => "Insert Height Of Thumbnail Image<br />3 \7 Q! X {; R: o, M
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />- T! X) I- b @- q% S
<em>*Leave Blank To Use Default: 200</em><br />",) O$ ~0 J" @2 C
"id" => $shortname."_thumb_height",3 }8 P3 l) U& c1 f
"type" => "text",) g) k( m T5 n7 q; o3 Q
"std" => ""," N1 u' w7 W, f; L* y; z% h# r# i8 i
),
, W( }# b" e7 w% z* l
# N2 k6 e# v) K array( "name" => "</div></div>",# b# @1 B! B1 q8 o0 \& R
"type" => "close",
0 v# z& z5 x7 A0 U; b3 x J1 Y ),- d& A4 p% C1 y1 A; ]
' Q; T8 [# @. m( R array( "name" => "Featured Content Slider Settings",( K2 F. X) t! M8 B& Y/ i# j2 j
"type" => "heading",
& A5 ?0 f2 x) O9 p; q ),
! h) N% O4 W7 n& |" @. V, ~8 {) y D, v& F9 H+ g
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",% f& o1 z, ?8 p' J
"id" => $shortname."_featured_activate",
9 p2 _ H. r3 j, F7 V% P "type" => "select",
' g: b ~, t, |5 w. Y& B' i "std" => "No",* Y2 l3 ~+ c" S
"options" => array("No", "Yes")),
: N0 t0 j& B9 O4 [" j+ ~1 f+ ^* d; |/ p2 R
9 T" x. c8 @- ^6 i- B4 M array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",2 j2 N2 q* J: A ^$ w2 H1 ~
"id" => $shortname."_featured_category",+ k& A( N6 c( V9 ?* E2 I) J
"type" => "select",
- V' x6 G$ B6 L8 |; K3 t "std" => "Choose a category:",( f8 i, j3 B- C+ E2 N
"options" => $wp_getcat),
6 w! v* y7 K, I4 S1 q6 ^7 O8 a
0 k0 s9 y$ i& w* G1 W( C array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",' o6 w0 M6 W# a0 u" l' H
"id" => $shortname."_featured_number",
) l! u! Z- Y! R& [ "type" => "select",
# } x5 U% k4 L6 r "std" => "Number of post:",8 h6 h7 v& O7 K% |/ z3 N' V1 v0 W
"options" => $number_entries),. ?" ^) G! b( Y0 n+ ]7 r
9 K4 ]5 N& V* @6 n9 G" U3 U array( "name" => "</div></div>",& s; C4 Y, B( T% d( [
"type" => "close",) o: F$ w' @4 G9 E
),
5 b$ w. j3 V3 N% m7 E: ^
, x6 D3 ~" p" q array( "name" => "Featured Category Settings",
2 c/ w& c4 J% c& l8 c3 _2 [% v "type" => "heading",0 L2 [* N" ^9 X# U
),
" K. \( h$ \* K+ A: c- v% d
( \& t2 m2 g2 S5 t* d; j+ Q3 G ^ array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 ]! S/ e4 v/ Q% {
"id" => $shortname."_featured_category_activate",
% W& |* U5 e0 V6 }" j9 X "type" => "select",
5 w. y( s4 v2 u3 ]8 M* G "std" => "No",
3 S. P0 W1 F6 G8 T "options" => array("No", "Yes")),
+ F" _, H: B0 h0 p3 I* Q
5 u. ~, i$ L: o' S4 D array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
3 c9 }; W! {' W1 Y& Y "id" => $shortname."_featured_category_id1",
: X2 G: x+ h+ w, W1 m, D( r+ x# R- t "type" => "select",0 G9 E3 k6 k. {& g0 Z7 C
"std" => "Choose a category:",
; ]* L* O! [* x; p "options" => $wp_getcat),
; K3 [: X4 q# J
; b! }6 `0 @1 Z array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",/ l2 g' ]! ?" ~+ \- e: `
"id" => $shortname."_featured_number1",
U2 P" I- [7 S( i& f "type" => "select",2 w: {' [- E5 E! I# A
"std" => "Number of post:",
$ w) c+ T5 G1 v( l) l! Q; B! t "options" => $number_entries),
/ n9 W/ L' a* d! E4 X
) {9 W; W" V# K. B- S' y array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",6 |' W1 }# Z; P
"id" => $shortname."_featured_category_id2",6 r# {; X3 u( F& L- k h6 f
"type" => "select",
9 t! ^) t& |6 ?/ s8 `. b7 C0 M "std" => "Choose a category:",# b$ _5 f% L8 `0 ?2 y) m4 `8 F
"options" => $wp_getcat), _" B# J6 m- ^
2 Q5 r) N0 K, e7 f/ u* \
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",* f' g" A$ Q2 s* R% \4 e( ?/ Y4 e5 @% L, F
"id" => $shortname."_featured_number2",
, V3 [# O8 u: `9 n "type" => "select",
, ^( ~7 M% s5 @. y% ^! s "std" => "Number of post:",
: R( g' _7 w7 S5 x6 m/ f( K9 ]+ q "options" => $number_entries),1 Q ]/ W( _! g1 y- I
- ]1 \% g) s) W/ P
7 J5 v) c* s1 ?. w# Y2 M* X( |$ J array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
! C0 R8 g& }2 e! B "id" => $shortname."_featured_category_id3",
) H! E2 i2 t8 V9 V9 Q+ q "type" => "select",$ q t7 R1 `5 ~* J
"std" => "Choose a category:",
% _: n) i. J3 ?! P; Z& } "options" => $wp_getcat),8 ~3 S6 Z: |* w( X6 N
0 b2 z9 y% X+ u( | array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
) v. n* A# T2 x' E, l "id" => $shortname."_featured_number3",1 F. m0 @& s" ~& |, }
"type" => "select",/ I1 S, e" h, ?; G* s3 Q
"std" => "Number of post:",
; a5 j6 g! G4 q+ [* M "options" => $number_entries),6 G7 o: c* M; m2 i' L, K) `5 U6 U# n
{4 R7 A, l7 S. n( d8 I K8 i* V, A$ X: p, P Z& M
array( "name" => "</div></div>",! | a# C5 U& C+ B/ V% {$ M
"type" => "close",' z* H( N- r$ S9 Y
),# [3 r- |4 T5 \: s! a
5 o/ I3 T; S& a6 m- c3 P
( p" M2 {8 h- G8 o& }- W
array( "name" => "Google Adsense & Analytics Settings",
$ R5 v& ^, E" m+ L0 Y' p& u0 W "type" => "heading",* v9 ]% R2 ^- Q
),. K2 `8 G5 R6 _' T* V, e
$ p: \2 ~8 F" g; p$ H/ {: |1 {3 F
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",! C; d9 i6 n0 Q0 Q! x' N
"id" => $shortname."_adsense_loop_activate",
8 g% K. D- [ q5 N6 ? "type" => "select",) Q! {0 i6 y8 c/ g2 W
"std" => "Disable",! t. s' {* E% d* H
"options" => array("Disable", "Enable")),' k- l% f+ d2 v" T6 }: q3 L1 I
" K0 D3 q0 @5 h% _
array( "name" => "Insert Google Adsense Code For Loops Here<br />
4 c8 }/ N' g! b% d1 O/ Z& m" L/ l <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",, n1 X/ L: O4 Q' O9 ^# J
"id" => $shortname."_adsense_loop",# I5 v/ t3 W2 Z8 Q% e
"type" => "textarea",
4 u. l: T% s5 d3 D- W "std" => "",. {* }( @3 u0 @, J* [
),
7 e9 m1 ?: L% o( \6 g% ]& w* w! F( W; w2 p
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>"," q# K& i: k' B7 j/ F: L. p' W5 r
"id" => $shortname."_adsense_single_activate",
' [; ~+ ~9 Q/ `; S- f* K" ?$ u( y "type" => "select",0 P& ?5 M$ Z" M' X
"std" => "Disable",
# R0 S6 O! [' }) F9 \& x# u "options" => array("Disable", "Enable")),! z. S$ _" Y$ B6 T# x" ]
) ^) b( `* U) R" m/ N2 F array( "name" => "Insert Google Adsense Code For Single Page Here<br />* `3 k4 I4 n0 U0 s! ` y2 S- K" Y9 _
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
9 b% l+ b' P# r" K7 } "id" => $shortname."_adsense_single",
: g; B5 w0 L8 i4 C* s, W' \$ b. Y2 r "type" => "textarea",
5 W5 j1 }! I: g; c& a0 P "std" => "",
. n! ~: k! C: C0 e ),# [4 ^+ K* P/ F' I' {
% l# v2 Z3 p( z
! v3 z$ ^+ l5 o: k) s/ P array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
: t1 l7 b7 [: v, } "id" => $shortname."_google_analytics",8 ?2 R2 v) v) Z5 S( j5 g
"type" => "textarea",
, r( }# B4 A3 {) s. u; ]) H6 y "std" => "",) ^. [/ @/ M2 T4 j9 K
),+ [- v( D: N$ d: v7 C' O1 {" x
9 L5 A$ N1 j, d" s% ^# p; m! ` array( "name" => "</div></div>",4 O" ~. r8 V8 j! y2 f1 K
"type" => "close",7 _5 h i6 z, U. v; O
),
( a& r% O( `, }0 s# x9 C
2 F. R7 a6 |" z 5 }# | L: r/ v1 D/ K# N4 Q
array( "name" => "AddThis Social Bookmarking Settings",4 p( L, ` ]4 a' c9 Z9 v
"type" => "heading",& K y3 P6 B, R I; P7 k8 X
),
4 I! s" s8 J! q6 f. Q3 J! O6 v- `
, e( C2 _. u# K" x array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>* c- J A: m9 \ i+ Z
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
( } x" V# k: W) s2 r( Y# r3 Z; f "id" => $shortname."_addthis",4 P Q. B% }' u$ p9 m
"type" => "text",
& c4 W) q6 r/ h0 d w/ Y "box" => "social",0 B+ M) Q. `3 E+ c. s, a
"std" => "",& I2 j. G1 l9 x1 L/ D9 L
),+ w G, {+ v% G6 s
1 a& V; g" m- ?* h2 ~$ H( \
array( "name" => "</div></div>",* [$ a6 b+ l) J! `/ R) Y1 q
"type" => "close",6 Q9 R. v' [1 z; b) f6 ~2 X
),
3 u" r& @) f+ H2 |" K7 b
$ }4 W. P& [; ] s* a% P# n* \
3 B9 t u# R' ^7 B! J$ J7 Z( P ; ^" H5 X, G, U |5 }5 e! z
array( "name" => "YouTube Video Settings",0 L4 C( n1 ^: O2 X2 S4 z+ O
"type" => "heading",. O; ^) a/ }, ~1 I9 a
),% [$ b. A( q7 j
* ^! i$ @, v& t$ s- o% T array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
- A' n( u8 F( a6 M+ I& H& Q: B "id" => $shortname."_emvideo_activate",
- l1 [$ w% r% b4 ?( a$ s0 S* } "type" => "select",
- P, h, |, A5 G x4 y "std" => "No",9 S4 ]! u& @! P# v9 s$ v
"options" => array("No", "Yes")),
. }* f; ?9 ~, E6 o( ^" V! [9 w: x8 K; i6 o ?# U) j
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",9 [; |9 c$ d4 I2 x0 }
"id" => $shortname."_emvideo",5 x- T- X- ?( |# T! G+ P' k* P0 @/ ^
"std" => "",
# Z% ]' ?, p2 H( C$ u1 t7 ?# ] "type" => "text"),
, J1 P& i+ Q& \0 p! `: |, h8 i% l
$ l Q$ z9 k. K9 M7 w7 S, a8 U; b array( "name" => "</div></div>",9 D1 t: Y/ Y3 T0 x
"type" => "close",0 |5 n2 k* Q5 ~% K. v, K' U
),
4 \- P* Y1 ]( J( O4 \
' @; a& R" S2 e/ z$ \6 {0 M1 {1 O array( "name" => "Twitter Settings",; r3 Q' }" {7 C, |- _( [
"type" => "heading",- L; m7 P9 Y. O( M5 z' b/ v) a
),
' ^6 |+ u( D7 H0 C
$ ?5 q A6 b0 w' r, O& a S1 M array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",& F! i5 C. E. ]% ?3 E
"id" => $shortname."_twitter_activate",; b' y5 g0 k U& Y/ s" y3 J! @
"type" => "select",& M5 t" A& B+ ], _
"std" => "No",2 X! L9 P! y3 _
"options" => array("No", "Yes")),
; D0 a) ^9 [8 X7 D1 J- A
0 ~- h; m' |* b, K& N2 o array( "name" => "Insert Your Twitter ID here
7 s8 e# S& H9 j/ ~' D/ j <br /><em>*leave blank if not necessary</em>7 ?7 O. S% K7 [' u# Y0 [ u* `
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",5 R# m2 C1 u- w4 i1 v& A( o6 F
"id" => $shortname."_twitter",
! C$ A& c% ~# m" e "type" => "text",3 U0 D, Y; z8 X: s. c* A
"box" => "social",
2 }$ h' m# {- X/ F+ B+ S5 M "std" => "",
5 c" a9 F5 B1 @: h/ _/ n# I: ` ),2 K c" r" `- u% G8 _* C/ b6 ?
& D" ~5 Z, t& f* N$ O array( "name" => "Enter Twitter Feed Count here7 I6 Q9 X- u" R% j9 W* C0 `# P( U
<br /><em>*leave blank if not necessary</em> W" c1 V4 h( p
<br /><em>*Enter How Many Twitter Feed To Display</em>"," t: S# }" g2 O0 Q9 m
"id" => $shortname."_twitter_count",
1 c+ r! k1 N5 ^4 o7 q+ b "type" => "text",8 m/ Z' X; b& p/ k
"box" => "social",
. h& E0 g( I, `. Z# }" n "std" => "",
& b0 a3 T' a: f+ U) @7 B) N ),
- \ d9 f" j$ W0 }' {* x7 }
0 H" b# T) n1 i array( "name" => "</div></div>",9 V: J) U$ l1 e8 g( a
"type" => "close",
5 f! k/ D( z. I v( ]7 M) H7 f n ),' s# l: q* q& ~, p( r t7 e
t& P, W% i) {, N( _) c1 Z1 M* h6 J
; }0 e+ `: P3 j: V O9 S& m* F" _ array( "name" => "125 x 125 Banners Advertisement Settings",; ~7 i, P$ `6 f' _
"type" => "heading",
* V( _! X& B& j6 j' e ),
% w: H. t- J4 `# ~4 h4 n- a! J" y. R
# H- k9 `- t# P, m$ m* W array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
t, s0 F5 y9 S4 t9 x4 M "id" => $shortname."_sponsor_activate",
4 z' _6 \' `+ g8 e: j# S- T }# M u "type" => "select",
4 x9 Z/ J' b; e5 Z2 t "std" => "No"," ?" c% r9 f4 x3 K
"options" => array("No", "Yes")), X j6 Z/ ], n& O
3 ?( i. O6 a7 y7 J4 P1 U
' q+ q5 n4 N/ M; {3 ~ array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
% D) R3 m* \3 m2 ~8 {7 N5 g9 M "id" => $shortname."_sponsor_banner_one",9 u4 c; [0 z. K+ @' O' l H
"type" => "textarea",
# h! R/ [) ^- X, R "std" => "",5 h8 d( w: J$ H9 C
), 7 t, @7 f9 j* T& _& A
* K2 o6 Q; _ Q1 L$ j n
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
) _$ d5 O: K8 } j3 V1 \ "id" => $shortname."_sponsor_banner_two",# L- v2 t [7 v# {# ~7 V5 R5 c) i4 S
"type" => "textarea",. {+ x! f0 n5 I. X7 A% ]* `
"std" => ""," B" f, _$ j8 |, k1 }* }
),8 q- s+ Y) k: b7 ^4 I
3 E. i7 x; ]( @5 i
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
( U# j8 K/ J& t2 k "id" => $shortname."_sponsor_banner_three",
2 a" m c& k: {3 A "type" => "textarea",
) i: v9 {1 d# p0 e a3 q) t+ h "std" => "",
- P9 o, d ^6 o6 T! m* i ),
8 v* O8 T G$ i5 l6 d8 P
5 m# Q$ s* v! `& u array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
7 K$ q! f8 T9 Z- W "id" => $shortname."_sponsor_banner_four",
# r+ i# B: [" O: ?! S, h8 p "type" => "textarea",3 _+ y: B7 Z2 E( q8 U I1 X% N6 `
"std" => "",* }% r5 _6 @% T/ ?4 W3 _: q* e6 w
),
6 Y1 `' u7 ]3 _( a/ d2 A$ m+ X4 m2 n, P; X$ `; B
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
: R |$ c. c2 \% e) n4 Q1 r6 ^ "id" => $shortname."_sponsor_banner_five",( t) m4 g. S* V1 K$ P1 a: `
"type" => "textarea",. Q: f8 r$ H: m6 S
"std" => "",
( ~! l' W3 I0 A9 k! Q5 A4 v ),; _7 a8 i7 ~( y2 O1 e
+ n% T" h3 x, S! ^/ i) x# Y" {, p array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",& S9 y$ G- t! k6 `$ {) _5 `
"id" => $shortname."_sponsor_banner_six",) o) U0 `7 ]9 P# A
"type" => "textarea",9 a3 _$ G- ]; f$ k* p
"std" => "",3 D% Q. x" |( @ O7 @/ ^7 g
),
, L' E5 b/ V) l0 J: m! }+ z4 k" t! `' S) \" e7 M3 y$ p
array( "name" => "</div></div>",2 e3 o+ l: t' ~1 C
"type" => "close",
6 l2 ~2 C+ G5 _5 t' a) E ),3 B/ Q3 K0 ]# O' W
$ x* {- ~+ |9 n
- x% u& k- y6 ~6 ~: B
" g$ J6 S1 B w4 B$ \7 U8 l);9 ~# ~% ?+ {5 l8 Y) E
9 p: N- ~& ~' ~$ H6 s" x( v' b+ u% Vfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {6 M4 t! \& u5 s, `1 K" X
( w6 s! `2 ]* v0 Z3 Decho "<div id=\"admin-options\"> ";
6 z# g# J6 J8 D+ P- n- m
% \' `# n& E+ K7 N, z; hglobal $themename, $shortname, $options;5 H$ d$ z3 S8 ]% T3 b, i# E
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
4 ]2 y2 C# S5 O$ Jif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
/ J# E4 M8 c u) X1 ^1 ]?>
- k( W' l* l& T% J- V& @7 v4 t/ y9 [! Y) B A
<h4><?php echo "$themename"; ?> Theme Options</h4>" x+ ^* e4 w, D$ X
* H5 p: G& y/ X' f3 x<div class="annouce">
# b7 M0 v# G* x9 [<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
2 R& h* I9 p5 J$ [$ l; c* u: d<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
% ^- ^- g' s0 |. W</div>
4 Q1 D0 J- ]+ D9 V# j& b6 ^- T! h2 G/ I0 x2 K. S
<form action="" method="post">
: t5 [6 e5 `! _1 r% l+ U
& ^" c+ ~: T! X' C8 K( t<?php foreach ($options as $value) { ?>, z, p' S4 m# ?! a. k1 _
; R0 }5 u& K& E/ O<?php switch ( $value['type'] ) { case 'heading': ?>) W4 E4 V9 H) H4 L4 m
" z7 Y7 s+ q0 ~# C3 n( t<div class="get-option">1 j/ H! A2 M# ]/ X9 J
+ B) h- ]+ i4 w- ]: x8 J
<h2><?php echo $value['name']; ?></h2>0 \7 l9 j$ c: M: U$ f* j
5 k* C7 Q6 v! T: p& j$ Q& S& @<div class="option-save">
/ [' M( U' Z+ d; @2 X+ v8 |% Y$ d8 F' J) z4 \$ @
<?php
8 g4 W8 Y2 w. I# F- Q& Wbreak;) g7 E8 M! a2 z4 U/ F
case 'text':
( m3 j5 R; A# g9 ^?>+ ?* ?) x1 f* E$ Y" }
7 ], U1 X2 p1 m0 _, P3 e: H
<div class="description"><?php echo $value['name']; ?></div>
6 H: d# |; t" w0 t [- I k3 W) I; J<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
|$ y- V( R. `- G% u" I8 g* z# o1 F% W- {4 k. K
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
) ?3 |9 l0 ?( D: g# |* {$ U
& z- Y- O7 h+ ?. Q( E: ?<?php
( J. y: G; F: t6 _$ ~4 k3 ?break;1 n$ n3 c0 O3 L/ @, I! g
case 'select':; ]" l+ g$ G% _. C: E3 Y7 [; d
?>' u8 G! p5 S) P7 j# l; i: u7 t) y7 x
n; \" ~; w* W2 n2 |. K" u
<div class="description"><?php echo $value['name']; ?></div>; F+ k. }) `8 i) n% A5 y
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
7 n% V7 _ Y$ r; f `<?php foreach ($value['options'] as $option) { ?>
0 {& S8 Y1 D5 |8 M; ? [6 y<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
. }2 [0 v) K3 ]( e2 ?# W<?php } ?>
- _9 g5 T+ j9 \</select>0 A+ C, K$ O( U; t" a5 Z2 v7 M
</p>
/ A$ B; ?& x( T; r( |3 X3 m" d1 |1 i
<?php& N. g- j1 Z7 W2 R
break;- ^5 C% s& D2 z0 x, Z) A* M8 i- B
case 'textarea':
6 [. t% u- ]' L$valuex = $value['id'];2 d6 l a1 u; i( g6 i8 p
$valuey = stripslashes($valuex);
& L4 A6 u4 P6 |# ?3 c$ Z. q$video_code = get_settings($valuey);% Y* G8 ?* Q. A! S7 ]# Q* B
?>
& f5 g+ y9 p$ F! H8 c( b- @, B9 O) j/ S
2 x) C h a6 ]2 n<div class="description"><?php echo $value['name']; ?></div>
8 E% o" d1 |$ P5 _, K) M8 [. a<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }- B( F1 \/ ^2 t' l
$ P W6 y5 y/ u- ?/ C' i% O
else { echo $value['std']; } ?></textarea></p>9 ?, p! c8 \% D- ?7 x) l9 K
4 O& j1 D5 t) O, } j<?php
; I# ~- o I8 O2 A; t+ Xbreak;
8 i0 L" W# q' n. M7 C9 {2 R) ~case 'close':
+ v( m, O# E) G2 I# x' M/ O7 B?>
, j# e& ?, }. J# q8 E8 d5 G6 G- d: ^# H6 z
<div class="clearfix"></div>
. y+ B7 [: h" N( f0 u) P</div><!-- OPTION SAVE END -->
, D( C E0 H& K4 E! g
' M. u7 R' p% i4 |7 `$ Y<div class="clearfix"></div>
3 M0 A! J# i# I; G) a- ~- w</div><!-- GET OPTION END -->/ ]7 w) S9 `2 w+ x/ s3 O
- |' J* u. w: C<?php6 ?) v, L- a5 V0 b
break;0 `; M0 }' p( W. _& v5 b2 @7 J' |
default;
# A& m# J7 N2 e?>6 K6 p1 T& T2 K% A
- P0 K3 `& y6 ` n* L
" a& P( x2 \+ P3 q2 U0 c5 ~( j9 H3 F<?php
! S7 \" ^1 a) P- ?+ abreak; } ?>
$ K k% O0 o" U2 F
. T. X7 E: `3 l<?php } ?>7 v; K& Q G1 e: @
# z' N# M, R. L8 Z# N8 Y
<p class="save-p">! H8 a6 ~6 S/ S6 y' h6 ?% i
<input name="save" type="submit" class="sbutton" value="Save Options" />
5 D: T9 y' [; ]$ N/ M2 x! k9 ^<input type="hidden" name="action" value="save" />* ?6 \; [) r8 d
</p>- Z# a3 d5 e" ^ |
</form>$ } X% y! _. v# j* z5 r% t- I
: Q9 p( R* l& o0 b: s9 h( g5 ^<form method="post">
[; f# R `6 X+ l- z<p class="save-p">
7 t4 k9 Z! Z. q d( b+ K. N<input name="reset" type="submit" class="sbutton" value="Reset Options" />4 o0 {8 _, }/ [; \9 d5 _& F
<input type="hidden" name="action" value="reset" />
/ Q6 @: A I& M</p># H# z5 a) A: k# I) C; y- a9 [% o
</form>7 v( Z% f/ G T _: z& A
, y" y4 p% f& X: \8 \" S</div><!-- ADMIN OPTIONS END -->! s! q% D D) v
2 \& S4 y3 j* J& e2 C6 r<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
( G% ?- c+ y3 F- H* {# C, X+ Z
. Z ]: @! J/ I1 H4 e4 A' Xfunction mytheme_admin_register() {
' o) \, T, k+ h9 `4 qglobal $themename, $shortname, $options;/ f$ i; d& C$ U. C) t
if ( $_GET['page'] == basename(__FILE__) ) {# A' ~* [% |& i" ?
if ( 'save' == $_REQUEST['action'] ) {
Z+ {6 }0 x* i! lforeach ($options as $value) {8 }% z. X6 h* _. M: X5 B" s
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }( g4 g9 l, M$ ?, w. ^
foreach ($options as $value) {6 [8 W/ e I9 D# p% _/ J# x
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }8 ^* |8 u& v& ]8 Z; j* _3 V" s0 K8 `( x
header("Location: themes.php?page=functions.php&saved=true");
% t0 {& Z7 [$ p8 ?+ P+ d0 pdie;& P1 N4 ]# J/ B$ Y
} else if( 'reset' == $_REQUEST['action'] ) {, L$ o" e- I& D3 O$ N. J# M3 x
foreach ($options as $value) {2 E( E7 Z' S' E1 H: X7 R# N8 l
delete_option( $value['id'] ); }' N8 I* L4 b! P" L
header("Location: themes.php?page=functions.php&reset=true");: {) m+ X, P+ E- k
die;7 e) a5 `, v+ a
}" l+ ~% y/ m6 s z( \" w
}! p9 h% P* Y* @! N
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');+ i8 M0 D- h$ Q0 `7 F2 M
}! Y9 x7 l; p o8 E1 G4 {! d- H
7 b; q ^* E) e! y1 r+ V
function mytheme_admin_head() { ?>
6 s& h! w9 o% X( R+ ?- X, p' i<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
' [4 a8 c- E) k2 D<?php }# `' g5 X1 ^* c k
|
|